19 #ifndef OST_GUI_TOOL_OPTION_HH
20 #define OST_GUI_TOOL_OPTION_HH
35 namespace ost {
namespace gui {
41 INT, FLOAT, ENUM, BUTTON
46 const String& GetKey()
const;
47 const String& GetVerboseName()
const;
58 template <
typename T, ToolOption::Type C>
62 T min_value=std::numeric_limits<T>::min(),
63 T max_value=std::numeric_limits<T>::max()):
64 ToolOption(key, verbose_name, C), value_(default_v),
65 default_(default_v), min_value_(min_value), max_value_(max_value)
76 if (value>=min_value_ && value<=max_value_) {
93 #if !defined(_MSC_VER)
110 void Add(
const String& text,
int tag);
115 int GetValue()
const {
return tuples_[index_].tag; }
117 ConstIterator
Begin()
const {
return tuples_.begin(); }
118 ConstIterator
End()
const {
return tuples_.end(); }
119 size_t Size() {
return tuples_.size(); }
122 std::vector<Tuple> tuples_;
129 const String& verbose_name,
131 const char *slot_method);
135 const char *slot_method_;
ToolOptionNum< float, ToolOption::FLOAT > ToolOptionFloat
ToolOptionNum< int, ToolOption::INT > ToolOptionInt
std::vector< ToolOption * > ToolOptionList
#define DLLEXPORT_OST_GUI