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:
@@ -158,6 +158,9 @@ public:
|
||||
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OUTLINE_SYNCHRONIZE
|
||||
void OnRichtextOutlineSynchronizeUpdate( wxUpdateUIEvent& event );
|
||||
|
||||
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBORDERSPAGE_CORNER_TEXT
|
||||
void OnRichtextborderspageCornerUpdate( wxUpdateUIEvent& event );
|
||||
|
||||
////@end wxRichTextBordersPage event handler declarations
|
||||
|
||||
////@begin wxRichTextBordersPage member function declarations
|
||||
@@ -215,6 +218,9 @@ public:
|
||||
wxComboBox* m_bottomOutlineStyle;
|
||||
wxRichTextColourSwatchCtrl* m_bottomOutlineColour;
|
||||
wxCheckBox* m_outlineSyncCtrl;
|
||||
wxCheckBox* m_cornerRadiusCheckBox;
|
||||
wxTextCtrl* m_cornerRadiusText;
|
||||
wxComboBox* m_cornerRadiusUnits;
|
||||
wxRichTextBorderPreviewCtrl* m_borderPreviewCtrl;
|
||||
/// Control identifiers
|
||||
enum {
|
||||
@@ -264,6 +270,10 @@ public:
|
||||
ID_RICHTEXT_OUTLINE_BOTTOM_STYLE = 10842,
|
||||
ID_RICHTEXT_OUTLINE_BOTTOM_COLOUR = 10843,
|
||||
ID_RICHTEXT_OUTLINE_SYNCHRONIZE = 10846,
|
||||
ID_RICHTEXTBORDERSPAGE_CORNER = 10847,
|
||||
ID_RICHTEXTBORDERSPAGE_CORNER_CHECKBOX = 10848,
|
||||
ID_RICHTEXTBORDERSPAGE_CORNER_TEXT = 10849,
|
||||
ID_RICHTEXTBORDERSPAGE_CORNER_UNITS = 10850,
|
||||
ID_RICHTEXT_BORDER_PREVIEW = 10844
|
||||
};
|
||||
////@end wxRichTextBordersPage member variables
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user