thanks, and while I could kinda get a PyQt gui going, I asked for Tk 
but even still, screw that ;P
I'm going full-out with OpenGL, I just need a little help porting the widgets to classes so I'll have less work to do.
(all I need to know is the hierarchy for building a proper GUI and I'll be set)
but as for right now, here's the code for my simplest widget: (the Toggle-Button)
yea, everything's just functions, except for the main layer and widget classes.
the original design of the GUI (as those 2 classes are modifications) consisted of nothing but functions as I didn't know how to work classes, or even decorators back then.
decorators are easy
they're just special wrapper functions:
def wrapper(f,v): f(*v) # I think this is right?? >.>
@wrapper
def func(v): pass
func(1)
is the same thing as:
def wrapper(f,*v): f(*v) # I think this is right?? >.>
def func(v): pass
wrapper(func,1)
EDIT:
also, some useful info for functions
>>> def f(a,b,c): print a,b,c
>>> d={'a':0,'c':1,'b':2}
>>> d
{'a': 0, 'c': 1, 'b': 2}
>>> f(**d)
0 2 1
>>>
I don't always syntax highlight, but I often try to.
that syntax style can be found in IDLE, Python's native IDE

but even still, screw that ;P
I'm going full-out with OpenGL, I just need a little help porting the widgets to classes so I'll have less work to do.

(all I need to know is the hierarchy for building a proper GUI and I'll be set)

but as for right now, here's the code for my simplest widget: (the Toggle-Button)
Code:
def __RemoveTButton(Na,priority=0):
global Widgets,layer
try:
Widgets[Na].hitdef.enabled=False #disable the hitdef (save the state)
tbna='TButton%sQuad'%Na
tbfna='TButton%sText'%Na
tbfbgna='TButton%sText'%Na
p2 = priority+2
if layer[0].stack[p2].HasPrimitive(tbna):
layer[0].stack[p2].RemovePrimitive(tbna)
layer[0].stack[p2].RemoveString(tbfna)
layer[0].stack[p2].RemovePrimitive(tbfbgna)
except: pass
def __TButton(X,Y,Na,St=False,Text='',fontcolor=(0,0,0,220),priority=0):
global Widgets,layer, AllowHitUpdates
#minor pre-calculations
X2,Y2=X+20.,Y+20.
fx,fy=X+25.,Y+2.
#verify the widget exists
try: W=Widgets[Na]
except KeyError:
Widgets[Na]=__Widget()
W=Widgets[Na]
W.info=St #toggle state
W.hitdef.x=X; W.hitdef.y=Y; W.hitdef.X=X2; W.hitdef.Y=Y2
#update the HitDef if changed by an outside function
if AllowHitUpdates!=W.hitdef.enabled: W.hitdef.enabled=AllowHitUpdates
#drawing data:
tbna='TButton%sQuad'%Na
tbfna='TButton%sText'%Na
#tbfbgna='TButton%sText'%Na
p2 = priority+2
if not layer[0].stack[p2].HasPrimitive(tbna): #don't draw if we already have
layer[0].stack[p2].AddQuad(tbna,[X,Y],[X2,Y],[X2,Y2],[X,Y2],(95,95,95,180))
layer[0].stack[priority].AddString(tbfna,Text,0.667,fx,fy,None,None,fontcolor)
fxtbfw = fx+layer[0].stack[priority].strings[tbfna].w
fytbfh = fy+layer[0].stack[priority].strings[tbfna].h
#layer[0].stack[p2].AddQuad(tbfbgna,[fx,fy],[fxtbfw,fy],[fxtbfw,fytbfh],[fx,fytbfh],(127,127,127,200))
TB = layer[0].stack[p2].primitives[tbna]
TBF = layer[0].stack[priority].strings[tbfna]
#TBFBG = layer[0].stack[p2].primitives[tbfbgna]
#Positioning Verification
if TB.Position([X,Y],[X2,Y],[X2,Y2],[X,Y2]):
TBF.Position(fx,fy,None,None)
fxtbfw,fytbfh = fx+TBF.w,fy+TBF.h
#TBFBG.Position([fx,fy],[fxtbfw,fy],[fxtbfw,fytbfh],[fx,fytbfh])
#HitDef
if W.hitdef.x!=X: W.hitdef.x=X; W.hitdef.X=X2
if W.hitdef.y!=Y: W.hitdef.y=Y; W.hitdef.Y=Y2
#Widget logic
if W.info:
if W.event.hasFocus: #change the color if the mouse is over the selection box
if W.event.clickL or W.event.holdL: #change the color if the selection box is clicked or held
TB.Color(79,79,79,180)
else: TB.Color(95,95,95,180)
else: TB.Color(79,79,79,180)
else:
if W.event.hasFocus:
if W.event.clickL or W.event.holdL:
TB.Color(79,79,79,180)
else: TB.Color(111,111,111,180)
else: TB.Color(95,95,95,180)
if W.event.releaseL: W.info=(False if W.info else True)
return W.info
yea, everything's just functions, except for the main layer and widget classes.
the original design of the GUI (as those 2 classes are modifications) consisted of nothing but functions as I didn't know how to work classes, or even decorators back then.
decorators are easy

they're just special wrapper functions:
def wrapper(f,v): f(*v) # I think this is right?? >.>
@wrapper
def func(v): pass
func(1)
is the same thing as:
def wrapper(f,*v): f(*v) # I think this is right?? >.>
def func(v): pass
wrapper(func,1)
EDIT:
also, some useful info for functions

>>> def f(a,b,c): print a,b,c
>>> d={'a':0,'c':1,'b':2}
>>> d
{'a': 0, 'c': 1, 'b': 2}
>>> f(**d)
0 2 1
>>>
I don't always syntax highlight, but I often try to.

that syntax style can be found in IDLE, Python's native IDE