]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/statusbr.h
Checking for wxUSE_SOCKETS and __GSOCKET_STANDALONE__ should be right, now
[wxWidgets.git] / include / wx / generic / statusbr.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: statusbr.h
3// Purpose: wxStatusBar class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __STATUSBRH_G__
13#define __STATUSBRH_G__
14
15#ifdef __GNUG__
16#pragma interface "statusbr.h"
17#endif
18
19#include "wx/window.h"
ac57418f
RR
20#include "wx/pen.h"
21#include "wx/font.h"
c801d85f 22
908d4516 23WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
c801d85f
KB
24
25class WXDLLEXPORT wxStatusBar: public wxWindow
26{
27 DECLARE_DYNAMIC_CLASS(wxStatusBar)
28
29public:
30 wxStatusBar(void);
debe6624 31 inline wxStatusBar(wxWindow *parent, wxWindowID id,
c801d85f
KB
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
debe6624 34 long style = 0,
c801d85f
KB
35 const wxString& name = wxPanelNameStr)
36 {
37 Create(parent, id, pos, size, style, name);
38 }
39
330043b4 40 ~wxStatusBar();
c801d85f 41
debe6624 42 bool Create(wxWindow *parent, wxWindowID id,
c801d85f
KB
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
debe6624 45 long style = 0,
c801d85f
KB
46 const wxString& name = wxPanelNameStr);
47
48 // Create status line
c67daf87 49 virtual void SetFieldsCount(int number=1, const int widths[] = (const int *) NULL);
330043b4 50 inline int GetFieldsCount() const { return m_nFields; }
c801d85f
KB
51
52 // Set status line text
debe6624
JS
53 virtual void SetStatusText(const wxString& text, int number = 0);
54 virtual wxString GetStatusText(int number = 0) const;
c801d85f
KB
55
56 // Set status line widths
330043b4 57 virtual void SetStatusWidths(int n, const int widths_field[]);
c801d85f 58
debe6624
JS
59 virtual void DrawFieldText(wxDC& dc, int i);
60 virtual void DrawField(wxDC& dc, int i);
c801d85f
KB
61
62 // Get the position and size of the field's internal bounding rectangle
16e93305 63 virtual bool GetFieldRect(int i, wxRect& rect) const;
c801d85f 64
330043b4
VZ
65 inline int GetBorderX() const { return m_borderX; }
66 inline int GetBorderY() const { return m_borderY; }
debe6624
JS
67 inline void SetBorderX(int x);
68 inline void SetBorderY(int y);
c801d85f
KB
69
70 ////////////////////////////////////////////////////////////////////////
71 // Implementation
72
73 void OnPaint(wxPaintEvent& event);
74
330043b4 75 virtual void InitColours();
c801d85f
KB
76
77 // Responds to colour changes
78 void OnSysColourChanged(wxSysColourChangedEvent& event);
79
80protected:
81 int * m_statusWidths;
82 int m_nFields;
83 wxString * m_statusStrings;
84 int m_borderX;
85 int m_borderY;
86 wxFont m_defaultStatusBarFont;
87 wxPen m_mediumShadowPen;
88 wxPen m_hilightPen;
89
90 DECLARE_EVENT_TABLE()
91};
92
93#endif
94 // __STATUSBRH_G__