<s> """<STR_LIT>""" <EOL> import wx <EOL> from traits . api import Any , HasTraits , List , Property , Str , Unicode <EOL> class StatusBarManager ( HasTraits ) : <EOL> """<STR_LIT>""" <EOL> message = Property <EOL> messages = List ( Unicode ) <EOL> status_bar = Any <EOL> def create_status_bar ( self , parent ) : <EOL> """<STR_LIT>""" <EOL> if self . status_bar is None : <EOL> self . status_bar = wx . StatusBar ( parent ) <EOL> self . status_bar . _pyface_control = self <EOL> if len ( self . messages ) > <NUM_LIT:1> : <EOL> self . status_bar . SetFieldsCount ( len ( self . messages ) ) <EOL> for i in range ( len ( self . messages ) ) : <EOL> self . status_bar . SetStatusText ( self . messages [ i ] , i ) <EOL> else : <EOL> self . status_bar . SetStatusText ( self . message ) <EOL> return self . status_bar <EOL> def _get_message ( self ) : <EOL> """<STR_LIT>""" <EOL> if len ( self . messages ) > <NUM_LIT:0> : <EOL> message = self . messages [ <NUM_LIT:0> ] <EOL> else : <EOL> message = '<STR_LIT>' <EOL> return message <EOL> def _set_message ( self , value ) : <EOL> """<STR_LIT>""" <EOL> if len ( self . messages ) > <NUM_LIT:0> : <EOL> old = self . messages [ <NUM_LIT:0> ] <EOL> self . messages [ <NUM_LIT:0> ] = value <EOL> else : <EOL> old = '<STR_LIT>' <EOL> self . messages . append ( value ) <EOL> self . trait_property_changed ( '<STR_LIT:message>' , old , value ) <EOL> return <EOL> def _messages_changed ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . status_bar is not None : <EOL> for i in range ( len ( self . messages ) ) : <EOL> self . status_bar . SetStatusText ( self . messages [ i ] , i ) <EOL> return <EOL> def _messages_items_changed ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . status_bar is not None : <EOL> for i in range ( len ( self . messages ) ) : <EOL> self . status_bar . SetStatusText ( self . messages [ i ] , i ) <EOL> return </s>
