Class ViewSwitcherSidebar.Builder<B extends ViewSwitcherSidebar.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
- Enclosing class:
ViewSwitcherSidebar
- Since:
- 1.9
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theViewSwitcherSidebarobject.Emitted when an item has been activated.The item filter.setMode(SidebarMode mode) Determines the sidebar's look and behavior.setPlaceholder(Widget placeholder) The placeholder widget.The stack the sidebar controls.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, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theViewSwitcherSidebarobject. This will callGObject.withProperties(Type, String[], Value[])to create a new GObject instance, which is then cast toViewSwitcherSidebar.- Overrides:
buildin classWidget.Builder<B extends ViewSwitcherSidebar.Builder<B>>- Returns:
- a new instance of
ViewSwitcherSidebarwith the properties that were set in the Builder object.
-
setFilter
The item filter.
Can be used to implement search within the sidebar.
Use
ViewSwitcherSidebar:placeholderto provide an empty state.See
Sidebar:filter.- Parameters:
filter- the value for thefilterproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-
setMode
Determines the sidebar's look and behavior.
If set to
Adw.SidebarMode.sidebar, behaves like a sidebar: with a sidebar style and a persistent selection.If set to
Adw.SidebarMode.page, behaves like a page of boxed lists.The page mode is intended to be used with
NavigationSplitViewwhen collapsed, as the sidebar pane becomes a page there.When used with
OverlaySplitView, the sidebar should stay in sidebar mode, as the sidebar pane is still a sidebar when collapsed.See
Sidebar:mode.- Parameters:
mode- the value for themodeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-
setPlaceholder
The placeholder widget.
This widget will be shown if the sidebar has no items, or all of its items have been filtered out by
ViewSwitcherSidebar:filter.See
Sidebar:placeholder.- Parameters:
placeholder- the value for theplaceholderproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
-
setStack
-
onActivated
Emitted when an item has been activated.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.9
- See Also:
-