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}
|
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxWindow}{wxwindow}\\
|
|
|
|
\helpref{wxEvtHandler}{wxevthandler}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/statusbr.h>
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\wxheading{Window styles}
|
|
|
|
|
1998-07-27 09:47:57 +00:00
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
2002-02-19 13:41:24 +00:00
|
|
|
\twocolitem{\windowstyle{wxST\_SIZEGRIP}}{On Windows 95, displays a gripper at right-hand side of
|
1998-07-27 09:47:57 +00:00
|
|
|
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}
|
|
|
|
|
2000-02-04 20:27:10 +00:00
|
|
|
\helpref{wxFrame}{wxframe}, \helpref{Status bar sample}{samplestatbar}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\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
|
2002-08-27 18:59:25 +00:00
|
|
|
\param{long}{ style = wxST\_SIZEGRIP},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\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{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
|
2002-08-27 18:59:25 +00:00
|
|
|
\param{long}{ style = wxST\_SIZEGRIP},\rtfsp
|
1998-05-20 14:25:30 +00:00
|
|
|
\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
|
|
|
|
2004-02-20 17:04:39 +00:00
|
|
|
Returns the size and position of a field's internal bounding rectangle.
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{i}{The field in question.}
|
|
|
|
|
|
|
|
\docparam{rect}{The rectangle values are placed in this variable.}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
2003-01-18 00:16:34 +00:00
|
|
|
true if the field index is valid, false otherwise.
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxRect}{wxrect}
|
|
|
|
|
2001-11-23 22:08:45 +00:00
|
|
|
\perlnote{In wxPerl this function returns a {\tt Wx::Rect} if the field
|
|
|
|
index is valid, {\tt undef} otherwise.}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxStatusBar::GetFieldsCount}\label{wxstatusbargetfieldscount}
|
|
|
|
|
|
|
|
\constfunc{int}{GetFieldsCount}{\void}
|
|
|
|
|
|
|
|
Returns the number of fields in the status bar.
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::GetStatusText}\label{wxstatusbargetstatustext}
|
|
|
|
|
2004-02-20 17:04:39 +00:00
|
|
|
\constfunc{virtual wxString}{GetStatusText}{\param{int}{ i = 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}
|
|
|
|
|
2002-08-31 16:27:35 +00:00
|
|
|
\membersection{wxStatusBar::PopStatusText}\label{wxstatusbarpopstatustext}
|
2002-05-02 20:09:25 +00:00
|
|
|
|
|
|
|
\func{void}{PopStatusText}{\param{int}{ field = 0}}
|
|
|
|
|
|
|
|
Sets the field text to the top of the stack, and pops the stack of saved
|
|
|
|
strings.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::PushStatusText}{wxstatusbarpushstatustext}
|
|
|
|
|
|
|
|
\membersection{wxStatusBar::PushStatusText}\label{wxstatusbarpushstatustext}
|
|
|
|
|
2003-06-22 22:20:40 +00:00
|
|
|
\func{void}{PushStatusText}{\param{const wxString\&}{ string}, \param{int}{ field = 0}}
|
2002-05-02 20:09:25 +00:00
|
|
|
|
|
|
|
Saves the current field text in a per field stack, and sets the field text
|
|
|
|
to the string passed as argument.
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\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.
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
\pythonnote{Only the first parameter is accepted. Use SetStatusWidths
|
|
|
|
to set the widths of the fields.}
|
|
|
|
|
2002-06-07 20:15:28 +00:00
|
|
|
\perlnote{In wxPerl this function accepts only the {\tt n} parameter.
|
2000-12-20 16:10:46 +00:00
|
|
|
Use SetStatusWidths to set the field widths.}
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{number}{The number of fields.}
|
|
|
|
|
2002-09-04 13:16:46 +00:00
|
|
|
\docparam{widths}{An array of {\it n} integers interpreted in the same way as
|
|
|
|
in \helpref{SetStatusWidths}{wxstatusbarsetstatuswidths}}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
2000-02-05 02:07:38 +00:00
|
|
|
\membersection{wxStatusBar::SetMinHeight}\label{wxstatusbarsetminheight}
|
|
|
|
|
|
|
|
\func{void}{SetMinHeight}{\param{int}{ height}}
|
|
|
|
|
2004-02-20 17:04:39 +00:00
|
|
|
Sets the minimal possible height for the status bar. The real height may be
|
2000-02-05 02:07:38 +00:00
|
|
|
bigger than the height specified here depending on the size of the font used by
|
|
|
|
the status bar.
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\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
|
|
|
|
2001-10-14 21:38:58 +00:00
|
|
|
Sets the widths of the fields in the status line. There are two types of
|
|
|
|
fields: fixed widths one and variable width fields. For the fixed width fields
|
|
|
|
you should specify their (constant) width in pixels. For the variable width
|
|
|
|
fields, specify a negative number which indicates how should the field expand:
|
|
|
|
the space left for all variable width fields is divided between them according
|
|
|
|
to the absolute value of this number. A variable width field with width of $-2$
|
|
|
|
gets twice as much of it as a field with width $-1$ and so on.
|
|
|
|
|
|
|
|
For example, to create one fixed width field of width $50$ in the right part of
|
|
|
|
the status bar and two more fields which get $66$\% and $33$\% of the remaining
|
|
|
|
space correspondingly, you should use an array containing $-2$, $-1$ and $100$.
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
2001-10-14 21:38:58 +00:00
|
|
|
\docparam{n}{The number of fields in the status bar. Must be equal to the
|
|
|
|
number passed to \helpref{SetFieldsCount}{wxstatusbarsetfieldscount} the last
|
|
|
|
time it was called.}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
2001-10-14 21:38:58 +00:00
|
|
|
\docparam{widths}{Contains an array of {\it n} integers, each of which is
|
|
|
|
either an absolute status field width in pixels if positive or indicates a
|
|
|
|
variable width field if negative}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\wxheading{Remarks}
|
|
|
|
|
|
|
|
The widths of the variable fields are calculated from the total width of all fields,
|
1999-11-13 08:15:30 +00:00
|
|
|
minus the sum of widths of the non-variable fields, divided by the number of
|
1998-05-20 14:25:30 +00:00
|
|
|
variable fields.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStatusBar::SetFieldsCount}{wxstatusbarsetfieldscount}, \helpref{wxFrame::SetStatusWidths}{wxframesetstatuswidths}
|
|
|
|
|
1999-11-13 08:15:30 +00:00
|
|
|
\pythonnote{Only a single parameter is required, a Python list of
|
|
|
|
integers.}
|
|
|
|
|
2000-12-20 16:10:46 +00:00
|
|
|
\perlnote{In wxPerl this method takes as parameters the field widths.}
|
2001-04-25 15:38:00 +00:00
|
|
|
|
2004-07-25 16:13:52 +00:00
|
|
|
\membersection{wxStatusBar::SetStatusStyles}\label{wxstatusbarsetstatusstyles}
|
|
|
|
|
|
|
|
\func{virtual void}{SetStatusStyles}{\param{int}{ n}, \param{int *}{styles}}
|
|
|
|
|
|
|
|
Sets the styles of the fields in the status line which can make fields appear flat
|
|
|
|
or raised instead of the standard sunken 3D border.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{n}{The number of fields in the status bar. Must be equal to the
|
|
|
|
number passed to \helpref{SetFieldsCount}{wxstatusbarsetfieldscount} the last
|
|
|
|
time it was called.}
|
|
|
|
|
|
|
|
\docparam{styles}{Contains an array of {\it n} integers with the styles for each field. There
|
|
|
|
are three possible styles:
|
|
|
|
|
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
|
|
|
\twocolitem{\windowstyle{wxSB\_NORMAL}}{(default) The field appears sunken with a standard 3D border.}
|
|
|
|
\twocolitem{\windowstyle{wxSB\_FLAT}}{No border is painted around the field so that it appears flat.}
|
|
|
|
\twocolitem{\windowstyle{wxSB\_RAISED}}{A raised 3D border is painted around the field.}
|
|
|
|
\end{twocollist}
|
2004-07-25 17:45:15 +00:00
|
|
|
}
|
2004-07-25 16:13:52 +00:00
|
|
|
|
|
|
|
|