ROOT
v6-24
Reference Guide
Loading...
Searching...
No Matches
TRootContextMenu.h
Go to the documentation of this file.
1
// @(#)root/gui:$Id$
2
// Author: Fons Rademakers 12/02/98
3
4
/*************************************************************************
5
* Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#ifndef ROOT_TRootContextMenu
13
#define ROOT_TRootContextMenu
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TRootContextMenu //
19
// //
20
// This class provides an interface to context sensitive popup menus. //
21
// These menus pop up when the user hits the right mouse button, and //
22
// are destroyed when the menu pops downs. //
23
// //
24
//////////////////////////////////////////////////////////////////////////
25
26
#include "
TContextMenuImp.h
"
27
#include "
TGMenu.h
"
28
29
class
TRootDialog
;
30
31
32
class
TRootContextMenu
:
public
TGPopupMenu
,
public
TContextMenuImp
{
33
34
private
:
35
TRootDialog
*
fDialog
;
// dialog prompting for command line arguments
36
TList
*
fTrash
;
// list of objects to be deleted before refilling menu
37
38
TRootContextMenu
(
const
TRootContextMenu
&);
39
TRootContextMenu
&
operator=
(
const
TRootContextMenu
&);
40
void
CreateMenu
(
TObject
*
object
);
41
42
public
:
43
TRootContextMenu
(
TContextMenu
*
c
=
nullptr
,
const
char
*
name
=
"ROOT Context Menu"
);
44
virtual
~TRootContextMenu
();
45
46
virtual
void
DisplayPopup
(
Int_t
x
,
Int_t
y
);
47
virtual
void
Dialog
(
TObject
*
object
,
TMethod
*method);
48
virtual
void
Dialog
(
TObject
*
object
,
TFunction
*function);
49
virtual
void
DrawEntry
(
TGMenuEntry
*entry);
50
TRootDialog
*
GetDialog
()
const
{
return
fDialog
; };
51
virtual
Bool_t
HandleButton
(
Event_t
*event);
52
virtual
Bool_t
HandleCrossing
(
Event_t
*event);
53
virtual
Bool_t
HandleMotion
(
Event_t
*event);
54
virtual
void
OnlineHelp
();
55
virtual
void
RecursiveRemove
(
TObject
*obj);
56
57
Bool_t
ProcessMessage
(
Long_t
msg,
Long_t
parm1,
Long_t
parm2);
58
59
protected
:
60
TGPopupMenu
*
FindHierarchy
(
const
char
*commentstring,
TString
&last_component);
61
void
AddEntrySorted
(
TGPopupMenu
*current,
const
char
*s,
Int_t
id
,
void
*ud =
nullptr
,
62
const
TGPicture
*p =
nullptr
,
Bool_t
sorted =
kTRUE
);
63
64
ClassDef
(
TRootContextMenu
,0)
//ROOT native GUI context sensitive popup menu
65
};
66
67
#endif
c
#define c(i)
Definition
RSha256.hxx:101
Int_t
int Int_t
Definition
RtypesCore.h:45
Long_t
long Long_t
Definition
RtypesCore.h:54
Bool_t
bool Bool_t
Definition
RtypesCore.h:63
kTRUE
const Bool_t kTRUE
Definition
RtypesCore.h:91
ClassDef
#define ClassDef(name, id)
Definition
Rtypes.h:325
TContextMenuImp.h
TGMenu.h
name
char name[80]
Definition
TGX11.cxx:110
TContextMenuImp
This class provides an interface to GUI independent context sensitive popup menus.
Definition
TContextMenuImp.h:33
TContextMenu
This class provides an interface to context sensitive popup menus.
Definition
TContextMenu.h:44
TFunction
Global functions class (global functions are obtained from CINT).
Definition
TFunction.h:30
TGMenuEntry
Definition
TGMenu.h:69
TGPicture
Definition
TGPicture.h:36
TGPopupMenu
Definition
TGMenu.h:123
TList
A doubly linked list.
Definition
TList.h:44
TMethod
Each ROOT class (see TClass) has a linked list of methods.
Definition
TMethod.h:38
TObject
Mother of all ROOT objects.
Definition
TObject.h:37
TRootContextMenu
Definition
TRootContextMenu.h:32
TRootContextMenu::FindHierarchy
TGPopupMenu * FindHierarchy(const char *commentstring, TString &last_component)
Decodes the Hierarchy="Level0/Level1/Level2/..." statement from the comment field and returns the - i...
Definition
TRootContextMenu.cxx:152
TRootContextMenu::OnlineHelp
virtual void OnlineHelp()
Open the online help matching the actual class/method.
Definition
TRootContextMenu.cxx:662
TRootContextMenu::ProcessMessage
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle context menu messages.
Definition
TRootContextMenu.cxx:702
TRootContextMenu::HandleButton
virtual Bool_t HandleButton(Event_t *event)
Handle button event in the context menu.
Definition
TRootContextMenu.cxx:579
TRootContextMenu::operator=
TRootContextMenu & operator=(const TRootContextMenu &)
TRootContextMenu::Dialog
virtual void Dialog(TObject *object, TMethod *method)
Create dialog object with OK and Cancel buttons.
Definition
TRootContextMenu.cxx:404
TRootContextMenu::HandleMotion
virtual Bool_t HandleMotion(Event_t *event)
Handle pointer motion event in context menu.
Definition
TRootContextMenu.cxx:626
TRootContextMenu::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
Close the context menu if the object is deleted in the RecursiveRemove() operation.
Definition
TRootContextMenu.cxx:790
TRootContextMenu::DisplayPopup
virtual void DisplayPopup(Int_t x, Int_t y)
Display context popup menu for currently selected object.
Definition
TRootContextMenu.cxx:94
TRootContextMenu::CreateMenu
void CreateMenu(TObject *object)
Create the context menu depending on the selected object.
Definition
TRootContextMenu.cxx:245
TRootContextMenu::TRootContextMenu
TRootContextMenu(const TRootContextMenu &)
TRootContextMenu::fTrash
TList * fTrash
Definition
TRootContextMenu.h:36
TRootContextMenu::fDialog
TRootDialog * fDialog
Definition
TRootContextMenu.h:35
TRootContextMenu::~TRootContextMenu
virtual ~TRootContextMenu()
Delete a context menu.
Definition
TRootContextMenu.cxx:83
TRootContextMenu::AddEntrySorted
void AddEntrySorted(TGPopupMenu *current, const char *s, Int_t id, void *ud=nullptr, const TGPicture *p=nullptr, Bool_t sorted=kTRUE)
Add a entry to current menu with alphabetical ordering.
Definition
TRootContextMenu.cxx:228
TRootContextMenu::DrawEntry
virtual void DrawEntry(TGMenuEntry *entry)
Draw context menu entry.
Definition
TRootContextMenu.cxx:558
TRootContextMenu::HandleCrossing
virtual Bool_t HandleCrossing(Event_t *event)
Handle pointer crossing event in context menu.
Definition
TRootContextMenu.cxx:614
TRootContextMenu::GetDialog
TRootDialog * GetDialog() const
Definition
TRootContextMenu.h:50
TRootDialog
Definition
TRootDialog.h:31
TString
Basic string class.
Definition
TString.h:136
int
y
Double_t y[n]
Definition
legend1.C:17
x
Double_t x[n]
Definition
legend1.C:17
Event_t
Event structure.
Definition
GuiTypes.h:174
gui
gui
inc
TRootContextMenu.h
ROOT v6-24 - Reference Guide Generated on Tue Aug 22 2023 03:06:27 (GVA Time) using Doxygen 1.9.8