added default parameter values to the overloaded Show() and Enable() versions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-06-04 18:09:20 +00:00
parent db1a42b874
commit 6b0d8a01d1
14 changed files with 106 additions and 114 deletions

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: button.h // Name: wx/gtk/button.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -39,7 +39,7 @@ class wxButton: public wxControl
{ {
public: public:
wxButton(); wxButton();
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, wxButton(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,
@@ -47,15 +47,17 @@ public:
{ {
Create(parent, id, label, pos, size, style, validator, name); Create(parent, id, label, pos, size, style, validator, name);
} }
~wxButton(); virtual ~wxButton();
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 = wxButtonNameStr); const wxString& name = wxButtonNameStr);
virtual void SetDefault(); virtual void SetDefault();
void SetLabel( const wxString &label ); virtual void SetLabel( const wxString &label );
bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
static wxSize GetDefaultSize(); static wxSize GetDefaultSize();

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: checkbox.h // Name: wx/gtk/checkbox.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -42,8 +42,8 @@ public:
void SetValue( bool state ); void SetValue( bool state );
bool GetValue() const; bool GetValue() const;
void SetLabel( const wxString& label ); virtual void SetLabel( const wxString& label );
bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
// implementation // implementation
// -------------- // --------------

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: radiobox.h // Name: wx/gtk/radiobox.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -42,7 +42,7 @@ public:
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
} }
~wxRadioBox(); virtual ~wxRadioBox();
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxString& title, const wxString& title,
@@ -81,10 +81,10 @@ public:
#endif // WXWIN_COMPATIBILITY_2_2 #endif // WXWIN_COMPATIBILITY_2_2
// we have to override those to avoid virtual function name hiding // we have to override those to avoid virtual function name hiding
wxString GetLabel() const { return wxControl::GetLabel(); } virtual wxString GetLabel() const { return wxControl::GetLabel(); }
void SetLabel( const wxString& label ); virtual void SetLabel( const wxString& label );
bool Show( bool show ); virtual bool Show( bool show = TRUE );
bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
// implementation // implementation
// -------------- // --------------

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: radiobut.h // Name: wx/gtk/radiobut.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -47,7 +47,7 @@ public:
virtual void SetLabel(const wxString& label); virtual void SetLabel(const wxString& label);
virtual void SetValue(bool val); virtual void SetValue(bool val);
virtual bool GetValue() const; virtual bool GetValue() const;
virtual bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
// implementation // implementation

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: textctrl.h // Name: wx/gtk/textctrl.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Created: 01/02/97 // Created: 01/02/97
@@ -15,12 +15,6 @@
#pragma interface "textctrl.h" #pragma interface "textctrl.h"
#endif #endif
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxTextCtrl;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxTextCtrl // wxTextCtrl
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -114,7 +108,7 @@ public:
virtual void SetSelection(long from, long to); virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable); virtual void SetEditable(bool editable);
virtual bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
// Implementation from now on // Implementation from now on
void OnDropFiles( wxDropFilesEvent &event ); void OnDropFiles( wxDropFilesEvent &event );

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: button.h // Name: wx/gtk/button.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -39,7 +39,7 @@ class wxButton: public wxControl
{ {
public: public:
wxButton(); wxButton();
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label, wxButton(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,
@@ -47,15 +47,17 @@ public:
{ {
Create(parent, id, label, pos, size, style, validator, name); Create(parent, id, label, pos, size, style, validator, name);
} }
~wxButton(); virtual ~wxButton();
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 = wxButtonNameStr); const wxString& name = wxButtonNameStr);
virtual void SetDefault(); virtual void SetDefault();
void SetLabel( const wxString &label ); virtual void SetLabel( const wxString &label );
bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
static wxSize GetDefaultSize(); static wxSize GetDefaultSize();

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: checkbox.h // Name: wx/gtk/checkbox.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -42,8 +42,8 @@ public:
void SetValue( bool state ); void SetValue( bool state );
bool GetValue() const; bool GetValue() const;
void SetLabel( const wxString& label ); virtual void SetLabel( const wxString& label );
bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
// implementation // implementation
// -------------- // --------------

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: radiobox.h // Name: wx/gtk/radiobox.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -42,7 +42,7 @@ public:
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
} }
~wxRadioBox(); virtual ~wxRadioBox();
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxString& title, const wxString& title,
@@ -81,10 +81,10 @@ public:
#endif // WXWIN_COMPATIBILITY_2_2 #endif // WXWIN_COMPATIBILITY_2_2
// we have to override those to avoid virtual function name hiding // we have to override those to avoid virtual function name hiding
wxString GetLabel() const { return wxControl::GetLabel(); } virtual wxString GetLabel() const { return wxControl::GetLabel(); }
void SetLabel( const wxString& label ); virtual void SetLabel( const wxString& label );
bool Show( bool show ); virtual bool Show( bool show = TRUE );
bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
// implementation // implementation
// -------------- // --------------

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: radiobut.h // Name: wx/gtk/radiobut.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -47,7 +47,7 @@ public:
virtual void SetLabel(const wxString& label); virtual void SetLabel(const wxString& label);
virtual void SetValue(bool val); virtual void SetValue(bool val);
virtual bool GetValue() const; virtual bool GetValue() const;
virtual bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
// implementation // implementation

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: textctrl.h // Name: wx/gtk/textctrl.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Created: 01/02/97 // Created: 01/02/97
@@ -15,12 +15,6 @@
#pragma interface "textctrl.h" #pragma interface "textctrl.h"
#endif #endif
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class wxTextCtrl;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxTextCtrl // wxTextCtrl
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -114,7 +108,7 @@ public:
virtual void SetSelection(long from, long to); virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable); virtual void SetEditable(bool editable);
virtual bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
// Implementation from now on // Implementation from now on
void OnDropFiles( wxDropFilesEvent &event ); void OnDropFiles( wxDropFilesEvent &event );

