TContextMenu


class description - source file - inheritance tree

class TContextMenu : public TNamed

    private:
TContextMenu TContextMenu() protected:
virtual void DisplayPopUp(Int_t x, Int_t y) public:
TContextMenu TContextMenu(const char* name, const char* title = Context sensitive popup menu) TContextMenu TContextMenu(TContextMenu&) virtual void ~TContextMenu() virtual void Action(TObject* object, TMethod* method) void Action(TToggle* toggle) virtual void Action(TObject* object, TToggle* toggle) void Action(TMethod* method) TClass* Class() virtual Char_t* CreateArgumentTitle(TMethodArg* argument) virtual Char_t* CreateDialogTitle(TObject* object, TMethod* method) virtual Char_t* CreatePopupTitle(TObject* object) virtual void Execute(TMethod* method, TObjArray* params) virtual void Execute(TObject* object, TMethod* method, TObjArray* params) void Execute(const Char_t* params) void Execute(TObjArray* params) virtual void Execute(const Text_t* method, const Text_t* params) virtual void Execute(TObject* object, TMethod* method, const Char_t* params) virtual TBrowser* GetBrowser() virtual TContextMenuImp* GetContextMenuImp() virtual TVirtualPad* GetSelectedCanvas() virtual TMethod* GetSelectedMethod() virtual TObject* GetSelectedObject() virtual TVirtualPad* GetSelectedPad() virtual TClass* IsA() const virtual void Popup(Int_t x, Int_t y, TObject* obj, TBrowser* b) virtual void Popup(Int_t x, Int_t y, TObject* obj, TVirtualPad* c = 0, TVirtualPad* p = 0) virtual void SetBrowser(TBrowser* b) virtual void SetCanvas(TVirtualPad* c) virtual void SetMethod(TMethod* m) virtual void SetObject(const Text_t* name, const Text_t* title) virtual void SetObject(TObject* o) virtual void SetPad(TVirtualPad* p) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

protected:
TContextMenuImp* fContextMenuImp Context menu system specific implementation TMethod* fSelectedMethod selected method TObject* fSelectedObject selected object TVirtualPad* fSelectedCanvas selected canvas (if exist) TVirtualPad* fSelectedPad selected pad (if exist) TBrowser* fBrowser selected browser (if exist)

Class Description

                                                                      
 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.
                                                                      
                      


TContextMenu(const Char_t *name, const Char_t *title) : TNamed(name, title)
 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(TObject *object, TToggle *toggle)
 Action to be performed when this toggle menu item is selected.

Char_t* CreateArgumentTitle(TMethodArg *argument)
 Create string describing argument (for use in dialog box).

Char_t* CreateDialogTitle( TObject *object, TMethod *method )
 Create title for dialog box retrieving argument values.

Char_t* CreatePopupTitle(TObject *object)
 Create title for popup menu.

void Execute( TObject *object, TMethod *method, const Char_t *params )
 Execute method with specified arguments for specified object.

void Execute( TObject *object, TMethod *method, TObjArray *params )
 Execute method with specified arguments for specified object.

void Popup( Int_t x, Int_t y, TObject *obj, TVirtualPad *c, TVirtualPad *p )
 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.



Inline Functions


                    void DisplayPopUp(Int_t x, Int_t y)
            TContextMenu TContextMenu(const char* name, const char* title = Context sensitive popup menu)
                    void Action(TMethod* method)
                    void Action(TToggle* toggle)
                    void Execute(TObject* object, TMethod* method, const Char_t* params)
                    void Execute(TObject* object, TMethod* method, TObjArray* params)
                    void Execute(const Char_t* params)
                    void Execute(TObjArray* params)
               TBrowser* GetBrowser()
        TContextMenuImp* GetContextMenuImp()
            TVirtualPad* GetSelectedCanvas()
                TMethod* GetSelectedMethod()
                TObject* GetSelectedObject()
            TVirtualPad* GetSelectedPad()
                    void SetCanvas(TVirtualPad* c)
                    void SetBrowser(TBrowser* b)
                    void SetMethod(TMethod* m)
                    void SetObject(const Text_t* name, const Text_t* title)
                    void SetObject(TObject* o)
                    void SetPad(TVirtualPad* p)
                 TClass* Class()
                 TClass* IsA() const
                    void ShowMembers(TMemberInspector& insp, char* parent)
                    void Streamer(TBuffer& b)
            TContextMenu TContextMenu(TContextMenu&)


Author: Nenad Buncic 08/02/96
Last update: 2.23/03 10/09/99 13.49.00 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


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.