2014-12-09 10:41:16 -08:00
|
|
|
efl = require('efl');
|
|
|
|
|
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("Popup");
|
2014-12-09 10:41:16 -08:00
|
|
|
win.setAutohide(true);
|
|
|
|
|
2016-07-26 14:21:02 -07:00
|
|
|
content = new efl.Elm.Label(win);
|
2017-05-18 17:23:58 -07:00
|
|
|
content.setPartText("elm.text", "<align=center>Content</align>");
|
2014-12-09 10:41:16 -08:00
|
|
|
|
2016-07-26 14:21:02 -07:00
|
|
|
popup = new efl.Elm.Popup(win);
|
2014-12-09 10:41:16 -08:00
|
|
|
popup.setTimeout(3);
|
|
|
|
|
|
|
|
popup.on('timeout', function()
|
|
|
|
{
|
|
|
|
console.log("timeout");
|
|
|
|
popup.setVisible(false);
|
|
|
|
});
|
|
|
|
|
2017-11-19 22:41:07 -08:00
|
|
|
content_container = popup.part("elm.swallow.content").cast("Efl.Content");
|
2016-07-26 14:21:02 -07:00
|
|
|
content_container.setContent(content);
|
2014-12-09 10:41:16 -08:00
|
|
|
|
2017-05-18 17:23:58 -07:00
|
|
|
popup.setPartText("title,text", "Title");
|
2014-12-09 10:41:16 -08:00
|
|
|
popup.setVisible(true);
|
|
|
|
|
|
|
|
popup.on('block_clicked', function()
|
|
|
|
{
|
|
|
|
console.log("clicked")
|
|
|
|
popup.setVisible(false);
|
|
|
|
});
|
|
|
|
|
|
|
|
win.setSize(480, 800);
|
|
|
|
win.setVisible(true);
|