]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/richtext/richtextuicustomization.h
Test using wxString::ToCDouble() in wxAny.
[wxWidgets.git] / include / wx / richtext / richtextuicustomization.h
index d507aba2fa6a5b5ece83b9e3bde8139870cb13b1..428d7dc4fd27635c9ffaa6e4edcfcecaa8be8194 100644 (file)
@@ -24,9 +24,9 @@
 
     The application will typically have calls like this in its initialisation:
 
 
     The application will typically have calls like this in its initialisation:
 
-    wxRichTextFormattingDialog::SetHelpId(ID_HELP_FORMATTINGDIALOG);
-    wxRichTextFormattingDialog::SetUICustomization(& wxGetApp().GetRichTextUICustomization());
-    wxRichTextBordersPage::SetHelpId(ID_HELP_BORDERSPAGE);
+    wxRichTextFormattingDialog::GetHelpInfo().SetHelpId(ID_HELP_FORMATTINGDIALOG);
+    wxRichTextFormattingDialog::GetHelpInfo().SetUICustomization(& wxGetApp().GetRichTextUICustomization());
+    wxRichTextBordersPage::GetHelpInfo().SetHelpId(ID_HELP_BORDERSPAGE);
     
     Only the wxRichTextFormattingDialog class needs to have its customization object and help id set,
     though the application set them for individual pages if it wants.
     
     Only the wxRichTextFormattingDialog class needs to have its customization object and help id set,
     though the application set them for individual pages if it wants.
@@ -60,10 +60,10 @@ public:
         
     virtual bool ShowHelp(wxWindow* win)
     {
         
     virtual bool ShowHelp(wxWindow* win)
     {
-        if (m_uiCustomization && m_helpTopic != -1)
-            return m_uiCustomization->ShowHelp(win, m_helpTopic);
-        else
+        if ( !m_uiCustomization || m_helpTopic == -1 )
             return false;
             return false;
+
+        return m_uiCustomization->ShowHelp(win, m_helpTopic);
     }
 
     /// Get the help topic identifier.
     }
 
     /// Get the help topic identifier.
@@ -109,6 +109,8 @@ protected:
     virtual wxRichTextUICustomization* GetUICustomization() const { return sm_helpInfo.GetUICustomization(); } \
     virtual void SetUICustomization(wxRichTextUICustomization* customization) { sm_helpInfo.SetUICustomization(customization); } \
     virtual bool ShowHelp(wxWindow* win) { return sm_helpInfo.ShowHelp(win); } \
     virtual wxRichTextUICustomization* GetUICustomization() const { return sm_helpInfo.GetUICustomization(); } \
     virtual void SetUICustomization(wxRichTextUICustomization* customization) { sm_helpInfo.SetUICustomization(customization); } \
     virtual bool ShowHelp(wxWindow* win) { return sm_helpInfo.ShowHelp(win); } \
+public: \
+    static wxRichTextHelpInfo& GetHelpInfo() { return sm_helpInfo; }\
 protected: \
     static wxRichTextHelpInfo sm_helpInfo; \
 public:
 protected: \
     static wxRichTextHelpInfo sm_helpInfo; \
 public: