]> git.saurik.com Git - wxWidgets.git/commitdiff
added default parameter values to the overloaded Show() and Enable() versions
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Jun 2002 18:09:20 +0000 (18:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Jun 2002 18:09:20 +0000 (18:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

14 files changed:
include/wx/gtk/button.h
include/wx/gtk/checkbox.h
include/wx/gtk/radiobox.h
include/wx/gtk/radiobut.h
include/wx/gtk/textctrl.h
include/wx/gtk1/button.h
include/wx/gtk1/checkbox.h
include/wx/gtk1/radiobox.h
include/wx/gtk1/radiobut.h
include/wx/gtk1/textctrl.h
include/wx/mac/radiobox.h
include/wx/motif/radiobox.h
include/wx/msw/radiobox.h
include/wx/x11/textctrl.h

index c239f5b7a1f48b6db22e6987643277291cc7e0e8..0fb15ad03167f2dc78912e4bdc4324e51bd47138 100644 (file)
@@ -1,10 +1,10 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        button.h
+// Name:        wx/gtk/button.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef __GTKBUTTONH__
@@ -39,7 +39,7 @@ class wxButton: public wxControl
 {
 public:
     wxButton();
-    inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
+    wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
            const wxValidator& validator = wxDefaultValidator,
@@ -47,23 +47,25 @@ public:
     {
       Create(parent, id, label, pos, size, style, validator, name);
     }
-    ~wxButton();
+    virtual ~wxButton();
+
     bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxButtonNameStr);
+
     virtual void SetDefault();
-    void SetLabel( const wxString &label );
-    bool Enable( bool enable );
+    virtual void SetLabel( const wxString &label );
+    virtual bool Enable( bool enable = TRUE );
 
     static wxSize GetDefaultSize();
-    
+
     // implementation
     // --------------
-  
-    void ApplyWidgetStyle();    
-    
+
+    void ApplyWidgetStyle();
+
 protected:
     virtual wxSize DoGetBestSize() const;
 
index 0e8cf389b1d858cbabf30a55e5af310b83ed21f7..408c86041349401c19c1d454560637435f4343cf 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        checkbox.h
+// Name:        wx/gtk/checkbox.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
@@ -42,8 +42,8 @@ public:
     void SetValue( bool state );
     bool GetValue() const;
 
-    void SetLabel( const wxString& label );
-    bool Enable( bool enable );
+    virtual void SetLabel( const wxString& label );
+    virtual bool Enable( bool enable = TRUE );
 
     // implementation
     // --------------
@@ -54,7 +54,7 @@ public:
 
     GtkWidget *m_widgetCheckbox;
     GtkWidget *m_widgetLabel;
-    
+
     bool       m_blockEvent;
 
 protected:
index d1c29dd7bde5a195fb65ec7fc8ede4657b21b50e..dc3792341a25fe8958c708aff6eb66c35d22d171 100644 (file)
@@ -1,10 +1,10 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        radiobox.h
+// Name:        wx/gtk/radiobox.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:           wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -42,7 +42,7 @@ public:
         Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
     }
 
-    ~wxRadioBox();
+    virtual ~wxRadioBox();
     bool Create(wxWindow *parent,
                 wxWindowID id,
                 const wxString& title,
@@ -81,10 +81,10 @@ public:
 #endif // WXWIN_COMPATIBILITY_2_2
 
     // we have to override those to avoid virtual function name hiding
-    wxString GetLabel() const { return wxControl::GetLabel(); }
-    void SetLabel( const wxString& label );
-    bool Show( bool show );
-    bool Enable( bool enable );
+    virtual wxString GetLabel() const { return wxControl::GetLabel(); }
+    virtual void SetLabel( const wxString& label );
+    virtual bool Show( bool show = TRUE );
+    virtual bool Enable( bool enable = TRUE );
 
     // implementation
     // --------------
index ef01bd838bb7fd70b7d222322da01841e23e1d14..32d1a9e189425cb7447849c15291e12e77095ebc 100644 (file)
@@ -1,10 +1,10 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        radiobut.h
+// Name:        wx/gtk/radiobut.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -47,7 +47,7 @@ public:
     virtual void SetLabel(const wxString& label);
     virtual void SetValue(bool val);
     virtual bool GetValue() const;
-    virtual bool Enable( bool enable );
+    virtual bool Enable( bool enable = TRUE );
 
     // implementation
 
index 34df4e683955ed14a4513af698039131327aa4d3..4ecb366c8060992435bf69bb3570d7ef6dc46aca 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        textctrl.h
+// Name:        wx/gtk/textctrl.h
 // Purpose:
 // Author:      Robert Roebling
 // Created:     01/02/97
     #pragma interface "textctrl.h"
 #endif
 
-//-----------------------------------------------------------------------------
-// classes
-//-----------------------------------------------------------------------------
-
-class wxTextCtrl;
-
 //-----------------------------------------------------------------------------
 // wxTextCtrl
 //-----------------------------------------------------------------------------
@@ -114,7 +108,7 @@ public:
     virtual void SetSelection(long from, long to);
     virtual void SetEditable(bool editable);
 
-    virtual bool Enable( bool enable );
+    virtual bool Enable( bool enable = TRUE );
 
     // Implementation from now on
     void OnDropFiles( wxDropFilesEvent &event );
index c239f5b7a1f48b6db22e6987643277291cc7e0e8..0fb15ad03167f2dc78912e4bdc4324e51bd47138 100644 (file)
@@ -1,10 +1,10 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        button.h
+// Name:        wx/gtk/button.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef __GTKBUTTONH__
@@ -39,7 +39,7 @@ class wxButton: public wxControl
 {
 public:
     wxButton();
-    inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
+    wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
            const wxValidator& validator = wxDefaultValidator,
@@ -47,23 +47,25 @@ public:
     {
       Create(parent, id, label, pos, size, style, validator, name);
     }
-    ~wxButton();
+    virtual ~wxButton();
+
     bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
            const wxValidator& validator = wxDefaultValidator,
            const wxString& name = wxButtonNameStr);
+
     virtual void SetDefault();
-    void SetLabel( const wxString &label );
-    bool Enable( bool enable );
+    virtual void SetLabel( const wxString &label );
+    virtual bool Enable( bool enable = TRUE );
 
     static wxSize GetDefaultSize();
-    
+
     // implementation
     // --------------
-  
-    void ApplyWidgetStyle();    
-    
+
+    void ApplyWidgetStyle();
+
 protected:
     virtual wxSize DoGetBestSize() const;
 
index 0e8cf389b1d858cbabf30a55e5af310b83ed21f7..408c86041349401c19c1d454560637435f4343cf 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        checkbox.h
+// Name:        wx/gtk/checkbox.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
@@ -42,8 +42,8 @@ public:
     void SetValue( bool state );
     bool GetValue() const;
 
-    void SetLabel( const wxString& label );
-    bool Enable( bool enable );
+    virtual void SetLabel( const wxString& label );
+    virtual bool Enable( bool enable = TRUE );
 
     // implementation
     // --------------
@@ -54,7 +54,7 @@ public:
 
     GtkWidget *m_widgetCheckbox;
     GtkWidget *m_widgetLabel;
-    
+
     bool       m_blockEvent;
 
 protected:
index d1c29dd7bde5a195fb65ec7fc8ede4657b21b50e..dc3792341a25fe8958c708aff6eb66c35d22d171 100644 (file)
@@ -1,10 +1,10 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        radiobox.h
+// Name:        wx/gtk/radiobox.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:           wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -42,7 +42,7 @@ public:
         Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
     }
 
-    ~wxRadioBox();
+    virtual ~wxRadioBox();
     bool Create(wxWindow *parent,
                 wxWindowID id,
                 const wxString& title,
@@ -81,10 +81,10 @@ public:
 #endif // WXWIN_COMPATIBILITY_2_2
 
     // we have to override those to avoid virtual function name hiding
-    wxString GetLabel() const { return wxControl::GetLabel(); }
-    void SetLabel( const wxString& label );
-    bool Show( bool show );
-    bool Enable( bool enable );
+    virtual wxString GetLabel() const { return wxControl::GetLabel(); }
+    virtual void SetLabel( const wxString& label );
+    virtual bool Show( bool show = TRUE );
+    virtual bool Enable( bool enable = TRUE );
 
     // implementation
     // --------------
index ef01bd838bb7fd70b7d222322da01841e23e1d14..32d1a9e189425cb7447849c15291e12e77095ebc 100644 (file)
@@ -1,10 +1,10 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        radiobut.h
+// Name:        wx/gtk/radiobut.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
@@ -47,7 +47,7 @@ public:
     virtual void SetLabel(const wxString& label);
     virtual void SetValue(bool val);
     virtual bool GetValue() const;
-    virtual bool Enable( bool enable );
+    virtual bool Enable( bool enable = TRUE );
 
     // implementation
 
index 34df4e683955ed14a4513af698039131327aa4d3..4ecb366c8060992435bf69bb3570d7ef6dc46aca 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        textctrl.h
+// Name:        wx/gtk/textctrl.h
 // Purpose:
 // Author:      Robert Roebling
 // Created:     01/02/97
     #pragma interface "textctrl.h"
 #endif
 
-//-----------------------------------------------------------------------------
-// classes
-//-----------------------------------------------------------------------------
-
-class wxTextCtrl;
-
 //-----------------------------------------------------------------------------
 // wxTextCtrl
 //-----------------------------------------------------------------------------
@@ -114,7 +108,7 @@ public:
     virtual void SetSelection(long from, long to);
     virtual void SetEditable(bool editable);
 
-    virtual bool Enable( bool enable );
+    virtual bool Enable( bool enable = TRUE );
 
     // Implementation from now on
     void OnDropFiles( wxDropFilesEvent &event );
index 632495c5df69d2a2ca1ee33396bb9c0f5822dc37..21910dc6f917d134512365dcea91f0d39a7ec713 100644 (file)
@@ -58,10 +58,10 @@ public:
     virtual int GetRowCount() const ;
 
 
-       bool Enable(bool enable);
-       wxString GetLabel() const;
-       void SetLabel(const wxString& label) ;
-       bool Show(bool show);
+       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);
index 09ad45314c8f91696af09279b98dacf61092df58..591f88e21c4d398c393969b3d2d52a83e0fbffce 100644 (file)
@@ -26,10 +26,10 @@ class WXDLLEXPORT wxBitmap ;
 class WXDLLEXPORT wxRadioBox : public wxControl
 {
     DECLARE_DYNAMIC_CLASS(wxRadioBox)
-        
+
 public:
     wxRadioBox();
-    
+
     wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
         const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
         int n = 0, const wxString choices[] = NULL,
@@ -38,37 +38,37 @@ public:
     {
         Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
     }
-    
+
     ~wxRadioBox();
-    
+
     bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
         const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
         int n = 0, const wxString choices[] = NULL,
         int majorDim = 0, long style = wxRA_HORIZONTAL,
         const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
-    
+
     int FindString(const wxString& s) const;
     void SetSelection(int N);
     int GetSelection() const;
     wxString GetString(int N) const;
-    
+
     void SetLabel(const wxString& label) { wxControl::SetLabel(label); };
     void SetLabel(int item, const wxString& label) ;
     wxString GetLabel(int item) const;
     wxString GetLabel() const { return wxControl::GetLabel(); };
-    bool Enable(bool enable);
+    virtual bool Enable(bool enable = TRUE);
     void Enable(int item, bool enable);
     void Show(int item, bool show) ;
-    bool Show(bool show) ;
-    
+    virtual bool Show(bool show = TRUE) ;
+
     virtual wxString GetStringSelection() const;
     virtual bool SetStringSelection(const wxString& s);
     virtual int GetCount() const { return m_noItems; } ;
     void Command(wxCommandEvent& event);
-    
+
     int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
     void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
-    
+
     // Implementation
     virtual void ChangeFont(bool keepOriginalSize = TRUE);
     virtual void ChangeBackgroundColour();
@@ -78,19 +78,19 @@ public:
     WXWidget GetFrameWidget() const { return m_frameWidget; }
     inline WXWidget* GetRadioButtons() const { return m_radioButtons; }
     inline void SetSel(int i) { m_selectedButton = i; }
-    
+
 protected:
     int               m_majorDim ;
     int               m_noItems;
     int               m_noRowsOrCols;
     int               m_selectedButton;
-    
+
     WXWidget          m_formWidget;
     WXWidget          m_labelWidget;
     WXWidget          m_frameWidget;
     WXWidget*         m_radioButtons;
     wxString*         m_radioButtonLabels;
-    
+
     virtual void DoSetSize(int x, int y,
         int width, int height,
         int sizeFlags = wxSIZE_AUTO);
index f97606b44a6d33243d85d689cdebdf510fdf69c8..1ba95def67121e984af75c63af8f8e11114723d7 100644 (file)
@@ -66,9 +66,9 @@ public:
     virtual int GetColumnCount() const;
     virtual int GetRowCount() const;
 
-    bool Show(bool show);
+    virtual bool Show(bool show = TRUE);
     void SetFocus();
-    bool Enable(bool enable);
+    virtual bool Enable(bool enable = TRUE);
     void SetLabelFont(const wxFont& WXUNUSED(font)) {};
     void SetButtonFont(const wxFont& font) { SetFont(font); }
 
index 37348e0cdd0929306b86763b7c258d47e8039f8c..61d313a51efe63fd9ffd5deb7243974b74cf199d 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        textctrl.h
+// Name:        wx/x11/textctrl.h
 // Purpose:
 // Author:      Robert Roebling
 // Created:     01/02/97
@@ -43,9 +43,9 @@ class wxSourceUndoStep: public wxObject
 {
 public:
     wxSourceUndoStep( wxSourceUndo type, int y1, int y2, wxTextCtrl *owner );
-    
+
     void Undo();
-    
+
     wxSourceUndo    m_type;
     int             m_y1;
     int             m_y2;
@@ -63,7 +63,7 @@ public:
     {
         m_text = text;
     }
-    
+
     wxString       m_text;
 };
 
@@ -102,12 +102,12 @@ public:
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString &name = wxTextCtrlNameStr);
-               
+
     // required for scrolling with wxScrollHelper
     // ------------------------------------------
 
     virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
-    
+
     // implement base class pure virtuals
     // ----------------------------------
 
@@ -123,11 +123,11 @@ public:
 
     // more readable flag testing methods
     // ----------------------------------
-    
+
     bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); }
     bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
     bool WrapLines() const { return FALSE; }
