button crap
This commit is contained in:
parent
2efa2b3271
commit
5a9f3b5de2
1 changed files with 9 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
||||||
#include "widget.hh"
|
|
||||||
#include "focuswidget.hh"
|
#include "focuswidget.hh"
|
||||||
|
#include "button.hh"
|
||||||
#include "display.hh"
|
#include "display.hh"
|
||||||
#include "configuration.hh"
|
#include "configuration.hh"
|
||||||
#include "timerqueuemanager.hh"
|
#include "timerqueuemanager.hh"
|
||||||
|
@ -22,10 +22,10 @@ int main(void) {
|
||||||
my_style->load(style_conf);
|
my_style->load(style_conf);
|
||||||
|
|
||||||
otk::OtkFocusWidget foo(my_style);
|
otk::OtkFocusWidget foo(my_style);
|
||||||
otk::OtkFocusWidget iconb(&foo);
|
otk::OtkButton iconb(&foo);
|
||||||
otk::OtkFocusWidget label(&foo);
|
otk::OtkFocusWidget label(&foo);
|
||||||
otk::OtkFocusWidget maxb(&foo);
|
otk::OtkButton maxb(&foo);
|
||||||
otk::OtkFocusWidget closeb(&foo);
|
otk::OtkButton closeb(&foo);
|
||||||
|
|
||||||
foo.setBevelWidth(2);
|
foo.setBevelWidth(2);
|
||||||
foo.setDirection(otk::OtkWidget::Vertical);
|
foo.setDirection(otk::OtkWidget::Vertical);
|
||||||
|
@ -35,9 +35,8 @@ int main(void) {
|
||||||
foo.setUnfocusTexture(my_style->getTitleUnfocus());
|
foo.setUnfocusTexture(my_style->getTitleUnfocus());
|
||||||
|
|
||||||
// fixed size
|
// fixed size
|
||||||
iconb.resize(15, 15);
|
iconb.setText("foo");
|
||||||
iconb.setTexture(my_style->getButtonFocus());
|
iconb.press();
|
||||||
iconb.setUnfocusTexture(my_style->getButtonUnfocus());
|
|
||||||
|
|
||||||
// fix width to 60 and let the height be calculated by its parent
|
// fix width to 60 and let the height be calculated by its parent
|
||||||
label.setWidth(60);
|
label.setWidth(60);
|
||||||
|
@ -46,17 +45,14 @@ int main(void) {
|
||||||
label.setUnfocusTexture(my_style->getLabelUnfocus());
|
label.setUnfocusTexture(my_style->getLabelUnfocus());
|
||||||
|
|
||||||
// fixed size
|
// fixed size
|
||||||
maxb.resize(15, 15);
|
maxb.setText("bar");
|
||||||
maxb.setTexture(my_style->getButtonFocus());
|
|
||||||
maxb.setUnfocusTexture(my_style->getButtonUnfocus());
|
|
||||||
|
|
||||||
// fixed size
|
// fixed size
|
||||||
closeb.resize(15, 15);
|
closeb.setText("fuubar");
|
||||||
closeb.setTexture(my_style->getButtonFocus());
|
|
||||||
closeb.setUnfocusTexture(my_style->getButtonUnfocus());
|
|
||||||
|
|
||||||
// will recursively unfocus its children
|
// will recursively unfocus its children
|
||||||
//foo.unfocus();
|
//foo.unfocus();
|
||||||
|
foo.update();
|
||||||
foo.show();
|
foo.show();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
Loading…
Reference in a new issue