GNOME Python API

References

  • PyGObject Docs
  • GNOME Developer Documentation

Libraries

  • Adw
    • Classes
      • AboutDialog
      • AboutWindow
      • ActionRow
      • AlertDialog
      • Animation
      • AnimationTarget
      • Application
      • ApplicationWindow
      • Avatar
      • Banner
      • Bin
      • Breakpoint
      • BreakpointBin
      • ButtonContent
      • CallbackAnimationTarget
      • Carousel
      • CarouselIndicatorDots
      • CarouselIndicatorLines
      • Clamp
      • ClampLayout
      • ClampScrollable
      • ComboRow
      • Dialog
      • EntryRow
      • EnumListItem
      • EnumListModel
      • ExpanderRow
      • Flap
      • HeaderBar
      • Leaflet
      • LeafletPage
      • MessageDialog
      • NavigationPage
      • NavigationSplitView
      • NavigationView
      • OverlaySplitView
      • PasswordEntryRow
      • PreferencesDialog
      • PreferencesGroup
      • PreferencesPage
      • PreferencesRow
      • PreferencesWindow
      • PropertyAnimationTarget
      • SpinRow
      • SplitButton
      • SpringAnimation
      • Squeezer
      • SqueezerPage
      • StatusPage
      • StyleManager
      • SwipeTracker
      • SwitchRow
      • TabBar
      • TabButton
      • TabOverview
      • TabPage
      • TabView
      • TimedAnimation
      • Toast
      • ToastOverlay
      • ToolbarView
      • ViewStack
      • ViewStackPage
      • ViewStackPages
      • ViewSwitcher
      • ViewSwitcherBar
      • ViewSwitcherTitle
      • Window
      • WindowTitle
    • Interfaces
    • Structures
    • Enums
    • Functions
    • Constants
    • Dependencies
  • DBus
  • DBusGLib
  • Flatpak
  • GLib
  • GModule
  • GObject
  • Gcr
  • Gdk
  • GdkPixbuf
  • GdkPixdata
  • GdkWayland
  • GdkX11
  • Gio
  • Graphene
  • Gsk
  • Gst
  • GstBase
  • GstCheck
  • GstController
  • GstNet
  • Gtk
  • GtkSource
  • HarfBuzz
  • Pango
  • PangoCairo
  • PangoFT2
  • PangoFc
  • PangoOT
  • PangoXft
  • Shumate
  • Soup
  • Vte
  • WebKit
  • WebKitWebProcessExtension
  • Xdp
  • XdpGtk4
  • pycairo
GNOME Python API
  • Adw
  • Classes
  • NavigationSplitView
  • View page source

NavigationSplitView

Added in version 1.4.

class NavigationSplitView(**properties: Any)

Superclasses: Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, Buildable, ConstraintTarget

Constructors:

NavigationSplitView(**properties)
new() -> Gtk.Widget

Constructors

class NavigationSplitView
classmethod new() → Widget

Creates a new AdwNavigationSplitView.

Added in version 1.4.

Methods

class NavigationSplitView
get_collapsed() → bool

Gets whether self is collapsed.

Added in version 1.4.

get_content() → NavigationPage | None

Sets the content widget for self.

Added in version 1.4.

get_max_sidebar_width() → float

Gets the maximum sidebar width for self.

Added in version 1.4.

get_min_sidebar_width() → float

Gets the minimum sidebar width for self.

Added in version 1.4.

get_show_content() → bool

Gets which page is visible when self is collapsed.

Added in version 1.4.

get_sidebar() → NavigationPage | None

Gets the sidebar widget for self.

Added in version 1.4.

get_sidebar_width_fraction() → float

Gets the preferred sidebar width fraction for self.

Added in version 1.4.

get_sidebar_width_unit() → LengthUnit

Gets the length unit for minimum and maximum sidebar widths.

Added in version 1.4.

set_collapsed(collapsed: bool) → None

Sets whether self is collapsed.

When collapsed, the children are put inside an NavigationView, otherwise they are displayed side by side.

The show_content controls which child is visible while collapsed.

Added in version 1.4.

Parameters:

collapsed – whether self is collapsed

set_content(content: NavigationPage | None = None) → None

Sets the content widget for self.

Added in version 1.4.

Parameters:

content – the content widget

set_max_sidebar_width(width: float) → None

