Package ch.bailu.gtk.gtk
Class StringFilter
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.Filter
ch.bailu.gtk.gtk.StringFilter
- All Implemented Interfaces:
PointerInterface
`GtkStringFilter` determines whether to include items by comparing
strings to a fixed search term.
The strings are obtained from the items by evaluating a `GtkExpression`
set with [method@Gtk.StringFilter.set_expression], and they are
compared against a search term set with [method@Gtk.StringFilter.set_search].
`GtkStringFilter` has several different modes of comparison - it
can match the whole string, just a prefix, or any substring. Use
[method@Gtk.StringFilter.set_match_mode] choose a mode.
It is also possible to make case-insensitive comparisons, with
[method@Gtk.StringFilter.set_ignore_case].
strings to a fixed search term.
The strings are obtained from the items by evaluating a `GtkExpression`
set with [method@Gtk.StringFilter.set_expression], and they are
compared against a search term set with [method@Gtk.StringFilter.set_search].
`GtkStringFilter` has several different modes of comparison - it
can match the whole string, just a prefix, or any substring. Use
[method@Gtk.StringFilter.set_match_mode] choose a mode.
It is also possible to make case-insensitive comparisons, with
[method@Gtk.StringFilter.set_ignore_case].
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gtk.Filter
Filter.OnChanged
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gtk.Filter
SIGNAL_ON_CHANGED
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionStringFilter
(Expression expression) Creates a new string filter.StringFilter
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
Gets the expression that the string filter uses to
obtain strings from items.boolean
Returns whether the filter ignores case differences.static int
int
Returns the match mode that the filter is using.static long
static TypeSystem.TypeSize
Gets the search term.static long
static TypeSystem.TypeSize
void
setExpression
(Expression expression) Sets the expression that the string filter uses to
obtain strings from items.void
setIgnoreCase
(boolean ignore_case) Sets whether the filter ignores case differences.void
setMatchMode
(int mode) Sets the match mode for the filter.void
Sets the string to search for.void
Sets the string to search for.Methods inherited from class ch.bailu.gtk.gtk.Filter
changed, getStrictness, match, onChanged
Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
StringFilter
-
StringFilter
Creates a new string filter.
You will want to set up the filter by providing a string to search for
and by providing a property to look up on the item.- Parameters:
expression
- The expression to evaluate
-
-
Method Details
-
getClassHandler
-
getExpression
Gets the expression that the string filter uses to
obtain strings from items.- Returns:
- a `GtkExpression`
-
getIgnoreCase
public boolean getIgnoreCase()Returns whether the filter ignores case differences.- Returns:
- %TRUE if the filter ignores case
-
getMatchMode
public int getMatchMode()Returns the match mode that the filter is using.- Returns:
- the match mode of the filter
-
getSearch
Gets the search term.- Returns:
- The search term
-
setExpression
Sets the expression that the string filter uses to
obtain strings from items.
The expression must have a value type of %G_TYPE_STRING.- Parameters:
expression
- a `GtkExpression`
-
setIgnoreCase
public void setIgnoreCase(boolean ignore_case) Sets whether the filter ignores case differences.- Parameters:
ignore_case
- %TRUE to ignore case
-
setMatchMode
public void setMatchMode(int mode) Sets the match mode for the filter.- Parameters:
mode
- the new match mode
-
setSearch
Sets the string to search for.- Parameters:
search
- The string to search for or %NULL to clear the search
-
setSearch
Sets the string to search for.- Parameters:
search
- The string to search for or %NULL to clear the search
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-