Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS MacCG Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCG/CGS/CGS
This example is the version from Sun, 17th Mar 2012.
Project "CGS.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action()
// cube transition for the whole screen
dim r as CGSTransitionRequestMBS
co=new CGSConnectionMBS
r=new CGSTransitionRequestMBS
r.TransitionType=r.CGSCube
r.TransitionOption=r.CGSLeft
r.HasBackGround=true
r.HasBackColor=false
ct=co.NewTransition(r)
if ct<>Nil then
refresh // draw new screen
ct.invoke 5
ct.wait 5
ct.release
else
MsgBox "Error creating the transition."
end if
End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action()
// cube transition for the whole screen
dim r as CGSTransitionRequestMBS
dim w as CGSWindowMBS
co=new CGSConnectionMBS
w=co.CGSWindow(self)
r=new CGSTransitionRequestMBS
r.TransitionType=r.CGSFlip
r.TransitionOption=r.CGSLeft
r.HasBackGround=false
r.HasBackColor=false
r.Win=w
ct=co.NewTransition(r)
if ct<>Nil then
refresh // draw new screen
ct.invoke 5
ct.wait 5
ct.release
else
MsgBox "Error creating the transition."
end if
End EventHandler
End Control
Control PushButton3 Inherits PushButton
ControlInstance PushButton3 Inherits PushButton
EventHandler Sub Action()
// cube transition for the whole screen
dim r as CGSTransitionRequestMBS
dim w as CGSWindowMBS
co=new CGSConnectionMBS
w=co.CGSWindow(self)
r=new CGSTransitionRequestMBS
r.TransitionType=r.CGSWarpFade
r.TransitionOption=r.CGSDown
r.HasBackGround=false
r.HasBackColor=false
r.Win=w
ct=co.NewTransition(r)
if ct<>Nil then
refresh // draw new screen
ct.invoke 5
ct.wait 5
ct.release
else
MsgBox "Error creating the transition."
end if
End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
EventHandler Sub Paint(g As Graphics)
g.ForeColor=rgb(rnd*256,rnd*256,rnd*256)
g.FillRect 0,0,g.Width,g.Height
End EventHandler
Property co As CGSConnectionMBS
Property ct As cgstransitionmBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project
See also:
The items on this page are in the following plugins: MBS MacCG Plugin.