-    
+
     // If the return values from and to are the same, there is no selection.
     virtual void GetSelection(long* from, long* to) const;
 
@@ -182,7 +182,7 @@ public:
     virtual void SetSelection(long from, long to);
     virtual void SetEditable(bool editable);
 
-    virtual bool Enable( bool enable );
+    virtual bool Enable( bool enable = TRUE );
 
     void OnCut(wxCommandEvent& event);
     void OnCopy(wxCommandEvent& event);
@@ -210,36 +210,36 @@ public:
     virtual bool ScrollPages(int pages);
 
     // not part of the wxTextCtrl API from now on..
-    
+
     void SetLanguage( wxSourceLanguage lang = wxSOURCE_LANG_NONE );
 
     void Delete();
     void DeleteLine();
-    
+
     void Indent();
     void Unindent();
-    
+
     bool HasSelection();
     void ClearSelection();
-    
+
     int GetCursorX()                        { return m_cursorX; }
     int GetCursorY()                        { return m_cursorY; }
     bool IsModified()                       { return m_modified; }
     bool OverwriteMode()                    { return m_overwrite; }
 
     // implementation from now on...
-    
+
     int PosToPixel( int line, int pos );
     int PixelToPos( int line, int pixel );
 
     void SearchForBrackets();
-    
+
     void DoChar( char c );
     void DoBack();
     void DoDelete();
     void DoReturn();
     void DoDClick();
