-
Notifications
You must be signed in to change notification settings - Fork 0
/
cwMainArea.cls
49 lines (37 loc) · 1.57 KB
/
cwMainArea.cls
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
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "cwMainArea"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private WithEvents W As cWidgetBase '<- this is required in each cwImplementation...
Attribute W.VB_VarHelpID = -1
Private surroundxo As Integer: Private surroundyo As Integer
Private Sub Class_Initialize()
'Call initialiseVars
surroundxo = 0: surroundyo = 0
Set W = Cairo.WidgetBase '<- this is required in each cwImplementation...
W.Alpha = 0.5
End Sub
'the following two Public Props also need to be exposed in each Widget-Implementation (but that was it)
Public Property Get Widget() As cWidgetBase: Set Widget = W: End Property
Public Property Get Widgets() As cWidgets: Set Widgets = W.Widgets: End Property
Private Sub W_MouseDown(Button As Integer, Shift As Integer, ByVal X As Single, ByVal Y As Single)
If Button = vbRightButton Then
Call menuForm.PopupMenu(menuForm.mnuMainMenu)
End If
End Sub
Private Sub W_Paint(CC As cCairoContext, ByVal xAbs As Single, ByVal yAbs As Single, ByVal dx_Aligned As Single, ByVal dy_Aligned As Single, UserObj As Object)
Draw CC, dx_Aligned, dy_Aligned
End Sub
Private Sub Draw(CC As cCairoContext, dx, dy)
CC.RenderSurfaceContent "surround", surroundxo, surroundyo
End Sub