bool wxRichTextFormattingDialog::sm_showToolTips = false;
+IMPLEMENT_CLASS(wxRichTextDialogPage, wxPanel)
+
IMPLEMENT_CLASS(wxRichTextFormattingDialog, wxPropertySheetDialog)
BEGIN_EVENT_TABLE(wxRichTextFormattingDialog, wxPropertySheetDialog)
m_styleDefinition = NULL;
m_styleSheet = NULL;
m_object = NULL;
+ m_options = 0;
}
wxRichTextFormattingDialog::~wxRichTextFormattingDialog()
}
// Apply attributes to the object being edited, if any
-bool wxRichTextFormattingDialog::ApplyStyle(wxRichTextCtrl* ctrl, int WXUNUSED(flags))
+bool wxRichTextFormattingDialog::ApplyStyle(wxRichTextCtrl* ctrl, int flags)
{
if (GetObject())
{
- ctrl->SetStyle(GetObject(), m_attributes);
+ ctrl->SetStyle(GetObject(), m_attributes, flags);
return true;
}
else
wxRichTextFormattingDialog* wxRichTextFormattingDialog::GetDialog(wxWindow* win)
{
wxWindow* p = win->GetParent();
- while (p && !p->IsKindOf(CLASSINFO(wxRichTextFormattingDialog)))
+ while (p && !wxDynamicCast(p, wxRichTextFormattingDialog))
p = p->GetParent();
wxRichTextFormattingDialog* dialog = wxDynamicCast(p, wxRichTextFormattingDialog);
return dialog;
if (event.LeftDown())
{
wxWindow* parent = GetParent();
- while (parent != NULL && !parent->IsKindOf(CLASSINFO(wxDialog)) && !parent->IsKindOf(CLASSINFO(wxFrame)))
+ while (parent != NULL && !wxDynamicCast(parent, wxDialog) && !wxDynamicCast(parent, wxFrame))
parent = parent->GetParent();
wxColourData data;
#endif // wxUSE_COLOURDLG
Refresh();
- wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
+ wxCommandEvent event(wxEVT_BUTTON, GetId());
GetEventHandler()->ProcessEvent(event);
}
}