X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dadd4f5523e6ab9b489632f478958cd6dc8d03aa..a78d2fbab115b4c6537349fb06275d1610bf4aa0:/src/richtext/richtextliststylepage.cpp diff --git a/src/richtext/richtextliststylepage.cpp b/src/richtext/richtextliststylepage.cpp index 40638100f1..ec7a360cde 100644 --- a/src/richtext/richtextliststylepage.cpp +++ b/src/richtext/richtextliststylepage.cpp @@ -1,15 +1,15 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: richtextliststylepage.cpp -// Purpose: +// Name: src/richtext/richtextliststylepage.cpp +// Purpose: // Author: Julian Smart -// Modified by: +// Modified by: // Created: 10/18/2006 11:36:37 AM -// RCS-ID: +// RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "../../include/wx/richtext/richtextliststylepage.h" +#include "wx/richtext/richtextliststylepage.h" ////@begin XPM images ////@end XPM images @@ -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 ) @@ -37,24 +37,35 @@ BEGIN_EVENT_TABLE( wxRichTextListStylePage, wxPanel ) EVT_LISTBOX( ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX, wxRichTextListStylePage::OnStylelistboxSelected ) + EVT_CHECKBOX( ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL, wxRichTextListStylePage::OnPeriodctrlClick ) + EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL, wxRichTextListStylePage::OnPeriodctrlUpdate ) + + EVT_CHECKBOX( ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL, wxRichTextListStylePage::OnParenthesesctrlClick ) + EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL, wxRichTextListStylePage::OnParenthesesctrlUpdate ) + + EVT_CHECKBOX( ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL, wxRichTextListStylePage::OnRightParenthesisCtrlClick ) + EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL, wxRichTextListStylePage::OnRightParenthesisCtrlUpdate ) + + EVT_COMBOBOX( ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL, wxRichTextListStylePage::OnBulletAlignmentCtrlSelected ) + EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC, wxRichTextListStylePage::OnSymbolstaticUpdate ) - EVT_COMBOBOX( ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, wxRichTextListStylePage::OnSymbolctrlSelected ) - EVT_TEXT( ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, wxRichTextListStylePage::OnSymbolctrlUpdated ) - EVT_UPDATE_UI( ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, wxRichTextListStylePage::OnSymbolctrlUIUpdate ) + EVT_COMBOBOX( ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL, wxRichTextListStylePage::OnSymbolctrlSelected ) + EVT_TEXT( ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL, wxRichTextListStylePage::OnSymbolctrlUpdated ) + EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL, wxRichTextListStylePage::OnSymbolctrlUIUpdate ) - EVT_BUTTON( ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, wxRichTextListStylePage::OnChooseSymbolClick ) - EVT_UPDATE_UI( ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, wxRichTextListStylePage::OnChooseSymbolUpdate ) + EVT_BUTTON( ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL, wxRichTextListStylePage::OnChooseSymbolClick ) + EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL, wxRichTextListStylePage::OnChooseSymbolUpdate ) EVT_COMBOBOX( ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, wxRichTextListStylePage::OnSymbolfontctrlSelected ) EVT_TEXT( ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, wxRichTextListStylePage::OnSymbolfontctrlUpdated ) EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, wxRichTextListStylePage::OnSymbolfontctrlUIUpdate ) - EVT_CHECKBOX( ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL, wxRichTextListStylePage::OnParenthesesctrlClick ) - EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL, wxRichTextListStylePage::OnParenthesesctrlUpdate ) + EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC, wxRichTextListStylePage::OnNamestaticUpdate ) - EVT_CHECKBOX( ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL, wxRichTextListStylePage::OnPeriodctrlClick ) - EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL, wxRichTextListStylePage::OnPeriodctrlUpdate ) + EVT_COMBOBOX( ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL, wxRichTextListStylePage::OnNamectrlSelected ) + EVT_TEXT( ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL, wxRichTextListStylePage::OnNamectrlUpdated ) + EVT_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL, wxRichTextListStylePage::OnNamectrlUIUpdate ) EVT_RADIOBUTTON( ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT, wxRichTextListStylePage::OnRichtextliststylepageAlignleftSelected ) @@ -82,6 +93,8 @@ BEGIN_EVENT_TABLE( wxRichTextListStylePage, wxPanel ) END_EVENT_TABLE() +IMPLEMENT_HELP_PROVISION(wxRichTextListStylePage) + /*! * wxRichTextListStylePage constructors */ @@ -104,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()) @@ -117,7 +130,7 @@ bool wxRichTextListStylePage::Create( wxWindow* parent, wxWindowID id, const wxP } /*! - * Member initialisation + * Member initialisation */ void wxRichTextListStylePage::Init() @@ -128,10 +141,13 @@ void wxRichTextListStylePage::Init() ////@begin wxRichTextListStylePage member initialisation m_levelCtrl = NULL; m_styleListBox = NULL; + m_periodCtrl = NULL; + m_parenthesesCtrl = NULL; + m_rightParenthesisCtrl = NULL; + m_bulletAlignmentCtrl = NULL; m_symbolCtrl = NULL; m_symbolFontCtrl = NULL; - m_parenthesesCtrl = NULL; - m_periodCtrl = NULL; + m_bulletNameCtrl = NULL; m_alignmentLeft = NULL; m_alignmentRight = NULL; m_alignmentJustified = NULL; @@ -146,17 +162,18 @@ void wxRichTextListStylePage::Init() m_previewCtrl = NULL; ////@end wxRichTextListStylePage member initialisation } + /*! * Control creation for wxRichTextListStylePage */ 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); @@ -164,24 +181,24 @@ 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 ); - itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + 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, _T("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 (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_levelCtrl->SetToolTip(_("Selects the list level to edit.")); itemBoxSizer4->Add(m_levelCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 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 (ShowToolTips()) + 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_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); @@ -192,258 +209,289 @@ void wxRichTextListStylePage::CreateControls() wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); itemBoxSizer12->Add(itemBoxSizer13, 0, wxGROW, 5); wxStaticText* itemStaticText14 = new wxStaticText( itemPanel10, wxID_STATIC, _("&Bullet style:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer13->Add(itemStaticText14, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer13->Add(itemStaticText14, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); - wxString* m_styleListBoxStrings = NULL; - m_styleListBox = new wxListBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX, wxDefaultPosition, wxDefaultSize, 0, m_styleListBoxStrings, wxLB_SINGLE ); + wxArrayString m_styleListBoxStrings; + m_styleListBox = new wxListBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX, wxDefaultPosition, wxSize(-1, 80), m_styleListBoxStrings, wxLB_SINGLE ); m_styleListBox->SetHelpText(_("The available bullet styles.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_styleListBox->SetToolTip(_("The available bullet styles.")); - itemBoxSizer13->Add(m_styleListBox, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer13->Add(m_styleListBox, 1, wxGROW|wxALL, 5); + + wxBoxSizer* itemBoxSizer16 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer13->Add(itemBoxSizer16, 0, wxGROW, 5); + m_periodCtrl = new wxCheckBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL, _("Peri&od"), wxDefaultPosition, wxDefaultSize, 0 ); + m_periodCtrl->SetValue(false); + m_periodCtrl->SetHelpText(_("Check to add a period after the bullet.")); + if (wxRichTextListStylePage::ShowToolTips()) + m_periodCtrl->SetToolTip(_("Check to add a period after the bullet.")); + itemBoxSizer16->Add(m_periodCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + m_parenthesesCtrl = new wxCheckBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL, _("(*)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_parenthesesCtrl->SetValue(false); + m_parenthesesCtrl->SetHelpText(_("Check to enclose the bullet in parentheses.")); + if (wxRichTextListStylePage::ShowToolTips()) + m_parenthesesCtrl->SetToolTip(_("Check to enclose the bullet in parentheses.")); + itemBoxSizer16->Add(m_parenthesesCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + m_rightParenthesisCtrl = new wxCheckBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL, _("*)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_rightParenthesisCtrl->SetValue(false); + m_rightParenthesisCtrl->SetHelpText(_("Check to add a right parenthesis.")); + if (wxRichTextListStylePage::ShowToolTips()) + m_rightParenthesisCtrl->SetToolTip(_("Check to add a right parenthesis.")); + itemBoxSizer16->Add(m_rightParenthesisCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + itemBoxSizer13->Add(2, 1, 0, wxALIGN_CENTER_HORIZONTAL, 5); + + wxStaticText* itemStaticText21 = new wxStaticText( itemPanel10, wxID_STATIC, _("Bullet &Alignment:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer13->Add(itemStaticText21, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + + wxArrayString m_bulletAlignmentCtrlStrings; + m_bulletAlignmentCtrlStrings.Add(_("Left")); + m_bulletAlignmentCtrlStrings.Add(_("Centre")); + m_bulletAlignmentCtrlStrings.Add(_("Right")); + m_bulletAlignmentCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL, _("Left"), wxDefaultPosition, wxSize(60, -1), m_bulletAlignmentCtrlStrings, wxCB_READONLY ); + m_bulletAlignmentCtrl->SetStringSelection(_("Left")); + m_bulletAlignmentCtrl->SetHelpText(_("The bullet character.")); + if (wxRichTextListStylePage::ShowToolTips()) + m_bulletAlignmentCtrl->SetToolTip(_("The bullet character.")); + itemBoxSizer13->Add(m_bulletAlignmentCtrl, 0, wxGROW|wxALL|wxFIXED_MINSIZE, 5); itemBoxSizer12->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - wxStaticLine* itemStaticLine17 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - itemBoxSizer12->Add(itemStaticLine17, 0, wxGROW|wxALL, 5); + wxStaticLine* itemStaticLine24 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + itemBoxSizer12->Add(itemStaticLine24, 0, wxGROW|wxALL, 5); itemBoxSizer12->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer12->Add(itemBoxSizer19, 0, wxGROW, 5); - wxStaticText* itemStaticText20 = new wxStaticText( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC, _("&Symbol:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer19->Add(itemStaticText20, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer12->Add(itemBoxSizer26, 0, wxGROW, 5); + wxStaticText* itemStaticText27 = new wxStaticText( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC, _("&Symbol:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer26->Add(itemStaticText27, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); - wxBoxSizer* itemBoxSizer21 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer19->Add(itemBoxSizer21, 0, wxGROW, 5); - wxString* m_symbolCtrlStrings = NULL; - m_symbolCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, _T(""), wxDefaultPosition, wxSize(60, -1), 0, m_symbolCtrlStrings, wxCB_DROPDOWN ); + wxBoxSizer* itemBoxSizer28 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer26->Add(itemBoxSizer28, 0, wxGROW, 5); + wxArrayString m_symbolCtrlStrings; + m_symbolCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL, wxEmptyString, wxDefaultPosition, wxSize(60, -1), m_symbolCtrlStrings, wxCB_DROPDOWN ); m_symbolCtrl->SetHelpText(_("The bullet character.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_symbolCtrl->SetToolTip(_("The bullet character.")); - itemBoxSizer21->Add(m_symbolCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE, 5); + itemBoxSizer28->Add(m_symbolCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE, 5); - wxButton* itemButton23 = new wxButton( itemPanel10, ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, _("Ch&oose..."), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton23->SetHelpText(_("Click to browse for a symbol.")); - if (ShowToolTips()) - itemButton23->SetToolTip(_("Click to browse for a symbol.")); - itemBoxSizer21->Add(itemButton23, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxButton* itemButton30 = new wxButton( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL, _("Ch&oose..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton30->SetHelpText(_("Click to browse for a symbol.")); + if (wxRichTextListStylePage::ShowToolTips()) + itemButton30->SetToolTip(_("Click to browse for a symbol.")); + itemBoxSizer28->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - itemBoxSizer19->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer26->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5); - wxStaticText* itemStaticText25 = new wxStaticText( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC, _("Symbol &font:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer19->Add(itemStaticText25, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + wxStaticText* itemStaticText32 = new wxStaticText( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC, _("Symbol &font:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer26->Add(itemStaticText32, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); - wxString* m_symbolFontCtrlStrings = NULL; - m_symbolFontCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_symbolFontCtrlStrings, wxCB_DROPDOWN ); - if (ShowToolTips()) + wxArrayString m_symbolFontCtrlStrings; + m_symbolFontCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_symbolFontCtrlStrings, wxCB_DROPDOWN ); + if (wxRichTextListStylePage::ShowToolTips()) m_symbolFontCtrl->SetToolTip(_("Available fonts.")); - itemBoxSizer19->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5); + itemBoxSizer26->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5); - itemBoxSizer12->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); + itemBoxSizer26->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL, 5); - wxStaticLine* itemStaticLine28 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - itemBoxSizer12->Add(itemStaticLine28, 0, wxGROW|wxALL, 5); + wxStaticText* itemStaticText35 = new wxStaticText( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC, _("S&tandard bullet name:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer26->Add(itemStaticText35, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); - itemBoxSizer12->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - - wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer12->Add(itemBoxSizer30, 0, wxALIGN_TOP|wxRIGHT|wxTOP|wxBOTTOM, 5); - m_parenthesesCtrl = new wxCheckBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL, _("&Parentheses"), wxDefaultPosition, wxDefaultSize, 0 ); - m_parenthesesCtrl->SetValue(false); - m_parenthesesCtrl->SetHelpText(_("Check to enclose the bullet in parentheses.")); - if (ShowToolTips()) - m_parenthesesCtrl->SetToolTip(_("Check to enclose the bullet in parentheses.")); - itemBoxSizer30->Add(m_parenthesesCtrl, 0, wxALIGN_LEFT|wxALL, 5); - - m_periodCtrl = new wxCheckBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL, _("Peri&od"), wxDefaultPosition, wxDefaultSize, 0 ); - m_periodCtrl->SetValue(false); - m_periodCtrl->SetHelpText(_("Check to add a period after the bullet.")); - if (ShowToolTips()) - m_periodCtrl->SetToolTip(_("Check to add a period after the bullet.")); - itemBoxSizer30->Add(m_periodCtrl, 0, wxALIGN_LEFT|wxALL, 5); + wxArrayString m_bulletNameCtrlStrings; + 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.")); + itemBoxSizer26->Add(m_bulletNameCtrl, 0, wxGROW|wxALL, 5); itemNotebook9->AddPage(itemPanel10, _("Bullet style")); - wxPanel* itemPanel33 = new wxPanel( itemNotebook9, ID_RICHTEXTLISTSTYLEPAGE_SPACING, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); - wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL); - itemPanel33->SetSizer(itemBoxSizer34); + wxPanel* itemPanel37 = new wxPanel( itemNotebook9, ID_RICHTEXTLISTSTYLEPAGE_SPACING, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* itemBoxSizer38 = new wxBoxSizer(wxVERTICAL); + itemPanel37->SetSizer(itemBoxSizer38); - wxBoxSizer* itemBoxSizer35 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer34->Add(itemBoxSizer35, 0, wxGROW, 5); - wxBoxSizer* itemBoxSizer36 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer35->Add(itemBoxSizer36, 0, wxGROW, 5); - wxStaticText* itemStaticText37 = new wxStaticText( itemPanel33, wxID_STATIC, _("&Alignment"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer36->Add(itemStaticText37, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + wxBoxSizer* itemBoxSizer39 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer38->Add(itemBoxSizer39, 0, wxGROW, 5); + wxBoxSizer* itemBoxSizer40 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer39->Add(itemBoxSizer40, 0, wxGROW, 5); + wxStaticText* itemStaticText41 = new wxStaticText( itemPanel37, wxID_STATIC, _("&Alignment"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer40->Add(itemStaticText41, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); - wxBoxSizer* itemBoxSizer38 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer36->Add(itemBoxSizer38, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - itemBoxSizer38->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 5); + wxBoxSizer* itemBoxSizer42 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer40->Add(itemBoxSizer42, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer42->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 5); - wxBoxSizer* itemBoxSizer40 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer38->Add(itemBoxSizer40, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5); - m_alignmentLeft = new wxRadioButton( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT, _("&Left"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); + wxBoxSizer* itemBoxSizer44 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer42->Add(itemBoxSizer44, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5); + m_alignmentLeft = new wxRadioButton( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT, _("&Left"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); m_alignmentLeft->SetValue(false); m_alignmentLeft->SetHelpText(_("Left-align text.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_alignmentLeft->SetToolTip(_("Left-align text.")); - itemBoxSizer40->Add(m_alignmentLeft, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer44->Add(m_alignmentLeft, 0, wxALIGN_LEFT|wxALL, 5); - m_alignmentRight = new wxRadioButton( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT, _("&Right"), wxDefaultPosition, wxDefaultSize, 0 ); + m_alignmentRight = new wxRadioButton( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT, _("&Right"), wxDefaultPosition, wxDefaultSize, 0 ); m_alignmentRight->SetValue(false); m_alignmentRight->SetHelpText(_("Right-align text.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_alignmentRight->SetToolTip(_("Right-align text.")); - itemBoxSizer40->Add(m_alignmentRight, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer44->Add(m_alignmentRight, 0, wxALIGN_LEFT|wxALL, 5); - m_alignmentJustified = new wxRadioButton( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED, _("&Justified"), wxDefaultPosition, wxDefaultSize, 0 ); + m_alignmentJustified = new wxRadioButton( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED, _("&Justified"), wxDefaultPosition, wxDefaultSize, 0 ); m_alignmentJustified->SetValue(false); m_alignmentJustified->SetHelpText(_("Justify text left and right.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_alignmentJustified->SetToolTip(_("Justify text left and right.")); - itemBoxSizer40->Add(m_alignmentJustified, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer44->Add(m_alignmentJustified, 0, wxALIGN_LEFT|wxALL, 5); - m_alignmentCentred = new wxRadioButton( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_CENTERED, _("Cen&tred"), wxDefaultPosition, wxDefaultSize, 0 ); + m_alignmentCentred = new wxRadioButton( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_CENTERED, _("Cen&tred"), wxDefaultPosition, wxDefaultSize, 0 ); m_alignmentCentred->SetValue(false); m_alignmentCentred->SetHelpText(_("Centre text.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_alignmentCentred->SetToolTip(_("Centre text.")); - itemBoxSizer40->Add(m_alignmentCentred, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer44->Add(m_alignmentCentred, 0, wxALIGN_LEFT|wxALL, 5); - m_alignmentIndeterminate = new wxRadioButton( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE, _("&Indeterminate"), wxDefaultPosition, wxDefaultSize, 0 ); + m_alignmentIndeterminate = new wxRadioButton( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE, _("&Indeterminate"), wxDefaultPosition, wxDefaultSize, 0 ); m_alignmentIndeterminate->SetValue(false); m_alignmentIndeterminate->SetHelpText(_("Use the current alignment setting.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_alignmentIndeterminate->SetToolTip(_("Use the current alignment setting.")); - itemBoxSizer40->Add(m_alignmentIndeterminate, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer44->Add(m_alignmentIndeterminate, 0, wxALIGN_LEFT|wxALL, 5); - itemBoxSizer35->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); + itemBoxSizer39->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - wxStaticLine* itemStaticLine47 = new wxStaticLine( itemPanel33, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - itemBoxSizer35->Add(itemStaticLine47, 0, wxGROW|wxLEFT|wxBOTTOM, 5); + wxStaticLine* itemStaticLine51 = new wxStaticLine( itemPanel37, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + itemBoxSizer39->Add(itemStaticLine51, 0, wxGROW|wxLEFT|wxBOTTOM, 5); - itemBoxSizer35->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); + itemBoxSizer39->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - wxBoxSizer* itemBoxSizer49 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer35->Add(itemBoxSizer49, 0, wxGROW, 5); - wxStaticText* itemStaticText50 = new wxStaticText( itemPanel33, wxID_STATIC, _("&Indentation (tenths of a mm)"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer49->Add(itemStaticText50, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + wxBoxSizer* itemBoxSizer53 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer39->Add(itemBoxSizer53, 0, wxGROW, 5); + wxStaticText* itemStaticText54 = new wxStaticText( itemPanel37, wxID_STATIC, _("&Indentation (tenths of a mm)"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer53->Add(itemStaticText54, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); - wxBoxSizer* itemBoxSizer51 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer49->Add(itemBoxSizer51, 0, wxALIGN_LEFT|wxALL, 5); - itemBoxSizer51->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 5); + wxBoxSizer* itemBoxSizer55 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer53->Add(itemBoxSizer55, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer55->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 5); - wxFlexGridSizer* itemFlexGridSizer53 = new wxFlexGridSizer(2, 2, 0, 0); - itemBoxSizer51->Add(itemFlexGridSizer53, 0, wxALIGN_CENTER_VERTICAL, 5); - wxStaticText* itemStaticText54 = new wxStaticText( itemPanel33, wxID_STATIC, _("&Left:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer53->Add(itemStaticText54, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + 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* itemBoxSizer55 = new wxBoxSizer(wxHORIZONTAL); - itemFlexGridSizer53->Add(itemBoxSizer55, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_indentLeft = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); + wxBoxSizer* itemBoxSizer59 = new wxBoxSizer(wxHORIZONTAL); + itemFlexGridSizer57->Add(itemBoxSizer59, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + m_indentLeft = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_indentLeft->SetHelpText(_("The left indent.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_indentLeft->SetToolTip(_("The left indent.")); - itemBoxSizer55->Add(m_indentLeft, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer59->Add(m_indentLeft, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxStaticText* itemStaticText57 = new wxStaticText( itemPanel33, wxID_STATIC, _("Left (&first line):"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer53->Add(itemStaticText57, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxStaticText* itemStaticText61 = new wxStaticText( itemPanel37, wxID_STATIC, _("Left (&first line):"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer57->Add(itemStaticText61, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxBoxSizer* itemBoxSizer58 = new wxBoxSizer(wxHORIZONTAL); - itemFlexGridSizer53->Add(itemBoxSizer58, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_indentLeftFirst = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); + wxBoxSizer* itemBoxSizer62 = new wxBoxSizer(wxHORIZONTAL); + itemFlexGridSizer57->Add(itemBoxSizer62, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + m_indentLeftFirst = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_indentLeftFirst->SetHelpText(_("The first line indent.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_indentLeftFirst->SetToolTip(_("The first line indent.")); - itemBoxSizer58->Add(m_indentLeftFirst, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer62->Add(m_indentLeftFirst, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxStaticText* itemStaticText60 = new wxStaticText( itemPanel33, wxID_STATIC, _("&Right:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer53->Add(itemStaticText60, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxStaticText* itemStaticText64 = new wxStaticText( itemPanel37, wxID_STATIC, _("&Right:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer57->Add(itemStaticText64, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxBoxSizer* itemBoxSizer61 = new wxBoxSizer(wxHORIZONTAL); - itemFlexGridSizer53->Add(itemBoxSizer61, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_indentRight = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); + wxBoxSizer* itemBoxSizer65 = new wxBoxSizer(wxHORIZONTAL); + itemFlexGridSizer57->Add(itemBoxSizer65, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + m_indentRight = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_indentRight->SetHelpText(_("The right indent.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_indentRight->SetToolTip(_("The right indent.")); - itemBoxSizer61->Add(m_indentRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer65->Add(m_indentRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - itemBoxSizer35->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); + itemBoxSizer39->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - wxStaticLine* itemStaticLine64 = new wxStaticLine( itemPanel33, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); - itemBoxSizer35->Add(itemStaticLine64, 0, wxGROW|wxTOP|wxBOTTOM, 5); + wxStaticLine* itemStaticLine68 = new wxStaticLine( itemPanel37, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL ); + itemBoxSizer39->Add(itemStaticLine68, 0, wxGROW|wxTOP|wxBOTTOM, 5); - itemBoxSizer35->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); + itemBoxSizer39->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); - wxBoxSizer* itemBoxSizer66 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer35->Add(itemBoxSizer66, 0, wxGROW, 5); - wxStaticText* itemStaticText67 = new wxStaticText( itemPanel33, wxID_STATIC, _("&Spacing (tenths of a mm)"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer66->Add(itemStaticText67, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + wxBoxSizer* itemBoxSizer70 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer39->Add(itemBoxSizer70, 0, wxGROW, 5); + wxStaticText* itemStaticText71 = new wxStaticText( itemPanel37, wxID_STATIC, _("&Spacing (tenths of a mm)"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer70->Add(itemStaticText71, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); - wxBoxSizer* itemBoxSizer68 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer66->Add(itemBoxSizer68, 0, wxALIGN_LEFT|wxALL, 5); - itemBoxSizer68->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 5); + wxBoxSizer* itemBoxSizer72 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer70->Add(itemBoxSizer72, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer72->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL, 5); - wxFlexGridSizer* itemFlexGridSizer70 = new wxFlexGridSizer(2, 2, 0, 0); - itemBoxSizer68->Add(itemFlexGridSizer70, 0, wxALIGN_CENTER_VERTICAL, 5); - wxStaticText* itemStaticText71 = new wxStaticText( itemPanel33, wxID_STATIC, _("Before a paragraph:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer70->Add(itemStaticText71, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + 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* itemBoxSizer72 = new wxBoxSizer(wxHORIZONTAL); - itemFlexGridSizer70->Add(itemBoxSizer72, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_spacingBefore = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); + wxBoxSizer* itemBoxSizer76 = new wxBoxSizer(wxHORIZONTAL); + itemFlexGridSizer74->Add(itemBoxSizer76, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + m_spacingBefore = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_spacingBefore->SetHelpText(_("The spacing before the paragraph.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_spacingBefore->SetToolTip(_("The spacing before the paragraph.")); - itemBoxSizer72->Add(m_spacingBefore, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer76->Add(m_spacingBefore, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxStaticText* itemStaticText74 = new wxStaticText( itemPanel33, wxID_STATIC, _("After a paragraph:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer70->Add(itemStaticText74, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxStaticText* itemStaticText78 = new wxStaticText( itemPanel37, wxID_STATIC, _("After a paragraph:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer74->Add(itemStaticText78, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxBoxSizer* itemBoxSizer75 = new wxBoxSizer(wxHORIZONTAL); - itemFlexGridSizer70->Add(itemBoxSizer75, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - m_spacingAfter = new wxTextCtrl( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); + wxBoxSizer* itemBoxSizer79 = new wxBoxSizer(wxHORIZONTAL); + itemFlexGridSizer74->Add(itemBoxSizer79, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + m_spacingAfter = new wxTextCtrl( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER, wxEmptyString, wxDefaultPosition, wxSize(50, -1), 0 ); m_spacingAfter->SetHelpText(_("The spacing after the paragraph.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_spacingAfter->SetToolTip(_("The spacing after the paragraph.")); - itemBoxSizer75->Add(m_spacingAfter, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxStaticText* itemStaticText77 = new wxStaticText( itemPanel33, wxID_STATIC, _("Line spacing:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer70->Add(itemStaticText77, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); - - wxBoxSizer* itemBoxSizer78 = new wxBoxSizer(wxHORIZONTAL); - itemFlexGridSizer70->Add(itemBoxSizer78, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); - wxString m_spacingLineStrings[] = { - _("Single"), - _("1.5"), - _("2") - }; - m_spacingLine = new wxComboBox( itemPanel33, ID_RICHTEXTLISTSTYLEPAGE_LINESPACING, _("Single"), wxDefaultPosition, wxDefaultSize, 3, m_spacingLineStrings, wxCB_READONLY ); + itemBoxSizer79->Add(m_spacingAfter, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxStaticText* itemStaticText81 = new wxStaticText( itemPanel37, wxID_STATIC, _("Line spacing:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer74->Add(itemStaticText81, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxBoxSizer* itemBoxSizer82 = new wxBoxSizer(wxHORIZONTAL); + itemFlexGridSizer74->Add(itemBoxSizer82, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + wxArrayString m_spacingLineStrings; + m_spacingLineStrings.Add(_("Single")); + m_spacingLineStrings.Add(_("1.5")); + m_spacingLineStrings.Add(_("2")); + m_spacingLine = new wxComboBox( itemPanel37, ID_RICHTEXTLISTSTYLEPAGE_LINESPACING, _("Single"), wxDefaultPosition, wxDefaultSize, m_spacingLineStrings, wxCB_READONLY ); m_spacingLine->SetStringSelection(_("Single")); m_spacingLine->SetHelpText(_("The line spacing.")); - if (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_spacingLine->SetToolTip(_("The line spacing.")); - itemBoxSizer78->Add(m_spacingLine, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer82->Add(m_spacingLine, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - itemNotebook9->AddPage(itemPanel33, _("Spacing")); + itemNotebook9->AddPage(itemPanel37, _("Spacing")); itemBoxSizer3->Add(itemNotebook9, 0, wxGROW|wxALL, 5); - m_previewCtrl = new wxRichTextCtrl( itemPanel1, ID_RICHTEXTLISTSTYLEPAGE_RICHTEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(350, 180), wxSUNKEN_BORDER ); + 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 (ShowToolTips()) + if (wxRichTextListStylePage::ShowToolTips()) m_previewCtrl->SetToolTip(_("Shows a preview of the bullet settings.")); itemBoxSizer3->Add(m_previewCtrl, 0, wxGROW|wxALL, 5); ////@end wxRichTextListStylePage content construction + m_dontUpdate = true; + m_styleListBox->Append(_("(None)")); m_styleListBox->Append(_("Arabic")); m_styleListBox->Append(_("Upper case letters")); m_styleListBox->Append(_("Lower case letters")); m_styleListBox->Append(_("Upper case roman numerals")); m_styleListBox->Append(_("Lower case roman numerals")); + m_styleListBox->Append(_("Numbered outline")); m_styleListBox->Append(_("Symbol")); m_styleListBox->Append(_("Bitmap")); + m_styleListBox->Append(_("Standard")); m_symbolCtrl->Append(_("*")); m_symbolCtrl->Append(_("-")); @@ -451,37 +499,49 @@ void wxRichTextListStylePage::CreateControls() m_symbolCtrl->Append(_("+")); m_symbolCtrl->Append(_("~")); + wxArrayString standardBulletNames; + if (wxRichTextBuffer::GetRenderer()) + wxRichTextBuffer::GetRenderer()->EnumerateStandardBulletNames(standardBulletNames); + + m_bulletNameCtrl->Append(standardBulletNames); wxArrayString facenames = wxRichTextCtrl::GetAvailableFontNames(); facenames.Sort(); m_symbolFontCtrl->Append(facenames); + + m_levelCtrl->SetValue(m_currentLevel); + + m_dontUpdate = false; } /// Updates the font preview void wxRichTextListStylePage::UpdatePreview() { static const wxChar* s_para1 = wxT("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \ -Nullam ante sapien, vestibulum nonummy, pulvinar sed, luctus ut, lacus."); +Nullam ante sapien, vestibulum nonummy, pulvinar sed, luctus ut, lacus.\n"); - static const wxChar* s_para2 = wxT("Duis pharetra consequat dui. Nullam vitae justo id mauris lobortis interdum."); + static const wxChar* s_para2 = wxT("Duis pharetra consequat dui. Nullam vitae justo id mauris lobortis interdum.\n"); - static const wxChar* s_para3 = wxT("\nInteger convallis dolor at augue \ + static const wxChar* s_para3 = wxT("Integer convallis dolor at augue \ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n"); wxRichTextListStyleDefinition* def = wxDynamicCast(wxRichTextFormattingDialog::GetDialogStyleDefinition(this), wxRichTextListStyleDefinition); - - wxTextAttrEx attr(def->GetStyle()); + + wxRichTextStyleSheet* styleSheet = wxRichTextFormattingDialog::GetDialog(this)->GetStyleSheet(); + + wxRichTextAttr attr((const wxRichTextAttr &)(styleSheet ? def->GetStyle() : def->GetStyleMergedWithBase(styleSheet))); + attr.SetFlags(attr.GetFlags() & (wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_PARA_SPACING_BEFORE|wxTEXT_ATTR_PARA_SPACING_AFTER| wxTEXT_ATTR_LINE_SPACING| - wxTEXT_ATTR_BULLET_STYLE|wxTEXT_ATTR_BULLET_NUMBER|wxTEXT_ATTR_BULLET_SYMBOL)); + wxTEXT_ATTR_BULLET_STYLE|wxTEXT_ATTR_BULLET_NUMBER|wxTEXT_ATTR_BULLET_TEXT)); wxFont font(m_previewCtrl->GetFont()); font.SetPointSize(9); m_previewCtrl->SetFont(font); - wxTextAttrEx normalParaAttr; + wxRichTextAttr normalParaAttr; normalParaAttr.SetFont(font); normalParaAttr.SetTextColour(wxColour(wxT("LIGHT GREY"))); @@ -491,24 +551,28 @@ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n"); m_previewCtrl->BeginStyle(normalParaAttr); m_previewCtrl->WriteText(s_para1); m_previewCtrl->EndStyle(); - + m_previewCtrl->BeginStyle(attr); - + long listStart = m_previewCtrl->GetInsertionPoint() + 1; + int i; for (i = 0; i < 10; i++) { - wxTextAttrEx levelAttr = * def->GetLevelAttributes(i); + wxRichTextAttr levelAttr = * def->GetLevelAttributes(i); levelAttr.SetBulletNumber(1); m_previewCtrl->BeginStyle(levelAttr); - m_previewCtrl->WriteText(wxString::Format(wxT("\nList level %d. "), i+1) + s_para2); + m_previewCtrl->WriteText(wxString::Format(wxT("List level %d. "), i+1) + s_para2); m_previewCtrl->EndStyle(); } m_previewCtrl->EndStyle(); + long listEnd = m_previewCtrl->GetInsertionPoint(); m_previewCtrl->BeginStyle(normalParaAttr); m_previewCtrl->WriteText(s_para3); m_previewCtrl->EndStyle(); + m_previewCtrl->NumberList(wxRichTextRange(listStart, listEnd), def); + m_previewCtrl->Thaw(); } @@ -519,7 +583,7 @@ bool wxRichTextListStylePage::TransferDataFromWindow() m_currentLevel = m_levelCtrl->GetValue(); - wxTextAttrEx* attr = GetAttributesForSelection(); + wxRichTextAttr* attr = GetAttributesForSelection(); if (m_alignmentLeft->GetValue()) attr->SetAlignment(wxTEXT_ALIGNMENT_LEFT); @@ -582,43 +646,63 @@ bool wxRichTextListStylePage::TransferDataFromWindow() attr->SetLineSpacing(lineSpacing); /// BULLETS - if (true) // m_hasBulletStyle) + // if (m_hasBulletStyle) { long bulletStyle = 0; int index = m_styleListBox->GetSelection(); - if (index == 1) + if (index == wxRICHTEXT_BULLETINDEX_ARABIC) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_ARABIC; - else if (index == 2) + + else if (index == wxRICHTEXT_BULLETINDEX_UPPER_CASE) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER; - else if (index == 3) + + else if (index == wxRICHTEXT_BULLETINDEX_LOWER_CASE) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER; - else if (index == 4) + + else if (index == wxRICHTEXT_BULLETINDEX_UPPER_CASE_ROMAN) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER; - else if (index == 5) + + else if (index == wxRICHTEXT_BULLETINDEX_LOWER_CASE_ROMAN) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER; - else if (index == 6) + + else if (index == wxRICHTEXT_BULLETINDEX_OUTLINE) + bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_OUTLINE; + + else if (index == wxRICHTEXT_BULLETINDEX_SYMBOL) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_SYMBOL; - else if (index == 7) + + else if (index == wxRICHTEXT_BULLETINDEX_BITMAP) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_BITMAP; + else if (index == wxRICHTEXT_BULLETINDEX_STANDARD) + { + bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_STANDARD; + attr->SetBulletName(m_bulletNameCtrl->GetValue()); + } + if (m_parenthesesCtrl->GetValue()) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_PARENTHESES; + if (m_rightParenthesisCtrl->GetValue()) + bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS; if (m_periodCtrl->GetValue()) bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_PERIOD; + if (m_bulletAlignmentCtrl->GetSelection() == 1) + bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE; + else if (m_bulletAlignmentCtrl->GetSelection() == 2) + bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT; + // Left is implied + attr->SetBulletStyle(bulletStyle); } // if (m_hasBulletSymbol) { - wxChar c(wxT('*')); - if (m_symbolCtrl->GetValue().length() > 0) - c = m_symbolCtrl->GetValue()[0]; - attr->SetBulletSymbol(c); + attr->SetBulletText(m_symbolCtrl->GetValue()); attr->SetBulletFont(m_symbolFontCtrl->GetValue()); } - + return true; } @@ -626,7 +710,7 @@ bool wxRichTextListStylePage::TransferDataToWindow() { DoTransferDataToWindow(); UpdatePreview(); - + return true; } @@ -636,10 +720,8 @@ void wxRichTextListStylePage::DoTransferDataToWindow() m_dontUpdate = true; wxPanel::TransferDataToWindow(); - - m_levelCtrl->SetValue(m_currentLevel); - wxTextAttrEx* attr = GetAttributesForSelection(); + wxRichTextAttr* attr = GetAttributesForSelection(); if (attr->HasAlignment()) { @@ -720,21 +802,34 @@ void wxRichTextListStylePage::DoTransferDataToWindow() /// BULLETS if (attr->HasBulletStyle()) { - int index = -1; + int index = 0; if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_ARABIC) - index = 1; + index = wxRICHTEXT_BULLETINDEX_ARABIC; + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER) - index = 2; + index = wxRICHTEXT_BULLETINDEX_UPPER_CASE; + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER) - index = 3; + index = wxRICHTEXT_BULLETINDEX_LOWER_CASE; + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER) - index = 4; + index = wxRICHTEXT_BULLETINDEX_UPPER_CASE_ROMAN; + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER) - index = 5; + index = wxRICHTEXT_BULLETINDEX_LOWER_CASE_ROMAN; + + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_OUTLINE) + index = wxRICHTEXT_BULLETINDEX_OUTLINE; + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_SYMBOL) - index = 6; + index = wxRICHTEXT_BULLETINDEX_SYMBOL; + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_BITMAP) - index = 7; + index = wxRICHTEXT_BULLETINDEX_BITMAP; + + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_STANDARD) + index = wxRICHTEXT_BULLETINDEX_STANDARD; + m_styleListBox->SetSelection(index); if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_PARENTHESES) @@ -742,36 +837,53 @@ void wxRichTextListStylePage::DoTransferDataToWindow() else m_parenthesesCtrl->SetValue(false); + if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS) + m_rightParenthesisCtrl->SetValue(true); + else + m_rightParenthesisCtrl->SetValue(false); + if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_PERIOD) m_periodCtrl->SetValue(true); else m_periodCtrl->SetValue(false); + + if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE) + m_bulletAlignmentCtrl->SetSelection(1); + else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT) + m_bulletAlignmentCtrl->SetSelection(2); + else + m_bulletAlignmentCtrl->SetSelection(0); } else + { m_styleListBox->SetSelection(-1); + m_bulletAlignmentCtrl->SetSelection(-1); + } - if (attr->HasBulletSymbol()) + if (attr->HasBulletText()) { - wxChar c = attr->GetBulletSymbol(); - wxString s; - s << c; - m_symbolCtrl->SetValue(s); + m_symbolCtrl->SetValue(attr->GetBulletText()); m_symbolFontCtrl->SetValue(attr->GetBulletFont()); } else m_symbolCtrl->SetValue(wxEmptyString); + if (attr->HasBulletName()) + m_bulletNameCtrl->SetValue(attr->GetBulletName()); + else + m_bulletNameCtrl->SetValue(wxEmptyString); + m_dontUpdate = false; } /// Get attributes for selected level -wxTextAttrEx* wxRichTextListStylePage::GetAttributesForSelection() +wxRichTextAttr* wxRichTextListStylePage::GetAttributesForSelection() { wxRichTextListStyleDefinition* def = wxDynamicCast(wxRichTextFormattingDialog::GetDialogStyleDefinition(this), wxRichTextListStyleDefinition); - + int value = m_levelCtrl->GetValue(); - + if (def) return def->GetLevelAttributes(value-1); else @@ -806,11 +918,11 @@ void wxRichTextListStylePage::OnLevelUpdated( wxSpinEvent& WXUNUSED(event) ) * wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL */ -void wxRichTextListStylePage::OnLevelUp( wxSpinEvent& WXUNUSED(event) ) +void wxRichTextListStylePage::OnLevelUp( wxSpinEvent& event ) { if (!m_dontUpdate) { - m_currentLevel = m_levelCtrl->GetValue(); + m_currentLevel = event.GetPosition(); TransferDataToWindow(); } } @@ -819,11 +931,11 @@ void wxRichTextListStylePage::OnLevelUp( wxSpinEvent& WXUNUSED(event) ) * wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL */ -void wxRichTextListStylePage::OnLevelDown( wxSpinEvent& WXUNUSED(event) ) +void wxRichTextListStylePage::OnLevelDown( wxSpinEvent& event ) { if (!m_dontUpdate) { - m_currentLevel = m_levelCtrl->GetValue(); + m_currentLevel = event.GetPosition(); TransferDataToWindow(); } } @@ -834,11 +946,14 @@ void wxRichTextListStylePage::OnLevelDown( wxSpinEvent& WXUNUSED(event) ) void wxRichTextListStylePage::OnLevelTextUpdated( wxCommandEvent& WXUNUSED(event) ) { + // Can cause problems +#if 0 if (!m_dontUpdate) { - m_currentLevel = m_levelCtrl->GetValue(); + m_currentLevel = event.GetInt(); TransferDataToWindow(); } +#endif } /*! @@ -850,7 +965,7 @@ void wxRichTextListStylePage::OnLevelUIUpdate( wxUpdateUIEvent& event ) ////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL in wxRichTextListStylePage. // Before editing this code, remove the block markers. event.Skip(); -////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL in wxRichTextListStylePage. +////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL in wxRichTextListStylePage. } /*! @@ -905,7 +1020,7 @@ void wxRichTextListStylePage::OnSymbolctrlUIUpdate( wxUpdateUIEvent& event ) void wxRichTextListStylePage::OnChooseSymbolClick( wxCommandEvent& WXUNUSED(event) ) { int sel = m_styleListBox->GetSelection(); - if (sel == 6) + if (sel == wxRICHTEXT_BULLETINDEX_SYMBOL) { wxString symbol = m_symbolCtrl->GetValue(); wxString fontName = m_symbolFontCtrl->GetValue(); @@ -976,10 +1091,10 @@ void wxRichTextListStylePage::OnParenthesesctrlClick( wxCommandEvent& WXUNUSED(e void wxRichTextListStylePage::OnParenthesesctrlUpdate( wxUpdateUIEvent& event ) { -////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL in wxRichTextListStylePage. - // Before editing this code, remove the block markers. - event.Skip(); -////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL in wxRichTextListStylePage. + int sel = m_styleListBox->GetSelection(); + event.Enable((sel != wxRICHTEXT_BULLETINDEX_SYMBOL && + sel != wxRICHTEXT_BULLETINDEX_BITMAP && + sel != wxRICHTEXT_BULLETINDEX_NONE)); } /*! @@ -997,10 +1112,10 @@ void wxRichTextListStylePage::OnPeriodctrlClick( wxCommandEvent& WXUNUSED(event) void wxRichTextListStylePage::OnPeriodctrlUpdate( wxUpdateUIEvent& event ) { -////@begin wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL in wxRichTextListStylePage. - // Before editing this code, remove the block markers. - event.Skip(); -////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL in wxRichTextListStylePage. + int sel = m_styleListBox->GetSelection(); + event.Enable((sel != wxRICHTEXT_BULLETINDEX_SYMBOL && + sel != wxRICHTEXT_BULLETINDEX_BITMAP && + sel != wxRICHTEXT_BULLETINDEX_NONE)); } /*! @@ -1141,14 +1256,24 @@ wxIcon wxRichTextListStylePage::GetIconResource( const wxString& name ) void wxRichTextListStylePage::OnSymbolUpdate( wxUpdateUIEvent& event ) { int sel = m_styleListBox->GetSelection(); - event.Enable(sel == 6); + event.Enable(sel == wxRICHTEXT_BULLETINDEX_SYMBOL); } /// Update for number-related controls void wxRichTextListStylePage::OnNumberUpdate( wxUpdateUIEvent& event ) { int sel = m_styleListBox->GetSelection(); - event.Enable((sel != 6 && sel != 7 && sel != 0)); + event.Enable((sel != wxRICHTEXT_BULLETINDEX_SYMBOL && + sel != wxRICHTEXT_BULLETINDEX_BITMAP && + sel != wxRICHTEXT_BULLETINDEX_STANDARD && + sel != wxRICHTEXT_BULLETINDEX_NONE)); +} + +/// Update for standard bullet-related controls +void wxRichTextListStylePage::OnStandardBulletUpdate( wxUpdateUIEvent& event ) +{ + int sel = m_styleListBox->GetSelection(); + event.Enable( sel == wxRICHTEXT_BULLETINDEX_STANDARD ); } /*! @@ -1157,7 +1282,7 @@ void wxRichTextListStylePage::OnNumberUpdate( wxUpdateUIEvent& event ) void wxRichTextListStylePage::OnChooseFontClick( wxCommandEvent& WXUNUSED(event) ) { - wxTextAttrEx* attr = GetAttributesForSelection(); + wxRichTextAttr* attr = GetAttributesForSelection(); int pages = wxRICHTEXT_FORMAT_FONT; wxRichTextFormattingDialog formatDlg; @@ -1170,5 +1295,69 @@ void wxRichTextListStylePage::OnChooseFontClick( wxCommandEvent& WXUNUSED(event) TransferAndPreview(); } } +/*! + * wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC + */ + +void wxRichTextListStylePage::OnNamestaticUpdate( wxUpdateUIEvent& event ) +{ + OnStandardBulletUpdate(event); +} + +/*! + * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + */ + +void wxRichTextListStylePage::OnNamectrlSelected( wxCommandEvent& WXUNUSED(event) ) +{ + TransferAndPreview(); +} + +/*! + * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + */ + +void wxRichTextListStylePage::OnNamectrlUpdated( wxCommandEvent& WXUNUSED(event) ) +{ + TransferAndPreview(); +} + +/*! + * wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + */ + +void wxRichTextListStylePage::OnNamectrlUIUpdate( wxUpdateUIEvent& event ) +{ + OnStandardBulletUpdate(event); +} +/*! + * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL + */ + +void wxRichTextListStylePage::OnRightParenthesisCtrlClick( wxCommandEvent& WXUNUSED(event) ) +{ + TransferAndPreview(); +} + +/*! + * wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL + */ + +void wxRichTextListStylePage::OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event ) +{ + int sel = m_styleListBox->GetSelection(); + event.Enable((sel != wxRICHTEXT_BULLETINDEX_SYMBOL && + sel != wxRICHTEXT_BULLETINDEX_BITMAP && + sel != wxRICHTEXT_BULLETINDEX_NONE)); +} + +/*! + * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL + */ + +void wxRichTextListStylePage::OnBulletAlignmentCtrlSelected( wxCommandEvent& WXUNUSED(event) ) +{ + TransferAndPreview(); +}