00001 /* 00002 ClanGUI, copyrights by various people. Have a look in the CREDITS file. 00003 00004 This sourcecode is distributed using the Library GNU Public Licence, 00005 version 2 or (at your option) any later version. Please read LICENSE 00006 for details. 00007 */ 00008 00009 #include "precomp.h" 00010 #include "checkbox_generic.h" 00011 #include "API/GUI/component_options.h" 00012 00013 CL_ComponentOptions CL_CheckBox_Generic::create_options( 00014 const CL_Point &pos, 00015 const std::string &text) 00016 { 00017 CL_ComponentOptions options; 00018 00019 options.add_option_as_int("x", pos.x); 00020 options.add_option_as_int("y", pos.y); 00021 00022 // TODO: This should be automatically calculated 00023 options.add_option("width", CL_String(500)); 00024 options.add_option("height", CL_String(50)); 00025 00026 options.add_option("text", text); 00027 00028 return options; 00029 } 00030 00031 CL_CheckBox_Generic::CL_CheckBox_Generic(CL_CheckBox *self, const CL_ComponentOptions &options, CL_StyleManager *style) 00032 : 00033 checkbox(self) 00034 { 00035 // if(options.exists("text")) 00036 // text = options.get_value("text"); 00037 00038 checkbox->set_toggle_mode(); 00039 }
1.2.6 written by Dimitri van Heesch,
© 1997-2001