library: libGuiBld #include "TRootGuiBuilder.h"

# TRootGuiBuilder

class description - source file - inheritance tree (.pdf)

## class TRootGuiBuilder : public TGuiBuilder, public TGMainFrame

| Inheritance Chart:
`TGuiBuilder`
`TObject`
| <- | `TGObject`
| <- | `TGWindow`
`TQObject`
| <- | `TGFrame`
| <- | `TGCompositeFrame`
| <- | `TGMainFrame`
| <- | `TRootGuiBuilder` |

        private:

          void BindKeys()
          void EnableEditButtons(Bool_t on = kTRUE)
          void EnableLassoButtons(Bool_t on = kTRUE)
          void EnableSelectedButtons(Bool_t on = kTRUE)
          void InitMenu()

        public:

                           TRootGuiBuilder(const TGWindow* p = 0)
                           TRootGuiBuilder(const TRootGuiBuilder&)
                   virtual ~TRootGuiBuilder()
              virtual void AddAction(TGuiBldAction* act, const char* sect)
              virtual void AddSection(const char* sect)
              virtual void ChangeSelected(TGFrame* f)
            static TClass* Class()
              virtual void CloseWindow()
              virtual void EraseStatusBar()
          virtual TGFrame* ExecuteAction()
               TGMdiFrame* FindEditableMdiFrame(const TGWindow* win)
            TGuiBldEditor* GetEditor() const
              virtual void HandleButtons()
            virtual Bool_t HandleKey(Event_t* event)
              virtual void HandleMenu(Int_t id)
              virtual void HandleWindowClosed(Int_t id)
              virtual void Hide()
           static TGFrame* HSplitter()
           virtual TClass* IsA() const
            virtual Bool_t IsGrabButtonDown() const
            virtual Bool_t IsSelectMode() const
            virtual Bool_t NewProject(Event_t* event = 0)
            virtual Bool_t OpenProject(Event_t* event = 0)
            virtual Bool_t SaveProject(Event_t* event = 0)
              virtual void Show()
              virtual void ShowMembers(TMemberInspector& insp, char* parent)
              virtual void Streamer(TBuffer& b)
                      void StreamerNVirtual(TBuffer& b)
              virtual void Update()
              virtual void UpdateStatusBar(const char* text = "0")
           static TGFrame* VSplitter()

### Data Members

        private:

          TGuiBldDragManager* fManager      drag and drop manager
                   TGToolBar* fToolBar      guibuider toolbar
                   TGShutter* fShutter      widget palette
              TGMdiMainFrame* fMain         main mdi frame
             TGDockableFrame* fToolDock     dockable frame where toolbar is located
             TGDockableFrame* fShutterDock  dockable frame where widget palette is located
                TGMdiMenuBar* fMenuBar      guibuildere menu bar
                 TGPopupMenu* fMenuFile     "File" popup menu
                 TGPopupMenu* fMenuWindow   "Window" popup menu
                 TGPopupMenu* fMenuHelp     "Help" popup menu
                 TGStatusBar* fStatusBar    guibuilder status bar
                     TGFrame* fSelected     selected frame
                  TGMdiFrame* fEditable     mdi frame where editted frame is  located
               TGuiBldEditor* fEditor       frame property editor

## Class Description

     TRootGuiBuilder

      ************************************************
                    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 $ROOTSYS/tutorials/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 immediatly 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:

       o Press Ctrl-Double-Click to start/stop edit mode
       o 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

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

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

/* */

TRootGuiBuilder(const TGWindow *p) : TGuiBuilder(), TGMainFrame(p ? p : gClient->GetDefaultRoot(), 1, 1)

     ctor

~TRootGuiBuilder()

     destructor

void CloseWindow()

     close GUI builder via "Close" button

void AddAction(TGuiBldAction *act, const char *sect)

     add new action to widget palette

void AddSection(const char *sect)

void HandleButtons()

TGFrame* ExecuteAction()

void InitMenu()

     inititiate Gui Builder menu

void ChangeSelected(TGFrame *f)

void EnableLassoButtons(Bool_t on)

void EnableSelectedButtons(Bool_t on)

void EnableEditButtons(Bool_t on)

void Update()

Bool_t IsSelectMode() const

Bool_t IsGrabButtonDown() const

Bool_t HandleKey(Event_t *event)

     keys handling

Bool_t NewProject(Event_t *)

     create a new project

Bool_t OpenProject(Event_t *event)

     open new gui builder project

Bool_t SaveProject(Event_t *event)

TGMdiFrame* FindEditableMdiFrame(const TGWindow *win)

void HandleMenu(Int_t id)

     Handle menu items.

void HandleWindowClosed(Int_t )

void UpdateStatusBar(const char *txt)

void EraseStatusBar()

void BindKeys()

TGFrame* VSplitter()

     creates new TGVSplitter

TGFrame* HSplitter()

      creates new TGHSplitter

void Hide()

     cleanup and hide gui builder

### Inline Functions

                       void Show()
             TGuiBldEditor* GetEditor() const
                    TClass* Class()
                    TClass* IsA() const
                       void ShowMembers(TMemberInspector& insp, char* parent)
                       void Streamer(TBuffer& b)
                       void StreamerNVirtual(TBuffer& b)
            TRootGuiBuilder TRootGuiBuilder(const TRootGuiBuilder&)

Author: Valeriy Onuchin 12/09/04
Last update: root/guibuilder:$Name: $:$Id: TRootGuiBuilder.cxx,v 1.15 2005/06/08 17:05:56 brun Exp $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *