]> git.saurik.com Git - wxWidgets.git/blame - include/wx/statusbr.h
added generic implementation and documentation for wxFindReplaceDialog
[wxWidgets.git] / include / wx / statusbr.h
CommitLineData
ed791986
VZ
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
34138703
JS
12#ifndef _WX_STATUSBR_H_BASE_
13#define _WX_STATUSBR_H_BASE_
c801d85f 14
ed791986
VZ
15#include "wx/window.h"
16
1e6feb95
VZ
17#if wxUSE_STATUSBAR
18
ed791986
VZ
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
1e6feb95
VZ
50 // don't want status bars to accept the focus at all
51 virtual bool AcceptsFocus() const { return FALSE; }
52
ed791986
VZ
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;
656fc51c 62#elif defined(__WXMAC__)
5fde6fcc 63 #include "wx/generic/statusbr.h"
a02bb143
SC
64 #include "wx/mac/statusbr.h"
65
66 typedef wxStatusBarMac wxStatusBarReal;
ed791986
VZ
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
f6bcfd97 76class WXDLLEXPORT wxStatusBar : public wxStatusBarReal
ed791986
VZ
77{
78public:
79 wxStatusBar() { }
80 wxStatusBar(wxWindow *parent,
81 wxWindowID id,
82 const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
83 const wxSize& WXUNUSED(size) = wxDefaultSize,
43b5058d 84 long style = wxST_SIZEGRIP,
ed791986
VZ
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};
c801d85f 100
1e6feb95
VZ
101#endif
102
c801d85f 103#endif
34138703 104 // _WX_STATUSBR_H_BASE_