]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxBookCtrl wrapper rather than wxNotebook in common code for native book (Smartph...
authorWłodzimierz Skiba <abx@abx.art.pl>
Mon, 9 Oct 2006 14:37:53 +0000 (14:37 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Mon, 9 Oct 2006 14:37:53 +0000 (14:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/richtext/richtextformatdlg.h
src/richtext/richtextformatdlg.cpp

index 70b7cbe1953db6b05709f5372256adaedc4b29ba..a5645b39398c16c435a8e05e93b5d9a9750e08c8 100644 (file)
@@ -21,6 +21,8 @@
 #if wxUSE_RICHTEXT
 
 #include "wx/propdlg.h"
+#include "wx/bookctrl.h"
+
 #if wxUSE_HTML
 #include "wx/htmllbox.h"
 #endif
@@ -28,7 +30,6 @@
 #include "wx/richtext/richtextbuffer.h"
 #include "wx/richtext/richtextstyles.h"
 
-class WXDLLEXPORT wxNotebookEvent;
 class WXDLLIMPEXP_RICHTEXT wxRichTextFormattingDialog;
 class WXDLLIMPEXP_CORE wxImageList;
 
@@ -145,7 +146,7 @@ public:
 
     /// Apply the styles when a different tab is selected, so the previews are
     /// up to date
-    void OnTabChanged(wxNotebookEvent& event);
+    void OnTabChanged(wxBookCtrlEvent& event);
 
     /// Set/get image list
     void SetImageList(wxImageList* imageList) { m_imageList = imageList; }
index aeebc51ba1cbcbbc24edeb7f3c8973041bc54f7f..d65dedb3392b1f1a8bb741ebb918cae1b667c377 100644 (file)
@@ -61,7 +61,7 @@
 IMPLEMENT_CLASS(wxRichTextFormattingDialog, wxPropertySheetDialog)
 
 BEGIN_EVENT_TABLE(wxRichTextFormattingDialog, wxPropertySheetDialog)
-    EVT_NOTEBOOK_PAGE_CHANGED(-1, wxRichTextFormattingDialog::OnTabChanged)
+    EVT_BOOKCTRL_PAGE_CHANGED(wxID_ANY, wxRichTextFormattingDialog::OnTabChanged)
 END_EVENT_TABLE()
 
 wxRichTextFormattingDialogFactory* wxRichTextFormattingDialog::ms_FormattingDialogFactory = NULL;
@@ -167,7 +167,7 @@ bool wxRichTextFormattingDialog::UpdateDisplay()
 
 /// Apply the styles when a different tab is selected, so the previews are
 /// up to date
-void wxRichTextFormattingDialog::OnTabChanged(wxNotebookEvent& event)
+void wxRichTextFormattingDialog::OnTabChanged(wxBookCtrlEvent& event)
 {
     if (GetBookCtrl() != event.GetEventObject())
     {
@@ -228,7 +228,7 @@ bool wxRichTextFormattingDialogFactory::CreatePages(long pages, wxRichTextFormat
             }
         }
     }
-    
+
     return true;
 }
 
@@ -441,6 +441,7 @@ void wxRichTextColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event)
         wxColourData data;
         data.SetChooseFull(true);
         data.SetColour(m_colour);
+#if wxUSE_COLOURDLG
         wxColourDialog *dialog = new wxColourDialog(parent, &data);
         // Crashes on wxMac (no m_peer)
 #ifndef __WXMAC__
@@ -453,6 +454,7 @@ void wxRichTextColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event)
             SetBackgroundColour(m_colour);
         }
         dialog->Destroy();
+#endif // wxUSE_COLOURDLG
         Refresh();
 
         wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
@@ -578,4 +580,3 @@ wxString wxRichTextFontListBox::CreateHTML(const wxString& facename) const
 
 #endif
     // wxUSE_RICHTEXT
-