Fixes after stock gdi changes within core library
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e56f4f9e90
commit
c0989defa0
@ -300,7 +300,7 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
|
||||
inline void SetId(long i) { m_id = i; }
|
||||
inline long GetId() const { return m_id; }
|
||||
|
||||
void SetPen(wxPen *pen);
|
||||
void SetPen(const wxPen *pen);
|
||||
void SetBrush(const wxBrush *brush);
|
||||
|
||||
virtual void Show(bool show);
|
||||
@ -329,7 +329,7 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
|
||||
|
||||
void AddText(const wxString& string);
|
||||
|
||||
inline wxPen *GetPen() const { return m_pen; }
|
||||
inline const wxPen *GetPen() const { return m_pen; }
|
||||
inline const wxBrush *GetBrush() const { return m_brush; }
|
||||
|
||||
/*
|
||||
@ -527,7 +527,7 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
|
||||
wxShapeEvtHandler* m_eventHandler;
|
||||
bool m_formatted;
|
||||
double m_xpos, m_ypos;
|
||||
wxPen* m_pen;
|
||||
const wxPen* m_pen;
|
||||
const wxBrush* m_brush;
|
||||
wxFont* m_font;
|
||||
wxColour m_textColour;
|
||||
|
@ -61,7 +61,7 @@ class WXDLLIMPEXP_OGL wxPseudoMetaFile: public wxObject
|
||||
inline const wxBrush* GetFillBrush() const { return m_fillBrush; }
|
||||
|
||||
inline void SetOutlinePen(wxPen* pen) { m_outlinePen = pen; }
|
||||
inline wxPen* GetOutlinePen() const { return m_outlinePen; }
|
||||
inline const wxPen* GetOutlinePen() const { return m_outlinePen; }
|
||||
|
||||
inline void SetOutlineOp(int op) { m_outlineOp = op; }
|
||||
inline int GetOutlineOp() const { return m_outlineOp; }
|
||||
@ -96,8 +96,8 @@ public:
|
||||
virtual void SetClippingRect(const wxRect& rect);
|
||||
virtual void DestroyClippingRect();
|
||||
|
||||
virtual void SetPen(wxPen* pen, bool isOutline = false); // TODO: eventually, just store GDI object attributes, not actual
|
||||
virtual void SetBrush(wxBrush* brush, bool isFill = false); // pens/brushes etc.
|
||||
virtual void SetPen(const wxPen* pen, bool isOutline = false); // TODO: eventually, just store GDI object attributes, not actual
|
||||
virtual void SetBrush(const wxBrush* brush, bool isFill = false); // pens/brushes etc.
|
||||
virtual void SetFont(wxFont* font);
|
||||
virtual void SetTextColour(const wxColour& colour);
|
||||
virtual void SetBackgroundColour(const wxColour& colour);
|
||||
@ -113,7 +113,7 @@ public:
|
||||
|
||||
// Pen/brush specifying outline/fill colours
|
||||
// to override operations.
|
||||
wxPen* m_outlinePen;
|
||||
const wxPen* m_outlinePen;
|
||||
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
|
||||
@ -184,8 +184,8 @@ class WXDLLIMPEXP_OGL wxDrawnShape: public wxRectangleShape
|
||||
virtual void SetClippingRect(const wxRect& rect);
|
||||
virtual void DestroyClippingRect();
|
||||
|
||||
virtual void SetDrawnPen(wxPen* pen, bool isOutline = false); // TODO: eventually, just store GDI object attributes, not actual
|
||||
virtual void SetDrawnBrush(wxBrush* brush, bool isFill = false); // pens/brushes etc.
|
||||
virtual void SetDrawnPen(const wxPen* pen, bool isOutline = false); // TODO: eventually, just store GDI object attributes, not actual
|
||||
virtual void SetDrawnBrush(const wxBrush* brush, bool isFill = false); // pens/brushes etc.
|
||||
virtual void SetDrawnFont(wxFont* font);
|
||||
virtual void SetDrawnTextColour(const wxColour& colour);
|
||||
virtual void SetDrawnBackgroundColour(const wxColour& colour);
|
||||
|
@ -233,8 +233,8 @@ bool DiagramCommand::Do(void)
|
||||
theShape->AssignNewIds();
|
||||
theShape->SetEventHandler(new MyEvtHandler(theShape, theShape, wxEmptyString));
|
||||
theShape->SetCentreResize(false);
|
||||
theShape->SetPen(*wxBLACK_PEN);
|
||||
theShape->SetBrush(*wxCYAN_BRUSH);
|
||||
theShape->SetPen(wxBLACK_PEN);
|
||||
theShape->SetBrush(wxCYAN_BRUSH);
|
||||
|
||||
theShape->SetSize(60, 60);
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ class DiagramCommand: public wxCommand
|
||||
bool deleteShape;
|
||||
|
||||
// Storage for property commands
|
||||
wxBrush *shapeBrush;
|
||||
const wxBrush *shapeBrush;
|
||||
wxPen *shapePen;
|
||||
wxString shapeLabel;
|
||||
public:
|
||||
|
@ -684,7 +684,7 @@ bool wxShape::GetPerimeterPoint(double WXUNUSED(x1), double WXUNUSED(y1),
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxShape::SetPen(wxPen *the_pen)
|
||||
void wxShape::SetPen(const wxPen *the_pen)
|
||||
{
|
||||
m_pen = the_pen;
|
||||
}
|
||||
|
@ -361,12 +361,12 @@ void wxDrawnShape::DestroyClippingRect()
|
||||
m_metafiles[m_currentAngle].DestroyClippingRect();
|
||||
}
|
||||
|
||||
void wxDrawnShape::SetDrawnPen(wxPen* pen, bool isOutline)
|
||||
void wxDrawnShape::SetDrawnPen(const wxPen* pen, bool isOutline)
|
||||
{
|
||||
m_metafiles[m_currentAngle].SetPen(pen, isOutline);
|
||||
}
|
||||
|
||||
void wxDrawnShape::SetDrawnBrush(wxBrush* brush, bool isFill)
|
||||
void wxDrawnShape::SetDrawnBrush(const wxBrush* brush, bool isFill)
|
||||
{
|
||||
m_metafiles[m_currentAngle].SetBrush(brush, isFill);
|
||||
}
|
||||
@ -2417,9 +2417,9 @@ void wxPseudoMetaFile::DestroyClippingRect()
|
||||
m_ops.Append(theOp);
|
||||
}
|
||||
|
||||
void wxPseudoMetaFile::SetPen(wxPen* pen, bool isOutline)
|
||||
void wxPseudoMetaFile::SetPen(const wxPen* pen, bool isOutline)
|
||||
{
|
||||
m_gdiObjects.Append(pen);
|
||||
m_gdiObjects.Append(wx_const_cast(wxPen*, pen));
|
||||
int n = m_gdiObjects.GetCount();
|
||||
|
||||
wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_PEN, this, n - 1);
|
||||
@ -2432,9 +2432,9 @@ void wxPseudoMetaFile::SetPen(wxPen* pen, bool isOutline)
|
||||
}
|
||||
}
|
||||
|
||||
void wxPseudoMetaFile::SetBrush(wxBrush* brush, bool isFill)
|
||||
void wxPseudoMetaFile::SetBrush(const wxBrush* brush, bool isFill)
|
||||
{
|
||||
m_gdiObjects.Append(brush);
|
||||
m_gdiObjects.Append(wx_const_cast(wxBrush*, brush));
|
||||
int n = m_gdiObjects.GetCount();
|
||||
|
||||
wxOpSetGDI* theOp = new wxOpSetGDI(DRAWOP_SET_BRUSH, this, n - 1);
|
||||
|
@ -836,7 +836,7 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
|
||||
|
||||
void wxLineShape::OnErase(wxDC& dc)
|
||||
{
|
||||
wxPen *old_pen = m_pen;
|
||||
const wxPen *old_pen = m_pen;
|
||||
const wxBrush *old_brush = m_brush;
|
||||
wxPen bg_pen = GetBackgroundPen();
|
||||
wxBrush bg_brush = GetBackgroundBrush();
|
||||
@ -957,7 +957,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))
|
||||
{
|
||||
wxPen *old_pen = m_pen;
|
||||
const wxPen *old_pen = m_pen;
|
||||
const wxBrush *old_brush = m_brush;
|
||||
|
||||
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||
@ -1741,7 +1741,7 @@ void wxLineShape::OnSizingDragLeft(wxControlPoint* pt, bool WXUNUSED(draw), doub
|
||||
|
||||
wxLineShape *lineShape = (wxLineShape *)this;
|
||||
|
||||
wxPen *old_pen = lineShape->GetPen();
|
||||
const wxPen *old_pen = lineShape->GetPen();
|
||||
const wxBrush *old_brush = lineShape->GetBrush();
|
||||
|
||||
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||
@ -1789,7 +1789,7 @@ void wxLineShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y,
|
||||
lpt->m_xpos = x; lpt->m_ypos = y;
|
||||
lpt->m_point->x = x; lpt->m_point->y = y;
|
||||
|
||||
wxPen *old_pen = lineShape->GetPen();
|
||||
const wxPen *old_pen = lineShape->GetPen();
|
||||
const wxBrush *old_brush = lineShape->GetBrush();
|
||||
|
||||
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||
|
Loading…
Reference in New Issue
Block a user