Platforms to show: All Mac Windows Linux Cross-Platform
/Cocoa/Cocoa samples for RB 2010/Core Animation
Feedback.
Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Cocoa/Cocoa samples for RB 2010/Core Animation
This example is the version from Sun, 19th Dec 2009.
Notes: Last modified: Sun, 19th Dec 2009
Feedback.
Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Cocoa/Cocoa samples for RB 2010/Core Animation
This example is the version from Sun, 19th Dec 2009.
Notes: Last modified: Sun, 19th Dec 2009
Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete
// Event implementations
Sub Open()
if TargetCocoa = false then
MsgBox "This application must be run with Cocoa target in RB 2010."
quit
end if
End Sub
End Class
Class Window1
Inherits Window
// Controls
ControlInstance
End ControlInstance
ControlInstance
Sub Action() Handles Event
ovalview.alphaValue = 1.0
End Sub
End ControlInstance
ControlInstance
Sub Action() Handles Event
ovalview.alphaValue = 0.0
End Sub
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
Sub Action() Handles Event
OvalAnimator.alphaValue = 1.0
End Sub
End ControlInstance
ControlInstance
Sub Action() Handles Event
OvalAnimator.alphaValue = 0.0
End Sub
End ControlInstance
ControlInstance
End ControlInstance
ControlInstance
Sub Action() Handles Event
dim r as NSRectMBS = ovalview.frame
// calculate position. Cocoa has y=0 on the bottom, so it is some math:
r.Y = self.Height-Oval1.Height-14
ovalview.frame = r
End Sub
End ControlInstance
ControlInstance
Sub Action() Handles Event
dim r as NSRectMBS = ovalview.frame
// calculate position. Cocoa has y=0 on the bottom, so it is some math:
r.Y = 14
ovalview.frame = r
End Sub
End ControlInstance
ControlInstance
Sub Action() Handles Event
dim r as NSRectMBS = OvalAnimator.frame
// calculate position. Cocoa has y=0 on the bottom, so it is some math:
r.Y = self.Height-Oval1.Height-14
OvalAnimator.frame = r
End Sub
End ControlInstance
ControlInstance
Sub Action() Handles Event
dim r as NSRectMBS = OvalAnimator.frame
// calculate position. Cocoa has y=0 on the bottom, so it is some math:
r.Y = 14
OvalAnimator.frame = r
End Sub
End ControlInstance
// Properties
Protected Dim OvalView As NSViewMBS
Dim OvalAnimator As NSViewMBS
// Event implementations
Sub Open()
OvalView = Oval1.NSViewMBS
OvalView.wantsLayer = true
OvalAnimator = OvalView.animator
End Sub
End Class
See also:
Links
MBS Realbasic Plugins - Pfarrgemeinde Messdiener Nickenich