Namespace

Gtk – 3.0

The GTK toolkit

Version3.24
AuthorsGTK Development Team
LicenseLGPL-2.1-or-later
Websitehttps://www.gtk.org
Sourcehttps://gitlab.gnome.org/GNOME/gtk/

Build

C headersgtk/gtk-a11y.h, gtk/gtk.h, gtk/gtkx.h
pkg-config filesgtk+-3.0

Dependencies

GObject—2.0 The base type system library
Browse documentation
Atk—1.0 The Accessibility toolkit
Browse documentation
Pango—1.0 Text shaping and rendering
Browse documentation
Gdk—3.0 The GTK windowing system backend
Browse documentation

Classes

AboutDialog

The GtkAboutDialog offers a simple way to display information about a program like its logo, name, copyright, website and license. It is also possible to give credits to the authors, documenters, translators and artists who have worked on the program. An about dialog is typically opened when the user selects the About option from the Help menu. All parts of the dialog are optional.

AccelGroup

A GtkAccelGroup represents a group of keyboard accelerators, typically attached to a toplevel GtkWindow (with gtk_window_add_accel_group()). Usually you won’t need to create a GtkAccelGroup directly; instead, when using GtkUIManager, GTK+ automatically sets up the accelerators for your menus in the ui manager’s GtkAccelGroup.

AccelLabel

The GtkAccelLabel widget is a subclass of GtkLabel that also displays an accelerator key on the right of the label text, e.g. “Ctrl+S”. It is commonly used in menus to show the keyboard short-cuts for commands.

AccelMap

Accelerator maps are used to define runtime configurable accelerators. Functions for manipulating them are are usually used by higher level convenience mechanisms like GtkUIManager and are thus considered “low-level”. You’ll want to use them if you’re manually creating menus that should have user-configurable accelerators.

Accessible

The GtkAccessible class is the base class for accessible implementations for GtkWidget subclasses. It is a thin wrapper around AtkObject, which adds facilities for associating a widget with its accessible object.

Action

In GTK+ 3.10, GtkAction has been deprecated. Use GAction instead, and associate actions with GtkActionable widgets. Use GMenuModel for creating menus with gtk_menu_new_from_model().

ActionBar

GtkActionBar is designed to present contextual actions. It is expected to be displayed below the content and expand horizontally to fill the area.

ActionGroup

Actions are organised into groups. An action group is essentially a map from names to GtkAction objects.

Adjustment

The GtkAdjustment object represents a value which has an associated lower and upper bound, together with step and page increments, and a page size. It is used within several GTK+ widgets, including GtkSpinButton, GtkViewport, and GtkRange (which is a base class for GtkScrollbar and GtkScale).

Alignment

The GtkAlignment widget controls the alignment and size of its child widget. It has four settings: xscale, yscale, xalign, and yalign.

AppChooserButton

The GtkAppChooserButton is a widget that lets the user select an application. It implements the GtkAppChooser interface.

AppChooserDialog

GtkAppChooserDialog shows a GtkAppChooserWidget inside a GtkDialog.

AppChooserWidget

GtkAppChooserWidget is a widget for selecting applications. It is the main building block for GtkAppChooserDialog. Most applications only need to use the latter; but you can use this widget as part of a larger widget if you have special needs.

Application

GtkApplication is a class that handles many important aspects of a GTK+ application in a convenient fashion, without enforcing a one-size-fits-all application model.

ApplicationWindow

GtkApplicationWindow is a GtkWindow subclass that offers some extra functionality for better integration with GtkApplication features. Notably, it can handle both the application menu as well as the menubar. See gtk_application_set_app_menu() and gtk_application_set_menubar().

Arrow

GtkArrow should be used to draw simple arrows that need to point in one of the four cardinal directions (up, down, left, or right). The style of the arrow can be one of shadow in, shadow out, etched in, or etched out. Note that these directions and style types may be amended in versions of GTK+ to come.

ArrowAccessible

AspectFrame

The GtkAspectFrame is useful when you want pack a widget so that it can resize but always retains the same aspect ratio. For instance, one might be drawing a small preview of a larger image. GtkAspectFrame derives from GtkFrame, so it can draw a label and a frame around the child. The frame will be “shrink-wrapped” to the size of the child.

Assistant

A GtkAssistant is a widget used to represent a generally complex operation splitted in several steps, guiding the user through its pages and controlling the page flow to collect the necessary data.

Bin

The GtkBin widget is a container with just one child. It is not very useful itself, but it is useful for deriving subclasses, since it provides common code needed for handling a single child widget.

BooleanCellAccessible

Box

The GtkBox widget arranges child widgets into a single row or column, depending upon the value of its GtkOrientable:orientation property. Within the other dimension, all children are allocated the same size. Of course, the GtkWidget:halign and GtkWidget:valign properties can be used on the children to influence their allocation.

