Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGuiBuilder Class Reference

%ROOT GUI Builder principles

With the GUI builder, we try to make the next step from WYSIWYG to embedded editing concept - WYSIWYE ("what you see is what you edit"). The ROOT GUI Builder allows modifying real GUI objects. For example, one can edit the existing GUI application created by guitest.C. GUI components can be added to a design area from a widget palette, or can be borrowed from another application. One can drag and and drop TCanvas's menu bar into the application. GUI objects can be resized and dragged, copied and pasted. ROOT GUI Builder allows changing the layout, snap to grid, change object's layout order via the GUI Builder toolbar, or by options in the right-click context menus. A final design can be immediately tested and used, or saved as a C++ macro. For example, it's possible to rearrange buttons in control bar, add separators etc. and continue to use a new fancy control bar in the application.

The following is a short description of the GUI Builder actions and key shortcuts:

  • Press Ctrl-Double-Click to start/stop edit mode
  • Press Double-Click to activate quick edit action (defined in root.mimes)

Selection, grabbing, dropping

It is possible to select, drag any frame and drop it to any frame

  • Click left mouse button or Ctrl-Click to select an object to edit.
  • Press right mouse button to activate context menu
  • Multiple selection (grabbing):
    • draw lasso and press Return key
    • press Shift key and draw lasso
  • Dropping:
    • select frame and press Ctrl-Return key
  • Changing layout order:
    • select frame and use arrow keys to change layout order
  • Alignment:
    • draw lasso and press arrow keys (or Shift-Arrow key) to align frames

Key shortcuts

  • Return - grab selected frames
  • Ctrl-Return - drop frames
  • Del - delete selected frame
  • Shift-Del - crop action
  • Ctrl-X - cut action
  • Ctrl-C - copy action
  • Ctrl-V - paste action
  • Ctrl-R - replace action
  • Ctrl-L - compact layout
  • Ctrl-B - break layout
  • Ctrl-H - switch horizontal-vertical layout
  • Ctrl-G - switch on/off grid
  • Ctrl-S - save action
  • Ctrl-O - open and execute a ROOT macro file. GUI components created after macro execution will be embedded to currently edited design area.
  • Ctrl-N - create new main frame

Definition at line 43 of file TGuiBuilder.h.

Public Member Functions

 TGuiBuilder ()
 constructor
 
virtual ~TGuiBuilder ()
 destructor
 
virtual void AddAction (TGuiBldAction *, const char *)
 
virtual void AddSection (const char *)
 
virtual TGFrameExecuteAction ()
 
TGuiBldActionGetAction () const
 
virtual void Hide ()
 
virtual TClassIsA () const
 
virtual Bool_t IsExecutable () const
 
virtual void SetAction (TGuiBldAction *act)
 
virtual void Show ()
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static TGuiBuilderInstance ()
 return an instance of TGuiBuilder object
 

Protected Attributes

TGuiBldActionfAction
 

#include <TGuiBuilder.h>

Inheritance diagram for TGuiBuilder:
[legend]

Constructor & Destructor Documentation

◆ TGuiBuilder()

TGuiBuilder::TGuiBuilder ( )

constructor

Definition at line 113 of file TGuiBuilder.cxx.

◆ ~TGuiBuilder()

TGuiBuilder::~TGuiBuilder ( )
virtual

destructor

Definition at line 132 of file TGuiBuilder.cxx.

Member Function Documentation

◆ AddAction()

virtual void TGuiBuilder::AddAction ( TGuiBldAction ,
const char *   
)
inlinevirtual

Reimplemented in TRootGuiBuilder.

Definition at line 52 of file TGuiBuilder.h.

◆ AddSection()

virtual void TGuiBuilder::AddSection ( const char *  )
inlinevirtual

Reimplemented in TRootGuiBuilder.

Definition at line 53 of file TGuiBuilder.h.

◆ Class()

static TClass * TGuiBuilder::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TGuiBuilder::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TGuiBuilder::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 63 of file TGuiBuilder.h.

◆ DeclFileName()

static const char * TGuiBuilder::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 63 of file TGuiBuilder.h.

◆ ExecuteAction()

virtual TGFrame * TGuiBuilder::ExecuteAction ( )
inlinevirtual

Reimplemented in TRootGuiBuilder.

Definition at line 54 of file TGuiBuilder.h.

◆ GetAction()

TGuiBldAction * TGuiBuilder::GetAction ( ) const
inline

Definition at line 56 of file TGuiBuilder.h.

◆ Hide()

virtual void TGuiBuilder::Hide ( )
inlinevirtual

Reimplemented in TRootGuiBuilder.

Definition at line 59 of file TGuiBuilder.h.

◆ Instance()

TGuiBuilder * TGuiBuilder::Instance ( )
static

return an instance of TGuiBuilder object

Definition at line 139 of file TGuiBuilder.cxx.

◆ IsA()

virtual TClass * TGuiBuilder::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Definition at line 63 of file TGuiBuilder.h.

◆ IsExecutable()

virtual Bool_t TGuiBuilder::IsExecutable ( ) const
inlinevirtual

Definition at line 57 of file TGuiBuilder.h.

◆ SetAction()

virtual void TGuiBuilder::SetAction ( TGuiBldAction act)
inlinevirtual

Definition at line 55 of file TGuiBuilder.h.

◆ Show()

virtual void TGuiBuilder::Show ( )
inlinevirtual

Reimplemented in TRootGuiBuilder.

Definition at line 58 of file TGuiBuilder.h.

◆ Streamer()

virtual void TGuiBuilder::Streamer ( TBuffer )
virtual

◆ StreamerNVirtual()

void TGuiBuilder::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 63 of file TGuiBuilder.h.

Member Data Documentation

◆ fAction

TGuiBldAction* TGuiBuilder::fAction
protected

Definition at line 46 of file TGuiBuilder.h.

Libraries for TGuiBuilder:

The documentation for this class was generated from the following files: