Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGTextEditDialogs.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/gui:$Id$
0002 // Author: Fons Rademakers   10/7/2000
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGTextEditDialogs
0013 #define ROOT_TGTextEditDialogs
0014 
0015 
0016 #include "TGFrame.h"
0017 
0018 
0019 class TGSearchType {
0020 public:
0021    Bool_t  fDirection;
0022    Bool_t  fCaseSensitive;
0023    char   *fBuffer;
0024    Bool_t  fClose;
0025    TGSearchType() { fDirection = kTRUE; fCaseSensitive = kFALSE; fBuffer = nullptr; fClose = kTRUE; }
0026    ~TGSearchType() { if (fBuffer) delete [] fBuffer;}
0027 };
0028 
0029 class TGButton;
0030 class TGRadioButton;
0031 class TGCheckButton;
0032 class TGTextEntry;
0033 class TGTextBuffer;
0034 class TGLabel;
0035 class TGIcon;
0036 class TGComboBox;
0037 
0038 class TGSearchDialog : public TGTransientFrame {
0039 
0040 protected:
0041    TGCompositeFrame   *fF1, *fF2, *fF3, *fF4;  ///< sub frames
0042    TGLayoutHints      *fL1, *fL2, *fL3, *fL4;  ///< layout hints
0043    TGLayoutHints      *fL5, *fL6, *fL21, *fL9; ///< layout hints
0044    TGLayoutHints      *fL10;                   ///< layout hints
0045    TGButton           *fSearchButton;          ///< search button
0046    TGButton           *fCancelButton;          ///< cancel button
0047    TGRadioButton      *fDirectionRadio[2];     ///< search direction radio buttons
0048    TGCheckButton      *fCaseCheck;             ///< case check box
0049    TGGroupFrame       *fG2;                    ///< group frame
0050    TGTextEntry        *fSearch;                ///< search text entry widget
0051    TGTextBuffer       *fBSearch;               ///< search text buffer
0052    TGLabel            *fLSearch;               ///< label
0053    TGSearchType       *fType;                  ///< search type structure
0054    Int_t              *fRetCode;               ///< return code
0055    TGComboBox         *fCombo;                 ///< text entry combobox
0056 
0057    static TGSearchDialog *fgSearchDialog;      ///< global singleton
0058 
0059 public:
0060    TGSearchDialog(const TGWindow *p = nullptr, const TGWindow *main = nullptr, UInt_t w = 1, UInt_t h = 1,
0061                   TGSearchType *sstruct = nullptr, Int_t *ret_code = nullptr,
0062                   UInt_t options = kVerticalFrame);
0063    ~TGSearchDialog() override;
0064 
0065    void   CloseWindow() override;
0066    Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override;
0067    virtual void   SetClose(Bool_t on) { fType->fClose = on; }
0068    virtual Bool_t IsClose() const {  return fType->fClose; }
0069    virtual void   TextEntered(const char *text); //*SIGNAL*
0070    virtual TGSearchType *GetType() const { return fType; }
0071 
0072    static TGSearchDialog *&SearchDialog();
0073 
0074    ClassDefOverride(TGSearchDialog,0)  // Text search dialog used by TGTextEdit widget
0075 };
0076 
0077 
0078 class TGPrintDialog : public TGTransientFrame {
0079 
0080 protected:
0081    char             **fPrinter;                    ///< printer to be used
0082    char             **fPrintCommand;               ///< printer command to be used
0083    TGCompositeFrame  *fF1, *fF2, *fF3, *fF4, *fF5; ///< sub frames
0084    TGLayoutHints     *fL1, *fL2, *fL3, *fL5, *fL6; ///< layout hints
0085    TGLayoutHints     *fL7, *fL21;                  ///< layout hints
0086    TGIcon            *fPrinterIcon;                ///< printer icon
0087    TGButton          *fPrintButton;                ///< print button
0088    TGButton          *fCancelButton;               ///< cancel button
0089    TGComboBox        *fPrinterEntry;               ///< printer list combo widget
0090    TGTextEntry       *fPrintCommandEntry;          ///< command text entry widget
0091    TGTextBuffer      *fBPrinter, *fBPrintCommand;  ///< printer and command text buffers
0092    TGLabel           *fLPrinter, *fLPrintCommand;  ///< printer and command labels
0093    Int_t             *fRetCode;                    ///< return code
0094 
0095 public:
0096    TGPrintDialog(const TGWindow *p = nullptr, const TGWindow *main = nullptr, UInt_t w = 1, UInt_t h = 1,
0097                  char **printerName = nullptr, char **printProg = nullptr, Int_t *ret_code = nullptr,
0098                  UInt_t options = kVerticalFrame);
0099    ~TGPrintDialog() override;
0100 
0101    void   CloseWindow() override;
0102    virtual void   GetPrinters();
0103    Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override;
0104 
0105    ClassDefOverride(TGPrintDialog,0)  // Print dialog used by TGTextEdit widget
0106 };
0107 
0108 
0109 class TGGotoDialog : public TGTransientFrame {
0110 
0111 protected:
0112    TGCompositeFrame *fF1, *fF2;                ///< sub frames
0113    TGButton         *fGotoButton;              ///< goto button
0114    TGButton         *fCancelButton;            ///< cancel button
0115    TGLayoutHints    *fL1, *fL5, *fL6, *fL21;   ///< layout hints
0116    TGTextEntry      *fGoTo;                    ///< goto line number entry widget
0117    TGTextBuffer     *fBGoTo;                   ///< goto line number text buffer
0118    TGLabel          *fLGoTo;                   ///< goto label
0119    Long_t           *fRetCode;                 ///< return code
0120 
0121 public:
0122    TGGotoDialog(const TGWindow *p = nullptr, const TGWindow *main = nullptr, UInt_t w = 1, UInt_t h = 1,
0123                 Long_t *ret_code = nullptr, UInt_t options = kVerticalFrame);
0124    ~TGGotoDialog() override;
0125 
0126    void   CloseWindow() override;
0127    Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override;
0128 
0129    ClassDefOverride(TGGotoDialog,0)  // Goto line dialog used by TGTextEdit widget
0130 };
0131 
0132 #endif