NetSurf
From NetSurf Development Wiki
Jump to: navigation, search

Documentation/GTK Interface

This page describes the GTK interface, which lives in the gtk directory. This interface is used on Linux, BSD, and can be used on other platforms which have a port of GTK.

Windows and Scaffolding

A "scaffolding" is a top-level main window, which contains a toolbar, menu bar, and one or more tabs containing web pages. Each tab corresponds to a gui_window (and each frame if frames are present).

All the UI designs for the main window are in netsurf.glade. wndBrowser is a scaffolding. It contains a VBox containing a MenuBar, Toolbar, Toolbar for search (normally hidden), and Notebook.

The tabContents GtkTable (in tabContentsWindow) is used for each tab. It contains a table with two rows and two columns, which contain (line 1) a Layout, VScrollbar, (line 2) HPaned, and Statusbar (used for resizing only). The HPaned contains the actual status bar (as a Label), and a HScrollbar.

Tab creation is implemented in gui_create_browser_window() in gtk/gtk_window.c. The scrollbars are linked to the layout here.

Frames are implemented as a ScrolledWindow containing a Layout, which is then placed on the parent's Layout. This is also in gui_create_browser_window().

NetSurf Code Documentation
Organization and Conventions
  1. Modular coding style
  2. Directory structure
  3. Error handling
  4. Memory management
Features
  1. Content handling
  2. Layout engine
  3. Frames
  4. Printing
  5. Treeview
Platform-specifics
  1. Front end functions
  2. Caveat RISC OS
  3. GTK interface
References
  1. References
Personal tools