From 53b6d7a29879a67a54e1f26e77a0697fecacf839 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 6 Sep 2006 17:36:22 +0000 Subject: [PATCH] Always use wxFULL_REPAINT_ON_RESIZE for generic status bar. Remove undocumented generic status bar ctor/Create. Bring status bar ctor/Create into sync with docs. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/statusbr.tex | 4 +-- include/wx/generic/statusbr.h | 42 +++++--------------------------- include/wx/mac/carbon/statusbr.h | 12 ++++----- include/wx/msw/statbr95.h | 4 +-- include/wx/statusbr.h | 2 ++ src/common/statbar.cpp | 6 +++-- src/generic/statusbr.cpp | 8 +++--- 7 files changed, 26 insertions(+), 52 deletions(-) diff --git a/docs/latex/wx/statusbr.tex b/docs/latex/wx/statusbr.tex index 261d762315..cc7a3d3b67 100644 --- a/docs/latex/wx/statusbr.tex +++ b/docs/latex/wx/statusbr.tex @@ -45,7 +45,7 @@ from an {\bf OnSize} event handler. Default constructor. -\func{}{wxStatusBar}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp +\func{}{wxStatusBar}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY},\rtfsp \param{long}{ style = wxST\_SIZEGRIP},\rtfsp \param{const wxString\& }{name = ``statusBar"}} @@ -75,7 +75,7 @@ Destructor. \membersection{wxStatusBar::Create}\label{wxstatusbarcreate} -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY},\rtfsp \param{long}{ style = wxST\_SIZEGRIP},\rtfsp \param{const wxString\& }{name = ``statusBar"}} diff --git a/include/wx/generic/statusbr.h b/include/wx/generic/statusbr.h index e7aca327b1..709e58faa6 100644 --- a/include/wx/generic/statusbr.h +++ b/include/wx/generic/statusbr.h @@ -12,36 +12,17 @@ #ifndef _WX_GENERIC_STATUSBR_H_ #define _WX_GENERIC_STATUSBR_H_ -#include "wx/defs.h" - -#if wxUSE_STATUSBAR - #include "wx/pen.h" -#include "wx/font.h" -#include "wx/statusbr.h" #include "wx/arrstr.h" -extern WXDLLEXPORT_DATA(const wxChar) wxPanelNameStr[]; - class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase { public: wxStatusBarGeneric() { Init(); } wxStatusBarGeneric(wxWindow *parent, - wxWindowID winid, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxFULL_REPAINT_ON_RESIZE, - const wxString& name = wxPanelNameStr) - { - Init(); - - Create(parent, winid, pos, size, style, name); - } - wxStatusBarGeneric(wxWindow *parent, - wxWindowID winid, - long style, - const wxString& name = wxPanelNameStr) + wxWindowID winid = wxID_ANY, + long style = wxST_SIZEGRIP, + const wxString& name = wxStatusBarNameStr) { Init(); @@ -50,18 +31,9 @@ public: virtual ~wxStatusBarGeneric(); - bool Create(wxWindow *parent, wxWindowID winid, - const wxPoint& WXUNUSED(pos) = wxDefaultPosition, - const wxSize& WXUNUSED(size) = wxDefaultSize, - long style = wxFULL_REPAINT_ON_RESIZE, - const wxString& name = wxPanelNameStr) - { - return Create(parent, winid, style, name); - } - - bool Create(wxWindow *parent, wxWindowID winid, - long style, - const wxString& name = wxPanelNameStr); + bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, + long style = wxST_SIZEGRIP, + const wxString& name = wxStatusBarNameStr); // Create status line virtual void SetFieldsCount(int number = 1, @@ -125,7 +97,5 @@ private: DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric) }; -#endif // wxUSE_STATUSBAR - #endif // _WX_GENERIC_STATUSBR_H_ diff --git a/include/wx/mac/carbon/statusbr.h b/include/wx/mac/carbon/statusbr.h index c5ecf314c3..1ff5901db2 100644 --- a/include/wx/mac/carbon/statusbr.h +++ b/include/wx/mac/carbon/statusbr.h @@ -18,15 +18,15 @@ class WXDLLEXPORT wxStatusBarMac : public wxStatusBarGeneric DECLARE_DYNAMIC_CLASS(wxStatusBarMac) wxStatusBarMac(); - wxStatusBarMac(wxWindow *parent, wxWindowID id, - long style = 0, - const wxString& name = wxPanelNameStr); + wxStatusBarMac(wxWindow *parent, wxWindowID id = wxID_ANY, + long style = wxST_SIZEGRIP, + const wxString& name = wxStatusBarNameStr); virtual ~wxStatusBarMac(); - bool Create(wxWindow *parent, wxWindowID id, - long style , - const wxString& name = wxPanelNameStr); + bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, + long style = wxST_SIZEGRIP, + const wxString& name = wxStatusBarNameStr); virtual void DrawFieldText(wxDC& dc, int i); virtual void DrawField(wxDC& dc, int i); diff --git a/include/wx/msw/statbr95.h b/include/wx/msw/statbr95.h index e611e4a00a..afa3db8486 100644 --- a/include/wx/msw/statbr95.h +++ b/include/wx/msw/statbr95.h @@ -22,7 +22,7 @@ public: wxStatusBar95(wxWindow *parent, wxWindowID id = wxID_ANY, long style = wxST_SIZEGRIP, - const wxString& name = wxEmptyString) + const wxString& name = wxStatusBarNameStr) { (void)Create(parent, id, style, name); } @@ -30,7 +30,7 @@ public: bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, long style = wxST_SIZEGRIP, - const wxString& name = wxEmptyString); + const wxString& name = wxStatusBarNameStr); virtual ~wxStatusBar95(); diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index cb07ac1fd1..3c892013ad 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -20,6 +20,8 @@ #include "wx/list.h" #include "wx/dynarray.h" +extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxStatusBarNameStr[]; + WX_DECLARE_LIST(wxString, wxListString); // ---------------------------------------------------------------------------- diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index 8e51e041ba..e1c4fd3dff 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -24,17 +24,19 @@ #pragma hdrstop #endif +#if wxUSE_STATUSBAR + #include "wx/statusbr.h" #ifndef WX_PRECOMP #include "wx/frame.h" #endif //WX_PRECOMP -#if wxUSE_STATUSBAR - #include "wx/listimpl.cpp" WX_DEFINE_LIST(wxListString) +const wxChar wxStatusBarNameStr[] = wxT("statusBar"); + // ============================================================================ // wxStatusBarBase implementation // ============================================================================ diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 281be6f0fd..b963470a67 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -21,14 +21,13 @@ #include "wx/statusbr.h" #ifndef WX_PRECOMP - #include "wx/frame.h" #include "wx/settings.h" #include "wx/dcclient.h" #endif #ifdef __WXGTK20__ -#include "wx/gtk/private.h" -#include "wx/gtk/win_gtk.h" + #include + #include "wx/gtk/win_gtk.h" #endif // we only have to do it here when we use wxStatusBarGeneric in addition to the @@ -67,9 +66,10 @@ bool wxStatusBarGeneric::Create(wxWindow *parent, long style, const wxString& name) { + style |= wxTAB_TRAVERSAL | wxFULL_REPAINT_ON_RESIZE; if ( !wxWindow::Create(parent, id, wxDefaultPosition, wxDefaultSize, - style | wxTAB_TRAVERSAL, name) ) + style, name) ) return false; // The status bar should have a themed background -- 2.45.2