Sets the maximum sidebar width for self.

Maximum width is affected by sidebar_width_unit.

The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.

Added in version 1.4.

Parameters:

width – the maximum width

set_min_sidebar_width(width: float) → None

Sets the minimum sidebar width for self.

Minimum width is affected by sidebar_width_unit.

The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.

Added in version 1.4.

Parameters:

width – the minimum width

set_show_content(show_content: bool) → None

Sets which page is visible when self is collapsed.

If set to TRUE, the content widget will be the visible page when collapsed is TRUE; otherwise the sidebar widget will be visible.

If the split view is already collapsed, the visible page changes immediately.

Added in version 1.4.

Parameters:

show_content – whether to show content when collapsed

set_sidebar(sidebar: NavigationPage | None = None) → None

Sets the sidebar widget for self.

Added in version 1.4.

Parameters:

sidebar – the sidebar widget

set_sidebar_width_fraction(fraction: float) → None

Sets the preferred sidebar width as a fraction of the total width of self.

The preferred width is additionally limited by min_sidebar_width and max_sidebar_width.

The sidebar widget can be allocated with larger width if its own minimum width exceeds the preferred width.

Added in version 1.4.

Parameters:

fraction – the preferred width fraction

set_sidebar_width_unit(unit: LengthUnit) → None

Sets the length unit for minimum and maximum sidebar widths.

See min_sidebar_width and max_sidebar_width.

Added in version 1.4.

Parameters:

unit – the length unit

Properties

class NavigationSplitView
props.collapsed: bool

Whether the split view is collapsed.

When collapsed, the children are put inside an NavigationView, otherwise they are displayed side by side.

The show_content controls which child is visible while collapsed.

Added in version 1.4.

props.content: NavigationPage

The content widget.

Added in version 1.4.

props.max_sidebar_width: float

The maximum sidebar width.

Maximum width is affected by sidebar_width_unit.

The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.

Added in version 1.4.

props.min_sidebar_width: float

The minimum sidebar width.

Minimum width is affected by sidebar_width_unit.

The sidebar widget can still be allocated with larger width if its own minimum width exceeds it.

Added in version 1.4.

props.show_content: bool

Determines the visible page when collapsed.

If set to TRUE, the content widget will be the visible page when collapsed is TRUE; otherwise the sidebar widget will be visible.

If the split view is already collapsed, the visible page changes immediately.

Added in version 1.4.

props.sidebar: NavigationPage

The sidebar widget.

Added in version 1.4.

props.sidebar_width_fraction: float

The preferred sidebar width as a fraction of the total width.

The preferred width is additionally limited by min_sidebar_width and max_sidebar_width.

The sidebar widget can be allocated with larger width if its own minimum width exceeds the preferred width.

Added in version 1.4.

props.sidebar_width_unit: LengthUnit

The length unit for minimum and maximum sidebar widths.

See min_sidebar_width and max_sidebar_width.

Added in version 1.4.


Built with Sphinx using a theme provided by Read the Docs.
  • NavigationSplitView
    • Constructors
      • NavigationSplitView.new()
    • Methods
      • NavigationSplitView.get_collapsed()
      • NavigationSplitView.get_content()
      • NavigationSplitView.get_max_sidebar_width()
      • NavigationSplitView.get_min_sidebar_width()
      • NavigationSplitView.get_show_content()
      • NavigationSplitView.get_sidebar()
      • NavigationSplitView.get_sidebar_width_fraction()
      • NavigationSplitView.get_sidebar_width_unit()
      • NavigationSplitView.set_collapsed()
      • NavigationSplitView.set_content()
      • NavigationSplitView.set_max_sidebar_width()
      • NavigationSplitView.set_min_sidebar_width()
      • NavigationSplitView.set_show_content()
      • NavigationSplitView.set_sidebar()
      • NavigationSplitView.set_sidebar_width_fraction()
      • NavigationSplitView.set_sidebar_width_unit()
    • Properties
      • NavigationSplitView.props.collapsed
      • NavigationSplitView.props.content
      • NavigationSplitView.props.max_sidebar_width
      • NavigationSplitView.props.min_sidebar_width
      • NavigationSplitView.props.show_content
      • NavigationSplitView.props.sidebar
      • NavigationSplitView.props.sidebar_width_fraction
      • NavigationSplitView.props.sidebar_width_unit