TEveWindowEditor.cxx

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveWindowEditor.cxx 26561 2008-12-01 17:35:55Z matevz $
00002 // Author: Matevz Tadel 2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #include "TEveWindowEditor.h"
00013 #include "TEveWindow.h"
00014 
00015 #include "TVirtualPad.h"
00016 #include "TColor.h"
00017 
00018 // Cleanup these includes:
00019 #include "TGLabel.h"
00020 #include "TGButton.h"
00021 #include "TGNumberEntry.h"
00022 #include "TGColorSelect.h"
00023 #include "TGDoubleSlider.h"
00024 
00025 
00026 //______________________________________________________________________________
00027 // GUI editor for TEveWindow.
00028 //
00029 
00030 ClassImp(TEveWindowEditor);
00031 
00032 //______________________________________________________________________________
00033 TEveWindowEditor::TEveWindowEditor(const TGWindow *p, Int_t width, Int_t height,
00034              UInt_t options, Pixel_t back) :
00035    TGedFrame(p, width, height, options | kVerticalFrame, back),
00036    fM(0),
00037    fShowTitleBar(0)
00038 {
00039    // Constructor.
00040 
00041    MakeTitle("TEveWindow");
00042 
00043    fShowTitleBar = new TGCheckButton(this, "Show title-bar");
00044    AddFrame(fShowTitleBar); // new TGLayoutHints());
00045    fShowTitleBar->Connect("Clicked()", "TEveWindowEditor", this,
00046                           "DoShowTitleBar()");
00047 }
00048 
00049 /******************************************************************************/
00050 
00051 //______________________________________________________________________________
00052 void TEveWindowEditor::SetModel(TObject* obj)
00053 {
00054    // Set model object.
00055 
00056    fM = dynamic_cast<TEveWindow*>(obj);
00057 
00058    fShowTitleBar->SetState(fM->GetShowTitleBar() ? kButtonDown : kButtonUp);
00059 }
00060 
00061 //______________________________________________________________________________
00062 void TEveWindowEditor::DoShowTitleBar()
00063 {
00064    // Slot for ShowTitleBar.
00065 
00066    fM->SetShowTitleBar(fShowTitleBar->IsOn());
00067    Update();
00068 }

Generated on Tue Jul 5 14:16:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1