]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextstylepage.cpp
fixing changing text colors
[wxWidgets.git] / src / richtext / richtextstylepage.cpp
index 2003459e9e2f14236819a4d4b2e9dcf9296b1946..bc1caa440f4e0ce03050294ff1df3d3f662e9101 100644 (file)
@@ -1,21 +1,17 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        richtextstylepage.cpp
-// Purpose:     
+// Name:        src/richtext/richtextstylepage.cpp
+// Purpose:
 // Author:      Julian Smart
-// Modified by: 
+// Modified by:
 // Created:     10/5/2006 11:34:55 AM
-// RCS-ID:      
+// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-////@begin includes
-////@end includes
+#if wxUSE_RICHTEXT
 
-#include "../../include/wx/richtext/richtextstylepage.h"
-
-////@begin XPM images
-////@end XPM images
+#include "wx/richtext/richtextstylepage.h"
 
 /*!
  * wxRichTextStylePage type definition
@@ -54,7 +50,7 @@ wxRichTextStylePage::wxRichTextStylePage( wxWindow* parent, wxWindowID id, const
 /*!
  * Initialise members
  */
+
 void wxRichTextStylePage::Init()
 {
 ////@begin wxRichTextStylePage member initialisation
@@ -88,7 +84,7 @@ bool wxRichTextStylePage::Create( wxWindow* parent, wxWindowID id, const wxPoint
  */
 
 void wxRichTextStylePage::CreateControls()
-{    
+{
 ////@begin wxRichTextStylePage content construction
     wxRichTextStylePage* itemPanel1 = this;
 
@@ -107,21 +103,40 @@ void wxRichTextStylePage::CreateControls()
     wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Style:"), wxDefaultPosition, wxDefaultSize, 0 );
     itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
 
-    m_styleName = new wxTextCtrl( itemPanel1, ID_RICHTEXTSTYLEPAGE_STYLE_NAME, _T(""), wxDefaultPosition, wxSize(300, -1), 0 );
+    m_styleName = new wxTextCtrl( itemPanel1,
+                                  ID_RICHTEXTSTYLEPAGE_STYLE_NAME,
+                                  wxEmptyString,
+                                  wxDefaultPosition,
+                                  wxSize(300, wxDefaultCoord),
+                                  0 );
     itemBoxSizer5->Add(m_styleName, 0, wxGROW|wxALL, 5);
 
     wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Based on:"), wxDefaultPosition, wxDefaultSize, 0 );
     itemBoxSizer5->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
 
     wxString* m_basedOnStrings = NULL;
-    m_basedOn = new wxComboBox( itemPanel1, ID_RICHTEXTSTYLEPAGE_BASED_ON, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_basedOnStrings, wxCB_DROPDOWN );
+    m_basedOn = new wxComboBox( itemPanel1,
+                                ID_RICHTEXTSTYLEPAGE_BASED_ON,
+                                wxEmptyString,
+                                wxDefaultPosition,
+                                wxDefaultSize,
+                                0,
+                                m_basedOnStrings,
+                                wxCB_DROPDOWN );
     itemBoxSizer5->Add(m_basedOn, 0, wxGROW|wxALL, 5);
 
     wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Next style:"), wxDefaultPosition, wxDefaultSize, 0 );
     itemBoxSizer5->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
 
     wxString* m_nextStyleStrings = NULL;
-    m_nextStyle = new wxComboBox( itemPanel1, ID_RICHTEXTSTYLEPAGE_NEXT_STYLE, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_nextStyleStrings, wxCB_DROPDOWN );
+    m_nextStyle = new wxComboBox( itemPanel1,
+                                  ID_RICHTEXTSTYLEPAGE_NEXT_STYLE,
+                                  wxEmptyString,
+                                  wxDefaultPosition,
+                                  wxDefaultSize,
+                                  0,
+                                  m_nextStyleStrings,
+                                  wxCB_DROPDOWN );
     itemBoxSizer5->Add(m_nextStyle, 0, wxGROW|wxALL, 5);
 
     itemBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
@@ -172,7 +187,7 @@ bool wxRichTextStylePage::TransferDataToWindow()
         }
         m_nextStyle->SetValue(paraDef->GetNextStyle());
     }
-    
+
     if (m_basedOn->GetCount() == 0)
     {
         if (sheet)
@@ -199,7 +214,7 @@ bool wxRichTextStylePage::TransferDataToWindow()
             }
         }
     }
-    
+
     m_basedOn->SetValue(def->GetBaseStyle());
 
     return true;
@@ -253,3 +268,5 @@ void wxRichTextStylePage::OnNextStyleUpdate( wxUpdateUIEvent& event )
     wxRichTextStyleDefinition* def = wxRichTextFormattingDialog::GetDialogStyleDefinition(this);
     event.Enable(def->IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition)));
 }
+
+#endif // wxUSE_RICHTEXT