Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Gtk+/Gnome Application Development
Prev Home Next

GTK+/Gnome Object Hierarchy

This appendix is a quick tour of the GTK+ and Gnome object hierarchy. It includes GtkObject and all subclasses from both libraries, a brief description of each, and the header files the objects are found in. It also includes screen shots of widgets, to help you find the correct widget for a given task. The testgtk and test-gnome programs that come with the GTK+ and Gnome libraries are also a good way to find widgets; many of the screenshots in this appendix are from those programs.

The specific header file containing each object is listed; however, all GTK+ header files can be included with the gtk/gtk.h convenience header. All GTK+ and Gnome headers can be included with the gnome.h header.

Some objects are described as "abstract base classes"---this means that only the subclasses of the object can be instantiated, but all of the subclasses can be manipulated through the base class's interface.

As a general rule, you should try to use the most specific object possible. That is, you could use GtkWindow for your main application window, but GnomeApp is a better choice; you could roll your own about dialog from GnomeDialog, but GnomeAbout is a better choice. This maximizes UI consistency and minimizes your effort.

Both GTK+ and Gnome come with "test" programs, called testgtk and test-gnome, respectively. These programs are used to test the widgets and other features in each library. They're also an excellent source of sample code, and a good way to browse the available widgets and find the one you need.

Hierarchy Summary


GtkBin
 |
 +GtkButton
   | 
   +GnomeColorPicker
   |
   +GnomeFontPicker
   |
   +GnomeHRef
   |
   +GtkToggleButton 
   |
   +GtkOptionMenu

