Loading [MathJax]/extensions/tex2jax.js
ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
gui
gui
inc
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-2000, 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
#ifndef ROOT_TGFrame
28
#include "
TGFrame.h
"
29
#endif
30
31
class
TGLabel
;
32
class
TTimer
;
33
class
TVirtualPad
;
34
class
TBox
;
35
36
37
class
TGToolTip
:
public
TGCompositeFrame
{
38
39
private
:
40
TGLabel
*
fLabel
;
// help text
41
TGLayoutHints
*
fL1
;
// layout used to place text in frame
42
TTimer
*
fDelay
;
// popup delay timer
43
const
TGFrame
*
fWindow
;
// frame to which tool tip is associated
44
const
TVirtualPad
*
fPad
;
// pad to which tooltip is associated
45
const
TBox
*
fBox
;
// box in pad to which tooltip is associated
46
Int_t
fX
;
// X position in fWindow where to popup
47
Int_t
fY
;
// Y position in fWindow where to popup
48
49
TGToolTip
(
const
TGToolTip
&);
// not implemented
50
TGToolTip
&
operator=
(
const
TGToolTip
&);
// not implemented
51
52
public
:
53
TGToolTip
(
const
TGWindow
*p = 0,
const
TGFrame
*
f
= 0,
const
char
*
text
= 0,
Long_t
delayms = 350);
54
TGToolTip
(
const
TGWindow
*p,
const
TBox
*b,
const
char
*
text
,
Long_t
delayms);
55
TGToolTip
(
const
TBox
*b,
const
char
*
text
,
Long_t
delayms);
56
TGToolTip
(
Int_t
x
,
Int_t
y
,
const
char
*
text
,
Long_t
delayms);
57
virtual
~TGToolTip
();
58
59
virtual
void
DrawBorder
();
60
61
Bool_t
HandleTimer
(
TTimer
*t);
62
void
Show
(
Int_t
x
,
Int_t
y
);
//*SIGNAL*
63
void
Hide
();
//*SIGNAL*
64
void
Reset
();
//*SIGNAL*
65
void
Reset
(
const
TVirtualPad
*parent);
66
void
SetText
(
const
char
*new_text);
67
void
SetPosition
(
Int_t
x
,
Int_t
y
);
68
void
SetDelay
(
Long_t
delayms);
69
const
TGString
*
GetText
()
const
;
70
71
ClassDef
(
TGToolTip
,0)
//One or multiple lines help text
72
};
73
74
#endif
TGToolTip::fX
Int_t fX
Definition:
TGToolTip.h:46
TGToolTip::fPad
const TVirtualPad * fPad
Definition:
TGToolTip.h:44
TGToolTip::GetText
const TGString * GetText() const
Get the tool tip text.
Definition:
TGToolTip.cxx:426
TBox
Create a Box.
Definition:
TBox.h:44
TGToolTip::Reset
void Reset()
Reset tool tip popup delay timer.
Definition:
TGToolTip.cxx:259
TGToolTip::SetText
void SetText(const char *new_text)
Set new tool tip text.
Definition:
TGToolTip.cxx:386
TGToolTip::Show
void Show(Int_t x, Int_t y)
Show tool tip window.
Definition:
TGToolTip.cxx:229
TGToolTip::fY
Int_t fY
Definition:
TGToolTip.h:47
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
TGToolTip
Definition:
TGToolTip.h:37
TGToolTip::Hide
void Hide()
Hide tool tip window.
Definition:
TGToolTip.cxx:246
TGToolTip::fLabel
TGLabel * fLabel
Definition:
TGToolTip.h:40
x
Double_t x[n]
Definition:
legend1.C:17
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TGString
Definition:
TGString.h:34
TGToolTip::SetDelay
void SetDelay(Long_t delayms)
Set delay in milliseconds.
Definition:
TGToolTip.cxx:395
TGToolTip::SetPosition
void SetPosition(Int_t x, Int_t y)
Set popup position within specified frame (as specified in the ctor).
Definition:
TGToolTip.cxx:405
TVirtualPad
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition:
TVirtualPad.h:59
TGFrame.h
TGFrame
Definition:
TGFrame.h:143
TGWindow
Definition:
TGWindow.h:38
TGToolTip::operator=
TGToolTip & operator=(const TGToolTip &)
TGToolTip::HandleTimer
Bool_t HandleTimer(TTimer *t)
If tool tip delay timer times out show tool tip window.
Definition:
TGToolTip.cxx:284
TGToolTip::~TGToolTip
virtual ~TGToolTip()
Delete a tool tip object.
Definition:
TGToolTip.cxx:208
TGToolTip::TGToolTip
TGToolTip(const TGToolTip &)
TTimer
Handles synchronous and a-synchronous timer events.
Definition:
TTimer.h:57
TGToolTip::fDelay
TTimer * fDelay
Definition:
TGToolTip.h:42
Long_t
long Long_t
Definition:
RtypesCore.h:50
f
double f(double x)
Definition:
testIntegration.cxx:12
TGCompositeFrame
Definition:
TGFrame.h:362
text
TText * text
Definition:
entrylist_figure1.C:12
y
Double_t y[n]
Definition:
legend1.C:17
TGToolTip::fBox
const TBox * fBox
Definition:
TGToolTip.h:45
TGToolTip::fL1
TGLayoutHints * fL1
Definition:
TGToolTip.h:41
TGLabel
Definition:
TGLabel.h:38
TGLayoutHints
Definition:
TGLayout.h:63
TGToolTip::DrawBorder
virtual void DrawBorder()
Draw border of tool tip window.
Definition:
TGToolTip.cxx:218
TGToolTip::fWindow
const TGFrame * fWindow
Definition:
TGToolTip.h:43