mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
reference: Fixed GridCtrlTest
This commit is contained in:
parent
42c2e54e3b
commit
d35310a595
5 changed files with 3 additions and 40 deletions
|
|
@ -54,16 +54,11 @@ void App::TabChange()
|
|||
panel.Init(testPropertyGrid.grid);
|
||||
else if(t == 4)
|
||||
panel.Init(testFocusLost.grid0);
|
||||
|
||||
dlog->Clear();
|
||||
}
|
||||
|
||||
void App::Serialize(Stream &s)
|
||||
{
|
||||
SerializePlacement(s);
|
||||
s % panel.level;
|
||||
if(s.IsLoading())
|
||||
dlev = ~panel.level;
|
||||
}
|
||||
|
||||
void App::Resort()
|
||||
|
|
|
|||
|
|
@ -83,24 +83,6 @@ Panel::Panel()
|
|||
|
||||
clear_grid << [=] { Actions(4); };
|
||||
reset_grid << [=] { Actions(5); };
|
||||
|
||||
#ifndef flagDEBUG
|
||||
debug.Hide();
|
||||
level.Hide();
|
||||
#else
|
||||
clear << [=] { Actions(400); };
|
||||
debug << [=] { Actions(401); };
|
||||
level << [=] { Actions(402); };
|
||||
#endif
|
||||
|
||||
level.Add(0, "All")
|
||||
.Add(1, "1")
|
||||
.Add(2, "2")
|
||||
.Add(3, "3");
|
||||
|
||||
level <<= 0;
|
||||
|
||||
dlog = &log0;
|
||||
}
|
||||
|
||||
void Panel::Init(GridCtrl& g)
|
||||
|
|
@ -245,15 +227,9 @@ void Panel::Actions(int n)
|
|||
case 5:
|
||||
grid->Reset();
|
||||
break;
|
||||
case 400:
|
||||
log0.Clear();
|
||||
break;
|
||||
case 401:
|
||||
grid->Debug(0);
|
||||
break;
|
||||
case 402:
|
||||
dlev = ~level;
|
||||
break;
|
||||
case 403:
|
||||
grid->ReSort();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -63,10 +63,6 @@ END_LAYOUT
|
|||
LAYOUT(PanelLayout, 408, 572)
|
||||
ITEM(Upp::Button, clear_grid, SetLabel(t_("Clear grid")).RightPosZ(308, 96).BottomPosZ(4, 20))
|
||||
ITEM(Upp::Button, reset_grid, SetLabel(t_("Reset grid")).RightPosZ(208, 92).BottomPosZ(4, 20))
|
||||
ITEM(Upp::LineEdit, log0, SetFont(Upp::MonospaceZ(12)).RightPosZ(4, 200).VSizePosZ(4, 28))
|
||||
ITEM(Upp::Button, clear, SetLabel(t_("Clear")).RightPosZ(4, 64).BottomPosZ(4, 20))
|
||||
ITEM(Upp::Button, debug, SetLabel(t_("Debug")).RightPosZ(140, 64).BottomPosZ(4, 20))
|
||||
ITEM(Upp::TabCtrl, opts, RightPosZ(208, 196).VSizePosZ(4, 28))
|
||||
ITEM(Upp::DropList, level, RightPosZ(72, 64).BottomPosZ(5, 19))
|
||||
ITEM(Upp::TabCtrl, opts, RightPosZ(4, 400).VSizePosZ(4, 28))
|
||||
END_LAYOUT
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,7 @@ void TestArrayCtrl::Init()
|
|||
arr.Inserting();
|
||||
arr.SetLineCy(DPI(20));
|
||||
|
||||
const int total_cols = 15;
|
||||
const int total_rows = 10;
|
||||
|
||||
for(int i = 0; i < total_cols; i++)
|
||||
for(int i = 0; i < 15; i++)
|
||||
{
|
||||
String name = Format("Column %d", i + 1);
|
||||
int size = rand() % 40 + 50;
|
||||
|
|
|
|||
|
|
@ -6454,8 +6454,7 @@ void GridCtrl::Debug(int n)
|
|||
}
|
||||
if(n == 3)
|
||||
{
|
||||
Point p = GetCtrlPos(focused_ctrl);
|
||||
LLOG(Format("Focused %x (%d, %d)", focused_ctrl, p.x, p.y));
|
||||
LLOG(Format("Focused %x ") << GetCtrlPos(focused_ctrl));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue