SUStatusBar Class Reference

Represents the ShapeUp status bar. More...

#include <ShapeUpAPI.h>

List of all members.

Public Member Functions

 SUStatusBar ()
void SetText (const char *text)
void BeginProgress (const char *title=NULL, float progress=0.f)
void SetProgress (float progress)
void EndProgress ()
size_t AllocatePane (size_t width)
void ReleasePane (size_t paneIndex)
size_t GetPaneCount ()
void SetPaneInfo (size_t paneIndex, const char *text, HICON hIcon)

Protected Attributes

std::vector< SUHANDLE_paneHandles
SUHANDLE _hProgress


Detailed Description

The ShapeUp statusbar can be accessed from a GPI, allowing it to allocate a dedicated statusbar pane for displaying status information, or to use the progress bar that is used by ShapeUp internal functions.


Constructor & Destructor Documentation

SUStatusBar::SUStatusBar (  )  [inline]

Default constructor.


Member Function Documentation

void SUStatusBar::SetText ( const char *  text  )  [inline]

Sets the information in a pane previously allocated by a call to AllocatePane(). A pane can have a text, an icon or both.

Parameters:
text is the new text string. NULL clears the field, and displays the 'Ready' message.
See also:
ShapeUp_SetStatusBarText()

void SUStatusBar::BeginProgress ( const char *  title = NULL,
float  progress = 0.f 
) [inline]

This function will prepare the progress bar in ShapeUp's statusbar. Any call to BeginProgress() must have a matching call to EndProgress().

Parameters:
title = Optional progress bar title which, if supplied, will be dispayed to the left och the progress bar. A null value means no title, which is default.
progress = Optional initial progress where 0.0f <= progress <= 1.0f. Default is 0.
See also:
ShapeUp_BeginProgress()

void SUStatusBar::SetProgress ( float  progress  )  [inline]

This function will prepare the progress bar in ShapeUp's statusbar. Any call to BeginProgress() must have a matching call to EndProgress().

Parameters:
progress = initial progress where 0.0f <= progress <= 1.0f.
See also:
ShapeUp_SetProgress()

void SUStatusBar::EndProgress (  )  [inline]

This function will close the progress bar in ShapeUp's statusbar. Any call to BeginProgress() must have a matching call to EndProgress().

See also:
ShapeUp_EndProgress()

size_t SUStatusBar::AllocatePane ( size_t  width  )  [inline]

This function will allocate a pane in ShapeUp's statusbar. The GPI will have exclusive access to this pane. A status bar pane can contain text, an icon or both. Since there is only a limited space make sure it's used for something valuable, or that it's lifetime is short. A GPI may allocate more than one pane.

Parameters:
width = desired width of the pane in pixels.
Returns:
The pane index if successful.
See also:
ReleasePane(), ShapeUp_AllocateStatusBarPane()

void SUStatusBar::ReleasePane ( size_t  paneIndex  )  [inline]

This function will release a pane previously allocated by a call to AllocatePane().

Parameters:
paneIndex = the index of the pane to release.
See also:
ReleasePane(), ShapeUp_ReleaseStatusBarPane()

size_t SUStatusBar::GetPaneCount (  )  [inline]

Retrieves the number of panes this SUStatusBar has allocated.

Returns:
The number of panes.

void SUStatusBar::SetPaneInfo ( size_t  paneIndex,
const char *  text,
HICON  hIcon 
) [inline]

Sets the information in a pane previously allocated by a call to AllocatePane(). A pane can have a text, an icon or both.

Parameters:
paneIndex = the index of the pane to release.
text = text to be displayed in the pane. Null clears the text.
hIcon = handle to an icon to be displayed in the pane. Null clears the icon.
See also:
AllocatePane(), ShapeUp_SetStatusBarPaneInfo()


Member Data Documentation

std::vector<SUHANDLE> SUStatusBar::_paneHandles [protected]

SUHANDLE SUStatusBar::_hProgress [protected]


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 10:55:35 2010 for ShapeUp API by  doxygen 1.5.2