]> git.saurik.com Git - wxWidgets.git/commitdiff
other ifacecheck fixes
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sun, 21 Sep 2008 23:48:04 +0000 (23:48 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sun, 21 Sep 2008 23:48:04 +0000 (23:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/wx/calctrl.h
interface/wx/caret.h
interface/wx/checkbox.h
interface/wx/clrpicker.h
interface/wx/collpane.h
interface/wx/combo.h
utils/ifacecheck/src/ifacecheck.cpp

index 02d8675c2c969892e7cdddff1ced04f72d95293c..8adf3848dca991958fe55faab654f26d556f2094 100644 (file)
@@ -30,7 +30,7 @@ public:
         Sets the week day carried by the event, normally only used by the
         library internally.
     */
         Sets the week day carried by the event, normally only used by the
         library internally.
     */
-    void SetWeekDay(wxDateTime::WeekDay day);
+    void SetWeekDay(const wxDateTime::WeekDay day);
 };
 
 
 };
 
 
@@ -60,15 +60,10 @@ enum wxCalendarDateBorder
 class wxCalendarDateAttr
 {
 public:
 class wxCalendarDateAttr
 {
 public:
-    /**
-        Default constructor.
-    */
-    wxCalendarDateAttr();
-
     /**
         Constructor for specifying all wxCalendarDateAttr properties.
     */
     /**
         Constructor for specifying all wxCalendarDateAttr properties.
     */
-    wxCalendarDateAttr(const wxColour& colText,
+    wxCalendarDateAttr(const wxColour& colText = wxNullColour,
                        const wxColour& colBack = wxNullColour,
                        const wxColour& colBorder = wxNullColour,
                        const wxFont& font = wxNullFont,
                        const wxColour& colBack = wxNullColour,
                        const wxColour& colBorder = wxNullColour,
                        const wxFont& font = wxNullFont,
@@ -83,7 +78,7 @@ public:
     /**
         Returns the background colour set for the calendar date.
     */
     /**
         Returns the background colour set for the calendar date.
     */
-    const wxColour GetBackgroundColour() const;
+    const wxColour& GetBackgroundColour() const;
 
     /**
         Returns the border set for the calendar date.
 
     /**
         Returns the border set for the calendar date.
@@ -93,17 +88,17 @@ public:
     /**
         Returns the border colour set for the calendar date.
     */
     /**
         Returns the border colour set for the calendar date.
     */
-    const wxColour GetBorderColour() const;
+    const wxColour& GetBorderColour() const;
 
     /**
         Returns the font set for the calendar date.
     */
 
     /**
         Returns the font set for the calendar date.
     */
-    const wxFont GetFont() const;
+    const wxFont& GetFont() const;
 
     /**
         Returns the text colour set for the calendar date.
     */
 
     /**
         Returns the text colour set for the calendar date.
     */
-    const wxColour GetTextColour() const;
+    const wxColour& GetTextColour() const;
 
     /**
         Returns @true if a non-default text background colour is set.
 
     /**
         Returns @true if a non-default text background colour is set.
@@ -425,7 +420,7 @@ public:
 
         The @a date parameter must be valid.
     */
 
         The @a date parameter must be valid.
     */
-    virtual void SetDate(const wxDateTime& date);
+    virtual bool SetDate(const wxDateTime& date);
 
     /**
         Set the colours used for painting the weekdays at the top of the
 
     /**
         Set the colours used for painting the weekdays at the top of the
index c967ee764a19775820df962fbd9a6a5f839697a9..637e305c94fbe15c848a2c25127515b61afbc83d 100644 (file)
@@ -81,7 +81,7 @@ public:
     /**
         Hides the caret, same as Show(@false).
     */
     /**
         Hides the caret, same as Show(@false).
     */
-    void Hide();
+    virtual void Hide();
 
     /**
         Returns @true if the caret was created successfully.
 
     /**
         Returns @true if the caret was created successfully.
@@ -126,6 +126,6 @@ public:
         Shows or hides the caret. Notice that if the caret was hidden N times,
         it must be shown N times as well to reappear on the screen.
     */
         Shows or hides the caret. Notice that if the caret was hidden N times,
         it must be shown N times as well to reappear on the screen.
     */
-    void Show(bool show = true);
+    virtual void Show(bool show = true);
 };
 
 };
 
index 2692382df3d947bc31b31604f05df1fa3b26121d..fbd6f33f90e387af2221e683df0a41c85c3fa523 100644 (file)
@@ -91,31 +91,29 @@ public:
                const wxSize& size = wxDefaultSize,
                long style = 0,
                const wxValidator& validator = wxDefaultValidator,
                const wxSize& size = wxDefaultSize,
                long style = 0,
                const wxValidator& validator = wxDefaultValidator,
-               const wxString& name = "checkBox");
+               const wxString& name = wxCheckBoxNameStr);
 
     /**
         Destructor, destroying the checkbox.
     */
 
     /**
         Destructor, destroying the checkbox.
     */