Builder

A GtkBuilder is an auxiliary object that reads textual descriptions of a user interface and instantiates the described objects. To create a GtkBuilder from a user interface description, call gtk_builder_new_from_file(), gtk_builder_new_from_resource() or gtk_builder_new_from_string().

Button

The GtkButton widget is generally used to trigger a callback function that is called when the button is pressed. The various signals and how to use them are outlined below.

ButtonAccessible

ButtonBox

Calendar

GtkCalendar is a widget that displays a Gregorian calendar, one month at a time. It can be created with gtk_calendar_new().

CellAccessible

CellArea

The GtkCellArea is an abstract class for GtkCellLayout widgets (also referred to as “layouting widgets”) to interface with an arbitrary number of GtkCellRenderers and interact with the user for a given GtkTreeModel row.

CellAreaBox

The GtkCellAreaBox renders cell renderers into a row or a column depending on its GtkOrientation.

CellAreaContext

The GtkCellAreaContext object is created by a given GtkCellArea implementation via its GtkCellAreaClass.create_context() virtual method and is used to store cell sizes and alignments for a series of GtkTreeModel rows that are requested and rendered in the same context.

CellRenderer

The GtkCellRenderer is a base class of a set of objects used for rendering a cell to a #cairo_t. These objects are used primarily by the GtkTreeView widget, though they aren’t tied to them in any specific way. It is worth noting that GtkCellRenderer is not a GtkWidget and cannot be treated as such.

CellRendererAccel

GtkCellRendererAccel displays a keyboard accelerator (i.e. a key combination like Control + a). If the cell renderer is editable, the accelerator can be changed by simply typing the new combination.

CellRendererCombo

GtkCellRendererCombo renders text in a cell like GtkCellRendererText from which it is derived. But while GtkCellRendererText offers a simple entry to edit the text, GtkCellRendererCombo offers a GtkComboBox widget to edit the text. The values to display in the combo box are taken from the tree model specified in the GtkCellRendererCombo:model property.

CellRendererPixbuf

A GtkCellRendererPixbuf can be used to render an image in a cell. It allows to render either a given GdkPixbuf (set via the GtkCellRendererPixbuf:pixbuf property) or a named icon (set via the GtkCellRendererPixbuf:icon-name property).

CellRendererProgress

GtkCellRendererProgress renders a numeric value as a progress par in a cell. Additionally, it can display a text on top of the progress bar.

CellRendererSpin

GtkCellRendererSpin renders text in a cell like GtkCellRendererText from which it is derived. But while GtkCellRendererText offers a simple entry to edit the text, GtkCellRendererSpin offers a GtkSpinButton widget. Of course, that means that the text has to be parseable as a floating point number.

CellRendererSpinner

GtkCellRendererSpinner renders a spinning animation in a cell, very similar to GtkSpinner. It can often be used as an alternative to a GtkCellRendererProgress for displaying indefinite activity, instead of actual progress.

CellRendererText

A GtkCellRendererText renders a given text in its cell, using the font, color and style information provided by its properties. The text will be ellipsized if it is too long and the GtkCellRendererText:ellipsize property allows it.

CellRendererToggle

GtkCellRendererToggle renders a toggle button in a cell. The button is drawn as a radio or a checkbutton, depending on the GtkCellRendererToggle:radio property. When activated, it emits the GtkCellRendererToggle::toggled signal.

CellView

A GtkCellView displays a single row of a GtkTreeModel using a GtkCellArea and GtkCellAreaContext. A GtkCellAreaContext can be provided to the GtkCellView at construction time in order to keep the cellview in context of a group of cell views, this ensures that the renderers displayed will be properly aligned with eachother (like the aligned cells in the menus of GtkComboBox).

CheckButton

A GtkCheckButton places a discrete GtkToggleButton next to a widget, (usually a GtkLabel). See the section on GtkToggleButton widgets for more information about toggle/check buttons.

CheckMenuItem

A GtkCheckMenuItem is a menu item that maintains the state of a boolean value in addition to a GtkMenuItem usual role in activating application code.

CheckMenuItemAccessible

Clipboard

The GtkClipboard object represents a clipboard of data shared between different processes or between different widgets in the same process. Each clipboard is identified by a name encoded as a GdkAtom. (Conversion to and from strings can be done with gdk_atom_intern() and gdk_atom_name().) The default clipboard corresponds to the “CLIPBOARD” atom; another commonly used clipboard is the “PRIMARY” clipboard, which, in X, traditionally contains the currently selected text.

ColorButton

The GtkColorButton is a button which displays the currently selected color and allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog.

ColorChooserDialog

The GtkColorChooserDialog widget is a dialog for choosing a color. It implements the GtkColorChooser interface.

