def testEntFraList(debu=0): #myEntFraList # ridefinisco la callback def on_activate(widg, ind, *data): print "b", "%05s" % widg.get_text(), ind, data # xBox, [fram, [labe, xBox, entr, call]] * N obje, othe = myEntFraList(name=["One", "Two", "Three"], numb=None, call=on_activate, data=[], nFra=['Label01', 'Label02', 'Label03'], cFra='black', bFra=1, sFra=Gtk.SHADOW_ETCHED_OUT, tFra='v', aFra=[False, False, 1], tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myEntryFrame', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, othe) # <- return obj1
def testChkButton(): #myChkButton # ridefinisco la callback def on_clicked(widg, name, *data): ena = widg.get_active() print "b) %s is %s" % (name, ("OFF", "ON")[ena]) # butt, call obje, othe = myChkButton( name='my_ChkButton', valu=True, colo='black', # call= on_clicked, data=['myCheck',]) call=None, data=[ 'myCheck', ]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='prova', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, [othe]) # <- return obj1
def testLabList(): #myLabList # xBox, [labe, None] * N obje, othe = myLabList(name=["Read", "Write", "Default"], leng=7, prea=' ', post=':', font='Courier 10', colo='brown', tBox='v', aBox=[False, False, 1]) # cambio colore alla seconda label othe[1][0].modify_fg(Gtk.STATE_NORMAL, Gdk.color_parse("green")) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myLabel', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, othe) # <- return obj1
def testButList(): #myButList # ridefinisco la callback def on_clicked(widg, ind, *data): print "b", ind, data # xBox, [butt,call] * N obje, othe = myButList(name=["_Read", "_Write", "_Default"], icon=Gtk.STOCK_NO, call=on_clicked, data=[], tBox='v', aBox=[False, False, 1]) # abilito la vista dell'icona che di default è nascosta othe[0][0].set_always_show_image(True) othe[1][0].set_always_show_image(True) othe[2][0].set_always_show_image(True) # cambio icona ad alcuni bottoni othe[0][0].props.image = Gtk.Image.new_from_stock(Gtk.STOCK_YES, Gtk.ICON_SIZE_BUTTON) othe[1][0].props.image = Gtk.Image.new_from_stock(Gtk.STOCK_STOP, Gtk.ICON_SIZE_BUTTON) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myButton', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, othe) # <- return obj1
def testEntList(): #myEntList # ridefinisco la callback def on_activate(widg, ind, *data): pass print "b", "%05s" % widg.get_text(), ind, data # xBox, [entr, call] * N obje, othe = myEntList(name=["One", "Two", "Three"], numb=6, call=on_activate, data=[], tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myEntry', obje=obje, colo="black", bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, othe) # <- return obj1
def testChkButList(): #myChkButton # ridefinisco la callback def on_clicked1(widg, ind, *data): ena = widg.get_active() print "%05s" % widg.props.label.replace('_', ''), "is", ("OFF", "ON")[ena] # xBox, [butt, call] * N obje, othe = myChkButList(name=["Uno", "Due", "Tre"], valu=False, colo=None, call=on_clicked1, data=['uffi'], tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myButton', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, othe) # <- return obj1
def testRadButList(): #myRadButton # ridefinisco la callback def on_clicked(widg, ind, *data): ena = widg.get_active() if ena: print "b", "%05s" % widg.props.label.replace('_', ''), print ind, data # xBox, [butt,call] * N obje, othe = myRadButList(name=["One", "Two", "Three"], chil=None, valu=1, call=on_clicked, data=[], tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='select', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, othe) # <- return obj1
def testRadButton(): #radButton # ridefinisco la callback def on_clicked(widg, *data): # descrivo solo quello attivato try: if widg.get_active(): print data[0] except: pass # butt, call obje, othe = myRadButton(name='primo', chil=None, valu=False, call=on_clicked, data=[ 'myRadio', ]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myRadioButton', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, [othe]) # <- return obj1
def testButList(): #myButList # ridefinisco la callback def on_clicked(widg, ind, *data): print "b", ind, data # xBox, [butt,call] * N obje, othe = myButList(name=["_Read","_Write","_Default"], icon=Gtk.STOCK_NO, call=on_clicked, data=[], tBox='v', aBox=[False, False, 1]) # abilito la vista dell'icona che di default è nascosta othe[0][0].set_always_show_image (True) othe[1][0].set_always_show_image (True) othe[2][0].set_always_show_image (True) # cambio icona ad alcuni bottoni othe[0][0].props.image = Gtk.Image.new_from_stock(Gtk.STOCK_YES, Gtk.ICON_SIZE_BUTTON) othe[1][0].props.image = Gtk.Image.new_from_stock(Gtk.STOCK_STOP, Gtk.ICON_SIZE_BUTTON) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myButton', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, othe) # <- return obj1
def testButFraList(): #myButFraList # ridefinisco la callback def on_clicked(widg, ind, *data): print "b", ind, data # xBox, [fram, [labe, xBox, butt, call]] * N obje, othe = myButFraList(name=["Read","Write","Default"], nBut=["","",""], icon=Gtk.STOCK_NO, call=on_clicked, data=[], bFra=1, sFra=Gtk.SHADOW_ETCHED_OUT, tFra='v', aFra=[False, False, 1], tBox='h', aBox=[False, False, 1]) # abilito la vista dell'icona che di default è nascosta othe[0][1][2].set_always_show_image (True) othe[1][1][2].set_always_show_image (True) othe[2][1][2].set_always_show_image (True) # cambio icona ad alcuni bottoni othe[0][1][2].props.image = Gtk.Image.new_from_stock(Gtk.STOCK_YES, Gtk.ICON_SIZE_BUTTON) othe[1][1][2].props.image = Gtk.Image.new_from_stock(Gtk.STOCK_YES, Gtk.ICON_SIZE_BUTTON) othe[2][1][2].props.image = Gtk.Image.new_from_stock(Gtk.STOCK_YES, Gtk.ICON_SIZE_BUTTON) #debug myViewObject(obje, othe) # <- return obje
def testButFraList(): #myButFraList # ridefinisco la callback def on_clicked(widg, ind, *data): print "b", ind, data # xBox, [fram, [labe, xBox, butt, call]] * N obje, othe = myButFraList(name=["Read", "Write", "Default"], nBut=["", "", ""], icon=Gtk.STOCK_NO, call=on_clicked, data=[], bFra=1, sFra=Gtk.SHADOW_ETCHED_OUT, tFra='v', aFra=[False, False, 1], tBox='h', aBox=[False, False, 1]) # abilito la vista dell'icona che di default è nascosta othe[0][1][2].set_always_show_image(True) othe[1][1][2].set_always_show_image(True) othe[2][1][2].set_always_show_image(True) # cambio icona ad alcuni bottoni othe[0][1][2].props.image = Gtk.Image.new_from_stock( Gtk.STOCK_YES, Gtk.ICON_SIZE_BUTTON) othe[1][1][2].props.image = Gtk.Image.new_from_stock( Gtk.STOCK_YES, Gtk.ICON_SIZE_BUTTON) othe[2][1][2].props.image = Gtk.Image.new_from_stock( Gtk.STOCK_YES, Gtk.ICON_SIZE_BUTTON) #debug myViewObject(obje, othe) # <- return obje
def testChkButLisLabel(): #myChkButLisLabel # ridefinisco la callback def on_clicked(widg, ind, *data): ena = widg.get_active() #print "b", widg, ind, idata print "%05s" % widg.props.label.replace('_', ''), "is", ("OFF", "ON")[ena] # xBox, [labe, [butt, call] * N] obje, othe = myChkButLisLabel(name=["One", "Two", "Three"], valu=False, colo=None, call=on_clicked, data=[], nLab='Label', cLab=None, tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myButton', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, othe) # <- return obj1
def testEntLabList(): #myEntLabList # ridefinisco la callback def on_activate(widg, ind, *data): print "b", "%05s" % widg.get_text(), ind, data # xBox, [xBox, [entr, call, labe]] * N obje, othe = myEntLabList( name=["One", "Two", "Three"], numb=6, call=on_activate, data=[], nLab=['Label01', 'Label02', 'Label03'], cLab="#333", tLab='h', aLab=[False, False, 1], tBox='v', aBox=[False, False, 1], ) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myEntLabList', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v') #debug myViewObject(obje, othe) # <- return obj1
def testLabList(): #myLabList # xBox, [labe, None] * N obje, othe = myLabList(name=["Read","Write","Default"], leng=7, prea=' ', post=':', font='Courier 10', colo='brown', tBox='v', aBox=[False, False, 1]) # cambio colore alla seconda label othe[1][0].modify_fg(Gtk.STATE_NORMAL, Gdk.color_parse("green")) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myLabel', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, othe) # <- return obj1
def testEntList(): #myEntList # ridefinisco la callback def on_activate(widg, ind, *data): pass print "b", "%05s" %widg.get_text(), ind, data # xBox, [entr, call] * N obje, othe = myEntList(name=["One","Two","Three"], numb=6, call=on_activate, data=[], tBox='h', aBox=[False, False, 1] ) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myEntry', obje=obje, colo="black", bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, othe) # <- return obj1
def testChkButton(): #myChkButton # ridefinisco la callback def on_clicked(widg, name, *data): ena = widg.get_active() print "b) %s is %s" % (name, ("OFF", "ON")[ena]) # butt, call obje, othe = myChkButton(name='my_ChkButton', valu=True, colo='black', # call= on_clicked, data=['myCheck',]) call= None, data=['myCheck',]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='prova', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, [othe]) # <- return obj1
def testChkButList(): #myChkButton # ridefinisco la callback def on_clicked1(widg, ind, *data): ena = widg.get_active() print "%05s" %widg.props.label.replace('_',''), "is", ("OFF", "ON")[ena] # xBox, [butt, call] * N obje, othe = myChkButList(name=["Uno","Due","Tre"], valu=False, colo=None, call=on_clicked1, data=['uffi'], tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myButton', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, othe) # <- return obj1
def testEntLabList(): #myEntLabList # ridefinisco la callback def on_activate(widg, ind, *data): print "b", "%05s" %widg.get_text(), ind, data # xBox, [xBox, [entr, call, labe]] * N obje, othe = myEntLabList(name=["One","Two","Three"], numb=6, call=on_activate, data=[], nLab=['Label01','Label02','Label03'], cLab="#333", tLab='h', aLab=[False, False, 1], tBox='v', aBox=[False, False, 1],) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myEntLabList', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, othe) # <- return obj1
def testChkButLisLabel(): #myChkButLisLabel # ridefinisco la callback def on_clicked(widg, ind, *data): ena = widg.get_active() #print "b", widg, ind, idata print "%05s" %widg.props.label.replace('_',''), "is", ("OFF", "ON")[ena] # xBox, [labe, [butt, call] * N] obje, othe = myChkButLisLabel(name=["One","Two","Three"], valu=False, colo=None, call=on_clicked, data=[], nLab='Label', cLab=None, tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myButton', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, othe) # <- return obj1
def testRadButList(): #myRadButton # ridefinisco la callback def on_clicked(widg, ind, *data): ena = widg.get_active() if ena: print "b", "%05s" %widg.props.label.replace('_',''), print ind, data # xBox, [butt,call] * N obje, othe = myRadButList(name=["One","Two","Three"], chil=None, valu=1, call=on_clicked, data=[], tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='select', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, othe) # <- return obj1
def testEntFraList(debu=0): #myEntFraList # ridefinisco la callback def on_activate(widg, ind, *data): print "b", "%05s" %widg.get_text(), ind, data # xBox, [fram, [labe, xBox, entr, call]] * N obje, othe = myEntFraList(name=["One","Two","Three"], numb=None, call=on_activate, data=[], nFra=['Label01','Label02','Label03'], cFra='black', bFra=1, sFra=Gtk.SHADOW_ETCHED_OUT, tFra='v', aFra=[False, False, 1], tBox='h', aBox=[False, False, 1]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myEntryFrame', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, othe) # <- return obj1
def testRadButton(): #radButton # ridefinisco la callback def on_clicked(widg, *data): # descrivo solo quello attivato try: if widg.get_active(): print data[0] except: pass # butt, call obje, othe = myRadButton(name='primo', chil=None, valu=False, call= on_clicked, data=['myRadio',]) #myFrame # fram,[labe,xBox] obj1, oth1 = myFrame(name='myRadioButton', obje=obje, colo='black', bord=2, shad=Gtk.SHADOW_ETCHED_OUT, tBox='v' ) #debug myViewObject(obje, [othe]) # <- return obj1