MGUI::CTRL_STATUSBAR Class Reference

StatusBar control. More...

#include <mgui/statusbar.h>

Inheritance diagram for MGUI::CTRL_STATUSBAR:
Inheritance graph
[legend]

List of all members.

Public Types

enum  PANESTYLE { PANESTYLE_Normal = 0x00, PANESTYLE_NoSeparator = 0x01, PANESTYLE_Stretch = 0x02 }
enum  PANEUSAGE {
  PANEUSAGE_Main, PANEUSAGE_ElapsedTime, PANEUSAGE_ProgressBar, PANEUSAGE_Icon,
  PANEUSAGE_Text, PANEUSAGE_Mixed
}
enum  STYLE {
  STYLE_Default = 0, STYLE_HasCancelButton = 0x01, STYLE_NoProgressBar = 0x02, STYLE_NoElapsedTime = 0x04,
  STYLE_EnableToolTips = 0x08, STYLE_EnableThreading = 0x10
}

Public Member Functions

 CTRL_STATUSBAR ()
virtual ~CTRL_STATUSBAR ()
int AddPane (PANEUSAGE usage, PANESTYLE style, int cxWidth, ID id=0)
void AttachCancelButton (CTRL_TOOLBAR &toolbar, ID id)
void AttachCancelButton (CTRL_PUSHBUTTON &button)
DEPRECATED void AttachCancelButtonWidget (Widget widget)
void ClearBar ()
void ClearPane (int PaneIndex)
void ClearPaneElapsedTime ()
void ClearText ()
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, STYLE style=STYLE_Default)
void SetPaneDelegateOnToolTipRequest (int PaneIndex, DELEGATE_ONTOOLTIPREQUEST delegate)
void SetPaneEnabled (int PaneIndex, bool enabled)
void SetPaneIcon (int PaneIndex, ICONID iconid)
void SetPaneText (int PaneIndex, const MISTRING &string)
void SetPaneToolTipString (int PaneIndex, const MISTRING &string)
void SetPaneVisible (int PaneIndex, bool visible)
void SetText (const MISTRING &string)
void SetTextError (ERRVALUE err)

Detailed Description

StatusBar control.

This control is not dynamically positioned the same as other MGUI::CTRLs because the underlying implementation may do its own positioning in some environments. When adding a status bar to an MGUI::DLGSHELL you must use MGUI::DLGSHELL::SetStatusBar() in the dialog subclass's implementation of v_CreateContent() to allow for the status bar in dynamic layout. Logging is turned off by default, use SetLogEnabled() to enable if desired.


Member Enumeration Documentation

Pane styles.

Enumerator:
PANESTYLE_Normal 
PANESTYLE_NoSeparator 

Don't separate from previous pane.

PANESTYLE_Stretch 

Stretch pane relative to other "stretchable" panes.

Enumerator:
PANEUSAGE_Main 

Main status message.

PANEUSAGE_ElapsedTime 

Elapsed time.

PANEUSAGE_ProgressBar 

Progress bar for status.

PANEUSAGE_Icon 

Pane contains icon.

PANEUSAGE_Text 

Pane contains text.

PANEUSAGE_Mixed 

Both icon and text.

Status bar style.

Enumerator:
STYLE_Default 
STYLE_HasCancelButton 

Include cancel button.

STYLE_NoProgressBar 

Don't include progress bar indicator.

STYLE_NoElapsedTime 

Don't include indicator for elapsed time.

STYLE_EnableToolTips 
STYLE_EnableThreading 

Enable the status bar to handle status from multiple threads.


Constructor & Destructor Documentation

MGUI::CTRL_STATUSBAR::CTRL_STATUSBAR (  ) 

Constructor.

virtual MGUI::CTRL_STATUSBAR::~CTRL_STATUSBAR (  )  [virtual]

Destructor.


Member Function Documentation

int MGUI::CTRL_STATUSBAR::AddPane ( PANEUSAGE  usage,
PANESTYLE  style,
int  cxWidth,
ID  id = 0 
)