since: 3.4

ColorChooserWidget

The GtkColorChooserWidget widget lets the user select a color. By default, the chooser presents a predefined palette of colors, plus a small number of settable custom colors. It is also possible to select a different color with the single-color editor. To enter the single-color editing mode, use the context menu of any color of the palette, or use the ‘+’ button to add a new custom color.

since: 3.4

ColorSelection

ColorSelectionDialog

ComboBox

A GtkComboBox is a widget that allows the user to choose from a list of valid choices. The GtkComboBox displays the selected choice. When activated, the GtkComboBox displays a popup which allows the user to make a new choice. The style in which the selected value is displayed, and the style of the popup is determined by the current theme. It may be similar to a Windows-style combo box.

ComboBoxAccessible

ComboBoxText

A GtkComboBoxText is a simple variant of GtkComboBox that hides the model-view complexity for simple text-only use cases.

Container

A GTK+ user interface is constructed by nesting widgets inside widgets. Container widgets are the inner nodes in the resulting tree of widgets: they contain other widgets. So, for example, you might have a GtkWindow containing a GtkFrame containing a GtkLabel. If you wanted an image instead of a textual label inside the frame, you might replace the GtkLabel widget with a GtkImage widget.

ContainerAccessible

ContainerCellAccessible

CssProvider

GtkCssProvider is an object implementing the GtkStyleProvider interface. It is able to parse [CSS-like][css-overview] input in order to style widgets.

Dialog

Dialog boxes are a convenient way to prompt the user for a small amount of input, e.g. to display a message, ask a question, or anything else that does not require extensive effort on the user’s part.

DrawingArea

The GtkDrawingArea widget is used for creating custom user interface elements. It’s essentially a blank widget; you can draw on it. After creating a drawing area, the application may want to connect to:.

Entry

The GtkEntry widget is a single line text entry widget. A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible.

EntryAccessible

EntryBuffer

The GtkEntryBuffer class contains the actual text displayed in a GtkEntry widget.

since: 2.18

EntryCompletion

GtkEntryCompletion is an auxiliary object to be used in conjunction with GtkEntry to provide the completion functionality. It implements the GtkCellLayout interface, to allow the user to add extra cells to the GtkTreeView with completion matches.

EntryIconAccessible

EventBox

The GtkEventBox widget is a subclass of GtkBin which also has its own window. It is useful since it allows you to catch events for widgets which do not have their own window.

EventController

GtkEventController is a base, low-level implementation for event controllers. Those react to a series of GdkEvents, and possibly trigger actions as a consequence of those.

EventControllerKey

GtkEventControllerKey is an event controller meant for situations where you need access to key events.

EventControllerMotion

GtkEventControllerMotion is an event controller meant for situations where you need to track the position of the pointer.

EventControllerScroll

GtkEventControllerScroll is an event controller meant to handle scroll events from mice and touchpads. It is capable of handling both discrete and continuous scroll events, abstracting them both on the GtkEventControllerScroll::scroll signal (deltas in the discrete case are multiples of 1).

Expander

A GtkExpander allows the user to hide or show its child by clicking on an expander triangle similar to the triangles used in a GtkTreeView.

ExpanderAccessible

FileChooserButton

The GtkFileChooserButton is a widget that lets the user select a file. It implements the GtkFileChooser interface. Visually, it is a file name with a button to bring up a GtkFileChooserDialog. The user can then use that dialog to change the file associated with that button. This widget does not support setting the GtkFileChooser:select-multiple property to TRUE.

FileChooserDialog

GtkFileChooserDialog is a dialog box suitable for use with “File/Open” or “File/Save as” commands. This widget works by putting a GtkFileChooserWidget inside a GtkDialog. It exposes the GtkFileChooser interface, so you can use all of the GtkFileChooser functions on the file chooser dialog as well as those for GtkDialog.

FileChooserNative

GtkFileChooserNative is an abstraction of a dialog box suitable for use with “File/Open” or “File/Save as” commands. By default, this just uses a GtkFileChooserDialog to implement the actual dialog. However, on certain platforms, such as Windows and macOS, the native platform file chooser is used instead. When the application is running in a sandboxed environment without direct filesystem access (such as Flatpak), GtkFileChooserNative may call the proper APIs (portals) to let the user choose a file and make it available to the application.

FileChooserWidget

GtkFileChooserWidget is a widget for choosing files. It exposes the GtkFileChooser interface, and you should use the methods of this interface to interact with the widget.

FileChooserWidgetAccessible

unstable since: 3.24.30

FileFilter

A GtkFileFilter can be used to restrict the files being shown in a GtkFileChooser. Files can be filtered based on their name (with gtk_file_filter_add_pattern()), on their mime type (with gtk_file_filter_add_mime_type()), or by a custom filter function (with gtk_file_filter_add_custom()).

