use wxSTB_ as prefix for wxStatusBar styles; add support for wxSTB_ELLIPSIZE_* flags under wxGTK; support wxSTB_SHOW_TIPS even if no ellipsization mode is active; update the sample to allow the user to choose the wxStatusBar style dynamically
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
// create the main status bar by calling OnCreateStatusBar()
|
||||
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
||||
long style = wxST_SIZEGRIP,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
wxWindowID winid = 0,
|
||||
const wxString& name =
|
||||
wxStatusLineNameStr);
|
||||
|
@@ -104,7 +104,7 @@ public:
|
||||
#if wxUSE_STATUSBAR
|
||||
// create the main status bar by calling OnCreateStatusBar()
|
||||
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
wxWindowID winid = 0,
|
||||
const wxString& name = wxStatusLineNameStr);
|
||||
// return a new status bar
|
||||
|
@@ -30,7 +30,7 @@ public:
|
||||
wxStatusBarGeneric() { Init(); }
|
||||
wxStatusBarGeneric(wxWindow *parent,
|
||||
wxWindowID winid = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxStatusBarNameStr)
|
||||
{
|
||||
Init();
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
virtual ~wxStatusBarGeneric();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxStatusBarNameStr);
|
||||
|
||||
// Create status line
|
||||
@@ -90,7 +90,7 @@ protected:
|
||||
virtual void InitColours();
|
||||
|
||||
// true if the status bar shows the size grip: for this it must have
|
||||
// wxST_SIZEGRIP style and the window it is attached to must be resizeable
|
||||
// wxSTB_SIZEGRIP style and the window it is attached to must be resizeable
|
||||
// and not maximized
|
||||
bool ShowsSizeGrip() const;
|
||||
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
virtual void PositionStatusBar();
|
||||
|
||||
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
||||
long style = wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
wxWindowID id = 0,
|
||||
const wxString& name = wxStatusLineNameStr);
|
||||
|
||||
|
@@ -60,7 +60,7 @@ public:
|
||||
// Status bar
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual wxStatusBar* OnCreateStatusBar(int number = 1,
|
||||
long style = wxST_SIZEGRIP,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
wxWindowID id = 0,
|
||||
const wxString& name = wxStatusLineNameStr);
|
||||
|
||||
|
@@ -23,7 +23,7 @@ public:
|
||||
wxStatusBar();
|
||||
wxStatusBar(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxStatusBarNameStr)
|
||||
{
|
||||
m_pDC = NULL;
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxStatusBarNameStr);
|
||||
|
||||
virtual ~wxStatusBar();
|
||||
|
@@ -81,7 +81,7 @@ public:
|
||||
// Status bar
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual wxStatusBar* OnCreateStatusBar( int nNumber = 1
|
||||
,long lStyle = wxST_SIZEGRIP
|
||||
,long lStyle = wxSTB_DEFAULT_STYLE
|
||||
,wxWindowID vId = 0
|
||||
,const wxString& rsName = wxStatusLineNameStr
|
||||
);
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
// Status bar
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual wxStatusBar* OnCreateStatusBar(int number = 1,
|
||||
long style = wxST_SIZEGRIP,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
wxWindowID id = 0,
|
||||
const wxString& name = wxStatusLineNameStr);
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
@@ -19,13 +19,13 @@ class WXDLLIMPEXP_CORE wxStatusBarMac : public wxStatusBarGeneric
|
||||
|
||||
wxStatusBarMac();
|
||||
wxStatusBarMac(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxStatusBarNameStr);
|
||||
|
||||
virtual ~wxStatusBarMac();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxStatusBarNameStr);
|
||||
|
||||
virtual void DrawFieldText(wxDC& dc, const wxRect& rc, int i, int textHeight);
|
||||
|
@@ -21,7 +21,7 @@ public:
|
||||
wxStatusBarPalm();
|
||||
wxStatusBarPalm(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxEmptyString)
|
||||
{
|
||||
(void)Create(parent, id, style, name);
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxEmptyString);
|
||||
|
||||
virtual ~wxStatusBarPalm();
|
||||
|
@@ -27,12 +27,21 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxStatusBarNameStr[];
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// wxStatusBar styles
|
||||
#define wxST_SIZEGRIP 0x0010
|
||||
#define wxST_SHOW_TIPS 0x0020
|
||||
#define wxSTB_SIZEGRIP 0x0010
|
||||
#define wxSTB_SHOW_TIPS 0x0020
|
||||
|
||||
#define wxST_DEFAULT_STYLE (wxST_SIZEGRIP|wxST_SHOW_TIPS|wxFULL_REPAINT_ON_RESIZE)
|
||||
#define wxSTB_ELLIPSIZE_START 0x0040
|
||||
#define wxSTB_ELLIPSIZE_MIDDLE 0x0080
|
||||
#define wxSTB_ELLIPSIZE_END 0x0100
|
||||
|
||||
// style flags for fields
|
||||
#define wxSTB_DEFAULT_STYLE (wxSTB_SIZEGRIP|wxSTB_ELLIPSIZE_END|wxSTB_SHOW_TIPS|wxFULL_REPAINT_ON_RESIZE)
|
||||
|
||||
|
||||
// old compat style name:
|
||||
#define wxST_SIZEGRIP wxSTB_SIZEGRIP
|
||||
|
||||
|
||||
// style flags for wxStatusBar fields
|
||||
#define wxSB_NORMAL 0x0000
|
||||
#define wxSB_FLAT 0x0001
|
||||
#define wxSB_RAISED 0x0002
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
||||
long style = wxST_SIZEGRIP,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
wxWindowID id = 0,
|
||||
const wxString& name = wxStatusLineNameStr);
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
@@ -20,14 +20,14 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxStatusBarUniv : public wxStatusBarBase,
|
||||
public wxInputConsumer
|
||||
public wxInputConsumer
|
||||
{
|
||||
public:
|
||||
wxStatusBarUniv() { Init(); }
|
||||
|
||||
wxStatusBarUniv(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
{
|
||||
Init();
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxST_DEFAULT_STYLE,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
// set field count/widths
|
||||
|
Reference in New Issue
Block a user