1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/statbr.h
3 // Purpose: native implementation of wxStatusBar
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSW_STATUSBAR_H_
13 #define _WX_MSW_STATUSBAR_H_
15 #if wxUSE_NATIVE_STATUSBAR
17 class WXDLLIMPEXP_FWD_CORE wxClientDC
;
19 class WXDLLIMPEXP_CORE wxStatusBar
: public wxStatusBarBase
24 wxStatusBar(wxWindow
*parent
,
25 wxWindowID id
= wxID_ANY
,
26 long style
= wxST_DEFAULT_STYLE
,
27 const wxString
& name
= wxStatusBarNameStr
)
30 (void)Create(parent
, id
, style
, name
);
33 bool Create(wxWindow
*parent
,
34 wxWindowID id
= wxID_ANY
,
35 long style
= wxST_DEFAULT_STYLE
,
36 const wxString
& name
= wxStatusBarNameStr
);
38 virtual ~wxStatusBar();
40 // a status line can have several (<256) fields numbered from 0
41 virtual void SetFieldsCount(int number
= 1, const int *widths
= NULL
);
43 // each field of status line has it's own text
44 virtual void SetStatusText(const wxString
& text
, int number
= 0);
46 // set status line fields' widths
47 virtual void SetStatusWidths(int n
, const int widths_field
[]);
49 // set status line fields' styles
50 virtual void SetStatusStyles(int n
, const int styles
[]);
52 // sets the minimal vertical size of the status bar
53 virtual void SetMinHeight(int height
);
55 // get the position and size of the field's internal bounding rectangle
56 virtual bool GetFieldRect(int i
, wxRect
& rect
) const;
58 // get the border size
59 virtual int GetBorderX() const;
60 virtual int GetBorderY() const;
62 virtual bool SetFont(const wxFont
& font
);
64 virtual WXLRESULT
MSWWindowProc(WXUINT nMsg
,
68 void CopyFieldsWidth(const int widths
[]);
69 void SetFieldsWidth();
70 void UpdateFieldText(int nField
);
72 // override some base class virtuals
73 virtual wxSize
DoGetBestSize() const;
74 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
76 // used by UpdateFieldText
80 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar
)
83 #endif // wxUSE_NATIVE_STATUSBAR
85 #endif // _WX_MSW_STATUSBAR_H_