From 9d9c1c24d7d1a68da02a7fbb4b4c7459139a1df6 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Sun, 21 Sep 2008 23:48:04 +0000 Subject: [PATCH] other ifacecheck fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/calctrl.h | 19 +++++++------------ interface/wx/caret.h | 4 ++-- interface/wx/checkbox.h | 18 ++++++++---------- interface/wx/clrpicker.h | 4 ++-- interface/wx/collpane.h | 6 +++--- interface/wx/combo.h | 4 ++-- utils/ifacecheck/src/ifacecheck.cpp | 11 +++++++++-- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/interface/wx/calctrl.h b/interface/wx/calctrl.h index 02d8675c2c..8adf3848dc 100644 --- a/interface/wx/calctrl.h +++ b/interface/wx/calctrl.h @@ -30,7 +30,7 @@ public: 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: - /** - Default constructor. - */ - wxCalendarDateAttr(); - /** 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, @@ -83,7 +78,7 @@ public: /** 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. @@ -93,17 +88,17 @@ public: /** 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. */ - const wxFont GetFont() const; + const wxFont& GetFont() const; /** 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. @@ -425,7 +420,7 @@ public: 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 diff --git a/interface/wx/caret.h b/interface/wx/caret.h index c967ee764a..637e305c94 100644 --- a/interface/wx/caret.h +++ b/interface/wx/caret.h @@ -81,7 +81,7 @@ public: /** Hides the caret, same as Show(@false). */ - void Hide(); + virtual void Hide(); /** 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. */ - void Show(bool show = true); + virtual void Show(bool show = true); }; diff --git a/interface/wx/checkbox.h b/interface/wx/checkbox.h index 2692382df3..fbd6f33f90 100644 --- a/interface/wx/checkbox.h +++ b/interface/wx/checkbox.h @@ -91,31 +91,29 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "checkBox"); + const wxString& name = wxCheckBoxNameStr); /** Destructor, destroying the checkbox. */ - ~wxCheckBox(); + virtual ~wxCheckBox(); /** 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 wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, 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. */ - bool GetValue() const; + virtual bool GetValue() const; /** 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. */ - void SetValue(bool state); + virtual void SetValue(bool state); /** 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. */ - void Set3StateValue(const wxCheckBoxState state); + virtual void Set3StateValue(const wxCheckBoxState state); }; diff --git a/interface/wx/clrpicker.h b/interface/wx/clrpicker.h index a3fa169d80..986f56b2cb 100644 --- a/interface/wx/clrpicker.h +++ b/interface/wx/clrpicker.h @@ -55,7 +55,7 @@ public: 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. @@ -86,7 +86,7 @@ public: 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. diff --git a/interface/wx/collpane.h b/interface/wx/collpane.h index bc553de157..32c64c4166 100644 --- a/interface/wx/collpane.h +++ b/interface/wx/collpane.h @@ -109,7 +109,7 @@ public: Default constructor. */ wxCollapsiblePane(); - + /** 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 wxString& name = "collapsiblePane"); + const wxString& name = wxCollapsiblePaneNameStr); /** @param parent @@ -149,7 +149,7 @@ public: 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. diff --git a/interface/wx/combo.h b/interface/wx/combo.h index 66e1678ba6..4744d8810d 100644 --- a/interface/wx/combo.h +++ b/interface/wx/combo.h @@ -343,7 +343,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "comboCtrl"); + const wxString& name = wxComboBoxNameStr); /** Destructor, destroying the combo control. @@ -379,7 +379,7 @@ public: 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. diff --git a/utils/ifacecheck/src/ifacecheck.cpp b/utils/ifacecheck/src/ifacecheck.cpp index 48d5690b6e..99054195e7 100644 --- a/utils/ifacecheck/src/ifacecheck.cpp +++ b/utils/ifacecheck/src/ifacecheck.cpp @@ -231,8 +231,8 @@ bool IfaceCheckApp::Compare() 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); @@ -240,6 +240,13 @@ bool IfaceCheckApp::Compare() 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! -- 2.47.2