Fixed

The GtkFixed widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels. GtkFixed performs no automatic layout management.

FlowBox

A GtkFlowBox positions child widgets in sequence according to its orientation.

FlowBoxAccessible

FlowBoxChild

FlowBoxChildAccessible

FontButton

The GtkFontButton is a button which displays the currently selected font an allows to open a font chooser dialog to change the font. It is suitable widget for selecting a font in a preference dialog.

FontChooserDialog

The GtkFontChooserDialog widget is a dialog for selecting a font. It implements the GtkFontChooser interface.

since: 3.2

FontChooserWidget

The GtkFontChooserWidget widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the GtkFontChooserDialog widget to provide a dialog box for selecting fonts.

since: 3.2

FontSelection

FontSelectionDialog

Frame

The frame widget is a bin that surrounds its child with a decorative frame and an optional label. If present, the label is drawn in a gap in the top side of the frame. The position of the label can be controlled with gtk_frame_set_label_align().

FrameAccessible

Gesture

GtkGesture is the base object for gesture recognition, although this object is quite generalized to serve as a base for multi-touch gestures, it is suitable to implement single-touch and pointer-based gestures (using the special NULL GdkEventSequence value for these).

GestureDrag

GtkGestureDrag is a GtkGesture implementation that recognizes drag operations. The drag operation itself can be tracked throught the GtkGestureDrag::drag-begin, GtkGestureDrag::drag-update and GtkGestureDrag::drag-end signals, or the relevant coordinates be extracted through gtk_gesture_drag_get_offset() and gtk_gesture_drag_get_start_point().

GestureLongPress

GtkGestureLongPress is a GtkGesture implementation able to recognize long presses, triggering the GtkGestureLongPress::pressed after the timeout is exceeded.

GestureMultiPress

GtkGestureMultiPress is a GtkGesture implementation able to recognize multiple clicks on a nearby zone, which can be listened for through the GtkGestureMultiPress::pressed signal. Whenever time or distance between clicks exceed the GTK+ defaults, GtkGestureMultiPress::stopped is emitted, and the click counter is reset.

GesturePan

GtkGesturePan is a GtkGesture implementation able to recognize pan gestures, those are drags that are locked to happen along one axis. The axis that a GtkGesturePan handles is defined at construct time, and can be changed through gtk_gesture_pan_set_orientation().

GestureRotate

GtkGestureRotate is a GtkGesture implementation able to recognize 2-finger rotations, whenever the angle between both handled sequences changes, the GtkGestureRotate::angle-changed signal is emitted.

GestureSingle

GtkGestureSingle is a subclass of GtkGesture, optimized (although not restricted) for dealing with mouse and single-touch gestures. Under interaction, these gestures stick to the first interacting sequence, which is accessible through gtk_gesture_single_get_current_sequence() while the gesture is being interacted with.

GestureStylus

GtkGestureStylus is a GtkGesture implementation specific to stylus input. The provided signals just provide the basic information.

GestureSwipe

GtkGestureSwipe is a GtkGesture implementation able to recognize swipes, after a press/move/…/move/release sequence happens, the GtkGestureSwipe::swipe signal will be emitted, providing the velocity and directionality of the sequence at the time it was lifted.

GestureZoom

GtkGestureZoom is a GtkGesture implementation able to recognize pinch/zoom gestures, whenever the distance between both tracked sequences changes, the GtkGestureZoom::scale-changed signal is emitted to report the scale factor.

GLArea

GtkGLArea is a widget that allows drawing with OpenGL.

since: 3.16

Grid

GtkGrid is a container which arranges its child widgets in rows and columns, with arbitrary positions and horizontal/vertical spans.

HandleBox

The GtkHandleBox widget allows a portion of a window to be “torn off”. It is a bin widget which displays its child and a handle that the user can drag to tear off a separate window (the “float window”) containing the child widget. A thin “ghost” is drawn in the original location of the handlebox. By dragging the separate window back to its original location, it can be reattached.

HBox

GtkHBox is a container that organizes child widgets into a single row.

HButtonBox

HeaderBar

GtkHeaderBar is similar to a horizontal GtkBox. It allows children to be placed at the start or the end. In addition, it allows a title and subtitle to be displayed. The title will be centered with respect to the width of the box, even if the children at either side take up different amounts of space. The height of the titlebar will be set to provide sufficient space for the subtitle, even if none is currently set. If a subtitle is not needed, the space reservation can be turned off with gtk_header_bar_set_has_subtitle().

HeaderBarAccessible

unstable since: 3.24.11

HPaned

The HPaned widget is a container widget with two children arranged horizontally. The division between the two panes is adjustable by the user by dragging a handle. See GtkPaned for details.

HScale

