Tepl.ApplicationWindow

g GObject.GInterface GObject.GInterface Tepl.TabGroup Tepl.TabGroup GObject.GInterface->Tepl.TabGroup GObject.Object GObject.Object Tepl.ApplicationWindow Tepl.ApplicationWindow GObject.Object->Tepl.ApplicationWindow Tepl.TabGroup->Tepl.ApplicationWindow

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Tepl.TabGroup (8)

Structs:

GObject.ObjectClass (5)

class

get_from_gtk_application_window (gtk_window)

class

is_main_window (gtk_window)

get_application_window ()

get_handle_title ()

get_window_group ()

open_file (location, jump_to)

set_handle_title (handle_title)

set_tab_group (tab_group)

Virtual Methods

Inherited:

GObject.Object (7), Tepl.TabGroup (4)

Properties

Inherited:

Tepl.TabGroup (3)

Name

Type

Flags

Short Description

application-window

Gtk.ApplicationWindow

r/w/co

handle-title

bool

r/w/c

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Tepl.ApplicationWindow(**kwargs)
Bases:

GObject.Object, Tepl.TabGroup

Abstract:

No

Structure:

Tepl.ApplicationWindowClass

classmethod get_from_gtk_application_window(gtk_window)
Parameters:

gtk_window (Gtk.ApplicationWindow) – a Gtk.ApplicationWindow.

Returns:

the Tepl.ApplicationWindow of gtk_window.

Return type:

Tepl.ApplicationWindow

Returns the Tepl.ApplicationWindow of gtk_window. The returned object is guaranteed to be the same for the lifetime of gtk_window.

New in version 2.0.

classmethod is_main_window(gtk_window)
Parameters:

gtk_window (Gtk.ApplicationWindow) – a Gtk.ApplicationWindow.

Returns:

whether gtk_window is considered a main application window.

Return type:

bool

Returns True iff gtk_window has an associated Tepl.TabGroup (i.e. if Tepl.ApplicationWindow.set_tab_group() has been called).

This function takes a Gtk.ApplicationWindow parameter to avoid creating the Tepl.ApplicationWindow object if it hasn’t been created.

New in version 4.0.

get_application_window()
Returns:

the Gtk.ApplicationWindow of self.

Return type:

Gtk.ApplicationWindow

New in version 2.0.

get_handle_title()
Returns:

the value of the Tepl.ApplicationWindow :handle-title property.

Return type:

bool

New in version 4.0.

get_window_group()
Returns:

the Gtk.WindowGroup.

Return type:

Gtk.WindowGroup

Gets the Gtk.WindowGroup in which self resides.

You should call this function only on main windows, to add secondary windows to the Gtk.WindowGroup.

New in version 4.0.

open_file(location, jump_to)
Parameters:
  • location (Gio.File) – a Gio.File.

  • jump_to (bool) – whether to set the tab where the file is loaded as the active tab.

Opens a file in self. If the active tab is untouched (see Tepl.Buffer.is_untouched()), then the file is loaded in that tab. Otherwise a new tab is created.

This function is asynchronous, the file loading is done with the Tepl.Tab.load_file() function. There is no way to know when the file loading is finished.

New in version 4.0.

set_handle_title(handle_title)
Parameters:

handle_title (bool) – the new value.

Sets the Tepl.ApplicationWindow :handle-title property.

New in version 4.0.

set_tab_group(tab_group)
Parameters:

tab_group (Tepl.TabGroup) – a Tepl.TabGroup.

Sets the Tepl.TabGroup of self. This function can be called only once, it is not possible to change the Tepl.TabGroup afterwards (this restriction may be lifted in the future if there is a compelling use-case).

Tepl.ApplicationWindow implements the Tepl.TabGroup interface by delegating the requests to tab_group.

New in version 3.0.

Property Details

Tepl.ApplicationWindow.props.application_window
Name:

application-window

Type:

Gtk.ApplicationWindow

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The Gtk.ApplicationWindow.

New in version 2.0.

Tepl.ApplicationWindow.props.handle_title
Name:

handle-title

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to handle the Gtk.Window :title. The title is probably not appropriate if a Gtk.HeaderBar is used, the title is meant to be used only for applications with a traditional UI.

If True, the title will contain:

If the active view is None, the title contains only the application name.

New in version 4.0.