mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-07 22:03:42 -06:00
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:
parent
a49d80d46d
commit
99285f8a92
2 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue