X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/564747ee85db2e4243a5d78e4d08037142648286..598e55d7143d4fca6cd7e2562cff5310671b7cd3:/docs/latex/wx/statusbr.tex diff --git a/docs/latex/wx/statusbr.tex b/docs/latex/wx/statusbr.tex index 924eb542d2..cc7a3d3b67 100644 --- a/docs/latex/wx/statusbr.tex +++ b/docs/latex/wx/statusbr.tex @@ -22,7 +22,7 @@ be variable length according to the size of the window. \twocolwidtha{5cm} \begin{twocollist}\itemsep=0pt -\twocolitem{\windowstyle{wxSB\_SIZEGRIP}}{On Windows 95, displays a gripper at right-hand side of +\twocolitem{\windowstyle{wxST\_SIZEGRIP}}{On Windows 95, displays a gripper at right-hand side of the status bar.} \end{twocollist} @@ -35,19 +35,18 @@ from an {\bf OnSize} event handler. \wxheading{See also} -\helpref{wxFrame}{wxframe} +\helpref{wxFrame}{wxframe}, \helpref{Status bar sample}{samplestatbar} \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxStatusBar::wxStatusBar}\label{wxstatusbarconstr} +\membersection{wxStatusBar::wxStatusBar}\label{wxstatusbarctor} \func{}{wxStatusBar}{\void} Default constructor. -\func{}{wxStatusBar}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp +\func{}{wxStatusBar}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY},\rtfsp +\param{long}{ style = wxST\_SIZEGRIP},\rtfsp \param{const wxString\& }{name = ``statusBar"}} Constructor, creating the window. @@ -58,12 +57,6 @@ Constructor, creating the window. \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, @@ -74,7 +67,7 @@ individual windows.} \helpref{wxStatusBar::Create}{wxstatusbarcreate} -\membersection{wxStatusBar::\destruct{wxStatusBar}} +\membersection{wxStatusBar::\destruct{wxStatusBar}}\label{wxstatusbardtor} \func{void}{\destruct{wxStatusBar}}{\void} @@ -82,20 +75,19 @@ Destructor. \membersection{wxStatusBar::Create}\label{wxstatusbarcreate} -\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp -\param{const wxPoint\&}{ pos = wxDefaultPosition},\rtfsp -\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0},\rtfsp +\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY},\rtfsp +\param{long}{ style = wxST\_SIZEGRIP},\rtfsp \param{const wxString\& }{name = ``statusBar"}} Creates the window, for two-step construction. -See \helpref{wxStatusBar::wxStatusBar}{wxstatusbarconstr} for details. +See \helpref{wxStatusBar::wxStatusBar}{wxstatusbarctor} for details. \membersection{wxStatusBar::GetFieldRect}\label{wxstatusbargetfieldrect} \constfunc{virtual bool}{GetFieldRect}{\param{int}{ i}, \param{wxRect\&}{ rect}} -Returns the size and position of a fields internal bounding rectangle. +Returns the size and position of a field's internal bounding rectangle. \wxheading{Parameters} @@ -105,12 +97,15 @@ Returns the size and position of a fields internal bounding rectangle. \wxheading{Return value} -TRUE if the field index is valid, FALSE otherwise. +true if the field index is valid, false otherwise. \wxheading{See also} \helpref{wxRect}{wxrect} +\perlnote{In wxPerl this function returns a {\tt Wx::Rect} if the field + index is valid, {\tt undef} otherwise.} + \membersection{wxStatusBar::GetFieldsCount}\label{wxstatusbargetfieldscount} \constfunc{int}{GetFieldsCount}{\void} @@ -119,7 +114,7 @@ Returns the number of fields in the status bar. \membersection{wxStatusBar::GetStatusText}\label{wxstatusbargetstatustext} -\constfunc{virtual wxString}{GetStatusText}{\param{int}{ ir = 0}} +\constfunc{virtual wxString}{GetStatusText}{\param{int}{ i = 0}} Returns the string associated with a status bar field. @@ -135,82 +130,50 @@ The status field string if the field is valid, otherwise the empty string. \helpref{wxStatusBar::SetStatusText}{wxstatusbarsetstatustext} -\membersection{wxStatusBar::DrawField}\label{wxstatusbardrawfield} - -\func{virtual void}{DrawField}{\param{wxDC\& }{dc}, \param{int }{i}} - -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::PopStatusText}\label{wxstatusbarpopstatustext} -\membersection{wxStatusBar::DrawFieldText}\label{wxstatusbardrawfieldtext} +\func{void}{PopStatusText}{\param{int}{ field = 0}} -\func{virtual void}{DrawFieldText}{\param{wxDC\& }{dc}, \param{int }{i}} - -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.} +Sets the field text to the top of the stack, and pops the stack of saved +strings. \wxheading{See also} -\helpref{wxStatusBar::DrawField}{wxstatusbardrawfield} - -\membersection{wxStatusBar::InitColours}\label{wxstatusbarinitcolours} +\helpref{wxStatusBar::PushStatusText}{wxstatusbarpushstatustext} -\func{virtual void}{InitColours}{\void} +\membersection{wxStatusBar::PushStatusText}\label{wxstatusbarpushstatustext} -Sets up the background colour and shading pens using suitable system colours (Windows) or tasteful shades -of grey (other platforms). +\func{void}{PushStatusText}{\param{const wxString\&}{ string}, \param{int}{ field = 0}} -\wxheading{Remarks} - -This function is called when the window is created, and also -from \helpref{wxStatusBar::OnSysColourChanged}{wxstatusbaronsyscolourchanged} on Windows. +Saves the current field text in a per field stack, and sets the field text +to the string passed as argument. -\wxheading{See also} +\membersection{wxStatusBar::SetFieldsCount}\label{wxstatusbarsetfieldscount} -\helpref{wxStatusBar::OnSysColourChanged}{wxstatusbaronsyscolourchanged} +\func{virtual void}{SetFieldsCount}{\param{int}{ number = 1}, \param{int* }{widths = NULL}} -\membersection{wxStatusBar::OnSysColourChanged}\label{wxstatusbaronsyscolourchanged} +Sets the number of fields, and optionally the field widths. -\func{void}{OnSysColourChanged}{\param{wxSysColourChangedEvent\& }{event}} +\pythonnote{Only the first parameter is accepted. Use SetStatusWidths +to set the widths of the fields.} -Handles a system colour change by calling \helpref{wxStatusBar::InitColours}{wxstatusbarinitcolours}, -and refreshes the window. +\perlnote{In wxPerl this function accepts only the {\tt n} parameter. +Use SetStatusWidths to set the field widths.} \wxheading{Parameters} -\docparam{event}{The colour change event.} - -\wxheading{See also} - -\helpref{wxStatusBar::InitColours}{wxstatusbarinitcolours} - -\membersection{wxStatusBar::SetFieldsCount}\label{wxstatusbarsetfieldscount} - -\func{virtual void}{SetFieldsCount}{\param{int}{ number = 1}, \param{int* }{widths = NULL}} +\docparam{number}{The number of fields.} -Sets the number of fields, and optionally the field widths. +\docparam{widths}{An array of {\it n} integers interpreted in the same way as +in \helpref{SetStatusWidths}{wxstatusbarsetstatuswidths}} -\wxheading{Parameters} +\membersection{wxStatusBar::SetMinHeight}\label{wxstatusbarsetminheight} -\docparam{number}{The number of fields.} +\func{void}{SetMinHeight}{\param{int}{ height}} -\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.} +Sets the minimal possible height for the status bar. The real height may be +bigger than the height specified here depending on the size of the font used by +the status bar. \membersection{wxStatusBar::SetStatusText}\label{wxstatusbarsetstatustext} @@ -232,15 +195,27 @@ Sets the text for one field. \func{virtual void}{SetStatusWidths}{\param{int}{ n}, \param{int *}{widths}} -Sets the widths of the fields in the status line. +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 the field should 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 $100$ 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$. \wxheading{Parameters} -\docparam{n}{The number of fields in the status bar.} +\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{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}.} +\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.} \wxheading{Remarks} @@ -255,4 +230,30 @@ variable fields. \pythonnote{Only a single parameter is required, a Python list of integers.} +\perlnote{In wxPerl this method takes as parameters the field widths.} + +\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} +} +