ROOT
v6-24
Reference Guide
Loading...
Searching...
No Matches
TGToolTip.h
Go to the documentation of this file.
1
// @(#)root/gui:$Id$
2
// Author: Fons Rademakers 22/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_TGToolTip
13
#define ROOT_TGToolTip
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TGToolTip //
19
// //
20
// A tooltip can be a one or multiple lines help text that is displayed //
21
// in a window when the mouse cursor overs a widget, without clicking //
22
// it. A small box appears with suplementary information regarding the //
23
// item being hovered over. //
24
// //
25
//////////////////////////////////////////////////////////////////////////
26
27
#include "
TGFrame.h
"
28
29
class
TGLabel
;
30
class
TTimer
;
31
class
TVirtualPad
;
32
class
TBox
;
33
34
35
class
TGToolTip
:
public
TGCompositeFrame
{
36
37
private
:
38
TGLabel
*
fLabel
;
// help text
39
TGLayoutHints
*
fL1
;
// layout used to place text in frame
40
TTimer
*
fDelay
;
// popup delay timer
41
const
TGFrame
*
fWindow
;
// frame to which tool tip is associated
42
const
TVirtualPad
*
fPad
;
// pad to which tooltip is associated
43
const
TBox
*
fBox
;
// box in pad to which tooltip is associated
44
Int_t
fX
;
// X position in fWindow where to popup
45
Int_t
fY
;
// Y position in fWindow where to popup
46
47
TGToolTip
(
const
TGToolTip
&) =
delete
;
48
TGToolTip
&
operator=
(
const
TGToolTip
&) =
delete
;
49
50
public
:
51
TGToolTip
(
const
TGWindow
*p =
nullptr
,
const
TGFrame
*
f
=
nullptr
,
const
char
*
text
=
nullptr
,
Long_t
delayms = 350);
52
TGToolTip
(
const
TGWindow
*p,
const
TBox
*
b
,
const
char
*
text
,
Long_t
delayms);
53
TGToolTip
(
const
TBox
*
b
,
const
char
*
text
,
Long_t
delayms);
54
TGToolTip
(
Int_t
x
,
Int_t
y
,
const
char
*
text
,
Long_t
delayms);
55
virtual
~TGToolTip
();
56
57
virtual
void
DrawBorder
();
58
59
Bool_t
HandleTimer
(
TTimer
*t);
60
void
Show
(
Int_t
x
,
Int_t
y
);
//*SIGNAL*
61
void
Hide
();
//*SIGNAL*
62
void
Reset
();
//*SIGNAL*
63
void
Reset
(
const
TVirtualPad
*parent);
64
void
SetText
(
const
char
*new_text);
65
void
SetPosition
(
Int_t
x
,
Int_t
y
);
66
void
SetDelay
(
Long_t
delayms);
67
const
TGString
*
GetText
()
const
;
68
69
ClassDef
(
TGToolTip
,0)
//One or multiple lines help text
70
};
71
72
#endif
b
#define b(i)
Definition
RSha256.hxx:100
f
#define f(i)
Definition
RSha256.hxx:104
Long_t
long Long_t
Definition
RtypesCore.h:54
ClassDef
#define ClassDef(name, id)
Definition
Rtypes.h:325
TGFrame.h
TBox
Create a Box.
Definition
TBox.h:22
TGCompositeFrame
Definition
TGFrame.h:323
TGFrame
Definition
TGFrame.h:104
TGLabel
Definition
TGLabel.h:32
TGLayoutHints
Definition
TGLayout.h:57
TGString
Definition
TGString.h:30
TGToolTip
Definition
TGToolTip.h:35
TGToolTip::operator=
TGToolTip & operator=(const TGToolTip &)=delete
TGToolTip::Show
void Show(Int_t x, Int_t y)
Show tool tip window.
Definition
TGToolTip.cxx:230
TGToolTip::SetDelay
void SetDelay(Long_t delayms)
Set delay in milliseconds.
Definition
TGToolTip.cxx:396
TGToolTip::fX
Int_t fX
Definition
TGToolTip.h:44
TGToolTip::fY
Int_t fY
Definition
TGToolTip.h:45
TGToolTip::Hide
void Hide()
Hide tool tip window.
Definition
TGToolTip.cxx:247
TGToolTip::fWindow
const TGFrame * fWindow
Definition
TGToolTip.h:41
TGToolTip::SetPosition
void SetPosition(Int_t x, Int_t y)
Set popup position within specified frame (as specified in the ctor).
Definition
TGToolTip.cxx:406
TGToolTip::fDelay
TTimer * fDelay
Definition
TGToolTip.h:40
TGToolTip::fL1
TGLayoutHints * fL1
Definition
TGToolTip.h:39
TGToolTip::~TGToolTip
virtual ~TGToolTip()
Delete a tool tip object.
Definition
TGToolTip.cxx:209
TGToolTip::fBox
const TBox * fBox
Definition
TGToolTip.h:43
TGToolTip::DrawBorder
virtual void DrawBorder()
Draw border of tool tip window.
Definition
TGToolTip.cxx:219
TGToolTip::GetText
const TGString * GetText() const
Get the tool tip text.
Definition
TGToolTip.cxx:427
TGToolTip::fLabel
TGLabel * fLabel
Definition
TGToolTip.h:38
TGToolTip::SetText
void SetText(const char *new_text)
Set new tool tip text.
Definition
TGToolTip.cxx:387
TGToolTip::Reset
void Reset()
Reset tool tip popup delay timer.
Definition
TGToolTip.cxx:260
TGToolTip::TGToolTip
TGToolTip(const TGToolTip &)=delete
TGToolTip::fPad
const TVirtualPad * fPad
Definition
TGToolTip.h:42
TGToolTip::HandleTimer
Bool_t HandleTimer(TTimer *t)
If tool tip delay timer times out show tool tip window.
Definition
TGToolTip.cxx:285
TGWindow
Definition
TGWindow.h:31
TTimer
Handles synchronous and a-synchronous timer events.
Definition
TTimer.h:51
TVirtualPad
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition
TVirtualPad.h:51
bool
int
text
TText * text
Definition
entrylist_figure1.C:10
y
Double_t y[n]
Definition
legend1.C:17
x
Double_t x[n]
Definition
legend1.C:17
gui
gui
inc
TGToolTip.h
ROOT v6-24 - Reference Guide Generated on Tue Aug 22 2023 03:06:27 (GVA Time) using Doxygen 1.9.8