]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextbulletspage.cpp
[ 1577675 ] Fix for GTK warnings in wxNotebook::DoRemovePage
[wxWidgets.git] / src / richtext / richtextbulletspage.cpp
index 740ad086c3620c8aaeb68846b994179a3970617a..e71094592f4cb440cb5c856c8ed083e532265497 100644 (file)
@@ -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
 // Purpose:
 // Author:      Julian Smart
 // Modified by:
 // Created:     10/4/2006 10:32:31 AM
-// RCS-ID:
+// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // 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"
 
 #include "wx/richtext/richtextsymboldlg.h"
 #include "wx/fontenum.h"
 
-////@begin XPM images
-////@end XPM images
-
 /*!
  * wxRichTextBulletsPage type definition
  */
 /*!
  * wxRichTextBulletsPage type definition
  */
@@ -83,7 +80,7 @@ wxRichTextBulletsPage::wxRichTextBulletsPage( wxWindow* parent, wxWindowID id, c
 /*!
  * Initialise members
  */
 /*!
  * Initialise members
  */
+
 void wxRichTextBulletsPage::Init()
 {
     m_hasBulletStyle = false;
 void wxRichTextBulletsPage::Init()
 {
     m_hasBulletStyle = false;
@@ -166,7 +163,14 @@ void wxRichTextBulletsPage::CreateControls()
     itemBoxSizer11->Add(itemBoxSizer13, 0, wxGROW, 5);
 
     wxString* m_symbolCtrlStrings = NULL;
     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 );
     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;
     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);
     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);
 
     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);
     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(_("~"));
     m_symbolCtrl->Append(_(">"));
     m_symbolCtrl->Append(_("+"));
     m_symbolCtrl->Append(_("~"));
-    
+
     wxFontEnumerator enumerator;
     enumerator.EnumerateFacenames();
     wxArrayString facenames = enumerator.GetFacenames();
     facenames.Sort();
     wxFontEnumerator enumerator;
     enumerator.EnumerateFacenames();
     wxArrayString facenames = enumerator.GetFacenames();
     facenames.Sort();
-    
+
     m_symbolFontCtrl->Append(facenames);
 }
 
     m_symbolFontCtrl->Append(facenames);
 }
 
@@ -283,7 +294,7 @@ bool wxRichTextBulletsPage::TransferDataFromWindow()
     if (m_hasBulletSymbol)
     {
         wxChar c(wxT('*'));
     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());
             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
         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);
     }
     else
         m_styleListBox->SetSelection(-1);
@@ -604,10 +615,10 @@ void wxRichTextBulletsPage::OnChooseSymbolClick( wxCommandEvent& WXUNUSED(event)
         if (dlg.ShowModal() == wxID_OK)
         {
             m_dontUpdate = true;
         if (dlg.ShowModal() == wxID_OK)
         {
             m_dontUpdate = true;
-            
+
             m_symbolCtrl->SetValue(dlg.GetSymbol());
             m_symbolFontCtrl->SetValue(dlg.GetFontName());
             m_symbolCtrl->SetValue(dlg.GetSymbol());
             m_symbolFontCtrl->SetValue(dlg.GetFontName());
-            
+
             UpdatePreview();
 
             m_dontUpdate = false;
             UpdatePreview();
 
             m_dontUpdate = false;
@@ -688,4 +699,4 @@ void wxRichTextBulletsPage::OnNumberstaticUpdate( wxUpdateUIEvent& event )
     OnNumberUpdate(event);
 }
 
     OnNumberUpdate(event);
 }
 
-
+#endif // wxUSE_RICHTEXT