My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef _CascadeView_h_
#define _CascadeView_h_

#include <GLCtrl/GLCtrl.h>
using namespace Upp;

#include "CascadeDocument.h"

#include <OCE/OCE.h>
#include <V3d_View.hxx>

class CascadeView : public DHCtrl
{
private:

// The associated document
CascadeDocument *Document;

// The view object
Handle(V3d_View) View;

// Panning active flag
bool isPanning;

// View rotation active flag
bool isRotating;

// Start point in pan operations
Point PanStartPoint, PanPrevPoint;

protected:

#ifdef PLATFORM_X11
// Method to choose the correct visual
virtual XVisualInfo *CreateVisual(void);

// Method for attribute setting
virtual void SetAttributes(unsigned long &ValueMask, XSetWindowAttributes &attr);

// These is called just after initialization
virtual void AfterInit(bool Error) ;

// These is called just before termination
virtual void BeforeTerminate(void) ;
#else
// state handler, to catch init and terminate
void State(int reason);
#endif

// initializes view after platform-dependent init
void InitView(void);

// Handle layout events and propagates to embedded window
virtual void Layout(void) ;

// Paint function with context
virtual void Paint(Draw &draw) ;

////////////////////////////////////////////////////////////////////////////////////////////
// mouse events handling

// middle drag - pan or 3dorbit if in addition to ctrl-shift keys
virtual void MiddleDrag(Point p, dword keyflags);

// mouse wheel - zoom
virtual void MouseWheel(Point p, int zdelta, dword keyflags);

// double middle click - zoom extents
virtual void MiddleDouble(Point p, dword keyflags);

// middle up - resets pan/3dorbit behaviour
virtual void MiddleUp(Point p, dword keyflags);

// mouse move handler
virtual void MouseMove(Point p, dword keyflags);

// mouse enter handler
virtual void MouseEnter(Point p, dword keyflags);

// mouse leave handler
virtual void MouseLeave();

////////////////////////////////////////////////////////////////////////////////////////////

public:
typedef CascadeView CLASSNAME;

// Constructor class CascadeView
CascadeView(CascadeDocument *Doc);

// Destructor class CascadeView
~CascadeView();

// Document property
CascadeDocument const &getDocument(void) { return *Document; };

// Fit all in view
void FitAll();

}; // END Class CascadeView


#endif

Change log

r4424 by micio on Jan 15, 2012   Diff
Bazaar/OCE : OpenCascade Community Edition
3d modeling kernel added
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 2529 bytes, 103 lines
Powered by Google Project Hosting