Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 22/02/98
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 *************************************************************************/
12#ifndef ROOT_TGToolTip
13#define ROOT_TGToolTip
16#include "TGFrame.h"
18class TGLabel;
19class TTimer;
20class TVirtualPad;
21class TBox;
27 TGLabel *fLabel; ///< help text
28 TGLayoutHints *fL1; ///< layout used to place text in frame
29 TTimer *fDelay; ///< popup delay timer
30 const TGFrame *fWindow; ///< frame to which tool tip is associated
31 const TVirtualPad *fPad; ///< pad to which tooltip is associated
32 const TBox *fBox; ///< box in pad to which tooltip is associated
33 Int_t fX; ///< X position in fWindow where to popup
34 Int_t fY; ///< Y position in fWindow where to popup
36 TGToolTip(const TGToolTip&) = delete;
37 TGToolTip& operator=(const TGToolTip&) = delete;
40 TGToolTip(const TGWindow *p = nullptr, const TGFrame *f = nullptr, const char *text = nullptr, Long_t delayms = 350);
41 TGToolTip(const TGWindow *p, const TBox *b, const char *text, Long_t delayms);
42 TGToolTip(const TBox *b, const char *text, Long_t delayms);
43 TGToolTip(Int_t x, Int_t y, const char *text, Long_t delayms);
44 virtual ~TGToolTip();
46 void DrawBorder() override;
48 Bool_t HandleTimer(TTimer *t) override;
49 void Show(Int_t x, Int_t y); //*SIGNAL*
50 void Hide(); //*SIGNAL*
51 void Reset(); //*SIGNAL*
52 void Reset(const TVirtualPad *parent);
53 void SetText(const char *new_text);
54 void SetPosition(Int_t x, Int_t y);
55 void SetDelay(Long_t delayms);
56 const TGString *GetText() const;
58 ClassDefOverride(TGToolTip,0) //One or multiple lines help text
#define f(i)
Definition: RSha256.hxx:104
long Long_t
Definition: RtypesCore.h:54
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
Option_t Option_t TPoint TPoint const char text
Create a Box.
Definition: TBox.h:22
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition: TGFrame.h:80
This class handles GUI labels.
Definition: TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition: TGLayout.h:50
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Definition: TGString.h:20
A tooltip can be a one or multiple lines help text that is displayed in a window when the mouse curso...
Definition: TGToolTip.h:24
TGToolTip & operator=(const TGToolTip &)=delete
void Show(Int_t x, Int_t y)
Show tool tip window.
Definition: TGToolTip.cxx:233
void SetDelay(Long_t delayms)
Set delay in milliseconds.
Definition: TGToolTip.cxx:399
Int_t fX
X position in fWindow where to popup.
Definition: TGToolTip.h:33
Int_t fY
Y position in fWindow where to popup.
Definition: TGToolTip.h:34
void Hide()
Hide tool tip window.
Definition: TGToolTip.cxx:250
const TGFrame * fWindow
frame to which tool tip is associated
Definition: TGToolTip.h:30
void DrawBorder() override
Draw border of tool tip window.
Definition: TGToolTip.cxx:222
void SetPosition(Int_t x, Int_t y)
Set popup position within specified frame (as specified in the ctor).
Definition: TGToolTip.cxx:409
TTimer * fDelay
popup delay timer
Definition: TGToolTip.h:29
TGLayoutHints * fL1
layout used to place text in frame
Definition: TGToolTip.h:28
Bool_t HandleTimer(TTimer *t) override
If tool tip delay timer times out show tool tip window.
Definition: TGToolTip.cxx:288
virtual ~TGToolTip()
Delete a tool tip object.
Definition: TGToolTip.cxx:212
const TBox * fBox
box in pad to which tooltip is associated
Definition: TGToolTip.h:32
const TGString * GetText() const
Get the tool tip text.
Definition: TGToolTip.cxx:430
TGLabel * fLabel
help text
Definition: TGToolTip.h:27
void SetText(const char *new_text)
Set new tool tip text.
Definition: TGToolTip.cxx:390
void Reset()
Reset tool tip popup delay timer.
Definition: TGToolTip.cxx:263
TGToolTip(const TGToolTip &)=delete
const TVirtualPad * fPad
pad to which tooltip is associated
Definition: TGToolTip.h:31
ROOT GUI Window base class.
Definition: TGWindow.h:23
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17