Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGTextEditDialogs.h
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 10/7/2000
3
4/*************************************************************************
5 * Copyright (C) 1995-2021, 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_TGTextEditDialogs
13#define ROOT_TGTextEditDialogs
14
15
16#include "TGFrame.h"
17
18
20public:
23 char *fBuffer;
26 ~TGSearchType() { if (fBuffer) delete [] fBuffer;}
27};
28
29class TGButton;
30class TGRadioButton;
31class TGCheckButton;
32class TGTextEntry;
33class TGTextBuffer;
34class TGLabel;
35class TGIcon;
36class TGComboBox;
37
39
40protected:
41 TGCompositeFrame *fF1, *fF2, *fF3, *fF4; ///< sub frames
42 TGLayoutHints *fL1, *fL2, *fL3, *fL4; ///< layout hints
43 TGLayoutHints *fL5, *fL6, *fL21, *fL9; ///< layout hints
44 TGLayoutHints *fL10; ///< layout hints
45 TGButton *fSearchButton; ///< search button
46 TGButton *fCancelButton; ///< cancel button
47 TGRadioButton *fDirectionRadio[2]; ///< search direction radio buttons
48 TGCheckButton *fCaseCheck; ///< case check box
49 TGGroupFrame *fG2; ///< group frame
50 TGTextEntry *fSearch; ///< search text entry widget
51 TGTextBuffer *fBSearch; ///< search text buffer
52 TGLabel *fLSearch; ///< label
53 TGSearchType *fType; ///< search type structure
54 Int_t *fRetCode; ///< return code
55 TGComboBox *fCombo; ///< text entry combobox
56
57 static TGSearchDialog *fgSearchDialog; ///< global singleton
58
59public:
60 TGSearchDialog(const TGWindow *p = nullptr, const TGWindow *main = nullptr, UInt_t w = 1, UInt_t h = 1,
61 TGSearchType *sstruct = 0, Int_t *ret_code = 0,
62 UInt_t options = kVerticalFrame);
63 virtual ~TGSearchDialog();
64
65 virtual void CloseWindow();
66 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
67 virtual void SetClose(Bool_t on) { fType->fClose = on; }
68 virtual Bool_t IsClose() const { return fType->fClose; }
69 virtual void TextEntered(const char *text); //*SIGNAL*
70 virtual TGSearchType *GetType() const { return fType; }
71
73
74 ClassDef(TGSearchDialog,0) // Text search dialog used by TGTextEdit widget
75};
76
77
79
80protected:
81 char **fPrinter; ///< printer to be used
82 char **fPrintCommand; ///< printer command to be used
83 TGCompositeFrame *fF1, *fF2, *fF3, *fF4, *fF5; ///< sub frames
84 TGLayoutHints *fL1, *fL2, *fL3, *fL5, *fL6; ///< layout hints
85 TGLayoutHints *fL7, *fL21; ///< layout hints
86 TGIcon *fPrinterIcon; ///< printer icon
87 TGButton *fPrintButton; ///< print button
88 TGButton *fCancelButton; ///< cancel button
89 TGComboBox *fPrinterEntry; ///< printer list combo widget
90 TGTextEntry *fPrintCommandEntry; ///< command text entry widget
91 TGTextBuffer *fBPrinter, *fBPrintCommand; ///< printer and command text buffers
92 TGLabel *fLPrinter, *fLPrintCommand; ///< printer and command labels
93 Int_t *fRetCode; ///< return code
94
95public:
96 TGPrintDialog(const TGWindow *p = nullptr, const TGWindow *main = nullptr, UInt_t w = 1, UInt_t h = 1,
97 char **printerName = nullptr, char **printProg = nullptr, Int_t *ret_code = nullptr,
98 UInt_t options = kVerticalFrame);
99 virtual ~TGPrintDialog();
100
101 virtual void CloseWindow();
102 virtual void GetPrinters();
103 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
104
105 ClassDef(TGPrintDialog,0) // Print dialog used by TGTextEdit widget
106};
107
108
110
111protected:
112 TGCompositeFrame *fF1, *fF2; ///< sub frames
113 TGButton *fGotoButton; ///< goto button
114 TGButton *fCancelButton; ///< cancel button
115 TGLayoutHints *fL1, *fL5, *fL6, *fL21; ///< layout hints
116 TGTextEntry *fGoTo; ///< goto line number entry widget
117 TGTextBuffer *fBGoTo; ///< goto line number text buffer
118 TGLabel *fLGoTo; ///< goto label
119 Long_t *fRetCode; ///< return code
120
121public:
122 TGGotoDialog(const TGWindow *p = nullptr, const TGWindow *main = nullptr, UInt_t w = 1, UInt_t h = 1,
123 Long_t *ret_code = nullptr, UInt_t options = kVerticalFrame);
124 virtual ~TGGotoDialog();
125
126 virtual void CloseWindow();
127 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
128
129 ClassDef(TGGotoDialog,0) // Goto line dialog used by TGTextEdit widget
130};
131
132#endif
@ kVerticalFrame
Definition GuiTypes.h:381
int main()
Definition Prototype.cxx:12
#define h(i)
Definition RSha256.hxx:106
long Longptr_t
Definition RtypesCore.h:82
const Bool_t kFALSE
Definition RtypesCore.h:101
long Long_t
Definition RtypesCore.h:54
const Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassDef(name, id)
Definition Rtypes.h:325
A button abstract base class.
Definition TGButton.h:68
Selects different options.
Definition TGButton.h:264
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
virtual void CloseWindow()
Close the dialog.
TGLabel * fLGoTo
goto label
TGCompositeFrame * fF2
sub frames
TGTextBuffer * fBGoTo
goto line number text buffer
TGCompositeFrame * fF1
TGTextEntry * fGoTo
goto line number entry widget
TGLayoutHints * fL1
TGLayoutHints * fL21
layout hints
TGButton * fGotoButton
goto button
virtual ~TGGotoDialog()
Clean up goto dialog.
Long_t * fRetCode
return code
TGButton * fCancelButton
cancel button
TGLayoutHints * fL5
TGLayoutHints * fL6
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process goto dialog widget messages.
A composite frame with a border and a title.
Definition TGFrame.h:523
This class handles GUI icons.
Definition TGIcon.h:22
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process print dialog widget messages.
TGTextEntry * fPrintCommandEntry
command text entry widget
char ** fPrinter
printer to be used
TGLayoutHints * fL1
TGLabel * fLPrintCommand
printer and command labels
TGTextBuffer * fBPrintCommand
printer and command text buffers
char ** fPrintCommand
printer command to be used
TGCompositeFrame * fF4
TGButton * fPrintButton
print button
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
cancel button
TGIcon * fPrinterIcon
printer icon
virtual void CloseWindow()
Close the dialog.
TGLayoutHints * fL6
layout hints
TGTextBuffer * fBPrinter
Int_t * fRetCode
return code
TGComboBox * fPrinterEntry
printer list combo widget
TGLayoutHints * fL3
TGLayoutHints * fL5
TGLayoutHints * fL21
layout hints
TGLayoutHints * fL7
TGCompositeFrame * fF1
TGCompositeFrame * fF5
sub frames
TGCompositeFrame * fF2
Selects different options.
Definition TGButton.h:322
TGLabel * fLSearch
label
TGLayoutHints * fL2
virtual TGSearchType * GetType() const
TGButton * fSearchButton
search button
TGLayoutHints * fL21
static TGSearchDialog *& SearchDialog()
Return global search dialog.
TGTextEntry * fSearch
search text entry widget
TGLayoutHints * fL10
layout hints
TGCompositeFrame * fF3
virtual Bool_t IsClose() const
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process search dialog widget messages.
virtual void SetClose(Bool_t on)
TGSearchType * fType
search type structure
Int_t * fRetCode
return code
TGLayoutHints * fL1
TGRadioButton * fDirectionRadio[2]
search direction radio buttons
TGCheckButton * fCaseCheck
case check box
TGLayoutHints * fL4
layout hints
TGCompositeFrame * fF1
TGLayoutHints * fL3
static TGSearchDialog * fgSearchDialog
global singleton
TGCompositeFrame * fF2
TGLayoutHints * fL6
TGGroupFrame * fG2
group frame
TGTextBuffer * fBSearch
search text buffer
virtual void TextEntered(const char *text)
emit signal when search text entered
TGButton * fCancelButton
cancel button
TGCompositeFrame * fF4
sub frames
TGLayoutHints * fL5
virtual ~TGSearchDialog()
Clean up search dialog.
TGComboBox * fCombo
text entry combobox
virtual void CloseWindow()
Close the dialog.
TGLayoutHints * fL9
layout hints
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
Defines transient windows that typically are used for dialogs windows.
Definition TGFrame.h:499
ROOT GUI Window base class.
Definition TGWindow.h:23
TText * text