MINFControlFrame Class Reference

#include <MINFControlFrame.h>

List of all members.

Public Member Functions

 MINFControlFrame (const char *name, TGWindow *parent, UInt_t width, UInt_t height)
virtual ~MINFControlFrame ()
Bool_t ProcessMessage (Long_t msg, Long_t parm1, Long_t)
void ToggleZoomPickMode ()

Private Attributes

TGTextButton * fNext
TGTextButton * fPrevious
TGTextButton * fSideView
TGTextButton * fTopView
TGTextButton * fFrontView
TGTextButton * fAllViews
TGTextButton * fOpenGL
TGTextButton * fX3D
TGTextButton * fMacro
TGHotString * fHotPick
TGHotString * fHotZoom
TGTextButton * fZoomPick
TGTextButton * fUnZoom
TGLayoutHints * fButtonLayout


Detailed Description

Definition at line 24 of file MINFControlFrame.h.


Constructor & Destructor Documentation

MINFControlFrame::MINFControlFrame ( const char *  name,
TGWindow *  parent,
UInt_t  width,
UInt_t  height 
)

Definition at line 45 of file MINFControlFrame.cxx.

00047                                                                   :
00048   TGCompositeFrame(parent, width, height)
00049 //gmi, fEventJump(0)
00050 //gmi, fEventJumpLayout(0)
00051 , fNext(0)
00052 , fPrevious(0)
00053 , fSideView(0)
00054 , fTopView(0)
00055 , fFrontView(0)
00056 , fAllViews(0)
00057 , fOpenGL(0)
00058 , fX3D(0)
00059 , fMacro(0)
00060 , fHotPick(0)
00061 , fHotZoom(0)
00062 , fZoomPick(0)
00063 , fUnZoom(0)
00064 , fButtonLayout(0)
00065 {
00066 
00067 // Add TGTextEntry
00068 //gmi   fEventJump = new TGTextEntry(this, new TGTextBuffer(100));
00069 //gmi   fEventJumpLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft |
00070 //gmi                                                           10, 2, 2, 2);
00071 //gmi   fEventJump->Resize(100, fEventJump->GetDefaultHeight());
00072 //gmi   AddFrame(fEventJump,fEventJumpLayout);
00073 
00074 // Add Buttons
00075    fNext = new TGTextButton(this, "Next", 1);
00076    fNext->SetCommand("gMINFast->Display()->ShowNextEvent(1);");
00077    fPrevious = new TGTextButton(this, "Previous", 2);
00078    fPrevious->SetCommand("gMINFast->Display()->ShowNextEvent(-1);");
00079    fSideView = new TGTextButton(this, "Side View", 3);
00080    fSideView->SetCommand("gMINFast->Display()->SetView(180, 90, 90);");
00081    fTopView = new TGTextButton(this, "Top View", 4);
00082    fTopView->SetCommand("gMINFast->Display()->SetView(90, 90, 90);");
00083    fFrontView = new TGTextButton(this, "Front View", 5);
00084    fFrontView->SetCommand("gMINFast->Display()->SetView(90, 180, 0);");
00085    fAllViews = new TGTextButton(this, "All Views", 6);
00086    fAllViews->SetCommand("gMINFast->Display()->DrawAllViews();");
00087    fOpenGL = new TGTextButton(this, "OpenGL", 7);
00088    fOpenGL->SetCommand("gMINFast->Display()->DrawViewGL();");
00089    fX3D = new TGTextButton(this, "X3D", 8);
00090    fX3D->SetCommand("gMINFast->Display()->DrawViewX3D();");
00091    fMacro = new TGTextButton(this, "Macro", 9);
00092    fMacro->SetCommand("gMINFast->Display()->RunScript();");
00093    fHotPick = new TGHotString("Pick");
00094    fHotZoom = new TGHotString("Zoom");
00095    fZoomPick = new TGTextButton(this, new TGHotString("Zoom->Pick"),10);
00096    fUnZoom = new TGTextButton(this, "UnZoom", 11);
00097    fUnZoom->SetCommand("gMINFast->Display()->UnZoom();");
00098 
00099    fButtonLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY);
00100    AddFrame(fNext,fButtonLayout);
00101    AddFrame(fPrevious,fButtonLayout);
00102    AddFrame(fTopView,fButtonLayout);
00103    AddFrame(fSideView,fButtonLayout);
00104    AddFrame(fFrontView,fButtonLayout);
00105    AddFrame(fAllViews,fButtonLayout);
00106    AddFrame(fOpenGL,fButtonLayout);
00107    AddFrame(fX3D,fButtonLayout);
00108    AddFrame(fMacro,fButtonLayout);
00109    AddFrame(fZoomPick,fButtonLayout);
00110    AddFrame(fUnZoom,fButtonLayout);
00111 
00112    fZoomPick->Associate(this);
00113 
00114 // Final window setup
00115    MapSubwindows();
00116 
00117    Resize(GetDefaultSize());
00118    MapWindow();
00119 }

