[#1472076] Fixes after stock gdi changes within core library.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-18 08:29:15 +00:00
parent 93763ad5ba
commit ce3e37f1ec
7 changed files with 22 additions and 25 deletions

View File

@@ -113,7 +113,7 @@ private:
int m_maxWeights; int m_maxWeights;
wxSize m_defaultCellSize; wxSize m_defaultCellSize;
wxWindow *m_win; // usually used for debugging wxWindow *m_win; // usually used for debugging
wxPen *m_pen; const wxPen *m_pen;
void DrawGridLines(wxDC& dc); void DrawGridLines(wxDC& dc);
void Initialize(wxSize size); void Initialize(wxSize size);

View File

@@ -301,7 +301,7 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
inline long GetId() const { return m_id; } inline long GetId() const { return m_id; }
void SetPen(wxPen *pen); void SetPen(wxPen *pen);
void SetBrush(wxBrush *brush); void SetBrush(const wxBrush *brush);
virtual void Show(bool show); virtual void Show(bool show);
virtual bool IsShown() const { return m_visible; } virtual bool IsShown() const { return m_visible; }
@@ -330,7 +330,7 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
void AddText(const wxString& string); void AddText(const wxString& string);
inline wxPen *GetPen() const { return m_pen; } 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 * Region-specific functions (defaults to the default region
@@ -528,7 +528,7 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
bool m_formatted; bool m_formatted;
double m_xpos, m_ypos; double m_xpos, m_ypos;
wxPen* m_pen; wxPen* m_pen;
wxBrush* m_brush; const wxBrush* m_brush;
wxFont* m_font; wxFont* m_font;
wxColour m_textColour; wxColour m_textColour;
wxString m_textColourName; wxString m_textColourName;
@@ -558,7 +558,7 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
wxShape* m_parent; // In case it's a child wxShape* m_parent; // In case it's a child
int m_formatMode; int m_formatMode;
int m_shadowMode; int m_shadowMode;
wxBrush* m_shadowBrush; const wxBrush* m_shadowBrush;
int m_shadowOffsetX; int m_shadowOffsetX;
int m_shadowOffsetY; int m_shadowOffsetY;
int m_textMarginX; // Gap between text and border int m_textMarginX; // Gap between text and border

View File

@@ -63,12 +63,12 @@ class WXDLLIMPEXP_OGL wxControlPoint: public wxRectangleShape
inline void SetEraseObject(bool er) { m_eraseObject = er; } inline void SetEraseObject(bool er) { m_eraseObject = er; }
public: public:
int m_type; int m_type;
double m_xoffset; double m_xoffset;
double m_yoffset; double m_yoffset;
wxShape* m_shape; wxShape* m_shape;
wxCursor* m_oldCursor; const wxCursor* m_oldCursor;
bool m_eraseObject; // If true, erases object before dragging handle. bool m_eraseObject; // If true, erases object before dragging handle.
/* /*
* Store original top-left, bottom-right coordinates * Store original top-left, bottom-right coordinates

View File

@@ -189,9 +189,9 @@ class WXDLLIMPEXP_OGL wxDivisionShape: public wxCompositeShape
inline int GetHandleSide() const { return m_handleSide; } inline int GetHandleSide() const { return m_handleSide; }
inline void SetLeftSidePen(wxPen *pen) { m_leftSidePen = pen; } 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 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 SetLeftSideColour(const wxString& colour);
void SetTopSideColour(const wxString& colour); void SetTopSideColour(const wxString& colour);
@@ -214,8 +214,8 @@ class WXDLLIMPEXP_OGL wxDivisionShape: public wxCompositeShape
int m_handleSide; // Side at which handle is legal int m_handleSide; // Side at which handle is legal
wxPen* m_leftSidePen; const wxPen* m_leftSidePen;
wxPen* m_topSidePen; const wxPen* m_topSidePen;
wxString m_leftSideColour; wxString m_leftSideColour;
wxString m_topSideColour; wxString m_topSideColour;
wxString m_leftSideStyle; wxString m_leftSideStyle;

View File

@@ -58,7 +58,7 @@ class WXDLLIMPEXP_OGL wxPseudoMetaFile: public wxObject
inline void SetSize(double w, double h) { m_width = w; m_height = h; } inline void SetSize(double w, double h) { m_width = w; m_height = h; }
inline void SetFillBrush(wxBrush* brush) { m_fillBrush = brush; } 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 void SetOutlinePen(wxPen* pen) { m_outlinePen = pen; }
inline wxPen* GetOutlinePen() const { return m_outlinePen; } inline wxPen* GetOutlinePen() const { return m_outlinePen; }
@@ -114,7 +114,7 @@ public:
// Pen/brush specifying outline/fill colours // Pen/brush specifying outline/fill colours
// to override operations. // to override operations.
wxPen* m_outlinePen; wxPen* m_outlinePen;
wxBrush* m_fillBrush; const wxBrush* m_fillBrush;
wxList m_outlineColours; // List of the GDI operations that comprise the outline wxList m_outlineColours; // List of the GDI operations that comprise the outline
wxList m_fillColours; // List of the GDI operations that fill the shape wxList m_fillColours; // List of the GDI operations that fill the shape
double m_currentRotation; double m_currentRotation;
@@ -219,4 +219,3 @@ private:
#endif #endif
// _DRAWN_H_ // _DRAWN_H_

View File

@@ -689,7 +689,7 @@ void wxShape::SetPen(wxPen *the_pen)
m_pen = the_pen; m_pen = the_pen;
} }
void wxShape::SetBrush(wxBrush *the_brush) void wxShape::SetBrush(const wxBrush *the_brush)
{ {
m_brush = the_brush; m_brush = the_brush;
} }
@@ -3284,4 +3284,3 @@ wxBrush wxShape::GetBackgroundBrush()
} }
return * g_oglWhiteBackgroundBrush; return * g_oglWhiteBackgroundBrush;
} }

View File

@@ -837,7 +837,7 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
void wxLineShape::OnErase(wxDC& dc) void wxLineShape::OnErase(wxDC& dc)
{ {
wxPen *old_pen = m_pen; wxPen *old_pen = m_pen;
wxBrush *old_brush = m_brush; const wxBrush *old_brush = m_brush;
wxPen bg_pen = GetBackgroundPen(); wxPen bg_pen = GetBackgroundPen();
wxBrush bg_brush = GetBackgroundBrush(); wxBrush bg_brush = GetBackgroundBrush();
SetPen(&bg_pen); SetPen(&bg_pen);
@@ -958,7 +958,7 @@ void wxLineShape::FindNth(wxShape *image, int *nth, int *no_arcs, bool incoming)
void wxLineShape::OnDrawOutline(wxDC& dc, double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(w), double WXUNUSED(h)) void wxLineShape::OnDrawOutline(wxDC& dc, double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(w), double WXUNUSED(h))
{ {
wxPen *old_pen = m_pen; wxPen *old_pen = m_pen;
wxBrush *old_brush = m_brush; const wxBrush *old_brush = m_brush;
wxPen dottedPen(*wxBLACK, 1, wxDOT); wxPen dottedPen(*wxBLACK, 1, wxDOT);
SetPen(& dottedPen); SetPen(& dottedPen);
@@ -1742,7 +1742,7 @@ void wxLineShape::OnSizingDragLeft(wxControlPoint* pt, bool WXUNUSED(draw), doub
wxLineShape *lineShape = (wxLineShape *)this; wxLineShape *lineShape = (wxLineShape *)this;
wxPen *old_pen = lineShape->GetPen(); wxPen *old_pen = lineShape->GetPen();
wxBrush *old_brush = lineShape->GetBrush(); const wxBrush *old_brush = lineShape->GetBrush();
wxPen dottedPen(*wxBLACK, 1, wxDOT); wxPen dottedPen(*wxBLACK, 1, wxDOT);
lineShape->SetPen(& dottedPen); lineShape->SetPen(& dottedPen);
@@ -1790,7 +1790,7 @@ void wxLineShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y,
lpt->m_point->x = x; lpt->m_point->y = y; lpt->m_point->x = x; lpt->m_point->y = y;
wxPen *old_pen = lineShape->GetPen(); wxPen *old_pen = lineShape->GetPen();
wxBrush *old_brush = lineShape->GetBrush(); const wxBrush *old_brush = lineShape->GetBrush();
wxPen dottedPen(*wxBLACK, 1, wxDOT); wxPen dottedPen(*wxBLACK, 1, wxDOT);
lineShape->SetPen(& dottedPen); lineShape->SetPen(& dottedPen);
@@ -2503,4 +2503,3 @@ void wxLabelShape::OnRightClick(double x, double y, int keys, int attachment)
{ {
m_lineShape->GetEventHandler()->OnRightClick(x, y, keys, attachment); m_lineShape->GetEventHandler()->OnRightClick(x, y, keys, attachment);
} }