Handy.ViewSwitcher¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
The preferred place to ellipsize the string, if the narrow mode label does not have enough room to display the entire string |
||
r/w/en |
The policy to determine the mode to use |
||
r/w/en |
Stack |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Handy.ViewSwitcher(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An adaptive view switcher.
An adaptive view switcher, designed to switch between multiple views in a similar fashion than a [class`Gtk`.StackSwitcher].
Depending on the available width, the view switcher can adapt from a wide mode showing the view’s icon and title side by side, to a narrow mode showing the view’s icon and title one on top of the other, in a more compact way. This can be controlled via the policy property.
To look good in a header bar, an
HdyViewSwitcher
requires to fill its full height. Contrary to [class`Gtk`.HeaderBar], [class`HeaderBar`] doesn’t force a vertical alignment on its title widget, so we recommend it over [class`Gtk`.HeaderBar].- CSS nodes
HdyViewSwitcher
has a single CSS node with nameviewswitcher
.New in version 1.0.
- classmethod new()¶
- Returns:
the newly created
HdyViewSwitcher
- Return type:
Creates a new
HdyViewSwitcher
.New in version 1.0.
- get_narrow_ellipsize()¶
- Returns:
a [enum`Pango`.EllipsizeMode]
- Return type:
Get the ellipsizing position of the narrow mode label.
New in version 1.0.
- get_policy()¶
- Returns:
the policy of self
- Return type:
Gets the policy of self.
New in version 1.0.
- get_stack()¶
-
Gets the stack controlled by self.
New in version 1.0.
- set_narrow_ellipsize(mode)¶
- Parameters:
mode (
Pango.EllipsizeMode
) – a [enum`Pango`.EllipsizeMode]
Sets the mode used to ellipsize the text in narrow mode.
New in version 1.0.
- set_policy(policy)¶
- Parameters:
policy (
Handy.ViewSwitcherPolicy
) – the new policy
Sets the policy of self.
New in version 1.0.
Property Details¶
- Handy.ViewSwitcher.props.narrow_ellipsize¶
- Name:
narrow-ellipsize
- Type:
- Default Value:
- Flags:
The preferred place to ellipsize the string.
If the narrow mode label does not have enough room to display the entire string, specified as a [enum`Pango`.EllipsizeMode].
Note that setting this property to a value other than
PANGO_ELLIPSIZE_NONE
has the side-effect that the label requests only enough space to display the ellipsis.New in version 1.0.
- Handy.ViewSwitcher.props.policy¶
- Name:
policy
- Type:
- Default Value:
- Flags:
The policy to determine which mode to use.
New in version 1.0.