#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class MyApplication : public TGMainFrame { private: TGTextView *fTextView; // display CINT output public: MyApplication(const TGWindow *p, UInt_t w, UInt_t h); virtual ~MyApplication(); }; MyApplication::MyApplication(const TGWindow *p, UInt_t w, UInt_t h) : TGMainFrame(p, w, h) { SetCleanup(kDeepCleanup); TGCompositeFrame *ftab1; TGTab *ftab = new TGTab(this,450,640); ftab1 = ftab->AddTab("Main"); ftab1->SetLayoutManager (new TGHorizontalLayout(ftab1)); TGVerticalFrame *fInputFrame = new TGVerticalFrame(ftab1, 434, 450); // width - height ftab1->AddFrame(fInputFrame, new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 0, 0, 0, 0)); TGGroupFrame *fInputGroup = new TGGroupFrame(fInputFrame, "demirci Texts", kVerticalFrame); fInputFrame->AddFrame(fInputGroup, new TGLayoutHints(kLHintsExpandY | kLHintsExpandX, 0, 0, 0, 0)); TGHorizontalFrame *fHL2 = new TGHorizontalFrame(fInputGroup, 70, 100); fInputGroup->AddFrame(fHL2, new TGLayoutHints(kLHintsNormal, 5, 5, 5, 5)); TGLabel *fInlabel = new TGLabel(fHL2, "CINT Prompt:"); fHL2->AddFrame(fInlabel, new TGLayoutHints(kLHintsCenterY)); TGLabel *fOutlabel = new TGLabel(fInputGroup, "Output Window:"); fInputGroup->AddFrame(fOutlabel); Pixel_t backpxl; gClient->GetColorByName("#c0c0c0", backpxl); fTextView = new TGTextView(fInputGroup, 434, 194); fTextView->SetBackground(backpxl); fInputGroup->AddFrame(fTextView, new TGLayoutHints(kLHintsExpandX)); Char_t opening[1000]; sprintf(opening, "DemirciPRO \n Started "); fTextView->LoadBuffer(opening); fTextView->Update(); ftab->Resize (ftab->GetDefaultSize()); AddFrame(ftab,new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0)); SetWindowName("GUI with CINT Input/Output"); MapSubwindows(); Resize(GetDefaultSize()); MapWindow(); }; MyApplication::~MyApplication() { // Destructor. Cleanup(); } void denc(){ new MyApplication (gClient->GetRoot() ,600,300); } int main(int argc, char **argv) { TApplication theApp("App", &argc, argv); MyApplication agui(gClient->GetRoot() ,600,300); theApp.Run(); return 0; }