#include #include #include #include #include #include #include #include /// \file /// \ingroup tutorial_gui /// A simple example of entering CINT commands and having the CINT output in a ROOT GUI application window. /// An editable combo box is used as a CINT prompt, a text view widget displays the command output. /// /// \macro_code /// /// \author Ilka Antcheva 06/07/2007 #include #include #include #include #include #include #include #include #include "RQ_OBJECT.h" class IDList { private: Int_t fID; //create widget Id(s) public: IDList() : fID(0) {} ~IDList() {} Int_t GetUnID(void) { return ++fID; } }; class MyTerminal : public TGMainFrame { RQ_OBJECT("MyTerminal") ///< for classes not derived from TQObject, RQ_OBJECT macro should be used private: TGTextButton *fExit; IDList fIDs; TGComboBox *fComboCmd; // CINT command combobox TGTextBuffer *fCommandBuf; // text buffer in use TGTextEntry *fCommand; // text entry for CINT commands TGTextView *fTextView; // display CINT output TString fName; // name of temp created file public: MyTerminal(const TGWindow *p, UInt_t w, UInt_t h); virtual ~MyTerminal(); void DoExit(); void DoEnteredCommand(); //ClassDef(MyTerminal, 0) #if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)//Just needed for ROOT v5 ClassDef(MyTerminal, 0);///needed as it derives from TObject #endif };