NetSurf
Functions
tabs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

nserror nsgtk_notebook_create (GtkBuilder *builder, GtkNotebook **notebook_out)
 create notebook More...
 
void nsgtk_tab_add (struct gui_window *window, GtkWidget *tab_contents, bool background, const char *title, GdkPixbuf *icon_pixbuf)
 Add new gui window page to notebook. More...
 
nserror nsgtk_tab_add_page (GtkNotebook *notebook, GtkWidget *tab_contents, bool background, const char *title, GdkPixbuf *icon_pixbuf)
 Add new page to a notebook. More...
 
nserror nsgtk_tab_set_title (GtkWidget *page, const char *title)
 set the tab title More...
 
nserror nsgtk_tab_set_icon (GtkWidget *page, GdkPixbuf *pixbuf)
 set the tab icon More...
 
void nsgtk_tab_options_changed (GtkNotebook *notebook)
 
nserror nsgtk_tab_close_current (GtkNotebook *notebook)
 
nserror nsgtk_tab_prev (GtkNotebook *notebook)
 
nserror nsgtk_tab_next (GtkNotebook *notebook)
 

Function Documentation

◆ nsgtk_notebook_create()

nserror nsgtk_notebook_create ( GtkBuilder *  builder,
GtkNotebook **  notebook_out 
)

create notebook

creates a notebook for use inside a window, creates the special add page(tab) and attaches all signals.

Parameters
builderthe gtk builder object to create notbook from
notebook_outreciveds the created notebook
Returns
NSERROR_OK and notebook_out updated else error code

Definition at line 380 of file tabs.c.

References NSERROR_OK, nsgtk_tab_add_newtab(), nsgtk_tab_options_changed(), nsgtk_tab_page_reordered(), nsgtk_tab_switch_page(), nsgtk_tab_switch_page_after(), and nsgtk_tab_visibility_update().

Referenced by nsgtk_new_scaffolding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_tab_add()

void nsgtk_tab_add ( struct gui_window window,
GtkWidget *  tab_contents,
bool  background,
const char *  title,
GdkPixbuf *  icon_pixbuf 
)

Add new gui window page to notebook.

Definition at line 452 of file tabs.c.

References nsgtk_get_scaffold(), nsgtk_scaffolding_notebook(), nsgtk_tab_add_page(), and gui_window::title.

Referenced by gui_window_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_tab_add_page()

nserror nsgtk_tab_add_page ( GtkNotebook *  notebook,
GtkWidget *  tab_contents,
bool  background,
const char *  title,
GdkPixbuf *  icon_pixbuf 
)

Add new page to a notebook.

Definition at line 418 of file tabs.c.

References NSERROR_OK, nsgtk_tab_label_setup(), and gui_window::title.

Referenced by cutomize_button_clicked_cb(), and nsgtk_tab_add().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_tab_close_current()

nserror nsgtk_tab_close_current ( GtkNotebook *  notebook)

Definition at line 527 of file tabs.c.

References NSERROR_OK, and nsgtk_window_destroy_browser().

Referenced by nsgtk_on_closetab_activate_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_tab_next()

nserror nsgtk_tab_next ( GtkNotebook *  notebook)

Definition at line 568 of file tabs.c.

References NSERROR_OK.

Referenced by nsgtk_on_nexttab_activate_menu().

Here is the caller graph for this function:

◆ nsgtk_tab_options_changed()

void nsgtk_tab_options_changed ( GtkNotebook *  notebook)

Definition at line 372 of file tabs.c.

References nsgtk_tab_orientation(), and nsgtk_tab_visibility_update().

Referenced by nsgtk_notebook_create(), and nsgtk_window_update_all().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsgtk_tab_prev()

nserror nsgtk_tab_prev ( GtkNotebook *  notebook)

Definition at line 560 of file tabs.c.

References NSERROR_OK.

Referenced by nsgtk_on_prevtab_activate_menu().

Here is the caller graph for this function:

◆ nsgtk_tab_set_icon()

nserror nsgtk_tab_set_icon ( GtkWidget *  page,
GdkPixbuf *  pixbuf 
)

set the tab icon

The tab icon will be set to the pixbuf parameter

Parameters
pageThe page widget that was added to the notebook
pixbufThe pixbuf to set the icon to.
Returns
NSERROR_OK on sucess else appropriate code.

Definition at line 470 of file tabs.c.

References gui_window::favicon, NSERROR_BAD_PARAMETER, NSERROR_INVALID, and NSERROR_OK.

Referenced by gui_window_set_icon(), next_throbber_frame(), and throbber().

Here is the caller graph for this function:

◆ nsgtk_tab_set_title()

nserror nsgtk_tab_set_title ( GtkWidget *  page,
const char *  title 
)

set the tab title

The tab title will be set to the parameter

Note
currently only called from nsgtk_window_set_title()
Parameters
pageThe page widget that was added to the notebook
titleThe title text which may not be NULL.
Returns
NSERROR_OK on sucess else appropriate code.

Definition at line 498 of file tabs.c.

References NSERROR_BAD_PARAMETER, NSERROR_INVALID, NSERROR_OK, and gui_window::title.

Referenced by gui_window_set_title().

Here is the caller graph for this function: