X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2477747881e52e36c48c9252c462858f88df78ad..293656292f058603a996b136eee9c7fefc6d3350:/src/richtext/richtextliststylepage.cpp?ds=sidebyside diff --git a/src/richtext/richtextliststylepage.cpp b/src/richtext/richtextliststylepage.cpp index ca89d6628a..ec7a360cde 100644 --- a/src/richtext/richtextliststylepage.cpp +++ b/src/richtext/richtextliststylepage.cpp @@ -18,13 +18,13 @@ * wxRichTextListStylePage type definition */ -IMPLEMENT_DYNAMIC_CLASS( wxRichTextListStylePage, wxPanel ) +IMPLEMENT_DYNAMIC_CLASS( wxRichTextListStylePage, wxRichTextDialogPage ) /*! * wxRichTextListStylePage event table definition */ -BEGIN_EVENT_TABLE( wxRichTextListStylePage, wxPanel ) +BEGIN_EVENT_TABLE( wxRichTextListStylePage, wxRichTextDialogPage ) ////@begin wxRichTextListStylePage event table entries EVT_SPINCTRL( ID_RICHTEXTLISTSTYLEPAGE_LEVEL, wxRichTextListStylePage::OnLevelUpdated ) @@ -93,6 +93,8 @@ BEGIN_EVENT_TABLE( wxRichTextListStylePage, wxPanel ) END_EVENT_TABLE() +IMPLEMENT_HELP_PROVISION(wxRichTextListStylePage) + /*! * wxRichTextListStylePage constructors */ @@ -115,7 +117,7 @@ wxRichTextListStylePage::wxRichTextListStylePage( wxWindow* parent, wxWindowID i bool wxRichTextListStylePage::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) { ////@begin wxRichTextListStylePage creation - wxPanel::Create( parent, id, pos, size, style ); + wxRichTextDialogPage::Create( parent, id, pos, size, style ); CreateControls(); if (GetSizer()) @@ -168,10 +170,10 @@ void wxRichTextListStylePage::Init() void wxRichTextListStylePage::CreateControls() { ////@begin wxRichTextListStylePage content construction - wxRichTextListStylePage* itemPanel1 = this; + wxRichTextListStylePage* itemRichTextDialogPage1 = this; wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); - itemPanel1->SetSizer(itemBoxSizer2); + itemRichTextDialogPage1->SetSizer(itemBoxSizer2); wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 5); @@ -179,10 +181,10 @@ void wxRichTextListStylePage::CreateControls() wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL); itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL, 5); - wxStaticText* itemStaticText5 = new wxStaticText( itemPanel1, wxID_STATIC, _("&List level:"), wxDefaultPosition, wxDefaultSize, 0 ); + wxStaticText* itemStaticText5 = new wxStaticText( itemRichTextDialogPage1, wxID_STATIC, _("&List level:"), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - m_levelCtrl = new wxSpinCtrl( itemPanel1, ID_RICHTEXTLISTSTYLEPAGE_LEVEL, wxT("1"), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 1, 10, 1 ); + m_levelCtrl = new wxSpinCtrl( itemRichTextDialogPage1, ID_RICHTEXTLISTSTYLEPAGE_LEVEL, _T("1"), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 1, 10, 1 ); m_levelCtrl->SetHelpText(_("Selects the list level to edit.")); if (wxRichTextListStylePage::ShowToolTips()) m_levelCtrl->SetToolTip(_("Selects the list level to edit.")); @@ -190,13 +192,13 @@ void wxRichTextListStylePage::CreateControls() itemBoxSizer4->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* itemButton8 = new wxButton( itemPanel1, ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT, _("&Font for Level..."), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton8 = new wxButton( itemRichTextDialogPage1, ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT, _("&Font for Level..."), wxDefaultPosition, wxDefaultSize, 0 ); itemButton8->SetHelpText(_("Click to choose the font for this level.")); if (wxRichTextListStylePage::ShowToolTips()) itemButton8->SetToolTip(_("Click to choose the font for this level.")); itemBoxSizer4->Add(itemButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxNotebook* itemNotebook9 = new wxNotebook( itemPanel1, ID_RICHTEXTLISTSTYLEPAGE_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxNB_DEFAULT|wxNB_TOP ); + wxNotebook* itemNotebook9 = new wxNotebook( itemRichTextDialogPage1, ID_RICHTEXTLISTSTYLEPAGE_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxBK_DEFAULT|wxBK_TOP ); wxPanel* itemPanel10 = new wxPanel( itemNotebook9, ID_RICHTEXTLISTSTYLEPAGE_BULLETS, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL); @@ -210,7 +212,7 @@ void wxRichTextListStylePage::CreateControls() itemBoxSizer13->Add(itemStaticText14, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxArrayString m_styleListBoxStrings; - m_styleListBox = new wxListBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX, wxDefaultPosition, wxSize(-1, 140), m_styleListBoxStrings, wxLB_SINGLE ); + m_styleListBox = new wxListBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX, wxDefaultPosition, wxSize(-1, 80), m_styleListBoxStrings, wxLB_SINGLE ); m_styleListBox->SetHelpText(_("The available bullet styles.")); if (wxRichTextListStylePage::ShowToolTips()) m_styleListBox->SetToolTip(_("The available bullet styles.")); @@ -270,7 +272,7 @@ void wxRichTextListStylePage::CreateControls() wxBoxSizer* itemBoxSizer28 = new wxBoxSizer(wxHORIZONTAL); itemBoxSizer26->Add(itemBoxSizer28, 0, wxGROW, 5); wxArrayString m_symbolCtrlStrings; - m_symbolCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL, wxT(""), wxDefaultPosition, wxSize(60, -1), m_symbolCtrlStrings, wxCB_DROPDOWN ); + m_symbolCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL, wxEmptyString, wxDefaultPosition, wxSize(60, -1), m_symbolCtrlStrings, wxCB_DROPDOWN ); m_symbolCtrl->SetHelpText(_("The bullet character.")); if (wxRichTextListStylePage::ShowToolTips()) m_symbolCtrl->SetToolTip(_("The bullet character.")); @@ -288,7 +290,7 @@ void wxRichTextListStylePage::CreateControls() itemBoxSizer26->Add(itemStaticText32, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxArrayString m_symbolFontCtrlStrings; - m_symbolFontCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, wxT(""), wxDefaultPosition, wxDefaultSize, m_symbolFontCtrlStrings, wxCB_DROPDOWN ); + m_symbolFontCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_symbolFontCtrlStrings, wxCB_DROPDOWN ); if (wxRichTextListStylePage::ShowToolTips()) m_symbolFontCtrl->SetToolTip(_("Available fonts.")); itemBoxSizer26->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5); @@ -299,7 +301,7 @@ void wxRichTextListStylePage::CreateControls() itemBoxSizer26->Add(itemStaticText35, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxArrayString m_bulletNameCtrlStrings; - m_bulletNameCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL, wxT(""), wxDefaultPosition, wxDefaultSize, m_bulletNameCtrlStrings, wxCB_DROPDOWN ); + m_bulletNameCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_bulletNameCtrlStrings, wxCB_DROPDOWN ); m_bulletNameCtrl->SetHelpText(_("A standard bullet name.")); if (wxRichTextListStylePage::ShowToolTips()) m_bulletNameCtrl->SetToolTip(_("A standard bullet name.")); @@ -375,14 +377,14 @@ void wxRichTextListStylePage::CreateControls() itemBoxSizer53->Add(itemBoxSizer55, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer55->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 5); - wxFlexGridSizer* itemFlexGridSizer57 = new wxFlexGridSizer(2, 2, 0, 0); + wxFlexGridSizer* itemFlexGridSizer57 = new wxFlexGridSizer(0, 2, 0, 0); itemBoxSizer55->Add(itemFlexGridSizer57, 0, wxALIGN_CENTER_VERTICAL, 5); wxStaticText* itemStaticText58 = new wxStaticText( itemPanel37, wxID_STATIC, _("&Left:"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer57->Add(itemStaticText58, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); wxBoxSizer* itemBoxSizer59 = new wxBoxSizer(wxHORIZONTAL); itemFlexGridSizer57->Add(itemBoxSizer59, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_indentLeft = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT, wxT(""), wxDefaultPosition, wxSize(50, -1), 0 ); + m_indentLeft = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_indentLeft->SetHelpText(_("The left indent.")); if (wxRichTextListStylePage::ShowToolTips()) m_indentLeft->SetToolTip(_("The left indent.")); @@ -393,7 +395,7 @@ void wxRichTextListStylePage::CreateControls() wxBoxSizer* itemBoxSizer62 = new wxBoxSizer(wxHORIZONTAL); itemFlexGridSizer57->Add(itemBoxSizer62, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_indentLeftFirst = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE, wxT(""), wxDefaultPosition, wxSize(50, -1), 0 ); + m_indentLeftFirst = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_indentLeftFirst->SetHelpText(_("The first line indent.")); if (wxRichTextListStylePage::ShowToolTips()) m_indentLeftFirst->SetToolTip(_("The first line indent.")); @@ -404,7 +406,7 @@ void wxRichTextListStylePage::CreateControls() wxBoxSizer* itemBoxSizer65 = new wxBoxSizer(wxHORIZONTAL); itemFlexGridSizer57->Add(itemBoxSizer65, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_indentRight = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT, wxT(""), wxDefaultPosition, wxSize(50, -1), 0 ); + m_indentRight = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_indentRight->SetHelpText(_("The right indent.")); if (wxRichTextListStylePage::ShowToolTips()) m_indentRight->SetToolTip(_("The right indent.")); @@ -426,14 +428,14 @@ void wxRichTextListStylePage::CreateControls() itemBoxSizer70->Add(itemBoxSizer72, 0, wxALIGN_LEFT|wxALL, 5); itemBoxSizer72->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 5); - wxFlexGridSizer* itemFlexGridSizer74 = new wxFlexGridSizer(2, 2, 0, 0); + wxFlexGridSizer* itemFlexGridSizer74 = new wxFlexGridSizer(0, 2, 0, 0); itemBoxSizer72->Add(itemFlexGridSizer74, 0, wxALIGN_CENTER_VERTICAL, 5); wxStaticText* itemStaticText75 = new wxStaticText( itemPanel37, wxID_STATIC, _("Before a paragraph:"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer74->Add(itemStaticText75, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); wxBoxSizer* itemBoxSizer76 = new wxBoxSizer(wxHORIZONTAL); itemFlexGridSizer74->Add(itemBoxSizer76, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_spacingBefore = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE, wxT(""), wxDefaultPosition, wxSize(50, -1), 0 ); + m_spacingBefore = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_spacingBefore->SetHelpText(_("The spacing before the paragraph.")); if (wxRichTextListStylePage::ShowToolTips()) m_spacingBefore->SetToolTip(_("The spacing before the paragraph.")); @@ -444,7 +446,7 @@ void wxRichTextListStylePage::CreateControls() wxBoxSizer* itemBoxSizer79 = new wxBoxSizer(wxHORIZONTAL); itemFlexGridSizer74->Add(itemBoxSizer79, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_spacingAfter = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER, wxT(""), wxDefaultPosition, wxSize(50, -1), 0 ); + m_spacingAfter = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_spacingAfter->SetHelpText(_("The spacing after the paragraph.")); if (wxRichTextListStylePage::ShowToolTips()) m_spacingAfter->SetToolTip(_("The spacing after the paragraph.")); @@ -470,7 +472,7 @@ void wxRichTextListStylePage::CreateControls() itemBoxSizer3->Add(itemNotebook9, 0, wxGROW|wxALL, 5); - m_previewCtrl = new wxRichTextCtrl( itemPanel1, ID_RICHTEXTLISTSTYLEPAGE_RICHTEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(350, 180), wxSUNKEN_BORDER|wxVSCROLL|wxTE_READONLY ); + m_previewCtrl = new wxRichTextCtrl( itemRichTextDialogPage1, ID_RICHTEXTLISTSTYLEPAGE_RICHTEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(350, 140), wxBORDER_THEME|wxVSCROLL|wxTE_READONLY ); m_previewCtrl->SetHelpText(_("Shows a preview of the bullet settings.")); if (wxRichTextListStylePage::ShowToolTips()) m_previewCtrl->SetToolTip(_("Shows a preview of the bullet settings."));