]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/statusbr.h
Implemented Mac-style button toggling within wxButtonToolBar, and line
[wxWidgets.git] / include / wx / palmos / statusbr.h
CommitLineData
ffecfa5a 1///////////////////////////////////////////////////////////////////////////////
e1d63b79 2// Name: wx/palmos/statusbr.h
ffecfa5a 3// Purpose: Palm OS implementation of wxStatusBar
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_STATUSBR_H_
13#define _WX_STATUSBR_H_
14
ffecfa5a
JS
15#if wxUSE_NATIVE_STATUSBAR
16
17class WXDLLEXPORT wxStatusBarPalm : public wxStatusBarBase
18{
19public:
20 // ctors and such
21 wxStatusBarPalm();
22 wxStatusBarPalm(wxWindow *parent,
b08cd3bf
WS
23 wxWindowID id = wxID_ANY,
24 long style = wxST_SIZEGRIP,
25 const wxString& name = wxEmptyString)
ffecfa5a
JS
26 {
27 (void)Create(parent, id, style, name);
28 }
29
30 bool Create(wxWindow *parent,
b08cd3bf 31 wxWindowID id = wxID_ANY,
ffecfa5a
JS
32 long style = wxST_SIZEGRIP,
33 const wxString& name = wxEmptyString);
34
35 virtual ~wxStatusBarPalm();
36
b08cd3bf
WS
37 // for native status bar use native check for visibility
38 virtual bool IsShown() const;
39 virtual bool Show( bool show = true );
40
ffecfa5a
JS
41 // a status line can have several (<256) fields numbered from 0
42 virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
43
44 // each field of status line has it's own text
45 virtual void SetStatusText(const wxString& text, int number = 0);
46 virtual wxString GetStatusText(int number = 0) const;
47
48 // set status line fields' widths
49 virtual void SetStatusWidths(int n, const int widths_field[]);
50
51 // sets the minimal vertical size of the status bar
52 virtual void SetMinHeight(int height);
53
54 // get the position and size of the field's internal bounding rectangle
55 virtual bool GetFieldRect(int i, wxRect& rect) const;
56
57 // get the border size
58 virtual int GetBorderX() const;
59 virtual int GetBorderY() const;
e1d63b79 60
ffecfa5a
JS
61 void DrawStatusBar();
62
63protected:
64 void CopyFieldsWidth(const int widths[]);
65 void SetFieldsWidth();
66
67 // store the text in the status bar
68 wxListString **StatusTextBuffer;
69 void SetStatusBufferText(const wxString& text, int number);
70 wxString GetStatusBufferText(int number);
71 wxListString *GetOrCreateStatusBuffer(int i);
72 wxListString *GetStatusBufferStack(int i) const;
e1d63b79 73 void DeleteStatusBuffer();
ffecfa5a
JS
74
75 // override base class virtual
76 void DoMoveWindow(int x, int y, int width, int height);
77
78private:
79 DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarPalm)
80};
81
82#endif // wxUSE_NATIVE_STATUSBAR
83
84#endif