2014-12-09 10:41:16 -08:00
|
|
|
|
2016-07-26 14:21:02 -07:00
|
|
|
var efl = require('efl');
|
2014-12-09 10:41:16 -08:00
|
|
|
|
2017-05-18 17:23:58 -07:00
|
|
|
win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
|
2016-07-26 14:21:02 -07:00
|
|
|
win.setText('title');
|
2014-12-09 10:41:16 -08:00
|
|
|
win.setAutohide(true);
|
|
|
|
|
2016-07-26 14:21:02 -07:00
|
|
|
bg = new efl.Elm.Bg(win);
|
|
|
|
bg.setHintWeight(1.0, 1.0);
|
2016-12-07 09:49:43 -08:00
|
|
|
win.setContent(bg);
|
2014-12-09 10:41:16 -08:00
|
|
|
bg.setVisible(true);
|
|
|
|
|
2016-07-26 14:21:02 -07:00
|
|
|
bx = new efl.Efl.Ui.Box(win);
|
|
|
|
bx.setHintWeight(1.0, 1.0);
|
2016-12-07 09:49:43 -08:00
|
|
|
win.setContent(bx);
|
2014-12-09 10:41:16 -08:00
|
|
|
|
2016-07-26 14:21:02 -07:00
|
|
|
entry = new efl.Elm.Label(win);
|
2014-12-09 10:41:16 -08:00
|
|
|
entry.setSize(100, 100);
|
2017-05-18 17:23:58 -07:00
|
|
|
entry.setPartText(null, "Texto");
|
2014-12-09 10:41:16 -08:00
|
|
|
|
2017-05-18 17:23:58 -07:00
|
|
|
console.log('Texto: ', entry.getPartText(null));
|
2014-12-09 10:41:16 -08:00
|
|
|
|
2016-07-26 14:21:02 -07:00
|
|
|
entry.setHintWeight(1.0, 1.0);
|
|
|
|
entry.setHintAlign(-1.0, -1.0);
|
2014-12-09 10:41:16 -08:00
|
|
|
entry.setWrapWidth(50);
|
|
|
|
bx.packEnd(entry);
|
|
|
|
entry.setVisible(true);
|
|
|
|
|
|
|
|
bx.setVisible(true);
|
|
|
|
|
|
|
|
win.setSize(300, 320);
|
|
|
|
win.setVisible(true);
|
|
|
|
|
|
|
|
console.log("Going to wait now\n");
|