]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed help for symbol picker and style manager dialogs
authorJulian Smart <julian@anthemion.co.uk>
Mon, 18 Mar 2013 20:21:11 +0000 (20:21 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 18 Mar 2013 20:21:11 +0000 (20:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/richtext/richtextstyledlg.h
include/wx/richtext/richtextsymboldlg.h
src/richtext/richtextdialogs.pjd
src/richtext/richtextstyledlg.cpp
src/richtext/richtextsymboldlg.cpp

index ad21c024b155ee0eb657adbf60f99bf16ebf89b6..9ca4c994e1b623a1625f859dca15be2676a47419 100644 (file)
@@ -191,6 +191,9 @@ public:
     /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE
     void OnDeleteUpdate( wxUpdateUIEvent& event );
 
+    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP
+    void OnHelpClick( wxCommandEvent& event );
+
 ////@end wxRichTextStyleOrganiserDialog event handler declarations
 
 ////@begin wxRichTextStyleOrganiserDialog member function declarations
index c77884dc06e47fbb0d16838b349aed343ee3b1d5..61526ad8271c0d4a0413c9b3bf5e196a839f9a64 100644 (file)
@@ -127,6 +127,12 @@ public:
     /// wxEVT_UPDATE_UI event handler for wxID_OK
     void OnOkUpdate( wxUpdateUIEvent& event );
 
+    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP
+    void OnHelpClick( wxCommandEvent& event );
+
+    /// wxEVT_UPDATE_UI event handler for wxID_HELP
+    void OnHelpUpdate( wxUpdateUIEvent& event );
+
 ////@end wxSymbolPickerDialog event handler declarations
 
 ////@begin wxSymbolPickerDialog member function declarations
@@ -134,15 +140,15 @@ public:
     wxString GetFontName() const { return m_fontName ; }
     void SetFontName(wxString value) { m_fontName = value ; }
 
-    wxString GetSymbol() const { return m_symbol ; }
-    void SetSymbol(wxString value) { m_symbol = value ; }
-
     bool GetFromUnicode() const { return m_fromUnicode ; }
     void SetFromUnicode(bool value) { m_fromUnicode = value ; }
 
     wxString GetNormalTextFontName() const { return m_normalTextFontName ; }
     void SetNormalTextFontName(wxString value) { m_normalTextFontName = value ; }
 
+    wxString GetSymbol() const { return m_symbol ; }
+    void SetSymbol(wxString value) { m_symbol = value ; }
+
     /// Retrieves bitmap resources
     wxBitmap GetBitmapResource( const wxString& name );
 
@@ -163,9 +169,9 @@ public:
 #endif
     wxStdDialogButtonSizer* m_stdButtonSizer;
     wxString m_fontName;
-    wxString m_symbol;
     bool m_fromUnicode;
     wxString m_normalTextFontName;
+    wxString m_symbol;
     /// Control identifiers
     enum {
         ID_SYMBOLPICKERDIALOG = 10600,
index 66c1a918a59735dc8d647e0ba4dc347e7a41ea04..858e61928132153d875b360ea9eac93292d51d04 100644 (file)
           <long name="use-xrc">0</long>
           <long name="working-mode">0</long>
           <string name="variable-0">"m_fontName|wxString|FontName||0"</string>
-          <string name="variable-1">"m_symbol|wxString|Symbol||0"</string>
-          <string name="variable-2">"m_fromUnicode|bool|FromUnicode|true|0"</string>
-          <string name="variable-3">"m_normalTextFontName|wxString|NormalTextFontName|"</string>
+          <string name="variable-1">"m_fromUnicode|bool|FromUnicode|true|0"</string>
+          <string name="variable-2">"m_normalTextFontName|wxString|NormalTextFontName|"</string>
+          <string name="variable-3">"m_symbol|wxString|Symbol||0"</string>
           <string name="proxy-Id name">"ID_SYMBOLPICKERDIALOG"</string>
           <long name="proxy-Id value">10600</long>
           <string name="proxy-Class">"wxSymbolPickerDialog"</string>
             <string name="proxy-type">"wbBoxSizerProxy"</string>
             <string name="proxy-Orientation">"Vertical"</string>
             <string name="proxy-Member variable name">""</string>
-            <string name="proxy-AlignH">"Centre"</string>
-            <string name="proxy-AlignV">"Centre"</string>
-            <long name="proxy-Stretch factor">0</long>
-            <long name="proxy-Border">5</long>
-            <bool name="proxy-wxLEFT">1</bool>
-            <bool name="proxy-wxRIGHT">1</bool>
-            <bool name="proxy-wxTOP">1</bool>
-            <bool name="proxy-wxBOTTOM">1</bool>
             <bool name="proxy-wxSHAPED">0</bool>
             <bool name="proxy-wxADJUST_MINSIZE">0</bool>
             <bool name="proxy-wxFIXED_MINSIZE">0</bool>
                   <long name="title-mode">0</long>
                   <long name="locked">1</long>
                   <string name="proxy-type">"wbButtonProxy"</string>
+                  <string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnHelpClick|NONE||wxSymbolPickerDialog"</string>
+                  <string name="event-handler-1">"wxEVT_UPDATE_UI|OnHelpUpdate|NONE||"</string>
                   <string name="proxy-Id name">"wxID_HELP"</string>
                   <long name="proxy-Id value">5009</long>
                   <string name="proxy-Name">""</string>
             <string name="proxy-type">"wbBoxSizerProxy"</string>
             <string name="proxy-Orientation">"Vertical"</string>
             <string name="proxy-Member variable name">""</string>
-            <string name="proxy-AlignH">"Centre"</string>
-            <string name="proxy-AlignV">"Centre"</string>
-            <long name="proxy-Stretch factor">0</long>
-            <long name="proxy-Border">5</long>
-            <bool name="proxy-wxLEFT">1</bool>
-            <bool name="proxy-wxRIGHT">1</bool>
-            <bool name="proxy-wxTOP">1</bool>
-            <bool name="proxy-wxBOTTOM">1</bool>
             <bool name="proxy-wxSHAPED">0</bool>
             <bool name="proxy-wxADJUST_MINSIZE">0</bool>
             <bool name="proxy-wxFIXED_MINSIZE">0</bool>
                     <long name="title-mode">0</long>
                     <long name="locked">1</long>
                     <string name="proxy-type">"wbButtonProxy"</string>
+                    <string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnHelpClick|NONE||wxRichTextStyleOrganiserDialog"</string>
                     <string name="proxy-Id name">"wxID_HELP"</string>
                     <long name="proxy-Id value">5009</long>
                     <string name="proxy-Name">""</string>
             <string name="proxy-type">"wbBoxSizerProxy"</string>
             <string name="proxy-Orientation">"Vertical"</string>
             <string name="proxy-Member variable name">""</string>
+            <string name="proxy-AlignH">"Centre"</string>
+            <string name="proxy-AlignV">"Centre"</string>
+            <long name="proxy-Stretch factor">0</long>
+            <long name="proxy-Border">5</long>
+            <bool name="proxy-wxLEFT">1</bool>
+            <bool name="proxy-wxRIGHT">1</bool>
+            <bool name="proxy-wxTOP">1</bool>
+            <bool name="proxy-wxBOTTOM">1</bool>
             <bool name="proxy-wxSHAPED">0</bool>
             <bool name="proxy-wxADJUST_MINSIZE">0</bool>
             <bool name="proxy-wxFIXED_MINSIZE">0</bool>
index 40705cff21c5b30f2336ab936493f779489179a2..dc29f844a569063ba9cc8b360ef4e322d655451b 100644 (file)
@@ -44,28 +44,21 @@ BEGIN_EVENT_TABLE( wxRichTextStyleOrganiserDialog, wxDialog )
 ////@begin wxRichTextStyleOrganiserDialog event table entries
     EVT_BUTTON( ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR, wxRichTextStyleOrganiserDialog::OnNewCharClick )
     EVT_UPDATE_UI( ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_CHAR, wxRichTextStyleOrganiserDialog::OnNewCharUpdate )
-
     EVT_BUTTON( ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA, wxRichTextStyleOrganiserDialog::OnNewParaClick )
     EVT_UPDATE_UI( ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_PARA, wxRichTextStyleOrganiserDialog::OnNewParaUpdate )
-
     EVT_BUTTON( ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST, wxRichTextStyleOrganiserDialog::OnNewListClick )
     EVT_UPDATE_UI( ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_LIST, wxRichTextStyleOrganiserDialog::OnNewListUpdate )
-
     EVT_BUTTON( ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX, wxRichTextStyleOrganiserDialog::OnNewBoxClick )
     EVT_UPDATE_UI( ID_RICHTEXTSTYLEORGANISERDIALOG_NEW_BOX, wxRichTextStyleOrganiserDialog::OnNewBoxUpdate )
-
     EVT_BUTTON( ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY, wxRichTextStyleOrganiserDialog::OnApplyClick )
     EVT_UPDATE_UI( ID_RICHTEXTSTYLEORGANISERDIALOG_APPLY, wxRichTextStyleOrganiserDialog::OnApplyUpdate )
-
     EVT_BUTTON( ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME, wxRichTextStyleOrganiserDialog::OnRenameClick )
     EVT_UPDATE_UI( ID_RICHTEXTSTYLEORGANISERDIALOG_RENAME, wxRichTextStyleOrganiserDialog::OnRenameUpdate )
-
     EVT_BUTTON( ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT, wxRichTextStyleOrganiserDialog::OnEditClick )
     EVT_UPDATE_UI( ID_RICHTEXTSTYLEORGANISERDIALOG_EDIT, wxRichTextStyleOrganiserDialog::OnEditUpdate )
-
     EVT_BUTTON( ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE, wxRichTextStyleOrganiserDialog::OnDeleteClick )
     EVT_UPDATE_UI( ID_RICHTEXTSTYLEORGANISERDIALOG_DELETE, wxRichTextStyleOrganiserDialog::OnDeleteUpdate )
-
+    EVT_BUTTON( wxID_HELP, wxRichTextStyleOrganiserDialog::OnHelpClick )
 ////@end wxRichTextStyleOrganiserDialog event table entries
 
 END_EVENT_TABLE()
@@ -977,5 +970,15 @@ void wxRichTextStyleOrganiserDialog::OnNewBoxUpdate( wxUpdateUIEvent& event )
     event.Enable((GetFlags() & wxRICHTEXT_ORGANISER_CREATE_STYLES) != 0);
 }
 
+/*!
+ * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP
+ */
+
+void wxRichTextStyleOrganiserDialog::OnHelpClick( wxCommandEvent& WXUNUSED(event) )
+{
+    if ((GetHelpId() != -1) && GetUICustomization())
+        ShowHelp(this);
+}
+
 #endif
     // wxUSE_RICHTEXT
index 36d529fe462cde230dd19d1f3f495883af6ce027..85c07f05924652f58835c11b2a623336bc1f3e4a 100644 (file)
@@ -293,7 +293,6 @@ BEGIN_EVENT_TABLE( wxSymbolPickerDialog, wxDialog )
 
 ////@begin wxSymbolPickerDialog event table entries
     EVT_COMBOBOX( ID_SYMBOLPICKERDIALOG_FONT, wxSymbolPickerDialog::OnFontCtrlSelected )
-
 #if defined(__UNICODE__)
     EVT_COMBOBOX( ID_SYMBOLPICKERDIALOG_SUBSET, wxSymbolPickerDialog::OnSubsetSelected )
     EVT_UPDATE_UI( ID_SYMBOLPICKERDIALOG_SUBSET, wxSymbolPickerDialog::OnSymbolpickerdialogSubsetUpdate )
@@ -304,7 +303,8 @@ BEGIN_EVENT_TABLE( wxSymbolPickerDialog, wxDialog )
 #endif
 
     EVT_UPDATE_UI( wxID_OK, wxSymbolPickerDialog::OnOkUpdate )
-
+    EVT_BUTTON( wxID_HELP, wxSymbolPickerDialog::OnHelpClick )
+    EVT_UPDATE_UI( wxID_HELP, wxSymbolPickerDialog::OnHelpUpdate )
 ////@end wxSymbolPickerDialog event table entries
 
 END_EVENT_TABLE()
@@ -1292,4 +1292,24 @@ wxSymbolListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
     return wxListBox::GetClassDefaultAttributes(variant);
 }
 
-#endif // wxUSE_RICHTEXT
+/*!
+ * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP
+ */
+
+void wxSymbolPickerDialog::OnHelpClick( wxCommandEvent& WXUNUSED(event) )
+{
+    if ((GetHelpInfo().GetHelpId() != -1) && GetHelpInfo().GetUICustomization())
+        ShowHelp(this);
+}
+
+/*!
+ * wxEVT_UPDATE_UI event handler for wxID_HELP
+ */
+
+void wxSymbolPickerDialog::OnHelpUpdate( wxUpdateUIEvent& event )
+{
+    event.Enable((GetHelpInfo().GetHelpId() != -1) && GetHelpInfo().GetUICustomization());
+}
+
+#endif
+    // wxUSE_RICHTEXT