|  | 
| | Graphics.UI.Gtk.Entry.EntryCompletion | | Portability | portable (depends on GHC) |  | Stability | provisional |  | Maintainer | gtk2hs-users@lists.sourceforge.net | 
 | 
 | 
|  | 
|  | 
|  | 
| Description | 
| Completion functionality for Entry
  Module available since Gtk+ version 2.4
 | 
|  | 
| Synopsis | 
|  | 
|  | 
|  | 
|  | 
| Detail | 
|  | 
| EntryCompletion is an auxiliary object to be used in conjunction with
 Entry to provide the completion functionality. It implements the
 CellLayout interface, to allow the user to add extra cells to the
 TreeView with completion matches.
 "Completion functionality" means that when the user modifies the text
 in the entry, EntryCompletion checks which rows in the model match the
 current content of the entry, and displays a list of matches. By default,
 the matching is done by comparing the entry text case-insensitively against
 the text column of the model (see entryCompletionSetTextColumn), but this
 can be overridden with a custom match function (see
 entryCompletionSetMatchFunc).
 When the user selects a completion, the content of the entry is updated.
 By default, the content of the entry is replaced by the text column of the
 model, but this can be overridden by connecting to the ::match-selected
 signal and updating the entry in the signal handler. Note that you should
 return True from the signal handler to suppress the default behaviour.
 To add completion functionality to an entry, use entrySetCompletion.
 In addition to regular completion matches, which will be inserted into
 the entry when they are selected, EntryCompletion also allows to display
 "actions" in the popup window. Their appearance is similar to menuitems,
 to differentiate them clearly from completion strings. When an action is
 selected, the ::action-activated signal is emitted.
 | 
|  | 
| Class Hierarchy | 
|  | 
| 
 |  GObject
 |   +----EntryCompletion
  | 
|  | 
| Types | 
|  | 
| data EntryCompletion | 
| |  Instances |  |  | 
 | 
|  | 
| class GObjectClass o => EntryCompletionClass o | 
| |  |  |  Instances |  |  | 
 | 
|  | 
| castToEntryCompletion :: GObjectClass obj => obj -> EntryCompletion | 
|  | 
| Constructors | 
|  | 
| entryCompletionNew :: IO EntryCompletion | 
| Creates a new EntryCompletion object. | 
|  | 
| Methods | 
|  | 
| entryCompletionGetEntry | 
| | :: EntryCompletion |  |  | -> IO (Maybe Entry) | returns the entry completion has been attached to. |  | Gets the entry completion has been attached to. | 
 | 
|  | 
| entryCompletionSetModel | 
|  | 
|  | 
| entryCompletionGetModel | 
|  | 
|  | 
| entryCompletionSetMatchFunc :: EntryCompletion -> (String -> TreeIter -> IO ()) -> IO () | 
| Sets the match function for completion to be func. The match function
 is used to determine if a row should or should not be in the completion
 list. | 
|  | 
| entryCompletionSetMinimumKeyLength | 
| | :: EntryCompletion |  |  | -> Int | length - The minimum length of the key in order to
 start completing. |  | -> IO () |  |  | Requires the length of the search key for completion to be at least
 length. This is useful for long lists, where completing using a small key
 takes a lot of time and will come up with meaningless results anyway (ie, a
 too large dataset). | 
 | 
|  | 
| entryCompletionGetMinimumKeyLength | 
| | :: EntryCompletion |  |  | -> IO Int | returns The currently used minimum key length. |  | Returns the minimum key length as set for completion. | 
 | 
|  | 
| entryCompletionComplete :: EntryCompletion -> IO () | 
| Requests a completion operation, or in other words a refiltering of the
 current list with completions, using the current key. The completion list
 view will be updated accordingly. | 
|  | 
| entryCompletionInsertActionText | 
| | :: EntryCompletion |  |  | -> Int | index - The index of the item to insert. |  | -> String | text - Text of the item to insert. |  | -> IO () |  |  | Inserts an action in completion's action item list at position index
 with text text. If you want the action item to have markup, use
 entryCompletionInsertActionMarkup. | 
 | 
|  | 
| entryCompletionInsertActionMarkup | 
| | :: EntryCompletion |  |  | -> Int | index - The index of the item to insert. |  | -> String | markup - Markup of the item to insert. |  | -> IO () |  |  | Inserts an action in completion's action item list at position index
 with markup markup. | 
 | 
|  | 
| entryCompletionDeleteAction | 
| | :: EntryCompletion |  |  | -> Int | index - The index of the item to Delete. |  | -> IO () |  |  | Deletes the action at index from completion's action list. | 
 | 
|  | 
| entryCompletionSetTextColumn | 
| | :: EntryCompletion |  |  | -> Int | column - The column in the model of completion to
 get strings from. |  | -> IO () |  |  | Convenience function for setting up the most used case of this code: a
 completion list with just strings. This function will set up completion to
 have a list displaying all (and just) strings in the completion list, and to
 get those strings from column in the model of completion.
 This functions creates and adds a CellRendererText for the selected
 column.
 | 
 | 
|  | 
| Attributes | 
|  | 
| entryCompletionModel :: TreeModelClass model => ReadWriteAttr EntryCompletion (Maybe TreeModel) (Maybe model) | 
| The model to find matches in. | 
|  | 
| entryCompletionMinimumKeyLength :: Attr EntryCompletion Int | 
| Minimum length of the search key in order to look up matches.
 Allowed values: >= 0
 Default value: 1
 | 
|  | 
| Signals | 
|  | 
| onActionActivated :: EntryCompletionClass self => self -> (Int -> IO ()) -> IO (ConnectId self) | 
| Gets emitted when an action is activated. | 
|  | 
| afterActionActivated :: EntryCompletionClass self => self -> (Int -> IO ()) -> IO (ConnectId self) | 
|  | 
| Produced by Haddock version 0.7 |