ROOT
master
Reference Guide
TGXYLayout.h
Go to the documentation of this file.
1
// @(#)root/gui:$Id$
2
// Author: Reiner Rohlfs 24/03/2002
3
4
/*************************************************************************
5
* Copyright (C) 1995-2002, Rene Brun, Fons Rademakers and Reiner Rohlfs *
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
13
#ifndef ROOT_TGXYLayout
14
#define ROOT_TGXYLayout
15
16
#include "
TGLayout.h
"
17
18
19
class
TGXYLayoutHints
:
public
TGLayoutHints
{
20
21
protected
:
22
Double_t
fX
;
///< x - position of widget
23
Double_t
fY
;
///< y - position of widget
24
Double_t
fW
;
///< width of widget
25
Double_t
fH
;
///< height of widget
26
UInt_t
fFlag
;
///< rubber flag
27
28
public
:
29
30
enum
ERubberFlag
{
31
kLRubberX
=
BIT
(0),
32
kLRubberY
=
BIT
(1),
33
kLRubberW
=
BIT
(2),
34
kLRubberH
=
BIT
(3)
35
};
36
37
TGXYLayoutHints
(
Double_t
x
,
Double_t
y
,
Double_t
w
,
Double_t
h
,
38
UInt_t
rubberFlag =
kLRubberX
|
kLRubberY
);
39
40
Double_t
GetX
()
const
{
return
fX
; };
41
Double_t
GetY
()
const
{
return
fY
; };
42
Double_t
GetW
()
const
{
return
fW
; };
43
Double_t
GetH
()
const
{
return
fH
; };
44
UInt_t
GetFlag
()
const
{
return
fFlag
; };
45
46
void
SetX
(
Double_t
x
) {
fX
=
x
; }
47
void
SetY
(
Double_t
y
) {
fY
=
y
; }
48
void
SetW
(
Double_t
w
) {
fW
=
w
; }
49
void
SetH
(
Double_t
h
) {
fH
=
h
; }
50
void
SetFlag
(
UInt_t
flag) {
fFlag
= flag; }
51
52
void
SavePrimitive
(std::ostream &out,
Option_t
* =
""
)
override
;
53
54
ClassDefOverride
(
TGXYLayoutHints
,0)
// Hits for the X / Y - layout manager
55
};
56
57
58
class
TGXYLayout
:
public
TGLayoutManager
{
59
60
protected
:
61
TList
*
fList
;
///< list of frames to arrange
62
TGCompositeFrame
*
fMain
;
///< container frame
63
64
Bool_t
fFirst
;
///< flag to determine the first call of Layout()
65
UInt_t
fFirstWidth
;
///< original width of the frame fMain
66
UInt_t
fFirstHeight
;
///< original height of the frame fMain
67
68
Int_t
fTWidth
;
///< text width of a default character "1234567890" / 10
69
Int_t
fTHeight
;
///< text height
70
71
TGXYLayout
(
const
TGXYLayout
&);
72
TGXYLayout
&
operator=
(
const
TGXYLayout
&);
73
74
public
:
75
TGXYLayout
(
TGCompositeFrame
*
main
);
76
77
void
Layout
()
override
;
78
TGDimension
GetDefaultSize
()
const override
;
79
void
SavePrimitive
(std::ostream &out,
Option_t
* =
""
)
override
;
80
81
void
NewSize
() {
fFirst
=
kTRUE
; }
82
83
ClassDefOverride
(
TGXYLayout
,0)
// X / Y - layout manager
84
};
85
86
#endif
h
#define h(i)
Definition:
RSha256.hxx:106
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:46
Double_t
double Double_t
Definition:
RtypesCore.h:59
kTRUE
const Bool_t kTRUE
Definition:
RtypesCore.h:100
Option_t
const char Option_t
Definition:
RtypesCore.h:66
BIT
#define BIT(n)
Definition:
Rtypes.h:85
ClassDefOverride
#define ClassDefOverride(name, id)
Definition:
Rtypes.h:339
TGLayout.h
w
winID w
Definition:
TGWin32VirtualGLProxy.cxx:39
main
int main(int argc, char *argv[])
Definition:
cef_main.cxx:54
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition:
TGFrame.h:287
TGDimension
Definition:
TGDimension.h:18
TGLayoutHints
This class describes layout hints used by the layout classes.
Definition:
TGLayout.h:50
TGLayoutManager
Frame layout manager.
Definition:
TGLayout.h:135
TGXYLayoutHints
This layout hint must be used for the TGXYLayout manager!
Definition:
TGXYLayout.h:19
TGXYLayoutHints::GetX
Double_t GetX() const
Definition:
TGXYLayout.h:40
TGXYLayoutHints::SetY
void SetY(Double_t y)
Definition:
TGXYLayout.h:47
TGXYLayoutHints::SetFlag
void SetFlag(UInt_t flag)
Definition:
TGXYLayout.h:50
TGXYLayoutHints::TGXYLayoutHints
TGXYLayoutHints(Double_t x, Double_t y, Double_t w, Double_t h, UInt_t rubberFlag=kLRubberX|kLRubberY)
Constructor.
Definition:
TGXYLayout.cxx:125
TGXYLayoutHints::SetH
void SetH(Double_t h)
Definition:
TGXYLayout.h:49
TGXYLayoutHints::SetX
void SetX(Double_t x)
Definition:
TGXYLayout.h:46
TGXYLayoutHints::fY
Double_t fY
y - position of widget
Definition:
TGXYLayout.h:23
TGXYLayoutHints::fW
Double_t fW
width of widget
Definition:
TGXYLayout.h:24
TGXYLayoutHints::fH
Double_t fH
height of widget
Definition:
TGXYLayout.h:25
TGXYLayoutHints::GetH
Double_t GetH() const
Definition:
TGXYLayout.h:43
TGXYLayoutHints::GetW
Double_t GetW() const
Definition:
TGXYLayout.h:42
TGXYLayoutHints::fFlag
UInt_t fFlag
rubber flag
Definition:
TGXYLayout.h:26
TGXYLayoutHints::SavePrimitive
void SavePrimitive(std::ostream &out, Option_t *="") override
Save XY layout hints as a C++ statement(s) on output stream.
Definition:
TGXYLayout.cxx:139
TGXYLayoutHints::fX
Double_t fX
x - position of widget
Definition:
TGXYLayout.h:22
TGXYLayoutHints::SetW
void SetW(Double_t w)
Definition:
TGXYLayout.h:48
TGXYLayoutHints::GetY
Double_t GetY() const
Definition:
TGXYLayout.h:41
TGXYLayoutHints::ERubberFlag
ERubberFlag
Definition:
TGXYLayout.h:30
TGXYLayoutHints::kLRubberX
@ kLRubberX
Definition:
TGXYLayout.h:31
TGXYLayoutHints::kLRubberH
@ kLRubberH
Definition:
TGXYLayout.h:34
TGXYLayoutHints::kLRubberY
@ kLRubberY
Definition:
TGXYLayout.h:32
TGXYLayoutHints::kLRubberW
@ kLRubberW
Definition:
TGXYLayout.h:33
TGXYLayoutHints::GetFlag
UInt_t GetFlag() const
Definition:
TGXYLayout.h:44
TGXYLayout
Is a layout manager where the position and the size of each widget in the frame are defined by X / Y ...
Definition:
TGXYLayout.h:58
TGXYLayout::fTWidth
Int_t fTWidth
text width of a default character "1234567890" / 10
Definition:
TGXYLayout.h:68
TGXYLayout::fList
TList * fList
list of frames to arrange
Definition:
TGXYLayout.h:61
TGXYLayout::TGXYLayout
TGXYLayout(const TGXYLayout &)
copy constructor
Definition:
TGXYLayout.cxx:200
TGXYLayout::fFirstWidth
UInt_t fFirstWidth
original width of the frame fMain
Definition:
TGXYLayout.h:65
TGXYLayout::fFirstHeight
UInt_t fFirstHeight
original height of the frame fMain
Definition:
TGXYLayout.h:66
TGXYLayout::Layout
void Layout() override
Recalculates the postion and the size of all widgets.
Definition:
TGXYLayout.cxx:233
TGXYLayout::fMain
TGCompositeFrame * fMain
container frame
Definition:
TGXYLayout.h:62
TGXYLayout::operator=
TGXYLayout & operator=(const TGXYLayout &)
assignment operator
Definition:
TGXYLayout.cxx:215
TGXYLayout::fTHeight
Int_t fTHeight
text height
Definition:
TGXYLayout.h:69
TGXYLayout::fFirst
Bool_t fFirst
flag to determine the first call of Layout()
Definition:
TGXYLayout.h:64
TGXYLayout::NewSize
void NewSize()
Definition:
TGXYLayout.h:81
TGXYLayout::SavePrimitive
void SavePrimitive(std::ostream &out, Option_t *="") override
Save XY layout manager as a C++ statement(s) on output stream.
Definition:
TGXYLayout.cxx:306
TGXYLayout::GetDefaultSize
TGDimension GetDefaultSize() const override
Returns the original size of the frame.
Definition:
TGXYLayout.cxx:296
TList
A doubly linked list.
Definition:
TList.h:38
bool
double
int
unsigned int
y
Double_t y[n]
Definition:
legend1.C:17
x
Double_t x[n]
Definition:
legend1.C:17
gui
gui
inc
TGXYLayout.h
ROOT master - Reference Guide Generated on Tue Jun 28 2022 10:49:14 (GVA Time) using Doxygen 1.9.5