library: libGui #include "TGFrame.h" |
TGFrame
class description - source file - inheritance tree (.ps)
protected:
virtual void DoRedraw()
virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
static Time_t GetLastClick()
TString GetOptionString() const
const TGResourcePool* GetResourcePool() const
virtual void* GetSender()
virtual Bool_t HandleEditEvent(Event_t*)
virtual Bool_t IsEditEvent(Event_t*) const
virtual Bool_t OnContextMenu(Event_t*)
public:
TGFrame(const TGWindow* p, UInt_t w, UInt_t h, UInt_t options = 0, Pixel_t back = GetDefaultFrameBackground())
TGFrame(TGClient* c, Window_t id, const TGWindow* parent = 0)
TGFrame(const TGFrame&)
virtual ~TGFrame()
virtual void Activate(Bool_t)
void AddInput(UInt_t emask)
virtual void ChangeBackground(Pixel_t back)
virtual void ChangeOptions(UInt_t options)
static TClass* Class()
Bool_t Contains(Int_t x, Int_t y) const
virtual void DeleteWindow()
virtual void DrawBorder()
virtual void DrawCopy(Handle_t, Int_t, Int_t)
virtual Pixel_t GetBackground() const
static const TGGC& GetBckgndGC() const
static const TGGC& GetBlackGC() const
static Pixel_t GetBlackPixel()
Int_t GetBorderWidth() const
static Pixel_t GetDefaultFrameBackground()
virtual UInt_t GetDefaultHeight() const
static Pixel_t GetDefaultSelectedBackground()
virtual TGDimension GetDefaultSize() const
virtual UInt_t GetDefaultWidth() const
UInt_t GetEventMask() const
virtual TGFrame* GetFrameFromPoint(Int_t x, Int_t y)
UInt_t GetHeight() const
static const TGGC& GetHilightGC() const
virtual UInt_t GetOptions() const
static const TGGC& GetShadowGC() const
TGDimension GetSize() const
static const TGGC& GetWhiteGC() const
static Pixel_t GetWhitePixel()
UInt_t GetWidth() const
Int_t GetX() const
Int_t GetY() const
virtual Bool_t HandleButton(Event_t*)
virtual Bool_t HandleClientMessage(Event_t* event)
virtual Bool_t HandleColormapChange(Event_t*)
virtual Bool_t HandleConfigureNotify(Event_t* event)
virtual Bool_t HandleCrossing(Event_t*)
virtual Bool_t HandleDoubleClick(Event_t*)
virtual Bool_t HandleEvent(Event_t* event)
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 Bool_t HandleSelectionClear(Event_t*)
virtual Bool_t HandleSelectionRequest(Event_t*)
virtual TClass* IsA() const
virtual Bool_t IsActive() const
virtual Bool_t IsComposite() const
virtual Bool_t IsEditable() const
virtual void Layout()
virtual void MapSubwindows()
virtual void Move(Int_t x, Int_t y)
virtual void MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0)
virtual void Print(Option_t* option) const
virtual void ProcessedEvent(Event_t* event)
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
virtual void ReallyDelete()
void RemoveInput(UInt_t emask)
virtual void Resize(UInt_t w = 0, UInt_t h = 0)
virtual void Resize(TGDimension size)
virtual void SavePrimitive(ofstream& out, Option_t* option)
void SaveUserColor(ofstream& out, Option_t*)
virtual void SendMessage(const TGWindow* w, Long_t msg, Long_t parm1, Long_t parm2)
virtual void SetBackgroundColor(Pixel_t back)
virtual void SetEditable(Bool_t)
void SetHeight(UInt_t h)
void SetSize(const TGDimension& s)
void SetWidth(UInt_t w)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
protected:
Int_t fX frame x position
Int_t fY frame y position
UInt_t fWidth frame width
UInt_t fHeight frame height
Int_t fBorderWidth frame border width
UInt_t fOptions frame options
Pixel_t fBackground frame background color
UInt_t fEventMask currenty active event mask
static Bool_t fgInit
static Pixel_t fgDefaultFrameBackground
static Pixel_t fgDefaultSelectedBackground
static Pixel_t fgWhitePixel
static Pixel_t fgBlackPixel
static const TGGC* fgBlackGC
static const TGGC* fgWhiteGC
static const TGGC* fgHilightGC
static const TGGC* fgShadowGC
static const TGGC* fgBckgndGC
static Time_t fgLastClick
static UInt_t fgLastButton
static Int_t fgDbx
static Int_t fgDby
static Window_t fgDbw
static UInt_t fgUserColor
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.
/*
*/
TGFrame(const TGWindow *p, UInt_t w, UInt_t h,
UInt_t options, ULong_t back)
: TGWindow(p, 0, 0, w, h, 0, 0, 0, 0, 0, options)
Create a TGFrame object. Options is an OR of the EFrameTypes.
TGFrame(TGClient *c, Window_t id, const TGWindow *parent)
: TGWindow(c, id, parent)
Create a frame using an externally created window. For example
to register the root window (called by TGClient), or a window
created via TVirtualX::InitWindow() (id is obtained with
TVirtualX::GetWindowID()).
void DeleteWindow()
Delete window. Use single shot timer to call final delete method.
We use this inderect way since deleting the window in its own
execution "thread" can cause side effects because frame methods
can still be called while the window object has already been deleted.
void ChangeBackground(ULong_t back)
Change frame background color.
void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Same effect as ChangeBackground().
void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
void Draw3dRectangle(UInt_t type, Int_t x, Int_t y,
UInt_t w, UInt_t h)
void DrawBorder()
Draw frame border.
void DoRedraw()
Redraw the frame.
Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
Bool_t HandleEvent(Event_t *event)
Handle all frame events. Events are dispatched to the specific
event handlers.
void Move(Int_t x, Int_t y)
Move frame.
void Resize(UInt_t w, UInt_t h)
Resize the frame.
If w=0 && h=0 - Resize to deafult size
void Resize(TGDimension size)
Resize the frame.
void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and/or resize the frame.
If w=0 && h=0 - Resize to deafult size
void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e. event) to window w. Message is encoded in one long
as message type and up to two long parameters.
Bool_t HandleClientMessage(Event_t *event)
Handle a client message. Client messages are the ones sent via
TGFrame::SendMessage (typically by widgets).
ULong_t GetDefaultFrameBackground()
Get default frame background.
ULong_t GetDefaultSelectedBackground()
Get default selected frame background.
ULong_t GetWhitePixel()
Get white pixel value.
ULong_t GetBlackPixel()
Get black pixel value.
const TGGC& GetBlackGC()
Get black graphics context.
const TGGC& GetWhiteGC()
Get white graphics context.
const TGGC& GetHilightGC()
Get highlight color graphics context.
const TGGC& GetShadowGC()
Get shadow color graphics context.
const TGGC& GetBckgndGC()
Get background color graphics context.
Time_t GetLastClick()
Get time of last mouse click.
void Print(Option_t *option) const
Print window id.
void SaveUserColor(ofstream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
void SavePrimitive(ofstream &out, Option_t *option)
Save a frame widget as a C++ statement(s) on output stream out.
Inline Functions
void ~TGFrame()
void* GetSender()
const TGResourcePool* GetResourcePool() const
Bool_t HandleEditEvent(Event_t*)
Bool_t OnContextMenu(Event_t*)
Bool_t IsEditEvent(Event_t*) const
void ReallyDelete()
UInt_t GetEventMask() const
Bool_t HandleButton(Event_t*)
Bool_t HandleDoubleClick(Event_t*)
Bool_t HandleCrossing(Event_t*)
Bool_t HandleMotion(Event_t*)
Bool_t HandleKey(Event_t*)
Bool_t HandleFocusChange(Event_t*)
Bool_t HandleSelection(Event_t*)
Bool_t HandleSelectionRequest(Event_t*)
Bool_t HandleSelectionClear(Event_t*)
Bool_t HandleColormapChange(Event_t*)
void ProcessedEvent(Event_t* event)
Bool_t ProcessMessage(Long_t, Long_t, Long_t)
TGDimension GetDefaultSize() const
UInt_t GetDefaultWidth() const
UInt_t GetDefaultHeight() const
Pixel_t GetBackground() const
UInt_t GetOptions() const
void Layout()
void MapSubwindows()
void DrawCopy(Handle_t, Int_t, Int_t)
void Activate(Bool_t)
Bool_t IsActive() const
Bool_t IsComposite() const
Bool_t IsEditable() const
void SetEditable(Bool_t)
UInt_t GetWidth() const
UInt_t GetHeight() const
TGDimension GetSize() const
Int_t GetX() const
Int_t GetY() const
Int_t GetBorderWidth() const
Bool_t Contains(Int_t x, Int_t y) const
TGFrame* GetFrameFromPoint(Int_t x, Int_t y)
void SetWidth(UInt_t w)
void SetHeight(UInt_t h)
void SetSize(const TGDimension& s)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TGFrame TGFrame(const TGFrame&)
Author: Fons Rademakers 03/01/98
Last update: root/gui:$Name: $:$Id: TGFrame.cxx,v 1.59 2004/06/25 17:15:23 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.