QGUIExitWindow.hh

00001 /*
00002  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore
00003  * 
00004  * A.Giachero created 13/04/07 - <Andrea.Giachero@ge.infn.it> 
00005  * 
00006  $ $Id: $
00007  * $Revision: $
00008  *
00009  * Class QGUIExitWindow: General Exit Window Frame for Apollo GUI
00010  *
00011  */
00012 
00013 #ifndef _QGUI_EXIT_WINDOW_HH_
00014 #define _QGUI_EXIT_WINDOW_HH_
00015 
00016 
00017 
00018 // Apollo Includes
00019 #include "QGUIBaseFrame.hh"
00020 
00021 // Root Includes
00022 #include "Rtypes.h"
00023 
00024 // C/C++ Includes
00025 
00026 
00027 
00028 // Used class
00029 class TGButton;
00030 class TGIcon;
00031 
00032 
00033 class QGUIExitWindow: public QGUIBaseFrame
00034 {
00035 
00036 public:
00037   
00038   // ctor
00039   QGUIExitWindow(const TGWindow *p, bool& RetVal);
00040   QGUIExitWindow(const TGWindow *p, bool& RetVal, const std::string& qMessage);
00041 
00042   // dtor
00043   virtual ~QGUIExitWindow();
00044 
00045   // Close Exit Window
00046   void CloseExitWindow(bool qStatus);
00047 
00048 
00049 protected:
00050 
00051 
00052 private:
00053 
00054   // message
00055   std::string fMessage;
00056   
00057   // Buttons
00058   TGTextButton *fYesBtn, *fCancelBtn;  // Buttons
00059 
00060 
00061   TGHorizontalFrame  *fMsgHFrame;  // Frame containing image and message text
00062   TGVerticalFrame    *fImgVFrame;  // Frame containing image
00063   TGVerticalFrame    *fTxtVFrame;  // Frame containing message text
00064   TGHorizontalFrame  *fBtnHFrame;  // Frame containing buttons
00065 
00066   bool     &fRetVal;               // Address to store return status
00067 
00068 
00069   // Create Exit-Box Main Frame
00070   void PopUp();
00071 
00072   // Add YES and CANCEL Buttons to frame
00073   void AddButtonsToFrame(TGCompositeFrame* qFrame);
00074 
00075   // Add Warning Image and Message to Frame 
00076   void AddImageAndMsgToFrame(TGCompositeFrame* qFrame);
00077 
00078 
00079   // To integrate QGUIExitWindow class into the ROOT system
00080   ClassDef(QGUIExitWindow,0)
00081 
00082 };
00083 
00084 #endif // _QGUI_EXIT_WINDOW_HH_

Generated on Tue Nov 16 10:49:54 2010 for CUORE Software by  doxygen 1.5.6