Example #1
0
def opencontrolwindow():
	cw = WindowParent().create('Jukebox', (0, 0))
	v = VSplit().create(cw)
	#
	gain = ComplexSlider().define(v)
	gain.setminvalmax(0, G.gain, 255)
	gain.settexts('  ', '  ')
	gain.sethook(gain_setval_hook)
	#
	stop = PushButton().definetext(v, 'Stop')
	stop.hook = stop_hook
	#
	cw.realize()
	return cw
Example #2
0
def opencontrolwindow():
	cw = WindowParent().create('Jukebox', (0, 0))
	v = VSplit().create(cw)
	#
	gain = ComplexSlider().define(v)
	gain.setminvalmax(0, G.gain, 255)
	gain.settexts('  ', '  ')
	gain.sethook(gain_setval_hook)
	#
	stop = PushButton().definetext(v, 'Stop')
	stop.hook = stop_hook
	#
	cw.realize()
	return cw
Example #3
0
def main(n):
	from CSplit import CSplit
	#
	stdwin.setdefscrollbars(0, 0)
	#
	the_window = WindowParent().create('TestCSplit', (0, 0))
	the_csplit = CSplit().create(the_window)
	#
	for i in range(n):
		the_child = PushButton().define(the_csplit)
		the_child.settext(`(i+n-1)%n+1`)
	#
	the_window.realize()
	#
	MainLoop()
Example #4
0
def main(n):
	from CSplit import CSplit
	
	window = WindowParent().create('TestSched', (0, 0))
	csplit = CSplit().create(window)
	
	for i in range(n):
		child = PushButton().define(csplit)
		child.my_number = i
		child.my_id = None
		child.settext(`(i+n-1)%n+1`)
		child.hook = my_hook
	
	window.realize()
	
	WindowSched.run()
def main(n):
	from FormSplit import FormSplit
	#
	stdwin.setdefscrollbars(1, 1)
	#
	the_window = WindowParent().create('TestFormSplit', (0, 0))
	the_form = FormSplit().create(the_window)
	#
	for i in range(n):
		if i % 3 == 0:
			the_form.placenext(i*40, 0)
		the_child = PushButton().define(the_form)
		the_child.settext('XXX-' + `i` + '-YYY')
	#
	the_window.realize()
	#
	MainLoop()
Example #6
0
def main(n):
       from CSplit import CSplit

       the_window = WindowParent().create('TestCSplit', (0, 0))
       the_csplit = CSplit().create(the_window)

       for i in range(n):
               the_child = PushButton().define(the_csplit)
               the_child.settext(`(i+n-1)%n+1`)

       the_window.realize()

       while 1:
               the_event = stdwin.getevent()
               if the_event[0] = WE_CLOSE: break
               the_window.dispatch(the_event)
       the_window.destroy()
Example #7
0
def opencontrolwindow():
	stdwin.setdefscrollbars(0, 0)
	cw = WindowParent().create('Jukebox', (0, 0))
	#
	stop = PushButton().definetext(cw, '        Stop        ')
	stop.hook = stop_hook
	stop.enable(0)
	G.stop = stop
	#
	cw.realize()
	#
	G.ratemenu = cw.win.menucreate('Rate')
	for r in rates:
		G.ratemenu.additem(r)
	if G.rate == 0:
		G.ratemenu.check(0, 1)
	else:
		for i in len(range(rates)):
			if rates[i] == `G.rate`:
				G.ratemenu.check(i, 1)
	#
	return cw
Example #8
0
def opencontrolwindow():
    stdwin.setdefscrollbars(0, 0)
    cw = WindowParent().create('Jukebox', (0, 0))
    #
    stop = PushButton().definetext(cw, '        Stop        ')
    stop.hook = stop_hook
    stop.enable(0)
    G.stop = stop
    #
    cw.realize()
    #
    G.ratemenu = cw.win.menucreate('Rate')
    for r in rates:
        G.ratemenu.additem(r)
    if G.rate == 0:
        G.ratemenu.check(0, 1)
    else:
        for i in len(range(rates)):
            if rates[i] == ` G.rate `:
                G.ratemenu.check(i, 1)
    #
    return cw
Example #9
0
def main(n):
    from CSplit import CSplit
    #
    stdwin.setdefscrollbars(0, 0)
    #
    the_window = WindowParent().create('TestCSplit', (0, 0))
    the_csplit = CSplit().create(the_window)
    #
    for i in range(n):
        the_child = PushButton().define(the_csplit)
        the_child.settext( ` (i + n - 1) % n + 1 `)
    #
    the_window.realize()
    #
    MainLoop()
Example #10
0
def main(n):
    from FormSplit import FormSplit
    #
    stdwin.setdefscrollbars(1, 1)
    #
    the_window = WindowParent().create('TestFormSplit', (0, 0))
    the_form = FormSplit().create(the_window)
    #
    for i in range(n):
        if i % 3 == 0:
            the_form.placenext(i * 40, 0)
        the_child = PushButton().define(the_form)
        the_child.settext('XXX-' + ` i ` + '-YYY')
    #
    the_window.realize()
    #
    MainLoop()
Example #11
0
def main(n):
	from CSplit import CSplit
	
	the_window = WindowParent().create('TestCSplit', (0, 0))
	the_csplit = CSplit().create(the_window)
	
	for i in range(n):
		the_child = PushButton().define(the_csplit)
		the_child.settext(`(i+n-1)%n+1`)
	
	the_window.realize()
	
	while 1:
		the_event = stdwin.getevent()
		if the_event[0] = WE_CLOSE: break
		the_window.dispatch(the_event)
	the_window.destroy()
Example #12
0
	def drawpict(self, d):
		PushButton.drawpict(self, d)
		d.box(rect.inset(self.bounds, (1, 3)))