TGMainFrame


class description - source file - inheritance tree

class TGMainFrame : public TGCompositeFrame


    public:
TGMainFrame(const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = kVerticalFrame) TGMainFrame(const TGMainFrame&) virtual ~TGMainFrame() virtual Bool_t BindKey(const TGWindow* w, Int_t keycode, Int_t modifier) const static TClass* Class() virtual void CloseWindow() void DontCallClose() void GetClassHints(const char*& className, const char*& resourceName) const virtual const char* GetIconName() const const char* GetIconPixmap() const virtual const TGWindow* GetMainFrame() const void GetMWMHints(UInt_t& value, UInt_t& funcs, UInt_t& input) const const char* GetWindowName() const void GetWMPosition(Int_t& x, Int_t& y) const void GetWMSize(UInt_t& w, UInt_t& h) const void GetWMSizeHints(UInt_t& wmin, UInt_t& hmin, UInt_t& wmax, UInt_t& hmax, UInt_t& winc, UInt_t& hinc) const EInitialState GetWMState() const virtual Bool_t HandleClientMessage(Event_t* event) virtual Bool_t HandleKey(Event_t* event) virtual TClass* IsA() const virtual void RemoveBind(const TGWindow* w, Int_t keycode, Int_t modifier) const virtual void SendCloseMessage() void SetClassHints(const char* className, const char* resourceName) void SetIconName(const char* name) void SetIconPixmap(const char* iconName) void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input) void SetWindowName(const char* name) void SetWMPosition(Int_t x, Int_t y) void SetWMSize(UInt_t w, UInt_t h) void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc) void SetWMState(EInitialState state) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
TList* fBindList list with key bindings TString fWindowName window name TString fIconName icon name TString fIconPixmap icon pixmap name TString fClassName WM class name TString fResourceName WM resource name UInt_t fMWMValue MWM decoration hints UInt_t fMWMFuncs MWM functions UInt_t fMWMInput MWM input modes Int_t fWMX WM x position Int_t fWMY WM y position UInt_t fWMWidth WM width UInt_t fWMHeight WM height UInt_t fWMMinWidth WM min width UInt_t fWMMinHeight WM min height UInt_t fWMMaxWidth WM max width UInt_t fWMMaxHeight WM max height UInt_t fWMWidthInc WM width increments UInt_t fWMHeightInc WM height increments EInitialState fWMInitState WM initial state public:
static const enum TGMainFrame:: kDontCallClose


See also

TGTransientFrame, TRootBrowser, TRootCanvas, TRootControlBar, TTreeViewer, TViewerX3D

Class Description

                                                                      
 TGFrame, TGCompositeFrame, TGVerticalFrame, TGHorizontalFrame,       
 TGMainFrame, TGTransientFrame and TGGroupFrame                       
                                                                      
 The frame classes describe the different "dressed" GUI windows.      
                                                                      
 The TGFrame class is a subclasses of TGWindow, and is used as base   
 class for some simple widgets (buttons, labels, etc.).               
 It provides:                                                         
  - position & dimension fields                                       
  - an 'options' attribute (see constant above)                       
  - a generic event handler                                           
  - a generic layout mechanism                                        
  - a generic border                                                  
                                                                      
 The TGCompositeFrame class is the base class for composite widgets   
 (menu bars, list boxes, etc.).                                       
 It provides:                                                         
  - a layout manager                                                  
  - a frame container (TList *)                                       
                                                                      
 The TGVerticalFrame and TGHorizontalFrame are composite frame that   
 layout their children in vertical or horizontal way.                 
                                                                      
 The TGMainFrame class defines top level windows that interact with   
 the system Window Manager.                                           
                                                                      
 The TGTransientFrame class defines transient windows that typically  
 are used for dialogs windows.                                        
                                                                      
 The TGGroupFrame is a composite frame with a border and a title.     
 It is typically used to group a number of logically related widgets  
 visually together.                                                   
                                                                      

/*

*/



TGMainFrame(const TGWindow *p, UInt_t w, UInt_t h, UInt_t options) : TGCompositeFrame(p, w, h, options | kMainFrame)
 Create a top level main frame. A main frame interacts
 with the window manager.

~TGMainFrame()
 TGMainFrame destructor.

Bool_t HandleKey(Event_t *event)
 Handle keyboard events.

Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
 Bind key to a window.

void RemoveBind(const TGWindow *, Int_t keycode, Int_t modifier) const
 Remove key binding.

Bool_t HandleClientMessage(Event_t *event)
 Handle client messages sent to this frame.

void SendCloseMessage()
 Send close message to self. This method should be called from
 a button to close this window.

void CloseWindow()
 Close main frame. We get here in response to ALT+F4 or a window
 manager close command. To terminate the application when this
 happens override this method and call gApplication->Terminate(0) or
 make a connection to this signal. If not the window will be just
 destroyed and can not be used anymore.

void DontCallClose()
 Typically call this method in the slot connected to the CloseWindow()
 signal to prevent the calling of the default or any derived CloseWindow()
 methods to prevent premature or double deletion of this window.

void SetWindowName(const char *name)
 Set window name. This is typically done via the window manager.

void SetIconName(const char *name)
 Set window icon name. This is typically done via the window manager.

void SetIconPixmap(const char *iconName)
 Set window icon pixmap by name. This is typically done via the window
 manager.

void SetClassHints(const char *className, const char *resourceName)
 Set the windows class and resource name. Used to get the right
 resources from the resource database. However, ROOT applications
 will typically use the .rootrc file for this.

void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
 Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).

void SetWMPosition(Int_t x, Int_t y)
 Give the window manager a window position hint.

void SetWMSize(UInt_t w, UInt_t h)
 Give the window manager a window size hint.

void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
 Give the window manager minimum and maximum size hints. Also
 specify via winc and hinc the resize increments.

void SetWMState(EInitialState state)
 Set the initial state of the window. Either kNormalState or kIconicState.



Inline Functions


            const char* GetWindowName() const
            const char* GetIconName() const
            const char* GetIconPixmap() const
                   void GetClassHints(const char*& className, const char*& resourceName) const
                   void GetMWMHints(UInt_t& value, UInt_t& funcs, UInt_t& input) const
                   void GetWMPosition(Int_t& x, Int_t& y) const
                   void GetWMSize(UInt_t& w, UInt_t& h) const
                   void GetWMSizeHints(UInt_t& wmin, UInt_t& hmin, UInt_t& wmax, UInt_t& hmax, UInt_t& winc, UInt_t& hinc) const
          EInitialState GetWMState() const
        const TGWindow* GetMainFrame() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
            TGMainFrame TGMainFrame(const TGMainFrame&)


Author: Fons Rademakers 03/01/98
Last update: root/gui:$Name: $:$Id: TGFrame.cxx,v 1.24 2003/05/12 16:44:08 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - 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.