]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/statusbr.h
Further backward comp. changes for printing.
[wxWidgets.git] / include / wx / generic / statusbr.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
ed791986
VZ
2// Name: wx/generic/statusbr.h
3// Purpose: wxStatusBarGeneric class
c801d85f 4// Author: Julian Smart
ed791986 5// Modified by: VZ at 05.02.00 to derive from wxStatusBarBase
c801d85f
KB
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
ed791986 9// Licence: wxWindows license
c801d85f
KB
10/////////////////////////////////////////////////////////////////////////////
11
ed791986
VZ
12#ifndef _WX_GENERIC_STATUSBR_H_
13#define _WX_GENERIC_STATUSBR_H_
c801d85f 14
af49c4b8 15#if defined(__GNUG__) && !defined(__APPLE__)
c801d85f
KB
16#pragma interface "statusbr.h"
17#endif
18
ac57418f
RR
19#include "wx/pen.h"
20#include "wx/font.h"
af07f174 21#include "wx/statusbr.h"
c801d85f 22
908d4516 23WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
c801d85f 24
ed791986 25class WXDLLEXPORT wxStatusBarGeneric : public wxStatusBarBase
c801d85f 26{
c801d85f 27public:
390015c0 28 wxStatusBarGeneric() { Init(); }
ed791986
VZ
29 wxStatusBarGeneric(wxWindow *parent,
30 wxWindowID id,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 long style = 0,
34 const wxString& name = wxPanelNameStr)
c801d85f 35 {
390015c0
VZ
36 Init();
37
c801d85f
KB
38 Create(parent, id, pos, size, style, name);
39 }
ed791986 40 wxStatusBarGeneric(wxWindow *parent,
390015c0
VZ
41 wxWindowID id,
42 long style,
43 const wxString& name = wxPanelNameStr)
ed791986 44 {
390015c0
VZ
45 Init();
46
ed791986
VZ
47 Create(parent, id, style, name);
48 }
49
390015c0 50 virtual ~wxStatusBarGeneric();
c801d85f 51
ed791986
VZ
52 bool Create(wxWindow *parent, wxWindowID id,
53 const wxPoint& WXUNUSED(pos) = wxDefaultPosition,
54 const wxSize& WXUNUSED(size) = wxDefaultSize,
55 long style = 0,
56 const wxString& name = wxPanelNameStr)
57 {
58 return Create(parent, id, style, name);
59 }
c801d85f 60
debe6624 61 bool Create(wxWindow *parent, wxWindowID id,
33ac7e6f 62 long style,
ed791986 63 const wxString& name = wxPanelNameStr);
c801d85f
KB
64
65 // Create status line
ed791986
VZ
66 virtual void SetFieldsCount(int number = 1,
67 const int *widths = (const int *) NULL);
c801d85f
KB
68
69 // Set status line text
debe6624
JS
70 virtual void SetStatusText(const wxString& text, int number = 0);
71 virtual wxString GetStatusText(int number = 0) const;
c801d85f
KB
72
73 // Set status line widths
330043b4 74 virtual void SetStatusWidths(int n, const int widths_field[]);
c801d85f 75
c801d85f 76 // Get the position and size of the field's internal bounding rectangle
16e93305 77 virtual bool GetFieldRect(int i, wxRect& rect) const;
c801d85f 78
ed791986
VZ
79 // sets the minimal vertical size of the status bar
80 virtual void SetMinHeight(int height);
81
82 virtual int GetBorderX() const { return m_borderX; }
83 virtual int GetBorderY() const { return m_borderY; }
c801d85f
KB
84
85 ////////////////////////////////////////////////////////////////////////
86 // Implementation
87
ed791986
VZ
88 virtual void DrawFieldText(wxDC& dc, int i);
89 virtual void DrawField(wxDC& dc, int i);
90
91 void SetBorderX(int x);
92 void SetBorderY(int y);
93
c801d85f 94 void OnPaint(wxPaintEvent& event);
390015c0 95 void OnSize(wxSizeEvent& event);
c801d85f 96
330043b4 97 virtual void InitColours();
c801d85f
KB
98
99 // Responds to colour changes
100 void OnSysColourChanged(wxSysColourChangedEvent& event);
101
102protected:
390015c0
VZ
103 // common part of all ctors
104 void Init();
105
76880b87 106 wxArrayString m_statusStrings;
390015c0
VZ
107
108 // the widths of the status bar panes in pixels
109 wxArrayInt m_widthsAbs;
110
c801d85f
KB
111 int m_borderX;
112 int m_borderY;
113 wxFont m_defaultStatusBarFont;
114 wxPen m_mediumShadowPen;
115 wxPen m_hilightPen;
116
ed791986 117private:
c801d85f 118 DECLARE_EVENT_TABLE()
ed791986 119 DECLARE_DYNAMIC_CLASS(wxStatusBarGeneric)
c801d85f
KB
120};
121
122#endif
ed791986 123 // _WX_GENERIC_STATUSBR_H_
76880b87
RL
124
125// vi:sts=4:sw=4:et