#include <ShapeUpAPI.h>
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 |
SUStatusBar::SUStatusBar | ( | ) | [inline] |
Default constructor.
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.
text | is the new text string. NULL clears the field, and displays the 'Ready' message. |
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().
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. |
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().
progress | = initial progress where 0.0f <= progress <= 1.0f. |
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().
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.
width | = desired width of the pane in pixels. |
void SUStatusBar::ReleasePane | ( | size_t | paneIndex | ) | [inline] |
This function will release a pane previously allocated by a call to AllocatePane().
paneIndex | = the index of the pane to release. |
size_t SUStatusBar::GetPaneCount | ( | ) | [inline] |
Retrieves the number of panes this SUStatusBar has allocated.
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.
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. |
std::vector<SUHANDLE> SUStatusBar::_paneHandles [protected] |
SUHANDLE SUStatusBar::_hProgress [protected] |