]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/statusbar.h
no real change; just add the standard separator where it's missing
[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_FWD_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 m_pDC = NULL;
30 (void)Create(parent, id, style, name);
31 }
32
33 bool Create(wxWindow *parent,
34 wxWindowID id = wxID_ANY,
35 long style = wxST_SIZEGRIP,
36 const wxString& name = wxStatusBarNameStr);
37
38 virtual ~wxStatusBar();
39
40 // a status line can have several (<256) fields numbered from 0
41 virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
42
43 // each field of status line has it's own text
44 virtual void SetStatusText(const wxString& text, int number = 0);
45
46 // set status line fields' widths
47 virtual void SetStatusWidths(int n, const int widths_field[]);
48
49 // set status line fields' styles
50 virtual void SetStatusStyles(int n, const int styles[]);
51
52 // sets the minimal vertical size of the status bar
53 virtual void SetMinHeight(int height);
54
55 // get the position and size of the field's internal bounding rectangle
56 virtual bool GetFieldRect(int i, wxRect& rect) const;
57
58 // get the border size
59 virtual int GetBorderX() const;
60 virtual int GetBorderY() const;
61
62 virtual bool SetFont(const wxFont& font);
63
64 virtual WXLRESULT MSWWindowProc(WXUINT nMsg,
65 WXWPARAM wParam,
66 WXLPARAM lParam);
67 protected:
68 void CopyFieldsWidth(const int widths[]);
69 void SetFieldsWidth();
70 void UpdateFieldText(int nField);
71
72 // override some base class virtuals
73 virtual wxSize DoGetBestSize() const;
74 virtual void DoMoveWindow(int x, int y, int width, int height);
75
76 // used by UpdateFieldText
77 wxClientDC *m_pDC;
78
79 private:
80 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar)
81 };
82
83 #endif // wxUSE_NATIVE_STATUSBAR
84
85 #endif // _WX_MSW_STATUSBAR_H_