struct Adw::TabView::ClosePageSignal
- Adw::TabView::ClosePageSignal
- GObject::Signal
- Struct
- Value
- Object
Overview
Emitted after TabView::close_page
has been called for @page.
The handler is expected to call TabView::close_page_finish
to
confirm or reject the closing.
The default handler will immediately confirm closing for non-pinned pages, or reject it for pinned pages, equivalent to the following example:
WARNING ⚠️ The following code is in c ⚠️
static gboolean
close_page_cb (Adw::TabView *view,
Adw::TabPage *page,
gpointer user_data)
{
adw_tab_view_close_page_finish (view, page, !adw_tab_page_get_pinned (page));
return GDK_EVENT_STOP;
}
The TabView::close_page_finish
call doesn't have to happen inside
the handler, so can be used to do asynchronous checks before confirming the
closing.
A typical reason to connect to this signal is to show a confirmation dialog for closing a tab.
Defined in:
lib/gi-crystal/src/auto/adw-1/tab_view.crInstance Method Summary
- #connect(*, after : Bool = false, &block : Proc(Adw::TabPage, Bool)) : GObject::SignalConnection
- #connect(handler : Proc(Adw::TabPage, Bool), *, after : Bool = false) : GObject::SignalConnection
- #connect(handler : Proc(Adw::TabView, Adw::TabPage, Bool), *, after : Bool = false) : GObject::SignalConnection
- #emit(page : Adw::TabPage) : Nil
-
#name : String
The signal name
Instance methods inherited from struct GObject::Signal
[](detail : String) : self
[],
name : String
name
Constructor methods inherited from struct GObject::Signal
new(source : GObject::Object, detail : String? = nil)
new
Instance Method Detail
def connect(*, after : Bool = false, &block : Proc(Adw::TabPage, Bool)) : GObject::SignalConnection
#
def connect(handler : Proc(Adw::TabPage, Bool), *, after : Bool = false) : GObject::SignalConnection
#
def connect(handler : Proc(Adw::TabView, Adw::TabPage, Bool), *, after : Bool = false) : GObject::SignalConnection
#