/////////////////////////////////////////////////////////////////////////////
-// 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
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_UPDATE_UI( ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC, wxRichTextListStylePage::OnSymbolstaticUpdate )
EVT_COMBOBOX( ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, wxRichTextListStylePage::OnSymbolctrlSelected )
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 )
}
/*!
- * Member initialisation
+ * Member initialisation
*/
void wxRichTextListStylePage::Init()
////@begin wxRichTextListStylePage member initialisation
m_levelCtrl = NULL;
m_styleListBox = NULL;
+ m_periodCtrl = NULL;
+ m_parenthesesCtrl = 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;
m_previewCtrl = NULL;
////@end wxRichTextListStylePage member initialisation
}
+
/*!
* Control creation for wxRichTextListStylePage
*/
void wxRichTextListStylePage::CreateControls()
-{
+{
////@begin wxRichTextListStylePage content construction
wxRichTextListStylePage* itemPanel1 = this;
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, wxBK_TOP );
+ wxBookCtrl* itemBook9 = new wxBookCtrl( itemPanel1, ID_RICHTEXTLISTSTYLEPAGE_BOOK, wxDefaultPosition, wxDefaultSize, wxBK_TOP );
- wxPanel* itemPanel10 = new wxPanel( itemNotebook9, ID_RICHTEXTLISTSTYLEPAGE_BULLETS, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
+ wxPanel* itemPanel10 = new wxPanel( itemBook9, ID_RICHTEXTLISTSTYLEPAGE_BULLETS, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxVERTICAL);
itemPanel10->SetSizer(itemBoxSizer11);
itemBoxSizer13->Add(itemStaticText14, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_styleListBoxStrings = NULL;
- m_styleListBox = new wxListBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX, wxDefaultPosition, wxDefaultSize, 0, m_styleListBoxStrings, wxLB_SINGLE );
+ m_styleListBox = new wxListBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX, wxDefaultPosition, wxSize(-1, 130), 0, m_styleListBoxStrings, wxLB_SINGLE );
m_styleListBox->SetHelpText(_("The available bullet styles."));
if (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 (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, _("&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."));
+ itemBoxSizer16->Add(m_parenthesesCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 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* itemStaticLine20 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ itemBoxSizer12->Add(itemStaticLine20, 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* itemBoxSizer22 = new wxBoxSizer(wxVERTICAL);
+ itemBoxSizer12->Add(itemBoxSizer22, 0, wxGROW, 5);
+ wxStaticText* itemStaticText23 = new wxStaticText( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC, _("&Symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer22->Add(itemStaticText23, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
- wxBoxSizer* itemBoxSizer21 = new wxBoxSizer(wxHORIZONTAL);
- itemBoxSizer19->Add(itemBoxSizer21, 0, wxGROW, 5);
+ wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxHORIZONTAL);
+ itemBoxSizer22->Add(itemBoxSizer24, 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 );
m_symbolCtrl->SetHelpText(_("The bullet character."));
if (ShowToolTips())
m_symbolCtrl->SetToolTip(_("The bullet character."));
- itemBoxSizer21->Add(m_symbolCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE, 5);
+ itemBoxSizer24->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."));
+ wxButton* itemButton26 = new wxButton( itemPanel10, ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, _("Ch&oose..."), wxDefaultPosition, wxDefaultSize, 0 );
+ itemButton26->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);
+ itemButton26->SetToolTip(_("Click to browse for a symbol."));
+ itemBoxSizer24->Add(itemButton26, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- itemBoxSizer19->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+ itemBoxSizer22->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* itemStaticText28 = new wxStaticText( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC, _("Symbol &font:"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer22->Add(itemStaticText28, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
wxString* m_symbolFontCtrlStrings = NULL;
m_symbolFontCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_symbolFontCtrlStrings, wxCB_DROPDOWN );
if (ShowToolTips())
m_symbolFontCtrl->SetToolTip(_("Available fonts."));
- itemBoxSizer19->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5);
-
- itemBoxSizer12->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
-
- wxStaticLine* itemStaticLine28 = new wxStaticLine( itemPanel10, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- itemBoxSizer12->Add(itemStaticLine28, 0, wxGROW|wxALL, 5);
+ itemBoxSizer22->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5);
- itemBoxSizer12->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
+ itemBoxSizer22->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL, 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);
+ wxStaticText* itemStaticText31 = new wxStaticText( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC, _("S&tandard bullet name:"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer22->Add(itemStaticText31, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 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."));
+ wxString* m_bulletNameCtrlStrings = NULL;
+ m_bulletNameCtrl = new wxComboBox( itemPanel10, ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_bulletNameCtrlStrings, wxCB_DROPDOWN );
+ m_bulletNameCtrl->SetHelpText(_("A standard bullet name."));
if (ShowToolTips())
- m_periodCtrl->SetToolTip(_("Check to add a period after the bullet."));
- itemBoxSizer30->Add(m_periodCtrl, 0, wxALIGN_LEFT|wxALL, 5);
+ m_bulletNameCtrl->SetToolTip(_("A standard bullet name."));
+ itemBoxSizer22->Add(m_bulletNameCtrl, 0, wxGROW|wxALL, 5);
- itemNotebook9->AddPage(itemPanel10, _("Bullet style"));
+ itemBook9->AddPage(itemPanel10, _("Bullet style"));
- wxPanel* itemPanel33 = new wxPanel( itemNotebook9, ID_RICHTEXTLISTSTYLEPAGE_SPACING, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
+ wxPanel* itemPanel33 = new wxPanel( itemBook9, ID_RICHTEXTLISTSTYLEPAGE_SPACING, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
wxBoxSizer* itemBoxSizer34 = new wxBoxSizer(wxVERTICAL);
itemPanel33->SetSizer(itemBoxSizer34);
m_spacingLine->SetToolTip(_("The line spacing."));
itemBoxSizer78->Add(m_spacingLine, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- itemNotebook9->AddPage(itemPanel33, _("Spacing"));
+ itemBook9->AddPage(itemPanel33, _("Spacing"));
- itemBoxSizer3->Add(itemNotebook9, 0, wxGROW|wxALL, 5);
+ itemBoxSizer3->Add(itemBook9, 0, wxGROW|wxALL, 5);
m_previewCtrl = new wxRichTextCtrl( itemPanel1, ID_RICHTEXTLISTSTYLEPAGE_RICHTEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(350, 180), wxSUNKEN_BORDER );
m_previewCtrl->SetHelpText(_("Shows a preview of the bullet settings."));
m_styleListBox->Append(_("Lower case roman numerals"));
m_styleListBox->Append(_("Symbol"));
m_styleListBox->Append(_("Bitmap"));
+ m_styleListBox->Append(_("Standard"));
m_symbolCtrl->Append(_("*"));
m_symbolCtrl->Append(_("-"));
m_symbolCtrl->Append(_("+"));
m_symbolCtrl->Append(_("~"));
+ m_bulletNameCtrl->Append(_("standard/round"));
+ m_bulletNameCtrl->Append(_("standard/square"));
+
wxArrayString facenames = wxRichTextCtrl::GetAvailableFontNames();
facenames.Sort();
wxRichTextListStyleDefinition* def = wxDynamicCast(wxRichTextFormattingDialog::GetDialogStyleDefinition(this),
wxRichTextListStyleDefinition);
-
+
wxTextAttrEx attr(def->GetStyle());
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|
m_previewCtrl->BeginStyle(normalParaAttr);
m_previewCtrl->WriteText(s_para1);
m_previewCtrl->EndStyle();
-
+
m_previewCtrl->BeginStyle(attr);
-
+
int i;
for (i = 0; i < 10; i++)
{
bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_SYMBOL;
else if (index == 7)
bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_BITMAP;
+ else if (index == 8)
+ {
+ bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_STANDARD;
+ attr->SetBulletName(m_bulletNameCtrl->GetValue());
+ }
if (m_parenthesesCtrl->GetValue())
bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_PARENTHESES;
attr->SetBulletSymbol(c);
attr->SetBulletFont(m_symbolFontCtrl->GetValue());
}
-
+
return true;
}
{
DoTransferDataToWindow();
UpdatePreview();
-
+
return true;
}
m_dontUpdate = true;
wxPanel::TransferDataToWindow();
-
+
m_levelCtrl->SetValue(m_currentLevel);
wxTextAttrEx* attr = GetAttributesForSelection();
index = 6;
else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_BITMAP)
index = 7;
+ else if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_STANDARD)
+ index = 8;
m_styleListBox->SetSelection(index);
if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_PARENTHESES)
else
m_symbolCtrl->SetValue(wxEmptyString);
+ if (attr->HasBulletName())
+ m_bulletNameCtrl->SetValue(attr->GetBulletName());
+ else
+ m_bulletNameCtrl->SetValue(wxEmptyString);
+
m_dontUpdate = false;
}
{
wxRichTextListStyleDefinition* def = wxDynamicCast(wxRichTextFormattingDialog::GetDialogStyleDefinition(this),
wxRichTextListStyleDefinition);
-
+
int value = m_levelCtrl->GetValue();
-
+
if (def)
return def->GetLevelAttributes(value-1);
else
* wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
*/
-void wxRichTextListStylePage::OnLevelTextUpdated( wxCommandEvent& event )
+void wxRichTextListStylePage::OnLevelTextUpdated( wxCommandEvent& WXUNUSED(event) )
{
// Can cause problems
#if 0
////@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.
}
/*!
////@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.
+////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL in wxRichTextListStylePage.
}
/*!
////@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.
+////@end wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL in wxRichTextListStylePage.
}
/*!
void wxRichTextListStylePage::OnNumberUpdate( wxUpdateUIEvent& event )
{
int sel = m_styleListBox->GetSelection();
- event.Enable((sel != 6 && sel != 7 && sel != 0));
+ event.Enable((sel != 6 && sel != 7 && sel != 8 && sel != 0));
+}
+
+/// Update for standard bullet-related controls
+void wxRichTextListStylePage::OnStandardBulletUpdate( wxUpdateUIEvent& event )
+{
+ int sel = m_styleListBox->GetSelection();
+ event.Enable( sel == 8 );
}
/*!
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);
+}