Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/snack.pyc


-Jc@s[dZddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
d_Zd`ZdaZ
dbZdcZidd6ZddddYZd	efd
YZdefdYZd
efdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZiejd6ejd6ejd6ejd 6ej d!6ej!d"6ej"d#6ej#d$6ej$d%6ej%d&6ej&d'6ej'd(6ej(d)6e)d*d*6Z*x"e*j+D]Z,e,e*e*e,<qWd+ded,YZ-d-dfd.YZ.iej/d/6ej0d06ej1d16ej2d26ej3d36ej4d46ej5d56ej6d66ej7d76ej8d86ej9d96ej:d:6ej;d;6ej<d<6ej=d=6ej>d>6ej?d?6ej@d@6ejAdA6ejBdB6ejCdC6ejDdD6ejEdE6ZFdFdgdGYZGdHdHdIZHdJefdKYZIdLe.fdMYZJdNe.fdOYZKdPe.fdQYZLdReLfdSYZMdTefdUYZNdhdXdddddYZPdVdWgdXddddZZQddXd[dVdWgdd\ZRd]e.fd^YZSdS(is
This module provides the NEWT Windowing toolkit API for Python
This is a lightweight text-mode windowing library, based on slang.

Classes:

 - Widget  
 - Button  
 - CompactButton
 - Checkbox
 - SingleRadioButton
 - Listbox
 - Textbox
 - TextboxReflowed
 - Label
 - Scale
 - Entry
 - Form
 - Grid
 - SnackScreen
 - RadioGroup
 - RadioBar
 - ButtonBar
 - GridFormHelp
 - GridForm
 - CheckboxTree
 - Clistbox

Functions:

 - ListboxChoiceWindow
 - ButtonChoiceWindow
 - EntryWindow
iN(t
FLAG_DISABLEDt	FLAGS_SETtFLAGS_RESETtFLAGS_TOGGLEtFD_READtFD_WRITEt	FD_EXCEPTiitappendtWidgetcBs#eZdZddZdZRS(sBase class for NEWT toolkit - Do not use directly

    methods:

     - Widget(self)
     - setCallback(self, obj, data = None) : 
          The callback for when object activated.
          data is passed to obj.
    cCs0|r|jj||n|jj|dS(N(twtsetCallback(tselftobjtdata((s)/usr/lib/python2.7/dist-packages/snack.pyR
BscCs
tdS(N(tNotImplementedError(R((s)/usr/lib/python2.7/dist-packages/snack.pyt__init__HsN(t__name__t
__module__t__doc__tNoneR
R(((s)/usr/lib/python2.7/dist-packages/snack.pyR8s	tButtoncBseZdZdZRS(sqBasic button class, takes button text as parameter

    method:

     - Button(self, text): returns a button
    cCstj||_dS(N(t_snacktbuttonR	(Rttext((s)/usr/lib/python2.7/dist-packages/snack.pyRRs(RRRR(((s)/usr/lib/python2.7/dist-packages/snack.pyRKst
CompactButtoncBseZdZdZRS(sCompact Button class (less frilly button decoration).

    methods:

     - CompactButton(self,text) : create button, with text.
    cCstj||_dS(N(Rt
compactbuttonR	(RR((s)/usr/lib/python2.7/dist-packages/snack.pyR\s(RRRR(((s)/usr/lib/python2.7/dist-packages/snack.pyRUstCheckboxcBs>eZdZdZdZdZdZddZRS(sA checkbox.

    methods:
    
      - Checkbox(self, text, isOn = 0) : text, and boolean as to default value
      - setValue(self)                 : set value
      - value(self, value)             : return checkbox value
      - selected(self)                 : returns boolean
      - setFlags(self, flag, sense)    : set flags

      flags:  FLAG_DISABLED, FLAGS_SET, FLAGS_RESET
    cCs
|jjS(N(R	t
checkboxValue(R((s)/usr/lib/python2.7/dist-packages/snack.pytvaluelscCs|jjdkS(Ni(R	R(R((s)/usr/lib/python2.7/dist-packages/snack.pytselectedoscCs|jj||S(N(R	tcheckboxSetFlags(Rtflagtsense((s)/usr/lib/python2.7/dist-packages/snack.pytsetFlagsrscCs|jj|S(N(R	tcheckboxSetValue(RR((s)/usr/lib/python2.7/dist-packages/snack.pytsetValuevsicCstj|||_dS(N(RtcheckboxR	(RRtisOn((s)/usr/lib/python2.7/dist-packages/snack.pyRys(RRRRRR!R#R(((s)/usr/lib/python2.7/dist-packages/snack.pyR_s				tSingleRadioButtoncBs#eZdZdZddZRS(sSingle Radio Button.

    methods:
    
     -  SingleRadioButton(text, group, isOn = 0)  : create button
     -  selected(self)                            : returns bool, whether or not is selected.
    cCs|jj|jjkS(N(R	tkeyt
radioValue(R((s)/usr/lib/python2.7/dist-packages/snack.pyRsicCs@|r$tj||j||_ntj|d||_dS(N(RtradiobuttonR	R(RRtgroupR%((s)/usr/lib/python2.7/dist-packages/snack.pyRs(RRRRR(((s)/usr/lib/python2.7/dist-packages/snack.pyR&|s	tListboxcBsqeZdZdZdZdZdZdZdZdZ	dZ
d	d	d	d	d	d	d
ZRS(sListbox class.

    methods:

     - Listbox(self, height, scroll = 0, returnExit = 0, width = 0, showCursor = 0, multiple = 0, border = 0)
     - insert(self, text, item, before) : insert element; before = key to item to insert before, or None.
     - delete(self, item)               : delete item from list.
     - replace(self, text,item)         : Replace a given item's text
     - current(self)                    : returns currently selected item
     - getSelection(self)               : returns a list of selected items
     - setCurrent(self,i tem)           : select current.
     - clear(self)                      : clear listbox
    cCs0|jj|}||j|<||j|<dS(N(R	tlistboxAddItemtkey2itemtitem2key(RRtitemR'((s)/usr/lib/python2.7/dist-packages/snack.pyRs
cCsX|s|jj|d}n|jj||j|}||j|<||j|<dS(Ni(R	tlistboxInsertItemR.R-(RRR/tbeforeR'((s)/usr/lib/python2.7/dist-packages/snack.pytinserts

cCs6|jj|j||j|j|=|j|=dS(N(R	tlistboxDeleteItemR.R-(RR/((s)/usr/lib/python2.7/dist-packages/snack.pytdeletescCsb|jj||j|}|jj|j||j|j|=||j|<||j|<dS(N(R	R0R.R3R-(RRR/R'((s)/usr/lib/python2.7/dist-packages/snack.pytreplaces

cCs|j|jjS(N(R-R	tlistboxGetCurrent(R((s)/usr/lib/python2.7/dist-packages/snack.pytcurrentscCs>g}|jj}x"|D]}|j|j|qW|S(N(R	tlistboxGetSelectionRR-(Rt	selectiontlistR'((s)/usr/lib/python2.7/dist-packages/snack.pytgetSelections

cCs|jj|j|dS(N(R	tlistboxSetCurrentR.(RR/((s)/usr/lib/python2.7/dist-packages/snack.pyt
setCurrentscCs#i|_i|_|jjdS(N(R-R.R	tlistboxClear(R((s)/usr/lib/python2.7/dist-packages/snack.pytclears		icCsPtj|||||||_i|_i|_|rL|jj|ndS(N(RtlistboxR	R-R.tlistboxSetWidth(Rtheighttscrollt
returnExittwidtht
showCursortmultipletborder((s)/usr/lib/python2.7/dist-packages/snack.pyRs
!		(RRRRR2R4R5R7R;R=R?R(((s)/usr/lib/python2.7/dist-packages/snack.pyR+s
								tTextboxcBs/eZdZdZdZdddZRS(sTextbox, container for text.

    methods:

     - Textbox(self, width, height, scroll = 0, wrap = 0): scroll, wrap are flags
                                   include scroll bars, or text wrap.
     - setText(text) : set text.
     - setHeight(height): set height.
    cCs|jj|dS(N(R	ttextboxText(RR((s)/usr/lib/python2.7/dist-packages/snack.pytsetTextscCs|jj|dS(N(R	t
textboxHeight(RRB((s)/usr/lib/python2.7/dist-packages/snack.pyt	setHeightsicCs"tj||||||_dS(N(RttextboxR	(RRERBRRCtwrap((s)/usr/lib/python2.7/dist-packages/snack.pyRs(RRRRKRMR(((s)/usr/lib/python2.7/dist-packages/snack.pyRIs			tTextboxReflowedcBseZddddZRS(ii
icCsot||||\}}}|dkrR||krRtj||||dntj||||ddS(Niii(treflowRIR(RRERtflexDowntflexUpt	maxHeighttnewtextRB((s)/usr/lib/python2.7/dist-packages/snack.pyRs(RRR(((s)/usr/lib/python2.7/dist-packages/snack.pyRPstLabelcBs eZdZdZdZRS(s|A Label (simple text).

    methods:

     - Label(self,text)   : create label
     - setText(self,text) : change text.
    cCs|jj|dS(N(R	t	labelText(RR((s)/usr/lib/python2.7/dist-packages/snack.pyRKscCstj||_dS(N(RtlabelR	(RR((s)/usr/lib/python2.7/dist-packages/snack.pyRs(RRRRKR(((s)/usr/lib/python2.7/dist-packages/snack.pyRVs	tScalecBs eZdZdZdZRS(sA Scale (progress bar).

    methods:

     - Scale(self,width, total) : create scale; width: size on screen, fullamount: integer.
     - set(self,amount)         : set amount to integer.
    cCs|jj|dS(N(R	tscaleSet(Rtamount((s)/usr/lib/python2.7/dist-packages/snack.pytsetscCstj|||_dS(N(RtscaleR	(RREttotal((s)/usr/lib/python2.7/dist-packages/snack.pyRs(RRRR\R(((s)/usr/lib/python2.7/dist-packages/snack.pyRYs	tEntrycBsDeZdZdZddZdZddddddZRS(sEntry widget.

    methods:

     - Entry(self, width, text = "", hidden = 0, password = 0, scroll = 1, returnExit = 0)
          constructor. hidden doesn't show text, password stars it out,
          scroll includes scroll bars;
          if returnExit is set, return from Form when exiting this element, else
           proceed to next entry widget.
     - value(self): return value.
     - set(text, cursorAtEnd = 1) : set the text
     - setFlags (flag, sense) : flags can be FLAG_DISABLED, FLAGS_SET, FLAGS_RESET, FLAGS_TOGGLE
    cCs
|jjS(N(R	t
entryValue(R((s)/usr/lib/python2.7/dist-packages/snack.pyRsicCs|jj||S(N(R	t
entrySetValue(RRtcursorAtEnd((s)/usr/lib/python2.7/dist-packages/snack.pyR\scCs|jj||S(N(R	t
entrySetFlags(RRR ((s)/usr/lib/python2.7/dist-packages/snack.pyR!sticCs%tj|||||||_dS(N(RtentryR	(RRERthiddentpasswordRCRD((s)/usr/lib/python2.7/dist-packages/snack.pyRs(RRRRR\R!R(((s)/usr/lib/python2.7/dist-packages/snack.pyR_s
		tF1tF2tF3tF4tF5tF6tF7tF8tF9tF10tF11tF12tESCt tFormcBsYeZdZdZdZdZdZd	dZdZ	dZ
dZRS(
s Base Form class, from which Grid, etc. inherit

    methods:

     - Form(self, helpArg = None) : constructor. 
     - addHotKey(self, keyname) : keynames of form "F1" through "F12", "ESC"
     - add(self, widget) : Add a widget
     - run(self): run a  form, expecting input
     - draw(self): draw form.
     - setTimer(self, timer) : add a timer
     - watchFile(self, file, flags) : watch a named file
     - setCurrent (self, co): Set a given widget as the current focus
    cCs|jjt|dS(N(R	t	addhotkeythotkeys(Rtkeyname((s)/usr/lib/python2.7/dist-packages/snack.pyt	addHotKey<scCs|jjdr<x'|jjD]}|j|q"Wn|jjdrrxY|jD]}|j|qXWn8|jjdr||j|jj	<|jj|jSdS(NRxtgridmembersR	(t__dict__thas_keyRxtkeysRzR{taddttransR	R'R(RtwidgetR'R	((s)/usr/lib/python2.7/dist-packages/snack.pyR?scCsd|jj\}}|tjkr/|j|S|tjkrBdS|tjkr\|j|St|S(NtTIMER(	R	trunRtFORM_EXIT_WIDGETRtFORM_EXIT_TIMERtFORM_EXIT_FDREADYtfilemapRx(Rtwhattwhich((s)/usr/lib/python2.7/dist-packages/snack.pyRLscCs|jjdS(N(R	tdrawR(R((s)/usr/lib/python2.7/dist-packages/snack.pyRWs
cCs1i|_i|_tj||_||_dS(N(RRRtformR	thelpArg(RR((s)/usr/lib/python2.7/dist-packages/snack.pyR[s		cCs|jj|jdS(N(R	t
setcurrent(Rtco((s)/usr/lib/python2.7/dist-packages/snack.pyR=bscCs|jj|dS(N(R	tsettimer(Rttimer((s)/usr/lib/python2.7/dist-packages/snack.pytsetTimerescCs0||j|j<|jj|j|dS(N(RtfilenoR	twatchfd(Rtfiletflags((s)/usr/lib/python2.7/dist-packages/snack.pyt	watchFilehsN(RRRRzRRRRRR=RR(((s)/usr/lib/python2.7/dist-packages/snack.pyRv.s
		
				tGridcBs>eZdZdZddddddddZdZRS(syGrid class.

    methods:

     - place(self,x,y): Return what is placed at (x,y)
     - setField(self, what, col, row, padding = (0, 0, 0, 0),
                anchorLeft = 0, anchorTop = 0, anchorRight = 0,
                anchorBottom = 0, growx = 0, growy = 0):
                used to add widget 'what' to grid.
     - Grid(self, *args): eg. g = Grid(2,3) for 2x3 grid
    cCs|jj||S(N(tgtplace(Rtxty((s)/usr/lib/python2.7/dist-packages/snack.pyRxsic
Cs|jj|d}|r(tj}n|r:tj}n|rP|tjB}n|rf|tjB}nd}|	r~tj}n|
r|tjB}n|j	j
dr|jj|||j|||S|jj|||j
||SdS(NiR(R{RRtANCHOR_LEFTtANCHOR_RIGHTt
ANCHOR_TOPt
ANCHOR_BOTTOMt
GRID_GROWXt
GRID_GROWYR|R}RtsetfieldR	(
RRtcoltrowtpaddingt
anchorLeftt	anchorToptanchorRighttanchorBottomtgrowxtgrowytanchorFlagst	gridFlags((s)/usr/lib/python2.7/dist-packages/snack.pytsetField{s&cGs"ttj||_g|_dS(N(tapplyRtgridRR{(Rtargs((s)/usr/lib/python2.7/dist-packages/snack.pyRs(iiii(RRRRRR(((s)/usr/lib/python2.7/dist-packages/snack.pyRls		tROOTtBORDERtWINDOWtSHADOWtTITLEtBUTTONt	ACTBUTTONtCHECKBOXtACTCHECKBOXtENTRYtLABELtLISTBOXt
ACTLISTBOXtTEXTBOXt
ACTTEXTBOXtHELPLINEtROOTTEXTt
EMPTYSCALEt	FULLSCALEtDISENTRYt
COMPACTBUTTONt
ACTSELLISTBOXt
SELLISTBOXtSnackScreencBseZdZdZdZdZdZdZdZddZ
dZd	Zd
Z
dZdZddd
ZedZdZdZRS(s
A Screen;

    methods:

    - Screen(self) : constructor
    - finish(self)
    - resume(self)
    - suspend(self)
    - doHelpCallback(self,arg) call callback with arg
    - helpCallback(self,cb): Set help callback
    - suspendcallback(self,cb, data=None) : set callback. data=data to pass to cb.
    - openWindow(self,left, top, width, height, title): Open a window.
    - pushHelpLine(self,text): put help line on screen. Returns current help line if text=None
    - setColor(self, colorset, fg, bg): Set foreground and background colors;
            colorset = key from snack.colorsets,
            fg & bg = english color names defined by S-Lang
                (ref: S-Lang Library C Programmer's Guide section:
                8.4.4.  Setting Character Attributes)
    cCs3tjtj\|_|_|jddS(N(RtinittsizeRERBtpushHelpLineR(R((s)/usr/lib/python2.7/dist-packages/snack.pyRs
cCs
tjS(N(Rtfinish(R((s)/usr/lib/python2.7/dist-packages/snack.pyRscCstjdS(N(Rtresume(R((s)/usr/lib/python2.7/dist-packages/snack.pyRscCstjdS(N(Rtsuspend(R((s)/usr/lib/python2.7/dist-packages/snack.pyRscCs|j||dS(N(thelpCb(Rtarg((s)/usr/lib/python2.7/dist-packages/snack.pytdoHelpCallbackscCs||_tj|jS(N(RRthelpcallbackR(Rtcb((s)/usr/lib/python2.7/dist-packages/snack.pythelpCallbacks	cCs#|rtj||Stj|S(N(Rtsuspendcallback(RRR
((s)/usr/lib/python2.7/dist-packages/snack.pytsuspendCallbackscCstj|||||S(N(Rt
openwindow(RtleftttopRERBttitle((s)/usr/lib/python2.7/dist-packages/snack.pyt
openWindowscCs$|stjdStj|SdS(Ns	*default*(Rtpushhelpline(RR((s)/usr/lib/python2.7/dist-packages/snack.pyRs
cCs
tjS(N(Rtpophelpline(R((s)/usr/lib/python2.7/dist-packages/snack.pytpopHelpLinescCstj|||S(N(Rtdrawroottext(RRRR((s)/usr/lib/python2.7/dist-packages/snack.pytdrawRootTextscCstj|||S(N(Rtcenteredwindow(RRERBR((s)/usr/lib/python2.7/dist-packages/snack.pytcenteredWindowscCs8|r%|r%tj|j|||Stj|j|S(N(RtgridwrappedwindowR(RRRRR((s)/usr/lib/python2.7/dist-packages/snack.pytgridWrappedWindowscCs|rtjStjS(N(Rt	popwindowtpopwindownorefresh(Rtrefresh((s)/usr/lib/python2.7/dist-packages/snack.pyt	popWindows
cCs
tjS(N(RR(R((s)/usr/lib/python2.7/dist-packages/snack.pyRscCstjt|||S(N(Rtsetcolort	colorsets(Rtcolorsettfgtbg((s)/usr/lib/python2.7/dist-packages/snack.pytsetColorsN(RRRRRRRRRRRRRRRRRtTrueRRR(((s)/usr/lib/python2.7/dist-packages/snack.pyRs"												icCstj||||S(sR returns a tuple of the wrapped text, the actual width, and the actual height
    (RRQ(RRERRRS((s)/usr/lib/python2.7/dist-packages/snack.pyRQst
RadioGroupcBs,eZdZdZddZdZRS(s Combo widget: Group of Radio buttons

    methods:

     - RadioGroup(self): constructor.
     - add(self,title, value, default = None): add a button. Returns button.
     - getSelection(self) : returns value of selected button | None    
    cCsd|_g|_dS(N(Rtprevt
buttonlist(R((s)/usr/lib/python2.7/dist-packages/snack.pyRs	cCsW|jr|dkrd}nt||j|}||_|jj||f|S(Ni(RRR&RR(RRRtdefaulttb((s)/usr/lib/python2.7/dist-packages/snack.pyRs		cCs.x'|jD]\}}|jr
|Sq
WdS(N(RRR(RRR((s)/usr/lib/python2.7/dist-packages/snack.pyR;!sN(RRRRRRR;(((s)/usr/lib/python2.7/dist-packages/snack.pyR
s	
tRadioBarcBs eZdZdZdZRS(s Bar of Radio buttons, based on Grid.

    methods:

    - RadioBar(self, screen, buttonlist) : constructor.
    - getSelection(self): return value of selected button 
    cCsg|_d|_t|_tj|dt|xq|D]i\}}}|jj|||}|jj||f|j	|d|jdd|jd|_q>WdS(NiiR(
R:R/RR*RRtlenRRR(RtscreenRRRRR((s)/usr/lib/python2.7/dist-packages/snack.pyR0s		cCs
|jjS(N(R*R;(R((s)/usr/lib/python2.7/dist-packages/snack.pyR;;s(RRRRR;(((s)/usr/lib/python2.7/dist-packages/snack.pyR's	t	ButtonBarcBs#eZdZddZdZRS(s Bar of buttons, based on grid.

    methods:

     - ButtonBar(screen, buttonlist,buttonlist, compact = 0):
     - buttonPressed(self, result):  Takes the widget returned by Form.run and looks to see
                     if it was one of the widgets in the ButtonBar.
    ic		Csg|_i|_d|_tj|t|dx|D]}t|tjkrn|}t	j
|}n=t|dkr|\}}n|\}}}||j|<|rt|}nt|}|jj
||f|j||jdd|jd|_q;WdS(Niii(iiii(R:RxR/RRRttypettypest
StringTypetstringtlowerRRRR(	RRRtcompacttblistRRthotkeyR((s)/usr/lib/python2.7/dist-packages/snack.pyRJs$			

cCsK|jj|r|j|Sx'|jD]\}}||kr'|Sq'WdS(N(RxR}R:R(RtresultRR((s)/usr/lib/python2.7/dist-packages/snack.pyt
buttonPressedas(RRRRR(((s)/usr/lib/python2.7/dist-packages/snack.pyRAstGridFormHelpcBseZdZdZddddddddZd
d
dZdZdZd
d
dZ	d
d
dZ
d	Zd
ZdZ
RS(s= Subclass of Grid, for the help form text.

    methods:

     - GridFormHelp(self, screen, title, help, *args) :
     - add (self, widget, col, row, padding = (0, 0, 0, 0),
            anchorLeft = 0, anchorTop = 0, anchorRight = 0,
            anchorBottom = 0, growx = 0, growy = 0):
     - runOnce(self, x = None, y = None):  pop up the help window
     - addHotKey(self, keyname):
     - setTimer(self, keyname):
     - create(self, x = None, y = None):
     - run(self, x = None, y = None):
     - draw(self):
     - runPopup(self):
     - setCurrent (self, co):
    cGsf||_||_t||_g|_d|_t|}|g|d*ttj	t
|dS(Ni(RRRvRt	childListtform_createdR:RRRttuple(RRRthelpR((s)/usr/lib/python2.7/dist-packages/snack.pyR}s				
icCs<|j|||||||||	|

|jj|dS(N(RRR(RRRRRRRRRRR((s)/usr/lib/python2.7/dist-packages/snack.pyRs	
cCs#|j||}|jj|S(N(RRR(RRRR((s)/usr/lib/python2.7/dist-packages/snack.pytrunOnces
cCs|jj|dS(N(RRz(RRy((s)/usr/lib/python2.7/dist-packages/snack.pyRzscCs|jj|dS(N(RR(RRy((s)/usr/lib/python2.7/dist-packages/snack.pyRscCsi|jse|jddx!|jD]}|jj|q#W|jj||j||d|_ndS(Ni(RRRRRRRR(RRRtchild((s)/usr/lib/python2.7/dist-packages/snack.pytcreates	cCs|j|||jjS(N(RRR(RRR((s)/usr/lib/python2.7/dist-packages/snack.pyRscCs|j|jjS(N(RRR(R((s)/usr/lib/python2.7/dist-packages/snack.pyRs
cCs@|j|jj||j|jj}|jj|S(N(RRRRRRR(RR((s)/usr/lib/python2.7/dist-packages/snack.pytrunPopups


cCs|jj|dS(N(RR=(RR((s)/usr/lib/python2.7/dist-packages/snack.pyR=s(iiiiN(RRRRRRR	RzRRRRRR=(((s)/usr/lib/python2.7/dist-packages/snack.pyRks	
					tGridFormcBseZdZdZRS(sh GridForm class (extends GridFormHelp):

    methods:

     - GridForm(self, screen, title, *args):
    cGs*|||df|}ttj|dS(N(RRRR(RRRRtmyargs((s)/usr/lib/python2.7/dist-packages/snack.pyRs(RRRR(((s)/usr/lib/python2.7/dist-packages/snack.pyR
stCheckboxTreecBszeZdZdddZdddZdZdddddZdZdZ	dZ
d	d
ZdZRS(
s CheckboxTree combo widget,

    methods:

     - CheckboxTree(self, height, scroll = 0, width = None, hide_checkbox = 0, unselectable = 0)
                    constructor.
     - append(self, text, item = None, selected = 0):
     - addItem(self, text, path, item = None, selected = 0):
     - getCurrent(self):
     - getSelection(self):
     - setEntry(self, item, text):
     - setCurrent(self, item):
     - setEntryValue(self, item, selected = 1):
     - getEntryValue(self, item):
    icCs!|j|tdf||dS(NR(taddItemt	snackArgs(RRR/R((s)/usr/lib/python2.7/dist-packages/snack.pyRscCsK|dkr|}n|jj|||}||j|<||j|<dS(N(RR	tcheckboxtreeAddItemR-R.(RRtpathR/RR'((s)/usr/lib/python2.7/dist-packages/snack.pyRs
	
cCs|jj}|j|S(N(R	tcheckboxtreeGetCurrentR-(Rtcurr((s)/usr/lib/python2.7/dist-packages/snack.pyt
getCurrentscCsJtj|||||_i|_i|_|rF|jj|ndS(N(RtcheckboxtreeR	R-R.tcheckboxtreeSetWidth(RRBRCREt
hide_checkboxtunselectable((s)/usr/lib/python2.7/dist-packages/snack.pyRs
		cCs>g}|jj}x"|D]}|j|j|qW|S(N(R	tcheckboxtreeGetSelectionRR-(RR9R:R'((s)/usr/lib/python2.7/dist-packages/snack.pyR;s

cCs|jj|j||dS(N(R	tcheckboxtreeSetEntryR.(RR/R((s)/usr/lib/python2.7/dist-packages/snack.pytsetEntryscCs|jj|j|dS(N(R	tcheckboxtreeSetCurrentR.(RR/((s)/usr/lib/python2.7/dist-packages/snack.pyR=sicCs|jj|j||dS(N(R	tcheckboxtreeSetEntryValueR.(RR/R((s)/usr/lib/python2.7/dist-packages/snack.pyt
setEntryValuescCs|jj|j|S(N(R	tcheckboxtreeGetEntryValueR.(RR/((s)/usr/lib/python2.7/dist-packages/snack.pyt
getEntryValuesN(
RRRRRRRRR;RR=R R"(((s)/usr/lib/python2.7/dist-packages/snack.pyRs				tOktCanceli(c
	Csz|dkrt|}nt||}
t||}t|d|dd}d}
x|D]z}t|tjkr|\}}n|}|
}||
kr|}n||kr|}n|j|||
d}
q^W|d
kr|j	|nt
|||	dd}|j|dd|j|dddd|j|
ddd	d|j}|
j
||jfS(s
    - ListboxChoiceWindow(screen, title, text, items, 
            buttons = ('Ok', 'Cancel'), 
            width = 40, scroll = 0, height = -1, default = None,
            help = None):
    iRCRDiiiRiRN(iiii(RRRPR+RRt	TupleTypeRRR=RRR	RR7(RRRtitemstbuttonsRERCRBRRtbbtttltcountR/R'Rtrc((s)/usr/lib/python2.7/dist-packages/snack.pytListboxChoiceWindows2

		c	Cst||}t||d|jd}	t|||dd}
|
j|	dddd|
j|dddd|j|
j||S(	s
     - ButtonChoiceWindow(screen, title, text, 
               buttons = [ 'Ok', 'Cancel' ], 
               width = 40, x = None, y = None, help = None):
    RTiiiiRR(iiii(RRPRBRRRR	(RRRR'RERRRR(R)R((s)/usr/lib/python2.7/dist-packages/snack.pytButtonChoiceWindow"sic	
Cst||}	t||}
d}x|D]}|d}q+Wtd|}
d}g}x|D]}t|tjkr|\}}t|tjkrt||}qnt|}|
jt	|d|dddd|
j|d|dd|d}|j
|qaWt|||dd}|j|
dddd	|j|
dddd
|j|	dddd|j
}g}d}x/|D]'}|j
||j|d}qW|	j|t|fS(s
    EntryWindow(screen, title, text, prompts, allowCancel = 1, width = 40,
        entryWidth = 20, buttons = [ 'Ok', 'Cancel' ], help = None):
    iiiRRiR(iiii(iiii(iiii(RRPRRRR%tStringTypesR_RRVRRRR	RRR(RRRtpromptstallowCancelREt
entryWidthR'RR(R)R+tntsgt	entryListteRRtentryValues((s)/usr/lib/python2.7/dist-packages/snack.pytEntryWindow2s:

%

tCListboxc	BseZdZdddddddddZdddZddZddZdZddZ	d	Z
d
ZdZRS(
spClistbox convenience class.

    methods:

     - Clistbox(self, height, cols, cols_widths, scroll = 0)       : constructor
     - colFormText(self, col_text, align = None, adjust_width = 0) : column text.
     - append(self, col_text, item, col_text_align = None)         :
     - insert(self, col_text, item, before, col_text_align = None)
     - delete(self, item)
     - replace(self, col_text, item, col_text_align = None)
     - current(self) : returns current item
     - setCurrent(self, item): sets an item as current
     - clear(self): clear the listbox
     
     Alignments may be LEFT, RIGHT, CENTER, None
    iicCs||_||_||_||_|	dkrtj|ddd}|j|	|
d|}
t|
|_	|j
|j	ddddntj|ddd}t|||||_|j
|jd|dddS(Niitadjust_widthiRR(
tcolst
col_widthstcol_padtcol_text_alignRRRtcolFormTextRVRXRR+R@(RRBR;R<RCRDRER=R>t
col_labelstcol_label_alignR:tbox_ytlstr((s)/usr/lib/python2.7/dist-packages/snack.pyRqs	
			cCsd}d}t|}xf||jkr||kr||}tj|}|j||kr|rx||j|<q||j| }n|j|tj|}	|	dkr?|dkrt}
n
||}
|
tkr|d|	}n|
tkrd|	d|d|	dd}n|
tkr?d|	|}q?n||dkr_d|j	}nd}|||}|d}qW|S(NiRdRuii(
RR;RtwstrlenR<RtLEFTtCENTERtRIGHTR=(Rtcol_texttalignR:titstrtc_lentcstrtcstrlentdeltatatpstr((s)/usr/lib/python2.7/dist-packages/snack.pyR?s8
	
cCsA|dkr|j}n|j||}|jj||dS(N(RR>R?R@R(RRHR/R>R((s)/usr/lib/python2.7/dist-packages/snack.pyRscCsD|dkr|j}n|j||}|jj|||dS(N(RR>R?R@R2(RRHR/R1R>R((s)/usr/lib/python2.7/dist-packages/snack.pyR2scCs|jj|dS(N(R@R4(RR/((s)/usr/lib/python2.7/dist-packages/snack.pyR4scCsA|dkr|j}n|j||}|jj||dS(N(RR>R?R@R5(RRHR/R>R((s)/usr/lib/python2.7/dist-packages/snack.pyR5scCs
|jjS(N(R@R7(R((s)/usr/lib/python2.7/dist-packages/snack.pyR7scCs|jj|dS(N(R@R=(RR/((s)/usr/lib/python2.7/dist-packages/snack.pyR=scCs|jjdS(N(R@R?(R((s)/usr/lib/python2.7/dist-packages/snack.pyR?sN(
RRRRRR?RR2R4R5R7R=R?(((s)/usr/lib/python2.7/dist-packages/snack.pyR9`s	)			(ii(ii(ii(ii(ii(((((R#R$(TRRRRRRRRRRRREtDOWNRFtUPRGRRRRRR&R+RIRPRVRYR_tKEY_F1tKEY_F2tKEY_F3tKEY_F4tKEY_F5tKEY_F6tKEY_F7tKEY_F8tKEY_F9tKEY_F10tKEY_F11tKEY_F12tKEY_ESCtordRxR~R3RvRt
COLORSET_ROOTtCOLORSET_BORDERtCOLORSET_WINDOWtCOLORSET_SHADOWtCOLORSET_TITLEtCOLORSET_BUTTONtCOLORSET_ACTBUTTONtCOLORSET_CHECKBOXtCOLORSET_ACTCHECKBOXtCOLORSET_ENTRYtCOLORSET_LABELtCOLORSET_LISTBOXtCOLORSET_ACTLISTBOXtCOLORSET_TEXTBOXtCOLORSET_ACTTEXTBOXtCOLORSET_HELPLINEtCOLORSET_ROOTTEXTtCOLORSET_EMPTYSCALEtCOLORSET_FULLSCALEtCOLORSET_DISENTRYtCOLORSET_COMPACTBUTTONtCOLORSET_ACTSELLISTBOXtCOLORSET_SELLISTBOXRRRQRRRRR
RRR-R.R8R9(((s)/usr/lib/python2.7/dist-packages/snack.pyt<module>(s4


A	!$>.






















Q*I9)	-