ROOT logo
ROOT » GUI » GUI » TGPopupMenu

class TGPopupMenu: public TGFrame


TGMenuBar, TGPopupMenu, TGMenuTitle and TGMenuEntry

The TGMenu.h header contains all different menu classes.

The TGMenuBar class implements a menu bar widget. It is used to
specify and provide access to common and frequently used application
actions grouped under menu titles (TGMenuTitle class). The menu bar
takes the highest-level of the menu system and it is a starting
point for many interactions. It is always visible and allows using
the keyboard equivalents. The geometry of the menu bar is
automatically set to the parent widget, i.e. the menu bar
automatically resizes itself so that it has the same width as its
parent (typically TGMainFrame). A menu bar contains one or more
popup menus and usually is placed along the top of the application
window. Any popup menu is invisible until the user invokes it by
using the mouse pointer or the keyboard.

Popup menus implemented by TGPopupMenu class are unique in that,
by convention, they are not placed with the other GUI components in
the user interfaces. Instead, a popup menu usually appears either in
a menu bar or as a context menu on the TOP of the GUI. For that
reason it needs gClient->GetDefaultRoot() as a parent to get the
pointer to the root (i.e. desktop) window. This way a popup menu
will never be embedded.
NOTE: Using gClient->GetRoot() as a parent of TGPopupMenu will not
avoid the possibility of embedding the corresponding popup menu
because the current window hierarchy can be changed by using
gClient->SetRoot() method.

As a context menus TGPopupMenu shows up after pressing the right
mouse button, over a popup-enabled component. The popup menu then
appears under the mouse pointer.

Selecting a menu item will generate the event:
kC_COMMAND, kCM_MENU, menu id, user data.


Function Members (Methods)

