wxShapeRegion::SetText shouldn't append to formatted strings list
Addition of accessors to allow an app to do alternate diagram streaming git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -400,6 +400,7 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
|
|||||||
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
int nth = 0, int no_arcs = 1, wxLineShape *line = NULL);
|
||||||
virtual int GetNumberOfAttachments() const;
|
virtual int GetNumberOfAttachments() const;
|
||||||
virtual bool AttachmentIsValid(int attachment) const;
|
virtual bool AttachmentIsValid(int attachment) const;
|
||||||
|
virtual wxList& GetAttachments() { return m_attachmentPoints; }
|
||||||
|
|
||||||
// Only get the attachment position at the _edge_ of the shape, ignoring
|
// Only get the attachment position at the _edge_ of the shape, ignoring
|
||||||
// branching mode. This is used e.g. to indicate the edge of interest, not the point
|
// branching mode. This is used e.g. to indicate the edge of interest, not the point
|
||||||
@@ -506,7 +507,8 @@ class WXDLLIMPEXP_OGL wxShape: public wxShapeEvtHandler
|
|||||||
|
|
||||||
// Rotate about the given axis by the given amount in radians.
|
// Rotate about the given axis by the given amount in radians.
|
||||||
virtual void Rotate(double x, double y, double theta);
|
virtual void Rotate(double x, double y, double theta);
|
||||||
virtual inline double GetRotation() const { return m_rotation; }
|
virtual double GetRotation() const { return m_rotation; }
|
||||||
|
virtual void SetRotation(double rotation) { m_rotation = rotation; }
|
||||||
|
|
||||||
void ClearAttachments();
|
void ClearAttachments();
|
||||||
|
|
||||||
@@ -629,10 +631,17 @@ class WXDLLIMPEXP_OGL wxPolygonShape: public wxShape
|
|||||||
void Copy(wxShape& copy);
|
void Copy(wxShape& copy);
|
||||||
|
|
||||||
inline wxList *GetPoints() { return m_points; }
|
inline wxList *GetPoints() { return m_points; }
|
||||||
|
inline wxList *GetOriginalPoints() { return m_originalPoints; }
|
||||||
|
|
||||||
// Rotate about the given axis by the given amount in radians
|
// Rotate about the given axis by the given amount in radians
|
||||||
virtual void Rotate(double x, double y, double theta);
|
virtual void Rotate(double x, double y, double theta);
|
||||||
|
|
||||||
|
double GetOriginalWidth() const { return m_originalWidth; }
|
||||||
|
double GetOriginalHeight() const { return m_originalHeight; }
|
||||||
|
|
||||||
|
void SetOriginalWidth(double w) { m_originalWidth = w; }
|
||||||
|
void SetOriginalHeight(double h) { m_originalHeight = h; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxList* m_points;
|
wxList* m_points;
|
||||||
wxList* m_originalPoints;
|
wxList* m_originalPoints;
|
||||||
@@ -654,6 +663,7 @@ class WXDLLIMPEXP_OGL wxRectangleShape: public wxShape
|
|||||||
void OnDraw(wxDC& dc);
|
void OnDraw(wxDC& dc);
|
||||||
void SetSize(double x, double y, bool recursive = TRUE);
|
void SetSize(double x, double y, bool recursive = TRUE);
|
||||||
void SetCornerRadius(double rad); // If > 0, rounded corners
|
void SetCornerRadius(double rad); // If > 0, rounded corners
|
||||||
|
double GetCornerRadius() const { return m_cornerRadius; }
|
||||||
|
|
||||||
#if wxUSE_PROLOGIO
|
#if wxUSE_PROLOGIO
|
||||||
void WriteAttributes(wxExpr *clause);
|
void WriteAttributes(wxExpr *clause);
|
||||||
|
@@ -138,7 +138,7 @@ class WXDLLIMPEXP_OGL wxShapeRegion: public wxObject
|
|||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
inline void SetText(const wxString& s)
|
inline void SetText(const wxString& s)
|
||||||
{ m_regionText = s; m_formattedText.Append(new wxShapeTextLine(0,0,s));}
|
{ m_regionText = s; }
|
||||||
void SetFont(wxFont *f);
|
void SetFont(wxFont *f);
|
||||||
void SetMinSize(double w, double h);
|
void SetMinSize(double w, double h);
|
||||||
void SetSize(double w, double h);
|
void SetSize(double w, double h);
|
||||||
|
@@ -248,6 +248,8 @@ class WXDLLIMPEXP_OGL wxLineShape: public wxShape
|
|||||||
void SetAlignmentType(bool isEnd, int alignType);
|
void SetAlignmentType(bool isEnd, int alignType);
|
||||||
bool GetAlignmentOrientation(bool isEnd);
|
bool GetAlignmentOrientation(bool isEnd);
|
||||||
int GetAlignmentType(bool isEnd);
|
int GetAlignmentType(bool isEnd);
|
||||||
|
int GetAlignmentStart() const { return m_alignmentStart; }
|
||||||
|
int GetAlignmentEnd() const { return m_alignmentEnd; }
|
||||||
|
|
||||||
// Find next control point in line after the start/end point
|
// Find next control point in line after the start/end point
|
||||||
// (depending on whether the node object is at start or end)
|
// (depending on whether the node object is at start or end)
|
||||||
|
@@ -63,6 +63,13 @@ void wxPolygonShape::Create(wxList *the_points)
|
|||||||
{
|
{
|
||||||
ClearPoints();
|
ClearPoints();
|
||||||
|
|
||||||
|
if (!the_points)
|
||||||
|
{
|
||||||
|
m_originalPoints = new wxList;
|
||||||
|
m_points = new wxList;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
m_originalPoints = the_points;
|
m_originalPoints = the_points;
|
||||||
|
|
||||||
// Duplicate the list of points
|
// Duplicate the list of points
|
||||||
@@ -80,6 +87,7 @@ void wxPolygonShape::Create(wxList *the_points)
|
|||||||
m_originalWidth = m_boundWidth;
|
m_originalWidth = m_boundWidth;
|
||||||
m_originalHeight = m_boundHeight;
|
m_originalHeight = m_boundHeight;
|
||||||
SetDefaultRegionSize();
|
SetDefaultRegionSize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPolygonShape::~wxPolygonShape()
|
wxPolygonShape::~wxPolygonShape()
|
||||||
|
Reference in New Issue
Block a user