-    
+
     wxString GetNextToken( wxString &line, size_t &pos );
 
     void DrawLinePart( wxDC &dc, int x, int y, const wxString &toDraw, const wxString &origin, const wxColour &colour);
@@ -251,12 +251,12 @@ public:
     void OnIdle( wxIdleEvent &event );
     void OnSetFocus( wxFocusEvent& event );
     void OnKillFocus( wxFocusEvent& event );
-    
+
     void RefreshLine( int n );
     void RefreshDown( int n );
     void MoveCursor( int new_x, int new_y, bool shift = FALSE, bool centre = FALSE );
     void MyAdjustScrollbars();
-    
+
 protected:
     // common part of all ctors
     void Init();
@@ -271,38 +271,38 @@ protected:
     wxColour           m_sourceColour;
     wxColour           m_commentColour;
     wxColour           m_stringColour;
-    
+
     int                m_cursorX;
     int                m_cursorY;
-    
+
     int                m_selStartX,m_selStartY;
     int                m_selEndX,m_selEndY;
-    
+
     int                m_lineHeight;
     int                m_charWidth;
-    
+
     int                m_longestLine;
-    
+
     bool               m_overwrite;
     bool               m_modified;
     bool               m_editable;
     bool               m_ignoreInput;
-    
+
     wxArrayString      m_keywords;
     wxColour           m_keywordColour;
-    
+
     wxArrayString      m_defines;
     wxColour           m_defineColour;
-    
+
     wxArrayString      m_variables;
     wxColour           m_variableColour;
-    
+
     wxSourceLanguage   m_lang;
-    
+
     wxList             m_undos;
-    
+
     bool               m_capturing;
-    
+
     int                m_bracketX;
     int                m_bracketY;