// Author: Julian Smart
// Modified by:
// Created: 2006-10-01
-// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
bool wxRichTextFormattingDialog::sm_showToolTips = false;
+IMPLEMENT_CLASS(wxRichTextDialogPage, wxPanel)
+
IMPLEMENT_CLASS(wxRichTextFormattingDialog, wxPropertySheetDialog)
BEGIN_EVENT_TABLE(wxRichTextFormattingDialog, wxPropertySheetDialog)
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 (!dim.IsValid())
{
- checkBox->SetValue(false);
+ if (checkBox)
+ checkBox->SetValue(false);
valueCtrl->SetValue(wxT("0"));
unitsCtrl->SetSelection(0);
#if 0
}
else
{
- checkBox->SetValue(true);
+ if (checkBox)
+ checkBox->SetValue(true);
if (dim.GetUnits() == wxTEXT_ATTR_UNITS_TENTHS_MM)
{
unitsIdx = 1;
void wxRichTextFormattingDialog::GetDimensionValue(wxTextAttrDimension& dim, wxTextCtrl* valueCtrl, wxComboBox* unitsCtrl, wxCheckBox* checkBox)
{
- if (!checkBox->GetValue())
+ if (checkBox && !checkBox->GetValue())
{
dim.Reset();
}
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);
}
}