Back to index

python3.2  3.2.2
Public Member Functions | Private Attributes
pynche.StripViewer.StripViewer Class Reference

List of all members.

Public Member Functions

def __init__

Private Attributes

 __sb
 __uwdvar
 __hexpvar
 __reds
 __greens
 __blues

Detailed Description

Definition at line 316 of file StripViewer.py.


Constructor & Destructor Documentation

def pynche.StripViewer.StripViewer.__init__ (   self,
  switchboard,
  master = None 
)

Definition at line 317 of file StripViewer.py.

00317 
00318     def __init__(self, switchboard, master=None):
00319         self.__sb = switchboard
00320         optiondb = switchboard.optiondb()
00321         # create a frame inside the master.
00322         frame = Frame(master, relief=RAISED, borderwidth=1)
00323         frame.grid(row=1, column=0, columnspan=2, sticky='NSEW')
00324         # create the options to be used later
00325         uwd = self.__uwdvar = BooleanVar()
00326         uwd.set(optiondb.get('UPWHILEDRAG', 0))
00327         hexp = self.__hexpvar = BooleanVar()
00328         hexp.set(optiondb.get('HEXSTRIP', 0))
00329         # create the red, green, blue strips inside their own frame
00330         frame1 = Frame(frame)
00331         frame1.pack(expand=YES, fill=BOTH)
00332         self.__reds = StripWidget(switchboard, frame1,
00333                                   generator=constant_cyan_generator,
00334                                   axis=0,
00335                                   label='Red Variations',
00336                                   uwdvar=uwd, hexvar=hexp)
00337 
00338         self.__greens = StripWidget(switchboard, frame1,
00339                                     generator=constant_magenta_generator,
00340                                     axis=1,
00341                                     label='Green Variations',
00342                                     uwdvar=uwd, hexvar=hexp)
00343 
00344         self.__blues = StripWidget(switchboard, frame1,
00345                                    generator=constant_yellow_generator,
00346                                    axis=2,
00347                                    label='Blue Variations',
00348                                    uwdvar=uwd, hexvar=hexp)
00349 
00350         # create a frame to contain the controls
00351         frame2 = Frame(frame)
00352         frame2.pack(expand=YES, fill=BOTH)
00353         frame2.columnconfigure(0, weight=20)
00354         frame2.columnconfigure(2, weight=20)
00355 
00356         padx = 8
00357 
00358         # create the black button
00359         blackbtn = Button(frame2,
00360                           text='Black',
00361                           command=self.__toblack)
00362         blackbtn.grid(row=0, column=0, rowspan=2, sticky=W, padx=padx)
00363 
00364         # create the controls
00365         uwdbtn = Checkbutton(frame2,
00366                              text='Update while dragging',
00367                              variable=uwd)
00368         uwdbtn.grid(row=0, column=1, sticky=W)
00369         hexbtn = Checkbutton(frame2,
00370                              text='Hexadecimal',
00371                              variable=hexp,
00372                              command=self.__togglehex)
00373         hexbtn.grid(row=1, column=1, sticky=W)
00374 
00375         # XXX: ignore this feature for now; it doesn't work quite right yet

Here is the caller graph for this function:


Member Data Documentation

Definition at line 343 of file StripViewer.py.

Definition at line 337 of file StripViewer.py.

Definition at line 326 of file StripViewer.py.

Definition at line 331 of file StripViewer.py.

Definition at line 318 of file StripViewer.py.

Definition at line 324 of file StripViewer.py.


The documentation for this class was generated from the following file: