From 3304646d0657d889ad676485a4b635e2032b0038 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Fri, 9 Jun 2006 09:51:39 +0000 Subject: [PATCH] Include wx/statusbr.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/statusbr.h | 148 ++++++++++++++++++---------------- include/wx/statusbr.h | 3 +- src/common/framecmn.cpp | 5 +- src/common/statbar.cpp | 6 +- src/generic/statusbr.cpp | 4 +- src/gtk/frame.cpp | 5 +- src/gtk/window.cpp | 2 +- src/gtk1/frame.cpp | 5 +- src/gtk1/window.cpp | 2 +- src/mac/carbon/frame.cpp | 2 +- src/mac/carbon/window.cpp | 2 +- src/mac/classic/frame.cpp | 2 +- src/mac/classic/statbrma.cpp | 9 ++- src/mac/classic/window.cpp | 2 +- src/motif/frame.cpp | 3 +- src/msw/frame.cpp | 6 +- src/msw/mdi.cpp | 4 +- src/os2/dc.cpp | 15 +--- src/os2/frame.cpp | 6 +- src/palmos/frame.cpp | 6 +- src/palmos/mdi.cpp | 4 +- src/univ/statusbr.cpp | 6 +- src/xrc/xh_statbar.cpp | 7 +- 23 files changed, 118 insertions(+), 136 deletions(-) diff --git a/include/wx/generic/statusbr.h b/include/wx/generic/statusbr.h index 06c8ec4791..e7aca327b1 100644 --- a/include/wx/generic/statusbr.h +++ b/include/wx/generic/statusbr.h @@ -12,6 +12,10 @@ #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" @@ -22,104 +26,106 @@ 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(); + 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) - { - Init(); + Create(parent, winid, pos, size, style, name); + } + wxStatusBarGeneric(wxWindow *parent, + wxWindowID winid, + long style, + const wxString& name = wxPanelNameStr) + { + Init(); - Create(parent, winid, style, name); - } + Create(parent, winid, style, name); + } - virtual ~wxStatusBarGeneric(); + 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, + 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, + long style, + const wxString& name = wxPanelNameStr); - // Create status line - virtual void SetFieldsCount(int number = 1, - const int *widths = (const int *) NULL); + // Create status line + virtual void SetFieldsCount(int number = 1, + const int *widths = (const int *) NULL); - // Set status line text - virtual void SetStatusText(const wxString& text, int number = 0); - virtual wxString GetStatusText(int number = 0) const; + // Set status line text + virtual void SetStatusText(const wxString& text, int number = 0); + virtual wxString GetStatusText(int number = 0) const; - // Set status line widths - virtual void SetStatusWidths(int n, const int widths_field[]); + // Set status line widths + virtual void SetStatusWidths(int n, const int widths_field[]); - // Get the position and size of the field's internal bounding rectangle - virtual bool GetFieldRect(int i, wxRect& rect) const; + // Get the position and size of the field's internal bounding rectangle + virtual bool GetFieldRect(int i, wxRect& rect) const; - // sets the minimal vertical size of the status bar - virtual void SetMinHeight(int height); + // sets the minimal vertical size of the status bar + virtual void SetMinHeight(int height); - virtual int GetBorderX() const { return m_borderX; } - virtual int GetBorderY() const { return m_borderY; } + virtual int GetBorderX() const { return m_borderX; } + virtual int GetBorderY() const { return m_borderY; } - //////////////////////////////////////////////////////////////////////// - // Implementation + //////////////////////////////////////////////////////////////////////// + // Implementation - virtual void DrawFieldText(wxDC& dc, int i); - virtual void DrawField(wxDC& dc, int i); + virtual void DrawFieldText(wxDC& dc, int i); + virtual void DrawField(wxDC& dc, int i); - void SetBorderX(int x); - void SetBorderY(int y); + void SetBorderX(int x); + void SetBorderY(int y); - void OnPaint(wxPaintEvent& event); + void OnPaint(wxPaintEvent& event); - void OnLeftDown(wxMouseEvent& event); - void OnRightDown(wxMouseEvent& event); + void OnLeftDown(wxMouseEvent& event); + void OnRightDown(wxMouseEvent& event); - virtual void InitColours(); + virtual void InitColours(); - // Responds to colour changes - void OnSysColourChanged(wxSysColourChangedEvent& event); + // Responds to colour changes + void OnSysColourChanged(wxSysColourChangedEvent& event); protected: - // common part of all ctors - void Init(); + // common part of all ctors + void Init(); - wxArrayString m_statusStrings; + wxArrayString m_statusStrings; - // the last known width of the client rect (used to rebuild cache) - int m_lastClientWidth; - // the widths of the status bar panes in pixels - wxArrayInt m_widthsAbs; + // the last known width of the client rect (used to rebuild cache) + int m_lastClientWidth; + // the widths of the status bar panes in pixels + wxArrayInt m_widthsAbs; - int m_borderX; - int m_borderY; - wxPen m_mediumShadowPen; - wxPen m_hilightPen; + int m_borderX; + int m_borderY; + wxPen m_mediumShadowPen; + wxPen m_hilightPen; - virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestSize() const; private: - DECLARE_EVENT_TABLE() - DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric) + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric) }; +#endif // wxUSE_STATUSBAR + #endif // _WX_GENERIC_STATUSBR_H_ diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index 8fb907d625..cb07ac1fd1 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -12,10 +12,11 @@ #ifndef _WX_STATUSBR_H_BASE_ #define _WX_STATUSBR_H_BASE_ -#include "wx/window.h" +#include "wx/defs.h" #if wxUSE_STATUSBAR +#include "wx/window.h" #include "wx/list.h" #include "wx/dynarray.h" diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 8532a74929..ab80346bc0 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -30,11 +30,8 @@ #include "wx/menuitem.h" #include "wx/dcclient.h" #include "wx/toolbar.h" -#endif // WX_PRECOMP - -#if wxUSE_STATUSBAR #include "wx/statusbr.h" -#endif +#endif // WX_PRECOMP // ---------------------------------------------------------------------------- // event table diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index e3a2a15066..8e51e041ba 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: common/statbar.cpp +// Name: src/common/statbar.cpp // Purpose: wxStatusBarBase implementation // Author: Vadim Zeitlin // Modified by: @@ -24,9 +24,10 @@ #pragma hdrstop #endif +#include "wx/statusbr.h" + #ifndef WX_PRECOMP #include "wx/frame.h" - #include "wx/statusbr.h" #endif //WX_PRECOMP #if wxUSE_STATUSBAR @@ -354,4 +355,3 @@ wxListString *wxStatusBarBase::GetOrCreateStatusStack(int i) } #endif // wxUSE_STATUSBAR - diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 5517573f79..bb1b36f560 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -18,6 +18,8 @@ #if wxUSE_STATUSBAR +#include "wx/statusbr.h" + #ifndef WX_PRECOMP #include "wx/frame.h" #include "wx/settings.h" @@ -29,8 +31,6 @@ #include "wx/gtk/win_gtk.h" #endif -#include "wx/statusbr.h" - // we only have to do it here when we use wxStatusBarGeneric in addition to the // standard wxStatusBar class, if wxStatusBarGeneric is the same as // wxStatusBar, then the corresponding IMPLEMENT_DYNAMIC_CLASS is already in diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index f13c3957bc..7683d527db 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -27,11 +27,8 @@ #include "wx/dialog.h" #include "wx/control.h" #include "wx/toolbar.h" -#endif // WX_PRECOMP - -#if wxUSE_STATUSBAR #include "wx/statusbr.h" -#endif +#endif // WX_PRECOMP #include #include "wx/gtk/private.h" diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 8584ff8caf..b7ab6c34c8 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -31,6 +31,7 @@ #include "wx/toolbar.h" #include "wx/combobox.h" #include "wx/layout.h" + #include "wx/statusbr.h" #endif #include "wx/module.h" @@ -47,7 +48,6 @@ #include "wx/caret.h" #endif // wxUSE_CARET -#include "wx/statusbr.h" #include "wx/fontutil.h" #ifdef __WXDEBUG__ diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index b9818eba52..493ab61166 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -27,11 +27,8 @@ #include "wx/dialog.h" #include "wx/control.h" #include "wx/toolbar.h" -#endif // WX_PRECOMP - -#if wxUSE_STATUSBAR #include "wx/statusbr.h" -#endif +#endif // WX_PRECOMP #include #include "wx/gtk1/private.h" diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 78ea9235ac..70742e6193 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -30,6 +30,7 @@ #include "wx/textctrl.h" #include "wx/combobox.h" #include "wx/layout.h" + #include "wx/statusbr.h" #endif #include "wx/module.h" @@ -46,7 +47,6 @@ #include "wx/caret.h" #endif // wxUSE_CARET -#include "wx/statusbr.h" #include "wx/fontutil.h" #ifdef __WXDEBUG__ diff --git a/src/mac/carbon/frame.cpp b/src/mac/carbon/frame.cpp index 7469315094..f842f5bae8 100644 --- a/src/mac/carbon/frame.cpp +++ b/src/mac/carbon/frame.cpp @@ -20,9 +20,9 @@ #include "wx/dialog.h" #include "wx/settings.h" #include "wx/toolbar.h" + #include "wx/statusbr.h" #endif // WX_PRECOMP -#include "wx/statusbr.h" #include "wx/menuitem.h" #include "wx/mac/uma.h" diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index e7557438b4..f93ae305b3 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -31,10 +31,10 @@ #include "wx/textctrl.h" #include "wx/toolbar.h" #include "wx/layout.h" + #include "wx/statusbr.h" #endif #include "wx/tooltip.h" -#include "wx/statusbr.h" #include "wx/menuitem.h" #include "wx/spinctrl.h" #include "wx/geometry.h" diff --git a/src/mac/classic/frame.cpp b/src/mac/classic/frame.cpp index 0cc1fec03e..97fb4ed367 100644 --- a/src/mac/classic/frame.cpp +++ b/src/mac/classic/frame.cpp @@ -20,9 +20,9 @@ #include "wx/dialog.h" #include "wx/settings.h" #include "wx/toolbar.h" + #include "wx/statusbr.h" #endif // WX_PRECOMP -#include "wx/statusbr.h" #include "wx/menuitem.h" #include "wx/mac/uma.h" diff --git a/src/mac/classic/statbrma.cpp b/src/mac/classic/statbrma.cpp index f2a36929af..5bb50e0518 100644 --- a/src/mac/classic/statbrma.cpp +++ b/src/mac/classic/statbrma.cpp @@ -9,6 +9,9 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- @@ -88,14 +91,14 @@ void wxStatusBarMac::DrawField(wxDC& dc, int i) void wxStatusBarMac::SetStatusText(const wxString& text, int number) { wxCHECK_RET( (number >= 0) && (number < m_nFields), - _T("invalid status bar field index") ); + _T("invalid status bar field index") ); m_statusStrings[number] = text; wxRect rect; GetFieldRect(number, rect); rect.y=0; rect.height = m_height ; - Refresh( TRUE , &rect ) ; + Refresh( true , &rect ) ; Update(); } @@ -149,6 +152,6 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) ) void wxStatusBarMac::MacSuperEnabled( bool enabled ) { - Refresh(FALSE) ; + Refresh(false) ; wxWindow::MacSuperEnabled( enabled ) ; } diff --git a/src/mac/classic/window.cpp b/src/mac/classic/window.cpp index 1fd435f567..47b675ade2 100644 --- a/src/mac/classic/window.cpp +++ b/src/mac/classic/window.cpp @@ -30,12 +30,12 @@ #include "wx/statbox.h" #include "wx/listbox.h" #include "wx/layout.h" + #include "wx/statusbr.h" #endif #include "wx/notebook.h" #include "wx/tabctrl.h" #include "wx/tooltip.h" -#include "wx/statusbr.h" #include "wx/menuitem.h" #include "wx/spinctrl.h" #include "wx/geometry.h" diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index 35d67b0619..e734afa910 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -36,10 +36,9 @@ #include "wx/icon.h" #include "wx/settings.h" #include "wx/toolbar.h" + #include "wx/statusbr.h" #endif -#include "wx/statusbr.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 55edcb689f..42a71529a7 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -37,6 +37,7 @@ #include "wx/panel.h" #include "wx/log.h" #include "wx/toolbar.h" + #include "wx/statusbr.h" #endif // WX_PRECOMP #include "wx/msw/private.h" @@ -50,10 +51,7 @@ #include "wx/msw/winundef.h" #endif -#if wxUSE_STATUSBAR - #include "wx/statusbr.h" - #include "wx/generic/statusbr.h" -#endif // wxUSE_STATUSBAR +#include "wx/generic/statusbr.h" #include "wx/menuitem.h" diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index cc017bff99..399c30e7a4 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -34,9 +34,7 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/dialog.h" - #if wxUSE_STATUSBAR - #include "wx/statusbr.h" - #endif + #include "wx/statusbr.h" #include "wx/settings.h" #include "wx/intl.h" #include "wx/log.h" diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index 8cb0816fa6..a9d14accca 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -24,10 +24,8 @@ #include "wx/icon.h" #include "wx/msgdlg.h" #include "wx/dcprint.h" -#if wxUSE_STATUSBAR #include "wx/statusbr.h" #endif -#endif #include "wx/module.h" @@ -2729,12 +2727,10 @@ bool wxDC::DoBlit( wxCoord vXdest, return bSuccess; } -void wxDC::DoGetSize( - int* pnWidth -, int* pnHeight -) const +void wxDC::DoGetSize( int* pnWidth, + int* pnHeight ) const { - LONG lArray[CAPS_HEIGHT]; + LONG lArray[CAPS_HEIGHT]; if(::DevQueryCaps( m_hDC ,CAPS_FAMILY @@ -2802,10 +2798,7 @@ wxSize wxDC::GetPPI() const return ppisize; } // end of wxDC::GetPPI -void wxDC::SetLogicalScale( - double dX -, double dY -) +void wxDC::SetLogicalScale( double dX, double dY ) { m_logicalScaleX = dX; m_logicalScaleY = dY; diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index 2d31220114..f08d1f2d86 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -30,14 +30,12 @@ #include "wx/dcclient.h" #include "wx/mdi.h" #include "wx/toolbar.h" + #include "wx/statusbr.h" #endif // WX_PRECOMP #include "wx/os2/private.h" -#if wxUSE_STATUSBAR - #include "wx/statusbr.h" - #include "wx/generic/statusbr.h" -#endif // wxUSE_STATUSBAR +#include "wx/generic/statusbr.h" #include "wx/menuitem.h" diff --git a/src/palmos/frame.cpp b/src/palmos/frame.cpp index db49861dda..ad66236bf5 100644 --- a/src/palmos/frame.cpp +++ b/src/palmos/frame.cpp @@ -37,12 +37,10 @@ #include "wx/panel.h" #include "wx/log.h" #include "wx/toolbar.h" + #include "wx/statusbr.h" #endif // WX_PRECOMP -#if wxUSE_STATUSBAR - #include "wx/statusbr.h" - #include "wx/generic/statusbr.h" -#endif // wxUSE_STATUSBAR +#include "wx/generic/statusbr.h" #include "wx/menuitem.h" diff --git a/src/palmos/mdi.cpp b/src/palmos/mdi.cpp index ae2e3a2c04..23385f32ef 100644 --- a/src/palmos/mdi.cpp +++ b/src/palmos/mdi.cpp @@ -34,9 +34,7 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/dialog.h" - #if wxUSE_STATUSBAR - #include "wx/statusbr.h" - #endif + #include "wx/statusbr.h" #include "wx/settings.h" #include "wx/intl.h" #include "wx/log.h" diff --git a/src/univ/statusbr.cpp b/src/univ/statusbr.cpp index 6773264e02..3c4e447a3b 100644 --- a/src/univ/statusbr.cpp +++ b/src/univ/statusbr.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/statusbr.cpp +// Name: src/univ/statusbr.cpp // Purpose: wxStatusBar implementation // Author: Vadim Zeitlin // Modified by: @@ -25,12 +25,13 @@ #if wxUSE_STATUSBAR +#include "wx/statusbr.h" + #ifndef WX_PRECOMP #include "wx/settings.h" #include "wx/dcclient.h" #endif -#include "wx/statusbr.h" #include "wx/toplevel.h" #include "wx/univ/renderer.h" @@ -327,4 +328,3 @@ int wxStatusBarUniv::GetBorderY() const } #endif // wxUSE_STATUSBAR - diff --git a/src/xrc/xh_statbar.cpp b/src/xrc/xh_statbar.cpp index e634adc991..fc701a23f7 100644 --- a/src/xrc/xh_statbar.cpp +++ b/src/xrc/xh_statbar.cpp @@ -23,14 +23,13 @@ #include "wx/string.h" #include "wx/log.h" #include "wx/frame.h" + #include "wx/statusbr.h" #endif -#include "wx/statusbr.h" - IMPLEMENT_DYNAMIC_CLASS(wxStatusBarXmlHandler, wxXmlResourceHandler) -wxStatusBarXmlHandler::wxStatusBarXmlHandler() : - wxXmlResourceHandler() +wxStatusBarXmlHandler::wxStatusBarXmlHandler() + :wxXmlResourceHandler() { XRC_ADD_STYLE(wxST_SIZEGRIP); AddWindowStyles(); -- 2.45.2