Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::TBSkinCondition Class Reference

TBSkinCondition checks if a condition is true for a given TBSkinConditionContext. More...

#include <tb_skin.h>

Inheritance diagram for tb::TBSkinCondition:
tb::TBLinkOf< TBSkinCondition > tb::TBLink

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...
 

Additional Inherited Members

Detailed Description

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.

Member Enumeration Documentation

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.

Enumerator
TARGET_THIS 

The object painting the skin.

TARGET_PARENT 

The parent of the object painting the skin.

TARGET_ANCESTORS 

All ancestors of the object painting the skin.

TARGET_PREV_SIBLING 

The previous sibling of the object painting the skin.

TARGET_NEXT_SIBLING 

The next sibling of the object painting the skin.

Defines if the condition tested should be equal or not for the condition to be true.

Enumerator
TEST_EQUAL 

Value should be equal for condition to be true.

TEST_NOT_EQUAL 

Value should not be equal for condition to be true.

Member Function Documentation

bool tb::TBSkinCondition::GetCondition ( TBSkinConditionContext context) const

Return true if the condition is true for the given context.


The documentation for this class was generated from the following files: