Template:Canvas Widget Template
Jump to navigation
Jump to search
gui.widgets.myWidget = {
# our constructor
new: func(parent, style, cfg){
var m = gui.Widget.new(gui.widgets.myWidget);
m._cfg = Config.new(cfg);
m._focus_policy = m.NoFocus;
m._setView(style.createWidget(parent, "myWidget", m._cfg));
return m;
}, # new() constructor
# widget-specific APIs come below, e.g., setText()
};