]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/statusbr.h
oops, missing semi colon added
[wxWidgets.git] / include / wx / statusbr.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/statusbr.h
3// Purpose: wxStatusBar class interface
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 05.02.00
7// RCS-ID: $Id$
8// Copyright: (c) wxWindows team
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_STATUSBR_H_BASE_
13#define _WX_STATUSBR_H_BASE_
14
15#include "wx/window.h"
16
17#if wxUSE_STATUSBAR
18
19// ----------------------------------------------------------------------------
20// wxStatusBar: a window near the bottom of the frame used for status info
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxStatusBarBase : public wxWindow
24{
25public:
26 wxStatusBarBase() { m_statusWidths = NULL; }
27
28 // get/set the number of fields
29 virtual void SetFieldsCount(int number = 1,
30 const int *widths = (const int *) NULL) = 0;
31 int GetFieldsCount() const { return m_nFields; }
32
33 // get/set the text of the given field
34 virtual void SetStatusText(const wxString& text, int number = 0) = 0;
35 virtual wxString GetStatusText(int number = 0) const = 0;
36
37 // set status line widths (n should be the same as field count)
38 virtual void SetStatusWidths(int n, const int widths[]) = 0;
39
40 // Get the position and size of the field's internal bounding rectangle
41 virtual bool GetFieldRect(int i, wxRect& rect) const = 0;
42
43 // sets the minimal vertical size of the status bar
44 virtual void SetMinHeight(int height) = 0;
45
46 // get the dimensions of the horizontal and vertical borders
47 virtual int GetBorderX() const = 0;
48 virtual int GetBorderY() const = 0;
49
50 // don't want status bars to accept the focus at all
51 virtual bool AcceptsFocus() const { return FALSE; }
52
53protected:
54 int m_nFields; // the current number of fields
55 int *m_statusWidths; // the width (if !NULL) of the fields
56};
57
58#if defined(__WIN32__) && wxUSE_NATIVE_STATUSBAR
59 #include "wx/msw/statbr95.h"
60
61 typedef wxStatusBar95 wxStatusBarReal;
62#elif defined(__WXMAC__)
63 #include "wx/generic/statusbr.h"
64 #include "wx/mac/statusbr.h"
65
66 typedef wxStatusBarMac wxStatusBarReal;
67#else
68 #include "wx/generic/statusbr.h"
69
70 typedef wxStatusBarGeneric wxStatusBarReal;
71#endif
72
73// we can't just typedef wxStatusBar to be one of 95/Generic because we should
74// be able to forward declare it (done in several places) and because wxWin
75// RTTI wouldn't work then
76class WXDLLEXPORT wxStatusBar : public wxStatusBarReal
77{
78public:
79 wxStatusBar() { }
80 wxStatusBar(wxWindow *parent,
81 wxWindowID id,
82 const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
83 const wxSize& WXUNUSED(size) = wxDefaultSize,
84 long style = wxST_SIZEGRIP,
85 const wxString& name = wxPanelNameStr)
86 {
87 Create(parent, id, style, name);
88 }
89 wxStatusBar(wxWindow *parent,
90 wxWindowID id,
91 long style,
92 const wxString& name = wxPanelNameStr)
93 {
94 Create(parent, id, style, name);
95 }
96
97private:
98 DECLARE_DYNAMIC_CLASS(wxStatusBar)
99};
100
101#endif
102
103#endif
104 // _WX_STATUSBR_H_BASE_