]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/statusbar.h
minor cleanup; add wxDocument::OnChangeFilename for coherence with wxView::OnChangefi...
[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 wxStatusBar : public wxStatusBarBase
18 {
19 public:
20 // ctors and such
21 wxStatusBar();
22 wxStatusBar(wxWindow *parent,
23 wxWindowID id = wxID_ANY,
24 long style = wxST_SIZEGRIP,
25 const wxString& name = wxStatusBarNameStr)
26 {
27 (void)Create(parent, id, style, name);
28 }
29
30 bool Create(wxWindow *parent,
31 wxWindowID id = wxID_ANY,
32 long style = wxST_SIZEGRIP,
33 const wxString& name = wxStatusBarNameStr);
34
35 virtual ~wxStatusBar();
36
37 // a status line can have several (<256) fields numbered from 0
38 virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
39
40 // each field of status line has it's own text
41 virtual void SetStatusText(const wxString& text, int number = 0);
42 virtual wxString GetStatusText(int number = 0) const;
43
44 // set status line fields' widths
45 virtual void SetStatusWidths(int n, const int widths_field[]);
46
47 // set status line fields' styles
48 virtual void SetStatusStyles(int n, const int styles[]);
49
50 // sets the minimal vertical size of the status bar
51 virtual void SetMinHeight(int height);
52
53 // get the position and size of the field's internal bounding rectangle
54 virtual bool GetFieldRect(int i, wxRect& rect) const;
55
56 // get the border size
57 virtual int GetBorderX() const;
58 virtual int GetBorderY() const;
59
60 virtual WXLRESULT MSWWindowProc(WXUINT nMsg,
61 WXWPARAM wParam,
62 WXLPARAM lParam);
63 protected:
64 void CopyFieldsWidth(const int widths[]);
65 void SetFieldsWidth();
66
67 // override some base class virtuals
68 virtual wxSize DoGetBestSize() const;
69 virtual void DoMoveWindow(int x, int y, int width, int height);
70
71 private:
72 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBar)
73 };
74
75 #endif // wxUSE_NATIVE_STATUSBAR
76
77 #endif // _WX_MSW_STATUSBAR_H_