From 1de1196ab3ad5c0f143870b1bf5568adcf383424 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 11 Mar 2005 02:13:30 +0000 Subject: [PATCH] gave default value of wxID_ANY to id parameter of wxStaticLine ctor as nobody uses anything else for it anyhow git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/statline.tex | 4 +-- include/wx/cocoa/statline.h | 4 +-- include/wx/generic/statline.h | 4 +-- include/wx/gtk/statline.h | 52 ++++++++++++++----------------- include/wx/gtk1/statline.h | 52 ++++++++++++++----------------- include/wx/mac/carbon/statline.h | 10 +++--- include/wx/mac/classic/statline.h | 10 +++--- include/wx/msw/statline.h | 12 +++---- include/wx/os2/statline.h | 4 +-- include/wx/palmos/statline.h | 4 +-- include/wx/univ/statline.h | 4 +-- 11 files changed, 76 insertions(+), 84 deletions(-) diff --git a/docs/latex/wx/statline.tex b/docs/latex/wx/statline.tex index 3fe2b22681..b43505a9dc 100644 --- a/docs/latex/wx/statline.tex +++ b/docs/latex/wx/statline.tex @@ -34,7 +34,7 @@ groups of controls. The line may be only vertical or horizontal. Default constructor. -\func{}{wxStaticLine}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp +\func{}{wxStaticLine}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY},\rtfsp \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp \param{long}{ style = wxLI\_HORIZONTAL}, \param{const wxString\& }{name = ``staticLine"}} @@ -61,7 +61,7 @@ whether the line if horizontal or vertical) is ignored.} \membersection{wxStaticLine::Create}\label{wxstaticlinecreate} -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY},\rtfsp \param{const wxPoint\&}{ pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp \param{long}{ style = 0}, \param{const wxString\& }{name = ``staticLine"}} diff --git a/include/wx/cocoa/statline.h b/include/wx/cocoa/statline.h index 1b9e206455..9c69a65ea8 100644 --- a/include/wx/cocoa/statline.h +++ b/include/wx/cocoa/statline.h @@ -27,7 +27,7 @@ class WXDLLEXPORT wxStaticLine: public wxStaticLineBase// , protected wxCocoaNSB // ------------------------------------------------------------------------ public: wxStaticLine() { } - wxStaticLine(wxWindow *parent, wxWindowID winid, + wxStaticLine(wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticTextNameStr) @@ -35,7 +35,7 @@ public: Create(parent, winid, pos, size, style, name); } - bool Create(wxWindow *parent, wxWindowID winid, + bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticTextNameStr); diff --git a/include/wx/generic/statline.h b/include/wx/generic/statline.h index 3ba19ec310..a2993d8f84 100644 --- a/include/wx/generic/statline.h +++ b/include/wx/generic/statline.h @@ -30,7 +30,7 @@ public: wxStaticLine() { m_statbox = NULL; } wxStaticLine( wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, @@ -42,7 +42,7 @@ public: virtual ~wxStaticLine(); bool Create( wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, diff --git a/include/wx/gtk/statline.h b/include/wx/gtk/statline.h index 803ae2018a..aec5372856 100644 --- a/include/wx/gtk/statline.h +++ b/include/wx/gtk/statline.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: statline.h +// Name: wx/gtk/statline.h // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -12,47 +12,43 @@ #define __GTKSTATICLINEH__ #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface + #pragma interface "statline.h" #endif #include "wx/defs.h" #if wxUSE_STATLINE -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxStaticLine; - -//----------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // wxStaticLine -//----------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- class wxStaticLine : public wxStaticLineBase { - DECLARE_DYNAMIC_CLASS(wxStaticLine) - public: wxStaticLine(); - wxStaticLine( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxLI_HORIZONTAL, const wxString &name = wxStaticTextNameStr ); - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxLI_HORIZONTAL, const wxString &name = wxStaticTextNameStr ); + wxStaticLine(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticTextNameStr); + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticTextNameStr); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - + + +private: + DECLARE_DYNAMIC_CLASS(wxStaticLine) }; -#endif - // wxUSE_STATLINE - -#endif - // __GTKSTATICLINEH__ +#endif // wxUSE_STATLINE + +#endif // __GTKSTATICLINEH__ + diff --git a/include/wx/gtk1/statline.h b/include/wx/gtk1/statline.h index 803ae2018a..aec5372856 100644 --- a/include/wx/gtk1/statline.h +++ b/include/wx/gtk1/statline.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: statline.h +// Name: wx/gtk/statline.h // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -12,47 +12,43 @@ #define __GTKSTATICLINEH__ #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface + #pragma interface "statline.h" #endif #include "wx/defs.h" #if wxUSE_STATLINE -#include "wx/object.h" -#include "wx/list.h" -#include "wx/control.h" - -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class wxStaticLine; - -//----------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // wxStaticLine -//----------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- class wxStaticLine : public wxStaticLineBase { - DECLARE_DYNAMIC_CLASS(wxStaticLine) - public: wxStaticLine(); - wxStaticLine( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxLI_HORIZONTAL, const wxString &name = wxStaticTextNameStr ); - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = wxLI_HORIZONTAL, const wxString &name = wxStaticTextNameStr ); + wxStaticLine(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint &pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticTextNameStr); + bool Create(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxLI_HORIZONTAL, + const wxString &name = wxStaticTextNameStr); static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - + + +private: + DECLARE_DYNAMIC_CLASS(wxStaticLine) }; -#endif - // wxUSE_STATLINE - -#endif - // __GTKSTATICLINEH__ +#endif // wxUSE_STATLINE + +#endif // __GTKSTATICLINEH__ + diff --git a/include/wx/mac/carbon/statline.h b/include/wx/mac/carbon/statline.h index 911e9f535c..5b78ea3708 100644 --- a/include/wx/mac/carbon/statline.h +++ b/include/wx/mac/carbon/statline.h @@ -23,14 +23,12 @@ class wxStaticBox; class WXDLLEXPORT wxStaticLine : public wxStaticLineBase { - DECLARE_DYNAMIC_CLASS(wxStaticLine) - public: // constructors and pseudo-constructors wxStaticLine() : m_statbox(NULL) { } wxStaticLine( wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, @@ -41,7 +39,7 @@ public: } bool Create( wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, @@ -51,10 +49,12 @@ public: // will want to return the main widget for m_statbox // WXWidget GetMainWidget() const; - + protected: // we implement the static line using a static box wxStaticBox *m_statbox; + + DECLARE_DYNAMIC_CLASS(wxStaticLine) }; #endif // _WX_GENERIC_STATLINE_H_ diff --git a/include/wx/mac/classic/statline.h b/include/wx/mac/classic/statline.h index 911e9f535c..5b78ea3708 100644 --- a/include/wx/mac/classic/statline.h +++ b/include/wx/mac/classic/statline.h @@ -23,14 +23,12 @@ class wxStaticBox; class WXDLLEXPORT wxStaticLine : public wxStaticLineBase { - DECLARE_DYNAMIC_CLASS(wxStaticLine) - public: // constructors and pseudo-constructors wxStaticLine() : m_statbox(NULL) { } wxStaticLine( wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, @@ -41,7 +39,7 @@ public: } bool Create( wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, @@ -51,10 +49,12 @@ public: // will want to return the main widget for m_statbox // WXWidget GetMainWidget() const; - + protected: // we implement the static line using a static box wxStaticBox *m_statbox; + + DECLARE_DYNAMIC_CLASS(wxStaticLine) }; #endif // _WX_GENERIC_STATLINE_H_ diff --git a/include/wx/msw/statline.h b/include/wx/msw/statline.h index 554bfb0151..6422b1c06a 100644 --- a/include/wx/msw/statline.h +++ b/include/wx/msw/statline.h @@ -26,9 +26,9 @@ public: wxStaticLine() { } wxStaticLine( wxWindow *parent, - wxWindowID id, - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, const wxString &name = wxStaticTextNameStr ) { @@ -36,9 +36,9 @@ public: } bool Create( wxWindow *parent, - wxWindowID id, - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, const wxString &name = wxStaticTextNameStr ); diff --git a/include/wx/os2/statline.h b/include/wx/os2/statline.h index 3b2ff75484..b092a34409 100644 --- a/include/wx/os2/statline.h +++ b/include/wx/os2/statline.h @@ -26,7 +26,7 @@ public: // constructors and pseudo-constructors wxStaticLine() { } wxStaticLine( wxWindow* pParent - ,wxWindowID vId + ,wxWindowID vId = wxID_ANY ,const wxPoint& rPos = wxDefaultPosition ,const wxSize& rSize = wxDefaultSize ,long lStyle = wxLI_HORIZONTAL @@ -37,7 +37,7 @@ public: } bool Create( wxWindow* pParent - ,wxWindowID vId + ,wxWindowID vId = wxID_ANY ,const wxPoint& rPos = wxDefaultPosition ,const wxSize& rSize = wxDefaultSize ,long lStyle = wxLI_HORIZONTAL diff --git a/include/wx/palmos/statline.h b/include/wx/palmos/statline.h index 4e11f108a1..b4941d1549 100644 --- a/include/wx/palmos/statline.h +++ b/include/wx/palmos/statline.h @@ -27,7 +27,7 @@ public: wxStaticLine() { } wxStaticLine( wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, @@ -37,7 +37,7 @@ public: } bool Create( wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, diff --git a/include/wx/univ/statline.h b/include/wx/univ/statline.h index c6419bb513..56545ae3f4 100644 --- a/include/wx/univ/statline.h +++ b/include/wx/univ/statline.h @@ -33,7 +33,7 @@ public: } wxStaticLine(wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, @@ -43,7 +43,7 @@ public: } bool Create(wxWindow *parent, - wxWindowID id, + wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxLI_HORIZONTAL, -- 2.45.2