Debian Codegraph @

Nasal/canvas/gui/widgets/Switch.nas

raw
1 gui.widgets.Switch = {
2 new: func(parent, style = nil, cfg = nil) {
3 cfg = Config.new(cfg);
4 cfg.set("type", "switch");
5 var m = gui.widgets.Button.new(parent, style, cfg);
6 m._checkable = 1;
7
8 append(m.parents, gui.widgets.Switch);
9
10 m.setFixedSize(48, 24);
11 return m;
12 },
13 setCheckable: nil,
14 setText: nil,
15 };
16