View File

@@ -58,10 +58,10 @@ public:
virtual int GetRowCount() const ; virtual int GetRowCount() const ;
bool Enable(bool enable); virtual bool Enable(bool enable = TRUE);
wxString GetLabel() const; virtual wxString GetLabel() const;
void SetLabel(const wxString& label) ; virtual void SetLabel(const wxString& label) ;
bool Show(bool show); virtual bool Show(bool show = TRUE);
// Other external functions // Other external functions
void Command(wxCommandEvent& event); void Command(wxCommandEvent& event);

View File

@@ -56,10 +56,10 @@ public:
void SetLabel(int item, const wxString& label) ; void SetLabel(int item, const wxString& label) ;
wxString GetLabel(int item) const; wxString GetLabel(int item) const;
wxString GetLabel() const { return wxControl::GetLabel(); }; wxString GetLabel() const { return wxControl::GetLabel(); };
bool Enable(bool enable); virtual bool Enable(bool enable = TRUE);
void Enable(int item, bool enable); void Enable(int item, bool enable);
void Show(int item, bool show) ; void Show(int item, bool show) ;
bool Show(bool show) ; virtual bool Show(bool show = TRUE) ;
virtual wxString GetStringSelection() const; virtual wxString GetStringSelection() const;
virtual bool SetStringSelection(const wxString& s); virtual bool SetStringSelection(const wxString& s);

View File

@@ -66,9 +66,9 @@ public:
virtual int GetColumnCount() const; virtual int GetColumnCount() const;
virtual int GetRowCount() const; virtual int GetRowCount() const;
bool Show(bool show); virtual bool Show(bool show = TRUE);
void SetFocus(); void SetFocus();
bool Enable(bool enable); virtual bool Enable(bool enable = TRUE);
void SetLabelFont(const wxFont& WXUNUSED(font)) {}; void SetLabelFont(const wxFont& WXUNUSED(font)) {};
void SetButtonFont(const wxFont& font) { SetFont(font); } void SetButtonFont(const wxFont& font) { SetFont(font); }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: textctrl.h // Name: wx/x11/textctrl.h
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Created: 01/02/97 // Created: 01/02/97
@@ -182,7 +182,7 @@ public:
virtual void SetSelection(long from, long to); virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable); virtual void SetEditable(bool editable);
virtual bool Enable( bool enable ); virtual bool Enable( bool enable = TRUE );
void OnCut(wxCommandEvent& event); void OnCut(wxCommandEvent& event);
void OnCopy(wxCommandEvent& event); void OnCopy(wxCommandEvent& event);