Added corner radius to box attributes, and a control in the border properties page to edit it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2013-10-31 21:44:49 +00:00
parent 108f2cc7a7
commit 632b034940
7 changed files with 881 additions and 62 deletions

View File

@@ -305,7 +305,8 @@ enum wxTextBoxAttrFlags
wxTEXT_BOX_ATTR_COLLAPSE_BORDERS = 0x00000004,
wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT = 0x00000008,
wxTEXT_BOX_ATTR_BOX_STYLE_NAME = 0x00000010,
wxTEXT_BOX_ATTR_WHITESPACE = 0x00000020
wxTEXT_BOX_ATTR_WHITESPACE = 0x00000020,
wxTEXT_BOX_ATTR_CORNER_RADIUS = 0x00000040
};
/**
@@ -1278,6 +1279,22 @@ public:
*/
bool HasWhitespaceMode() const { return HasFlag(wxTEXT_BOX_ATTR_WHITESPACE); }
/**
Returns @true if the corner radius flag is present.
*/
bool HasCornerRadius() const { return HasFlag(wxTEXT_BOX_ATTR_CORNER_RADIUS); }
/**
Returns the corner radius value.
*/
const wxTextAttrDimension& GetCornerRadius() const { return m_cornerRadius; }
wxTextAttrDimension& GetCornerRadius() { return m_cornerRadius; }
/**
Sets the corner radius value.
*/
void SetCornerRadius(const wxTextAttrDimension& dim) { m_cornerRadius = dim; m_flags |= wxTEXT_BOX_ATTR_CORNER_RADIUS; }
/**
Returns the vertical alignment.
*/
@@ -1525,6 +1542,7 @@ public:
wxTextBoxAttrCollapseMode m_collapseMode;
wxTextBoxAttrVerticalAlignment m_verticalAlignment;
wxTextBoxAttrWhitespaceMode m_whitespaceMode;
wxTextAttrDimension m_cornerRadius;
wxString m_boxStyleName;
};
@@ -2793,7 +2811,7 @@ public:
/**
Draws a border.
*/
static bool DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxTextAttrBorders& attr, const wxRect& rect, int flags = 0);
static bool DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, const wxTextAttrBorders& borders, const wxRect& rect, int flags = 0);
/**
Returns the various rectangles of the box model in pixels. You can either specify @a contentRect (inner)