public:
TGPopupMenu(const TGWindow* p = 0, UInt_t w = 10, UInt_t h = 10, UInt_t options = 0)
virtual~TGPopupMenu()
voidTObject::AbstractMethod(const char* method) const
virtual voidActivate(Bool_t)
virtual voidActivate(TGMenuEntry* entry)
virtual voidActivated(Int_t id)SIGNAL
virtual voidAddEntry(TGHotString* s, Int_t id, void* ud = 0, const TGPicture* p = 0, TGMenuEntry* before = 0)
virtual voidAddEntry(const char* s, Int_t id, void* ud = 0, const TGPicture* p = 0, TGMenuEntry* before = 0)
voidTGFrame::AddInput(UInt_t emask)
virtual voidAddLabel(TGHotString* s, const TGPicture* p = 0, TGMenuEntry* before = 0)
virtual voidAddLabel(const char* s, const TGPicture* p = 0, TGMenuEntry* before = 0)
virtual voidAddPopup(TGHotString* s, TGPopupMenu* popup, TGMenuEntry* before = 0, const TGPicture* p = 0)
virtual voidAddPopup(const char* s, TGPopupMenu* popup, TGMenuEntry* before = 0, const TGPicture* p = 0)
virtual voidAddSeparator(TGMenuEntry* before = 0)
virtual voidTObject::AppendPad(Option_t* option = "")
static Bool_tTQObject::AreAllSignalsBlocked()
Bool_tTQObject::AreSignalsBlocked() const
virtual voidAssociate(const TGWindow* w)
static Bool_tTQObject::BlockAllSignals(Bool_t b)
Bool_tTQObject::BlockSignals(Bool_t b)
virtual voidTObject::Browse(TBrowser* b)
virtual voidTGFrame::ChangeBackground(Pixel_t back)
virtual voidTQObject::ChangedBy(const char* method)SIGNAL
virtual voidTGFrame::ChangeOptions(UInt_t options)
virtual voidCheckEntry(Int_t id)
virtual voidCheckEntryByData(void* user_data)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
voidTQObject::CollectClassSignalLists(TList& list, TClass* cls)
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tTQObject::Connect(const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(TQObject* sender, const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(const char* sender_class, const char* signal, const char* receiver_class, void* receiver, const char* slot)
virtual voidTQObject::Connected(const char*)
Bool_tTGFrame::Contains(Int_t x, Int_t y) const
virtual voidTObject::Copy(TObject& object) const
virtual voidDefaultEntry(Int_t id)
virtual voidTGFrame::Delete(Option_t* = "")
virtual voidDeleteEntry(Int_t id)
virtual voidDeleteEntry(TGMenuEntry* entry)
virtual voidTGFrame::DeleteWindow()
virtual voidTQObject::Destroyed()SIGNAL
virtual voidTGWindow::DestroySubwindows()
virtual voidTGWindow::DestroyWindow()
virtual voidDisableEntry(Int_t id)
Bool_tTQObject::Disconnect(const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(TQObject* sender, const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(const char* class_name, const char* signal, void* receiver = 0, const char* slot = 0)
virtual voidTQObject::Disconnected(const char*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidDrawBorder()
virtual voidTGFrame::DrawClass() const
virtual TObject*TGFrame::DrawClone(Option_t* = "") const
virtual voidTGFrame::DrawCopy(Handle_t, Int_t, Int_t)
virtual voidTGFrame::Dump() const
voidTQObject::Emit(const char* signal)
voidTQObject::Emit(const char* signal, Long_t* paramArr)
voidTQObject::Emit(const char* signal, const char* params)
voidTQObject::Emit(const char* signal, Double_t param)
voidTQObject::Emit(const char* signal, Long_t param)
voidTQObject::Emit(const char* signal, Long64_t param)
voidTQObject::Emit(const char* signal, Bool_t param)
voidTQObject::Emit(const char* signal, Char_t param)
voidTQObject::Emit(const char* signal, UChar_t param)
voidTQObject::Emit(const char* signal, Short_t param)
voidTQObject::Emit(const char* signal, UShort_t param)
voidTQObject::Emit(const char* signal, Int_t param)
voidTQObject::Emit(const char* signal, UInt_t param)
voidTQObject::Emit(const char* signal, ULong_t param)
voidTQObject::Emit(const char* signal, ULong64_t param)
voidTQObject::Emit(const char* signal, Float_t param)
voidTQObject::EmitVA(const char* signal, Int_t nargs)
voidTQObject::EmitVA(const char* signal, Int_t nargs, va_list va)
virtual voidEnableEntry(Int_t id)
virtual Int_tEndMenu(void*& userData)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Pixel_tTGFrame::GetBackground() const
static const TGGC&TGFrame::GetBckgndGC()
static const TGGC&TGFrame::GetBlackGC()
static Pixel_tTGFrame::GetBlackPixel()
Int_tTGFrame::GetBorderWidth() const
TGClient*TGObject::GetClient() const
static Int_tTGWindow::GetCounter()
virtual TGMenuEntry*GetCurrent() const
static Pixel_tTGFrame::GetDefaultFrameBackground()
virtual UInt_tTGFrame::GetDefaultHeight() const
static Pixel_tTGFrame::GetDefaultSelectedBackground()
virtual TGDimensionTGFrame::GetDefaultSize() const
virtual UInt_tTGFrame::GetDefaultWidth() const
virtual TDNDData*TGFrame::GetDNDData(Atom_t)
virtual Int_tTGFrame::GetDragType() const
virtual Option_t*TObject::GetDrawOption() const
virtual Int_tTGFrame::GetDropType() const
static Long_tTObject::GetDtorOnly()
virtual UInt_tTGWindow::GetEditDisabled() const
virtual TGMenuEntry*GetEntry(Int_t id)
virtual TGMenuEntry*GetEntry(const char* s)
UInt_tGetEntrySep() const
UInt_tTGFrame::GetEventMask() const
virtual Pixel_tTGFrame::GetForeground() const
TGFrameElement*TGFrame::GetFrameElement() const
virtual TGFrame*TGFrame::GetFrameFromPoint(Int_t x, Int_t y)
UInt_tTGFrame::GetHeight() const
static const TGGC&TGFrame::GetHilightGC()
virtual const char*TObject::GetIconName() const
Handle_tTGObject::GetId() const
TList*TQObject::GetListOfClassSignals() const
TList*TQObject::GetListOfConnections() const
const TList*GetListOfEntries() const
TList*TQObject::GetListOfSignals() const
virtual const TGWindow*TGWindow::GetMainFrame() const
UInt_tTGFrame::GetMaxHeight() const
UInt_tTGFrame::GetMaxWidth() const
TGMenuBar*GetMenuBar() const
UInt_tTGFrame::GetMinHeight() const
UInt_tTGFrame::GetMinWidth() const
virtual const char*TGWindow::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual UInt_tTGFrame::GetOptions() const
const TGWindow*TGWindow::GetParent() const
static const TGGC&TGFrame::GetShadowGC()
TGDimensionTGFrame::GetSize() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
static const TGGC&TGFrame::GetWhiteGC()
static Pixel_tTGFrame::GetWhitePixel()
UInt_tTGFrame::GetWidth() const
Int_tTGFrame::GetX() const
Int_tTGFrame::GetY() const
virtual Bool_tHandleButton(Event_t* event)
virtual Bool_tTGFrame::HandleClientMessage(Event_t* event)
virtual Bool_tTGFrame::HandleColormapChange(Event_t*)
virtual Bool_tTGFrame::HandleConfigureNotify(Event_t* event)
virtual Bool_tHandleCrossing(Event_t* event)
virtual Bool_tTGFrame::HandleDNDDrop(TDNDData*)
virtual Atom_tTGFrame::HandleDNDEnter(Atom_t*)
virtual Bool_tTGFrame::HandleDNDFinished()
virtual Bool_tTGFrame::HandleDNDLeave()
virtual Atom_tTGFrame::HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
virtual Bool_tTGFrame::HandleDoubleClick(Event_t*)
virtual Bool_tTGFrame::HandleDragDrop(TGFrame*, Int_t, Int_t, TGLayoutHints*)
virtual Bool_tTGFrame::HandleDragEnter(TGFrame*)
virtual Bool_tTGFrame::HandleDragLeave(TGFrame*)
virtual Bool_tTGFrame::HandleDragMotion(TGFrame*)
virtual Bool_tTGFrame::HandleEvent(Event_t* event)
virtual Bool_tTGWindow::HandleExpose(Event_t* event)
virtual Bool_tTGFrame::HandleFocusChange(Event_t*)
virtual Bool_tTGWindow::HandleIdleEvent(TGIdleHandler*)
virtual Bool_tTGFrame::HandleKey(Event_t*)
virtual Bool_tHandleMotion(Event_t* event)
virtual Bool_tTGFrame::HandleSelection(Event_t*)
virtual Bool_tTGFrame::HandleSelectionClear(Event_t*)
virtual Bool_tTGFrame::HandleSelectionRequest(Event_t*)
virtual Bool_tHandleTimer(TTimer* t)
virtual Bool_tTQObject::HasConnection(const char* signal_name) const
virtual ULong_tTGObject::Hash() const
virtual voidHideEntry(Int_t id)
virtual voidHighlighted(Int_t id)SIGNAL
virtual voidTQObject::HighPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTGWindow::IconifyWindow()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTGFrame::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTGFrame::IsActive() const
virtual Bool_tTGFrame::IsComposite() const
Bool_tTGFrame::IsDNDSource() const
Bool_tTGFrame::IsDNDTarget() const
virtual Bool_tTGFrame::IsEditable() const
virtual Bool_tIsEntryChecked(Int_t id)
virtual Bool_tIsEntryEnabled(Int_t id)
virtual Bool_tIsEntryHidden(Int_t id)
virtual Bool_tIsEntryRChecked(Int_t id)
virtual Bool_tTGObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tTGFrame::IsLayoutBroken() const
virtual Bool_tTGWindow::IsMapped()
virtual Bool_tTGWindow::IsMapSubwindows() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTGFrame::Layout()
static voidTQObject::LoadRQ_OBJECT()
virtual voidTGWindow::LowerWindow()
virtual voidTQObject::LowPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTObject::ls(Option_t* option = "") const
virtual voidTGFrame::MapRaised()
virtual voidTGFrame::MapSubwindows()
virtual voidTGFrame::MapWindow()
voidTObject::MayNotUse(const char* method) const
virtual voidTQObject::Message(const char* msg)SIGNAL
virtual voidTGFrame::Move(Int_t x, Int_t y)
virtual voidTGFrame::MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0)
virtual Int_tTGWindow::MustCleanup() const
virtual Bool_tTObject::Notify()
virtual Int_tTQObject::NumberOfConnections() const
virtual Int_tTQObject::NumberOfSignals() const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidPlaceMenu(Int_t x, Int_t y, Bool_t stick_mode, Bool_t grab_pointer)
virtual voidTObject::Pop()
virtual voidPoppedDown()SIGNAL
virtual voidPoppedUp()SIGNAL
virtual voidTGFrame::Print(Option_t* option = "") const
virtual voidTGFrame::ProcessedConfigure(Event_t* event)SIGNAL
virtual voidTGFrame::ProcessedEvent(Event_t* event)SIGNAL
virtual Bool_tTGFrame::ProcessMessage(Long_t, Long_t, Long_t)
virtual voidTGWindow::RaiseWindow()
virtual voidRCheckEntry(Int_t id, Int_t IDfirst, Int_t IDlast)
virtual Int_tTObject::Read(const char* name)
virtual voidTGFrame::ReallyDelete()
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTGFrame::RemoveInput(UInt_t emask)
virtual voidTGFrame::ReparentWindow(const TGWindow* p, Int_t x = 0, Int_t y = 0)
virtual voidTGWindow::RequestFocus()
voidTObject::ResetBit(UInt_t f)
virtual voidTGFrame::Resize(TGDimension size)
virtual voidTGFrame::Resize(UInt_t w = 0, UInt_t h = 0)
virtual voidTGObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidSavePrimitive(ostream& out, Option_t* option = "")
voidTGFrame::SaveUserColor(ostream& out, Option_t*)
virtual voidTGFrame::SendMessage(const TGWindow* w, Long_t msg, Long_t parm1, Long_t parm2)
virtual voidTGFrame::SetBackgroundColor(Pixel_t back)
virtual voidTGWindow::SetBackgroundPixmap(Pixmap_t pixmap)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTGFrame::SetCleanup(Int_t = kLocalCleanup)
voidTGFrame::SetDNDSource(Bool_t onoff)
voidTGFrame::SetDNDTarget(Bool_t onoff)
virtual voidTGFrame::SetDragType(Int_t type)
virtual voidTGFrame::SetDrawOption(Option_t* = "")
virtual voidTGFrame::SetDropType(Int_t type)
static voidTObject::SetDtorOnly(void* obj)
virtual voidTGFrame::SetEditable(Bool_t)
virtual voidTGWindow::SetEditDisabled(UInt_t on = kEditDisable)
virtual voidSetEntrySep(UInt_t sep)
virtual voidTGFrame::SetForegroundColor(Pixel_t)
voidTGFrame::SetFrameElement(TGFrameElement* fe)
virtual voidTGFrame::SetHeight(UInt_t h)
virtual voidTGFrame::SetLayoutBroken(Bool_t = kTRUE)
virtual voidTGWindow::SetMapSubwindows(Bool_t)
virtual voidTGFrame::SetMaxHeight(UInt_t h)
virtual voidTGFrame::SetMaxWidth(UInt_t w)
virtual voidSetMenuBar(TGMenuBar* bar)
virtual voidTGFrame::SetMinHeight(UInt_t h)
virtual voidTGFrame::SetMinWidth(UInt_t w)
virtual voidTGWindow::SetName(const char* name)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTGFrame::SetSize(const TGDimension& s)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidTGFrame::SetWidth(UInt_t w)
virtual voidTGWindow::SetWindowName(const char* name = 0)
virtual voidTGFrame::SetX(Int_t x)
virtual voidTGFrame::SetY(Int_t y)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidUnCheckEntries()
virtual voidUnCheckEntry(Int_t id)
virtual voidUnCheckEntryByData(void* user_data)
virtual voidTGFrame::UnmapWindow()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
static Int_tTQObject::CheckConnectArgs(TQObject* sender, TClass* sender_class, const char* signal, TClass* receiver_class, const char* slot)
static Bool_tTQObject::ConnectToClass(TQObject* sender, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::ConnectToClass(const char* sender_class, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidDoRedraw()
virtual voidTGFrame::Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
voidDrawCheckMark(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
virtual voidDrawEntry(TGMenuEntry* entry)
voidDrawRCheckMark(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
voidDrawTrianglePattern(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
static FontStruct_tGetDefaultFontStruct()
static const TGGC&GetDefaultGC()
static const TGGC&GetDefaultSelectedBackgroundGC()
static const TGGC&GetDefaultSelectedGC()
static FontStruct_tGetHilightFontStruct()
static Time_tTGFrame::GetLastClick()
TStringTGFrame::GetOptionString() const
const TGResourcePool*TGFrame::GetResourcePool() const
virtual void*TGFrame::GetSender()
virtual const char*TQObject::GetSenderClassName() const
voidTObject::MakeZombie()
virtual voidReposition()
virtual voidTGFrame::StartGuiBuilding(Bool_t on = kTRUE)

Data Members

protected:
Pixel_tTGFrame::fBackgroundframe background color
Int_tTGFrame::fBorderWidthframe border width
TGClient*TGObject::fClientConnection to display server
TGMenuEntry*fCurrentcurrently selected menu entry
Int_tTGFrame::fDNDStateEDNDFlags
Cursor_tfDefaultCursorright pointing cursor
TTimer*fDelaydelay before poping up cascading menu
UInt_tTGWindow::fEditDisabledflags used for "guibuilding"
TList*fEntryListlist of menu entries
UInt_tfEntrySepseparation distance between ebtris
UInt_tTGFrame::fEventMaskcurrenty active event mask
TGFrameElement*TGFrame::fFEpointer to frame element
FontStruct_tfFontStructfont to draw menu entries
Bool_tfHasGrabtrue if menu has grabbed pointer
UInt_tTGFrame::fHeightframe height
FontStruct_tfHifontStructfont to draw highlighted entries
Handle_tTGObject::fIdX11/Win32 Window identifier
TList*TQObject::fListOfConnections! list of connections to this object
TList*TQObject::fListOfSignals! list of signals from this object
UInt_tTGFrame::fMaxHeightmaximal frame height
UInt_tTGFrame::fMaxWidthmaximal frame width
TGMenuBar*fMenuBarmenu bar (if any)
UInt_tfMenuHeightheight of popup menu
UInt_tfMenuWidthwidth of popup menu
UInt_tTGFrame::fMinHeightminimal frame height
UInt_tTGFrame::fMinWidthminimal frame width
const TGWindow*fMsgWindowwindow which handles menu events
TStringTGWindow::fNamename of the window used in SavePrimitive()
Bool_tTGWindow::fNeedRedrawkTRUE if window needs to be redrawn
GContext_tfNormGCnormal drawing graphics context
UInt_tTGFrame::fOptionsframe options
const TGWindow*TGWindow::fParentParent window
Bool_tfPoppedUptrue if menu is currently popped up
GContext_tfSelGCgraphics context for drawing selections
GContext_tfSelbackGCgraphics context for drawing selection background
Bool_tTQObject::fSignalsBlocked! flag used for suppression of signals
TGSplitButton*fSplitButtonsplit button (if any)
Bool_tfStickstick mode (popup menu stays sticked on screen)
UInt_tTGFrame::fWidthframe width
Int_tTGFrame::fXframe x position
UInt_tfXlMax width of all menu entries
Int_tTGFrame::fYframe y position
static Bool_tTQObject::fgAllSignalsBlockedflag used for suppression of all signals
static const TGGC*TGFrame::fgBckgndGC
static const TGGC*TGFrame::fgBlackGC
static Pixel_tTGFrame::fgBlackPixel
static Int_tTGWindow::fgCountercounter of created windows in SavePrimitive
static Window_tTGFrame::fgDbw
static Int_tTGFrame::fgDbx
static Int_tTGFrame::fgDby
static const TGFont*fgDefaultFont
static Pixel_tTGFrame::fgDefaultFrameBackground
static const TGGC*fgDefaultGC
static Pixel_tTGFrame::fgDefaultSelectedBackground
static const TGGC*fgDefaultSelectedBackgroundGC
static const TGGC*fgDefaultSelectedGC
static const TGFont*fgHilightFont
static const TGGC*TGFrame::fgHilightGC
static Bool_tTGFrame::fgInit
static UInt_tTGFrame::fgLastButton
static Time_tTGFrame::fgLastClick
static const TGGC*TGFrame::fgShadowGC
static UInt_tTGFrame::fgUserColor
static const TGGC*TGFrame::fgWhiteGC
static Pixel_tTGFrame::fgWhitePixel

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGPopupMenu(const TGWindow* p = 0, UInt_t w = 10, UInt_t h = 10, UInt_t options = 0)
 Create a popup menu.
~TGPopupMenu()
 Delete a popup menu.
void AddEntry(TGHotString *s, Int_t id, void *ud, const TGPicture *p, TGMenuEntry *before)
 Add a menu entry. The hotstring is adopted by the menu (actually by
 the TGMenuEntry) and deleted when possible. A possible picture is
 borrowed from the picture pool and therefore not adopted.
 If before is not 0, the entry will be added before it.
void AddEntry(const char *s, Int_t id, void *ud, const TGPicture *p, TGMenuEntry *before)
 Add a menu entry. The string s in not adopted.
 If before is not 0, the entry will be added before it.
void AddSeparator(TGMenuEntry* before = 0)
 Add a menu separator to the menu.
 If before is not 0, the entry will be added before it.
void AddLabel(TGHotString *s, const TGPicture *p, TGMenuEntry *before)
 Add a menu label to the menu. The hotstring is adopted by the menu
 (actually by the TGMenuEntry) and deleted when possible. A possible
 picture is borrowed from the picture pool and therefore not adopted.
 If before is not 0, the entry will be added before it.
void AddLabel(const char *s, const TGPicture *p, TGMenuEntry *before)
 Add a menu label to the menu. The string s in not adopted.
 If before is not 0, the entry will be added before it.
void AddPopup(TGHotString *s, TGPopupMenu *popup, TGMenuEntry *before, const TGPicture *p)
 Add a (cascading) popup menu to a popup menu. The hotstring is adopted
 by the menu (actually by the TGMenuEntry) and deleted when possible.
 If before is not 0, the entry will be added before it.
void AddPopup(const char *s, TGPopupMenu *popup, TGMenuEntry *before, const TGPicture *p)
 Add a (cascading) popup menu to a popup menu. The string s is not
 adopted. If before is not 0, the entry will be added before it.
void Reposition()
 Reposition entries in popup menu. Called after menu item has been
 hidden or removed or inserted at a specified location.
void PlaceMenu(Int_t x, Int_t y, Bool_t stick_mode, Bool_t grab_pointer)
 Popup a popup menu. If stick mode is true keep the menu up. If
 grab_pointer is true the pointer will be grabbed, which means that
 all pointer events will go to the popup menu, independent of in
 which window the pointer is.
Int_t EndMenu(void*& userData)
 Close menu and return ID of selected menu item.
 In case of cascading menus, recursively close all menus.
Bool_t HandleButton(Event_t* event)
 Handle button event in the popup menu.
Bool_t HandleCrossing(Event_t* event)
 Handle pointer crossing event in popup menu.
Bool_t HandleMotion(Event_t* event)
 Handle pointer motion event in popup menu.
void Activate(TGMenuEntry *entry)
 Activate a menu entry in a popup menu.
Bool_t HandleTimer(TTimer* t)
 If TPopupDelayTimer times out popup cascading popup menu (if it is
 still the current entry).
void DoRedraw()
 Draw popup menu.
void DrawEntry(TGMenuEntry* entry)
 Draw popup menu entry.
void DrawBorder()
 Draw border round popup menu.
void DrawTrianglePattern(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
 Draw triangle pattern. Used for menu entries that are of type
 kMenuPopup (i.e. cascading menus).
void DrawCheckMark(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
 Draw check mark. Used for checked button type menu entries.
void DrawRCheckMark(GContext_t gc, Int_t l, Int_t t, Int_t r, Int_t b)
 Draw radio check mark. Used for radio button type menu entries.
void DefaultEntry(Int_t id)
 Set default entry (default entries are drawn with bold text).
void EnableEntry(Int_t id)
 Enable entry. By default entries are enabled.
void DisableEntry(Int_t id)
 Disable entry (disabled entries appear in a sunken relieve).
Bool_t IsEntryEnabled(Int_t id)
 Return true if menu entry is enabled.
void HideEntry(Int_t id)
 Hide entry (hidden entries are not shown in the menu).
 To enable a hidden entry call EnableEntry().
Bool_t IsEntryHidden(Int_t id)
 Return true if menu entry is hidden.
void CheckEntry(Int_t id)
 Check a menu entry (i.e. add a check mark in front of it).
void CheckEntryByData(void* user_data)
 Check a menu entry (i.e. add a check mark in front of it).
 The input argument is user data associated with entry
void UnCheckEntry(Int_t id)
 Uncheck menu entry (i.e. remove check mark).
void UnCheckEntries()
 Uncheck all entries.
void UnCheckEntryByData(void* user_data)
 Uncheck a menu entry (i.e. remove check mark in front of it).
 The input argument is user data associated with entry
Bool_t IsEntryChecked(Int_t id)
 Return true if menu item is checked.
void RCheckEntry(Int_t id, Int_t IDfirst, Int_t IDlast)
 Radio-select entry (note that they cannot be unselected,
 the selection must be moved to another entry instead).
Bool_t IsEntryRChecked(Int_t id)
 Return true if menu item has radio check mark.
TGMenuEntry * GetEntry(Int_t id)
 Find entry with specified id. Use the returned entry in DeleteEntry()
 or as the "before" item in the AddXXXX() methods. Returns 0 if entry
 is not found. To find entries that don't have an id like the separators,
 use the GetListOfEntries() method to get the complete entry
 list and iterate over it and check the type of each entry
 to find the separators.
TGMenuEntry * GetEntry(const char *s)
 Find entry with specified name. Name must match the original
 name without hot key symbol, like "Print" and not "&Print".
 Use the returned entry in DeleteEntry() or as the "before" item
 in the AddXXXX() methods. Returns 0 if entry is not found.
 To find entries that don't have a name like the separators,
 use the GetListOfEntries() method to get the complete entry
 list and iterate over it and check the type of each entry
 to find the separators.
void DeleteEntry(Int_t id)
 Delete entry with specified id from menu.
void DeleteEntry(TGMenuEntry *entry)
 Delete specified entry from menu.
const TGGC & GetDefaultGC()
 Return default graphics context.
const TGGC & GetDefaultSelectedGC()
 Return the selection graphics context in use.
const TGGC & GetDefaultSelectedBackgroundGC()
 Return the selection background graphics context in use.
FontStruct_t GetDefaultFontStruct()
 Return the default font structure in use.
FontStruct_t GetHilightFontStruct()
 Return the font structure in use for highlighted menu entries.
void SavePrimitive(ostream& out, Option_t* option = "")
 Save a popup menu widget as a C++ statement(s) on output stream out.
TGMenuEntry& operator=(const TGPopupMenu& )
TGPopupMenu(const TGPopupMenu& )
TGMenuEntry * GetCurrent() const
{ return fCurrent; }
const TList * GetListOfEntries() const
{ return fEntryList; }
void Associate(const TGWindow* w)
{ fMsgWindow = w; }
void SetMenuBar(TGMenuBar* bar)
{ fMenuBar = bar; }
TGMenuBar * GetMenuBar() const
{ return fMenuBar; }
void Activate(Bool_t)
{ }
UInt_t GetEntrySep() const
{ return fEntrySep; }
void SetEntrySep(UInt_t sep)
{ fEntrySep = sep; }
void PoppedUp()
{ Emit("PoppedUp()"); }
void PoppedDown()
{ Emit("PoppedDown()"); }
void Highlighted(Int_t id)
{ Emit("Highlighted(Int_t)", id); }
void Activated(Int_t id)
{ Emit("Activated(Int_t)", id); }