ž
©ÿf÷F c @ sà d Z d d l TGd d „ d e ƒ Z Gd d „ d e ƒ Z Gd d „ d e ƒ Z Gd d
„ d
e ƒ Z e d k rÜe ƒ Z
e e
d d
d g d d d e ƒZ e j
d e d e d e ƒ e e j d
j d d d d ƒj
ƒ e e j d
j d d d d ƒj
ƒ e e j d j d d ƒj
ƒ e e
ƒ Z e e
d d d d d „ ƒZ e e
d d d d d „ ƒZ e e
d d ƒZ e j
d d! d d! ƒ e j
d d! d d! ƒ e j
d d! ƒ e j
d d! ƒ e
j ƒ n d" S(# u An implementation of tabbed pages using only standard Tkinter.
Originally developed for use in IDLE. Based on tabpage.py.
Classes exported:
TabbedPageSet -- A Tkinter implementation of a tabbed-page widget.
TabSet -- A widget containing tabs (buttons) in one or more rows.
i ( u *c B s | Ee Z d Z d S( u InvalidNameErrorN( u __name__u
__module__u __qualname__( u
__locals__( ( u8 /opt/alt/python33/lib64/python3.3/idlelib/tabbedpages.pyu InvalidNameError s u InvalidNameErrorc B s | Ee Z d Z d S( u AlreadyExistsErrorN( u __name__u
__module__u __qualname__( u
__locals__( ( u8 /opt/alt/python33/lib64/python3.3/idlelib/tabbedpages.pyu AlreadyExistsError
s u AlreadyExistsErrorc B s | Ee Z d Z d Z d d d d d d „ Z d d „ Z d d „ Z d
d „ Z d d
„ Z
d d „ Z d d „ Z Gd d „ d e
ƒ Z d S( u TabSetuj A widget containing tabs (buttons) in one or more rows.
Only one tab may be selected at a time.
i i c K sâ t j | | | | | _ | | _ | | _ | | _ | | _ i | _ i | _ | rj t | ƒ | _
n g | _
d
| _ g | _
t | d d d d d t d | j d ƒ ƒ| _ | j j d t d t d d ƒ | j ƒ d
S( u Constructor arguments:
select_command -- A callable which will be called when a tab is
selected. It is called with the name of the selected tab as an
argument.
tabs -- A list of strings, the names of the tabs. Should be specified in
the desired tab order. The first tab will be the default and first
active tab. If tabs is None or empty, the TabSet will be initialized
empty.
n_rows -- Number of rows of tabs to be shown. If n_rows <= 0 or is
None, then the number of rows will be decided by TabSet. See
_arrange_tabs() for details.
max_tabs_per_row -- Used for deciding how many rows of tabs are needed,
when the number of rows is not constant. See _arrange_tabs() for
details.
u heighti u borderwidthi u reliefu
backgroundu sideu fillu expandNF( u Frameu __init__u select_commandu n_rowsu max_tabs_per_rowu expand_tabsu page_setu _tabsu _tab2rowu listu
_tab_namesu Noneu
_selected_tabu _tab_rowsu FLATu cgetu
padding_frameu packu TOPu Xu Falseu
_arrange_tabs( u selfu page_setu select_commandu tabsu n_rowsu max_tabs_per_rowu expand_tabsu kw( ( u8 /opt/alt/python33/lib64/python3.3/idlelib/tabbedpages.pyu __init__ s$ u TabSet.__init__c C sY | s t d | ƒ ‚ n | | j k r; t d | ƒ ‚ n | j j | ƒ | j ƒ d S( u. Add a new tab with the name given in tab_name.u Invalid Tab name: '%s'u Tab named '%s' already existsN( u InvalidNameErroru
_tab_namesu AlreadyExistsErroru appendu
_arrange_tabs( u selfu tab_name( ( u8 /opt/alt/python33/lib64/python3.3/idlelib/tabbedpages.pyu add_tabD s u TabSet.add_tabc C s@ | | j k r" t d | ƒ ‚ n | j j | ƒ | j ƒ d S( u Remove the tab named