bazaar: CtrlFinder Multiselect property, CtrlProp ported to new CtrlMover

git-svn-id: svn://ultimatepp.org/upp/trunk@5427 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
kohait 2012-10-13 22:30:00 +00:00
parent a49d80d46d
commit 99285f8a92
2 changed files with 6 additions and 1 deletions

View file

@ -50,6 +50,9 @@ public:
virtual Value GetData() const { return RawPickToValue(Vector<Ctrl*>(ctrls, 1)); }
virtual void SetData(const Value& v) { SetCtrls(Vector<Ctrl*>(RawValue<Vector<Ctrl*> >::Extract(v), 1)); }
void Multiselect(bool b = true) { multi = b; if(!b && ctrls.GetCount() > 1) { ctrls[0] = ctrls.Top(); ctrls.SetCount(1); Update(); } }
bool IsMultiselect() const { return multi; }
static void StdCtrlFilter(Ctrl*& q, int& f);
static Ctrl* ChildAtPoint(Ctrl& par, Point& pt, int& f, const CtrlFilterType& filt);

View file

@ -28,13 +28,15 @@ CtrlPropTest::CtrlPropTest()
THISBACK(OnEdit));
AddFrame(mb);
hk.WhenRightDown = THISBACK(OnCtrlRight);
hk.Multiselect(false);
hk.WhenRightSelect = THISBACK(OnCtrlRight);
hk.SetSource(&vis);
hk.Disable();
hk <<= THISBACK(OnMoveAction);
InitDummies();
OnEdit();
}
GUI_APP_MAIN