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:
@@ -56,6 +56,10 @@ public:
|
|||||||
/// Gets the attributes associated with the main formatting dialog
|
/// Gets the attributes associated with the main formatting dialog
|
||||||
wxRichTextAttr* GetAttributes();
|
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
|
////@begin wxRichTextStylePage event handler declarations
|
||||||
|
|
||||||
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
|
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEPAGE_NEXT_STYLE
|
||||||
@@ -87,6 +91,8 @@ public:
|
|||||||
ID_RICHTEXTSTYLEPAGE_NEXT_STYLE = 10406
|
ID_RICHTEXTSTYLEPAGE_NEXT_STYLE = 10406
|
||||||
};
|
};
|
||||||
////@end wxRichTextStylePage member variables
|
////@end wxRichTextStylePage member variables
|
||||||
|
|
||||||
|
bool m_nameIsEditable;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -54,6 +54,8 @@ wxRichTextStylePage::wxRichTextStylePage( wxWindow* parent, wxWindowID id, const
|
|||||||
|
|
||||||
void wxRichTextStylePage::Init()
|
void wxRichTextStylePage::Init()
|
||||||
{
|
{
|
||||||
|
m_nameIsEditable = false;
|
||||||
|
|
||||||
////@begin wxRichTextStylePage member initialisation
|
////@begin wxRichTextStylePage member initialisation
|
||||||
m_styleName = NULL;
|
m_styleName = NULL;
|
||||||
m_basedOn = NULL;
|
m_basedOn = NULL;
|
||||||
@@ -156,6 +158,8 @@ bool wxRichTextStylePage::TransferDataFromWindow()
|
|||||||
|
|
||||||
bool wxRichTextStylePage::TransferDataToWindow()
|
bool wxRichTextStylePage::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
|
m_styleName->SetEditable(GetNameIsEditable());
|
||||||
|
|
||||||
wxPanel::TransferDataToWindow();
|
wxPanel::TransferDataToWindow();
|
||||||
|
|
||||||
wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this);
|
wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this);
|
||||||
|
Reference in New Issue
Block a user