//+----------------------------------------------------------------------------+ //| Description: Magic Set Editor - Program to make Magic (tm) cards | //| Copyright: (C) 2001 - 2008 Twan van Laarhoven and "coppro" | //| License: GNU General Public License 2 or later (see file COPYING) | //+----------------------------------------------------------------------------+ #ifndef HEADER_GUI_VALUE_MULTIPLE_CHOICE #define HEADER_GUI_VALUE_MULTIPLE_CHOICE // ----------------------------------------------------------------------------- : Includes #include #include #include #include // ----------------------------------------------------------------------------- : MultipleChoiceValueEditor /// An editor 'control' for editing MultipleChoiceValues class MultipleChoiceValueEditor : public MultipleChoiceValueViewer, public ValueEditor { public: DECLARE_VALUE_EDITOR(MultipleChoice); ~MultipleChoiceValueEditor(); virtual void onValueChange(); virtual void determineSize(bool force_fit); virtual bool onLeftDown (const RealPoint& pos, wxMouseEvent& ev); virtual bool onChar(wxKeyEvent& ev); virtual void onLoseFocus(); private: DropDownListP drop_down; vector active; ///< Which choices are active? (note: vector is evil) friend class DropDownMultipleChoiceList; /// Initialize the drop down list DropDownList& initDropDown(); /// Toggle a choice or on or off void toggle(int id); /// Toggle defaultness or on or off void toggleDefault(); }; // ----------------------------------------------------------------------------- : EOF #endif