mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
perliminaries for filtered card list
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@152 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
DECLARE_TYPEOF_COLLECTION(GraphAxisP);
|
||||
DECLARE_TYPEOF_COLLECTION(GraphElementP);
|
||||
DECLARE_TYPEOF_COLLECTION(GraphGroup);
|
||||
DECLARE_TYPEOF_COLLECTION(int);
|
||||
typedef map<String,UInt> map_String_UInt;
|
||||
DECLARE_TYPEOF(map_String_UInt);
|
||||
|
||||
@@ -257,6 +258,19 @@ void GraphControl::onMouseDown(wxMouseEvent& ev) {
|
||||
}
|
||||
}
|
||||
|
||||
bool GraphControl::hasSelection(size_t axis) const {
|
||||
return current_item.size() >= axis && current_item[axis] >= 0;
|
||||
}
|
||||
void GraphControl::getSelection(vector<String>& out) const {
|
||||
out.clear();
|
||||
if (!graph) return;
|
||||
FOR_EACH_2_CONST(i, current_item, a, graph->getData().axes) {
|
||||
if (i >= 0) {
|
||||
out.push_back((size_t)i < a->groups.size() ? a->groups[i].name : wxEmptyString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(GraphControl, wxControl)
|
||||
EVT_PAINT (GraphControl::onPaint)
|
||||
EVT_SIZE (GraphControl::onSize)
|
||||
|
||||
Reference in New Issue
Block a user