mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-18 14:16:12 -06:00
GridCtrl: Added ThreeStateOption()
git-svn-id: svn://ultimatepp.org/upp/trunk@3796 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
03366588a9
commit
ff50b51cb4
2 changed files with 13 additions and 0 deletions
|
|
@ -242,6 +242,13 @@ static void MakeOption(One<Ctrl>& ctrl)
|
|||
ctrl->WantFocus();
|
||||
}
|
||||
|
||||
static void MakeThreeStateOption(One<Ctrl>& ctrl)
|
||||
{
|
||||
ctrl.Create<Option>().ThreeState().ShowLabel(false);
|
||||
ctrl->SetData(0);
|
||||
ctrl->WantFocus();
|
||||
}
|
||||
|
||||
GridCtrl::ItemRect& GridCtrl::ItemRect::Ctrls(Callback1<One<Ctrl>&> _factory)
|
||||
{
|
||||
if(!(*edits)[id].factory)
|
||||
|
|
@ -262,6 +269,11 @@ GridCtrl::ItemRect& GridCtrl::ItemRect::Option()
|
|||
return Ctrls(MakeOption).CtrlAlignHorzPos().CtrlAlignVertPos();
|
||||
}
|
||||
|
||||
GridCtrl::ItemRect& GridCtrl::ItemRect::ThreeStateOption()
|
||||
{
|
||||
return Ctrls(MakeThreeStateOption).CtrlAlignHorzPos().CtrlAlignVertPos();
|
||||
}
|
||||
|
||||
GridCtrl::Item& GridCtrl::Item::Editable(bool b)
|
||||
{
|
||||
editable = b;
|
||||
|
|
|
|||
|
|
@ -735,6 +735,7 @@ class GridCtrl : public Ctrl
|
|||
template<class T> ItemRect& Ctrls() { return Ctrls(DefaultCtrlFactory<T>()); }
|
||||
ItemRect& NoCtrls();
|
||||
ItemRect& Option();
|
||||
ItemRect& ThreeStateOption();
|
||||
|
||||
ItemRect& Editable(bool b);
|
||||
ItemRect& NoEditable();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue