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