This would be for GtkButton. The parent of the object (if any) is shown, then the object itself (possibly highlighted or in bold), then the immediate children of the object, if any. The second element that might be nice: some of the objects are "immature" or "unstable", which is a sort of mild warning suggesting to programmers that they may not want to use the object. It might be nice to have some sort of icon or margin text used to mark those objects.


 GtkObject
  |
  +GtkWidget
  | |
  | +GtkContainer
  | | |
  | | +GtkBin
  | | | |
  | | | +GtkWindow
  | | | | |
  | | | | +GnomeDialog
  | | | | | |
  | | | | | +GnomeAbout
  | | | | | |
  | | | | | +GnomeMessageBox
  | | | | | |
  | | | | | +GnomePropertyBox
  | | | | | |
  | | | | | `GnomeScores
  | | | | |
  | | | | +GnomeApp
  | | | | |
  | | | | +GtkDialog
  | | | | | |
  | | | | | +GnomeFontSelector
  | | | | | |
  | | | | | `GtkInputDialog
  | | | | |
  | | | | +GtkColorSelectionDialog
  | | | | |
  | | | | +GtkFileSelection
  | | | | |
  | | | | +GtkFontSelectionDialog
  | | | | |
  | | | | `GtkPlug
  | | | |
  | | | +GtkButton
  | | | | |
  | | | | +GnomeColorPicker
  | | | | |
  | | | | +GnomeFontPicker
  | | | | |
  | | | | +GnomeHRef
  | | | | |
  | | | | +GtkToggleButton
  | | | | | |
  | | | | | `GtkCheckButton
  | | | | |   |
  | | | | |   `GtkRadioButton
  | | | | |
  | | | | `GtkOptionMenu
  | | | |                      
  | | | +GnomeDockItem
  | | | |
  | | | +GtkAlignment
  | | | |
  | | | +GtkFrame
  | | | | |
  | | | | `GtkAspectFrame
  | | | |
  | | | +GtkItem
  | | | | |
  | | | | +GtkMenuItem
  | | | | | |
  | | | | | +GtkCheckMenuItem
  | | | | | | |
  | | | | | | `GtkRadioMenuItem
  | | | | | |
  | | | | | +GtkPixmapMenuItem
  | | | | | |
  | | | | | `GtkTearoffMenuItem
  | | | | |
  | | | | +GtkListItem
  | | | | |
  | | | | `GtkTreeItem
  | | | |
  | | | +GtkEventBox
  | | | |
  | | | +GtkHandleBox
  | | | |
  | | | +GtkScrolledWindow
  | | | |
  | | | `GtkViewport
  | | |
  | | +GtkBox
  | | | |
  | | | +GtkHBox
  | | | | |
  | | | | +GnomeAppBar
  | | | | |
  | | | | +GnomeDateEdit
  | | | | |
  | | | | +GtkCombo
  | | | | | |
  | | | | | `GnomeEntry
  | | | | |
  | | | | +GnomeFileEntry
  | | | | |
  | | | | +GnomeNumberEntry
  | | | | |
  | | | | +GnomeProcBar
  | | | | |
  | | | | `GtkStatusbar
  | | | |
  | | | +GtkVBox
  | | | | |
  | | | | +GnomeCalculator
  | | | | |
  | | | | +GnomeGuru
  | | | | |
  | | | | +GnomeIconEntry
  | | | | |
  | | | | +GnomeIconSelection
  | | | | |
  | | | | +GnomeLess
  | | | | |
  | | | | +GnomePaperSelector
  | | | | |
  | | | | +GnomePixmapEntry
  | | | | |
  | | | | +GnomeSpell
  | | | | |
  | | | | +GtkColorSelection
  | | | | |
  | | | | `GtkGammaCurve
  | | | |
  | | | `GtkButtonBox
  | | |   |
  | | |   +GtkHButtonBox
  | | |   |
  | | |   `GtkVButtonBox
  | | |
  | | +GtkLayout
  | | | |
  | | | `GnomeCanvas
  | | |   |
  | | |   `GnomeIconList
  | | |
  | | +GnomeDockBand
  | | |
  | | +GnomeDock
  | | |
  | | +GtkCList
  | | | |
  | | | `GtkCTree
  | | |
  | | +GtkFixed
  | | |
  | | +GtkNotebook
  | | | |
  | | | `GtkFontSelection
  | | |
  | | +GtkPaned
  | | | |
  | | | +GtkHPaned
  | | | |
  | | | `GtkVPaned
  | | |
  | | +GtkList
  | | |
  | | +GtkMenuShell
  | | | |
  | | | +GtkMenuBar
  | | | |
  | | | `GtkMenu
  | | |
  | | +GtkPacker
  | | |
  | | +GtkSocket
  | | |
  | | +GtkTable
  | | | |
  | | | `GtkTed
  | | |
  | | +GtkToolbar
  | | |
  | | `GtkTree
  | |
  | +GnomeAnimator
  | |
  | +GnomePixmap
  | | |
  | | `GnomeStock
  | |
  | +GtkMisc
  | | |
  | | +GtkLabel
  | | | |
  | | | +GtkAccelLabel
  | | | |
  | | | +GtkClock
  | | | |
  | | | `GtkTipsQuery
  | | |
  | | +GtkArrow
  | | |
  | | +GtkImage
  | | |
  | | `GtkPixmap
  | |
  | +GtkCalendar
  | |
  | +GtkDrawingArea
  | | |
  | | `GtkCurve
  | |
  | +GtkDial
  | |
  | +GtkEditable
  | | |
  | | +GtkEntry
  | | | |
  | | | `GtkSpinButton
  | | |
  | | `GtkText
  | |
  | +GtkRuler
  | | |
  | | +GtkHRuler
  | | |
  | | `GtkVRuler
  | |
  | +GtkRange
  | | |
  | | +GtkScale
  | | | |
  | | | +GtkHScale
  | | | |
  | | | `GtkVScale
  | | |
  | | `GtkScrollbar
  | |   |
  | |   +GtkHScrollbar
  | |   |
  | |   `GtkVScrollbar
  | |
  | +GtkSeparator
  | | |
  | | +GtkHSeparator
  | | |
  | | `GtkVSeparator
  | |
  | +GtkPreview
  | |
  | +GtkProgress
  | | |
  | | `GtkProgressBar
  | | 
  | `ZvtTerm
  |
  +GnomeCanvasItem
  | |
  | +GnomeCanvasRE
  | | |
  | | +GnomeCanvasEllipse
  | | |
  | | `GnomeCanvasRect
  | |
  | +GnomeCanvasGroup
  | |
  | +GnomeCanvasImage
  | |
  | +GnomeCanvasLine
  | |
  | +GnomeCanvasPolygon
  | |
  | +GnomeCanvasText
  | |
  | +GnomeCanvasWidget
  | |
  | `GnomeIconTextItem
  |
  +GnomeClient
  |
  +GnomeDEntryEdit
  |
  +GnomeDockLayout
  |
  +GnomeMDIChild
  | |
  | `GnomeMDIGenericChild
  |
  +GnomeMDI
  |
  +GtkData
  | |
  | +GtkAdjustment
  | |
  | `GtkTooltips
  |
  `GtkItemFactory
Gtk+/Gnome Application Development
Prev Home Next

 
 
  Published under free license. Design by Interspire