Package advene :: Package gui :: Package util :: Module completer :: Class Completer
[hide private]
[frames] | no frames]

Class Completer

source code

Instance Methods [hide private]
 
__init__(self, textview=None, controller=None, element=None, indexer=None) source code
 
connect(self)
Register the various callbacks for completion.
source code
 
insert_text_cb(self, textbuffer, iterator, text, length)
Handles callback when the "insert-text" signal is emitted.
source code
 
hide_completion_window(self, *p) source code
 
show_completion_window(self, *p) source code
 
get_cursor_rectangle(self) source code
 
get_cursor_textview_coordinates(self) source code
 
get_cursor_size(self)
Get the cursor's size.
source code
 
position_window(self, width, height)
Position the completion window in the text editor's buffer.
source code
 
populate_model(self, completion_list)
Populate the view's data model.
source code
 
get_word_before_cursor(self) source code
 
insert_word_completion(self, path)
Insert item selected in the completion window into the text editor's buffer.
source code
 
check_completion(self) source code
 
key_press_event_cb(self, widget, event)
Handles "key-press-event" for the treeview and textview.
source code
 
build_widget(self) source code
Method Details [hide private]

position_window(self, width, height)

source code 

Position the completion window in the text editor's buffer.

Parameters:
  • width (An Integer object.) - The completion window's width.
  • height (An Integer object.) - The completion window's height.

populate_model(self, completion_list)

source code 

Populate the view's data model.

Parameters:
  • self (A CompletionTreeView object.) - Reference to the CompletionTreeView instance.

insert_word_completion(self, path)

source code 

Insert item selected in the completion window into the text editor's buffer.

Parameters:
  • path (A gtk.TreeRow object.) - The selected row in the completion window.

key_press_event_cb(self, widget, event)

source code 

Handles "key-press-event" for the treeview and textview.

This function allows the "Up" and "Down" arrow keys to work in the word completion window.