Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Search settings.
A GtkSourceSearchSettings
object represents the settings of a search. The
search settings can be associated with one or several
[classsearchContext
]s.
Synopsis
- newtype SearchSettings = SearchSettings (ManagedPtr SearchSettings)
- class (GObject o, IsDescendantOf SearchSettings o) => IsSearchSettings o
- toSearchSettings :: (MonadIO m, IsSearchSettings o) => o -> m SearchSettings
- searchSettingsGetAtWordBoundaries :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> m Bool
- searchSettingsGetCaseSensitive :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> m Bool
- searchSettingsGetRegexEnabled :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> m Bool
- searchSettingsGetSearchText :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> m (Maybe Text)
- searchSettingsGetVisibleOnly :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> m Bool
- searchSettingsGetWrapAround :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> m Bool
- searchSettingsNew :: (HasCallStack, MonadIO m) => m SearchSettings
- searchSettingsSetAtWordBoundaries :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> Bool -> m ()
- searchSettingsSetCaseSensitive :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> Bool -> m ()
- searchSettingsSetRegexEnabled :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> Bool -> m ()
- searchSettingsSetSearchText :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> Maybe Text -> m ()
- searchSettingsSetVisibleOnly :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> Bool -> m ()
- searchSettingsSetWrapAround :: (HasCallStack, MonadIO m, IsSearchSettings a) => a -> Bool -> m ()
- constructSearchSettingsAtWordBoundaries :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSearchSettingsAtWordBoundaries :: (MonadIO m, IsSearchSettings o) => o -> m Bool
- setSearchSettingsAtWordBoundaries :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
- constructSearchSettingsCaseSensitive :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSearchSettingsCaseSensitive :: (MonadIO m, IsSearchSettings o) => o -> m Bool
- setSearchSettingsCaseSensitive :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
- constructSearchSettingsRegexEnabled :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSearchSettingsRegexEnabled :: (MonadIO m, IsSearchSettings o) => o -> m Bool
- setSearchSettingsRegexEnabled :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
- clearSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> m ()
- constructSearchSettingsSearchText :: (IsSearchSettings o, MonadIO m) => Text -> m (GValueConstruct o)
- getSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> m (Maybe Text)
- setSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> Text -> m ()
- constructSearchSettingsVisibleOnly :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSearchSettingsVisibleOnly :: (MonadIO m, IsSearchSettings o) => o -> m Bool
- setSearchSettingsVisibleOnly :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
- constructSearchSettingsWrapAround :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSearchSettingsWrapAround :: (MonadIO m, IsSearchSettings o) => o -> m Bool
- setSearchSettingsWrapAround :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m ()
Exported types
newtype SearchSettings Source #
Memory-managed wrapper type.
SearchSettings (ManagedPtr SearchSettings) |
Instances
Eq SearchSettings Source # | |
Defined in GI.GtkSource.Objects.SearchSettings (==) :: SearchSettings -> SearchSettings -> Bool # (/=) :: SearchSettings -> SearchSettings -> Bool # | |
GObject SearchSettings Source # | |
Defined in GI.GtkSource.Objects.SearchSettings | |
ManagedPtrNewtype SearchSettings Source # | |
Defined in GI.GtkSource.Objects.SearchSettings toManagedPtr :: SearchSettings -> ManagedPtr SearchSettings | |
TypedObject SearchSettings Source # | |
Defined in GI.GtkSource.Objects.SearchSettings | |
HasParentTypes SearchSettings Source # | |
Defined in GI.GtkSource.Objects.SearchSettings | |
IsGValue (Maybe SearchSettings) Source # | Convert |
Defined in GI.GtkSource.Objects.SearchSettings gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe SearchSettings -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe SearchSettings) | |
type ParentTypes SearchSettings Source # | |
Defined in GI.GtkSource.Objects.SearchSettings type ParentTypes SearchSettings = '[Object] |
class (GObject o, IsDescendantOf SearchSettings o) => IsSearchSettings o Source #
Type class for types which can be safely cast to SearchSettings
, for instance with toSearchSettings
.
Instances
(GObject o, IsDescendantOf SearchSettings o) => IsSearchSettings o Source # | |
Defined in GI.GtkSource.Objects.SearchSettings |
toSearchSettings :: (MonadIO m, IsSearchSettings o) => o -> m SearchSettings Source #
Cast to SearchSettings
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAtWordBoundaries, getCaseSensitive, getData, getProperty, getQdata, getRegexEnabled, getSearchText, getVisibleOnly, getWrapAround.
Setters
setAtWordBoundaries, setCaseSensitive, setData, setDataFull, setProperty, setRegexEnabled, setSearchText, setVisibleOnly, setWrapAround.
getAtWordBoundaries
searchSettingsGetAtWordBoundaries Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> m Bool | Returns: whether to search at word boundaries. |
No description available in the introspection data.
getCaseSensitive
searchSettingsGetCaseSensitive Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> m Bool | Returns: whether the search is case sensitive. |
No description available in the introspection data.
getRegexEnabled
searchSettingsGetRegexEnabled Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> m Bool | Returns: whether to search by regular expressions. |
No description available in the introspection data.
getSearchText
searchSettingsGetSearchText Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> m (Maybe Text) | Returns: the text to search, or |
Gets the text to search.
The return value must not be freed.
You may be interested to call [funcutilsEscapeSearchText
] after
this function.
getVisibleOnly
searchSettingsGetVisibleOnly Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> m Bool | Returns: whether to exclude invisible text from the search. |
No description available in the introspection data.
Since: 5.12
getWrapAround
searchSettingsGetWrapAround Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> m Bool | Returns: whether to wrap around the search. |
No description available in the introspection data.
new
:: (HasCallStack, MonadIO m) | |
=> m SearchSettings | Returns: a new search settings object. |
Creates a new search settings object.
setAtWordBoundaries
searchSettingsSetAtWordBoundaries Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Change whether the search is done at word boundaries.
If atWordBoundaries
is True
, a search match must start and end a word.
The match can span multiple words. See also textIterStartsWord
and
textIterEndsWord
.
setCaseSensitive
searchSettingsSetCaseSensitive Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Enables or disables the case sensitivity for the search.
setRegexEnabled
searchSettingsSetRegexEnabled Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Enables or disables whether to search by regular expressions.
If enabled, the [propertysearchSettings
:search-text] property contains the
pattern of the regular expression.
- class
searchContext
- uses
Regex
when regex search is enabled. See the Regular expression syntax page in the GLib reference manual.
setSearchText
searchSettingsSetSearchText Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the text to search.
If searchText
is Nothing
or is empty, the search will be disabled. A copy of searchText
will be made, so you can safely free searchText
after a call to this function.
You may be interested to call [funcutilsUnescapeSearchText
] before
this function.
setVisibleOnly
searchSettingsSetVisibleOnly Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Enables or disables whether to exclude invisible text from the search.
If enabled, only visible text will be searched. A search match may have invisible text interspersed.
Since: 5.12
setWrapAround
searchSettingsSetWrapAround Source #
:: (HasCallStack, MonadIO m, IsSearchSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Enables or disables the wrap around search.
If wrapAround
is True
, the forward search continues at the beginning of the buffer
if no search occurrences are found. Similarly, the backward search continues to search at
the end of the buffer.
Properties
atWordBoundaries
If True
, a search match must start and end a word. The match can
span multiple words.
constructSearchSettingsAtWordBoundaries :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “at-word-boundaries
” property. This is rarely needed directly, but it is used by new
.
getSearchSettingsAtWordBoundaries :: (MonadIO m, IsSearchSettings o) => o -> m Bool Source #
Get the value of the “at-word-boundaries
” property.
When overloading is enabled, this is equivalent to
get
searchSettings #atWordBoundaries
setSearchSettingsAtWordBoundaries :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () Source #
Set the value of the “at-word-boundaries
” property.
When overloading is enabled, this is equivalent to
set
searchSettings [ #atWordBoundaries:=
value ]
caseSensitive
Whether the search is case sensitive.
constructSearchSettingsCaseSensitive :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “case-sensitive
” property. This is rarely needed directly, but it is used by new
.
getSearchSettingsCaseSensitive :: (MonadIO m, IsSearchSettings o) => o -> m Bool Source #
Get the value of the “case-sensitive
” property.
When overloading is enabled, this is equivalent to
get
searchSettings #caseSensitive
setSearchSettingsCaseSensitive :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () Source #
Set the value of the “case-sensitive
” property.
When overloading is enabled, this is equivalent to
set
searchSettings [ #caseSensitive:=
value ]
regexEnabled
Search by regular expressions with
[propertysearchSettings
:search-text] as the pattern.
constructSearchSettingsRegexEnabled :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “regex-enabled
” property. This is rarely needed directly, but it is used by new
.
getSearchSettingsRegexEnabled :: (MonadIO m, IsSearchSettings o) => o -> m Bool Source #
Get the value of the “regex-enabled
” property.
When overloading is enabled, this is equivalent to
get
searchSettings #regexEnabled
setSearchSettingsRegexEnabled :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () Source #
Set the value of the “regex-enabled
” property.
When overloading is enabled, this is equivalent to
set
searchSettings [ #regexEnabled:=
value ]
searchText
A search string, or Nothing
if the search is disabled.
If the regular expression search is enabled, [propertysearchSettings
:search-text] is
the pattern.
clearSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> m () Source #
Set the value of the “search-text
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#searchText
constructSearchSettingsSearchText :: (IsSearchSettings o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “search-text
” property. This is rarely needed directly, but it is used by new
.
getSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> m (Maybe Text) Source #
Get the value of the “search-text
” property.
When overloading is enabled, this is equivalent to
get
searchSettings #searchText
setSearchSettingsSearchText :: (MonadIO m, IsSearchSettings o) => o -> Text -> m () Source #
Set the value of the “search-text
” property.
When overloading is enabled, this is equivalent to
set
searchSettings [ #searchText:=
value ]
visibleOnly
Exclude invisible text from the search. A search match may have invisible text interspersed.
Since: 5.12
constructSearchSettingsVisibleOnly :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “visible-only
” property. This is rarely needed directly, but it is used by new
.
getSearchSettingsVisibleOnly :: (MonadIO m, IsSearchSettings o) => o -> m Bool Source #
Get the value of the “visible-only
” property.
When overloading is enabled, this is equivalent to
get
searchSettings #visibleOnly
setSearchSettingsVisibleOnly :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () Source #
Set the value of the “visible-only
” property.
When overloading is enabled, this is equivalent to
set
searchSettings [ #visibleOnly:=
value ]
wrapAround
For a forward search, continue at the beginning of the buffer if no search occurrence is found. For a backward search, continue at the end of the buffer.
constructSearchSettingsWrapAround :: (IsSearchSettings o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “wrap-around
” property. This is rarely needed directly, but it is used by new
.
getSearchSettingsWrapAround :: (MonadIO m, IsSearchSettings o) => o -> m Bool Source #
Get the value of the “wrap-around
” property.
When overloading is enabled, this is equivalent to
get
searchSettings #wrapAround
setSearchSettingsWrapAround :: (MonadIO m, IsSearchSettings o) => o -> Bool -> m () Source #
Set the value of the “wrap-around
” property.
When overloading is enabled, this is equivalent to
set
searchSettings [ #wrapAround:=
value ]