AmtkApplicationWindow

AmtkApplicationWindow — An extension of GtkApplicationWindow

Properties

GtkApplicationWindow * application-window Read / Write / Construct Only
GtkStatusbar * statusbar Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── AmtkApplicationWindow

Includes

#include <amtk/amtk.h>

Description

AmtkApplicationWindow extends the GtkApplicationWindow class with a “statusbar” property and functions to show longer descriptions of GtkMenuItem's to the GtkStatusbar.

Note that AmtkApplicationWindow extends the GtkApplicationWindow class but without subclassing it, because several libraries might want to extend GtkApplicationWindow and an application needs to be able to use all those extensions at the same time.

Functions

amtk_application_window_get_from_gtk_application_window ()

AmtkApplicationWindow *
amtk_application_window_get_from_gtk_application_window
                               (GtkApplicationWindow *gtk_window);

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

Parameters

gtk_window

a GtkApplicationWindow.

 

Returns

the AmtkApplicationWindow of gtk_window .

[transfer none]

Since: 2.0


amtk_application_window_get_application_window ()

GtkApplicationWindow *
amtk_application_window_get_application_window
                               (AmtkApplicationWindow *amtk_window);

Parameters

amtk_window

an AmtkApplicationWindow.

 

Returns

the GtkApplicationWindow of amtk_window .

[transfer none]

Since: 2.0


amtk_application_window_get_statusbar ()

GtkStatusbar *
amtk_application_window_get_statusbar (AmtkApplicationWindow *amtk_window);

Parameters

amtk_window

an AmtkApplicationWindow.

 

Returns

the “statusbar”.

[transfer none][nullable]

Since: 2.0


amtk_application_window_set_statusbar ()

void
amtk_application_window_set_statusbar (AmtkApplicationWindow *amtk_window,
                                       GtkStatusbar *statusbar);

Sets the “statusbar” property.

Parameters

amtk_window

an AmtkApplicationWindow.

 

statusbar

a GtkStatusbar, or NULL.

[nullable]

Since: 2.0


amtk_application_window_connect_menu_to_statusbar ()

void
amtk_application_window_connect_menu_to_statusbar
                               (AmtkApplicationWindow *amtk_window,
                                AmtkMenuShell *amtk_menu_shell);

Connect to the “menu-item-selected” and “menu-item-deselected” signals of amtk_menu_shell to push/pop the long description of GtkMenuItem's to the “statusbar”.

The long description is retrieved with amtk_menu_item_get_long_description(). So amtk_menu_item_set_long_description() must have been called, which is the case if the GtkMenuItem has been created with AmtkFactory.

Parameters

amtk_window

an AmtkApplicationWindow.

 

amtk_menu_shell

an AmtkMenuShell.

 

Since: 2.0


amtk_application_window_connect_recent_chooser_menu_to_statusbar ()

void
amtk_application_window_connect_recent_chooser_menu_to_statusbar
                               (AmtkApplicationWindow *amtk_window,
                                GtkRecentChooserMenu *menu);

An alternative to gtk_recent_chooser_set_show_tips(). Shows the full path in the “statusbar” when a GtkMenuItem of menu is selected.

The full path is retrieved with amtk_utils_recent_chooser_menu_get_item_uri().

Parameters

amtk_window

an AmtkApplicationWindow.

 

menu

a GtkRecentChooserMenu.

 

Since: 2.0


amtk_application_window_create_open_recent_menu ()

GtkWidget *
amtk_application_window_create_open_recent_menu
                               (AmtkApplicationWindow *amtk_window);

Creates a simple and generic GtkRecentChooserMenu.

The GtkRecentChooser is configured to show files only recently used with the current application, as returned by g_get_application_name(). If recent files are added to the default GtkRecentManager with gtk_recent_manager_add_item(), the files will normally show up in the GtkRecentChooserMenu.

The GtkRecentChooserMenu is connected to the statusbar with amtk_application_window_connect_recent_chooser_menu_to_statusbar().

When the “item-activated” signal is emitted, g_application_open() is called (with an empty hint), so the GApplication must have the G_APPLICATION_HANDLES_OPEN flag set.

Parameters

amtk_window

an AmtkApplicationWindow.

 

Returns

a new GtkRecentChooserMenu.

[transfer floating]

Since: 3.0


amtk_application_window_create_open_recent_menu_item ()

GtkWidget *
amtk_application_window_create_open_recent_menu_item
                               (AmtkApplicationWindow *amtk_window);

Creates a GtkMenuItem with a simple and generic GtkRecentChooserMenu as submenu. The GtkRecentChooserMenu is created with amtk_application_window_create_open_recent_menu().

Parameters

amtk_window

an AmtkApplicationWindow.

 

Returns

a new GtkMenuItem.

[transfer floating]

Since: 2.0

Types and Values

AmtkApplicationWindow

typedef struct _AmtkApplicationWindow AmtkApplicationWindow;

Property Details

The “application-window” property

  “application-window”       GtkApplicationWindow *

The GtkApplicationWindow.

Flags: Read / Write / Construct Only

Since: 2.0


The “statusbar” property

  “statusbar”                GtkStatusbar *

The GtkStatusbar. NULL by default.

Flags: Read / Write

Since: 2.0