library: libGuiBld
#include "TRootGuiBuilder.h"

TRootGuiBuilder


class description - header file - 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) TGButton* FindActionButton(const char* name, const char* section) void InitMenu() public:
TRootGuiBuilder(const TGWindow* p = 0) TRootGuiBuilder(const TRootGuiBuilder&) virtual ~TRootGuiBuilder() virtual void AddAction(TGuiBldAction* act, const char* sect) virtual void AddMacro(const char* macro, TImage* img) virtual void AddSection(const char* sect) static TGFrame* BuildCanvas() static TGFrame* BuildComboBox() static TGFrame* BuildH3DLine() static TGFrame* BuildHProgressBar() static TGFrame* BuildHScrollBar() static TGFrame* BuildListBox() static TGFrame* BuildListTree() static TGFrame* BuildShutter() static TGFrame* BuildTab() static TGFrame* BuildTextEdit() static TGFrame* BuildV3DLine() static TGFrame* BuildVProgressBar() static TGFrame* BuildVScrollBar() virtual void ChangeSelected(TGFrame* f) static TClass* Class() virtual void CloseWindow() static TGPopupMenu* CreatePopup() virtual void EraseStatusBar() virtual TGFrame* ExecuteAction() TGMdiFrame* FindEditableMdiFrame(const TGWindow* win) static ULong_t GetBgnd() static TGGC* GetBgndGC() TGMdiFrame* GetEditable() const TGuiBldEditor* GetEditor() const TGMdiMainFrame* GetMdiMain() const static ULong_t GetPopupBgnd() static TGGC* GetPopupBgndGC() static ULong_t GetPopupHlght() static TGGC* GetPopupHlghtGC() TGDockableFrame* GetToolDock() 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) static void PropagateBgndColor(TGFrame* frame, Pixel_t color) 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 SwitchToolbarButton() virtual void Update() virtual void UpdateStatusBar(const char* text = "0") static TGFrame* VSplitter()

Data Members

    private:
TGuiBldDragManager* fManager drag and drop manager TGButton* fActionButton action button 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 guibuilder menu bar TGPopupMenu* fMenuFile "File" popup menu TGPopupMenu* fMenuWindow "Window" popup menu TGPopupMenu* fMenuEdit "Edit" 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 const TGPicture* fIconPic icon picture TGPictureButton* fStartButton start button static TGGC* fgBgnd static TGGC* fgBgndPopup static TGGC* fgBgndPopupHlght

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 Return    - grab selected frames
   o Ctrl-Return - drop frames
   o Del       - delete selected frame
   o Shift-Del - crop action
   o Ctrl-X    - cut action
   o Ctrl-C    - copy action
   o Ctrl-V    - paste frame into the last clicked position
   o Ctrl-L    - compact
   o Ctrl-B    - enable/disable 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)
 Create GUI builder application.
~TRootGuiBuilder()
 Destructor.
void CloseWindow()
 Close GUI builder via window manager "Close" button.
TGButton * FindActionButton(const char *name, const char *sect)
 Find action by name
void AddAction(TGuiBldAction *act, const char *sect)
 Add new action to widget palette.
void AddSection(const char *sect)
 Add new shutter item.
void HandleButtons()
 Handle buttons in the GUI builder's widget palette.
TGFrame * ExecuteAction()
 Execute an action.
void InitMenu()
 Inititiate GUI Builder menus.
void ChangeSelected(TGFrame *f)
 Set selected frame.
void EnableLassoButtons(Bool_t on)
 Enable toolbar buttons for alignment.
void EnableSelectedButtons(Bool_t on)
 Enable/disable toolbar buttons according to the selected frame.
void EnableEditButtons(Bool_t on)
 Enable/disable toolbar buttons according to the selected frame.
void Update()
 Update gui builder.
Bool_t IsSelectMode()
 Return the status of the selected mode.
Bool_t IsGrabButtonDown()
 Return the status of the grab mode.
Bool_t HandleKey(Event_t *event)
 Handle keys.
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)
 Save selected project.
void AddMacro(const char *macro, TImage *img)
 Add macro to "User's Macros" section
 Input img must be static - do not delete it.
TGMdiFrame * FindEditableMdiFrame(const TGWindow *win)
 Find the editable frame.
void SwitchToolbarButton()
 Switch image of toolbar edit button according to the current state.
void HandleMenu(Int_t id)
 Handle menu items.
void HandleWindowClosed(Int_t )
 Handler for closed MDI frame.
void UpdateStatusBar(const char *txt)
 Update information shown on the status bar.
void EraseStatusBar()
 Clear information shown in the status bar.
void BindKeys()
 Keyborad key binding.
TGFrame * VSplitter()
 Create new vertical splitter (TGVSplitter).
TGFrame * HSplitter()
  Creates new horizontal splitter (TGHSplitter).
void Hide()
 Hide builder.
ULong_t GetBgnd()
 Return default background color.
TGGC * GetBgndGC()
 Return background GC.
void PropagateBgndColor(TGFrame *frame, Pixel_t color)
 Set a background color to frame and all its subframes.
ULong_t GetPopupBgnd()
 Return background color for popup menus.
TGGC * GetPopupBgndGC()
 Return background GC for popup menus.
ULong_t GetPopupHlght()
 Return highlighted color for popup menu entry.
TGGC * GetPopupHlghtGC()
 Return background GC for highlighted popup menu entry.
TGPopupMenu * CreatePopup()
 Return style popup menu.
TGFrame * BuildListTree()
 Helper method used in guibuilding
TGFrame * BuildCanvas()
 Helper method used in guibuilding to create TGCanvas widget
TGFrame * BuildShutter()
 Helper method used in guibuilding to create TGShutter widget
TGFrame * BuildTextEdit()
 Helper method to create TGTextEdit widget
TGFrame * BuildTab()
 Helper method to create TGTab widget
TGFrame * BuildListBox()
 Helper method to create TGListBox widget
TGFrame * BuildComboBox()
 Helper method to create TGComboBox widget
TGFrame * BuildH3DLine()
 Helper method to create TGHorizontal3DLine widget.
TGFrame * BuildV3DLine()
 Helper method to create TGVertical3DLine widget.
TGFrame * BuildHScrollBar()
 Helper method to create TGHScrollBar
TGFrame * BuildVScrollBar()
 Helper method to create TGVScrollBar
TGFrame * BuildHProgressBar()
 Helper method to create TGHProgressBar
TGFrame * BuildVProgressBar()
 Helper method to create TGVProgressBar
TRootGuiBuilder(const TGWindow *p = 0)
void Show()

Author: Valeriy Onuchin 12/09/04
Last update: root/guibuilder:$Name: $:$Id: TRootGuiBuilder.cxx,v 1.40 2006/07/06 06:30:13 brun Exp $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.