Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb_widget_skin_condition_context.h
1 // ================================================================================
2 // == This file is a part of Turbo Badger. (C) 2011-2014, Emil SegerÃ¥s ==
3 // == See tb_core.h for more information. ==
4 // ================================================================================
5 
6 #ifndef TB_WIDGET_SKIN_CONDITION_CONTEXT_H
7 #define TB_WIDGET_SKIN_CONDITION_CONTEXT_H
8 
9 #include "tb_widgets.h"
10 #include "tb_skin.h"
11 
12 namespace tb {
13 
17 {
18 public:
19  TBWidgetSkinConditionContext(TBWidget *widget) : m_widget(widget) {}
21 private:
22  bool GetCondition(TBWidget *widget, const TBSkinCondition::CONDITION_INFO &info);
23  TBWidget *m_widget;
24 };
25 
26 } // namespace tb
27 
28 #endif // TB_WIDGET_SKIN_CONDITION_CONTEXT_H
Check if a condition is true for a widget when painting a skin.
Definition: tb_widget_skin_condition_context.h:16
The base TBWidget class.
Definition: tb_widgets.h:418
TARGET
Defines which target(s) relative to the context that should be tested for the condition.
Definition: tb_skin.h:62
Stores the information needed for checking a condition.
Definition: tb_skin.h:91
virtual bool GetCondition(TBSkinCondition::TARGET target, const TBSkinCondition::CONDITION_INFO &info)
Return true if the given target and property equals the given value.
Definition: tb_widget_skin_condition_context.cpp:15
TBSkinConditionContext checks if a condition is true.
Definition: tb_skin.h:111