AlkantarClanX12
Current Path : /proc/self/root/usr/lib64/python2.7/idlelib/ |
Current File : //proc/self/root/usr/lib64/python2.7/idlelib/tabbedpages.pyo |
� {fc @ s� d Z d d l Td e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d � Z e d k r� d d l m Z e e � n d S( s 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����( t *t InvalidNameErrorc B s e Z RS( ( t __name__t __module__( ( ( s+ /usr/lib64/python2.7/idlelib/tabbedpages.pyR s t AlreadyExistsErrorc B s e Z RS( ( R R ( ( ( s+ /usr/lib64/python2.7/idlelib/tabbedpages.pyR s t TabSetc B so e Z d Z d d d e d � Z d � Z d � Z d � Z d � Z d � Z d � Z d e f d � � YZ RS( sj 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 t � | j � d S( s 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. t heighti t borderwidthi t relieft backgroundt sidet fillt expandN( t Framet __init__t select_commandt n_rowst max_tabs_per_rowt expand_tabst page_sett _tabst _tab2rowt listt _tab_namest Nonet _selected_tabt _tab_rowst FLATt cgett padding_framet packt TOPt Xt Falset _arrange_tabs( t selfR R t tabsR R R t kw( ( s+ /usr/lib64/python2.7/idlelib/tabbedpages.pyR s$ c C sY | s t d | � � n | | j k r; t d | � � n | j j | � | j � d S( s. Add a new tab with the name given in tab_name.s Invalid Tab name: '%s's Tab named '%s' already existsN( R R R t appendR"