MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / __new__

Method __new__

27_fltk/python/fltk_ex.py:8–22  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6
7class Adder(Fl_Widget):
8 def __new__(self):
9 container = Fl_Pack(80, 50, 200, 20, "Adder Widget")
10 button = Fl_Button(0, 0, 50, 20, "add 1")
11 button.callback(self.add1)
12 button2 = Fl_Button(0, 0, 50, 20, "add 2")
13 button2.callback(self.add2)
14 button3 = Fl_Button(0, 0, 80, 20, "subtract 3")
15 button3.callback(self.sub3)
16 container.end()
17 container.type(FL_HORIZONTAL)
18
19 container2 = Fl_Pack(80, 130, 200, 20, "file widget")
20 button4 = Fl_Button(0, 0, 80, 20, "open file")
21 button4.callback(self.open_file)
22 container2.end()
23
24 def add1(self):
25 global COUNTER

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected