mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
26562e03e3
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@837 0fc631ac-6414-0410-93d0-97cfa31319b6
43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
//+----------------------------------------------------------------------------+
|
|
//| 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_PACKAGE_CHOICE
|
|
#define HEADER_GUI_VALUE_PACKAGE_CHOICE
|
|
|
|
// ----------------------------------------------------------------------------- : Includes
|
|
|
|
#include <util/prec.hpp>
|
|
#include <gui/value/editor.hpp>
|
|
#include <render/value/package_choice.hpp>
|
|
|
|
DECLARE_SHARED_POINTER_TYPE(DropDownList);
|
|
|
|
// ----------------------------------------------------------------------------- : PackageChoiceValueEditor
|
|
|
|
/// An editor 'control' for editing PackageChoiceValues
|
|
class PackageChoiceValueEditor : public PackageChoiceValueViewer, public ValueEditor {
|
|
public:
|
|
DECLARE_VALUE_EDITOR(PackageChoice);
|
|
|
|
virtual void draw(RotatedDC& dc);
|
|
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;
|
|
friend class DropDownPackageChoiceList;
|
|
/// Change the choice
|
|
void change(const String& c);
|
|
/// Initialize the drop down list
|
|
void initDropDown();
|
|
};
|
|
|
|
|
|
// ----------------------------------------------------------------------------- : EOF
|
|
#endif
|