]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/statusbr.h
Use CFSocket instead of CFFileDescriptor in wxCFEventLoopSource.
[wxWidgets.git] / include / wx / univ / statusbr.h
CommitLineData
71e03035
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/univ/statusbr.h
3// Purpose: wxStatusBarUniv: wxStatusBar for wxUniversal declaration
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 14.10.01
7// RCS-ID: $Id$
8// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
65571936 9// Licence: wxWindows licence
71e03035
VZ
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_UNIV_STATUSBR_H_
13#define _WX_UNIV_STATUSBR_H_
14
fe9fea7e 15#include "wx/univ/inpcons.h"
b5435dcc 16#include "wx/arrstr.h"
fe9fea7e 17
71e03035 18// ----------------------------------------------------------------------------
7b6fefbe 19// wxStatusBarUniv: a window near the bottom of the frame used for status info
71e03035
VZ
20// ----------------------------------------------------------------------------
21
4ed7b577 22class WXDLLIMPEXP_CORE wxStatusBarUniv : public wxStatusBarBase
71e03035
VZ
23{
24public:
25 wxStatusBarUniv() { Init(); }
26
27 wxStatusBarUniv(wxWindow *parent,
a290fa5a 28 wxWindowID id = wxID_ANY,
c4c178c1 29 long style = wxSTB_DEFAULT_STYLE,
71e03035
VZ
30 const wxString& name = wxPanelNameStr)
31 {
32 Init();
33
34 (void)Create(parent, id, style, name);
35 }
36
37 bool Create(wxWindow *parent,
a290fa5a 38 wxWindowID id = wxID_ANY,
c4c178c1 39 long style = wxSTB_DEFAULT_STYLE,
71e03035
VZ
40 const wxString& name = wxPanelNameStr);
41
6cf68971 42 // implement base class methods
71e03035
VZ
43 virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
44 virtual void SetStatusWidths(int n, const int widths[]);
45
71e03035 46 virtual bool GetFieldRect(int i, wxRect& rect) const;
71e03035
VZ
47 virtual void SetMinHeight(int height);
48
71e03035
VZ
49 virtual int GetBorderX() const;
50 virtual int GetBorderY() const;
51
6f02a879
VZ
52 // wxInputConsumer pure virtual
53 virtual wxWindow *GetInputWindow() const
5c33522f 54 { return const_cast<wxStatusBar*>(this); }
6f02a879 55
71e03035 56protected:
6cf68971
VZ
57 virtual void DoUpdateStatusText(int i);
58
71e03035
VZ
59 // recalculate the field widths
60 void OnSize(wxSizeEvent& event);
61
62 // draw the statusbar
63 virtual void DoDraw(wxControlRenderer *renderer);
64
71e03035
VZ
65 // tell them about our preferred height
66 virtual wxSize DoGetBestSize() const;
67
68 // override DoSetSize() to prevent the status bar height from changing
69 virtual void DoSetSize(int x, int y,
70 int width, int height,
71 int sizeFlags = wxSIZE_AUTO);
72
73 // get the (fixed) status bar height
74 wxCoord GetHeight() const;
75
76 // get the rectangle containing all the fields and the border between them
77 //
78 // also updates m_widthsAbs if necessary
79 wxRect GetTotalFieldRect(wxCoord *borderBetweenFields);
80
069d493e 81 // get the rect for this field without ani side effects (see code)
4077bf8d
JS
82 wxRect DoGetFieldRect(int n) const;
83
71e03035
VZ
84 // common part of all ctors
85 void Init();
86
87private:
7b6fefbe 88 // the current status fields strings
0cd15959 89 //wxArrayString m_statusText;
71e03035
VZ
90
91 // the absolute status fields widths
92 wxArrayInt m_widthsAbs;
93
94 DECLARE_DYNAMIC_CLASS(wxStatusBarUniv)
95 DECLARE_EVENT_TABLE()
96 WX_DECLARE_INPUT_CONSUMER()
97};
98
99#endif // _WX_UNIV_STATUSBR_H_
100