Class SearchEntry.Builder<B extends SearchEntry.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>, Editable.Builder<B>, BuilderInterface
- Enclosing class:
SearchEntry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theSearchEntryobject.onActivate(SearchEntry.ActivateCallback handler) Emitted when the entry is activated.onNextMatch(SearchEntry.NextMatchCallback handler) Emitted when the user initiates a move to the next match for the current search string.Emitted when the user initiates a move to the previous match for the current search string.Emitted with a delay.Emitted when the user initiated a search on the entry.Emitted when the user stops a search via keyboard input.setActivatesDefault(boolean activatesDefault) Whether to activate the default widget when Enter is pressed.setInputHints(Set<InputHints> inputHints) The hints about input for theGtkSearchEntryused to alter the behaviour of input methods.setInputHints(InputHints... inputHints) The hints about input for theGtkSearchEntryused to alter the behaviour of input methods.setInputPurpose(InputPurpose inputPurpose) The purpose for theGtkSearchEntryinput used to alter the behaviour of input methods.setKeyCaptureWidget(Widget keyCaptureWidget) The widget that the entry will use to capture key events.setPlaceholderText(String placeholderText) The text that will be displayed in theGtkSearchEntrywhen it is empty and unfocused.setSearchDelay(int searchDelay) The delay in milliseconds from last keypress to the search changed signal.Methods inherited from class Widget.Builder
onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, setCanFocus, setCanTarget, setCssClasses, setCssName, setCursor, setFocusable, setFocusOnClick, setHalign, setHasTooltip, setHeightRequest, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequestMethods inherited from class GObject.Builder
onNotifyMethods inherited from class Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Accessible.Builder
setAccessibleRoleMethods inherited from interface BuilderInterface
addBuilderProperty, connect, connect, getArenaMethods inherited from interface Editable.Builder
setEditable, setEnableUndo, setMaxWidthChars, setText, setWidthChars, setXalign
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theSearchEntryobject. This will callGObject.withProperties(Type, String[], Value[])to create a new GObject instance, which is then cast toSearchEntry.- Overrides:
buildin classWidget.Builder<B extends SearchEntry.Builder<B>>- Returns:
- a new instance of
SearchEntrywith the properties that were set in the Builder object.
-
setActivatesDefault
Whether to activate the default widget when Enter is pressed.- Parameters:
activatesDefault- the value for theactivates-defaultproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setInputHints
The hints about input for theGtkSearchEntryused to alter the behaviour of input methods.- Parameters:
inputHints- the value for theinput-hintsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.14
-
setInputPurpose
The purpose for theGtkSearchEntryinput used to alter the behaviour of input methods.- Parameters:
inputPurpose- the value for theinput-purposeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.14
-
setKeyCaptureWidget
The widget that the entry will use to capture key events.
Key events are consumed by the search entry to start or continue a search.
- Parameters:
keyCaptureWidget- the value for thekey-capture-widgetproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.22
-
setPlaceholderText
-
setSearchDelay
The delay in milliseconds from last keypress to the search changed signal.- Parameters:
searchDelay- the value for thesearch-delayproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.8
-
setInputHints
The hints about input for theGtkSearchEntryused to alter the behaviour of input methods.- Parameters:
inputHints- the value for theinput-hintsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.14
-
onActivate
Emitted when the entry is activated.
The keybindings for this signal are all forms of the Enter key.
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onNextMatch
Emitted when the user initiates a move to the next match for the current search string.
This is a keybinding signal.
Applications should connect to it, to implement moving between matches.
The default bindings for this signal is Ctrl+g.
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onPreviousMatch
Emitted when the user initiates a move to the previous match for the current search string.
This is a keybinding signal.
Applications should connect to it, to implement moving between matches.
The default bindings for this signal is Ctrl+Shift+g.
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onSearchChanged
Emitted with a delay. The length of the delay can be changed with theGtk.SearchEntry:search-delayproperty.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onSearchStarted
Emitted when the user initiated a search on the entry.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onStopSearch
Emitted when the user stops a search via keyboard input.
This is a keybinding signal.
Applications should connect to it, to implement hiding the search entry in this case.
The default bindings for this signal is Escape.
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-