]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/statusbr.h
Avoid setting attributes in GTK wxDataViewRenderer if not supported.
[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
53a2db12 22class WXDLLIMPEXP_CORE wxStatusBarUniv : public wxStatusBarBase,
c4c178c1 23 public wxInputConsumer
71e03035
VZ
24{
25public:
26 wxStatusBarUniv() { Init(); }
27
28 wxStatusBarUniv(wxWindow *parent,
a290fa5a 29 wxWindowID id = wxID_ANY,
c4c178c1 30 long style = wxSTB_DEFAULT_STYLE,
71e03035
VZ
31 const wxString& name = wxPanelNameStr)
32 {
33 Init();
34
35 (void)Create(parent, id, style, name);
36 }
37
38 bool Create(wxWindow *parent,
a290fa5a 39 wxWindowID id = wxID_ANY,
c4c178c1 40 long style = wxSTB_DEFAULT_STYLE,
71e03035
VZ
41 const wxString& name = wxPanelNameStr);
42
6cf68971 43 // implement base class methods
71e03035
VZ
44 virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
45 virtual void SetStatusWidths(int n, const int widths[]);
46
71e03035 47 virtual bool GetFieldRect(int i, wxRect& rect) const;
71e03035
VZ
48 virtual void SetMinHeight(int height);
49
71e03035
VZ
50 virtual int GetBorderX() const;
51 virtual int GetBorderY() const;
52
6f02a879
VZ
53 // wxInputConsumer pure virtual
54 virtual wxWindow *GetInputWindow() const
5c33522f 55 { return const_cast<wxStatusBar*>(this); }
6f02a879 56
71e03035 57protected:
6cf68971
VZ
58 virtual void DoUpdateStatusText(int i);
59
71e03035
VZ
60 // recalculate the field widths
61 void OnSize(wxSizeEvent& event);
62
63 // draw the statusbar
64 virtual void DoDraw(wxControlRenderer *renderer);
65
71e03035
VZ
66 // tell them about our preferred height
67 virtual wxSize DoGetBestSize() const;
68
69 // override DoSetSize() to prevent the status bar height from changing
70 virtual void DoSetSize(int x, int y,
71 int width, int height,
72 int sizeFlags = wxSIZE_AUTO);
73
74 // get the (fixed) status bar height
75 wxCoord GetHeight() const;
76
77 // get the rectangle containing all the fields and the border between them
78 //
79 // also updates m_widthsAbs if necessary
80 wxRect GetTotalFieldRect(wxCoord *borderBetweenFields);
81
069d493e 82 // get the rect for this field without ani side effects (see code)
4077bf8d
JS
83 wxRect DoGetFieldRect(int n) const;
84
71e03035
VZ
85 // common part of all ctors
86 void Init();
87
88private:
7b6fefbe 89 // the current status fields strings
0cd15959 90 //wxArrayString m_statusText;
71e03035
VZ
91
92 // the absolute status fields widths
93 wxArrayInt m_widthsAbs;
94
95 DECLARE_DYNAMIC_CLASS(wxStatusBarUniv)
96 DECLARE_EVENT_TABLE()
97 WX_DECLARE_INPUT_CONSUMER()
98};
99
100#endif // _WX_UNIV_STATUSBR_H_
101