Create a customized status bar area to feed the user status information. More...
#include <tb_application_status.h>
Public Member Functions | |
ApplicationStatus (const StatusIdentifier &statusIdentifier) | |
~ApplicationStatus (void) | |
const StatusIdentifier & | GetIdentifier (void) const |
void | ClearStatus (void) |
void | AddStatusItem (const StatusItemIdentifier &itemIdentifier, const tbCore::tbString &statusMessage, const char partitionPlacement) |
void | SetStatusItem (const StatusItemIdentifier &itemIdentifier, const tbCore::tbString &statusMessage) |
The ApplicationStatus object represents a reusuable status bar object that can be partitioned to hold up to 16 partitioned items that can be updated/modified individually.
TODO: TurtleBrains: Documentation: Create an example of creating / using an ApplicaitonStatus.
|
explicit |
When you create an ApplicationStatus object with a StatusIdentifier, you can later create another ApplicationStatus object with that same StatusIdentifier value and BOTH of those status objects will refer to and edit the same status bar settings.
TurtleBrains::Application::ApplicationStatus::~ApplicationStatus | ( | void | ) |
This will destruct the ApplicationStatus object, but will not destroy resources or remove the status settings from memory or remove the status if it were visible. Creating another ApplicationStatus object with the same StatusIdentifier value will give access to these settings once again.
void TurtleBrains::Application::ApplicationStatus::AddStatusItem | ( | const StatusItemIdentifier & | itemIdentifier, |
const tbCore::tbString & | statusMessage, | ||
const char | partitionPlacement | ||
) |
Partition the status bar and add an item with a message that can later be modified using the SetStatusItem methdod with the same itemIdentifier. The new item will not be displayed to the user until the next SetWindowStatus call.
itemIdentifier | A unique identifier to represent the status item / partition so it can be modified or accessed later. No two items can have the same identifier, so an error will be triggered if attempted. |
statusMessage | The message to display for this item/partition. Messages wider than the partition width may, or may not, flow into the next partition or remain partially hidden. |
partitionPlacement | A percentage based placement of the left edge the partition. A value of 0 is the far left edge of the window, and 100 being the right most edge. Values out of that range will trigger an error. |
void TurtleBrains::Application::ApplicationStatus::ClearStatus | ( | void | ) |
Removes all items and partitions from the status bar area. This will not be displayed to the user until the next SetWindowStatus call.
const StatusIdentifier& TurtleBrains::Application::ApplicationStatus::GetIdentifier | ( | void | ) | const |
Retrieves the StatusIdentifier as specified when the object was created, this identifier cannot change for an ApplicationStatus object.
void TurtleBrains::Application::ApplicationStatus::SetStatusItem | ( | const StatusItemIdentifier & | itemIdentifier, |
const tbCore::tbString & | statusMessage | ||
) |
Update or modify the message of a specified status item. The item will not be changed until the next SetWindowStatus call.
itemIdentifier | The identifier of the status item to be modified as added via AddStatusItem. |
statusMessage | The message to display for this item/partition. Messages wider than the partition width may, or may not, flow into the next partition or remain partially hidden. |