Wt examples
3.2.3
|
00001 // This may look like C code, but it's really -*- C++ -*- 00002 /* 00003 * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. 00004 * 00005 * See the LICENSE file for terms of use. 00006 */ 00007 #ifndef OPTION_H_ 00008 #define OPTION_H_ 00009 00010 #include <Wt/WContainerWidget> 00011 #include <Wt/WText> 00012 00013 using namespace Wt; 00014 00015 class OptionList; 00016 00021 00031 class Option : public WContainerWidget 00032 { 00033 public: 00036 Option(const WString& text, WContainerWidget *parent = 0); 00037 00040 void setText(const WString& text); 00041 00044 WInteractWidget *item() { return option_; } 00045 00046 virtual void setHidden(bool); 00047 00048 private: 00050 WText *option_; 00051 00053 WText *sep_; 00054 00056 OptionList *list_; 00057 00058 friend class OptionList; 00059 00060 void setOptionList(OptionList *l); 00061 00063 void addSeparator(); 00064 00066 void showSeparator(); 00067 00069 void hideSeparator(); 00070 }; 00071 00074 #endif // OPTION_H_