int m_maxWeights;
wxSize m_defaultCellSize;
wxWindow *m_win; // usually used for debugging
- wxPen *m_pen;
+ const wxPen *m_pen;
void DrawGridLines(wxDC& dc);
void Initialize(wxSize size);
inline long GetId() const { return m_id; }
void SetPen(wxPen *pen);
- void SetBrush(wxBrush *brush);
+ void SetBrush(const wxBrush *brush);
virtual void Show(bool show);
virtual bool IsShown() const { return m_visible; }
void AddText(const wxString& string);
inline wxPen *GetPen() const { return m_pen; }
- inline wxBrush *GetBrush() const { return m_brush; }
+ inline const wxBrush *GetBrush() const { return m_brush; }
/*
* Region-specific functions (defaults to the default region
bool m_formatted;
double m_xpos, m_ypos;
wxPen* m_pen;
- wxBrush* m_brush;
+ const wxBrush* m_brush;
wxFont* m_font;
wxColour m_textColour;
wxString m_textColourName;
wxShape* m_parent; // In case it's a child
int m_formatMode;
int m_shadowMode;
- wxBrush* m_shadowBrush;
+ const wxBrush* m_shadowBrush;
int m_shadowOffsetX;
int m_shadowOffsetY;
int m_textMarginX; // Gap between text and border
inline void SetEraseObject(bool er) { m_eraseObject = er; }
public:
- int m_type;
- double m_xoffset;
- double m_yoffset;
- wxShape* m_shape;
- wxCursor* m_oldCursor;
- bool m_eraseObject; // If true, erases object before dragging handle.
+ int m_type;
+ double m_xoffset;
+ double m_yoffset;
+ wxShape* m_shape;
+ const wxCursor* m_oldCursor;
+ bool m_eraseObject; // If true, erases object before dragging handle.
/*
* Store original top-left, bottom-right coordinates
inline int GetHandleSide() const { return m_handleSide; }
inline void SetLeftSidePen(wxPen *pen) { m_leftSidePen = pen; }
- inline wxPen *GetLeftSidePen() const { return m_leftSidePen; }
+ inline const wxPen *GetLeftSidePen() const { return m_leftSidePen; }
inline void SetTopSidePen(wxPen *pen) { m_topSidePen = pen; }
- inline wxPen *GetTopSidePen() const { return m_topSidePen; }
+ inline const wxPen *GetTopSidePen() const { return m_topSidePen; }
void SetLeftSideColour(const wxString& colour);
void SetTopSideColour(const wxString& colour);
int m_handleSide; // Side at which handle is legal
- wxPen* m_leftSidePen;
- wxPen* m_topSidePen;
+ const wxPen* m_leftSidePen;
+ const wxPen* m_topSidePen;
wxString m_leftSideColour;
wxString m_topSideColour;
wxString m_leftSideStyle;
inline void SetSize(double w, double h) { m_width = w; m_height = h; }
inline void SetFillBrush(wxBrush* brush) { m_fillBrush = brush; }
- inline wxBrush* GetFillBrush() const { return m_fillBrush; }
+ inline const wxBrush* GetFillBrush() const { return m_fillBrush; }
inline void SetOutlinePen(wxPen* pen) { m_outlinePen = pen; }
inline wxPen* GetOutlinePen() const { return m_outlinePen; }
// Pen/brush specifying outline/fill colours
// to override operations.
wxPen* m_outlinePen;
- wxBrush* m_fillBrush;
+ const wxBrush* m_fillBrush;
wxList m_outlineColours; // List of the GDI operations that comprise the outline
wxList m_fillColours; // List of the GDI operations that fill the shape
double m_currentRotation;
#endif
// _DRAWN_H_
-
m_pen = the_pen;
}
-void wxShape::SetBrush(wxBrush *the_brush)
+void wxShape::SetBrush(const wxBrush *the_brush)
{
m_brush = the_brush;
}
}
return * g_oglWhiteBackgroundBrush;
}
-
void wxLineShape::OnErase(wxDC& dc)
{
wxPen *old_pen = m_pen;
- wxBrush *old_brush = m_brush;
+ const wxBrush *old_brush = m_brush;
wxPen bg_pen = GetBackgroundPen();
wxBrush bg_brush = GetBackgroundBrush();
SetPen(&bg_pen);
void wxLineShape::OnDrawOutline(wxDC& dc, double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(w), double WXUNUSED(h))
{
wxPen *old_pen = m_pen;
- wxBrush *old_brush = m_brush;
+ const wxBrush *old_brush = m_brush;
wxPen dottedPen(*wxBLACK, 1, wxDOT);
SetPen(& dottedPen);
wxLineShape *lineShape = (wxLineShape *)this;
wxPen *old_pen = lineShape->GetPen();
- wxBrush *old_brush = lineShape->GetBrush();
+ const wxBrush *old_brush = lineShape->GetBrush();
wxPen dottedPen(*wxBLACK, 1, wxDOT);
lineShape->SetPen(& dottedPen);
lpt->m_point->x = x; lpt->m_point->y = y;
wxPen *old_pen = lineShape->GetPen();
- wxBrush *old_brush = lineShape->GetBrush();
+ const wxBrush *old_brush = lineShape->GetBrush();
wxPen dottedPen(*wxBLACK, 1, wxDOT);
lineShape->SetPen(& dottedPen);
{
m_lineShape->GetEventHandler()->OnRightClick(x, y, keys, attachment);
}
-