git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39646
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
23 files changed:
#ifndef _WX_GENERIC_STATUSBR_H_
#define _WX_GENERIC_STATUSBR_H_
#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/pen.h"
#include "wx/font.h"
#include "wx/statusbr.h"
class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
{
public:
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);
- // 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;
- 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_
#endif
// _WX_GENERIC_STATUSBR_H_
#ifndef _WX_STATUSBR_H_BASE_
#define _WX_STATUSBR_H_BASE_
#ifndef _WX_STATUSBR_H_BASE_
#define _WX_STATUSBR_H_BASE_
#include "wx/list.h"
#include "wx/dynarray.h"
#include "wx/list.h"
#include "wx/dynarray.h"
#include "wx/menuitem.h"
#include "wx/dcclient.h"
#include "wx/toolbar.h"
#include "wx/menuitem.h"
#include "wx/dcclient.h"
#include "wx/toolbar.h"
-#endif // WX_PRECOMP
-
-#if wxUSE_STATUSBAR
// ----------------------------------------------------------------------------
// event table
// ----------------------------------------------------------------------------
// event table
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-// Name: common/statbar.cpp
+// Name: src/common/statbar.cpp
// Purpose: wxStatusBarBase implementation
// Author: Vadim Zeitlin
// Modified by:
// Purpose: wxStatusBarBase implementation
// Author: Vadim Zeitlin
// Modified by:
+#include "wx/statusbr.h"
+
#ifndef WX_PRECOMP
#include "wx/frame.h"
#ifndef WX_PRECOMP
#include "wx/frame.h"
- #include "wx/statusbr.h"
#endif //WX_PRECOMP
#if wxUSE_STATUSBAR
#endif //WX_PRECOMP
#if wxUSE_STATUSBAR
}
#endif // wxUSE_STATUSBAR
}
#endif // wxUSE_STATUSBAR
+#include "wx/statusbr.h"
+
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/settings.h"
#include "wx/gtk/win_gtk.h"
#endif
#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
// 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
#include "wx/dialog.h"
#include "wx/control.h"
#include "wx/toolbar.h"
#include "wx/dialog.h"
#include "wx/control.h"
#include "wx/toolbar.h"
-#endif // WX_PRECOMP
-
-#if wxUSE_STATUSBAR
#include <glib.h>
#include "wx/gtk/private.h"
#include <glib.h>
#include "wx/gtk/private.h"
#include "wx/toolbar.h"
#include "wx/combobox.h"
#include "wx/layout.h"
#include "wx/toolbar.h"
#include "wx/combobox.h"
#include "wx/layout.h"
+ #include "wx/statusbr.h"
#endif
#include "wx/module.h"
#endif
#include "wx/module.h"
#include "wx/caret.h"
#endif // wxUSE_CARET
#include "wx/caret.h"
#endif // wxUSE_CARET
-#include "wx/statusbr.h"
#include "wx/fontutil.h"
#ifdef __WXDEBUG__
#include "wx/fontutil.h"
#ifdef __WXDEBUG__
#include "wx/dialog.h"
#include "wx/control.h"
#include "wx/toolbar.h"
#include "wx/dialog.h"
#include "wx/control.h"
#include "wx/toolbar.h"
-#endif // WX_PRECOMP
-
-#if wxUSE_STATUSBAR
#include <glib.h>
#include "wx/gtk1/private.h"
#include <glib.h>
#include "wx/gtk1/private.h"
#include "wx/textctrl.h"
#include "wx/combobox.h"
#include "wx/layout.h"
#include "wx/textctrl.h"
#include "wx/combobox.h"
#include "wx/layout.h"
+ #include "wx/statusbr.h"
#endif
#include "wx/module.h"
#endif
#include "wx/module.h"
#include "wx/caret.h"
#endif // wxUSE_CARET
#include "wx/caret.h"
#endif // wxUSE_CARET
-#include "wx/statusbr.h"
#include "wx/fontutil.h"
#ifdef __WXDEBUG__
#include "wx/fontutil.h"
#ifdef __WXDEBUG__
#include "wx/dialog.h"
#include "wx/settings.h"
#include "wx/toolbar.h"
#include "wx/dialog.h"
#include "wx/settings.h"
#include "wx/toolbar.h"
+ #include "wx/statusbr.h"
-#include "wx/statusbr.h"
#include "wx/menuitem.h"
#include "wx/mac/uma.h"
#include "wx/menuitem.h"
#include "wx/mac/uma.h"
#include "wx/textctrl.h"
#include "wx/toolbar.h"
#include "wx/layout.h"
#include "wx/textctrl.h"
#include "wx/toolbar.h"
#include "wx/layout.h"
+ #include "wx/statusbr.h"
#endif
#include "wx/tooltip.h"
#endif
#include "wx/tooltip.h"
-#include "wx/statusbr.h"
#include "wx/menuitem.h"
#include "wx/spinctrl.h"
#include "wx/geometry.h"
#include "wx/menuitem.h"
#include "wx/spinctrl.h"
#include "wx/geometry.h"
#include "wx/dialog.h"
#include "wx/settings.h"
#include "wx/toolbar.h"
#include "wx/dialog.h"
#include "wx/settings.h"
#include "wx/toolbar.h"
+ #include "wx/statusbr.h"
-#include "wx/statusbr.h"
#include "wx/menuitem.h"
#include "wx/mac/uma.h"
#include "wx/menuitem.h"
#include "wx/mac/uma.h"
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
void wxStatusBarMac::SetStatusText(const wxString& text, int number)
{
wxCHECK_RET( (number >= 0) && (number < m_nFields),
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 ;
m_statusStrings[number] = text;
wxRect rect;
GetFieldRect(number, rect);
rect.y=0;
rect.height = m_height ;
- Refresh( TRUE , &rect ) ;
+ Refresh( true , &rect ) ;
void wxStatusBarMac::MacSuperEnabled( bool enabled )
{
void wxStatusBarMac::MacSuperEnabled( bool enabled )
{
wxWindow::MacSuperEnabled( enabled ) ;
}
wxWindow::MacSuperEnabled( enabled ) ;
}
#include "wx/statbox.h"
#include "wx/listbox.h"
#include "wx/layout.h"
#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"
#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"
#include "wx/menuitem.h"
#include "wx/spinctrl.h"
#include "wx/geometry.h"
#include "wx/icon.h"
#include "wx/settings.h"
#include "wx/toolbar.h"
#include "wx/icon.h"
#include "wx/settings.h"
#include "wx/toolbar.h"
+ #include "wx/statusbr.h"
-#include "wx/statusbr.h"
-
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#include "wx/panel.h"
#include "wx/log.h"
#include "wx/toolbar.h"
#include "wx/panel.h"
#include "wx/log.h"
#include "wx/toolbar.h"
+ #include "wx/statusbr.h"
#endif // WX_PRECOMP
#include "wx/msw/private.h"
#endif // WX_PRECOMP
#include "wx/msw/private.h"
#include "wx/msw/winundef.h"
#endif
#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/app.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#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"
#include "wx/settings.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/icon.h"
#include "wx/msgdlg.h"
#include "wx/dcprint.h"
#include "wx/icon.h"
#include "wx/msgdlg.h"
#include "wx/dcprint.h"
#include "wx/statusbr.h"
#endif
#include "wx/statusbr.h"
#endif
-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
if(::DevQueryCaps( m_hDC
,CAPS_FAMILY
return ppisize;
} // end of wxDC::GetPPI
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;
{
m_logicalScaleX = dX;
m_logicalScaleY = dY;
#include "wx/dcclient.h"
#include "wx/mdi.h"
#include "wx/toolbar.h"
#include "wx/dcclient.h"
#include "wx/mdi.h"
#include "wx/toolbar.h"
+ #include "wx/statusbr.h"
#endif // WX_PRECOMP
#include "wx/os2/private.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/panel.h"
#include "wx/log.h"
#include "wx/toolbar.h"
#include "wx/panel.h"
#include "wx/log.h"
#include "wx/toolbar.h"
+ #include "wx/statusbr.h"
-#if wxUSE_STATUSBAR
- #include "wx/statusbr.h"
- #include "wx/generic/statusbr.h"
-#endif // wxUSE_STATUSBAR
+#include "wx/generic/statusbr.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#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"
#include "wx/settings.h"
#include "wx/intl.h"
#include "wx/log.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: univ/statusbr.cpp
+// Name: src/univ/statusbr.cpp
// Purpose: wxStatusBar implementation
// Author: Vadim Zeitlin
// Modified by:
// Purpose: wxStatusBar implementation
// Author: Vadim Zeitlin
// Modified by:
+#include "wx/statusbr.h"
+
#ifndef WX_PRECOMP
#include "wx/settings.h"
#include "wx/dcclient.h"
#endif
#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"
#include "wx/toplevel.h"
#include "wx/univ/renderer.h"
}
#endif // wxUSE_STATUSBAR
}
#endif // wxUSE_STATUSBAR
#include "wx/string.h"
#include "wx/log.h"
#include "wx/frame.h"
#include "wx/string.h"
#include "wx/log.h"
#include "wx/frame.h"
+ #include "wx/statusbr.h"
-#include "wx/statusbr.h"
-
IMPLEMENT_DYNAMIC_CLASS(wxStatusBarXmlHandler, wxXmlResourceHandler)
IMPLEMENT_DYNAMIC_CLASS(wxStatusBarXmlHandler, wxXmlResourceHandler)
-wxStatusBarXmlHandler::wxStatusBarXmlHandler() :
- wxXmlResourceHandler()
+wxStatusBarXmlHandler::wxStatusBarXmlHandler()
+ :wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxST_SIZEGRIP);
AddWindowStyles();
{
XRC_ADD_STYLE(wxST_SIZEGRIP);
AddWindowStyles();