1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/statusbar.h
3 // Purpose: native implementation of wxStatusBar
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MSW_STATUSBAR_H_
12 #define _WX_MSW_STATUSBAR_H_
14 #if wxUSE_NATIVE_STATUSBAR
16 #include "wx/vector.h"
17 #include "wx/tooltip.h"
19 class WXDLLIMPEXP_FWD_CORE wxClientDC
;
21 class WXDLLIMPEXP_CORE wxStatusBar
: public wxStatusBarBase
26 wxStatusBar(wxWindow
*parent
,
27 wxWindowID id
= wxID_ANY
,
28 long style
= wxSTB_DEFAULT_STYLE
,
29 const wxString
& name
= wxStatusBarNameStr
)
32 (void)Create(parent
, id
, style
, name
);
35 bool Create(wxWindow
*parent
,
36 wxWindowID id
= wxID_ANY
,
37 long style
= wxSTB_DEFAULT_STYLE
,
38 const wxString
& name
= wxStatusBarNameStr
);
40 virtual ~wxStatusBar();
42 // implement base class methods
43 virtual void SetFieldsCount(int number
= 1, const int *widths
= NULL
);
44 virtual void SetStatusWidths(int n
, const int widths_field
[]);
45 virtual void SetStatusStyles(int n
, const int styles
[]);
46 virtual void SetMinHeight(int height
);
47 virtual bool GetFieldRect(int i
, wxRect
& rect
) const;
49 virtual int GetBorderX() const;
50 virtual int GetBorderY() const;
52 // override some wxWindow virtual methods too
53 virtual bool SetFont(const wxFont
& font
);
55 virtual WXLRESULT
MSWWindowProc(WXUINT nMsg
,
60 // implement base class pure virtual method
61 virtual void DoUpdateStatusText(int number
);
63 // override some base class virtuals
64 virtual WXDWORD
MSWGetStyle(long flags
, WXDWORD
*exstyle
= NULL
) const;
65 virtual wxSize
DoGetBestSize() const;
66 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
68 virtual bool MSWProcessMessage(WXMSG
* pMsg
);
69 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
* result
);
72 // implementation of the public SetStatusWidths()
73 void MSWUpdateFieldsWidths();
75 // used by DoUpdateStatusText()
79 // the tooltips used when wxSTB_SHOW_TIPS is given
80 wxVector
<wxToolTip
*> m_tooltips
;
91 // retrieve all status bar borders using SB_GETBORDERS
92 MSWBorders
MSWGetBorders() const;
94 // return the size of the border between the fields
95 int MSWGetBorderWidth() const;
103 // return the various status bar metrics
104 static const MSWMetrics
& MSWGetMetrics();
106 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar
)
109 #endif // wxUSE_NATIVE_STATUSBAR
111 #endif // _WX_MSW_STATUSBAR_H_