* extend test with sliders containing min/ max labels
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28857 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -8,16 +8,34 @@ public:
|
||||
:BWindow(BRect(50, 50, 250, 360), "window", B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS)
|
||||
{
|
||||
BChannelSlider *slider = new BChannelSlider(BRect(10, 10, 20, 20),
|
||||
"vertical slider", "vertical slider", new BMessage('test'), 4);
|
||||
"vertical slider", "Verticalp", new BMessage('test'), 4);
|
||||
slider->SetOrientation(B_VERTICAL);
|
||||
AddChild(slider);
|
||||
slider->ResizeToPreferred();
|
||||
BChannelSlider *horizontal = new BChannelSlider(BRect(100, 20, 136, 30),
|
||||
"horizontal slider", "horizontal slider", new BMessage('test'), 3);
|
||||
|
||||
slider = new BChannelSlider(BRect(10, 10, 20, 20), "vertical slider",
|
||||
"Verticalp", new BMessage('test'), B_VERTICAL, 4);
|
||||
AddChild(slider);
|
||||
slider->SetLimitLabels("Wminp", "Wmaxp");
|
||||
slider->ResizeToPreferred();
|
||||
slider->MoveBy(slider->Bounds().Width() + 10.0, 0.0);
|
||||
|
||||
BChannelSlider *horizontal = new BChannelSlider(BRect(150, 10, 160, 20),
|
||||
"horizontal slider", "Horizontal", new BMessage('test'), 3);
|
||||
AddChild(horizontal);
|
||||
horizontal->ResizeToPreferred();
|
||||
|
||||
horizontal = new BChannelSlider(BRect(150, 10, 160, 20),
|
||||
"horizontal slider", "Horizontalp", new BMessage('test'),
|
||||
B_HORIZONTAL, 3);
|
||||
AddChild(horizontal);
|
||||
horizontal->SetLimitLabels("Wminp", "Wmaxp");
|
||||
horizontal->ResizeToPreferred();
|
||||
horizontal->MoveBy(0.0, horizontal->Bounds().Height() + 10.0);
|
||||
|
||||
ResizeTo(horizontal->Frame().right + 10, slider->Frame().bottom + 10);
|
||||
}
|
||||
|
||||
|
||||
virtual bool QuitRequested() { be_app->PostMessage(B_QUIT_REQUESTED); return BWindow::QuitRequested() ; }
|
||||
};
|
||||
|
||||
@@ -27,18 +45,18 @@ public:
|
||||
App() : BApplication("application/x-vnd.channelslidertest")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
virtual void ReadyToRun()
|
||||
{
|
||||
(new MainWindow())->Show();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
App app;
|
||||
|
||||
|
||||
app.Run();
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user