Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGuiBldHintsEditor.cxx
Go to the documentation of this file.
1// @(#)root/guibuilder:$Id$
2// Author: Valeriy Onuchin 12/09/04
3
4/*************************************************************************
5 * Copyright (C) 1995-2004, 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#include "TGuiBldHintsEditor.h"
13#include "TGuiBldHintsButton.h"
14#include "TGNumberEntry.h"
15#include "TGuiBldEditor.h"
16#include "TGLabel.h"
17#include "TG3DLine.h"
18#include "TGuiBldNameFrame.h"
20#include "TRootGuiBuilder.h"
21#include "TGTableLayout.h"
22
23
24/** \class TGuiBldHintsEditor
25 \ingroup guibuilder
26
27Editor of widget's layout hints used by the ROOT GUI builder.
28
29*/
30
31
33
34////////////////////////////////////////////////////////////////////////////////
36
37public:
43
44 UInt_t fPadTop; // save values
48
49public:
51 ~TGuiBldHintsManager() override { }
52 void ChangeSelected(TGFrame *frame);
53};
54
55////////////////////////////////////////////////////////////////////////////////
56/// Constructor.
57
59 TGuiBldHintsEditor *hints) :
60 TGVerticalFrame(p, 1, 1), fEditor(e), fHints(hints)
61{
64 fRows = 0;
65 fColumns = 0;
66
67 //-----check button to layout subframes was moved to HintsEditor to be generalized ------
68
69 // "Matrix layout" group frame
70 TGGroupFrame *fGroupFrame4066 = new TGGroupFrame(this, "Matrix layout");
71 TGHorizontalFrame *f = new TGHorizontalFrame(fGroupFrame4066);
72
73 f->AddFrame(new TGLabel(f," Cols "), new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));
75 f->AddFrame(fColumns, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));
76
77 f->AddFrame(new TGLabel(f," Rows "), new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));
79 f->AddFrame(fRows, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));
80
81 fGroupFrame4066->AddFrame(f, new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 2, 2, 2, 2));
82
83 TGTextButton *fAppButton = new TGTextButton(fGroupFrame4066, " Apply ");
84 fGroupFrame4066->AddFrame(fAppButton, new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 5, 5, 2, 2));
85
86 AddFrame(fGroupFrame4066, new TGLayoutHints(kLHintsTop | kLHintsExpandX));
87
88 fAppButton->Connect("Clicked()", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
89 //fRows->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
90 //fColumns->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
91 fRows->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
92 fColumns->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", fHints, "MatrixLayout()");
95
96 fPadTop = 2;
97 fPadBottom = 2;
98 fPadLeft = 2;
99 fPadRight = 2;
100
102 Resize();
103 MapWindow();
104}
105
106////////////////////////////////////////////////////////////////////////////////
107/// action when selected/grabbed frame was changed
108
110{
111 fMatrix = 0;
112
113 if (!frame) {
114 UnmapWindow();
117 fRows->SetNumber(0);
119 return;
120 }
121
122 Bool_t enable = frame->InheritsFrom(TGCompositeFrame::Class()) &&
124
125 if (!enable) {
126 UnmapWindow();
129 fRows->SetNumber(0);
131 } else {
132 TGCompositeFrame *comp = (TGCompositeFrame*)frame;
133 TGLayoutManager *lm = comp->GetLayoutManager();
134
135 if (!lm) {
136 return;
137 }
138 Int_t n = comp->GetList()->GetEntries();
139
140 MapWindow();
143
144 if (lm->IsA() == TGVerticalLayout::Class()) {
145 fRows->SetNumber(n);
147 } else if (lm->IsA() == TGHorizontalLayout::Class()) {
149 fRows->SetNumber(1);
150 } else if (lm->IsA() == TGMatrixLayout::Class()) {
151 fMatrix = (TGMatrixLayout*)lm;
152
155 }
156 }
157 DoRedraw();
158}
159
160///////////////////////////////////////////////////////////////////////////////
161////////////////////////////////////////////////////////////////////////////////
162/// ctor.
163
165 TGVerticalFrame(p, 1, 1), fEditor(e)
166{
168
170
171 TGVerticalFrame *frame3 = new TGVerticalFrame(this,262,18,kVerticalFrame);
172
173 // horizontal frame - layout subframes (token from matrix layout)
174 TGHorizontalFrame *framez399 = new TGHorizontalFrame(frame3,123,40,kHorizontalFrame);
175 fLayButton = new TGCheckButton(framez399,"");
176 framez399->AddFrame(fLayButton, new TGLayoutHints(kLHintsLeft | kLHintsTop,0,1,2,2));
177 TGLabel *framez401 = new TGLabel(framez399,"Layout subframes");
178 framez399->AddFrame(framez401, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop,1,1,2,2));
179
180 frame3->AddFrame(framez399, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop,1,1,1,1));
181
182 fLayButton->Connect("Toggled(Bool_t)", "TGuiBldHintsEditor", this, "LayoutSubframes(Bool_t)");
183
184 //--------layout hints in new layout---------------------------------------
185
186 // "Padding" group frame
187 fPaddingFrame = new TGGroupFrame(frame3, "Padding");
189
191 new TGTableLayoutHints(0, 1, 0, 1,
192 kLHintsRight | kLHintsCenterY, 0, 2, 2, 2));
195 kLHintsLeft | kLHintsCenterY, 0, 0, 2, 2));
196
198 new TGTableLayoutHints(2, 3, 0, 1,
199 kLHintsRight | kLHintsCenterY, 2, 2, 2, 2));
202 kLHintsLeft | kLHintsCenterY, 0, 0, 2, 2));
203
205 new TGTableLayoutHints(0, 1, 1, 2,
206 kLHintsRight | kLHintsCenterY, 0, 2, 2, 2));
209 kLHintsLeft | kLHintsCenterY, 0, 0, 2, 2));
210
212 new TGTableLayoutHints(2, 3, 1, 2,
213 kLHintsRight | kLHintsCenterY, 2, 2, 2, 2));
216 kLHintsLeft | kLHintsCenterY, 0, 0, 2, 2));
217
218 frame3->AddFrame(fPaddingFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2));
219
220 // "Layout" group frame
221 fHintsFrame = new TGGroupFrame(frame3,"Layout");
222
224
225 fCbTop = new TGCheckButton(fHintsFrame, "Top");
227 kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));
228
229 fCbBottom = new TGCheckButton(fHintsFrame, "Bottom");
231 kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));
232
233 fCbLeft = new TGCheckButton(fHintsFrame, "Left");
235 kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));
236
237 fCbRight = new TGCheckButton(fHintsFrame, "Right");
239 kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));
240
241 fCbCenterX = new TGCheckButton(fHintsFrame, "Center in X");
243 kLHintsLeft | kLHintsCenterY, 9, 2, 2, 2));
244
245 fCbCenterY = new TGCheckButton(fHintsFrame, "Center in Y");
247 kLHintsLeft | kLHintsCenterY, 9, 2, 2, 2));
248
249 fCbExpandX = new TGCheckButton(fHintsFrame, "Expand in X");
251 kLHintsLeft | kLHintsCenterY, 9, 2, 2, 2));
252
253 fCbExpandY = new TGCheckButton(fHintsFrame, "Expand in Y");
255 kLHintsLeft | kLHintsCenterY, 9, 2, 2, 2));
256
257 frame3->AddFrame(fHintsFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2));
258
259 fHintsManager = new TGuiBldHintsManager(frame3, e, this);
262 AddFrame(frame3);
263
265 Resize();
267 MapWindow();
268
269 fCbTop->Connect("Clicked()", "TGButton", fCbBottom, "SetDown(=kFALSE)");
270 fCbBottom->Connect("Clicked()", "TGButton", fCbTop, "SetDown(=kFALSE)");
271 fCbRight->Connect("Clicked()", "TGButton", fCbLeft, "SetDown(=kFALSE)");
272 fCbLeft->Connect("Clicked()", "TGButton", fCbRight, "SetDown(=kFALSE)");
273
274 fCbTop->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
275 fCbBottom->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
276 fCbRight->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
277 fCbLeft->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
278 fCbExpandX->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
279 fCbCenterX->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
280 fCbExpandY->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
281 fCbCenterY->Connect("Clicked()", "TGuiBldHintsEditor", this, "UpdateState()");
282
283 fPadTop->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", this, "UpdateState()");
284 fPadLeft->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", this, "UpdateState()");
285 fPadRight->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", this, "UpdateState()");
286 fPadBottom->Connect("ValueSet(Long_t)", "TGuiBldHintsEditor", this, "UpdateState()");
287
288 fPadTop->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", this, "UpdateState()");
289 fPadLeft->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", this, "UpdateState()");
290 fPadRight->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", this, "UpdateState()");
291 fPadBottom->GetNumberEntry()->Connect("ReturnPressed()", "TGuiBldHintsEditor", this, "UpdateState()");
292}
293
294
295////////////////////////////////////////////////////////////////////////////////
296/// Change selected
297
299{
300 if (!frame) {
301 return;
302 }
303 TGFrameElement *fe = frame->GetFrameElement();
304
305 if (!fe) {
306 return;
307 }
308
310
311 ULong_t lh = fe->fLayout->GetLayoutHints();
312
319
324
329
334
339}
340
341////////////////////////////////////////////////////////////////////////////////
342/// Update state
343
345{
346 TGFrame *frame = fEditor->GetSelected();
347
348 if (!frame) {
349 return;
350 }
351
352 TGFrameElement *fe = frame->GetFrameElement();
353
354 if (!fe) {
355 return;
356 }
357
358 if (fLayButton->IsDown() &&
359 ((gTQSender == fPadTop) || (gTQSender == fPadBottom) ||
360 (gTQSender == fPadLeft) || (gTQSender == fPadRight))) {
361 SetMatrixSep();
362 return;
363 }
364
365 ULong_t lh = fe->fLayout->GetLayoutHints();
366
367 if (fCbCenterX->IsDown()) {
368 lh |= kLHintsCenterX;
369 } else {
370 lh &= ~kLHintsCenterX;
371 }
372
373 if (fCbCenterY->IsDown()) {
374 lh |= kLHintsCenterY;
375 } else {
376 lh &= ~kLHintsCenterY;
377 }
378
379 if (fCbExpandX->IsDown()) {
380 lh |= kLHintsExpandX;
381 } else {
382 lh &= ~kLHintsExpandX;
383 }
384
385 if (fCbExpandY->IsDown()) {
386 lh |= kLHintsExpandY;
387 } else {
388 lh &= ~kLHintsExpandY;
389 }
390
391 if (fCbTop->IsDown()) {
392 lh |= kLHintsTop;
393 lh &= ~kLHintsBottom;
394 } else {
395 lh &= ~kLHintsTop;
396 }
397
398 if (fCbBottom->IsDown()) {
399 lh |= kLHintsBottom;
400 lh &= ~kLHintsTop;
401 } else {
402 lh &= ~kLHintsBottom;
403 }
404
405 if (fCbRight->IsDown()) {
406 lh |= kLHintsRight;
407 lh &= ~kLHintsLeft;
408 } else {
409 lh &= ~kLHintsRight;
410 }
411
412 if (fCbLeft->IsDown()) {
413 lh |= kLHintsLeft;
414 lh &= ~kLHintsRight;
415 } else {
416 lh &= ~kLHintsLeft;
417 }
418
419 if (fPadLeft->GetIntNumber() >=0) {
421 }
422 if (fPadRight->GetIntNumber() >=0) {
424 }
425 if (fPadTop->GetIntNumber() >=0) {
427 }
428 if (fPadBottom->GetIntNumber() >=0) {
430 }
431
432 if (fe->fLayout->References() > 1) {
433 TGLayoutHints *lh2 = new TGLayoutHints(*fe->fLayout);
435 lh2->AddReference();
436 fe->fLayout = lh2;
437 } else {
438 fe->fLayout->SetLayoutHints(lh);
439 }
440
441 fEditor->UpdateSelected(frame);
442}
443
444////////////////////////////////////////////////////////////////////////////////
445/// Set the position of selected frame when adjusted by the right panel input.
446
448{
449 if (!fEditor) {
450 return;
451 }
452 TGFrame *frame = fEditor->GetSelected();
453
454 if (!frame) {
455 //fNameFrame->Reset();
456 return;
457 }
458
459 if ((fEditor->GetXPos() >= 0) && (fEditor->GetYPos() >= 0)) {
461 frame->GetWidth(), frame->GetHeight());
462 fClient->NeedRedraw(frame, kTRUE);
463 TGWindow *root = (TGWindow*)fClient->GetRoot();
464 fClient->NeedRedraw(root, kTRUE);
465 if (fBuilder) {
467 }
468 } else {
469 fEditor->SetYPos(frame->GetY());
470 fEditor->SetXPos(frame->GetX());
471 }
472}
473
474
475////////////////////////////////////////////////////////////////////////////////
476/// Layout subframes.
477
479{
480 if (!fEditor) {
481 return;
482 }
483 TGFrame *frame = fEditor->GetSelected();
484
485 if (!frame) {
486 //fNameFrame->Reset();
487 return;
488 }
489
490 TGFrameElement *fe = frame->GetFrameElement();
491
492 if (!fe) {
493 //fNameFrame->Reset();
494 return;
495 }
496
497 Bool_t enable = frame->InheritsFrom(TGCompositeFrame::Class()) &&
499
500 if (!on) {
505
506 ChangeSelected(frame);
507 return;
508 }
509 if (!enable) {
510 return;
511 }
512
513 TGCompositeFrame *comp = (TGCompositeFrame*)frame;
516 comp->SetLayoutBroken(kFALSE);
517
518 if (!fHintsManager->fMatrix) {
519 if (!(frame->GetParent()->GetEditDisabled() & kEditDisableLayout)) {
520 //comp->Resize();
521 comp->Layout();
522 } else {
523 if (comp->GetLayoutManager()) {
524 comp->GetLayoutManager()->Layout();
525 } else {
526 comp->Layout();
527 }
528 }
529 return;
530 }
531
532 MatrixLayout();
533
534}
535
536////////////////////////////////////////////////////////////////////////////////
537/// Set matrix layout separator.
538
540{
541 TGFrame *frame = fEditor->GetSelected();
542
543 if (!frame) {
544 //fNameFrame->Reset();
545 return;
546 }
547
548 TGFrameElement *fe = frame->GetFrameElement();
549
550 if (!fe) {
551 //fNameFrame->Reset();
552 return;
553 }
554
555 Bool_t enable = frame->InheritsFrom(TGCompositeFrame::Class()) &&
556 !(frame->GetEditDisabled() & kEditDisableLayout) &&
557 ((TGCompositeFrame*)frame)->GetLayoutManager() &&
558 ((TGCompositeFrame*)frame)->GetLayoutManager()->InheritsFrom(TGMatrixLayout::Class());
559
560 if (!enable) {
561 return;
562 }
563
565 UInt_t sep = ne->GetIntNumber();
566
567 fPadTop->SetIntNumber(sep);
572
573 fHintsManager->fMatrix->fSep = sep;
574 frame->SetLayoutBroken(kFALSE);
575
576 if (!(frame->GetParent()->GetEditDisabled() & kEditDisableLayout)) {
577 frame->Resize();
578 } else {
580 }
581 fClient->NeedRedraw(frame, kTRUE);
582}
583
584////////////////////////////////////////////////////////////////////////////////
585/// Apply matrix layout.
586
588{
589 TGFrame *frame = fEditor->GetSelected();
590
591 if (!frame) {
592 //fNameFrame->Reset();
593 return;
594 }
595
596 TGFrameElement *fe = frame->GetFrameElement();
597
598 if (!fe) {
599 //fNameFrame->Reset();
600 return;
601 }
602
603 Bool_t enable = frame->InheritsFrom(TGCompositeFrame::Class()) &&
605
606 if (!enable) {
607 return;
608 }
609
610 TGCompositeFrame *comp = (TGCompositeFrame*)frame;
611
614 UInt_t sep = fPadTop->GetIntNumber();
615
620
625
630
631 fPadTop->SetIntNumber(sep);
635
638
639 comp->SetLayoutBroken(kFALSE);
640
641 fHintsManager->fMatrix = new TGMatrixLayout(comp, rows, cols, sep, 0);
643
644 if (!(comp->GetParent()->GetEditDisabled() & kEditDisableLayout)) {
645 comp->Layout(); //resize?
646 } else {
648 }
649 fClient->NeedRedraw(comp, kTRUE);
650}
@ kVerticalFrame
Definition GuiTypes.h:381
@ kHorizontalFrame
Definition GuiTypes.h:382
#define f(i)
Definition RSha256.hxx:104
#define e(i)
Definition RSha256.hxx:103
unsigned long ULong_t
Definition RtypesCore.h:55
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassImp(name)
Definition Rtypes.h:377
@ kDeepCleanup
Definition TGFrame.h:42
@ kLHintsRight
Definition TGLayout.h:26
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsCenterY
Definition TGLayout.h:28
@ kLHintsCenterX
Definition TGLayout.h:25
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
R__EXTERN void * gTQSender
Definition TQObject.h:46
virtual Int_t GetEntries() const
virtual void SetDown(Bool_t on=kTRUE, Bool_t emit=kFALSE)
Definition TGButton.cxx:310
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition TGButton.cxx:459
Selects different options.
Definition TGButton.h:264
Bool_t IsDown() const override
Definition TGButton.h:311
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition TGClient.cxx:224
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition TGClient.cxx:372
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition TGFrame.cxx:1000
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
virtual TList * GetList() const
Definition TGFrame.h:310
virtual TGLayoutManager * GetLayoutManager() const
Definition TGFrame.h:338
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1164
void Layout() override
Layout the elements of the composite frame.
Definition TGFrame.cxx:1257
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1072
void SetEditDisabled(UInt_t on=1) override
Set edit disable flag for this frame and subframes.
Definition TGFrame.cxx:1022
static TClass * Class()
void SetLayoutBroken(Bool_t on=kTRUE) override
Set broken layout. No Layout method is called.
Definition TGFrame.cxx:1012
TGLayoutHints * fLayout
Definition TGLayout.h:114
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize the frame.
Definition TGFrame.cxx:629
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:605
void DoRedraw() override
Redraw the frame.
Definition TGFrame.cxx:430
void MapWindow() override
map window
Definition TGFrame.h:204
TGFrameElement * GetFrameElement() const
Definition TGFrame.h:235
virtual void SetLayoutBroken(Bool_t=kTRUE)
Definition TGFrame.h:215
Int_t GetX() const
Definition TGFrame.h:231
void UnmapWindow() override
unmap window
Definition TGFrame.h:206
UInt_t GetHeight() const
Definition TGFrame.h:225
Int_t GetY() const
Definition TGFrame.h:232
UInt_t GetWidth() const
Definition TGFrame.h:224
A composite frame with a border and a title.
Definition TGFrame.h:522
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:385
static TClass * Class()
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
Int_t GetPadRight() const
Definition TGLayout.h:86
Int_t GetPadBottom() const
Definition TGLayout.h:84
ULong_t GetLayoutHints() const
Definition TGLayout.h:82
virtual void SetPadRight(Int_t v)
Definition TGLayout.h:92
virtual void SetPadLeft(Int_t v)
Definition TGLayout.h:91
Int_t GetPadTop() const
Definition TGLayout.h:83
virtual void SetPadTop(Int_t v)
Definition TGLayout.h:89
Int_t GetPadLeft() const
Definition TGLayout.h:85
virtual void SetPadBottom(Int_t v)
Definition TGLayout.h:90
virtual void SetLayoutHints(ULong_t lh)
Definition TGLayout.h:88
Frame layout manager.
Definition TGLayout.h:135
TClass * IsA() const override
Definition TGLayout.h:149
virtual void Layout()=0
This layout managers does not make use of TGLayoutHints.
Definition TGLayout.h:269
UInt_t fRows
number of rows
Definition TGLayout.h:282
Int_t fSep
interval between frames
Definition TGLayout.h:280
static TClass * Class()
UInt_t fColumns
number of columns
Definition TGLayout.h:283
void Layout() override
Make a matrix layout of all frames in the list.
Definition TGLayout.cxx:635
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
virtual void SetIntNumber(Long_t val, Bool_t emit=kTRUE)
virtual Long_t GetIntNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
@ kNELLimitMin
Lower limit only.
TGClient * fClient
Connection to display server.
Definition TGObject.h:25
This class describes layout hints used by the TGTableLayout class.
A layout manager, which places child frames in a table arranged in rows and columns,...
Yield an action as soon as it is clicked.
Definition TGButton.h:142
A composite frame that layout their children in vertical way.
Definition TGFrame.h:374
static TClass * Class()
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual UInt_t GetEditDisabled() const
Definition TGWindow.h:112
@ kEditDisableHeight
window height cannot be edited
Definition TGWindow.h:62
@ kEditDisableLayout
window layout cannot be edited
Definition TGWindow.h:60
@ kEditDisableWidth
window width cannot be edited
Definition TGWindow.h:63
@ kEditDisable
disable edit of this window
Definition TGWindow.h:57
const TGWindow * GetParent() const
Definition TGWindow.h:83
UInt_t fEditDisabled
flags used for "guibuilding"
Definition TGWindow.h:32
The property editor.
void SetXPos(Int_t pos)
void UpdateSelected(TGFrame *=nullptr)
Update selected frame.
void SetYPos(Int_t pos)
TGFrame * GetSelected() const
Int_t GetXPos() const
Int_t GetYPos() const
Editor of widget's layout hints used by the ROOT GUI builder.
TGCheckButton * fCbLeft
void MatrixLayout()
Apply matrix layout.
void LayoutSubframes(Bool_t on=kTRUE)
Layout subframes.
TGCheckButton * fCbTop
TGuiBldEditor * fEditor
TGCheckButton * fLayButton
TGGroupFrame * fHintsFrame
TGNumberEntry * fPadBottom
TGNumberEntry * fPadLeft
TRootGuiBuilder * fBuilder
TGuiBldHintsManager * fHintsManager
TGNumberEntry * fPadRight
void ChangeSelected(TGFrame *)
Change selected.
TGuiBldHintsEditor(const TGWindow *p, TGuiBldEditor *e)
ctor.
TGGroupFrame * fPaddingFrame
TGCheckButton * fCbExpandY
TGCheckButton * fCbRight
void SetMatrixSep()
Set matrix layout separator.
TGCheckButton * fCbCenterX
TGCheckButton * fCbExpandX
void UpdateState()
Update state.
TGCheckButton * fCbCenterY
void SetPosition()
Set the position of selected frame when adjusted by the right panel input.
TGNumberEntry * fPadTop
TGCheckButton * fCbBottom
TGuiBldHintsEditor * fHints
TGuiBldHintsManager(const TGWindow *p, TGuiBldEditor *editor, TGuiBldHintsEditor *hints)
Constructor.
void ChangeSelected(TGFrame *frame)
action when selected/grabbed frame was changed
static TGuiBuilder * Instance()
return an instance of TGuiBuilder object
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:525
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:869
void AddReference()
Definition TRefCnt.h:40
UInt_t RemoveReference()
Definition TRefCnt.h:41
UInt_t References() const
Definition TRefCnt.h:38
const Int_t n
Definition legend1.C:16