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
graf2d
gpad
inc
TButton.h
Go to the documentation of this file.
1
// @(#)root/gpad:$Id$
2
// Author: Rene Brun 01/07/96
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_TButton
13
#define ROOT_TButton
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TButton //
19
// //
20
// A TButton object is a specialized TPad including possible list
21
// of primitives used to build selections and options menus in a canvas.
22
// //
23
//////////////////////////////////////////////////////////////////////////
24
25
#ifndef ROOT_TPad
26
#include "
TPad.h
"
27
#endif
28
#ifndef ROOT_TAttText
29
#include "
TAttText.h
"
30
#endif
31
32
class
TButton
:
public
TPad
,
public
TAttText
{
33
34
private
:
35
Bool_t
fFocused
;
// If cursor is in...
36
Bool_t
fFraming
;
// True if you want a frame to be painted when pressed
37
38
TButton
(
const
TButton
&
org
);
// no copy ctor, use TObject::Clone()
39
TButton
&
operator=
(
const
TButton
&rhs);
// idem
40
41
protected
:
42
TString
fMethod
;
//Method to be executed by this button
43
44
public
:
45
TButton
();
46
TButton
(
const
char
*title,
const
char
*method,
Double_t
x1
,
Double_t
y1,
Double_t
x2
,
Double_t
y2);
47
virtual
~TButton
();
48
virtual
void
Divide
(
Int_t
nx
=1,
Int_t
ny
=1,
Float_t
xmargin=0.01,
Float_t
ymargin=0.01,
Int_t
color=0);
49
virtual
void
Draw
(
Option_t
*option=
""
);
50
virtual
void
ExecuteEvent
(
Int_t
event,
Int_t
px,
Int_t
py);
51
virtual
const
char
*
GetMethod
()
const
{
return
fMethod.
Data
(); }
52
virtual
void
Paint
(
Option_t
*option=
""
);
53
virtual
void
PaintModified
();
54
virtual
void
Range
(
Double_t
x1
,
Double_t
y1,
Double_t
x2
,
Double_t
y2);
55
virtual
void
SavePrimitive
(std::ostream &
out
,
Option_t
*option =
""
);
56
virtual
void
SetBorderMode
(
Short_t
bordermode) {
fBorderMode
= bordermode; }
57
virtual
void
SetFraming
(
Bool_t
f
=1);
58
virtual
Bool_t
GetFraming
() {
return
fFraming
; };
59
virtual
void
SetGrid
(
Int_t
valuex = 1,
Int_t
valuey = 1);
60
virtual
void
SetLogx
(
Int_t
value
= 1);
61
virtual
void
SetLogy
(
Int_t
value
= 1);
62
virtual
void
SetMethod
(
const
char
*method) { fMethod=method; }
// *MENU*
63
virtual
void
SetName
(
const
char
*
name
) {
fName
=
name
; }
64
virtual
void
x3d
(
Option_t
*option=
""
);
65
66
ClassDef
(
TButton
,0)
//A user interface button.
67
};
68
69
inline
void
TButton::Divide
(
Int_t
,
Int_t
,
Float_t
,
Float_t
,
Int_t
) { }
70
inline
void
TButton::SetGrid
(
Int_t
,
Int_t
) { }
71
inline
void
TButton::SetLogx
(
Int_t
) { }
72
inline
void
TButton::SetLogy
(
Int_t
) { }
73
inline
void
TButton::x3d
(
Option_t
*) { }
74
75
#endif
76
nx
const int nx
Definition:
kalman.C:16
TButton::GetMethod
virtual const char * GetMethod() const
Definition:
TButton.h:51
TButton::Range
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
Definition:
TButton.cxx:247
TAttBBox2D::ClassDef
ClassDef(TAttBBox2D, 0)
Float_t
float Float_t
Definition:
RtypesCore.h:53
TButton::SetBorderMode
virtual void SetBorderMode(Short_t bordermode)
Definition:
TButton.h:56
Option_t
const char Option_t
Definition:
RtypesCore.h:62
TButton::SetLogy
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.
Definition:
TButton.h:72
TString
Basic string class.
Definition:
TString.h:137
Int_t
int Int_t
Definition:
RtypesCore.h:41
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
TAttText.h
TString::Data
const char * Data() const
Definition:
TString.h:349
TButton::fFraming
Bool_t fFraming
Definition:
TButton.h:36
TButton::Draw
virtual void Draw(Option_t *option="")
Draw this button with its current attributes.
Definition:
TButton.cxx:139
x2
static const double x2[5]
Definition:
RooGaussKronrodIntegrator1D.cxx:344
TButton::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition:
TButton.cxx:255
TButton::PaintModified
virtual void PaintModified()
Paint is modified.
Definition:
TButton.cxx:225
ny
const int ny
Definition:
kalman.C:17
TButton::operator=
TButton & operator=(const TButton &rhs)
TButton::TButton
TButton()
TButton::fMethod
TString fMethod
Definition:
TButton.h:42
out
char * out
Definition:
TBase64.cxx:29
TButton::fFocused
Bool_t fFocused
Definition:
TButton.h:35
TButton::Divide
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Definition:
TButton.h:69
TAttText
Text Attributes class.
Definition:
TAttText.h:32
TButton::SetName
virtual void SetName(const char *name)
Definition:
TButton.h:63
TButton::~TButton
virtual ~TButton()
Button default destructor.
Definition:
TButton.cxx:131
TPad
The most important graphics class in the ROOT system.
Definition:
TPad.h:46
Short_t
short Short_t
Definition:
RtypesCore.h:35
TButton::SetGrid
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
Definition:
TButton.h:70
TButton
A TButton object is a user interface object.
Definition:
TButton.h:32
TButton::Paint
virtual void Paint(Option_t *option="")
Paint this button with its current attributes.
Definition:
TButton.cxx:217
TButton::SetFraming
virtual void SetFraming(Bool_t f=1)
if framing is set, button will be highlighted
Definition:
TButton.cxx:320
x1
static const double x1[5]
Definition:
RooGaussKronrodIntegrator1D.cxx:326
f
double f(double x)
Definition:
testIntegration.cxx:12
Double_t
double Double_t
Definition:
RtypesCore.h:55
TButton::SetMethod
virtual void SetMethod(const char *method)
Definition:
TButton.h:62
TButton::SetLogx
virtual void SetLogx(Int_t value=1)
Set Lin/Log scale for X.
Definition:
TButton.h:71
name
#define name(a, b)
Definition:
linkTestLib0.cpp:5
org
#define org(otri, vertexptr)
Definition:
triangle.c:1037
TButton::x3d
virtual void x3d(Option_t *option="")
Deprecated: use TPad::GetViewer3D() instead.
Definition:
TButton.h:73
TPad::fName
TString fName
Definition:
TPad.h:125
TPad.h
TButton::GetFraming
virtual Bool_t GetFraming()
Definition:
TButton.h:58
value
float value
Definition:
math.cpp:443
TPad::fBorderMode
Short_t fBorderMode
Definition:
TPad.h:114
TButton::ExecuteEvent
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition:
TButton.cxx:149