AgsNotebook

AgsNotebook — selection widget

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * prefix Read / Write

Types and Values

Object Hierarchy

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

Implemented Interfaces

AgsNotebook implements AtkImplementorIface, GtkBuildable and GtkOrientable.

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


AGS_IS_NOTEBOOK()

#define AGS_IS_NOTEBOOK(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_NOTEBOOK))

AGS_IS_NOTEBOOK_CLASS()

#define AGS_IS_NOTEBOOK_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_NOTEBOOK))

AGS_NOTEBOOK()

#define AGS_NOTEBOOK(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_NOTEBOOK, AgsNotebook))

AGS_NOTEBOOK_CLASS()

#define AGS_NOTEBOOK_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_NOTEBOOK, AgsNotebookClass))

AGS_NOTEBOOK_GET_CLASS()

#define AGS_NOTEBOOK_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_NOTEBOOK, AgsNotebookClass))

ags_notebook_get_type ()

GType
ags_notebook_get_type (void);

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;
};

AGS_TYPE_NOTEBOOK

#define AGS_TYPE_NOTEBOOK                (ags_notebook_get_type())

struct AgsNotebook

struct AgsNotebook;

struct AgsNotebookClass

struct AgsNotebookClass {
  GtkVBoxClass vbox;
};

Property Details

The “prefix” property

  “prefix”                   char *

The prefix used to do enumerated labels.

Owner: AgsNotebook

Flags: Read / Write

Default value: "tab"

Since: 3.0.0