Logo Search packages:      
Sourcecode: accerciser version File versions

def interface_view::_SectionText::init (   self,
  glade_xml 
)

Initialization that is specific to the Text interface 
(construct data models, connect signals to callbacks, etc.)

@param glade_xml: Interface viewer glade xml.
@type glade_xml: gtk.glade.XML

Reimplemented from interface_view::_InterfaceSection.

Definition at line 1213 of file interface_view.py.

01213                            :
    '''
    Initialization that is specific to the Text interface 
    (construct data models, connect signals to callbacks, etc.)
    
    @param glade_xml: Interface viewer glade xml.
    @type glade_xml: gtk.glade.XML
    '''
    glade_xml.signal_autoconnect(self)
    # configure text attribute tree view
    treeview = glade_xml.get_widget('treeview_text_attr')
    self.attr_model = gtk.ListStore(str, str)
    treeview.set_model(self.attr_model)
    crt = gtk.CellRendererText()
    tvc = gtk.TreeViewColumn()
    tvc.pack_start(crt, True)
    tvc.set_attributes(crt, text=0)
    treeview.append_column(tvc)
    crt = gtk.CellRendererText()
    tvc = gtk.TreeViewColumn()
    tvc.pack_start(crt, True)
    tvc.set_attributes(crt, text=1)
    treeview.append_column(tvc)

    self.offset_spin = glade_xml.get_widget('spinbutton_text_offset')
    self.text_view = glade_xml.get_widget('textview_text')
    self.text_buffer = self.text_view.get_buffer()
    self.toggle_defaults = glade_xml.get_widget('checkbutton_text_defaults')
    self.label_start = glade_xml.get_widget('label_text_attr_start')
    self.label_end = glade_xml.get_widget('label_text_attr_end')

    self._text_insert_handler = 0
    self._text_delete_handler = 0

    mark = self.text_buffer.create_mark('attr_mark', 
                                        self.text_buffer.get_start_iter(), True)
    self.text_buffer.create_tag('attr_region', foreground='red')

    self.text_buffer.connect('mark-set', self._onTextMarkSet)

    mark.set_visible(True)


    self.text_buffer.connect('modified-changed', 
                             self._onTextModified)
    self.text_buffer.connect('notify::cursor-position', 
                             self._onTextCursorMove)

    self.text_buffer.set_modified(False)

    # Initialize fifos to help eliminate the viscous cycle of signals.
    # It would be nice if we could just block/unblock it like in gtk, but
    # since it is IPC, asynchronous and not atomic, we are forced to do this.
    self.outgoing_calls = {'itext_insert': self.CallCache(),
                           'itext_delete': self.CallCache()}

  def populateUI(self, acc):


Generated by  Doxygen 1.6.0   Back to index