]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | /////////////////////////////////////////////////////////////////////////////// |
936f6353 | 2 | // Name: wx/msw/statbr.h |
2bda0e17 KB |
3 | // Purpose: native implementation of wxStatusBar |
4 | // Author: Vadim Zeitlin | |
a79fa1ed | 5 | // Modified by: |
2bda0e17 KB |
6 | // Created: 04.04.98 |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> | |
65571936 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
936f6353 VZ |
12 | #ifndef _WX_MSW_STATUSBAR_H_ |
13 | #define _WX_MSW_STATUSBAR_H_ | |
2bda0e17 | 14 | |
ed791986 | 15 | #if wxUSE_NATIVE_STATUSBAR |
2bda0e17 | 16 | |
22b476f1 | 17 | class WXDLLIMPEXP_FWD_CORE wxClientDC; |
0cd15959 | 18 | |
53a2db12 | 19 | class WXDLLIMPEXP_CORE wxStatusBar : public wxStatusBarBase |
2bda0e17 | 20 | { |
2bda0e17 | 21 | public: |
ed791986 | 22 | // ctors and such |
936f6353 VZ |
23 | wxStatusBar(); |
24 | wxStatusBar(wxWindow *parent, | |
25 | wxWindowID id = wxID_ANY, | |
26 | long style = wxST_SIZEGRIP, | |
27 | const wxString& name = wxStatusBarNameStr) | |
ed791986 | 28 | { |
80255b7e | 29 | m_pDC = NULL; |
ed791986 VZ |
30 | (void)Create(parent, id, style, name); |
31 | } | |
32 | ||
33 | bool Create(wxWindow *parent, | |
57f4f925 | 34 | wxWindowID id = wxID_ANY, |
ed791986 | 35 | long style = wxST_SIZEGRIP, |
53b6d7a2 | 36 | const wxString& name = wxStatusBarNameStr); |
ed791986 | 37 | |
936f6353 | 38 | virtual ~wxStatusBar(); |
2bda0e17 | 39 | |
ed791986 VZ |
40 | // a status line can have several (<256) fields numbered from 0 |
41 | virtual void SetFieldsCount(int number = 1, const int *widths = NULL); | |
2bda0e17 | 42 | |
ed791986 VZ |
43 | // each field of status line has it's own text |
44 | virtual void SetStatusText(const wxString& text, int number = 0); | |
2bda0e17 | 45 | |
ed791986 VZ |
46 | // set status line fields' widths |
47 | virtual void SetStatusWidths(int n, const int widths_field[]); | |
2bda0e17 | 48 | |
c2919ab3 VZ |
49 | // set status line fields' styles |
50 | virtual void SetStatusStyles(int n, const int styles[]); | |
51 | ||
ed791986 VZ |
52 | // sets the minimal vertical size of the status bar |
53 | virtual void SetMinHeight(int height); | |
2bda0e17 | 54 | |
ed791986 VZ |
55 | // get the position and size of the field's internal bounding rectangle |
56 | virtual bool GetFieldRect(int i, wxRect& rect) const; | |
2bda0e17 | 57 | |
ed791986 VZ |
58 | // get the border size |
59 | virtual int GetBorderX() const; | |
60 | virtual int GetBorderY() const; | |
61 | ||
0cd15959 FM |
62 | virtual bool SetFont(const wxFont& font); |
63 | ||
6f02a879 VZ |
64 | virtual WXLRESULT MSWWindowProc(WXUINT nMsg, |
65 | WXWPARAM wParam, | |
66 | WXLPARAM lParam); | |
2bda0e17 | 67 | protected: |
ed791986 VZ |
68 | void CopyFieldsWidth(const int widths[]); |
69 | void SetFieldsWidth(); | |
0cd15959 | 70 | void UpdateFieldText(int nField); |
ed791986 | 71 | |
c0ac3149 VZ |
72 | // override some base class virtuals |
73 | virtual wxSize DoGetBestSize() const; | |
74 | virtual void DoMoveWindow(int x, int y, int width, int height); | |
cbc66a27 | 75 | |
0cd15959 FM |
76 | // used by UpdateFieldText |
77 | wxClientDC *m_pDC; | |
78 | ||
ed791986 | 79 | private: |
936f6353 | 80 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar) |
2bda0e17 KB |
81 | }; |
82 | ||
47d67540 | 83 | #endif // wxUSE_NATIVE_STATUSBAR |
2bda0e17 | 84 | |
936f6353 | 85 | #endif // _WX_MSW_STATUSBAR_H_ |