The GtkHScale widget is used to allow the user to select a value using a horizontal slider. To create one, use gtk_hscale_new_with_range().

HScrollbar

The GtkHScrollbar widget is a widget arranged horizontally creating a scrollbar. See GtkScrollbar for details on scrollbars. GtkAdjustment pointers may be added to handle the adjustment of the scrollbar or it may be left NULL in which case one will be created for you. See GtkScrollbar for a description of what the fields in an adjustment represent for a scrollbar.

HSeparator

The GtkHSeparator widget is a horizontal separator, used to group the widgets within a window. It displays a horizontal line with a shadow to make it appear sunken into the interface.

HSV

GtkHSV is the “color wheel” part of a complete color selector widget. It allows to select a color by determining its HSV components in an intuitive way. Moving the selection around the outer ring changes the hue, and moving the selection point inside the inner triangle changes value and saturation.

IconFactory

An icon factory manages a collection of GtkIconSet; a GtkIconSet manages a set of variants of a particular icon (i.e. a GtkIconSet contains variants for different sizes and widget states). Icons in an icon factory are named by a stock ID, which is a simple string identifying the icon. Each GtkStyle has a list of GtkIconFactory derived from the current theme; those icon factories are consulted first when searching for an icon. If the theme doesn’t set a particular icon, GTK+ looks for the icon in a list of default icon factories, maintained by gtk_icon_factory_add_default() and gtk_icon_factory_remove_default(). Applications with icons should add a default icon factory with their icons, which will allow themes to override the icons for the application.

IconInfo

Contains information found when looking up an icon in an icon theme.

IconTheme

GtkIconTheme provides a facility for looking up icons by name and size. The main reason for using a name rather than simply providing a filename is to allow different icons to be used depending on what “icon theme” is selected by the user. The operation of icon themes on Linux and Unix follows the Icon Theme Specification There is a fallback icon theme, named hicolor, where applications should install their icons, but additional icon themes can be installed as operating system vendors and users choose.

IconView

GtkIconView provides an alternative view on a GtkTreeModel. It displays the model as a grid of icons with labels. Like GtkTreeView, it allows to select one or multiple items (depending on the selection mode, see gtk_icon_view_set_selection_mode()). In addition to selection with the arrow keys, GtkIconView supports rubberband selection, which is controlled by dragging the pointer.

IconViewAccessible

Image

The GtkImage widget displays an image. Various kinds of object can be displayed as an image; most typically, you would load a GdkPixbuf (“pixel buffer”) from a file, and then display that. There’s a convenience function to do this, gtk_image_new_from_file(), used as follows:

  GtkWidget *image;
  image = gtk_image_new_from_file ("myfile.png");

If the file isn’t loaded successfully, the image will contain a “broken image” icon similar to that used in many web browsers. If you want to handle errors in loading the file yourself, for example by displaying an error message, then load the image with gdk_pixbuf_new_from_file(), then create the GtkImage with gtk_image_new_from_pixbuf().

ImageAccessible

ImageCellAccessible

ImageMenuItem

A GtkImageMenuItem is a menu item which has an icon next to the text label.

IMContext

GtkIMContext defines the interface for GTK+ input methods. An input method is used by GTK+ text input widgets like GtkEntry to map from key events to Unicode character strings.

IMContextSimple

GtkIMContextSimple is a simple input method context supporting table-based input methods. It has a built-in table of compose sequences that is derived from the X11 Compose files.

IMMulticontext

InfoBar

GtkInfoBar is a widget that can be used to show messages to the user without showing a dialog. It is often temporarily shown at the top or bottom of a document. In contrast to GtkDialog, which has a action area at the bottom, GtkInfoBar has an action area at the side.

Invisible

The GtkInvisible widget is used internally in GTK+, and is probably not very useful for application developers.

Label

The GtkLabel widget displays a small amount of text. As the name implies, most labels are used to label another widget such as a GtkButton, a GtkMenuItem, or a GtkComboBox.

LabelAccessible

Layout

GtkLayout is similar to GtkDrawingArea in that it’s a “blank slate” and doesn’t do anything except paint a blank background by default. It’s different in that it supports scrolling natively due to implementing GtkScrollable, and can contain child widgets since it’s a GtkContainer.

LevelBar

The GtkLevelBar is a bar widget that can be used as a level indicator. Typical use cases are displaying the strength of a password, or showing the charge level of a battery.

LevelBarAccessible

LinkButton

A GtkLinkButton is a GtkButton with a hyperlink, similar to the one used by web browsers, which triggers an action when clicked. It is useful to show quick links to resources.

LinkButtonAccessible

ListBox

A GtkListBox is a vertical container that contains GtkListBoxRow children. These rows can be dynamically sorted and filtered, and headers can be added dynamically depending on the row content. It also allows keyboard and mouse navigation and selection like a typical list.