Add "indicator pane" to status bar.

Returns:
Pane index, (might not be consecutive) If used, must be done before calling Create().

If more than one pane has PANESTYLE_Stretch, their relative sizes will be based on the relative values of cxWidth. For example, if pane 0 has a cxWidth of 100 and pane 1 has 50, then pane 0 will be allocated twice as much of the available space as pane 1.

Parameters:
usage Pane usage, only one pane may have USAGE_Main, ProgressBar or ElapsedTime specified
style Pane style
cxWidth Pane width in pixels
id Optional pane ID
void MGUI::CTRL_STATUSBAR::AttachCancelButton ( CTRL_TOOLBAR toolbar,
ID  id 
)

Attach toolbar button to use for cancelling operation.

Delegate for toolbar button will be set. Toolbar must have been created.

Parameters:
toolbar Toolbar
id Id of toolbar button
void MGUI::CTRL_STATUSBAR::AttachCancelButton ( CTRL_PUSHBUTTON button  ) 

Attach button to use for cancelling operation.

Delegate for button will be set. Button must have been created.

DEPRECATED void MGUI::CTRL_STATUSBAR::AttachCancelButtonWidget ( Widget  widget  ) 
void MGUI::CTRL_STATUSBAR::ClearBar (  ) 

Clear progress bar.

void MGUI::CTRL_STATUSBAR::ClearPane ( int  PaneIndex  ) 

Clear text or icon in specified pane.

void MGUI::CTRL_STATUSBAR::ClearPaneElapsedTime (  ) 

Clear "elapsed time" pane (does not reset timer itself).

void MGUI::CTRL_STATUSBAR::ClearText (  ) 

Clear text in main pane.

void MGUI::CTRL_STATUSBAR::Create ( MGUI::LAYOUT_PANE_BASE ParentPane,
STYLE  style = STYLE_Default 
)

Create control.

If specified style requests predefined panes that have not already been added via AddPane, they will be added to the right of any existing panes automatically.

Parameters:
ParentPane Parent pane
void MGUI::CTRL_STATUSBAR::SetPaneDelegateOnToolTipRequest ( int  PaneIndex,
DELEGATE_ONTOOLTIPREQUEST  delegate 
)

Set delegate for tooltip request on pane.

Parameters:
PaneIndex Pane index, 0 indicates main text pane
void MGUI::CTRL_STATUSBAR::SetPaneEnabled ( int  PaneIndex,
bool  enabled 
)

Set whether pane shows as "enabled".

Parameters:
PaneIndex Pane index, 0 indicates main text pane
enabled True if "enabled", false if not
void MGUI::CTRL_STATUSBAR::SetPaneIcon ( int  PaneIndex,
ICONID  iconid 
)

Set icon for specified pane.

Parameters:
PaneIndex Pane index, 0 indicates main text pane
iconid Icon ID
void MGUI::CTRL_STATUSBAR::SetPaneText ( int  PaneIndex,
const MISTRING string 
)

Set text for specified pane.

Parameters:
PaneIndex Pane index, 0 indicates main text pane
string Text to set
void MGUI::CTRL_STATUSBAR::SetPaneToolTipString ( int  PaneIndex,
const MISTRING string 
)

Set string for tooltip on pane.

Parameters:
PaneIndex Pane index, 0 indicates main text pane
string String for tooltip
void MGUI::CTRL_STATUSBAR::SetPaneVisible ( int  PaneIndex,
bool  visible 
)

Set whether pane is visible.

Parameters:
PaneIndex Pane index, 0 indicates main text pane
visible True to show, false to not
void MGUI::CTRL_STATUSBAR::SetText ( const MISTRING string  ) 

Set text for "main" pane.

Done automatically when create MISTATUSCONTEXT instance.

Parameters:
string Text to set
void MGUI::CTRL_STATUSBAR::SetTextError ( ERRVALUE  err  ) 

Set text for first pane to error message.


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:35:37 2012 for TNTsdk 2012 by  doxygen 1.6.1