class Adw::TabView
Overview
A dynamic tabbed container.
Adw::TabView
is a container which shows one child at a time. While it
provides keyboard shortcuts for switching between pages, it does not provide
a visible tab switcher and relies on external widgets for that, such as
#TabBar
, #TabOverview
and #TabButton
.
Adw::TabView
maintains a #TabPage
object for each page, which holds
additional per-page properties. You can obtain the Adw::TabPage
for a page
with TabView#page
, and as the return value for
TabView::append
and other functions for adding children.
Adw::TabView
only aims to be useful for dynamic tabs in multi-window
document-based applications, such as web browsers, file managers, text
editors or terminals. It does not aim to replace Gtk::Notebook
for use
cases such as tabbed dialogs.
As such, it does not support disabling page reordering or detaching.
Adw::TabView
adds a number of global page switching and reordering shortcuts.
The TabView::shortcuts
property can be used to manage them.
See #TabViewShortcuts
for the list of the available shortcuts. All of
the shortcuts are enabled by default.
TabView::add_shortcuts
and TabView::remove_shortcuts
can be
used to manage shortcuts in a convenient way, for example:
WARNING ⚠️ The following code is in c ⚠️
adw_tab_view_remove_shortcuts (view, ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME |
ADW_TAB_VIEW_SHORTCUT_CONTROL_END);
CSS nodes
Adw::TabView
has a main CSS node with the name tabview
.
Accessibility
Adw::TabView
uses the GTK_ACCESSIBLE_ROLE_TAB_PANEL
for the tab pages which
are the accessible parent objects of the child widgets.
Included Modules
Defined in:
lib/gi-crystal/src/auto/adw-1/tab_view.crConstructors
-
.new : self
Creates a new
Adw::TabView
. - .new(*, accessible_role : Gtk::AccessibleRole | Nil = nil, can_focus : Bool | Nil = nil, can_target : Bool | Nil = nil, css_classes : Enumerable(String) | Nil = nil, css_name : String | Nil = nil, cursor : Gdk::Cursor | Nil = nil, default_icon : Gio::Icon | Nil = nil, focus_on_click : Bool | Nil = nil, focusable : Bool | Nil = nil, halign : Gtk::Align | Nil = nil, has_default : Bool | Nil = nil, has_focus : Bool | Nil = nil, has_tooltip : Bool | Nil = nil, height_request : Int32 | Nil = nil, hexpand : Bool | Nil = nil, hexpand_set : Bool | Nil = nil, is_transferring_page : Bool | Nil = nil, layout_manager : Gtk::LayoutManager | Nil = nil, limit_events : Bool | Nil = nil, margin_bottom : Int32 | Nil = nil, margin_end : Int32 | Nil = nil, margin_start : Int32 | Nil = nil, margin_top : Int32 | Nil = nil, menu_model : Gio::MenuModel | Nil = nil, n_pages : Int32 | Nil = nil, n_pinned_pages : Int32 | Nil = nil, name : String | Nil = nil, opacity : Float64 | Nil = nil, overflow : Gtk::Overflow | Nil = nil, pages : Gtk::SelectionModel | Nil = nil, parent : Gtk::Widget | Nil = nil, receives_default : Bool | Nil = nil, root : Gtk::Root | Nil = nil, scale_factor : Int32 | Nil = nil, selected_page : Adw::TabPage | Nil = nil, sensitive : Bool | Nil = nil, shortcuts : Adw::TabViewShortcuts | Nil = nil, tooltip_markup : String | Nil = nil, tooltip_text : String | Nil = nil, valign : Gtk::Align | Nil = nil, vexpand : Bool | Nil = nil, vexpand_set : Bool | Nil = nil, visible : Bool | Nil = nil, width_request : Int32 | Nil = nil)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#add_page(child : Gtk::Widget, parent : Adw::TabPage | Nil) : Adw::TabPage
Adds child to self with parent as the parent.
-
#add_shortcuts(shortcuts : Adw::TabViewShortcuts) : Nil
Adds shortcuts for self.
-
#append(child : Gtk::Widget) : Adw::TabPage
Inserts child as the last non-pinned page.
-
#append_pinned(child : Gtk::Widget) : Adw::TabPage
Inserts child as the last pinned page.
-
#close_other_pages(page : Adw::TabPage) : Nil
Requests to close all pages other than page.
-
#close_page(page : Adw::TabPage) : Nil
Requests to close page.
-
#close_page_finish(page : Adw::TabPage, confirm : Bool) : Nil
Completes a
TabView::close_page
call for page. - #close_page_signal
-
#close_pages_after(page : Adw::TabPage) : Nil
Requests to close all pages after page.
-
#close_pages_before(page : Adw::TabPage) : Nil
Requests to close all pages before page.
- #create_window_signal
-
#default_icon : Gio::Icon
Gets the default icon of self.
-
#default_icon=(default_icon : Gio::Icon) : Nil
Sets the default page icon for self.
- #default_icon=(value : Gio::Icon | Nil) : Gio::Icon | Nil
-
#hash(hasher)
See
Object#hash(hasher)
- #indicator_activated_signal
-
#insert(child : Gtk::Widget, position : Int32) : Adw::TabPage
Inserts a non-pinned page at position.
-
#insert_pinned(child : Gtk::Widget, position : Int32) : Adw::TabPage
Inserts a pinned page at position.
-
#invalidate_thumbnails : Nil
Invalidates thumbnails for all pages in self.
-
#is_transferring_page : Bool
Whether a page is being transferred.
- #is_transferring_page? : Bool
-
#menu_model : Gio::MenuModel | Nil
Gets the tab context menu model for self.
-
#menu_model=(menu_model : Gio::MenuModel | Nil) : Nil
Sets the tab context menu model for self.
-
#n_pages : Int32
Gets the number of pages in self.
-
#n_pinned_pages : Int32
Gets the number of pinned pages in self.
-
#nth_page(position : Int32) : Adw::TabPage
Gets the
#TabPage
representing the child at position. -
#page(child : Gtk::Widget) : Adw::TabPage
Gets the
#TabPage
object representing child. - #page_attached_signal
- #page_detached_signal
-
#page_position(page : Adw::TabPage) : Int32
Finds the position of page in self, starting from 0.
- #page_reordered_signal
-
#pages : Gtk::SelectionModel
Returns a
Gio::ListModel
that contains the pages of self. -
#prepend(child : Gtk::Widget) : Adw::TabPage
Inserts child as the first non-pinned page.
-
#prepend_pinned(child : Gtk::Widget) : Adw::TabPage
Inserts child as the first pinned page.
-
#remove_shortcuts(shortcuts : Adw::TabViewShortcuts) : Nil
Removes shortcuts from self.
-
#reorder_backward(page : Adw::TabPage) : Bool
Reorders page to before its previous page if possible.
-
#reorder_first(page : Adw::TabPage) : Bool
Reorders page to the first possible position.
-
#reorder_forward(page : Adw::TabPage) : Bool
Reorders page to after its next page if possible.
-
#reorder_last(page : Adw::TabPage) : Bool
Reorders page to the last possible position.
-
#reorder_page(page : Adw::TabPage, position : Int32) : Bool
Reorders page to position.
-
#select_next_page : Bool
Selects the page after the currently selected page.
-
#select_previous_page : Bool
Selects the page before the currently selected page.
-
#selected_page : Adw::TabPage | Nil
Gets the currently selected page in self.
-
#selected_page=(selected_page : Adw::TabPage) : Nil
Sets the currently selected page in self.
- #selected_page=(value : Adw::TabPage | Nil) : Adw::TabPage | Nil
-
#set_page_pinned(page : Adw::TabPage, pinned : Bool) : Nil
Pins or unpins page.
- #setup_menu_signal
-
#shortcuts : Adw::TabViewShortcuts
Gets the enabled shortcuts for self.
-
#shortcuts=(shortcuts : Adw::TabViewShortcuts) : Nil
Sets the enabled shortcuts for self.
-
#transfer_page(page : Adw::TabPage, other_view : Adw::TabView, position : Int32) : Nil
Transfers page from self to other_view.
Instance methods inherited from module Gtk::ConstraintTarget
to_unsafe
to_unsafe
Constructor methods inherited from module Gtk::ConstraintTarget
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gtk::ConstraintTarget
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from module Gtk::Buildable
buildable_id : String | Nil
buildable_id,
to_unsafe
to_unsafe
Constructor methods inherited from module Gtk::Buildable
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gtk::Buildable
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from module Gtk::Accessible
accessible_parent : Gtk::Accessible | Nil
accessible_parent,
accessible_role : Gtk::AccessibleRole
accessible_role,
accessible_role=(value : Gtk::AccessibleRole) : Gtk::AccessibleRole
accessible_role=,
announce(message : String, priority : Gtk::AccessibleAnnouncementPriority) : Nil
announce,
at_context : Gtk::ATContext
at_context,
bounds(x : Int32, y : Int32, width : Int32, height : Int32) : Bool
bounds,
first_accessible_child : Gtk::Accessible | Nil
first_accessible_child,
next_accessible_sibling : Gtk::Accessible | Nil
next_accessible_sibling,
platform_state(state : Gtk::AccessiblePlatformState) : Bool
platform_state,
reset_property(property : Gtk::AccessibleProperty) : Nil
reset_property,
reset_relation(relation : Gtk::AccessibleRelation) : Nil
reset_relation,
reset_state(state : Gtk::AccessibleState) : Nil
reset_state,
set_accessible_parent(parent : Gtk::Accessible | Nil, next_sibling : Gtk::Accessible | Nil) : Nil
set_accessible_parent,
to_unsafe
to_unsafe,
update_next_accessible_sibling(new_sibling : Gtk::Accessible | Nil) : Nil
update_next_accessible_sibling,
update_platform_state(state : Gtk::AccessiblePlatformState) : Nil
update_platform_state,
update_property(properties : Enumerable(Gtk::AccessibleProperty), values : Enumerable(_)) : Nil
update_property,
update_relation(relations : Enumerable(Gtk::AccessibleRelation), values : Enumerable(_)) : Nil
update_relation,
update_state(states : Enumerable(Gtk::AccessibleState), values : Enumerable(_)) : Nil
update_state
Constructor methods inherited from module Gtk::Accessible
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gtk::Accessible
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from class Gtk::Widget
==(other : self)
==,
action_set_enabled(action_name : String, enabled : Bool) : Nil
action_set_enabled,
activate : Bool
activate,
activate_action(name : String, args : _ | Nil) : Bool
activate_action,
activate_default : Nil
activate_default,
add_controller(controller : Gtk::EventController) : Nil
add_controller,
add_css_class(css_class : String) : Nil
add_css_class,
add_mnemonic_label(label : Gtk::Widget) : Nil
add_mnemonic_label,
add_tick_callback(callback : Gtk::TickCallback) : UInt32
add_tick_callback,
allocate(width : Int32, height : Int32, baseline : Int32, transform : Gsk::Transform | Nil) : Nil
allocate,
allocated_baseline : Int32
allocated_baseline,
allocated_height : Int32
allocated_height,
allocated_width : Int32
allocated_width,
allocation : Gdk::Rectangle
allocation,
ancestor(widget_type : UInt64) : Gtk::Widget | Nil
ancestor,
baseline : Int32
baseline,
can_focus : Bool
can_focus,
can_focus=(can_focus : Bool) : Nil
can_focus=,
can_focus? : Bool
can_focus?,
can_target : Bool
can_target,
can_target=(can_target : Bool) : Nil
can_target=,
can_target? : Bool
can_target?,
child_focus(direction : Gtk::DirectionType) : Bool
child_focus,
child_visible : Bool
child_visible,
child_visible=(child_visible : Bool) : Nil
child_visible=,
clipboard : Gdk::Clipboard
clipboard,
color : Gdk::RGBA
color,
compute_bounds(target : Gtk::Widget) : Graphene::Rect
compute_bounds,
compute_expand(orientation : Gtk::Orientation) : Bool
compute_expand,
compute_point(target : Gtk::Widget, point : Graphene::Point) : Graphene::Point
compute_point,
compute_transform(target : Gtk::Widget) : Graphene::Matrix
compute_transform,
contains(x : Float64, y : Float64) : Bool
contains,
create_pango_context : Pango::Context
create_pango_context,
create_pango_layout(text : String | Nil) : Pango::Layout
create_pango_layout,
css_classes : Enumerable(String)
css_classes,
css_classes=(classes : Enumerable(String)) : Nil
css_classes=,
css_name : String
css_name,
css_name=(value : String) : Stringcss_name=(value : Nil) : Nil css_name=, css_name? : String | Nil css_name?, cursor : Gdk::Cursor | Nil cursor, cursor=(cursor : Gdk::Cursor | Nil) : Nil cursor=, cursor_from_name=(name : String | Nil) : Nil cursor_from_name=, destroy_signal destroy_signal, direction : Gtk::TextDirection direction, direction=(dir : Gtk::TextDirection) : Nil direction=, direction_changed_signal direction_changed_signal, display : Gdk::Display display, dispose_template(widget_type : UInt64) : Nil dispose_template, drag_check_threshold(start_x : Int32, start_y : Int32, current_x : Int32, current_y : Int32) : Bool drag_check_threshold, error_bell : Nil error_bell, first_child : Gtk::Widget | Nil first_child, focus_child : Gtk::Widget | Nil focus_child, focus_child=(child : Gtk::Widget | Nil) : Nil focus_child=, focus_on_click : Bool focus_on_click, focus_on_click=(focus_on_click : Bool) : Nil focus_on_click=, focus_on_click? : Bool focus_on_click?, focusable : Bool focusable, focusable=(focusable : Bool) : Nil focusable=, focusable? : Bool focusable?, font_map : Pango::FontMap | Nil font_map, font_map=(font_map : Pango::FontMap | Nil) : Nil font_map=, font_options : Cairo::FontOptions | Nil font_options, font_options=(options : Cairo::FontOptions | Nil) : Nil font_options=, frame_clock : Gdk::FrameClock | Nil frame_clock, grab_focus : Bool grab_focus, halign : Gtk::Align halign, halign=(align : Gtk::Align) : Nil halign=, has_css_class(css_class : String) : Bool has_css_class, has_default : Bool has_default, has_default? : Bool has_default?, has_focus : Bool has_focus, has_focus? : Bool has_focus?, has_tooltip : Bool has_tooltip, has_tooltip=(has_tooltip : Bool) : Nil has_tooltip=, has_tooltip? : Bool has_tooltip?, has_visible_focus : Bool has_visible_focus, hash(hasher) hash, height : Int32 height, height_request : Int32 height_request, height_request=(value : Int32) : Int32 height_request=, hexpand : Bool hexpand, hexpand=(expand : Bool) : Nil hexpand=, hexpand? : Bool hexpand?, hexpand_set : Bool hexpand_set, hexpand_set=(set : Bool) : Nil hexpand_set=, hexpand_set? : Bool hexpand_set?, hide : Nil hide, hide_signal hide_signal, in_destruction : Bool in_destruction, init_template : Nil init_template, insert_action_group(name : String, group : Gio::ActionGroup | Nil) : Nil insert_action_group, insert_after(parent : Gtk::Widget, previous_sibling : Gtk::Widget | Nil) : Nil insert_after, insert_before(parent : Gtk::Widget, next_sibling : Gtk::Widget | Nil) : Nil insert_before, is_ancestor(ancestor : Gtk::Widget) : Bool is_ancestor, is_drawable : Bool is_drawable, is_focus : Bool is_focus, is_sensitive? : Bool is_sensitive?, is_visible? : Bool is_visible?, keynav_failed(direction : Gtk::DirectionType) : Bool keynav_failed, keynav_failed_signal keynav_failed_signal, last_child : Gtk::Widget | Nil last_child, layout_manager : Gtk::LayoutManager | Nil layout_manager, layout_manager=(layout_manager : Gtk::LayoutManager | Nil) : Nil layout_manager=, limit_events : Bool limit_events, limit_events=(limit_events : Bool) : Nil limit_events=, limit_events? : Bool limit_events?, list_mnemonic_labels : GLib::List list_mnemonic_labels, map : Nil map, map_signal map_signal, mapped : Bool mapped, margin_bottom : Int32 margin_bottom, margin_bottom=(margin : Int32) : Nil margin_bottom=, margin_end : Int32 margin_end, margin_end=(margin : Int32) : Nil margin_end=, margin_start : Int32 margin_start, margin_start=(margin : Int32) : Nil margin_start=, margin_top : Int32 margin_top, margin_top=(margin : Int32) : Nil margin_top=, measure(orientation : Gtk::Orientation, for_size : Int32) : Nil measure, mnemonic_activate(group_cycling : Bool) : Bool mnemonic_activate, mnemonic_activate_signal mnemonic_activate_signal, move_focus_signal move_focus_signal, name : String name, name=(name : String) : Nil
name=(value : Nil) : Nil name=, name? : String | Nil name?, native : Gtk::Native | Nil native, next_sibling : Gtk::Widget | Nil next_sibling, observe_children : Gio::ListModel observe_children, observe_controllers : Gio::ListModel observe_controllers, opacity : Float64 opacity, opacity=(opacity : Float64) : Nil opacity=, overflow : Gtk::Overflow overflow, overflow=(overflow : Gtk::Overflow) : Nil overflow=, pango_context : Pango::Context pango_context, parent : Gtk::Widget | Nil parent, parent=(parent : Gtk::Widget) : Nil parent=, pick(x : Float64, y : Float64, flags : Gtk::PickFlags) : Gtk::Widget | Nil pick, preferred_size : Gtk::Requisition preferred_size, prev_sibling : Gtk::Widget | Nil prev_sibling, primary_clipboard : Gdk::Clipboard primary_clipboard, query_tooltip_signal query_tooltip_signal, queue_allocate : Nil queue_allocate, queue_draw : Nil queue_draw, queue_resize : Nil queue_resize, realize : Nil realize, realize_signal realize_signal, realized : Bool realized, receives_default : Bool receives_default, receives_default=(receives_default : Bool) : Nil receives_default=, receives_default? : Bool receives_default?, remove_controller(controller : Gtk::EventController) : Nil remove_controller, remove_css_class(css_class : String) : Nil remove_css_class, remove_mnemonic_label(label : Gtk::Widget) : Nil remove_mnemonic_label, remove_tick_callback(id : UInt32) : Nil remove_tick_callback, request_mode : Gtk::SizeRequestMode request_mode, root : Gtk::Root | Nil root, scale_factor : Int32 scale_factor, sensitive : Bool sensitive, sensitive=(sensitive : Bool) : Nil sensitive=, sensitive? : Bool sensitive?, set_size_request(width : Int32, height : Int32) : Nil set_size_request, set_state_flags(flags : Gtk::StateFlags, clear : Bool) : Nil set_state_flags, settings : Gtk::Settings settings, should_layout : Bool should_layout, show : Nil show, show_signal show_signal, size(orientation : Gtk::Orientation) : Int32 size, size_allocate(allocation : Gdk::Rectangle, baseline : Int32) : Nil size_allocate, size_request : Nil size_request, snapshot_child(child : Gtk::Widget, snapshot : Gtk::Snapshot) : Nil snapshot_child, state_flags : Gtk::StateFlags state_flags, state_flags_changed_signal state_flags_changed_signal, style_context : Gtk::StyleContext style_context, tooltip_markup : String | Nil tooltip_markup, tooltip_markup=(value : String) : String
tooltip_markup=(value : Nil) : Nil
tooltip_markup=(markup : String | Nil) : Nil tooltip_markup=, tooltip_markup? : String | Nil tooltip_markup?, tooltip_text : String | Nil tooltip_text, tooltip_text=(value : String) : String
tooltip_text=(value : Nil) : Nil
tooltip_text=(text : String | Nil) : Nil tooltip_text=, tooltip_text? : String | Nil tooltip_text?, translate_coordinates(dest_widget : Gtk::Widget, src_x : Float64, src_y : Float64) : Bool translate_coordinates, trigger_tooltip_query : Nil trigger_tooltip_query, unmap : Nil unmap, unmap_signal unmap_signal, unparent : Nil unparent, unrealize : Nil unrealize, unrealize_signal unrealize_signal, unset_state_flags(flags : Gtk::StateFlags) : Nil unset_state_flags, valign : Gtk::Align valign, valign=(align : Gtk::Align) : Nil valign=, vexpand : Bool vexpand, vexpand=(expand : Bool) : Nil vexpand=, vexpand? : Bool vexpand?, vexpand_set : Bool vexpand_set, vexpand_set=(set : Bool) : Nil vexpand_set=, vexpand_set? : Bool vexpand_set?, visible : Bool visible, visible=(visible : Bool) : Nil visible=, visible? : Bool visible?, width : Int32 width, width_request : Int32 width_request, width_request=(value : Int32) : Int32 width_request=
Constructor methods inherited from class Gtk::Widget
newnew(*, accessible_role : Gtk::AccessibleRole | Nil = nil, can_focus : Bool | Nil = nil, can_target : Bool | Nil = nil, css_classes : Enumerable(String) | Nil = nil, css_name : String | Nil = nil, cursor : Gdk::Cursor | Nil = nil, focus_on_click : Bool | Nil = nil, focusable : Bool | Nil = nil, halign : Gtk::Align | Nil = nil, has_default : Bool | Nil = nil, has_focus : Bool | Nil = nil, has_tooltip : Bool | Nil = nil, height_request : Int32 | Nil = nil, hexpand : Bool | Nil = nil, hexpand_set : Bool | Nil = nil, layout_manager : Gtk::LayoutManager | Nil = nil, limit_events : Bool | Nil = nil, margin_bottom : Int32 | Nil = nil, margin_end : Int32 | Nil = nil, margin_start : Int32 | Nil = nil, margin_top : Int32 | Nil = nil, name : String | Nil = nil, opacity : Float64 | Nil = nil, overflow : Gtk::Overflow | Nil = nil, parent : Gtk::Widget | Nil = nil, receives_default : Bool | Nil = nil, root : Gtk::Root | Nil = nil, scale_factor : Int32 | Nil = nil, sensitive : Bool | Nil = nil, tooltip_markup : String | Nil = nil, tooltip_text : String | Nil = nil, valign : Gtk::Align | Nil = nil, vexpand : Bool | Nil = nil, vexpand_set : Bool | Nil = nil, visible : Bool | Nil = nil, width_request : Int32 | Nil = nil) new
Class methods inherited from class Gtk::Widget
default_direction : Gtk::TextDirection
default_direction,
default_direction=(dir : Gtk::TextDirection) : Nil
default_direction=,
g_type : UInt64
g_type
Instance methods inherited from module Gtk::ConstraintTarget
to_unsafe
to_unsafe
Constructor methods inherited from module Gtk::ConstraintTarget
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gtk::ConstraintTarget
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from module Gtk::Buildable
buildable_id : String | Nil
buildable_id,
to_unsafe
to_unsafe
Constructor methods inherited from module Gtk::Buildable
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gtk::Buildable
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from module Gtk::Accessible
accessible_parent : Gtk::Accessible | Nil
accessible_parent,
accessible_role : Gtk::AccessibleRole
accessible_role,
accessible_role=(value : Gtk::AccessibleRole) : Gtk::AccessibleRole
accessible_role=,
announce(message : String, priority : Gtk::AccessibleAnnouncementPriority) : Nil
announce,
at_context : Gtk::ATContext
at_context,
bounds(x : Int32, y : Int32, width : Int32, height : Int32) : Bool
bounds,
first_accessible_child : Gtk::Accessible | Nil
first_accessible_child,
next_accessible_sibling : Gtk::Accessible | Nil
next_accessible_sibling,
platform_state(state : Gtk::AccessiblePlatformState) : Bool
platform_state,
reset_property(property : Gtk::AccessibleProperty) : Nil
reset_property,
reset_relation(relation : Gtk::AccessibleRelation) : Nil
reset_relation,
reset_state(state : Gtk::AccessibleState) : Nil
reset_state,
set_accessible_parent(parent : Gtk::Accessible | Nil, next_sibling : Gtk::Accessible | Nil) : Nil
set_accessible_parent,
to_unsafe
to_unsafe,
update_next_accessible_sibling(new_sibling : Gtk::Accessible | Nil) : Nil
update_next_accessible_sibling,
update_platform_state(state : Gtk::AccessiblePlatformState) : Nil
update_platform_state,
update_property(properties : Enumerable(Gtk::AccessibleProperty), values : Enumerable(_)) : Nil
update_property,
update_relation(relations : Enumerable(Gtk::AccessibleRelation), values : Enumerable(_)) : Nil
update_relation,
update_state(states : Enumerable(Gtk::AccessibleState), values : Enumerable(_)) : Nil
update_state
Constructor methods inherited from module Gtk::Accessible
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gtk::Accessible
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from class GObject::InitiallyUnowned
==(other : self)
==,
hash(hasher)
hash
Constructor methods inherited from class GObject::InitiallyUnowned
new
new
Class methods inherited from class GObject::InitiallyUnowned
g_type : UInt64
g_type
Instance methods inherited from class GObject::Object
==(other : self)
==,
bind_property(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags) : GObject::Binding
bind_property,
bind_property_full(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags, transform_to : GObject::Closure, transform_from : GObject::Closure) : GObject::Binding
bind_property_full,
data(key : String) : Pointer(Void) | Nil
data,
finalize
finalize,
freeze_notify : Nil
freeze_notify,
getv(names : Enumerable(String), values : Enumerable(_)) : Nil
getv,
hash(hasher)
hash,
notify(property_name : String) : Nil
notify,
notify_by_pspec(pspec : GObject::ParamSpec) : Nil
notify_by_pspec,
notify_signal
notify_signal,
property(property_name : String, value : _) : Nil
property,
qdata(quark : UInt32) : Pointer(Void) | Nil
qdata,
ref_count : UInt32
ref_count,
run_dispose : Nil
run_dispose,
set_data(key : String, data : Pointer(Void) | Nil) : Nil
set_data,
set_property(property_name : String, value : _) : Nil
set_property,
steal_data(key : String) : Pointer(Void) | Nil
steal_data,
steal_qdata(quark : UInt32) : Pointer(Void) | Nil
steal_qdata,
thaw_notify : Nil
thaw_notify,
to_unsafe : Pointer(Void)
to_unsafe,
watch_closure(closure : GObject::Closure) : Nil
watch_closure
Constructor methods inherited from class GObject::Object
cast(obj : GObject::Object) : self
cast,
new(pointer : Pointer(Void), transfer : GICrystal::Transfer)new new, newv(object_type : UInt64, parameters : Enumerable(GObject::Parameter)) : self newv
Class methods inherited from class GObject::Object
cast?(obj : GObject::Object) : self | Nil
cast?,
compat_control(what : UInt64, data : Pointer(Void) | Nil) : UInt64
compat_control,
g_type : UInt64
g_type,
interface_find_property(g_iface : GObject::TypeInterface, property_name : String) : GObject::ParamSpec
interface_find_property,
interface_list_properties(g_iface : GObject::TypeInterface) : Enumerable(GObject::ParamSpec)
interface_list_properties
Macros inherited from class GObject::Object
previous_vfunc(*args)
previous_vfunc,
previous_vfunc!(*args)
previous_vfunc!,
signal(signature)
signal
Constructor Detail
Class Method Detail
Instance Method Detail
Returns true
if this reference is the same as other. Invokes same?
.
Adds child to self with parent as the parent.
This function can be used to automatically position new pages, and to select
the correct page when this page is closed while being selected (see
TabView::close_page
).
If parent is NULL
, this function is equivalent to TabView::append
.
Adds shortcuts for self.
See TabView::shortcuts
for details.
Requests to close page.
Calling this function will result in the [signal@TabView::close-page] signal
being emitted for page. Closing the page can then be confirmed or
denied via TabView::close_page_finish
.
If the page is waiting for a TabView::close_page_finish
call, this
function will do nothing.
The default handler for [signal@TabView::close-page] will immediately confirm closing the page if it's non-pinned, or reject it if it's pinned. This behavior can be changed by registering your own handler for that signal.
If page was selected, another page will be selected instead:
If the TabPage::parent
value is NULL
, the next page will be
selected when possible, or if the page was already last, the previous page
will be selected instead.
If it's not NULL
, the previous page will be selected if it's a descendant
(possibly indirect) of the parent. If both the previous page and the parent
are pinned, the parent will be selected instead.
Completes a TabView::close_page
call for page.
If confirm is TRUE
, page will be closed. If it's FALSE
, it will be
reverted to its previous state and TabView::close_page
can be called
for it again.
This function should not be called unless a custom handler for [signal@TabView::close-page] is used.
Sets the default page icon for self.
If a page doesn't provide its own icon via TabPage::icon
, a default
icon may be used instead for contexts where having an icon is necessary.
#TabBar
will use default icon for pinned tabs in case the page is not
loading, doesn't have an icon and an indicator. Default icon is never used
for tabs that aren't pinned.
#TabOverview
will use default icon for pages with missing thumbnails.
By default, the adw-tab-icon-missing-symbolic
icon is used.
Inserts a non-pinned page at position.
It's an error to try to insert a page before a pinned page, in that case
TabView::insert_pinned
should be used instead.
Inserts a pinned page at position.
It's an error to try to insert a pinned page after a non-pinned page, in
that case TabView::insert
should be used instead.
Invalidates thumbnails for all pages in self.
This is a convenience method, equivalent to calling
TabPage::invalidate_thumbnail
on each page.
Whether a page is being transferred.
The corresponding property will be set to TRUE
when a drag-n-drop tab
transfer starts on any Adw::TabView
, and to FALSE
after it ends.
During the transfer, children cannot receive pointer input and a tab can be safely dropped on the tab view.
Gets the #TabPage
representing the child at position.
Finds the position of page in self, starting from 0.
Returns a Gio::ListModel
that contains the pages of self.
This can be used to keep an up-to-date view. The model also implements
Gtk::SelectionModel
and can be used to track and change the selected
page.
Removes shortcuts from self.
See TabView::shortcuts
for details.
Reorders page to before its previous page if possible.
Reorders page to position.
It's a programmer error to try to reorder a pinned page after a non-pinned one, or a non-pinned page before a pinned one.
Selects the page after the currently selected page.
If the last page was already selected, this function does nothing.
Selects the page before the currently selected page.
If the first page was already selected, this function does nothing.
Pins or unpins page.
Pinned pages are guaranteed to be placed before all non-pinned pages; at any given moment the first [property@TabView:n-pinned-pages] pages in self are guaranteed to be pinned.
When a page is pinned or unpinned, it's automatically reordered: pinning a page moves it after other pinned pages; unpinning a page moves it before other non-pinned pages.
Pinned pages can still be reordered between each other.
#TabBar
will display pinned pages in a compact form, never showing the
title or close button, and only showing a single icon, selected in the
following order:
- [property@TabPage:indicator-icon]
- A spinner if
TabPage::loading
isTRUE
TabPage::icon
- [property@TabView:default-icon]
#TabOverview
will not show a thumbnail for pinned pages, and replace
the close button with an unpin button. Unlike Adw::TabBar
, it will still
display the page's title, icon and indicator separately.
Pinned pages cannot be closed by default, see [signal@TabView::close-page] for how to override that behavior.
Changes the value of the TabPage::pinned
property.
Sets the enabled shortcuts for self.
See #TabViewShortcuts
for the list of the available shortcuts. All of
the shortcuts are enabled by default.
TabView::add_shortcuts
and TabView::remove_shortcuts
provide
a convenient way to manage individual shortcuts.
Transfers page from self to other_view.
The page object will be reused.
It's a programmer error to try to insert a pinned page after a non-pinned one, or a non-pinned page before a pinned one.