1998-05-20 14:25:30 +00:00
|
|
|
\section{\class{wxStatusBar}}\label{wxstatusbar}
|
|
|
|
|
|
|
|
A status bar is a narrow window that can be placed along the bottom of a frame to give
|
|
|
|
small amounts of status information. It can contain one or more fields, one or more of which can
|
|
|
|
be variable length according to the size of the window.
|
|
|
|
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
|
|
|
\wxheading{Window styles}
|
|
|
|
|
1998-07-27 09:47:57 +00:00
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{\windowstyle{wxSB\_SIZEGRIP}}{On Windows 95, displays a gripper at right-hand side of
|
|
|
|
the status bar.}
|
|
|
|
\end{twocollist}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
See also \helpref{window styles overview}{windowstyles}.
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
It is possible to create controls and other windows on the status bar. Position these windows
|
|
|
|
from an {\bf OnSize} event handler.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxFrame}{wxframe}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::wxStatusBar}\label{wxstatusbarconstr}
|
|
|
|
|
|
|
|
\func{}{wxStatusBar}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{}{wxStatusBar}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
|
|
|
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
|
|
|
|
\param{const wxString\& }{name = ``statusBar"}}
|
|
|
|
|
|
|
|
Constructor, creating the window.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{parent}{The window parent, usually a frame.}
|
|
|
|
|
|
|
|
\docparam{id}{The window identifier. It may take a value of -1 to indicate a default value.}
|
|
|
|
|
|
|
|
\docparam{pos}{The window position. A value of (-1, -1) indicates a default position, chosen by
|
|
|
|
either the windowing system or wxWindows, depending on platform.}
|
|
|
|
|
|
|
|
\docparam{size}{The window size. A value of (-1, -1) indicates a default size, chosen by
|
|
|
|
either the windowing system or wxWindows, depending on platform.}
|
|
|
|
|
|
|
|
\docparam{style}{The window style. See \helpref{wxStatusBar}{wxstatusbar}.}
|
|
|
|
|
|
|
|
\docparam{name}{The name of the window. This parameter is used to associate a name with the item,
|
|
|
|
allowing the application user to set Motif resource values for
|
|
|
|
individual windows.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::Create}{wxstatusbarcreate}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::\destruct{wxStatusBar}}
|
|
|
|
|
|
|
|
\func{void}{\destruct{wxStatusBar}}{\void}
|
|
|
|
|
|
|
|
Destructor.
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::Create}\label{wxstatusbarcreate}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp
|
|
|
|
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp
|
|
|
|
\param{const wxString\& }{name = ``statusBar"}}
|
|
|
|
|
|
|
|
Creates the window, for two-step construction.
|
|
|
|
|
|
|
|
See \helpref{wxStatusBar::wxStatusBar}{wxstatusbarconstr} for details.
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::GetFieldRect}\label{wxstatusbargetfieldrect}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\constfunc{virtual bool}{GetFieldRect}{\param{int}{ i}, \param{wxRect\&}{ rect}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the size and position of a fields internal bounding rectangle.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{i}{The field in question.}
|
|
|
|
|
|
|
|
\docparam{rect}{The rectangle values are placed in this variable.}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
TRUE if the field index is valid, FALSE otherwise.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxRect}{wxrect}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::GetFieldsCount}\label{wxstatusbargetfieldscount}
|
|
|
|
|
|
|
|
\constfunc{int}{GetFieldsCount}{\void}
|
|
|
|
|
|
|
|
Returns the number of fields in the status bar.
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::GetStatusText}\label{wxstatusbargetstatustext}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\constfunc{virtual wxString}{GetStatusText}{\param{int}{ ir = 0}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Returns the string associated with a status bar field.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{i}{The number of the status field to retrieve, starting from zero.}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
The status field string if the field is valid, otherwise the empty string.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::SetStatusText}{wxstatusbarsetstatustext}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::DrawField}\label{wxstatusbardrawfield}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{virtual void}{DrawField}{\param{wxDC\& }{dc}, \param{int }{i}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Draws a field, including shaded borders and text.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{dc}{The device context to draw onto.}
|
|
|
|
|
|
|
|
\docparam{i}{The field to be drawn.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::DrawFieldText}{wxstatusbardrawfieldtext}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::DrawFieldText}\label{wxstatusbardrawfieldtext}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{virtual void}{DrawFieldText}{\param{wxDC\& }{dc}, \param{int }{i}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Draws a field's text.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{dc}{The device context to draw onto.}
|
|
|
|
|
|
|
|
\docparam{i}{The field whose text is to be drawn.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::DrawField}{wxstatusbardrawfield}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::InitColours}\label{wxstatusbarinitcolours}
|
|
|
|
|
|
|
|
\func{virtual void}{InitColours}{\void}
|
|
|
|
|
|
|
|
Sets up the background colour and shading pens using suitable system colours (Windows) or tasteful shades
|
|
|
|
of grey (other platforms).
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
This function is called when the window is created, and also
|
|
|
|
from \helpref{wxStatusBar::OnSysColourChanged}{wxstatusbaronsyscolourchanged} on Windows.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::OnSysColourChanged}{wxstatusbaronsyscolourchanged}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::OnSysColourChanged}\label{wxstatusbaronsyscolourchanged}
|
|
|
|
|
|
|
|
\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}}
|
|
|
|
|
|
|
|
Handles a system colour change by calling \helpref{wxStatusBar::InitColours}{wxstatusbarinitcolours},
|
|
|
|
and refreshes the window.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{event}{The colour change event.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::InitColours}{wxstatusbarinitcolours}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::SetFieldsCount}\label{wxstatusbarsetfieldscount}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{virtual void}{SetFieldsCount}{\param{int}{ number = 1}, \param{int* }{widths = NULL}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the number of fields, and optionally the field widths.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{number}{The number of fields.}
|
|
|
|
|
|
|
|
\docparam{widths}{An array of {\it n} integers, each of which is a status field width
|
|
|
|
in pixels. A value of -1 indicates that the field is variable width; at least one
|
|
|
|
field must be -1.}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::SetStatusText}\label{wxstatusbarsetstatustext}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{virtual void}{SetStatusText}{\param{const wxString\& }{text}, \param{int}{ i = 0}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the text for one field.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{text}{The text to be set. Use an empty string (``") to clear the field.}
|
|
|
|
|
|
|
|
\docparam{i}{The field to set, starting from zero.}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::GetStatusText}{wxstatusbargetstatustext}, \helpref{wxFrame::SetStatusText}{wxframesetstatustext}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::SetStatusWidths}\label{wxstatusbarsetstatuswidths}
|
|
|
|
|
1998-06-14 12:11:50 +00:00
|
|
|
\func{virtual void}{SetStatusWidths}{\param{int}{ n}, \param{int *}{widths}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
Sets the widths of the fields in the status line.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{n}{The number of fields in the status bar.}
|
|
|
|
|
|
|
|
\docparam{widths}{Must contain an array of {\it n} integers, each of which is a status field width
|
|
|
|
in pixels. A value of -1 indicates that the field is variable width; at least one
|
|
|
|
field must be -1. You should delete this array after calling {\bf SetStatusWidths}.}
|
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
The widths of the variable fields are calculated from the total width of all fields,
|
|
|
|
minus the sum of widths of the non-variable fields, divided by the number of
|
|
|
|
variable fields.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::SetFieldsCount}{wxstatusbarsetfieldscount}, \helpref{wxFrame::SetStatusWidths}{wxframesetstatuswidths}
|
|
|
|
|
|
|
|
|