Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4OpenGLImmediateWtViewer.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id$
28//
29//
30// Class G4OpenGLImmediateWtViewer : a class derived from
31// G4OpenGLWtViewer and G4OpenGLImmediateViewer.
32
33#ifdef G4VIS_BUILD_OPENGLWT_DRIVER
34
35#ifndef G4OPENGLIMMEDIATEWTVIEWER_HH
36#define G4OPENGLIMMEDIATEWTVIEWER_HH
37
40#include "G4OpenGLWtViewer.hh"
41#include <Wt/WPaintedWidget>
42#include <Wt/WEvent>
43
44//#include <qgl.h> // include <qglwidget.h>
45
46#include "globals.hh"
47
48class G4OpenGLImmediateSceneHandler;
49class QMouseEvent;
50
51class G4OpenGLImmediateWtViewer : public G4VViewer,
52 /* public G4OpenGLImmediateViewer ,*/ public Wt::WPaintedWidget {
53
54public:
55 G4OpenGLImmediateWtViewer (G4OpenGLImmediateSceneHandler& scene, Wt::WContainerWidget *,
56 const G4String& name = "");
57 ~G4OpenGLImmediateWtViewer ();
58 void DrawView();
59 void ShowView();
60
61private:
62 G4OpenGLImmediateQtViewer * fQtViewer;
63 // void WtShowEvent(QShowEvent event );
64 void WtWheelEvent(Wt::WMouseEvent event);
65 void WtMousePressEvent(Wt::WMouseEvent event);
66 void WtMouseMoveEvent(Wt::WMouseEvent event);
67 void WtMouseDoubleClickEvent(Wt::WMouseEvent event);
68 // void WtMouseReleaseEvent(Wt::WMouseEvent event);
69 // void WtContextMenuEvent(QContextMenuEvent e);
70 void WtKeyPressEvent (Wt::WKeyEvent event);
71 void paintEvent(Wt::WPaintDevice * event);
72
73 QMouseEvent * ConvertWtMouseEventToQt(Wt::WMouseEvent event);
74 QWheelEvent * ConvertWtWheelEventToQt(Wt::WMouseEvent event);
75 QKeyEvent * ConvertWtKeyEventToQt(Wt::WKeyEvent event);
76
77 // implements G4VViewer::SetView() and ClearView()
78 void SetView ();
79 void ClearView ();
80};
81
82#endif
83
84#endif
virtual void DrawView()=0
virtual void ClearView()=0
virtual void ShowView()
Definition: G4VViewer.cc:113
virtual void SetView()=0