-    ~wxCheckBox();
+    virtual ~wxCheckBox();
 
     /**
         Creates the checkbox for two-step construction. See wxCheckBox()
         for details.
     */
 
     /**
         Creates the checkbox for two-step construction. See wxCheckBox()
         for details.
     */
-    bool Create(wxWindow* parent, wxWindowID id,
-                const wxString& label,
+    bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxPoint& pos = wxDefaultPosition,
-                const wxSize& size = wxDefaultSize,
-                long style = 0,
+                const wxSize& size = wxDefaultSize, long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxValidator& validator = wxDefaultValidator,
-                const wxString& name = "checkBox");
+                const wxString& = wxCheckBoxNameStr);
 
     /**
         Gets the state of a 2-state checkbox.
 
         @return Returns @true if it is checked, @false otherwise.
     */
 
     /**
         Gets the state of a 2-state checkbox.
 
         @return Returns @true if it is checked, @false otherwise.
     */
-    bool GetValue() const;
+    virtual bool GetValue() const;
 
     /**
         Gets the state of a 3-state checkbox. Asserts when the function is used
 
     /**
         Gets the state of a 3-state checkbox. Asserts when the function is used
@@ -155,7 +153,7 @@ public:
         @param state
             If @true, the check is on, otherwise it is off.
     */
         @param state
             If @true, the check is on, otherwise it is off.
     */
-    void SetValue(bool state);
+    virtual void SetValue(bool state);
 
     /**
         Sets the checkbox to the given state. This does not cause a
 
     /**
         Sets the checkbox to the given state. This does not cause a
@@ -164,6 +162,6 @@ public:
         Asserts when the checkbox is a 2-state checkbox and setting the state
         to wxCHK_UNDETERMINED.
     */
         Asserts when the checkbox is a 2-state checkbox and setting the state
         to wxCHK_UNDETERMINED.
     */
-    void Set3StateValue(const wxCheckBoxState state);
+    virtual void Set3StateValue(const wxCheckBoxState state);
 };
 
 };
 
index a3fa169d80cdebb14c74b08688d5ccfc95a3a699..986f56b2cb69e4a8f58b93e577cb8ef4a212fc11 100644 (file)
@@ -55,7 +55,7 @@ public:
                        const wxSize& size = wxDefaultSize,
                        long style = wxCLRP_DEFAULT_STYLE,
                        const wxValidator& validator = wxDefaultValidator,
                        const wxSize& size = wxDefaultSize,
                        long style = wxCLRP_DEFAULT_STYLE,
                        const wxValidator& validator = wxDefaultValidator,
