Hasty Badger
Small UI library (a branch of Turbo Badger)
|
TBSkinCondition checks if a condition is true for a given TBSkinConditionContext. More...
#include <tb_skin.h>
Classes | |
struct | CONDITION_INFO |
Stores the information needed for checking a condition. More... | |
Public Types | |
enum | TARGET { TARGET_THIS, TARGET_PARENT, TARGET_ANCESTORS, TARGET_PREV_SIBLING, TARGET_NEXT_SIBLING } |
Defines which target(s) relative to the context that should be tested for the condition. More... | |
enum | PROPERTY { PROPERTY_SKIN, PROPERTY_WINDOW_ACTIVE, PROPERTY_AXIS, PROPERTY_ALIGN, PROPERTY_ID, PROPERTY_STATE, PROPERTY_VALUE, PROPERTY_HOVER, PROPERTY_CAPTURE, PROPERTY_FOCUS, PROPERTY_CUSTOM } |
Defines which property in the context that should be checked. More... | |
enum | TEST { TEST_EQUAL, TEST_NOT_EQUAL } |
Defines if the condition tested should be equal or not for the condition to be true. More... | |
Public Member Functions | |
TBSkinCondition (TARGET target, PROPERTY prop, const TBID &custom_prop, const TBID &value, TEST test) | |
bool | GetCondition (TBSkinConditionContext &context) const |
Return true if the condition is true for the given context. More... | |
Public Member Functions inherited from tb::TBLinkOf< TBSkinCondition > | |
TBSkinCondition * | GetPrev () const |
TBSkinCondition * | GetNext () const |
Public Member Functions inherited from tb::TBLink | |
bool | IsInList () const |
Return true if the link is currently added to a list. More... | |
Additional Inherited Members | |
Public Attributes inherited from tb::TBLink | |
TBLink * | prev |
TBLink * | next |
TBLinkList * | linklist |
TBSkinCondition checks if a condition is true for a given TBSkinConditionContext.
This is used to apply different state elements depending on what is currently painting the skin.
Defines which property in the context that should be checked.
Enumerator | |
---|---|
PROPERTY_SKIN |
The background skin id. |
PROPERTY_WINDOW_ACTIVE |
The window is active (no value required). |
PROPERTY_AXIS |
The axis of the content (x or y) |
PROPERTY_ALIGN |
The alignment. |
PROPERTY_ID |
The id. |
PROPERTY_STATE |
The state is set. |
PROPERTY_VALUE |
The current value (integer). |
PROPERTY_HOVER |
Focus is on the target or any child (no value required). |
PROPERTY_CAPTURE |
Capture is on the target or any child (no value required). |
PROPERTY_FOCUS |
Focus is on the target or any child (no value required). |
PROPERTY_CUSTOM |
It's a property unknown to skin, that the TBSkinConditionContext might know about. |
Defines which target(s) relative to the context that should be tested for the condition.
bool tb::TBSkinCondition::GetCondition | ( | TBSkinConditionContext & | context | ) | const |
Return true if the condition is true for the given context.