Platforms to show: All Mac Windows Linux Cross-Platform
/MacCG/CoreGraphics DirectDisplay/CGDisplay Rotation
Required plugins for this example: MBS MacCG Plugin, MBS MacCF Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCG/CoreGraphics DirectDisplay/CGDisplay Rotation
This example is the version from Sat, 7th Dec 2012.
Project "CGDisplay Rotation.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control BevelButton1 Inherits BevelButton
ControlInstance BevelButton1 Inherits BevelButton
EventHandler Sub Action()
dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay
dim e as integer = d.SetRotation(90)
if e<>0 then
MsgBox "Error: "+str(e)
end if
End EventHandler
End Control
Control BevelButton2 Inherits BevelButton
ControlInstance BevelButton2 Inherits BevelButton
EventHandler Sub Action()
dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay
dim e as integer = d.SetRotation(180)
if e<>0 then
MsgBox "Error: "+str(e)
end if
End EventHandler
End Control
Control BevelButton3 Inherits BevelButton
ControlInstance BevelButton3 Inherits BevelButton
EventHandler Sub Action()
dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay
dim e as integer = d.SetRotation(270)
if e<>0 then
MsgBox "Error: "+str(e)
end if
End EventHandler
End Control
Control BevelButton4 Inherits BevelButton
ControlInstance BevelButton4 Inherits BevelButton
EventHandler Sub Action()
dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay
dim e as integer = d.SetRotation(0)
if e<>0 then
MsgBox "Error: "+str(e)
end if
End EventHandler
End Control
EventHandler Sub Close()
dim d as CGDisplayMBS = CGDisplayMBS.MainDisplay
dim e as integer = d.SetRotation(0)
End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project
See also:
- /MacCG/CoreGraphics DirectDisplay/Capture Screen with CGContextMBS
- /MacCG/CoreGraphics DirectDisplay/CG Modelist
- /MacCG/CoreGraphics DirectDisplay/CGScreenRefreshEvent Test
- /MacCG/CoreGraphics DirectDisplay/Gamma Test
- /MacCG/CoreGraphics PDF/PDF properties
- /MacCG/CoreGraphics PDF/PDF Text
- /MacCG/CoreGraphics PDF/PDF using Save and Restore
- /MacCG/CoreGraphics PDF/PDF with paths
- /MacCG/CoreGraphics PDF/Show PDF
- /MacCG/CoreGraphics PDF/Simple Make PDF
The items on this page are in the following plugins: MBS MacCG Plugin.