Logo ROOT  
Reference Guide
TGTextEditDialogs.cxx
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 10/7/2000
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
13 This source is based on Xclass95, a Win95-looking GUI toolkit.
14 Copyright (C) 1996, 1997 David Barth, Ricky Ralston, Hector Peraza.
15
16 Xclass95 is free software; you can redistribute it and/or
17 modify it under the terms of the GNU Library General Public
18 License as published by the Free Software Foundation; either
19 version 2 of the License, or (at your option) any later version.
20
21**************************************************************************/
22
23//////////////////////////////////////////////////////////////////////////
24// //
25// TGTextEditDialogs //
26// //
27// This file defines several dialogs that are used by the TGTextEdit //
28// widget via its associated context popup menu. //
29// The following dialogs are available: TGSearchDialog, TGGotoDialog //
30// and TGPrintDialog. //
31// //
32//////////////////////////////////////////////////////////////////////////
33
34#include "TGTextEditDialogs.h"
35#include "TGButton.h"
36#include "TGLabel.h"
37#include "TGTextEntry.h"
38#include "TGIcon.h"
39#include "TGMsgBox.h"
40#include "TGComboBox.h"
41#include "TSystem.h"
42#include "TObjArray.h"
43
44#include <stdlib.h>
45
46
50
53
54////////////////////////////////////////////////////////////////////////////////
55/// Create a search dialog box. Used to get from the user the required
56/// search instructions. Ret_code is kTRUE when sstruct has been set,
57/// kFALSE otherwise (like when dialog was canceled).
58
60 UInt_t w, UInt_t h, TGSearchType *sstruct,
61 Int_t *ret_code, UInt_t options) :
62 TGTransientFrame(p, main, w, h, options)
63{
64 if (!p && !main) {
65 MakeZombie();
66 // coverity [uninit_ctor]
67 return;
68 }
69 fRetCode = ret_code;
70 fType = sstruct;
71
73
74 fF1 = new TGCompositeFrame(this, 60, 20, kVerticalFrame | kFixedWidth);
75 fF2 = new TGCompositeFrame(this, 60, 20, kVerticalFrame);
78
79 fSearchButton = new TGTextButton(fF1, new TGHotString("&Search"), 1);
80 fCancelButton = new TGTextButton(fF1, new TGHotString("&Cancel"), 2);
82
85
86 fL1 = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 3, 0);
88 2, 5, 0, 2);
89 fL21 = new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 5, 10, 0);
90
93
95
96 fLSearch = new TGLabel(fF3, new TGHotString("Search &for:"));
97
98 fCombo = new TGComboBox(fF3, "");
101 if (sstruct && sstruct->fBuffer)
102 fBSearch->AddText(0, sstruct->fBuffer);
103 else if (!gLastSearchString.IsNull())
105 else
107 fSearch->Associate(this);
110
111 fL5 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 5, 0, 0);
112 fL6 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 2, 0, 0);
113
116
117 fG2 = new TGGroupFrame(fF4, new TGString("Direction"), kHorizontalFrame);
118
119 fL3 = new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 2, 2, 2);
120 fL9 = new TGLayoutHints(kLHintsBottom | kLHintsLeft, 0, 0, 0, 0);
121 fL4 = new TGLayoutHints(kLHintsBottom | kLHintsLeft, 0, 0, 5, 0);
122 fL10 = new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 0);
123
124 fCaseCheck = new TGCheckButton(fF4, new TGHotString("&Case sensitive"), 1);
125 fCaseCheck->Associate(this);
127
128 fDirectionRadio[0] = new TGRadioButton(fG2, new TGHotString("Forward"), 1);
129 fDirectionRadio[1] = new TGRadioButton(fG2, new TGHotString("Backward"), 2);
130
133 fDirectionRadio[0]->Associate(this);
134 fDirectionRadio[1]->Associate(this);
135
138 else
140
141 if (fType->fDirection)
143 else
145
146 fF4->AddFrame(fG2, fL3);
147
148 fF2->AddFrame(fF3, fL1);
149 fF2->AddFrame(fF4, fL1);
150
151 AddFrame(fF2, fL2);
152
156
158
159 SetWindowName("Search");
160 SetIconName("Search");
161
165
166 if (fType->fClose) {
167 MapWindow();
169 fClient->WaitFor(this);
170 }
171}
172
173////////////////////////////////////////////////////////////////////////////////
174/// Clean up search dialog.
175
177{
178 if (IsZombie()) return;
179 delete fSearchButton;
180 delete fCancelButton;
181 delete fDirectionRadio[0]; delete fDirectionRadio[1];
182 delete fCaseCheck;
183 delete fCombo;
184 delete fLSearch;
185 delete fG2;
186 delete fF1; delete fF2; delete fF3; delete fF4;
187 delete fL1; delete fL2; delete fL3; delete fL4; delete fL5; delete fL6;
188 delete fL21;delete fL9; delete fL10;
189}
190
191////////////////////////////////////////////////////////////////////////////////
192/// Close the dialog. On close the dialog will be deleted and cannot be
193/// re-used.
194
196{
197 if (fType->fClose) {
198 DeleteWindow();
199 } else {
200 UnmapWindow();
201 }
202}
203
204////////////////////////////////////////////////////////////////////////////////
205/// emit signal when search text entered
206
208{
209 Emit("TextEntered(const char *)", text);
210}
211
212////////////////////////////////////////////////////////////////////////////////
213/// Process search dialog widget messages.
214
216{
217 const char *string;
218
219 switch (GET_MSG(msg)) {
220 case kC_COMMAND:
221 switch (GET_SUBMSG(msg)) {
222 case kCM_BUTTON:
223 switch (parm1) {
224 case 1:
225 string = fBSearch->GetString();
226 if (fType->fBuffer)
227 delete [] fType->fBuffer;
228 fType->fBuffer = StrDup(string);
229 gLastSearchString = string;
230 *fRetCode = kTRUE;
231 TextEntered(string);
233 if (fType->fClose) CloseWindow();
234 break;
235 case 2:
236 *fRetCode = kFALSE;
237 CloseWindow();
238 break;
239 }
240 break;
241
242 case kCM_CHECKBUTTON:
244 break;
245
246 case kCM_RADIOBUTTON:
247 switch (parm1) {
248 case 1:
251 break;
252 case 2:
255 break;
256 }
257 break;
258
259 default:
260 break;
261 }
262 break;
263
264 case kC_TEXTENTRY:
265 switch (GET_SUBMSG(msg)) {
266 case kTE_TEXTCHANGED:
267 string = fBSearch->GetString();
268 if (!string[0]) {
270 } else {
272 }
273 break;
274 case kTE_ENTER:
275 string = fBSearch->GetString();
276 if (fType->fBuffer)
277 delete [] fType->fBuffer;
278 fType->fBuffer = StrDup(string);
279 gLastSearchString = string;
280 *fRetCode = kTRUE;
281 TextEntered(string);
282 if (fType->fClose) CloseWindow();
283 break;
284 default:
285 break;
286 }
287 break;
288
289 default:
290 break;
291 }
292
293 return kTRUE;
294}
295
296////////////////////////////////////////////////////////////////////////////////
297/// Return global search dialog.
298
300{
301 return fgSearchDialog;
302}
303
304
305////////////////////////////////////////////////////////////////////////////////
306/// Create the printer dialog box. Returns kTRUE in ret_code when
307/// printerName and printProg have been set and cancel was not pressed,
308/// kFALSE otherwise.
309
311 UInt_t w, UInt_t h, char **printerName,
312 char **printProg, Int_t *ret_code,
313 UInt_t options) :
314 TGTransientFrame(p, main, w, h, options)
315{
316 if (!p && !main) {
317 MakeZombie();
318 // coverity [uninit_ctor]
319 return;
320 }
321 fPrinter = printerName;
322 fPrintCommand = printProg;
323 fRetCode = ret_code;
325
327
328 fF1 = new TGCompositeFrame(this, 60, 20, kVerticalFrame | kFixedWidth);
329 fF5 = new TGCompositeFrame(this, 60, 20, kHorizontalFrame);
330 fF2 = new TGCompositeFrame(fF5, 60, 20, kVerticalFrame);
333
334 fPrintButton = new TGTextButton(fF1, new TGHotString("&Print"), 1);
335 fCancelButton = new TGTextButton(fF1, new TGHotString("&Cancel"), 2);
337
338 fPrintButton->Associate(this);
340
341 fL1 = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2);
343 2, 5, 0, 2);
344 fL3 = new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 2, 4, 4);
345 fL5 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 5, 0, 0);
346 fL6 = new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 0, 2, 0, 0);
347 fL7 = new TGLayoutHints(kLHintsLeft, 10, 10, 10, 10);
348
349 fL21 = new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 5, 10, 0);
350
353 AddFrame(fF1, fL3);
354
355
356 fLPrintCommand = new TGLabel(fF3, new TGHotString("Print command:"));
358 if ((printProg) && (*printProg))
359 fBPrintCommand->AddText(0, *printProg);
363
366
367 fLPrinter = new TGLabel(fF4, new TGHotString("Printer:"));
368 if ((printerName) && (*printerName))
369 fPrinterEntry = new TGComboBox(fF4, *printerName);
374
375 fF2->AddFrame(fF3, fL1);
376 fF2->AddFrame(fF4, fL1);
377
378 const TGPicture *printerPicture = fClient->GetPicture("printer_s.xpm");
379 if (!printerPicture) {
380 Error("TGPrintDialog", "printer_s.xpm not found");
381 fPrinterIcon = 0;
382 } else {
383 fPrinterIcon = new TGIcon(fF5, printerPicture, 32, 32);
385 }
386 fF5->AddFrame(fF2, fL1);
387 AddFrame(fF5, fL1);
388
391
392 GetPrinters();
394
395 SetWindowName("Print");
396 SetIconName("Print");
397
401
403 MapWindow();
404 fClient->WaitFor(this);
405}
406
407////////////////////////////////////////////////////////////////////////////////
408/// Clean up print dialog.
409
411{
412 if (IsZombie()) return;
413 delete fPrinterIcon;
414 delete fPrintButton;
415 delete fCancelButton;
416 delete fPrinterEntry; // deletes also fBPrinter
417 delete fPrintCommandEntry; // deletes also fBPrintCommand
418 delete fLPrinter; delete fLPrintCommand;
419 delete fF1; delete fF2; delete fF3; delete fF4; delete fF5;
420 delete fL1; delete fL2; delete fL3; delete fL5; delete fL6; delete fL7;
421 delete fL21;
422}
423
424////////////////////////////////////////////////////////////////////////////////
425/// Close the dialog. On close the dialog will be deleted and cannot be
426/// re-used.
427
429{
430 DeleteWindow();
431}
432
433////////////////////////////////////////////////////////////////////////////////
434/// Ask the system fo the list of available printers and populate the combo
435/// box. If there is a default printer, select it in the list.
436
438{
439 TObject *obj;
440 Int_t idx = 1, dflt =1;
441
442 if (gVirtualX->InheritsFrom("TGX11") || gVirtualX->InheritsFrom("TGCocoa")) {
443 char *lpstat = gSystem->Which(gSystem->Getenv("PATH"), "lpstat",
445 if (lpstat == 0) return;
446 TString defaultprinter = gSystem->GetFromPipe("lpstat -d");
447 TString printerlist = gSystem->GetFromPipe("lpstat -v");
448 TObjArray *tokens = printerlist.Tokenize("\n");
449 TIter iter(tokens);
450 while((obj = iter())) {
451 TString line = obj->GetName();
452 TObjArray *tk = line.Tokenize(" ");
453 TString pname = ((TObject*)tk->At(2))->GetName();
454 if (pname.EndsWith(":")) pname.Remove(pname.Last(':'));
455 //if (pname.Contains(":")) pname.Remove(pname.Last(':'));
456 if (defaultprinter.Contains(pname)) {
457 dflt = idx;
459 }
460 fPrinterEntry->AddEntry(pname.Data(), idx++);
461 }
462 delete [] lpstat;
463 }
464 else {
465 TString defaultprinter = gSystem->GetFromPipe("WMIC Path Win32_Printer where Default=TRUE Get DeviceID");
466 TString printerlist = gSystem->GetFromPipe("WMIC Path Win32_Printer Get DeviceID");
467 defaultprinter.Remove(0, defaultprinter.First('\n')); // remove "Default"
468 printerlist.Remove(0, printerlist.First('\n')); // remove "DeviceID"
469 printerlist.ReplaceAll("\r", "");
470 TObjArray *tokens = printerlist.Tokenize("\n");
471 TIter iter(tokens);
472 while((obj = iter())) {
473 TString pname = obj->GetName();
474 pname.Remove(TString::kTrailing, ' ');
475 if (defaultprinter.Contains(pname)) {
476 dflt = idx;
478 }
479 fPrinterEntry->AddEntry(pname.Data(), idx++);
480 }
481 }
484}
485
486////////////////////////////////////////////////////////////////////////////////
487/// Process print dialog widget messages.
488
490{
491 const char *string, *txt;
492
493 switch (GET_MSG(msg)) {
494 case kC_COMMAND:
495 switch (GET_SUBMSG(msg)) {
496 case kCM_BUTTON:
497 switch (parm1) {
498 case 1:
499 *fRetCode = kTRUE;
500 {
501 string = fBPrinter->GetString();
502 delete [] *fPrinter;
503 const size_t prSize = strlen(string) + 1;
504 *fPrinter = new char[prSize];
505 strlcpy(*fPrinter, string, prSize);
506 }
507 {
508 string = fBPrintCommand->GetString();
509 delete [] *fPrintCommand;
510 const size_t cmdSize = strlen(string) + 1;
511 *fPrintCommand = new char[cmdSize];
512 strlcpy(*fPrintCommand, string, cmdSize);
513 }
514
515 if (fBPrintCommand->GetTextLength() == 0) {
516 txt = "Please provide print command or use \"Cancel\"";
518 "Missing Print Parameters", txt, kMBIconExclamation,
519 kMBOk);
520 return kTRUE;
521 }
522 CloseWindow();
523 break;
524 case 2:
525 *fRetCode = kFALSE;
526 CloseWindow();
527 break;
528 }
529 break;
530 }
531 break;
532
533 default:
534 break;
535 }
536
537 return kTRUE;
538}
539
540////////////////////////////////////////////////////////////////////////////////
541/// Create a dialog to GoTo a specific line number. Returns -1 in
542/// ret_code in case no valid line number was given or in case
543/// cancel was pressed. If on input *ret_code is > 0 then this value
544/// will be used as default value.
545
547 UInt_t w, UInt_t h, Long_t *ret_code,
548 UInt_t options) :
549 TGTransientFrame(p, main, w, h, options)
550{
551 if (!p && !main) {
552 MakeZombie();
553 // coverity [uninit_ctor]
554 return;
555 }
556 fRetCode = ret_code;
558
560
561 fF1 = new TGCompositeFrame(this, 60, 20, kVerticalFrame | kFixedWidth);
562 fF2 = new TGCompositeFrame(this, 60, 20, kHorizontalFrame);
563
564 fGotoButton = new TGTextButton(fF1, new TGHotString("&Goto"), 1);
565 fCancelButton = new TGTextButton(fF1, new TGHotString("&Cancel"), 2);
567
568 fGotoButton->Associate(this);
570
571 fL1 = new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 2, 2, 3, 0);
572 fL21 = new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 5, 10, 0);
573
576 AddFrame(fF1, fL21);
577
578 fLGoTo = new TGLabel(fF2, new TGHotString("&Goto Line:"));
579
580 fBGoTo = new TGTextBuffer(50);
581 if (*fRetCode > 0) {
582 char curline[32];
583 snprintf(curline, 32, "%ld", *fRetCode);
584 fBGoTo->AddText(0, curline);
585 } else
587 fGoTo = new TGTextEntry(fF2, fBGoTo);
588 fGoTo->Associate(this);
590 fGoTo->SelectAll();
591
592 fL5 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 5, 0, 0);
593 fL6 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 2, 0, 0);
594
597 AddFrame(fF2, fL1);
598
601
603
604 SetWindowName("Goto");
605 SetIconName("Print");
606
610
611 MapWindow();
613 fClient->WaitFor(this);
614}
615
616////////////////////////////////////////////////////////////////////////////////
617/// Clean up goto dialog
618
620{
621 if (IsZombie()) return;
622 delete fGotoButton;
623 delete fCancelButton;
624 delete fGoTo;
625 delete fLGoTo;
626 delete fF1; delete fF2;
627 delete fL1; delete fL5; delete fL6; delete fL21;
628}
629
630////////////////////////////////////////////////////////////////////////////////
631/// Close the dialog. On close the dialog will be deleted and cannot be
632/// re-used.
633
635{
636 DeleteWindow();
637}
638
639////////////////////////////////////////////////////////////////////////////////
640/// Process goto dialog widget messages.
641
643{
644 const char *string;
645
646 switch (GET_MSG(msg)) {
647 case kC_COMMAND:
648 switch (GET_SUBMSG(msg)) {
649 case kCM_BUTTON:
650 switch (parm1) {
651 case 1:
652 string = fBGoTo->GetString();
653 *fRetCode = (Long_t) atof(string);
654 CloseWindow();
655 break;
656 case 2:
657 *fRetCode = -1;
658 CloseWindow();
659 break;
660 }
661 break;
662
663 default:
664 break;
665 }
666 break;
667
668 case kC_TEXTENTRY:
669 switch (GET_SUBMSG(msg)) {
670 case kTE_TEXTCHANGED:
671 string = fBGoTo->GetString();
672 if (!string[0])
674 else
676 break;
677 case kTE_ENTER:
678 string = fBGoTo->GetString();
679 *fRetCode = (Long_t) atof(string);
680 CloseWindow();
681 break;
682 default:
683 break;
684 }
685 break;
686
687 default:
688 break;
689 }
690
691 return kTRUE;
692}
693
#define h(i)
Definition: RSha256.hxx:106
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassImp(name)
Definition: Rtypes.h:365
@ kButtonDown
Definition: TGButton.h:54
@ kButtonDisabled
Definition: TGButton.h:56
@ kButtonUp
Definition: TGButton.h:53
@ kMWMFuncAll
Definition: TGFrame.h:80
@ kMWMFuncResize
Definition: TGFrame.h:81
@ kMWMDecorMaximize
Definition: TGFrame.h:100
@ kMWMDecorMenu
Definition: TGFrame.h:98
@ kMWMDecorAll
Definition: TGFrame.h:94
@ kMWMFuncMaximize
Definition: TGFrame.h:84
@ kMWMInputModeless
Definition: TGFrame.h:88
@ kVerticalFrame
Definition: TGFrame.h:59
@ kFixedWidth
Definition: TGFrame.h:65
@ kHorizontalFrame
Definition: TGFrame.h:60
@ kLHintsRight
Definition: TGLayout.h:33
@ kLHintsLeft
Definition: TGLayout.h:31
@ kLHintsCenterY
Definition: TGLayout.h:35
@ kLHintsBottom
Definition: TGLayout.h:36
@ kLHintsTop
Definition: TGLayout.h:34
@ kLHintsExpandX
Definition: TGLayout.h:37
@ kMBOk
Definition: TGMsgBox.h:44
@ kMBIconExclamation
Definition: TGMsgBox.h:35
static TString gLastSearchString
char * StrDup(const char *str)
Duplicate the string str.
Definition: TString.cxx:2490
@ kExecutePermission
Definition: TSystem.h:46
R__EXTERN TSystem * gSystem
Definition: TSystem.h:560
#define gVirtualX
Definition: TVirtualX.h:345
Int_t GET_MSG(Long_t val)
@ kTE_TEXTCHANGED
@ kTE_ENTER
@ kC_COMMAND
@ kCM_BUTTON
@ kC_TEXTENTRY
@ kCM_RADIOBUTTON
@ kCM_CHECKBUTTON
Int_t GET_SUBMSG(Long_t val)
#define snprintf
Definition: civetweb.c:1540
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set button state.
Definition: TGButton.cxx:185
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:224
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
Definition: TGClient.cxx:708
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:289
virtual TGTextEntry * GetTextEntry() const
Definition: TGComboBox.h:131
virtual void AddEntry(TGString *s, Int_t id)
Definition: TGComboBox.h:106
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
Definition: TGComboBox.cxx:450
virtual void ReturnPressed()
Add new entry to combo box when return key pressed inside text entry ReturnPressed signal is emitted.
Definition: TGComboBox.cxx:655
virtual void Layout()
layout combobox
Definition: TGComboBox.cxx:534
TGCompositeFrame(const TGCompositeFrame &)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:1025
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:375
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:373
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
Definition: TGFrame.cxx:1004
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:237
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:238
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:258
virtual UInt_t GetOptions() const
Definition: TGFrame.h:244
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
virtual void MapWindow()
Definition: TGFrame.h:251
virtual void UnmapWindow()
Definition: TGFrame.h:253
virtual void CloseWindow()
Close the dialog.
TGCompositeFrame * fF2
TGGotoDialog(const TGWindow *p=0, const TGWindow *main=0, UInt_t w=1, UInt_t h=1, Long_t *ret_code=0, UInt_t options=kVerticalFrame)
Create a dialog to GoTo a specific line number.
TGTextBuffer * fBGoTo
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process goto dialog widget messages.
TGCompositeFrame * fF1
TGTextEntry * fGoTo
TGLayoutHints * fL1
TGLayoutHints * fL21
TGButton * fGotoButton
virtual ~TGGotoDialog()
Clean up goto dialog.
TGButton * fCancelButton
TGLayoutHints * fL5
TGLayoutHints * fL6
Definition: TGIcon.h:30
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Definition: TGFrame.cxx:1759
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition: TGFrame.cxx:1824
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1746
TGClient * fClient
Definition: TGObject.h:37
TGTextEntry * fPrintCommandEntry
TGLayoutHints * fL1
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process print dialog widget messages.
TGLabel * fLPrintCommand
TGTextBuffer * fBPrintCommand
TGCompositeFrame * fF4
TGPrintDialog(const TGWindow *p=0, const TGWindow *main=0, UInt_t w=1, UInt_t h=1, char **printerName=0, char **printProg=0, Int_t *ret_code=0, UInt_t options=kVerticalFrame)
Create the printer dialog box.
TGButton * fPrintButton
virtual ~TGPrintDialog()
Clean up print dialog.
virtual void GetPrinters()
Ask the system fo the list of available printers and populate the combo box.
TGLayoutHints * fL2
TGCompositeFrame * fF3
TGButton * fCancelButton
TGIcon * fPrinterIcon
virtual void CloseWindow()
Close the dialog.
TGLayoutHints * fL6
TGTextBuffer * fBPrinter
TGComboBox * fPrinterEntry
TGLayoutHints * fL3
TGLayoutHints * fL5
TGLayoutHints * fL21
TGLayoutHints * fL7
TGCompositeFrame * fF1
TGCompositeFrame * fF5
TGCompositeFrame * fF2
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set radio button state.
Definition: TGButton.cxx:1563
TGLayoutHints * fL2
TGButton * fSearchButton
TGLayoutHints * fL21
static TGSearchDialog *& SearchDialog()
Return global search dialog.
TGSearchDialog(const TGWindow *p=0, const TGWindow *main=0, UInt_t w=1, UInt_t h=1, TGSearchType *sstruct=0, Int_t *ret_code=0, UInt_t options=kVerticalFrame)
Create a search dialog box.
TGTextEntry * fSearch
TGLayoutHints * fL10
TGCompositeFrame * fF3
TGSearchType * fType
TGLayoutHints * fL1
TGRadioButton * fDirectionRadio[2]
TGCheckButton * fCaseCheck
TGLayoutHints * fL4
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process search dialog widget messages.
TGCompositeFrame * fF1
TGLayoutHints * fL3
static TGSearchDialog * fgSearchDialog
TGCompositeFrame * fF2
TGLayoutHints * fL6
TGGroupFrame * fG2
TGTextBuffer * fBSearch
virtual void TextEntered(const char *text)
emit signal when search text entered
TGButton * fCancelButton
TGCompositeFrame * fF4
TGLayoutHints * fL5
virtual ~TGSearchDialog()
Clean up search dialog.
TGComboBox * fCombo
virtual void CloseWindow()
Close the dialog.
TGLayoutHints * fL9
void AddText(Int_t pos, const char *text)
Definition: TGTextBuffer.h:49
const char * GetString() const
Definition: TGTextBuffer.h:47
UInt_t GetTextLength() const
Definition: TGTextBuffer.h:45
TGTextBuffer * GetBuffer() const
Definition: TGTextEntry.h:127
virtual void SelectAll()
Selects all text (i.e.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
Definition: TGFrame.cxx:1913
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
Definition: TGWindow.cxx:133
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:221
@ kEditDisable
Definition: TGWindow.h:59
virtual void RequestFocus()
Definition: TGWindow.h:98
UInt_t fEditDisabled
Definition: TGWindow.h:41
An array of TObjects.
Definition: TObjArray.h:37
TObject * At(Int_t idx) const
Definition: TObjArray.h:166
Mother of all ROOT objects.
Definition: TObject.h:37
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:357
R__ALWAYS_INLINE Bool_t IsZombie() const
Definition: TObject.h:134
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:880
void MakeZombie()
Definition: TObject.h:49
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:164
Basic string class.
Definition: TString.h:131
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
Definition: TString.cxx:2177
Ssiz_t First(char c) const
Find first occurrence of a character c.
Definition: TString.cxx:499
const char * Data() const
Definition: TString.h:364
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:687
@ kTrailing
Definition: TString.h:262
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Definition: TString.cxx:892
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition: TString.cxx:2197
Bool_t IsNull() const
Definition: TString.h:402
TString & Remove(Ssiz_t pos)
Definition: TString.h:668
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:619
virtual const char * Getenv(const char *env)
Get environment variable.
Definition: TSystem.cxx:1653
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.
Definition: TSystem.cxx:690
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Definition: TSystem.cxx:1537
TText * text
TLine * line
int main(int argc, char **argv)