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.OnChangedNested 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_CHANGEDFields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY -
Constructor Summary
ConstructorsConstructorDescriptionStringFilter(Expression expression) Creates a new string filter.StringFilter(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandlerGets the expression that the string filter uses to
obtain strings from items.booleanReturns whether the filter ignores case differences.static intintReturns the match mode that the filter is using.static longstatic TypeSystem.TypeSizeGets the search term.static longstatic TypeSystem.TypeSizevoidsetExpression(Expression expression) Sets the expression that the string filter uses to
obtain strings from items.voidsetIgnoreCase(boolean ignore_case) Sets whether the filter ignores case differences.voidsetMatchMode(int mode) Sets the match mode for the filter.voidSets the string to search for.voidSets the string to search for.Methods inherited from class ch.bailu.gtk.gtk.Filter
changed, getStrictness, match, onChangedMethods 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, weakUnrefMethods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksMethods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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()
-