class PStatusBar: public PToolBar

A class representing a tool bar consisting of a series of static text controls with 3-D borders.

Inheritance:


Public

[more] Construction
[more] Overrides from PInteractor
[more] New functions for class

Protected Methods

[more]Section& GetSection ( PINDEX section ) const
Get the specified section of the status bar.


Inherited from PToolBar:

Protected

Overrides from class PInteractor


Inherited from PInteractorLayout:

Public Methods

ovirtual void SetFocusInteractor( PInteractor * interactor )
ovirtual PInteractor* GetFocusInteractor() const
oPControl* GetControl( PRESOURCE_ID id )
ovoid UpdateControls()

Protected Fields

oPInteractor* focusInteractor

Protected Methods

ovirtual void ConstructEnd( PRESOURCE_ID resID )


Inherited from PInteractor:

Public Classes

oenum PositionOrigin
oenum CoordinateSystem
oenum AutoAdjustType

Public Fields

oPCursor cursor

Public Methods

ovirtual Comparison Compare( const PObject & obj ) const
oPInteractor* GetParent() const
oBOOL IsChild( PInteractor * parent ) const
oPINDEX GetNumChildren()
oPInteractor& operator[]( PINDEX index )
ovirtual void UpdateCommandSources()
ovirtual void SetFont( const PFont & newFont, BOOL toChildren = TRUE )
oconst PRealFont& GetFont()
oPDIMENSION ToPixelsDX( PDIMENSION x ) const
oPDIMENSION ToPixelsDY( PDIMENSION y ) const
oPORDINATE ToPixelsX( PORDINATE x ) const
oPORDINATE ToPixelsY( PORDINATE y ) const
oPDim ToPixels( const PDim & dim ) const
oPPoint ToPixels( const PPoint & pt ) const
oPRect ToPixels( const PRect & r ) const
oPDIMENSION FromPixelsDX( PDIMENSION x ) const
oPDIMENSION FromPixelsDY( PDIMENSION y ) const
oPORDINATE FromPixelsX( PORDINATE x ) const
oPORDINATE FromPixelsY( PORDINATE y ) const
oPDim FromPixels( const PDim & dim ) const
oPPoint FromPixels( const PPoint & pt ) const
oPRect FromPixels( const PRect & r ) const
ovoid SetPosition( PORDINATE x, PORDINATE y, PositionOrigin xOrigin = TopLeftParent, PositionOrigin yOrigin = TopLeftParent )
oPPoint GetPosition( CoordinateSystem coords ) const
oPPoint ToScreen( PORDINATE x, PORDINATE y, CoordinateSystem coords ) const
oPPoint FromScreen( PORDINATE x, PORDINATE y, CoordinateSystem coords ) const
ovoid SetDimensions( PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
oPDim GetDimensions( CoordinateSystem coords ) const
oPRect GetStructureBounds( CoordinateSystem coords ) const
ovirtual PRect GetDrawingBounds( CoordinateSystem coords ) const
ovoid AutoAdjustBounds( PRect & bounds, AutoAdjustType type = AdjustBounds )
oBOOL ContainsPoint( const PPoint & pt, CoordinateSystem coords ) const
oPInteractor* FindInteractor( const PPoint & pt, CoordinateSystem coords ) const
ovirtual void Enable( BOOL enabled = TRUE )
ovoid Disable()
oBOOL IsEnabled() const
ovirtual void ShowAll()
ovirtual void Show( BOOL visible = TRUE )
ovoid Hide()
oBOOL IsVisible() const
ovirtual void BringToTop()
ovirtual BOOL IsOnTop() const
ovoid Invalidate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovoid Validate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovoid Update()
ovoid GrabMouse()
ovoid ReleaseMouse()
oBOOL HasMouse() const
ovoid GrabFocus()
oBOOL HasFocus() const
ovirtual void SetCursor( const PCursor & newCursor )
oPCursor GetCursor() const
ovoid SetCursorToParent( BOOL useParent = TRUE )
ovoid SetAllCursors( const PCursor & newCursor )
ovoid RestoreAllCursors()
ovoid SetWaitCursor()
ovoid SetCursorPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
oPPoint GetCursorPos( CoordinateSystem coords ) const
ovirtual void ShowCursor( BOOL show = TRUE )
ovoid HideCursor()
ovoid SetCaret( const PCaret & newCaret )
oPCaret GetCaret() const
ovoid SetCaretPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
oPPoint GetCaretPos( CoordinateSystem coords ) const
ovirtual void ShowCaret(BOOL show = TRUE)
ovoid HideCaret()
ovirtual void SetForegroundColour( const PColour & newColour )
oconst PColour& GetForegroundColour() const
ovirtual void SetBackgroundColour( const PColour & newColour )
oconst PColour& GetBackgroundColour() const
oPDim GetBorderSize() const
oconst PColour& GetBorderColour() const
oPCanvas* StartMouseTrack( BOOL wantsCanvas = FALSE )
ovirtual void OnMouseMove( PKeyCode button, const PPoint & where )
ovirtual void OnMouseDown( PKeyCode button, const PPoint & where, BOOL doubleClick )
ovirtual void OnMouseUp( PKeyCode button, const PPoint & where )
ovirtual BOOL OnKeyDown( PKeyCode key, unsigned repeat )
ovirtual void OnKeyUp( PKeyCode key )
ovirtual void OnKeyInput( const PString & str )
ovirtual void OnGainFocus()
ovirtual void OnLostFocus()
ovirtual void OnStartInput()
ovirtual BOOL OnEndInput()
ovirtual void OnRedraw( PCanvas & canvas )
ovirtual void OnControlNotify( PControl & control, int option )
ovirtual void OnSelectHelp()
ovirtual PBalloon* OnBalloonHelp()
ovirtual void OnMouseTrack( PCanvas * canvas, const PPoint & where, BOOL lastTrack )
ovirtual void _SetPosition( PORDINATE x, PORDINATE y, PositionOrigin xOrigin, PositionOrigin yOrigin )

Public

Overrides from class PObject

System callback functions.

Protected Fields

oPApplication* owner
oPInteractor* parent
oPInteractorList children
oPRealFont font
oPCursor savedCursor
oPCaret caret
oPPoint caretPosition
oint caretVisible
oPColour foregroundColour
oPColour backgroundColour
oPInteractor* mouseTrackInteractor
oPInteractorCanvas* mouseTrackCanvas

Protected Methods

ovirtual void _SetDimensions( PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovirtual void _Invalidate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovirtual void _Validate( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height, CoordinateSystem coords )
ovirtual void _SetCursorPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
ovirtual void _SetCaretPos( PORDINATE x, PORDINATE y, CoordinateSystem coords )
ovirtual void UpdateMyCommandSources()

Protected

o Flag to indicate that the parent interactor layouts cursor should be used with this interactor.


Documentation

A class representing a tool bar consisting of a series of static text controls with 3-D borders. The static text sections may be optionaly of a fixed width or dynamically resized when the status bar has its size changed.

This is typically used at the bottom of a window to indicate status and short message displays.

o Construction

o PStatusBar( PInteractor * parent, PINDEX numSections )
Create a new status bar with the specified number of static text descendent controls as sections of the bar

o Overrides from PInteractor

ovirtual void SetFont( const PFont & newFont, BOOL toChildren = TRUE )
Set the font to be used by default by this interactor. A canvas created on this interactor will initially have this font selected.
Parameters:
newFont - New font specification fo rthe interactor.
toChildren - Flag to recursively change all child interactors.

o New functions for class

ovoid SetText( const PString & str )
Set the text in the first section.
Parameters:
str - New text string for section

ovoid SetText( PRESOURCE_ID resId, ... )
Set the text in the first section.
Parameters:
resId - Printf style format resource string for variable arguments.

ovoid SetText( const char * fmt, ... )
Set the text in the first section.

The text may be set using printf style variable arguments. If this is done then the format string cannot be a \ref{PString} instance due to limitations in some compilers.

If no section number is specified then the first section is set.

Parameters:
fmt - Printf style format string for variable arguments.

ovoid SetSectionText( PINDEX section, const PString & str )
Set the text in the section number specified.
Parameters:
section - Number of static text section to change.
str - New text string for section

ovoid SetSectionText( PINDEX section, PRESOURCE_ID resId, ... )
Set the text in the section number specified.
Parameters:
section - Number of static text section to change.
resId - Printf style format resource string for variable arguments.

ovoid SetSectionText( PINDEX section, const char * fmt, ... )
Set the text in the section number specified. The first section is numbered zero.

The text may be set using printf style variable arguments. If this is done then the format string cannot be a \ref{PString} instance due to limitations in some compilers.

If no section number is specified then the first section is set.

Parameters:
section - Number of static text section to change.
fmt - Printf style format string for variable arguments.

ovoid SetSectionWidth( PINDEX section, const PString & str )
Set the width of each section in the status bar.
Parameters:
section - Number of static text section to change.
str - Longest text string to put into section.

ovoid SetSectionWidth( PINDEX section, const PRESOURCE_ID * strIDs, PINDEX nStrings )
Set the width of each section in the status bar.
Parameters:
section - Number of static text section to change.
strIDs - Array of string resource identifiers.
nStrings - Number of string resource identifiers.

ovoid SetSectionWidth( PINDEX section, int width )
Set the width of each section in the status bar.

The first form will set the width to sufficient to contain the string specified, in the status bars currently selected font.

The second form sets the width to the widest string in the specified array of resource strings.

The final form sets the width directly. A positive value specifies the fixed width if the section in the interactors font based coordinate system.

A negative width here will specify a ratio to be used when dividing the total remaining bar width amongst all sections with negative widths.

If a section has its width changed after the status bar is shown then an explicit call to the \ref{PInteractor::SetDimensions()} function must be made to resize all of the sections.

The default width for a section is -1.

Parameters:
section - Number of static text section to change.
width - Width of the section.

ovoid SetSectionAlignment( PINDEX section, PCanvas::DrawStringOptions align )
Set the text alignement options for the specified section.
Parameters:
section - Number of static text section to change.
align - text alignment for section.

oSection& GetSection( PINDEX section ) const
Get the specified section of the status bar. This will assert if the section does not exist or is not a descendent of the PStatusBar::Section class.

Returns:
a reference to the section.
Parameters:
section - Number of section to get.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.