krähemann.com

AgsNotebook

AgsNotebook — selection widget

Stability Level

Stable, unless otherwise indicated

Properties

gchar * prefix Read / Write

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBox
                    ╰── GtkVBox
                        ╰── AgsNotebook

Includes

#include <ags/widget/ags_notebook.h>

Description

The AgsNotebook lets you select/deselect tabs and assign data to them.

Functions

AGS_NOTEBOOK_TAB()

#define AGS_NOTEBOOK_TAB(x) ((AgsNotebookTab *)(x))

ags_notebook_tab_alloc ()

AgsNotebookTab *
ags_notebook_tab_alloc ();

Allocate AgsNotebookTab.

Returns

the newly allocated AgsNotebookTab.

[type gpointer][transfer full]

Since: 3.0.0


ags_notebook_tab_free ()

void
ags_notebook_tab_free (AgsNotebookTab *tab);

Free tab 's memory.

Parameters

tab

the AgsNotebookTab.

[type gpointer][transfer full]

Since: 3.0.0


ags_notebook_tab_set_data ()

void
ags_notebook_tab_set_data (AgsNotebook *notebook,
                           gint position,
                           gpointer data);

Set the data field of AgsNotebookTab at position .

Parameters

notebook

the AgsNotebook

 

position

the tab's position

 

data

the data to set

 

Since: 3.0.0


ags_notebook_tab_index ()

gint
ags_notebook_tab_index (AgsNotebook *notebook,
                        gpointer data);

Retrieve tab index assigned with data .

Parameters

notebook

the AgsNotebook

 

data

the assigned data

 

Returns

the position as integer

Since: 3.0.0


ags_notebook_next_active_tab ()

gint
ags_notebook_next_active_tab (AgsNotebook *notebook,
                              gint position);

Get next active tab following position .

Parameters

notebook

the AgsNotebook

 

position

the position as integer

 

Returns

the position of next active tab as integer

Since: 3.0.0


ags_notebook_add_tab ()

gint
ags_notebook_add_tab (AgsNotebook *notebook);

Add a new AgsNotebookTab to notebook .

Parameters

notebook

the AgsNotebook

 

Returns

the position as integer

Since: 3.0.0


ags_notebook_add_tab_with_label ()

gint
ags_notebook_add_tab_with_label (AgsNotebook *notebook,
                                 gchar *label);

Add a new AgsNotebookTab to notebook and set specified label .

Parameters

notebook

the AgsNotebook

 

label

the label

 

Returns

the position as integer

Since: 3.0.0


ags_notebook_insert_tab ()

void
ags_notebook_insert_tab (AgsNotebook *notebook,
                         gint position);

Insert a new AgsNotebookTab to notebook .

Parameters

notebook

the AgsNotebook

 

position

the position as integer

 

Since: 3.0.0


ags_notebook_insert_tab_with_label ()

void
ags_notebook_insert_tab_with_label (AgsNotebook *notebook,
                                    gchar *label,
                                    gint position);

Insert a new AgsNotebookTab to notebook at position and set specified label .

Parameters

notebook

the AgsNotebook

 

label

the label as string

 

position

the position as integer

 

Since: 3.0.0


ags_notebook_remove_tab ()

void
ags_notebook_remove_tab (AgsNotebook *notebook,
                         gint position);

Remove AgsNotebookTab at position .

Parameters

notebook

the AgsNotebook

 

position

the position of the tab

 

Since: 3.0.0


ags_notebook_remove_tab_with_data ()

void
ags_notebook_remove_tab_with_data (AgsNotebook *notebook,
                                   gpointer data);

Remove AgsNotebookTab assigned with data .

Parameters

notebook

the AgsNotebook

 

data

the data to lookup

 

Since: 3.0.0


ags_notebook_new ()

AgsNotebook *
ags_notebook_new ();

Create a new AgsNotebook.

Returns

a new AgsNotebook

Since: 3.0.0

Types and Values

AGS_NOTEBOOK_TAB_DEFAULT_WIDTH

#define AGS_NOTEBOOK_TAB_DEFAULT_WIDTH (100)

AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT

#define AGS_NOTEBOOK_TAB_DEFAULT_HEIGHT (32)

AGS_NOTEBOOK_TAB_DEFAULT_PREFIX

#define AGS_NOTEBOOK_TAB_DEFAULT_PREFIX "tab"

enum AgsNotebookFlags

Members

AGS_NOTEBOOK_TAB_PREFIXED_LABEL

   

AGS_NOTEBOOK_TAB_ENUMERATE

   

struct AgsNotebookTab

struct AgsNotebookTab {
  gpointer data;

  GtkToggleButton *toggle;
};

Property Details

The “prefix” property

  “prefix”                   gchar *

The prefix used to do enumerated labels.

Owner: AgsNotebook

Flags: Read / Write

Default value: "tab"

Since: 3.0.0