105 if (sstruct && sstruct->
fBuffer)
213 Emit(
"TextEntered(const char *)",
text);
316 char **printProg,
Int_t *ret_code,
362 if ((printProg) && (*printProg))
372 if ((printerName) && (*printerName))
383 if (!printerPicture) {
384 Error(
"TGPrintDialog",
"printer_s.xpm not found");
444 Int_t idx = 1, dflt =1;
449 if (lpstat == 0)
return;
454 while((obj = iter())) {
460 if (defaultprinter.
Contains(pname)) {
471 defaultprinter.
Remove(0, defaultprinter.
First(
'\n'));
476 while((obj = iter())) {
479 if (defaultprinter.
Contains(pname)) {
495 const char *string, *txt;
507 const size_t prSize = strlen(
string) + 1;
514 const size_t cmdSize = strlen(
string) + 1;
520 txt =
"Please provide print command or use \"Cancel\"";
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
static TString gLastSearchString
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize UnmapWindow
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetMWMHints
Option_t Option_t TPoint TPoint const char text
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TSystem * gSystem
const TGWindow * GetRoot() const
Returns current root (i.e.
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
void Layout() override
layout combobox
virtual TGTextEntry * GetTextEntry() const
virtual void AddEntry(TGString *s, Int_t id)
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...
virtual void ReturnPressed()
Add new entry to combo box when return key pressed inside text entry ReturnPressed signal is emitted.
The base class for composite widgets (menu bars, list boxes, etc.).
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
UInt_t GetDefaultHeight() const override
void SetEditDisabled(UInt_t on=1) override
Set edit disable flag for this frame and subframes.
void ChangeOptions(UInt_t options) override
Change composite frame options. Options is an OR of the EFrameTypes.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
void MapWindow() override
map window
virtual void DeleteWindow()
Delete window.
virtual UInt_t GetOptions() const
TGLabel * fLGoTo
goto label
TGCompositeFrame * fF2
sub frames
TGTextBuffer * fBGoTo
goto line number text buffer
void CloseWindow() override
Close the dialog.
TGTextEntry * fGoTo
goto line number entry widget
TGLayoutHints * fL21
layout hints
TGButton * fGotoButton
goto button
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process goto dialog widget messages.
TGGotoDialog(const TGWindow *p=nullptr, const TGWindow *main=nullptr, UInt_t w=1, UInt_t h=1, Long_t *ret_code=nullptr, UInt_t options=kVerticalFrame)
Create a dialog to GoTo a specific line number.
virtual ~TGGotoDialog()
Clean up goto dialog.
Long_t * fRetCode
return code
TGButton * fCancelButton
cancel button
A composite frame with a border and a title.
TGHotString is a string with a "hot" character underlined.
This class handles GUI icons.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
TGClient * fClient
Connection to display server.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
TGPrintDialog(const TGWindow *p=nullptr, const TGWindow *main=nullptr, UInt_t w=1, UInt_t h=1, char **printerName=nullptr, char **printProg=nullptr, Int_t *ret_code=nullptr, UInt_t options=kVerticalFrame)
Create the printer dialog box.
TGTextEntry * fPrintCommandEntry
command text entry widget
char ** fPrinter
printer to be used
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process print dialog widget messages.
TGLabel * fLPrintCommand
printer and command labels
TGTextBuffer * fBPrintCommand
printer and command text buffers
char ** fPrintCommand
printer command to be used
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.
TGButton * fCancelButton
cancel button
void CloseWindow() override
Close the dialog.
TGIcon * fPrinterIcon
printer icon
TGLayoutHints * fL6
layout hints
Int_t * fRetCode
return code
TGComboBox * fPrinterEntry
printer list combo widget
TGLayoutHints * fL21
layout hints
TGCompositeFrame * fF5
sub frames
void CloseWindow() override
Close the dialog.
TGButton * fSearchButton
search button
static TGSearchDialog *& SearchDialog()
Return global search dialog.
TGTextEntry * fSearch
search text entry widget
TGLayoutHints * fL10
layout hints
TGSearchType * fType
search type structure
Int_t * fRetCode
return code
TGRadioButton * fDirectionRadio[2]
search direction radio buttons
TGCheckButton * fCaseCheck
case check box
TGLayoutHints * fL4
layout hints
static TGSearchDialog * fgSearchDialog
global singleton
TGSearchDialog(const TGWindow *p=nullptr, const TGWindow *main=nullptr, UInt_t w=1, UInt_t h=1, TGSearchType *sstruct=nullptr, Int_t *ret_code=nullptr, UInt_t options=kVerticalFrame)
Create a search dialog box.
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
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process search dialog widget messages.
virtual ~TGSearchDialog()
Clean up search dialog.
TGComboBox * fCombo
text entry combobox
TGLayoutHints * fL9
layout hints
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
void AddText(Int_t pos, const char *text)
const char * GetString() const
UInt_t GetTextLength() const
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
TGTextBuffer * GetBuffer() const
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.
Defines transient windows that typically are used for dialogs windows.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void RequestFocus()
request focus
@ kEditDisable
disable edit of this window
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
UInt_t fEditDisabled
flags used for "guibuilding"
TObject * At(Int_t idx) const override
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t IsZombie() const
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Ssiz_t Last(char c) const
Find last occurrence of a character c.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
TString & Remove(Ssiz_t pos)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual const char * Getenv(const char *env)
Get environment variable.
virtual TString GetFromPipe(const char *command)
Execute command and return output in TString.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.