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#include "TVirtualX.h"
44
45#include <stdlib.h>
46
47
51
54
55////////////////////////////////////////////////////////////////////////////////
56/// Create a search dialog box. Used to get from the user the required
57/// search instructions. Ret_code is kTRUE when sstruct has been set,
58/// kFALSE otherwise (like when dialog was canceled).
59
61 UInt_t w, UInt_t h, TGSearchType *sstruct,
62 Int_t *ret_code, UInt_t options) :
63 TGTransientFrame(p, main, w, h, options)
64{
65 if (!p && !main) {
66 MakeZombie();
67 // coverity [uninit_ctor]
68 return;
69 }
70 fRetCode = ret_code;
71 fType = sstruct;
72
74
75 fF1 = new TGCompositeFrame(this, 60, 20, kVerticalFrame | kFixedWidth);
76 fF2 = new TGCompositeFrame(this, 60, 20, kVerticalFrame);
79
80 fSearchButton = new TGTextButton(fF1, new TGHotString("&Search"), 1);
81 fCancelButton = new TGTextButton(fF1, new TGHotString("&Cancel"), 2);
83
86
87 fL1 = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 3, 0);
89 2, 5, 0, 2);
90 fL21 = new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 5, 10, 0);
91
94
96
97 fLSearch = new TGLabel(fF3, new TGHotString("Search &for:"));
98
99 fCombo = new TGComboBox(fF3, "");
102 if (sstruct && sstruct->fBuffer)
103 fBSearch->AddText(0, sstruct->fBuffer);
104 else if (!gLastSearchString.IsNull())
106 else
108 fSearch->Associate(this);
111
112 fL5 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 5, 0, 0);
113 fL6 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 2, 0, 0);
114
117
118 fG2 = new TGGroupFrame(fF4, new TGString("Direction"), kHorizontalFrame);
119
120 fL3 = new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 2, 2, 2);
121 fL9 = new TGLayoutHints(kLHintsBottom | kLHintsLeft, 0, 0, 0, 0);
122 fL4 = new TGLayoutHints(kLHintsBottom | kLHintsLeft, 0, 0, 5, 0);
123 fL10 = new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 0);
124
125 fCaseCheck = new TGCheckButton(fF4, new TGHotString("&Case sensitive"), 1);
126 fCaseCheck->Associate(this);
128
129 fDirectionRadio[0] = new TGRadioButton(fG2, new TGHotString("Forward"), 1);
130 fDirectionRadio[1] = new TGRadioButton(fG2, new TGHotString("Backward"), 2);
131
134 fDirectionRadio[0]->Associate(this);
135 fDirectionRadio[1]->Associate(this);
136
139 else
141
142 if (fType->fDirection)
144 else
146
147 fF4->AddFrame(fG2, fL3);
148
149 fF2->AddFrame(fF3, fL1);
150 fF2->AddFrame(fF4, fL1);
151
152 AddFrame(fF2, fL2);
153
157
159
160 SetWindowName("Search");
161 SetIconName("Search");
162
166
167 if (fType->fClose) {
168 MapWindow();
170 fClient->WaitFor(this);
171 }
172}
173
174////////////////////////////////////////////////////////////////////////////////
175/// Clean up search dialog.
176
178{
179 if (IsZombie()) return;
180 delete fSearchButton;
181 delete fCancelButton;
182 delete fDirectionRadio[0]; delete fDirectionRadio[1];
183 delete fCaseCheck;
184 delete fCombo;
185 delete fLSearch;
186 delete fG2;
187 delete fF1; delete fF2; delete fF3; delete fF4;
188 delete fL1; delete fL2; delete fL3; delete fL4; delete fL5; delete fL6;
189 delete fL21;delete fL9; delete fL10;
190}
191
192////////////////////////////////////////////////////////////////////////////////
193/// Close the dialog. On close the dialog will be deleted and cannot be
194/// re-used.
195
197{
198 if (fType->fClose) {
199 DeleteWindow();
200 } else {
201 UnmapWindow();
202 }
203}
204
205////////////////////////////////////////////////////////////////////////////////
206/// emit signal when search text entered
207
209{
210 Emit("TextEntered(const char *)", text);
211}
212
213////////////////////////////////////////////////////////////////////////////////
214/// Process search dialog widget messages.
215
217{
218 const char *string;
219
220 switch (GET_MSG(msg)) {
221 case kC_COMMAND:
222 switch (GET_SUBMSG(msg)) {
223 case kCM_BUTTON:
224 switch (parm1) {
225 case 1:
226 string = fBSearch->GetString();
227 if (fType->fBuffer)
228 delete [] fType->fBuffer;
229 fType->fBuffer = StrDup(string);
230 gLastSearchString = string;
231 *fRetCode = kTRUE;
232 TextEntered(string);
234 if (fType->fClose) CloseWindow();
235 break;
236 case 2:
237 *fRetCode = kFALSE;
238 CloseWindow();
239 break;
240 }
241 break;
242
243 case kCM_CHECKBUTTON:
245 break;
246
247 case kCM_RADIOBUTTON:
248 switch (parm1) {
249 case 1:
252 break;
253 case 2:
256 break;
257 }
258 break;
259
260 default:
261 break;
262 }
263 break;
264
265 case kC_TEXTENTRY:
266 switch (GET_SUBMSG(msg)) {
267 case kTE_TEXTCHANGED:
268 string = fBSearch->GetString();
269 if (!string[0]) {
271 } else {
273 }
274 break;
275 case kTE_ENTER:
276 string = fBSearch->GetString();
277 if (fType->fBuffer)
278 delete [] fType->fBuffer;
279 fType->fBuffer = StrDup(string);
280 gLastSearchString = string;
281 *fRetCode = kTRUE;
282 TextEntered(string);
283 if (fType->fClose) CloseWindow();
284 break;
285 default:
286 break;
287 }
288 break;
289
290 default:
291 break;
292 }
293
294 return kTRUE;
295}
296
297////////////////////////////////////////////////////////////////////////////////
298/// Return global search dialog.
299
301{
302 return fgSearchDialog;
303}
304
305
306////////////////////////////////////////////////////////////////////////////////
307/// Create the printer dialog box. Returns kTRUE in ret_code when
308/// printerName and printProg have been set and cancel was not pressed,
309/// kFALSE otherwise.
310
312 UInt_t w, UInt_t h, char **printerName,
313 char **printProg, Int_t *ret_code,
314 UInt_t options) :
315 TGTransientFrame(p, main, w, h, options)
316{
317 if (!p && !main) {
318 MakeZombie();
319 // coverity [uninit_ctor]
320 return;
321 }
322 fPrinter = printerName;
323 fPrintCommand = printProg;
324 fRetCode = ret_code;
326
328
329 fF1 = new TGCompositeFrame(this, 60, 20, kVerticalFrame | kFixedWidth);
330 fF5 = new TGCompositeFrame(this, 60, 20, kHorizontalFrame);
331 fF2 = new TGCompositeFrame(fF5, 60, 20, kVerticalFrame);
334
335 fPrintButton = new TGTextButton(fF1, new TGHotString("&Print"), 1);
336 fCancelButton = new TGTextButton(fF1, new TGHotString("&Cancel"), 2);
338
339 fPrintButton->Associate(this);
341
342 fL1 = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 2, 2);
344 2, 5, 0, 2);
345 fL3 = new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 2, 4, 4);
346 fL5 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 5, 0, 0);
347 fL6 = new TGLayoutHints(kLHintsExpandX | kLHintsCenterY, 0, 2, 0, 0);
348 fL7 = new TGLayoutHints(kLHintsLeft, 10, 10, 10, 10);
349
350 fL21 = new TGLayoutHints(kLHintsTop | kLHintsRight, 2, 5, 10, 0);
351
354 AddFrame(fF1, fL3);
355
356
357 fLPrintCommand = new TGLabel(fF3, new TGHotString("Print command:"));
359 if ((printProg) && (*printProg))
360 fBPrintCommand->AddText(0, *printProg);
364
367
368 fLPrinter = new TGLabel(fF4, new TGHotString("Printer:"));
369 if ((printerName) && (*printerName))
370 fPrinterEntry = new TGComboBox(fF4, *printerName);
375
376 fF2->AddFrame(fF3, fL1);
377 fF2->AddFrame(fF4, fL1);
378
379 const TGPicture *printerPicture = fClient->GetPicture("printer_s.xpm");
380 if (!printerPicture) {
381 Error("TGPrintDialog", "printer_s.xpm not found");
382 fPrinterIcon = 0;
383 } else {
384 fPrinterIcon = new TGIcon(fF5, printerPicture, 32, 32);
386 }
387 fF5->AddFrame(fF2, fL1);
388 AddFrame(fF5, fL1);
389
392
393 GetPrinters();
395
396 SetWindowName("Print");
397 SetIconName("Print");
398
402
404 MapWindow();
405 fClient->WaitFor(this);
406}
407
408////////////////////////////////////////////////////////////////////////////////
409/// Clean up print dialog.
410
412{
413 if (IsZombie()) return;
414 delete fPrinterIcon;
415 delete fPrintButton;
416 delete fCancelButton;
417 delete fPrinterEntry; // deletes also fBPrinter
418 delete fPrintCommandEntry; // deletes also fBPrintCommand
419 delete fLPrinter; delete fLPrintCommand;
420 delete fF1; delete fF2; delete fF3; delete fF4; delete fF5;
421 delete fL1; delete fL2; delete fL3; delete fL5; delete fL6; delete fL7;
422 delete fL21;
423}
424
425////////////////////////////////////////////////////////////////////////////////
426/// Close the dialog. On close the dialog will be deleted and cannot be
427/// re-used.
428
430{
431 DeleteWindow();
432}
433
434////////////////////////////////////////////////////////////////////////////////
435/// Ask the system fo the list of available printers and populate the combo
436/// box. If there is a default printer, select it in the list.
437
439{
440 TObject *obj;
441 Int_t idx = 1, dflt =1;
442
443 if (gVirtualX->InheritsFrom("TGX11") || gVirtualX->InheritsFrom("TGCocoa")) {
444 char *lpstat = gSystem->Which(gSystem->Getenv("PATH"), "lpstat",
446 if (lpstat == 0) return;
447 TString defaultprinter = gSystem->GetFromPipe("lpstat -d");
448 TString printerlist = gSystem->GetFromPipe("lpstat -v");
449 TObjArray *tokens = printerlist.Tokenize("\n");
450 TIter iter(tokens);
451 while((obj = iter())) {
452 TString line = obj->GetName();
453 TObjArray *tk = line.Tokenize(" ");
454 TString pname = ((TObject*)tk->At(2))->GetName();
455 if (pname.EndsWith(":")) pname.Remove(pname.Last(':'));
456 //if (pname.Contains(":")) pname.Remove(pname.Last(':'));
457 if (defaultprinter.Contains(pname)) {
458 dflt = idx;
460 }
461 fPrinterEntry->AddEntry(pname.Data(), idx++);
462 }
463 delete [] lpstat;
464 }
465 else {
466 TString defaultprinter = gSystem->GetFromPipe("WMIC Path Win32_Printer where Default=TRUE Get DeviceID");
467 TString printerlist = gSystem->GetFromPipe("WMIC Path Win32_Printer Get DeviceID");
468 defaultprinter.Remove(0, defaultprinter.First('\n')); // remove "Default"
469 printerlist.Remove(0, printerlist.First('\n')); // remove "DeviceID"
470 printerlist.ReplaceAll("\r", "");
471 TObjArray *tokens = printerlist.Tokenize("\n");
472 TIter iter(tokens);
473 while((obj = iter())) {
474 TString pname = obj->GetName();
475 pname.Remove(TString::kTrailing, ' ');
476 if (defaultprinter.Contains(pname)) {
477 dflt = idx;
479 }
480 fPrinterEntry->AddEntry(pname.Data(), idx++);
481 }
482 }
485}
486
487////////////////////////////////////////////////////////////////////////////////
488/// Process print dialog widget messages.
489
491{
492 const char *string, *txt;
493
494 switch (GET_MSG(msg)) {
495 case kC_COMMAND:
496 switch (GET_SUBMSG(msg)) {
497 case kCM_BUTTON:
498 switch (parm1) {
499 case 1:
500 *fRetCode = kTRUE;
501 {
502 string = fBPrinter->GetString();
503 delete [] *fPrinter;
504 const size_t prSize = strlen(string) + 1;
505 *fPrinter = new char[prSize];
506 strlcpy(*fPrinter, string, prSize);
507 }
508 {
509 string = fBPrintCommand->GetString();
510 delete [] *fPrintCommand;
511 const size_t cmdSize = strlen(string) + 1;
512 *fPrintCommand = new char[cmdSize];
513 strlcpy(*fPrintCommand, string, cmdSize);
514 }
515
516 if (fBPrintCommand->GetTextLength() == 0) {
517 txt = "Please provide print command or use \"Cancel\"";
519 "Missing Print Parameters", txt, kMBIconExclamation,
520 kMBOk);
521 return kTRUE;
522 }
523 CloseWindow();
524 break;
525 case 2:
526 *fRetCode = kFALSE;
527 CloseWindow();
528 break;
529 }
530 break;
531 }
532 break;
533
534 default:
535 break;
536 }
537
538 return kTRUE;
539}
540
541////////////////////////////////////////////////////////////////////////////////
542/// Create a dialog to GoTo a specific line number. Returns -1 in
543/// ret_code in case no valid line number was given or in case
544/// cancel was pressed. If on input *ret_code is > 0 then this value
545/// will be used as default value.
546
548 UInt_t w, UInt_t h, Long_t *ret_code,
549 UInt_t options) :
550 TGTransientFrame(p, main, w, h, options)
551{
552 if (!p && !main) {
553 MakeZombie();
554 // coverity [uninit_ctor]
555 return;
556 }
557 fRetCode = ret_code;
559
561
562 fF1 = new TGCompositeFrame(this, 60, 20, kVerticalFrame | kFixedWidth);
563 fF2 = new TGCompositeFrame(this, 60, 20, kHorizontalFrame);
564
565 fGotoButton = new TGTextButton(fF1, new TGHotString("&Goto"), 1);
566 fCancelButton = new TGTextButton(fF1, new TGHotString("&Cancel"), 2);
568
569 fGotoButton->Associate(this);
571
572 fL1 = new TGLayoutHints(kLHintsCenterY | kLHintsExpandX, 2, 2, 3, 0);
573 fL21 = new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 5, 10, 0);
574
577 AddFrame(fF1, fL21);
578
579 fLGoTo = new TGLabel(fF2, new TGHotString("&Goto Line:"));
580
581 fBGoTo = new TGTextBuffer(50);
582 if (*fRetCode > 0) {
583 char curline[32];
584 snprintf(curline, 32, "%ld", *fRetCode);
585 fBGoTo->AddText(0, curline);
586 } else
588 fGoTo = new TGTextEntry(fF2, fBGoTo);
589 fGoTo->Associate(this);
591 fGoTo->SelectAll();
592
593 fL5 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 5, 0, 0);
594 fL6 = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 2, 0, 0);
595
598 AddFrame(fF2, fL1);
599
602
604
605 SetWindowName("Goto");
606 SetIconName("Print");
607
611
612 MapWindow();
614 fClient->WaitFor(this);
615}
616
617////////////////////////////////////////////////////////////////////////////////
618/// Clean up goto dialog
619
621{
622 if (IsZombie()) return;
623 delete fGotoButton;
624 delete fCancelButton;
625 delete fGoTo;
626 delete fLGoTo;
627 delete fF1; delete fF2;
628 delete fL1; delete fL5; delete fL6; delete fL21;
629}
630
631////////////////////////////////////////////////////////////////////////////////
632/// Close the dialog. On close the dialog will be deleted and cannot be
633/// re-used.
634
636{
637 DeleteWindow();
638}
639
640////////////////////////////////////////////////////////////////////////////////
641/// Process goto dialog widget messages.
642
644{
645 const char *string;
646
647 switch (GET_MSG(msg)) {
648 case kC_COMMAND:
649 switch (GET_SUBMSG(msg)) {
650 case kCM_BUTTON:
651 switch (parm1) {
652 case 1:
653 string = fBGoTo->GetString();
654 *fRetCode = (Long_t) atof(string);
655 CloseWindow();
656 break;
657 case 2:
658 *fRetCode = -1;
659 CloseWindow();
660 break;
661 }
662 break;
663
664 default:
665 break;
666 }
667 break;
668
669 case kC_TEXTENTRY:
670 switch (GET_SUBMSG(msg)) {
671 case kTE_TEXTCHANGED:
672 string = fBGoTo->GetString();
673 if (!string[0])
675 else
677 break;
678 case kTE_ENTER:
679 string = fBGoTo->GetString();
680 *fRetCode = (Long_t) atof(string);
681 CloseWindow();
682 break;
683 default:
684 break;
685 }
686 break;
687
688 default:
689 break;
690 }
691
692 return kTRUE;
693}
694
@ kVerticalFrame
Definition: GuiTypes.h:381
@ kFixedWidth
Definition: GuiTypes.h:387
@ kHorizontalFrame
Definition: GuiTypes.h:382
#define h(i)
Definition: RSha256.hxx:106
const Bool_t kFALSE
Definition: RtypesCore.h:90
long Long_t
Definition: RtypesCore.h:52
const Bool_t kTRUE
Definition: RtypesCore.h:89
#define ClassImp(name)
Definition: Rtypes.h:361
@ kButtonDown
Definition: TGButton.h:54
@ kButtonDisabled
Definition: TGButton.h:56
@ kButtonUp
Definition: TGButton.h:53
@ kMWMFuncAll
Definition: TGFrame.h:58
@ kMWMFuncResize
Definition: TGFrame.h:59
@ kMWMDecorMaximize
Definition: TGFrame.h:78
@ kMWMDecorMenu
Definition: TGFrame.h:76
@ kMWMDecorAll
Definition: TGFrame.h:72
@ kMWMFuncMaximize
Definition: TGFrame.h:62
@ kMWMInputModeless
Definition: TGFrame.h:66
@ 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:44
R__EXTERN TSystem * gSystem
Definition: TSystem.h:556
#define gVirtualX
Definition: TVirtualX.h:338
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:187
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1202
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:451
virtual void ReturnPressed()
Add new entry to combo box when return key pressed inside text entry ReturnPressed signal is emitted.
Definition: TGComboBox.cxx:656
virtual void Layout()
layout combobox
Definition: TGComboBox.cxx:535
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:1101
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:1027
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:353
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1148
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:351
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
Definition: TGFrame.cxx:1006
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:215
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:216
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:260
virtual UInt_t GetOptions() const
Definition: TGFrame.h:222
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:589
virtual void MapWindow()
map window
Definition: TGFrame.h:229
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:231
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:1761
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition: TGFrame.cxx:1826
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1748
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:1565
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:1915
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
Definition: TGWindow.cxx:142
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:326
virtual void RequestFocus()
request focus
Definition: TGWindow.cxx:222
@ kEditDisable
Definition: TGWindow.h:58
UInt_t fEditDisabled
Definition: TGWindow.h:40
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:149
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:891
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:1658
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.
Definition: TSystem.cxx:678
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Definition: TSystem.cxx:1541
TText * text
TLine * line
int main(int argc, char **argv)