MINFControlFrame::~MINFControlFrame (  )  [virtual]

Definition at line 122 of file MINFControlFrame.cxx.

References fAllViews, fButtonLayout, fFrontView, fHotPick, fHotZoom, fMacro, fNext, fOpenGL, fPrevious, fSideView, fTopView, fUnZoom, fX3D, and fZoomPick.

00123 {
00124 
00125 // Delete ROOT basic canvas. Order is significant. Delete in reverse
00126 // order of creation.
00127 //gmi   delete fEventJump;
00128 //gmi   delete fEventJumpLayout;
00129    delete fNext;
00130    delete fPrevious;
00131    delete fSideView;
00132    delete fTopView;
00133    delete fFrontView;
00134    delete fAllViews;
00135    delete fOpenGL;
00136    delete fX3D;
00137    delete fMacro;
00138    delete fHotPick;
00139    delete fHotZoom;
00140    delete fZoomPick;
00141    delete fUnZoom;
00142    delete fButtonLayout;
00143 }


Member Function Documentation

Bool_t MINFControlFrame::ProcessMessage ( Long_t  msg,
Long_t  parm1,
Long_t   
)

Definition at line 146 of file MINFControlFrame.cxx.

References ToggleZoomPickMode().

00147 {
00148 
00149 // Process messages coming from widgets associated with the buttons.
00150    switch (GET_MSG(msg)) {
00151       case kC_COMMAND:
00152 
00153          switch (GET_SUBMSG(msg)) {
00154             case kCM_BUTTON:
00155                switch(parm1) {
00156                   case 10:
00157                      ToggleZoomPickMode();
00158                      break;
00159                   default:
00160                      break;
00161                }
00162                break;
00163             default:
00164                break;
00165          }
00166       default:
00167          break;
00168    }
00169    return kTRUE;
00170 }

void MINFControlFrame::ToggleZoomPickMode (  ) 

Definition at line 173 of file MINFControlFrame.cxx.

References MINFast::Display(), fZoomPick, MINFDisplay::GetZoomMode(), gMINFast, MINFDisplay::SetPickMode(), and MINFDisplay::SetZoomMode().

Referenced by ProcessMessage().

00174 {
00175    if (gMINFast->Display()->GetZoomMode()) {
00176      gMINFast->Display()->SetPickMode();
00177      fZoomPick->SetText(new TGHotString("Pick->Zoom"));
00178    }
00179    else {
00180      gMINFast->Display()->SetZoomMode();
00181      fZoomPick->SetText(new TGHotString("Zoom->Pick"));
00182    }
00183 }


Member Data Documentation

TGTextButton* MINFControlFrame::fAllViews [private]

Definition at line 37 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGLayoutHints* MINFControlFrame::fButtonLayout [private]

Definition at line 45 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fFrontView [private]

Definition at line 36 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGHotString* MINFControlFrame::fHotPick [private]

Definition at line 41 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGHotString* MINFControlFrame::fHotZoom [private]

Definition at line 42 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fMacro [private]

Definition at line 40 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fNext [private]

Definition at line 32 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fOpenGL [private]

Definition at line 38 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fPrevious [private]

Definition at line 33 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fSideView [private]

Definition at line 34 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fTopView [private]

Definition at line 35 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fUnZoom [private]

Definition at line 44 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fX3D [private]

Definition at line 39 of file MINFControlFrame.h.

Referenced by ~MINFControlFrame().

TGTextButton* MINFControlFrame::fZoomPick [private]

Definition at line 43 of file MINFControlFrame.h.

Referenced by ToggleZoomPickMode(), and ~MINFControlFrame().


The documentation for this class was generated from the following files:
Generated on Fri Oct 10 22:45:53 2014 for loon by  doxygen 1.4.7