ViewerWindowed.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Win
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeWin/Base.h"
16 
17 #include "CeeVisualization/Viewer.h"
18 
19 #include <windows.h>
20 
21 namespace cee {
22 
23 namespace vis {
24 class OpenGLContextGroup;
25 class View;
26 }
27 
28 namespace win {
29 
30 class OpenGLContextWin;
31 
32 
33 //==================================================================================================
34 //
35 //
36 //
37 //==================================================================================================
38 class CEE_WIN_EXPORT ViewerWindowed : public vis::Viewer
39 {
40 public:
42  ~ViewerWindowed();
43 
44  bool create(vis::OpenGLContextGroup* contextGroup, HWND parentWnd);
45  bool create(vis::OpenGLContextGroup* contextGroup, int parentWndHandleAsInt);
46  bool createShared(vis::OpenGLContextGroup* contextGroup, ViewerWindowed* shareWithViewer, HWND parentWnd);
47  bool createSoftware(vis::OpenGLContextGroup* contextGroup, HWND parentWnd);
48  void destroy();
49  HWND windowHandle();
50 
51  void setView(vis::View* view);
52 
53  void setPosition(int x, int y, int width, int height);
54 
55 private:
56  virtual void internal_requestRedraw();
57  virtual void internal_requestImmediateRedraw();
58  virtual bool internal_makeOpenGLContextCurrent();
59  virtual cvf::OpenGLContext* internal_cvfOpenGLContext();
60 
61 private:
62  CEE_PRIVATE_F(ViewerWindowed);
63  CEE_PRIVATE_IMPL(ViewerWindowed);
64 };
65 
66 
67 }
68 }
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Create a Win32 viewer with its own OpenGL (sub) window.
Definition: ViewerWindowed.h:38
Thin wrapper class for integrating Ceetron Desktop Components with a UI toolkit.
Definition: Viewer.h:30
A context group associates OpenGLContext instances that share OpenGL resources such as shader objects...
Definition: OpenGLContextGroup.h:32
Provides a render area in the user control/widget to enable visualization of the current model data a...
Definition: View.h:40