X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/97ff49b3834325cfe53813aeb53d326d7661f184..9c862cfb93c8d54cfdd18a7c54c518b1234afa1c:/src/richtext/richtextbulletspage.cpp?ds=inline diff --git a/src/richtext/richtextbulletspage.cpp b/src/richtext/richtextbulletspage.cpp index 740ad086c3..e71094592f 100644 --- a/src/richtext/richtextbulletspage.cpp +++ b/src/richtext/richtextbulletspage.cpp @@ -1,24 +1,21 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: richtextbulletspage.cpp +// Name: src/richtext/richtextbulletspage.cpp // Purpose: // Author: Julian Smart // Modified by: // Created: 10/4/2006 10:32:31 AM -// RCS-ID: +// RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -////@begin includes -////@end includes +#if wxUSE_RICHTEXT + +#include "wx/richtext/richtextbulletspage.h" -#include "../../include/wx/richtext/richtextbulletspage.h" #include "wx/richtext/richtextsymboldlg.h" #include "wx/fontenum.h" -////@begin XPM images -////@end XPM images - /*! * wxRichTextBulletsPage type definition */ @@ -83,7 +80,7 @@ wxRichTextBulletsPage::wxRichTextBulletsPage( wxWindow* parent, wxWindowID id, c /*! * Initialise members */ - + void wxRichTextBulletsPage::Init() { m_hasBulletStyle = false; @@ -166,7 +163,14 @@ void wxRichTextBulletsPage::CreateControls() itemBoxSizer11->Add(itemBoxSizer13, 0, wxGROW, 5); wxString* m_symbolCtrlStrings = NULL; - m_symbolCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, _T(""), wxDefaultPosition, wxSize(60, -1), 0, m_symbolCtrlStrings, wxCB_DROPDOWN ); + m_symbolCtrl = new wxComboBox( itemPanel1, + ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, + wxEmptyString, + wxDefaultPosition, + wxSize(60, wxDefaultCoord), + 0, + m_symbolCtrlStrings, + wxCB_DROPDOWN ); itemBoxSizer13->Add(m_symbolCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE, 5); wxButton* itemButton15 = new wxButton( itemPanel1, ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, _("Ch&oose..."), wxDefaultPosition, wxDefaultSize, 0 ); @@ -178,7 +182,14 @@ void wxRichTextBulletsPage::CreateControls() itemBoxSizer11->Add(itemStaticText17, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); wxString* m_symbolFontCtrlStrings = NULL; - m_symbolFontCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_symbolFontCtrlStrings, wxCB_DROPDOWN ); + m_symbolFontCtrl = new wxComboBox( itemPanel1, + ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL, + wxEmptyString, + wxDefaultPosition, + wxDefaultSize, + 0, + m_symbolFontCtrlStrings, + wxCB_DROPDOWN ); itemBoxSizer11->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5); itemBoxSizer4->Add(2, 1, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); @@ -194,7 +205,7 @@ void wxRichTextBulletsPage::CreateControls() wxStaticText* itemStaticText23 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC, _("&Number:"), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer22->Add(itemStaticText23, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); - m_numberCtrl = new wxSpinCtrl( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERCTRL, _T("0"), wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, 0, 100000, 0 ); + m_numberCtrl = new wxSpinCtrl( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERCTRL, _T("0"), wxDefaultPosition, wxSize(50, wxDefaultCoord), wxSP_ARROW_KEYS, 0, 100000, 0 ); itemBoxSizer22->Add(m_numberCtrl, 0, wxGROW|wxALL, 5); itemBoxSizer22->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); @@ -231,12 +242,12 @@ void wxRichTextBulletsPage::CreateControls() m_symbolCtrl->Append(_(">")); m_symbolCtrl->Append(_("+")); m_symbolCtrl->Append(_("~")); - + wxFontEnumerator enumerator; enumerator.EnumerateFacenames(); wxArrayString facenames = enumerator.GetFacenames(); facenames.Sort(); - + m_symbolFontCtrl->Append(facenames); } @@ -283,7 +294,7 @@ bool wxRichTextBulletsPage::TransferDataFromWindow() if (m_hasBulletSymbol) { wxChar c(wxT('*')); - if (m_symbolCtrl->GetValue().Length() > 0) + if (m_symbolCtrl->GetValue().length() > 0) c = m_symbolCtrl->GetValue()[0]; attr->SetBulletSymbol(c); attr->SetBulletFont(m_symbolFontCtrl->GetValue()); @@ -326,7 +337,7 @@ bool wxRichTextBulletsPage::TransferDataToWindow() if (attr->GetBulletStyle() & wxTEXT_ATTR_BULLET_STYLE_PERIOD) m_periodCtrl->SetValue(true); else - m_periodCtrl->SetValue(false); + m_periodCtrl->SetValue(false); } else m_styleListBox->SetSelection(-1); @@ -604,10 +615,10 @@ void wxRichTextBulletsPage::OnChooseSymbolClick( wxCommandEvent& WXUNUSED(event) if (dlg.ShowModal() == wxID_OK) { m_dontUpdate = true; - + m_symbolCtrl->SetValue(dlg.GetSymbol()); m_symbolFontCtrl->SetValue(dlg.GetFontName()); - + UpdatePreview(); m_dontUpdate = false; @@ -688,4 +699,4 @@ void wxRichTextBulletsPage::OnNumberstaticUpdate( wxUpdateUIEvent& event ) OnNumberUpdate(event); } - +#endif // wxUSE_RICHTEXT