ListBoxAccessible

ListBoxRow

ListBoxRowAccessible

ListStore

The GtkListStore object is a list model for use with a GtkTreeView widget. It implements the GtkTreeModel interface, and consequentialy, can use all of the methods available there. It also implements the GtkTreeSortable interface so it can be sorted by the view. Finally, it also implements the tree [drag and drop][gtk3-GtkTreeView-drag-and-drop] interfaces.

LockButton

GtkLockButton is a widget that can be used in control panels or preference dialogs to allow users to obtain and revoke authorizations needed to operate the controls. The required authorization is represented by a GPermission object. Concrete implementations of GPermission may use PolicyKit or some other authorization framework. To obtain a PolicyKit-based GPermission, use polkit_permission_new().

LockButtonAccessible

Menu

A GtkMenu is a GtkMenuShell that implements a drop down menu consisting of a list of GtkMenuItem objects which can be navigated and activated by the user to perform application functions.

MenuAccessible

MenuBar

The GtkMenuBar is a subclass of GtkMenuShell which contains one or more GtkMenuItems. The result is a standard menu bar which can hold many menu items.

MenuButton

The GtkMenuButton widget is used to display a popup when clicked on. This popup can be provided either as a GtkMenu, a GtkPopover or an abstract GMenuModel.

MenuButtonAccessible

MenuItem

The GtkMenuItem widget and the derived widgets are the only valid children for menus. Their function is to correctly handle highlighting, alignment, events and submenus.

MenuItemAccessible

MenuShell

A GtkMenuShell is the abstract base class used to derive the GtkMenu and GtkMenuBar subclasses.

MenuShellAccessible

MenuToolButton

A GtkMenuToolButton is a GtkToolItem that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.

MessageDialog

GtkMessageDialog presents a dialog with some message text. It’s simply a convenience widget; you could construct the equivalent of GtkMessageDialog from GtkDialog without too much effort, but GtkMessageDialog saves typing.

Misc

The GtkMisc widget is an abstract widget which is not useful itself, but is used to derive subclasses which have alignment and padding attributes.

ModelButton

GtkModelButton is a button class that can use a GAction as its model. In contrast to GtkToggleButton or GtkRadioButton, which can also be backed by a GAction via the GtkActionable:action-name property, GtkModelButton will adapt its appearance according to the kind of action it is backed by, and appear either as a plain, check or radio button.

MountOperation

This should not be accessed directly. Use the accessor functions below.

NativeDialog

Native dialogs are platform dialogs that don’t use GtkDialog or GtkWindow. They are used in order to integrate better with a platform, by looking the same as other native applications and supporting platform specific features.

Notebook

The GtkNotebook widget is a GtkContainer whose children are pages that can be switched between using tab labels along one edge.

NotebookAccessible

NotebookPageAccessible

NumerableIcon

GtkNumerableIcon is a subclass of GEmblemedIcon that can show a number or short string as an emblem. The number can be overlayed on top of another emblem, if desired.

OffscreenWindow

GtkOffscreenWindow is strictly intended to be used for obtaining snapshots of widgets that are not part of a normal widget hierarchy. Since GtkOffscreenWindow is a toplevel widget you cannot obtain snapshots of a full window with it since you cannot pack a toplevel widget in another toplevel.

Overlay

GtkOverlay is a container which contains a single main child, on top of which it can place “overlay” widgets. The position of each overlay widget is determined by its GtkWidget:halign and GtkWidget:valign properties. E.g. a widget with both alignments set to GTK_ALIGN_START will be placed at the top left corner of the GtkOverlay container, whereas an overlay with halign set to GTK_ALIGN_CENTER and valign set to GTK_ALIGN_END will be placed a the bottom edge of the GtkOverlay, horizontally centered. The position can be adjusted by setting the margin properties of the child to non-zero values.

PadController

GtkPadController is an event controller for the pads found in drawing tablets (The collection of buttons and tactile sensors often found around the stylus-sensitive area).

PageSetup

A GtkPageSetup object stores the page size, orientation and margins. The idea is that you can get one of these from the page setup dialog and then pass it to the GtkPrintOperation when printing. The benefit of splitting this out of the GtkPrintSettings is that these affect the actual layout of the page, and thus need to be set long before user prints.

Paned

GtkPaned has two panes, arranged either horizontally or vertically. The division between the two panes is adjustable by the user by dragging a handle.

PanedAccessible

PlacesSidebar

GtkPlacesSidebar is a widget that displays a list of frequently-used places in the file system: the user’s home directory, the user’s bookmarks, and volumes and drives. This widget is used as a sidebar in GtkFileChooser and may be used by file managers and similar programs.

Plug

