#include <wx/wx.h>
#endif
+#if wxUSE_PROLOGIO
#include <wx/deprecated/wxexpr.h>
+#endif
+
+#include "wx/ogl/ogl.h"
-#include <wx/ogl/basic.h>
-#include <wx/ogl/basicp.h>
-#include <wx/ogl/canvas.h>
-#include <wx/ogl/divided.h>
-#include <wx/ogl/lines.h>
-#include <wx/ogl/misc.h>
class wxDividedShapeControlPoint: public wxControlPoint
{
if (m_pen) dc.SetPen(* m_pen);
- if (m_textColour) dc.SetTextForeground(* m_textColour);
+ dc.SetTextForeground(m_textColour);
#ifdef __WXMSW__
// For efficiency, don't do this under X - doesn't make
{
wxShapeRegion *region = (wxShapeRegion *)node->GetData();
dc.SetFont(* region->GetFont());
- dc.SetTextForeground(* region->GetActualColourObject());
+ dc.SetTextForeground(region->GetActualColourObject());
double proportion =
region->m_regionProportionY < 0.0 ? defaultProportion : region->m_regionProportionY;
}
}
-void wxDividedShape::SetSize(double w, double h, bool recursive)
+void wxDividedShape::SetSize(double w, double h, bool WXUNUSED(recursive))
{
SetAttachmentSize(w, h);
m_width = w;
// Left or right.
else
{
- int i = 0;
- bool isLeft = FALSE;
- if (attachment < (n+1))
- {
- i = attachment-1;
- isLeft = FALSE;
- }
- else
- {
- i = (totalNumberAttachments - attachment - 1);
- isLeft = TRUE;
- }
+ bool isLeft = !(attachment < (n+1));
+ int i = (isLeft) ? (totalNumberAttachments - attachment - 1) : (attachment-1);
wxNode *node = GetRegions().Item(i);
if (node)
{
return maxN + 1;
}
-bool wxDividedShape::AttachmentIsValid(int attachment)
+bool wxDividedShape::AttachmentIsValid(int attachment) const
{
int totalNumberAttachments = (GetRegions().GetCount() * 2) + 2;
if (attachment >= totalNumberAttachments)
}
// Implement resizing of divided object division
-void wxDividedShapeControlPoint::OnDragLeft(bool draw, double x, double y, int keys, int attachment)
+void wxDividedShapeControlPoint::OnDragLeft(bool WXUNUSED(draw), double WXUNUSED(x), double y, int WXUNUSED(keys), int WXUNUSED(attachment))
{
wxClientDC dc(GetCanvas());
GetCanvas()->PrepareDC(dc);
dc.DrawLine(WXROUND(x1), WXROUND(y1), WXROUND(x2), WXROUND(y2));
}
-void wxDividedShapeControlPoint::OnBeginDragLeft(double x, double y, int keys, int attachment)
+void wxDividedShapeControlPoint::OnBeginDragLeft(double WXUNUSED(x), double y, int WXUNUSED(keys), int WXUNUSED(attachment))
{
wxClientDC dc(GetCanvas());
GetCanvas()->PrepareDC(dc);
m_canvas->CaptureMouse();
}
-void wxDividedShapeControlPoint::OnEndDragLeft(double x, double y, int keys, int attachment)
+void wxDividedShapeControlPoint::OnEndDragLeft(double WXUNUSED(x), double y, int WXUNUSED(keys), int WXUNUSED(attachment))
{
wxClientDC dc(GetCanvas());
GetCanvas()->PrepareDC(dc);
// Save values
double thisRegionTop = 0.0;
+ #if 0
+ // this variable is not readed later
double thisRegionBottom = 0.0;
+ #endif
double nextRegionBottom = 0.0;
node = dividedObject->GetRegions().GetFirst();
if (region == thisRegion)
{
thisRegionTop = currentY;
+ #if 0
+ // no need for assignment if value is not used later
thisRegionBottom = actualY;
+ #endif
if (node->GetNext())
nextRegion = (wxShapeRegion *)node->GetNext()->GetData();
}