mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
fdb725963c
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@511 0fc631ac-6414-0410-93d0-97cfa31319b6
47 lines
1.7 KiB
C++
47 lines
1.7 KiB
C++
//+----------------------------------------------------------------------------+
|
|
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
|
|
//| Copyright: (C) 2001 - 2007 Twan van Laarhoven |
|
|
//| 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 <util/prec.hpp>
|
|
#include <gui/value/editor.hpp>
|
|
#include <gui/value/choice.hpp>
|
|
#include <render/value/multiple_choice.hpp>
|
|
|
|
// ----------------------------------------------------------------------------- : 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<int> active; ///< Which choices are active? (note: vector<bool> 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
|