Together with GtkSocket, GtkPlug provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates a GtkSocket widget and passes the ID of that widget’s window to the other process, which then creates a GtkPlug with that window ID. Any widgets contained in the GtkPlug then will appear inside the first application’s window.

PlugAccessible

unstable since: 3.24.30

Popover

GtkPopover is a bubble-like context window, primarily meant to provide context-dependent information or options. Popovers are attached to a widget, passed at construction time on gtk_popover_new(), or updated afterwards through gtk_popover_set_relative_to(), by default they will point to the whole widget area, although this behavior can be changed through gtk_popover_set_pointing_to().

since: 3.12

PopoverAccessible

PopoverMenu

GtkPopoverMenu is a subclass of GtkPopover that treats its children like menus and allows switching between them. It is meant to be used primarily together with GtkModelButton, but any widget can be used, such as GtkSpinButton or GtkScale. In this respect, GtkPopoverMenu is more flexible than popovers that are created from a GMenuModel with gtk_popover_new_from_model().

PrintContext

A GtkPrintContext encapsulates context information that is required when drawing pages for printing, such as the cairo context and important parameters like page size and resolution. It also lets you easily create PangoLayout and PangoContext objects that match the font metrics of the cairo surface.

PrintOperation

GtkPrintOperation is the high-level, portable printing API. It looks a bit different than other GTK+ dialogs such as the GtkFileChooser, since some platforms don’t expose enough infrastructure to implement a good print dialog. On such platforms, GtkPrintOperation uses the native print dialog. On platforms which do not provide a native print dialog, GTK+ uses its own, see GtkPrintUnixDialog.

PrintSettings

A GtkPrintSettings object represents the settings of a print dialog in a system-independent way. The main use for this object is that once you’ve printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user doesn’t have to re-set all his settings.

ProgressBar

The GtkProgressBar is typically used to display the progress of a long running operation. It provides a visual clue that processing is underway. The GtkProgressBar can be used in two different modes: percentage mode and activity mode.

ProgressBarAccessible

RadioAction

A GtkRadioAction is similar to GtkRadioMenuItem. A number of radio actions can be linked together so that only one may be active at any one time.

RadioButton

A single radio button performs the same basic function as a GtkCheckButton, as its position in the object hierarchy reflects. It is only when multiple radio buttons are grouped together that they become a different user interface component in their own right.

RadioButtonAccessible

RadioMenuItem

A radio menu item is a check menu item that belongs to a group. At each instant exactly one of the radio menu items from a group is selected.

RadioMenuItemAccessible

RadioToolButton

A GtkRadioToolButton is a GtkToolItem that contains a radio button, that is, a button that is part of a group of toggle buttons where only one button can be active at a time.

Range

GtkRange is the common base class for widgets which visualize an adjustment, e.g GtkScale or GtkScrollbar.

RangeAccessible

RcStyle

The GtkRcStyle-struct is used to represent a set of information about the appearance of a widget. This can later be composited together with other GtkRcStyle-structs to form a GtkStyle.

RecentAction

A GtkRecentAction represents a list of recently used files, which can be shown by widgets such as GtkRecentChooserDialog or GtkRecentChooserMenu.

RecentChooserDialog

GtkRecentChooserDialog is a dialog box suitable for displaying the recently used documents. This widgets works by putting a GtkRecentChooserWidget inside a GtkDialog. It exposes the GtkRecentChooserIface interface, so you can use all the GtkRecentChooser functions on the recent chooser dialog as well as those for GtkDialog.

RecentChooserMenu

GtkRecentChooserMenu is a widget suitable for displaying recently used files inside a menu. It can be used to set a sub-menu of a GtkMenuItem using gtk_menu_item_set_submenu(), or as the menu of a GtkMenuToolButton.

RecentChooserWidget

GtkRecentChooserWidget is a widget suitable for selecting recently used files. It is the main building block of a GtkRecentChooserDialog. Most applications will only need to use the latter; you can use GtkRecentChooserWidget as part of a larger window if you have special needs.

RecentFilter

A GtkRecentFilter can be used to restrict the files being shown in a GtkRecentChooser. Files can be filtered based on their name (with gtk_recent_filter_add_pattern()), on their mime type (with gtk_file_filter_add_mime_type()), on the application that has registered them (with gtk_recent_filter_add_application()), or by a custom filter function (with gtk_recent_filter_add_custom()).

RecentManager

GtkRecentManager provides a facility for adding, removing and looking up recently used files. Each recently used file is identified by its URI, and has meta-data associated to it, like the names and command lines of the applications that have registered it, the number of time each application has registered the same file, the mime type of the file and whether the file should be displayed only by the applications that have registered it.

since: 2.10

RendererCellAccessible

Revealer

The GtkRevealer widget is a container which animates the transition of its child from invisible to visible.

Scale