-                       const wxString& name = "colourpickerctrl");
+                       const wxString& name = wxColourPickerCtrlNameStr);
 
     /**
         Creates a colour picker with the given arguments.
 
     /**
         Creates a colour picker with the given arguments.
@@ -86,7 +86,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = wxCLRP_DEFAULT_STYLE,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxSize& size = wxDefaultSize,
                 long style = wxCLRP_DEFAULT_STYLE,
                 const wxValidator& validator = wxDefaultValidator,
-                const wxString& name = "colourpickerctrl");
+                const wxString& name = wxColourPickerCtrlNameStr);
 
     /**
         Returns the currently selected colour.
 
     /**
         Returns the currently selected colour.
index bc553de1571dc820b08930d773cb659926b28f94..32c64c41667ec54ac0ddc9f7ffd4e67660d0ca48 100644 (file)
@@ -109,7 +109,7 @@ public:
         Default constructor.
     */
     wxCollapsiblePane();
         Default constructor.
     */
     wxCollapsiblePane();
-    
+
     /**
         Initializes the object and calls Create() with all the parameters.
     */
     /**
         Initializes the object and calls Create() with all the parameters.
     */
@@ -119,7 +119,7 @@ public:
                       const wxSize& size = wxDefaultSize,
                       long style = wxCP_DEFAULT_STYLE,
                       const wxValidator& validator = wxDefaultValidator,
                       const wxSize& size = wxDefaultSize,
                       long style = wxCP_DEFAULT_STYLE,
                       const wxValidator& validator = wxDefaultValidator,
-                      const wxString& name = "collapsiblePane");
+                      const wxString& name = wxCollapsiblePaneNameStr);
 
     /**
         @param parent
 
     /**
         @param parent
@@ -149,7 +149,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = wxCP_DEFAULT_STYLE,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxSize& size = wxDefaultSize,
                 long style = wxCP_DEFAULT_STYLE,
                 const wxValidator& validator = wxDefaultValidator,
-                const wxString& name = "collapsiblePane");
+                const wxString& name = wxCollapsiblePaneNameStr);
 
     /**
         Collapses or expands the pane window.
 
     /**
         Collapses or expands the pane window.
index 66e1678ba6736b9663f6821cd715dc22e96fea57..4744d8810dc0544ab85a14936bcd1698380e06f3 100644 (file)
@@ -343,7 +343,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
-                const wxString& name = "comboCtrl");
+                const wxString& name = wxComboBoxNameStr);
 
     /**
         Destructor, destroying the combo control.
 
     /**
         Destructor, destroying the combo control.
@@ -379,7 +379,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
-                const wxString& name = "comboCtrl");
+                const wxString& name = wxComboBoxNameStr);
 
     /**
         Copies the selected text to the clipboard and removes the selection.
 
     /**
         Copies the selected text to the clipboard and removes the selection.
index 48d5690b6e02047afe811bc6fc891e00877df756..99054195e7d7dddcf7335adf1604867ff0023c01 100644 (file)
@@ -231,8 +231,8 @@ bool IfaceCheckApp::Compare()
 
         api.Empty();
 
 
         api.Empty();
 
-        // search in the real headers for i-th interface class
-        // for both class cname and cnameBase as in wxWidgets world, most often
+        // search in the real headers for i-th interface class; we search for
+        // both class cname and cnameBase since in wxWidgets world tipically
         // class cname is platform-specific while the real public interface of
         // that class is part of the cnameBase class.
         c = m_gccInterface.FindClass(cname);
         // class cname is platform-specific while the real public interface of
         // that class is part of the cnameBase class.
         c = m_gccInterface.FindClass(cname);
@@ -240,6 +240,13 @@ bool IfaceCheckApp::Compare()
         c = m_gccInterface.FindClass(cname + "Base");
         if (c) api.Add(c);
 
         c = m_gccInterface.FindClass(cname + "Base");
         if (c) api.Add(c);
 
+        // sometimes the platform-specific class is named "wxGeneric" + cname
+        // or similar:
+        c = m_gccInterface.FindClass("wxGeneric" + cname.Mid(2));
+        if (c) api.Add(c);
+        c = m_gccInterface.FindClass("wxGtk" + cname.Mid(2));
+        if (c) api.Add(c);
+
         if (api.GetCount()>0) {
 
             // there is a class with exactly the same name!
         if (api.GetCount()>0) {
 
             // there is a class with exactly the same name!