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
This commit is contained in:
Paul Cornett
2006-09-06 17:36:22 +00:00
parent 84d1cd430f
commit 53b6d7a298
7 changed files with 26 additions and 52 deletions

View File

@@ -45,7 +45,7 @@ from an {\bf OnSize} event handler.
Default constructor. 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{long}{ style = wxST\_SIZEGRIP},\rtfsp
\param{const wxString\& }{name = ``statusBar"}} \param{const wxString\& }{name = ``statusBar"}}
@@ -75,7 +75,7 @@ Destructor.
\membersection{wxStatusBar::Create}\label{wxstatusbarcreate} \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{long}{ style = wxST\_SIZEGRIP},\rtfsp
\param{const wxString\& }{name = ``statusBar"}} \param{const wxString\& }{name = ``statusBar"}}

View File

@@ -12,36 +12,17 @@
#ifndef _WX_GENERIC_STATUSBR_H_ #ifndef _WX_GENERIC_STATUSBR_H_
#define _WX_GENERIC_STATUSBR_H_ #define _WX_GENERIC_STATUSBR_H_
#include "wx/defs.h"
#if wxUSE_STATUSBAR
#include "wx/pen.h" #include "wx/pen.h"
#include "wx/font.h"
#include "wx/statusbr.h"
#include "wx/arrstr.h" #include "wx/arrstr.h"
extern WXDLLEXPORT_DATA(const wxChar) wxPanelNameStr[];
class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
{ {
public: public:
wxStatusBarGeneric() { Init(); } wxStatusBarGeneric() { Init(); }
wxStatusBarGeneric(wxWindow *parent, wxStatusBarGeneric(wxWindow *parent,
wxWindowID winid, wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition, long style = wxST_SIZEGRIP,
const wxSize& size = wxDefaultSize, const wxString& name = wxStatusBarNameStr)
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)
{ {
Init(); Init();
@@ -50,18 +31,9 @@ public:
virtual ~wxStatusBarGeneric(); virtual ~wxStatusBarGeneric();
bool Create(wxWindow *parent, wxWindowID winid, bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY,
const wxPoint& WXUNUSED(pos) = wxDefaultPosition, long style = wxST_SIZEGRIP,
const wxSize& WXUNUSED(size) = wxDefaultSize, const wxString& name = wxStatusBarNameStr);
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);
// Create status line // Create status line
virtual void SetFieldsCount(int number = 1, virtual void SetFieldsCount(int number = 1,
@@ -125,7 +97,5 @@ private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric) DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric)
}; };
#endif // wxUSE_STATUSBAR
#endif #endif
// _WX_GENERIC_STATUSBR_H_ // _WX_GENERIC_STATUSBR_H_

View File

@@ -18,15 +18,15 @@ class WXDLLEXPORT wxStatusBarMac : public wxStatusBarGeneric
DECLARE_DYNAMIC_CLASS(wxStatusBarMac) DECLARE_DYNAMIC_CLASS(wxStatusBarMac)
wxStatusBarMac(); wxStatusBarMac();
wxStatusBarMac(wxWindow *parent, wxWindowID id, wxStatusBarMac(wxWindow *parent, wxWindowID id = wxID_ANY,
long style = 0, long style = wxST_SIZEGRIP,
const wxString& name = wxPanelNameStr); const wxString& name = wxStatusBarNameStr);
virtual ~wxStatusBarMac(); virtual ~wxStatusBarMac();
bool Create(wxWindow *parent, wxWindowID id, bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
long style , long style = wxST_SIZEGRIP,
const wxString& name = wxPanelNameStr); const wxString& name = wxStatusBarNameStr);
virtual void DrawFieldText(wxDC& dc, int i); virtual void DrawFieldText(wxDC& dc, int i);
virtual void DrawField(wxDC& dc, int i); virtual void DrawField(wxDC& dc, int i);

View File

@@ -22,7 +22,7 @@ public:
wxStatusBar95(wxWindow *parent, wxStatusBar95(wxWindow *parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
long style = wxST_SIZEGRIP, long style = wxST_SIZEGRIP,
const wxString& name = wxEmptyString) const wxString& name = wxStatusBarNameStr)
{ {
(void)Create(parent, id, style, name); (void)Create(parent, id, style, name);
} }
@@ -30,7 +30,7 @@ public:
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
long style = wxST_SIZEGRIP, long style = wxST_SIZEGRIP,
const wxString& name = wxEmptyString); const wxString& name = wxStatusBarNameStr);
virtual ~wxStatusBar95(); virtual ~wxStatusBar95();

View File

@@ -20,6 +20,8 @@
#include "wx/list.h" #include "wx/list.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"
extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxStatusBarNameStr[];
WX_DECLARE_LIST(wxString, wxListString); WX_DECLARE_LIST(wxString, wxListString);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -24,17 +24,19 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_STATUSBAR
#include "wx/statusbr.h" #include "wx/statusbr.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/frame.h" #include "wx/frame.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#if wxUSE_STATUSBAR
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"
WX_DEFINE_LIST(wxListString) WX_DEFINE_LIST(wxListString)
const wxChar wxStatusBarNameStr[] = wxT("statusBar");
// ============================================================================ // ============================================================================
// wxStatusBarBase implementation // wxStatusBarBase implementation
// ============================================================================ // ============================================================================

View File

@@ -21,14 +21,13 @@
#include "wx/statusbr.h" #include "wx/statusbr.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
#endif #endif
#ifdef __WXGTK20__ #ifdef __WXGTK20__
#include "wx/gtk/private.h" #include <gtk/gtk.h>
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"
#endif #endif
// we only have to do it here when we use wxStatusBarGeneric in addition to the // 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, long style,
const wxString& name) const wxString& name)
{ {
style |= wxTAB_TRAVERSAL | wxFULL_REPAINT_ON_RESIZE;
if ( !wxWindow::Create(parent, id, if ( !wxWindow::Create(parent, id,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
style | wxTAB_TRAVERSAL, name) ) style, name) )
return false; return false;
// The status bar should have a themed background // The status bar should have a themed background