From: Włodzimierz Skiba Date: Fri, 24 Mar 2006 22:50:51 +0000 (+0000) Subject: More null virtuals in wxRadioBoxBase (see: 'Developers_Notebook-Incomplete-API' in... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7a952d4cbdf13ee9bad234f3b08678988c6bba53 More null virtuals in wxRadioBoxBase (see: 'Developers_Notebook-Incomplete-API' in wxWiki) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/cocoa/radiobox.h b/include/wx/cocoa/radiobox.h index 9caf5afcf1..d2712281b5 100644 --- a/include/wx/cocoa/radiobox.h +++ b/include/wx/cocoa/radiobox.h @@ -70,6 +70,22 @@ public: const wxString& name = wxRadioBoxNameStr); virtual ~wxRadioBox(); + // Enabling + virtual bool Enable(unsigned int n, bool enable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(unsigned int n, bool show = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + // ------------------------------------------------------------------------ // Cocoa callbacks // ------------------------------------------------------------------------ @@ -89,8 +105,6 @@ public: virtual wxString GetString(unsigned int n) const; virtual void SetString(unsigned int n, const wxString& label); // change the individual radio button state - virtual bool Enable(unsigned int n, bool enable = true); - virtual bool Show(unsigned int n, bool show = true); protected: virtual wxSize DoGetBestSize() const; }; diff --git a/include/wx/mac/carbon/radiobox.h b/include/wx/mac/carbon/radiobox.h index 016e42ebd7..fddba3c722 100644 --- a/include/wx/mac/carbon/radiobox.h +++ b/include/wx/mac/carbon/radiobox.h @@ -54,7 +54,25 @@ public: const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); -// Specific functions (in wxWidgets2 reference) + // Enabling + virtual bool Enable(bool enable = true); + virtual bool Enable(unsigned int item, bool enable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(bool show = true); + virtual bool Show(unsigned int item, bool show = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Specific functions (in wxWidgets2 reference) virtual void SetSelection(int item); virtual int GetSelection() const; @@ -63,13 +81,8 @@ public: virtual wxString GetString(unsigned int item) const; virtual void SetString(unsigned int item, const wxString& label); - virtual bool Enable(unsigned int item, bool enable = true); - virtual bool Show(unsigned int item, bool show = true); - - virtual bool Enable(bool enable = true); virtual wxString GetLabel() const; virtual void SetLabel(const wxString& label) ; - virtual bool Show(bool show = true); // Other external functions void Command(wxCommandEvent& event); diff --git a/include/wx/mac/classic/radiobox.h b/include/wx/mac/classic/radiobox.h index fc40c6aa5c..11fdf686ad 100644 --- a/include/wx/mac/classic/radiobox.h +++ b/include/wx/mac/classic/radiobox.h @@ -54,6 +54,24 @@ public: const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); + // Enabling + virtual bool Enable(bool enable = true); + virtual bool Enable(unsigned int item, bool enable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(bool show = true); + virtual bool Show(unsigned int item, bool show = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + // Specific functions (in wxWidgets2 reference) virtual void SetSelection(int item); virtual int GetSelection() const; @@ -63,13 +81,9 @@ public: virtual wxString GetString(unsigned int item) const; virtual void SetString(unsigned int item, const wxString& label); - virtual bool Enable(unsigned int item, bool enable = true); - virtual bool Show(unsigned int item, bool show = true); - virtual bool Enable(bool enable = true); virtual wxString GetLabel() const; virtual void SetLabel(const wxString& label) ; - virtual bool Show(bool show = true); // Other external functions void Command(wxCommandEvent& event); diff --git a/include/wx/motif/radiobox.h b/include/wx/motif/radiobox.h index f85602f8f8..1e4085f911 100644 --- a/include/wx/motif/radiobox.h +++ b/include/wx/motif/radiobox.h @@ -72,15 +72,29 @@ public: const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); + // Enabling + virtual bool Enable(bool enable = true); + virtual bool Enable(unsigned int item, bool enable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(bool show = true); + virtual bool Show(unsigned int item, bool show = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + virtual void SetSelection(int n); int GetSelection() const; virtual void SetString(unsigned int item, const wxString& label); virtual wxString GetString(unsigned int item) const; - virtual bool Enable(bool enable = true); - virtual bool Enable(unsigned int item, bool enable = true); - virtual bool Show(unsigned int item, bool show = true); - virtual bool Show(bool show = true); virtual wxString GetStringSelection() const; virtual bool SetStringSelection(const wxString& s); diff --git a/include/wx/os2/radiobox.h b/include/wx/os2/radiobox.h index 196bbbbc0b..bc6257dfff 100644 --- a/include/wx/os2/radiobox.h +++ b/include/wx/os2/radiobox.h @@ -99,10 +99,26 @@ public: ,const wxString& rsName = wxRadioBoxNameStr ); - void Command(wxCommandEvent& rEvent); - bool ContainsHWND(WXHWND hWnd) const; + // Enabling virtual bool Enable(bool bEnable = true); virtual bool Enable(unsigned int nItem, bool bEnable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(bool bShow = true); + virtual bool Show(unsigned int nItem, bool bShow = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + void Command(wxCommandEvent& rEvent); + bool ContainsHWND(WXHWND hWnd) const; virtual WXHBRUSH OnCtlColor( WXHDC hDC ,WXHWND hWnd @@ -115,8 +131,6 @@ public: ,WXWORD wId ); void SendNotificationEvent(void); - virtual bool Show(unsigned int nItem, bool bShow = true); - virtual bool Show(bool bShow = true); MRESULT WindowProc( WXUINT uMsg ,WXWPARAM wParam ,WXLPARAM lParam diff --git a/include/wx/palmos/radiobox.h b/include/wx/palmos/radiobox.h index 16cccd278d..e2f1e7bd1c 100644 --- a/include/wx/palmos/radiobox.h +++ b/include/wx/palmos/radiobox.h @@ -85,6 +85,24 @@ public: const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); + // Enabling + virtual bool Enable(bool enable = true); + virtual bool Enable(unsigned int n, bool enable = true); + virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + + // Showing + virtual bool Show(bool show = true); + virtual bool Show(unsigned int n, bool show = true); + virtual bool IsItemShown(unsigned int WXUNUSED(n)) const + { + /* TODO */ + return true; + } + // implement the radiobox interface virtual void SetSelection(int n); virtual int GetSelection() const; @@ -92,12 +110,6 @@ public: virtual wxString GetString(unsigned int n) const; virtual void SetString(unsigned int n, const wxString& label); - virtual bool Enable(bool enable = true); - virtual bool Enable(unsigned int n, bool enable = true); - - virtual bool Show(bool show = true); - virtual bool Show(unsigned int n, bool show = true); - virtual void SetLabel(const wxString& label); virtual wxString GetLabel(); diff --git a/include/wx/radiobox.h b/include/wx/radiobox.h index 41e7014aae..655f73b2ba 100644 --- a/include/wx/radiobox.h +++ b/include/wx/radiobox.h @@ -30,11 +30,8 @@ public: // change/query the individual radio button state virtual bool Enable(unsigned int n, bool enable = true) = 0; virtual bool Show(unsigned int n, bool show = true) = 0; - - // NB: these functions are stubbed here for now but should become pure - // virtual once all ports implement them - virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const { return true; } - virtual bool IsItemShown(unsigned int WXUNUSED(n)) const { return true; } + virtual bool IsItemEnabled(unsigned int n) const = 0; + virtual bool IsItemShown(unsigned int n) const = 0; // return number of columns/rows in this radiobox unsigned int GetColumnCount() const { return m_numCols; }