How to Use the ROOT GUI Classes ?

The ROOT GUI classes provide a rich and complete set of widgets allowing the construction of modern looking graphical user interfaces. The GUI classes are fully cross platform and provide the same look and feel on either X11, Win32 or Mac OS X.

The GUI classes are originally based on the LGPL'ed Xclass'95 widget library by Hector Peraza.

ROOT comes with many examples of high level GUI’s like the browser, tree viewer, graphics editor, fit panel, session viewer of PROOF, etc. See, e.g. the ROOT Browser:

Features

The ROOT GUI provides:

  • A rich set of widgets that provide standard application functionality
  • Signals/slots mechanism
  • Conventional model of event processing
  • Intuitive naming conventions

The main widgets are:

  • Simple widgets: labels, icons, push buttons, either with text or pixmaps, check buttons, radio buttons, menu bars and popup menus, scroll bars, list boxes, combo boxes, group frames, text entry widgets, tab widgets, progress bars, sliders, tool tips
  • Complex widgets: shutter, toolbar, status bar, list view, list tree
  • Common dialogs: File Open/Save, File Properties, Font Selection, Color Selection, About
  • The widgets are shown in frames:
    • frame, composite frame, main frame, transient frame, group frame
  • Arranged by layout managers:
    • horizontal layout, vertical layout, row layout, list layout, tile layout, matrix layout
  • Using a combination of layout hints:
    • left, right, center x, center y, top, bottom, expand x, expand y, fixed offsets

See some frequently used dialog boxes (common dialogs) here.

See some advanced GUI screenshots here.

To start developing user interfaces based on the ROOT GUI classes, see the ROOT GUI Builder here.

Example code can be found here:

In case people have more GUI example code, please let us know.