ROOT » CORE » BASE » TContextMenu

class TContextMenu: public TNamed


TContextMenu

This class provides an interface to  context sensitive popup menus.
These menus pop up when the user hits the right mouse button, and
are destroyed when the menu pops downs.

Context Menus are automatically generated by ROOT using the
following convention: if the string // *MENU* is found in the
comment field of a member function. This function will be added to
the list of items in the menu.

The picture below shows a canvas with a pop-up menu.

                      

 The picture below shows a canvas with a pop-up menu and a dialog box.

                    

Function Members (Methods)

public:
virtual~TContextMenu()
voidTObject::AbstractMethod(const char* method) const
virtual voidAction(TClassMenuItem* classmenuitem)
voidAction(TMethod* method)
voidAction(TToggle* toggle)
virtual voidAction(TObject* object, TMethod* method)
virtual voidAction(TObject* object, TToggle* toggle)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual const char*CreateArgumentTitle(TMethodArg* argument)
virtual const char*CreateDialogTitle(TObject* object, TFunction* method)
virtual const char*CreatePopupTitle(TObject* object)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
voidExecute(const char* params)
voidExecute(TObjArray* params)
virtual voidExecute(const char* method, const char* params, Int_t* error = 0)
virtual voidExecute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidExecute(TObject* object, TFunction* method, const char* params)
virtual voidExecute(TObject* object, TFunction* method, TObjArray* params)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual TBrowser*GetBrowser()
virtual TObject*GetCalledObject()
virtual TContextMenuImp*GetContextMenuImp()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual TVirtualPad*GetSelectedCanvas()
virtual TClassMenuItem*GetSelectedMenuItem()
virtual TFunction*GetSelectedMethod()
virtual TObject*GetSelectedObject()
virtual TVirtualPad*GetSelectedPad()
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
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 voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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 voidTObject::Pop()
virtual voidPopup(Int_t x, Int_t y, TObject* obj, TBrowser* b)
virtual voidPopup(Int_t x, Int_t y, TObject* obj, TVirtualPad* c = 0, TVirtualPad* p = 0)
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetBrowser(TBrowser* b)
virtual voidSetCalledObject(TObject* o)
virtual voidSetCanvas(TVirtualPad* c)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetMethod(TFunction* m)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidSetNameTitle(const char* name, const char* title)
virtual voidSetObject(TObject* o)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetPad(TVirtualPad* p)
virtual voidSetSelectedMenuItem(TClassMenuItem* mi)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
TContextMenu(const char* name, const char* title = "Context sensitive popup menu")
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
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:
virtual voidDisplayPopUp(Int_t x, Int_t y)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
TBrowser*fBrowserselected browser (if exist)
TObject*fCalledObjectobject to call
TContextMenuImp*fContextMenuImp!Context menu system specific implementation
TStringTNamed::fNameobject identifier
TVirtualPad*fSelectedCanvasselected canvas (if exist)
TClassMenuItem*fSelectedMenuItemselected class menu item
TFunction*fSelectedMethodselected method
TObject*fSelectedObjectselected object
TVirtualPad*fSelectedPadselected pad (if exist)
TStringTNamed::fTitleobject title

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TContextMenu(const char* name, const char* title = "Context sensitive popup menu")
 Create a context menu.
~TContextMenu()
 Destroy a context menu.
void Action(TObject* object, TMethod* method)
 Action to be performed when this menu item is selected.
 If the selected method requires arguments we popup an
 automatically generated dialog, otherwise the method is
 directly executed.
void Action(TClassMenuItem* classmenuitem)
 Action to be performed when this menu item is selected.
 If the selected method requires arguments we popup an
 automatically generated dialog, otherwise the method is
 directly executed.
void Action(TObject* object, TToggle* toggle)
 Action to be performed when this toggle menu item is selected.
const char * CreateArgumentTitle(TMethodArg* argument)
 Create string describing argument (for use in dialog box).
const char * CreateDialogTitle(TObject* object, TFunction* method)
 Create title for dialog box retrieving argument values.
const char * CreatePopupTitle(TObject* object)
 Create title for popup menu.
void Execute(TObject* object, TFunction* method, const char* params)
 Execute method with specified arguments for specified object.
void Execute(TObject* object, TFunction* method, TObjArray* params)
 Execute method with specified arguments for specified object.
void Popup(Int_t x, Int_t y, TObject* obj, TVirtualPad* c = 0, TVirtualPad* p = 0)
 Popup context menu at given location in canvas c and pad p for selected
 object.
void Popup(Int_t x, Int_t y, TObject* obj, TBrowser* b)
 Popup context menu at given location in browser b for selected object.
TContextMenu(const TContextMenu& )
TContextMenu& operator=(const TContextMenu& )
void DisplayPopUp(Int_t x, Int_t y)
TContextMenu()
void Action(TObject* object, TMethod* method)
void Action(TObject* object, TToggle* toggle)
void Execute(const char* method, const char* params, Int_t* error = 0)
{ TObject::Execute(method, params, error); }
void Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
{ TObject::Execute(method, params, error); }
void Execute(TObject* object, TFunction* method, const char* params)
void Execute(TObject* object, TFunction* method, TObjArray* params)
TBrowser * GetBrowser()
{ return fBrowser; }
TContextMenuImp * GetContextMenuImp()
{ return fContextMenuImp; }
TVirtualPad * GetSelectedCanvas()
{ return fSelectedCanvas; }
TFunction * GetSelectedMethod()
{ return fSelectedMethod; }
TObject * GetSelectedObject()
{ return fSelectedObject; }
TObject * GetCalledObject()
{ return fCalledObject; }
TClassMenuItem * GetSelectedMenuItem()
{ return fSelectedMenuItem; }
TVirtualPad * GetSelectedPad()
{ return fSelectedPad; }
void SetCanvas(TVirtualPad* c)
void SetBrowser(TBrowser* b)
{ fBrowser = b; }
void SetMethod(TFunction* m)
void SetCalledObject(TObject* o)
{ fCalledObject = o; }
void SetSelectedMenuItem(TClassMenuItem* mi)
void SetNameTitle(const char* name, const char* title)
{ TNamed::SetNameTitle(name, title); }
void SetObject(TObject* o)
void SetPad(TVirtualPad* p)
{ fSelectedPad = p; }