Allow the style name to be edited in the style definition editor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c6c68635d3
commit
22412b5e8f
@ -56,6 +56,10 @@ public:
|
||||
/// Gets the attributes associated with the main formatting dialog
|
||||
wxRichTextAttr* GetAttributes();
|
||||
|
||||
/// Determines whether the style name can be edited
|
||||
bool GetNameIsEditable() const { return m_nameIsEditable; }
|
||||
void SetNameIsEditable(bool editable) { m_nameIsEditable = editable; }
|
||||
|
||||
////@begin wxRichTextStylePage event handler declarations
|
||||
|
||||
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
|
||||
@ -87,6 +91,8 @@ public:
|
||||
ID_RICHTEXTSTYLEPAGE_NEXT_STYLE = 10406
|
||||
};
|
||||
////@end wxRichTextStylePage member variables
|
||||
|
||||
bool m_nameIsEditable;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -54,6 +54,8 @@ wxRichTextStylePage::wxRichTextStylePage( wxWindow* parent, wxWindowID id, const
|
||||
|
||||
void wxRichTextStylePage::Init()
|
||||
{
|
||||
m_nameIsEditable = false;
|
||||
|
||||
////@begin wxRichTextStylePage member initialisation
|
||||
m_styleName = NULL;
|
||||
m_basedOn = NULL;
|
||||
@ -156,6 +158,8 @@ bool wxRichTextStylePage::TransferDataFromWindow()
|
||||
|
||||
bool wxRichTextStylePage::TransferDataToWindow()
|
||||
{
|
||||
m_styleName->SetEditable(GetNameIsEditable());
|
||||
|
||||
wxPanel::TransferDataToWindow();
|
||||
|
||||
wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this);
|
||||
|
Loading…
Reference in New Issue
Block a user