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_CORE wxClientDC
;
19 class WXDLLIMPEXP_CORE wxStatusBar
: public wxStatusBarBase
24 wxStatusBar(wxWindow
*parent
,
25 wxWindowID id
= wxID_ANY
,
26 long style
= wxST_SIZEGRIP
,
27 const wxString
& name
= wxStatusBarNameStr
)
29 (void)Create(parent
, id
, style
, name
);
32 bool Create(wxWindow
*parent
,
33 wxWindowID id
= wxID_ANY
,
34 long style
= wxST_SIZEGRIP
,
35 const wxString
& name
= wxStatusBarNameStr
);
37 virtual ~wxStatusBar();
39 // a status line can have several (<256) fields numbered from 0
40 virtual void SetFieldsCount(int number
= 1, const int *widths
= NULL
);
42 // each field of status line has it's own text
43 virtual void SetStatusText(const wxString
& text
, int number
= 0);
45 // set status line fields' widths
46 virtual void SetStatusWidths(int n
, const int widths_field
[]);
48 // set status line fields' styles
49 virtual void SetStatusStyles(int n
, const int styles
[]);
51 // sets the minimal vertical size of the status bar
52 virtual void SetMinHeight(int height
);
54 // get the position and size of the field's internal bounding rectangle
55 virtual bool GetFieldRect(int i
, wxRect
& rect
) const;
57 // get the border size
58 virtual int GetBorderX() const;
59 virtual int GetBorderY() const;
61 virtual bool SetFont(const wxFont
& font
);
63 virtual WXLRESULT
MSWWindowProc(WXUINT nMsg
,
67 void CopyFieldsWidth(const int widths
[]);
68 void SetFieldsWidth();
69 void UpdateFieldText(int nField
);
71 // override some base class virtuals
72 virtual wxSize
DoGetBestSize() const;
73 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
75 // used by UpdateFieldText
79 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar
)
82 #endif // wxUSE_NATIVE_STATUSBAR
84 #endif // _WX_MSW_STATUSBAR_H_