Platforms to show: All Mac Windows Linux Cross-Platform


Required plugins for this example: MBS Linux Plugin, MBS Main Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Linux/LinuxIcon

This example is the version from Wed, 5th Feb 2019.

Project "LinuxIcon.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits Window
Control Canvas1 Inherits Canvas
ControlInstance Canvas1 Inherits Canvas
End Control
Control Canvas2 Inherits Canvas
ControlInstance Canvas2 Inherits Canvas
End Control
Control Canvas3 Inherits Canvas
ControlInstance Canvas3 Inherits Canvas
End Control
Control Canvas4 Inherits Canvas
ControlInstance Canvas4 Inherits Canvas
End Control
Control Canvas5 Inherits Canvas
ControlInstance Canvas5 Inherits Canvas
End Control
Control Canvas6 Inherits Canvas
ControlInstance Canvas6 Inherits Canvas
End Control
Control Canvas7 Inherits Canvas
ControlInstance Canvas7 Inherits Canvas
End Control
Control Canvas8 Inherits Canvas
ControlInstance Canvas8 Inherits Canvas
End Control
Control Canvas9 Inherits Canvas
ControlInstance Canvas9 Inherits Canvas
End Control
EventHandler Sub Open() // icon for jpeg images Canvas1.Backdrop = LinuxIconMBS.Icon("image/jpeg", Canvas1.Width) // icon for desktop folder dim f2 as FolderItem = SpecialFolder.Desktop Canvas2.Backdrop = LinuxIconMBS.FileIcon(f2, Canvas2.Width) // symbolic icon Canvas3.Backdrop = LinuxIconMBS.SymbolicIcon("image/jpeg", Canvas3.Width) // icon of app on desktop dim f4 as FolderItem = SpecialFolder.Desktop.Child("LinuxIcon") Canvas4.Backdrop = LinuxIconMBS.FileIcon(f4, Canvas4.Width) // make an image file dim p as picture = logoMBS(500) // from Main plugin dim f as FolderItem = SpecialFolder.Desktop.Child("MBS.jpg") p.Save(f, p.SaveAsJPEG, 90) // show icon from file Canvas5.Backdrop = LinuxIconMBS.FileIcon(f, Canvas5.Width) Canvas7.Backdrop = LinuxIconMBS.FileIcon(SpecialFolder.Movies, Canvas7.Width) Canvas8.Backdrop = LinuxIconMBS.FileIcon(SpecialFolder.Documents, Canvas8.Width) Canvas9.Backdrop = LinuxIconMBS.FileIcon(SpecialFolder.Pictures, Canvas9.Width) // show thumbnail dim ThumbnailFile as FolderItem = LinuxIconMBS.FileThumbnail(f) if ThumbnailFile <> nil then Canvas6.Backdrop = Picture.Open(ThumbnailFile) end if End EventHandler
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

The items on this page are in the following plugins: MBS Linux Plugin.

The biggest plugin in space...