A GtkScale is a slider control used to select a numeric value. To use it, you’ll probably want to investigate the methods on its base class, GtkRange, in addition to the methods for GtkScale itself. To set the value of a scale, you would normally use gtk_range_set_value(). To detect changes to the value, you would normally use the GtkRange::value-changed signal.

ScaleAccessible

ScaleButton

GtkScaleButton provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and GTK+ provides a GtkVolumeButton subclass that is tailored for this use case.

ScaleButtonAccessible

Scrollbar

The GtkScrollbar widget is a horizontal or vertical scrollbar, depending on the value of the GtkOrientable:orientation property.

ScrolledWindow

GtkScrolledWindow is a container that accepts a single child widget and makes that child scrollable using either internally added scrollbars or externally associated adjustments.

ScrolledWindowAccessible

SearchBar

GtkSearchBar is a container made to have a search entry (possibly with additional connex widgets, such as drop-down menus, or buttons) built-in. The search bar would appear when a search is started through typing on the keyboard, or the application’s search mode is toggled on.

since: 3.10

SearchEntry

GtkSearchEntry is a subclass of GtkEntry that has been tailored for use as a search entry.

since: 3.6

Separator

GtkSeparator is a horizontal or vertical separator widget, depending on the value of the GtkOrientable:orientation property, used to group the widgets within a window. It displays a line with a shadow to make it appear sunken into the interface.

SeparatorMenuItem

The GtkSeparatorMenuItem is a separator used to group items within a menu. It displays a horizontal line with a shadow to make it appear sunken into the interface.

SeparatorToolItem

A GtkSeparatorToolItem is a GtkToolItem that separates groups of other GtkToolItems. Depending on the theme, a GtkSeparatorToolItem will often look like a vertical line on horizontally docked toolbars.

Settings

GtkSettings provide a mechanism to share global settings between applications.

ShortcutLabel

GtkShortcutLabel is a widget that represents a single keyboard shortcut or gesture in the user interface.

ShortcutsGroup

A GtkShortcutsGroup represents a group of related keyboard shortcuts or gestures. The group has a title. It may optionally be associated with a view of the application, which can be used to show only relevant shortcuts depending on the application context.

ShortcutsSection

A GtkShortcutsSection collects all the keyboard shortcuts and gestures for a major application mode. If your application needs multiple sections, you should give each section a unique GtkShortcutsSection:section-name and a GtkShortcutsSection:title that can be shown in the section selector of the GtkShortcutsWindow.

ShortcutsShortcut

A GtkShortcutsShortcut represents a single keyboard shortcut or gesture with a short text. This widget is only meant to be used with GtkShortcutsWindow.

ShortcutsWindow

A GtkShortcutsWindow shows brief information about the keyboard shortcuts and gestures of an application. The shortcuts can be grouped, and you can have multiple sections in this window, corresponding to the major modes of your application.

SizeGroup

GtkSizeGroup provides a mechanism for grouping a number of widgets together so they all request the same amount of space. This is typically useful when you want a column of widgets to have the same size, but you can’t use a GtkGrid widget.

Socket

Together with GtkPlug, GtkSocket provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates a GtkSocket widget and passes that widget’s window ID to the other process, which then creates a GtkPlug with that window ID. Any widgets contained in the GtkPlug then will appear inside the first application’s window.

SocketAccessible

unstable since: 3.24.30

SpinButton

A GtkSpinButton is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a GtkEntry, GtkSpinButton allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range.

SpinButtonAccessible

Spinner

A GtkSpinner widget displays an icon-size spinning animation. It is often used as an alternative to a GtkProgressBar for displaying indefinite activity, instead of actual progress.

SpinnerAccessible

Stack

The GtkStack widget is a container which only shows one of its children at a time. In contrast to GtkNotebook, GtkStack does not provide a means for users to change the visible child. Instead, the GtkStackSwitcher widget can be used with GtkStack to provide this functionality.

StackAccessible

StackSidebar

A GtkStackSidebar enables you to quickly and easily provide a consistent “sidebar” object for your user interface.

since: 3.16

StackSwitcher

The GtkStackSwitcher widget acts as a controller for a GtkStack; it shows a row of buttons to switch between the various pages of the associated stack widget.

Statusbar

A GtkStatusbar is usually placed along the bottom of an application’s main GtkWindow. It may provide a regular commentary of the application’s status (as is usually the case in a web browser, for example), or may be used to simply output a message when the status changes, (when an upload is complete in an FTP client, for example).

StatusbarAccessible

StatusIcon

The “system tray” or notification area is normally used for transient icons that indicate some special state. For example, a system tray icon might appear to tell the user that they have new mail, or have an incoming instant message, or something along those lines. The basic idea is that creating an icon in the notification area is less annoying than popping up a dialog.

Style