Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- complete
- computePrefix
- deleteAction
- getCompletionPrefix
- getEntry
- getInlineCompletion
- getInlineSelection
- getMinimumKeyLength
- getModel
- getPopupCompletion
- getPopupSetWidth
- getPopupSingleMatch
- getTextColumn
- insertActionMarkup
- insertActionText
- insertPrefix
- new
- newWithArea
- setInlineCompletion
- setInlineSelection
- setMatchFunc
- setMinimumKeyLength
- setModel
- setPopupCompletion
- setPopupSetWidth
- setPopupSingleMatch
- setTextColumn
- Properties
- Signals
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 EntryCompletion
::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 EntryCompletion
::action-activated
signal is emitted.
GtkEntryCompletion uses a TreeModelFilter
model to represent the
subset of the entire model that is currently matching. While the
GtkEntryCompletion signals EntryCompletion
::match-selected
and
EntryCompletion
::cursor-on-match
take the original model and an
iter pointing to that model as arguments, other callbacks and signals
(such as GtkCellLayoutDataFuncs
or CellArea
::apply-attributes
)
will generally take the filter model as argument. As long as you are
only calling gtk_tree_model_get()
, this will make no difference to
you. If for some reason, you need the original model, use
treeModelFilterGetModel
. Don’t forget to use
treeModelFilterConvertIterToChildIter
to obtain a
matching iter.
- newtype EntryCompletion = EntryCompletion (ManagedPtr EntryCompletion)
- class GObject o => IsEntryCompletion o
- toEntryCompletion :: IsEntryCompletion o => o -> IO EntryCompletion
- noEntryCompletion :: Maybe EntryCompletion
- data EntryCompletionCompleteMethodInfo
- entryCompletionComplete :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m ()
- data EntryCompletionComputePrefixMethodInfo
- entryCompletionComputePrefix :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Text -> m (Maybe Text)
- data EntryCompletionDeleteActionMethodInfo
- entryCompletionDeleteAction :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Int32 -> m ()
- data EntryCompletionGetCompletionPrefixMethodInfo
- entryCompletionGetCompletionPrefix :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Text
- data EntryCompletionGetEntryMethodInfo
- entryCompletionGetEntry :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Widget
- data EntryCompletionGetInlineCompletionMethodInfo
- entryCompletionGetInlineCompletion :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Bool
- data EntryCompletionGetInlineSelectionMethodInfo
- entryCompletionGetInlineSelection :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Bool
- data EntryCompletionGetMinimumKeyLengthMethodInfo
- entryCompletionGetMinimumKeyLength :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Int32
- data EntryCompletionGetModelMethodInfo
- entryCompletionGetModel :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m (Maybe TreeModel)
- data EntryCompletionGetPopupCompletionMethodInfo
- entryCompletionGetPopupCompletion :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Bool
- data EntryCompletionGetPopupSetWidthMethodInfo
- entryCompletionGetPopupSetWidth :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Bool
- data EntryCompletionGetPopupSingleMatchMethodInfo
- entryCompletionGetPopupSingleMatch :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Bool
- data EntryCompletionGetTextColumnMethodInfo
- entryCompletionGetTextColumn :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m Int32
- data EntryCompletionInsertActionMarkupMethodInfo
- entryCompletionInsertActionMarkup :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Int32 -> Text -> m ()
- data EntryCompletionInsertActionTextMethodInfo
- entryCompletionInsertActionText :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Int32 -> Text -> m ()
- data EntryCompletionInsertPrefixMethodInfo
- entryCompletionInsertPrefix :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> m ()
- entryCompletionNew :: (HasCallStack, MonadIO m) => m EntryCompletion
- entryCompletionNewWithArea :: (HasCallStack, MonadIO m, IsCellArea a) => a -> m EntryCompletion
- data EntryCompletionSetInlineCompletionMethodInfo
- entryCompletionSetInlineCompletion :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Bool -> m ()
- data EntryCompletionSetInlineSelectionMethodInfo
- entryCompletionSetInlineSelection :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Bool -> m ()
- data EntryCompletionSetMatchFuncMethodInfo
- entryCompletionSetMatchFunc :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> EntryCompletionMatchFunc -> m ()
- data EntryCompletionSetMinimumKeyLengthMethodInfo
- entryCompletionSetMinimumKeyLength :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Int32 -> m ()
- data EntryCompletionSetModelMethodInfo
- entryCompletionSetModel :: (HasCallStack, MonadIO m, IsEntryCompletion a, IsTreeModel b) => a -> Maybe b -> m ()
- data EntryCompletionSetPopupCompletionMethodInfo
- entryCompletionSetPopupCompletion :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Bool -> m ()
- data EntryCompletionSetPopupSetWidthMethodInfo
- entryCompletionSetPopupSetWidth :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Bool -> m ()
- data EntryCompletionSetPopupSingleMatchMethodInfo
- entryCompletionSetPopupSingleMatch :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Bool -> m ()
- data EntryCompletionSetTextColumnMethodInfo
- entryCompletionSetTextColumn :: (HasCallStack, MonadIO m, IsEntryCompletion a) => a -> Int32 -> m ()
- data EntryCompletionCellAreaPropertyInfo
- constructEntryCompletionCellArea :: (IsEntryCompletion o, IsCellArea a) => a -> IO (GValueConstruct o)
- entryCompletionCellArea :: AttrLabelProxy "cellArea"
- getEntryCompletionCellArea :: (MonadIO m, IsEntryCompletion o) => o -> m (Maybe CellArea)
- data EntryCompletionInlineCompletionPropertyInfo
- constructEntryCompletionInlineCompletion :: IsEntryCompletion o => Bool -> IO (GValueConstruct o)
- entryCompletionInlineCompletion :: AttrLabelProxy "inlineCompletion"
- getEntryCompletionInlineCompletion :: (MonadIO m, IsEntryCompletion o) => o -> m Bool
- setEntryCompletionInlineCompletion :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m ()
- data EntryCompletionInlineSelectionPropertyInfo
- constructEntryCompletionInlineSelection :: IsEntryCompletion o => Bool -> IO (GValueConstruct o)
- entryCompletionInlineSelection :: AttrLabelProxy "inlineSelection"
- getEntryCompletionInlineSelection :: (MonadIO m, IsEntryCompletion o) => o -> m Bool
- setEntryCompletionInlineSelection :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m ()
- data EntryCompletionMinimumKeyLengthPropertyInfo
- constructEntryCompletionMinimumKeyLength :: IsEntryCompletion o => Int32 -> IO (GValueConstruct o)
- entryCompletionMinimumKeyLength :: AttrLabelProxy "minimumKeyLength"
- getEntryCompletionMinimumKeyLength :: (MonadIO m, IsEntryCompletion o) => o -> m Int32
- setEntryCompletionMinimumKeyLength :: (MonadIO m, IsEntryCompletion o) => o -> Int32 -> m ()
- data EntryCompletionModelPropertyInfo
- clearEntryCompletionModel :: (MonadIO m, IsEntryCompletion o) => o -> m ()
- constructEntryCompletionModel :: (IsEntryCompletion o, IsTreeModel a) => a -> IO (GValueConstruct o)
- entryCompletionModel :: AttrLabelProxy "model"
- getEntryCompletionModel :: (MonadIO m, IsEntryCompletion o) => o -> m (Maybe TreeModel)
- setEntryCompletionModel :: (MonadIO m, IsEntryCompletion o, IsTreeModel a) => o -> a -> m ()
- data EntryCompletionPopupCompletionPropertyInfo
- constructEntryCompletionPopupCompletion :: IsEntryCompletion o => Bool -> IO (GValueConstruct o)
- entryCompletionPopupCompletion :: AttrLabelProxy "popupCompletion"
- getEntryCompletionPopupCompletion :: (MonadIO m, IsEntryCompletion o) => o -> m Bool
- setEntryCompletionPopupCompletion :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m ()
- data EntryCompletionPopupSetWidthPropertyInfo
- constructEntryCompletionPopupSetWidth :: IsEntryCompletion o => Bool -> IO (GValueConstruct o)
- entryCompletionPopupSetWidth :: AttrLabelProxy "popupSetWidth"
- getEntryCompletionPopupSetWidth :: (MonadIO m, IsEntryCompletion o) => o -> m Bool
- setEntryCompletionPopupSetWidth :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m ()
- data EntryCompletionPopupSingleMatchPropertyInfo
- constructEntryCompletionPopupSingleMatch :: IsEntryCompletion o => Bool -> IO (GValueConstruct o)
- entryCompletionPopupSingleMatch :: AttrLabelProxy "popupSingleMatch"
- getEntryCompletionPopupSingleMatch :: (MonadIO m, IsEntryCompletion o) => o -> m Bool
- setEntryCompletionPopupSingleMatch :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m ()
- data EntryCompletionTextColumnPropertyInfo
- constructEntryCompletionTextColumn :: IsEntryCompletion o => Int32 -> IO (GValueConstruct o)
- entryCompletionTextColumn :: AttrLabelProxy "textColumn"
- getEntryCompletionTextColumn :: (MonadIO m, IsEntryCompletion o) => o -> m Int32
- setEntryCompletionTextColumn :: (MonadIO m, IsEntryCompletion o) => o -> Int32 -> m ()
- type C_EntryCompletionActionActivatedCallback = Ptr () -> Int32 -> Ptr () -> IO ()
- type EntryCompletionActionActivatedCallback = Int32 -> IO ()
- data EntryCompletionActionActivatedSignalInfo
- afterEntryCompletionActionActivated :: (GObject a, MonadIO m) => a -> EntryCompletionActionActivatedCallback -> m SignalHandlerId
- genClosure_EntryCompletionActionActivated :: EntryCompletionActionActivatedCallback -> IO Closure
- mk_EntryCompletionActionActivatedCallback :: C_EntryCompletionActionActivatedCallback -> IO (FunPtr C_EntryCompletionActionActivatedCallback)
- noEntryCompletionActionActivatedCallback :: Maybe EntryCompletionActionActivatedCallback
- onEntryCompletionActionActivated :: (GObject a, MonadIO m) => a -> EntryCompletionActionActivatedCallback -> m SignalHandlerId
- wrap_EntryCompletionActionActivatedCallback :: EntryCompletionActionActivatedCallback -> Ptr () -> Int32 -> Ptr () -> IO ()
- type C_EntryCompletionCursorOnMatchCallback = Ptr () -> Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO CInt
- type EntryCompletionCursorOnMatchCallback = TreeModel -> TreeIter -> IO Bool
- data EntryCompletionCursorOnMatchSignalInfo
- afterEntryCompletionCursorOnMatch :: (GObject a, MonadIO m) => a -> EntryCompletionCursorOnMatchCallback -> m SignalHandlerId
- genClosure_EntryCompletionCursorOnMatch :: EntryCompletionCursorOnMatchCallback -> IO Closure
- mk_EntryCompletionCursorOnMatchCallback :: C_EntryCompletionCursorOnMatchCallback -> IO (FunPtr C_EntryCompletionCursorOnMatchCallback)
- noEntryCompletionCursorOnMatchCallback :: Maybe EntryCompletionCursorOnMatchCallback
- onEntryCompletionCursorOnMatch :: (GObject a, MonadIO m) => a -> EntryCompletionCursorOnMatchCallback -> m SignalHandlerId
- wrap_EntryCompletionCursorOnMatchCallback :: EntryCompletionCursorOnMatchCallback -> Ptr () -> Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO CInt
- type C_EntryCompletionInsertPrefixCallback = Ptr () -> CString -> Ptr () -> IO CInt
- type EntryCompletionInsertPrefixCallback = Text -> IO Bool
- data EntryCompletionInsertPrefixSignalInfo
- afterEntryCompletionInsertPrefix :: (GObject a, MonadIO m) => a -> EntryCompletionInsertPrefixCallback -> m SignalHandlerId
- genClosure_EntryCompletionInsertPrefix :: EntryCompletionInsertPrefixCallback -> IO Closure
- mk_EntryCompletionInsertPrefixCallback :: C_EntryCompletionInsertPrefixCallback -> IO (FunPtr C_EntryCompletionInsertPrefixCallback)
- noEntryCompletionInsertPrefixCallback :: Maybe EntryCompletionInsertPrefixCallback
- onEntryCompletionInsertPrefix :: (GObject a, MonadIO m) => a -> EntryCompletionInsertPrefixCallback -> m SignalHandlerId
- wrap_EntryCompletionInsertPrefixCallback :: EntryCompletionInsertPrefixCallback -> Ptr () -> CString -> Ptr () -> IO CInt
- type C_EntryCompletionMatchSelectedCallback = Ptr () -> Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO CInt
- type EntryCompletionMatchSelectedCallback = TreeModel -> TreeIter -> IO Bool
- data EntryCompletionMatchSelectedSignalInfo
- afterEntryCompletionMatchSelected :: (GObject a, MonadIO m) => a -> EntryCompletionMatchSelectedCallback -> m SignalHandlerId
- genClosure_EntryCompletionMatchSelected :: EntryCompletionMatchSelectedCallback -> IO Closure
- mk_EntryCompletionMatchSelectedCallback :: C_EntryCompletionMatchSelectedCallback -> IO (FunPtr C_EntryCompletionMatchSelectedCallback)
- noEntryCompletionMatchSelectedCallback :: Maybe EntryCompletionMatchSelectedCallback
- onEntryCompletionMatchSelected :: (GObject a, MonadIO m) => a -> EntryCompletionMatchSelectedCallback -> m SignalHandlerId
- wrap_EntryCompletionMatchSelectedCallback :: EntryCompletionMatchSelectedCallback -> Ptr () -> Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO CInt
- type C_EntryCompletionNoMatchesCallback = Ptr () -> Ptr () -> IO ()
- type EntryCompletionNoMatchesCallback = IO ()
- data EntryCompletionNoMatchesSignalInfo
- afterEntryCompletionNoMatches :: (GObject a, MonadIO m) => a -> EntryCompletionNoMatchesCallback -> m SignalHandlerId
- genClosure_EntryCompletionNoMatches :: EntryCompletionNoMatchesCallback -> IO Closure
- mk_EntryCompletionNoMatchesCallback :: C_EntryCompletionNoMatchesCallback -> IO (FunPtr C_EntryCompletionNoMatchesCallback)
- noEntryCompletionNoMatchesCallback :: Maybe EntryCompletionNoMatchesCallback
- onEntryCompletionNoMatches :: (GObject a, MonadIO m) => a -> EntryCompletionNoMatchesCallback -> m SignalHandlerId
- wrap_EntryCompletionNoMatchesCallback :: EntryCompletionNoMatchesCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype EntryCompletion Source #
GObject EntryCompletion Source # | |
IsObject EntryCompletion Source # | |
IsEntryCompletion EntryCompletion Source # | |
IsCellLayout EntryCompletion Source # | |
IsBuildable EntryCompletion Source # | |
((~) * info (ResolveEntryCompletionMethod t EntryCompletion), MethodInfo * info EntryCompletion p) => IsLabel t (EntryCompletion -> p) Source # | |
((~) * info (ResolveEntryCompletionMethod t EntryCompletion), MethodInfo * info EntryCompletion p) => IsLabelProxy t (EntryCompletion -> p) Source # | |
HasAttributeList * EntryCompletion Source # | |
type AttributeList EntryCompletion Source # | |
type SignalList EntryCompletion Source # | |
class GObject o => IsEntryCompletion o Source #
toEntryCompletion :: IsEntryCompletion o => o -> IO EntryCompletion Source #
Methods
complete
data EntryCompletionCompleteMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionCompleteMethodInfo a signature Source # | |
entryCompletionComplete Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m () |
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.
Since: 2.4
computePrefix
data EntryCompletionComputePrefixMethodInfo Source #
((~) * signature (Text -> m (Maybe Text)), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionComputePrefixMethodInfo a signature Source # | |
entryCompletionComputePrefix Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text) | Returns: The common prefix all rows starting with
|
Computes the common prefix that is shared by all rows in completion
that start with key
. If no row matches key
, Nothing
will be returned.
Note that a text column must have been set for this function to work,
see entryCompletionSetTextColumn
for details.
Since: 3.4
deleteAction
data EntryCompletionDeleteActionMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionDeleteActionMethodInfo a signature Source # | |
entryCompletionDeleteAction Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Int32 |
|
-> m () |
Deletes the action at index_
from completion
’s action list.
Note that index_
is a relative position and the position of an
action may have changed since it was inserted.
Since: 2.4
getCompletionPrefix
data EntryCompletionGetCompletionPrefixMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetCompletionPrefixMethodInfo a signature Source # | |
entryCompletionGetCompletionPrefix Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Text | Returns: the prefix for the current completion |
Get the original text entered by the user that triggered
the completion or Nothing
if there’s no completion ongoing.
Since: 2.12
getEntry
data EntryCompletionGetEntryMethodInfo Source #
((~) * signature (m Widget), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetEntryMethodInfo a signature Source # | |
entryCompletionGetEntry Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Widget | Returns: The entry |
Gets the entry completion
has been attached to.
Since: 2.4
getInlineCompletion
data EntryCompletionGetInlineCompletionMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetInlineCompletionMethodInfo a signature Source # | |
entryCompletionGetInlineCompletion Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the common prefix of the possible completions should be automatically inserted in the entry.
Since: 2.6
getInlineSelection
data EntryCompletionGetInlineSelectionMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetInlineSelectionMethodInfo a signature Source # | |
entryCompletionGetInlineSelection Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Bool | Returns: |
Returns True
if inline-selection mode is turned on.
Since: 2.12
getMinimumKeyLength
data EntryCompletionGetMinimumKeyLengthMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetMinimumKeyLengthMethodInfo a signature Source # | |
entryCompletionGetMinimumKeyLength Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Int32 | Returns: The currently used minimum key length |
Returns the minimum key length as set for completion
.
Since: 2.4
getModel
data EntryCompletionGetModelMethodInfo Source #
((~) * signature (m (Maybe TreeModel)), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetModelMethodInfo a signature Source # | |
entryCompletionGetModel Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m (Maybe TreeModel) | Returns: A |
Returns the model the EntryCompletion
is using as data source.
Returns Nothing
if the model is unset.
Since: 2.4
getPopupCompletion
data EntryCompletionGetPopupCompletionMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetPopupCompletionMethodInfo a signature Source # | |
entryCompletionGetPopupCompletion Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the completions should be presented in a popup window.
Since: 2.6
getPopupSetWidth
data EntryCompletionGetPopupSetWidthMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetPopupSetWidthMethodInfo a signature Source # | |
entryCompletionGetPopupSetWidth Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the completion popup window will be resized to the width of the entry.
Since: 2.8
getPopupSingleMatch
data EntryCompletionGetPopupSingleMatchMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetPopupSingleMatchMethodInfo a signature Source # | |
entryCompletionGetPopupSingleMatch Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the completion popup window will appear even if there is only a single match.
Since: 2.8
getTextColumn
data EntryCompletionGetTextColumnMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionGetTextColumnMethodInfo a signature Source # | |
entryCompletionGetTextColumn Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m Int32 | Returns: the column containing the strings |
Returns the column in the model of completion
to get strings from.
Since: 2.6
insertActionMarkup
data EntryCompletionInsertActionMarkupMethodInfo Source #
((~) * signature (Int32 -> Text -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionInsertActionMarkupMethodInfo a signature Source # | |
entryCompletionInsertActionMarkup Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Int32 |
|
-> Text |
|
-> m () |
Inserts an action in completion
’s action item list at position index_
with markup markup
.
Since: 2.4
insertActionText
data EntryCompletionInsertActionTextMethodInfo Source #
((~) * signature (Int32 -> Text -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionInsertActionTextMethodInfo a signature Source # | |
entryCompletionInsertActionText Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Int32 |
|
-> Text |
|
-> m () |
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
.
Note that index_
is a relative position in the list of actions and
the position of an action can change when deleting a different action.
Since: 2.4
insertPrefix
data EntryCompletionInsertPrefixMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionInsertPrefixMethodInfo a signature Source # | |
entryCompletionInsertPrefix Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> m () |
Requests a prefix insertion.
Since: 2.6
new
:: (HasCallStack, MonadIO m) | |
=> m EntryCompletion | Returns: A newly created |
Creates a new EntryCompletion
object.
Since: 2.4
newWithArea
entryCompletionNewWithArea Source #
:: (HasCallStack, MonadIO m, IsCellArea a) | |
=> a |
|
-> m EntryCompletion | Returns: A newly created |
Creates a new EntryCompletion
object using the
specified area
to layout cells in the underlying
TreeViewColumn
for the drop-down menu.
Since: 3.0
setInlineCompletion
data EntryCompletionSetInlineCompletionMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionSetInlineCompletionMethodInfo a signature Source # | |
entryCompletionSetInlineCompletion Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the common prefix of the possible completions should be automatically inserted in the entry.
Since: 2.6
setInlineSelection
data EntryCompletionSetInlineSelectionMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionSetInlineSelectionMethodInfo a signature Source # | |
entryCompletionSetInlineSelection Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether it is possible to cycle through the possible completions inside the entry.
Since: 2.12
setMatchFunc
data EntryCompletionSetMatchFuncMethodInfo Source #
((~) * signature (EntryCompletionMatchFunc -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionSetMatchFuncMethodInfo a signature Source # | |
entryCompletionSetMatchFunc Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> EntryCompletionMatchFunc |
|
-> m () |
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.
Since: 2.4
setMinimumKeyLength
data EntryCompletionSetMinimumKeyLengthMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionSetMinimumKeyLengthMethodInfo a signature Source # | |
entryCompletionSetMinimumKeyLength Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Int32 |
|
-> m () |
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).
Since: 2.4
setModel
data EntryCompletionSetModelMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsEntryCompletion a, IsTreeModel b) => MethodInfo * EntryCompletionSetModelMethodInfo a signature Source # | |
entryCompletionSetModel Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a, IsTreeModel b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the model for a EntryCompletion
. If completion
already has
a model set, it will remove it before setting the new model.
If model is Nothing
, then it will unset the model.
Since: 2.4
setPopupCompletion
data EntryCompletionSetPopupCompletionMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionSetPopupCompletionMethodInfo a signature Source # | |
entryCompletionSetPopupCompletion Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the completions should be presented in a popup window.
Since: 2.6
setPopupSetWidth
data EntryCompletionSetPopupSetWidthMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionSetPopupSetWidthMethodInfo a signature Source # | |
entryCompletionSetPopupSetWidth Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the completion popup window will be resized to be the same width as the entry.
Since: 2.8
setPopupSingleMatch
data EntryCompletionSetPopupSingleMatchMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionSetPopupSingleMatchMethodInfo a signature Source # | |
entryCompletionSetPopupSingleMatch Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the completion popup window will appear even if there is
only a single match. You may want to set this to False
if you
are using [inline completion][GtkEntryCompletion--inline-completion].
Since: 2.8
setTextColumn
data EntryCompletionSetTextColumnMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m, IsEntryCompletion a) => MethodInfo * EntryCompletionSetTextColumnMethodInfo a signature Source # | |
entryCompletionSetTextColumn Source #
:: (HasCallStack, MonadIO m, IsEntryCompletion a) | |
=> a |
|
-> Int32 |
|
-> m () |
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. If you need to set the text column, but don't want the cell
renderer, use g_object_set()
to set the EntryCompletion
:text-column
property directly.
Since: 2.4
Properties
cellArea
data EntryCompletionCellAreaPropertyInfo Source #
constructEntryCompletionCellArea :: (IsEntryCompletion o, IsCellArea a) => a -> IO (GValueConstruct o) Source #
entryCompletionCellArea :: AttrLabelProxy "cellArea" Source #
getEntryCompletionCellArea :: (MonadIO m, IsEntryCompletion o) => o -> m (Maybe CellArea) Source #
inlineCompletion
data EntryCompletionInlineCompletionPropertyInfo Source #
constructEntryCompletionInlineCompletion :: IsEntryCompletion o => Bool -> IO (GValueConstruct o) Source #
entryCompletionInlineCompletion :: AttrLabelProxy "inlineCompletion" Source #
getEntryCompletionInlineCompletion :: (MonadIO m, IsEntryCompletion o) => o -> m Bool Source #
setEntryCompletionInlineCompletion :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m () Source #
inlineSelection
data EntryCompletionInlineSelectionPropertyInfo Source #
constructEntryCompletionInlineSelection :: IsEntryCompletion o => Bool -> IO (GValueConstruct o) Source #
entryCompletionInlineSelection :: AttrLabelProxy "inlineSelection" Source #
getEntryCompletionInlineSelection :: (MonadIO m, IsEntryCompletion o) => o -> m Bool Source #
setEntryCompletionInlineSelection :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m () Source #
minimumKeyLength
data EntryCompletionMinimumKeyLengthPropertyInfo Source #
constructEntryCompletionMinimumKeyLength :: IsEntryCompletion o => Int32 -> IO (GValueConstruct o) Source #
entryCompletionMinimumKeyLength :: AttrLabelProxy "minimumKeyLength" Source #
getEntryCompletionMinimumKeyLength :: (MonadIO m, IsEntryCompletion o) => o -> m Int32 Source #
setEntryCompletionMinimumKeyLength :: (MonadIO m, IsEntryCompletion o) => o -> Int32 -> m () Source #
model
data EntryCompletionModelPropertyInfo Source #
clearEntryCompletionModel :: (MonadIO m, IsEntryCompletion o) => o -> m () Source #
constructEntryCompletionModel :: (IsEntryCompletion o, IsTreeModel a) => a -> IO (GValueConstruct o) Source #
entryCompletionModel :: AttrLabelProxy "model" Source #
getEntryCompletionModel :: (MonadIO m, IsEntryCompletion o) => o -> m (Maybe TreeModel) Source #
setEntryCompletionModel :: (MonadIO m, IsEntryCompletion o, IsTreeModel a) => o -> a -> m () Source #
popupCompletion
data EntryCompletionPopupCompletionPropertyInfo Source #
constructEntryCompletionPopupCompletion :: IsEntryCompletion o => Bool -> IO (GValueConstruct o) Source #
entryCompletionPopupCompletion :: AttrLabelProxy "popupCompletion" Source #
getEntryCompletionPopupCompletion :: (MonadIO m, IsEntryCompletion o) => o -> m Bool Source #
setEntryCompletionPopupCompletion :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m () Source #
popupSetWidth
data EntryCompletionPopupSetWidthPropertyInfo Source #
constructEntryCompletionPopupSetWidth :: IsEntryCompletion o => Bool -> IO (GValueConstruct o) Source #
entryCompletionPopupSetWidth :: AttrLabelProxy "popupSetWidth" Source #
getEntryCompletionPopupSetWidth :: (MonadIO m, IsEntryCompletion o) => o -> m Bool Source #
setEntryCompletionPopupSetWidth :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m () Source #
popupSingleMatch
data EntryCompletionPopupSingleMatchPropertyInfo Source #
constructEntryCompletionPopupSingleMatch :: IsEntryCompletion o => Bool -> IO (GValueConstruct o) Source #
entryCompletionPopupSingleMatch :: AttrLabelProxy "popupSingleMatch" Source #
getEntryCompletionPopupSingleMatch :: (MonadIO m, IsEntryCompletion o) => o -> m Bool Source #
setEntryCompletionPopupSingleMatch :: (MonadIO m, IsEntryCompletion o) => o -> Bool -> m () Source #
textColumn
data EntryCompletionTextColumnPropertyInfo Source #
constructEntryCompletionTextColumn :: IsEntryCompletion o => Int32 -> IO (GValueConstruct o) Source #
entryCompletionTextColumn :: AttrLabelProxy "textColumn" Source #
getEntryCompletionTextColumn :: (MonadIO m, IsEntryCompletion o) => o -> m Int32 Source #
setEntryCompletionTextColumn :: (MonadIO m, IsEntryCompletion o) => o -> Int32 -> m () Source #
Signals
actionActivated
type EntryCompletionActionActivatedCallback = Int32 -> IO () Source #
afterEntryCompletionActionActivated :: (GObject a, MonadIO m) => a -> EntryCompletionActionActivatedCallback -> m SignalHandlerId Source #
genClosure_EntryCompletionActionActivated :: EntryCompletionActionActivatedCallback -> IO Closure Source #
mk_EntryCompletionActionActivatedCallback :: C_EntryCompletionActionActivatedCallback -> IO (FunPtr C_EntryCompletionActionActivatedCallback) Source #
onEntryCompletionActionActivated :: (GObject a, MonadIO m) => a -> EntryCompletionActionActivatedCallback -> m SignalHandlerId Source #
wrap_EntryCompletionActionActivatedCallback :: EntryCompletionActionActivatedCallback -> Ptr () -> Int32 -> Ptr () -> IO () Source #
cursorOnMatch
type C_EntryCompletionCursorOnMatchCallback = Ptr () -> Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO CInt Source #
afterEntryCompletionCursorOnMatch :: (GObject a, MonadIO m) => a -> EntryCompletionCursorOnMatchCallback -> m SignalHandlerId Source #
genClosure_EntryCompletionCursorOnMatch :: EntryCompletionCursorOnMatchCallback -> IO Closure Source #
mk_EntryCompletionCursorOnMatchCallback :: C_EntryCompletionCursorOnMatchCallback -> IO (FunPtr C_EntryCompletionCursorOnMatchCallback) Source #
onEntryCompletionCursorOnMatch :: (GObject a, MonadIO m) => a -> EntryCompletionCursorOnMatchCallback -> m SignalHandlerId Source #
wrap_EntryCompletionCursorOnMatchCallback :: EntryCompletionCursorOnMatchCallback -> Ptr () -> Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO CInt Source #
insertPrefix
afterEntryCompletionInsertPrefix :: (GObject a, MonadIO m) => a -> EntryCompletionInsertPrefixCallback -> m SignalHandlerId Source #
genClosure_EntryCompletionInsertPrefix :: EntryCompletionInsertPrefixCallback -> IO Closure Source #
mk_EntryCompletionInsertPrefixCallback :: C_EntryCompletionInsertPrefixCallback -> IO (FunPtr C_EntryCompletionInsertPrefixCallback) Source #
onEntryCompletionInsertPrefix :: (GObject a, MonadIO m) => a -> EntryCompletionInsertPrefixCallback -> m SignalHandlerId Source #
wrap_EntryCompletionInsertPrefixCallback :: EntryCompletionInsertPrefixCallback -> Ptr () -> CString -> Ptr () -> IO CInt Source #
matchSelected
type C_EntryCompletionMatchSelectedCallback = Ptr () -> Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO CInt Source #
afterEntryCompletionMatchSelected :: (GObject a, MonadIO m) => a -> EntryCompletionMatchSelectedCallback -> m SignalHandlerId Source #
genClosure_EntryCompletionMatchSelected :: EntryCompletionMatchSelectedCallback -> IO Closure Source #
mk_EntryCompletionMatchSelectedCallback :: C_EntryCompletionMatchSelectedCallback -> IO (FunPtr C_EntryCompletionMatchSelectedCallback) Source #
onEntryCompletionMatchSelected :: (GObject a, MonadIO m) => a -> EntryCompletionMatchSelectedCallback -> m SignalHandlerId Source #
wrap_EntryCompletionMatchSelectedCallback :: EntryCompletionMatchSelectedCallback -> Ptr () -> Ptr TreeModel -> Ptr TreeIter -> Ptr () -> IO CInt Source #
noMatches
type EntryCompletionNoMatchesCallback = IO () Source #
afterEntryCompletionNoMatches :: (GObject a, MonadIO m) => a -> EntryCompletionNoMatchesCallback -> m SignalHandlerId Source #
mk_EntryCompletionNoMatchesCallback :: C_EntryCompletionNoMatchesCallback -> IO (FunPtr C_EntryCompletionNoMatchesCallback) Source #
onEntryCompletionNoMatches :: (GObject a, MonadIO m) => a -> EntryCompletionNoMatchesCallback -> m SignalHandlerId Source #
wrap_EntryCompletionNoMatchesCallback :: EntryCompletionNoMatchesCallback -> Ptr () -> Ptr () -> IO () Source #