Logo Search packages:      
Sourcecode: ibus-table version File versions  Download package

def table::editor::get_caret (   self  ) 

Get caret position in preedit strings

Definition at line 334 of file table.py.

00334                         :
        '''Get caret position in preedit strings'''
        self._caret = 0
        if self._cursor[0] and self._strings:
            map (self.add_caret,self._strings[:self._cursor[0]])
        self._caret += self._cursor[1]
        if self._candidates[0]:
            if self._py_mode:
                _p_index = 8
            else:
                _p_index = self.get_index ('phrase')
            _candi =self._candidates[0][ int (self._lookup_table.get_cursor_pos() ) ][ _p_index ] 
        else:
            _candi = u''.join( map( str,self.get_input_chars()) )
        self._caret += len( _candi ) 
        return self._caret
    
    def arrow_left (self):


Generated by  Doxygen 1.6.0   Back to index