VISH
0.2
|
Base class for convenient messing around with the status to be displayed for a certain object. More...
#include </home/werner/origo/vish/ocean/shrimp/VObjectStatus.hpp>
Base class for convenient messing around with the status to be displayed for a certain object.
Wizt::StatusIndicator::StatusIndicator | ( | VObject * | what, |
const string & | initialtext = "" , |
||
int | EL = 0 |
||
) |
Constructor.
struct MyObject : VObject, StatusIndicator { MyObject(...) : VObject(...), StatusIndicator(this) {} };
bool Wizt::StatusIndicator::setStatusError | ( | const RefPtr< ValuePool > & | Context, |
const string & | what, | ||
bool | AnnouncePublic = true |
||
) | const |
Indicate an error happening to this object.
AnnouncePublic | If true (default) then the error messages produced here will also be announced to the VActionNotifier which possibly pops up some intentionally annoying window to the user, and might go into some logfile. |
bool Wizt::StatusIndicator::setStatusInfo | ( | const RefPtr< ValuePool > & | Context, |
const string & | what | ||
) | const |
Set the status info text for the given object, relative to the given context.
bool f(Context) { if ( notgood() ) return setStatusInfo( Context, "not good"); ... return setStatusInfo( Context, "all is fine" ); }