Added GraphControl; FilteredCardList; ValueEditor

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@74 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-19 18:59:33 +00:00
parent ce6a83e34b
commit ed336dea06
31 changed files with 705 additions and 82 deletions
+39
View File
@@ -0,0 +1,39 @@
//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
// ----------------------------------------------------------------------------- : Includes
#include <gui/control/graph.hpp>
#include <wx/dcbuffer.h>
// ----------------------------------------------------------------------------- : Graph
// ----------------------------------------------------------------------------- : GraphControl
GraphControl::GraphControl(Window* parent, int id)
: wxControl(parent, id)
{}
void GraphControl::onPaint(wxPaintEvent&) {
wxBufferedPaintDC dc(this);
}
void GraphControl::onSize(wxSizeEvent&) {
Refresh(false);
}
void GraphControl::onMouseDown(wxMouseEvent& ev) {
if (!graph) return;
wxSize cs = GetClientSize();
graph->findItem(RealPoint((double)ev.GetX()/cs.GetWidth(), (double)ev.GetY()/cs.GetHeight()), current_item);
}
BEGIN_EVENT_TABLE(GraphControl, wxControl)
EVT_PAINT (GraphControl::onPaint)
EVT_SIZE (GraphControl::onSize)
EVT_LEFT_DOWN (GraphControl::onMouseDown)
END_EVENT_TABLE ()