library: libGui #include "TGFrame.h" |
TGCompositeFrame
class description - header file - source file - inheritance tree (.pdf)
public:
TGCompositeFrame(const TGWindow* p = 0, UInt_t w = 1, UInt_t h = 1, UInt_t options = 0, Pixel_t back = GetDefaultFrameBackground())
TGCompositeFrame(TGClient* c, Window_t id, const TGWindow* parent = 0)
TGCompositeFrame(const TGCompositeFrame&)
virtual ~TGCompositeFrame()
virtual void AddFrame(TGFrame* f, TGLayoutHints* l = 0)
virtual void ChangeOptions(UInt_t options)
virtual void ChangeSubframesBackground(Pixel_t back)
static TClass* Class()
virtual void Cleanup()
virtual UInt_t GetDefaultHeight() const
virtual TGDimension GetDefaultSize() const
virtual UInt_t GetDefaultWidth() const
virtual TGFrame* GetFrameFromPoint(Int_t x, Int_t y)
virtual TGLayoutManager* GetLayoutManager() const
virtual TList* GetList() const
Int_t GetState(TGFrame* f) const
virtual Bool_t HandleButton(Event_t*)
virtual Bool_t HandleCrossing(Event_t*)
virtual Bool_t HandleDoubleClick(Event_t*)
virtual Bool_t HandleDragDrop(TGFrame* frame, Int_t x, Int_t y, TGLayoutHints* lo)
virtual Bool_t HandleDragEnter(TGFrame*)
virtual Bool_t HandleDragLeave(TGFrame*)
virtual Bool_t HandleDragMotion(TGFrame*)
virtual Bool_t HandleFocusChange(Event_t*)
virtual Bool_t HandleKey(Event_t*)
virtual Bool_t HandleMotion(Event_t*)
virtual Bool_t HandleSelection(Event_t*)
virtual void HideFrame(TGFrame* f)
virtual TClass* IsA() const
Bool_t IsArranged(TGFrame* f) const
Bool_t IsArranged(TGFrameElement* ptr) const
virtual Bool_t IsComposite() const
virtual Bool_t IsEditable() const
virtual Bool_t IsLayoutBroken() const
virtual Bool_t IsMapSubwindows() const
Bool_t IsVisible(TGFrame* f) const
Bool_t IsVisible(TGFrameElement* ptr) const
virtual void Layout()
virtual void MapSubwindows()
virtual Int_t MustCleanup() const
TGCompositeFrame& operator=(const TGCompositeFrame&)
virtual void Print(Option_t* option = "") const
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
virtual void RemoveFrame(TGFrame* f)
virtual void SavePrimitive(ostream& out, Option_t* option = "")
virtual void SavePrimitiveSubframes(ostream& out, Option_t* option = "")
virtual void SetCleanup(Int_t mode = kLocalCleanup)
virtual void SetEditable(Bool_t on = kTRUE)
virtual void SetEditDisabled(UInt_t on = 1)
virtual void SetLayoutBroken(Bool_t on = kTRUE)
virtual void SetLayoutManager(TGLayoutManager* l)
virtual void SetMapSubwindows(Bool_t on)
virtual void ShowFrame(TGFrame* f)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual Bool_t TranslateCoordinates(TGFrame* child, Int_t x, Int_t y, Int_t& fx, Int_t& fy)
protected:
TGLayoutManager* fLayoutManager layout manager
TList* fList container of frame elements
Bool_t fLayoutBroken no layout manager is used
Int_t fMustCleanup cleanup mode (see EFrameCleanup)
Bool_t fMapSubwindows kTRUE - map subwindows
static TGLayoutHints* fgDefaultHints default hints used by AddFrame()
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.
void Cleanup()
Cleanup and delete all objects contained in this composite frame.
This will delete all objects added via AddFrame().
CAUTION: all objects (frames and layout hints) must be unique, i.e.
cannot be shared.
void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
The layout manager is adopted by the frame and will be deleted
by the frame.
void SetEditDisabled(UInt_t on)
Set edit disable flag for this frame and subframes
- if (on & kEditDisable) - disable edit for this frame and all subframes.
void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
void SetCleanup(Int_t mode)
Turn on automatic cleanup of child frames in dtor.
if mode = kNoCleanup - no automatic cleanup
if mode = kLocalCleanup - automatic cleanup in this composite frame only
if mode = kDeepCleanup - automatic deep cleanup in this composite frame
and all child composite frames (hierarchical)
Attention!
Hierarchical cleaning is dangerous and must be used with caution.
There are many GUI components (in ROOT and in user code) which do not
use Clean method in destructor ("custom deallocation").
Adding such component to GUI container which is using hierarchical
cleaning will produce seg. violation when container is deleted.
The reason is double deletion: first whem Clean method is invoked,
then at "custom deallocation".
We are going to correct all ROOT code to make it to be
consitent with hierarchical cleaning scheeme.
void AddFrame(TGFrame *f, TGLayoutHints *l)
Add frame to the composite frame using the specified layout hints.
If no hints are specified default hints TGLayoutHints(kLHintsNormal,0,0,0,0)
will be used. Most of the time, however, you will want to provide
specific hints. User specified hints can be reused many times
and need to be destroyed by the user. The added frames cannot not be
added to different composite frames but still need to be deleted by
the user.
void MapSubwindows()
Map all sub windows that are part of the composite frame.
Author: Fons Rademakers 03/01/98
Last update: root/gui:$Name: $:$Id: TGFrame.cxx,v 1.137 2006/07/09 05:27:54 brun Exp $
Copyright (C) 1995-2000, 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.