Rapagui 2.0 Rapid Cross-Platform GUI Development on All Islands
Total Page:16
File Type:pdf, Size:1020Kb
RapaGUI 2.0 Rapid Cross-Platform GUI Development On All Islands Andreas Falkenhahn i Table of Contents 1 General information::::::::::::::::::::::::::::: 1 1.1 Introduction :::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 Terms and conditions ::::::::::::::::::::::::::::::::::::::::::: 1 1.3 Requirements::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2 About RapaGUI::::::::::::::::::::::::::::::::: 5 2.1 History ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 2.2 Compatibility notes::::::::::::::::::::::::::::::::::::::::::::: 5 2.3 Future:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.4 Frequently asked questions:::::::::::::::::::::::::::::::::::::: 6 2.5 Credits ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 3 Conceptual overview :::::::::::::::::::::::::::: 9 3.1 Application tree :::::::::::::::::::::::::::::::::::::::::::::::: 9 3.2 GUI layout ::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 3.3 Running GUIs::::::::::::::::::::::::::::::::::::::::::::::::: 10 3.4 Initializing RapaGUI :::::::::::::::::::::::::::::::::::::::::: 11 3.5 Object handling ::::::::::::::::::::::::::::::::::::::::::::::: 12 3.6 Event handling :::::::::::::::::::::::::::::::::::::::::::::::: 12 3.7 Attribute notifications ::::::::::::::::::::::::::::::::::::::::: 13 3.8 Dynamic objects :::::::::::::::::::::::::::::::::::::::::::::: 15 3.9 Sizeability ::::::::::::::::::::::::::::::::::::::::::::::::::::: 16 3.10 Applicability ::::::::::::::::::::::::::::::::::::::::::::::::: 19 3.11 Device-independent pixels :::::::::::::::::::::::::::::::::::: 19 3.12 High-DPI support :::::::::::::::::::::::::::::::::::::::::::: 20 3.13 Keyboard shortcuts :::::::::::::::::::::::::::::::::::::::::: 21 3.14 Text formatting codes :::::::::::::::::::::::::::::::::::::::: 22 3.15 Implementing help texts :::::::::::::::::::::::::::::::::::::: 23 3.16 Context menus ::::::::::::::::::::::::::::::::::::::::::::::: 23 3.17 Internationalization :::::::::::::::::::::::::::::::::::::::::: 24 3.18 Character encoding::::::::::::::::::::::::::::::::::::::::::: 25 3.19 Hollywood bridge::::::::::::::::::::::::::::::::::::::::::::: 26 3.20 Image cache :::::::::::::::::::::::::::::::::::::::::::::::::: 30 3.21 Platform-dependent features :::::::::::::::::::::::::::::::::: 31 3.22 MUI Royale compatibility :::::::::::::::::::::::::::::::::::: 31 4 Tutorial ::::::::::::::::::::::::::::::::::::::::: 35 4.1 Tutorial ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 35 5 Examples ::::::::::::::::::::::::::::::::::::::: 43 5.1 Examples ::::::::::::::::::::::::::::::::::::::::::::::::::::: 43 ii RapaGUI manual 6 Function reference ::::::::::::::::::::::::::::: 45 6.1 moai.CreateApp ::::::::::::::::::::::::::::::::::::::::::::::: 45 6.2 moai.CreateDialog ::::::::::::::::::::::::::::::::::::::::::::: 46 6.3 moai.CreateObject :::::::::::::::::::::::::::::::::::::::::::: 47 6.4 moai.DoMethod ::::::::::::::::::::::::::::::::::::::::::::::: 49 6.5 moai.FreeApp ::::::::::::::::::::::::::::::::::::::::::::::::: 50 6.6 moai.FreeDialog ::::::::::::::::::::::::::::::::::::::::::::::: 50 6.7 moai.FreeImage ::::::::::::::::::::::::::::::::::::::::::::::: 50 6.8 moai.FreeObject ::::::::::::::::::::::::::::::::::::::::::::::: 51 6.9 moai.Get :::::::::::::::::::::::::::::::::::::::::::::::::::::: 52 6.10 moai.HaveObject ::::::::::::::::::::::::::::::::::::::::::::: 52 6.11 moai.Notify :::::::::::::::::::::::::::::::::::::::::::::::::: 53 6.12 moai.Request::::::::::::::::::::::::::::::::::::::::::::::::: 53 6.13 moai.Set ::::::::::::::::::::::::::::::::::::::::::::::::::::: 54 6.14 moai.UpdateImage ::::::::::::::::::::::::::::::::::::::::::: 55 7 Accelerator class ::::::::::::::::::::::::::::::: 57 7.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 57 8 Acceleratoritem class :::::::::::::::::::::::::: 59 8.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 59 8.2 Acceleratoritem.Mod :::::::::::::::::::::::::::::::::::::::::: 60 8.3 Acceleratoritem.Pressed ::::::::::::::::::::::::::::::::::::::: 60 9 Application class ::::::::::::::::::::::::::::::: 61 9.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 61 9.2 Application.AboutMUI :::::::::::::::::::::::::::::::::::::::: 61 9.3 Application.AboutRapaGUI ::::::::::::::::::::::::::::::::::: 61 9.4 Application.AddWindow::::::::::::::::::::::::::::::::::::::: 61 9.5 Application.ContextMenu:::::::::::::::::::::::::::::::::::::: 62 9.6 Application.HelpFile::::::::::::::::::::::::::::::::::::::::::: 62 9.7 Application.Icon::::::::::::::::::::::::::::::::::::::::::::::: 63 9.8 Application.OpenConfigWindow ::::::::::::::::::::::::::::::: 63 9.9 Application.RemoveWindow ::::::::::::::::::::::::::::::::::: 64 9.10 Application.Sleep::::::::::::::::::::::::::::::::::::::::::::: 64 9.11 Application.ShowHelp :::::::::::::::::::::::::::::::::::::::: 64 9.12 Application.ShowHelpNode ::::::::::::::::::::::::::::::::::: 65 9.13 Application.UseIcons ::::::::::::::::::::::::::::::::::::::::: 65 9.14 Application.WindowMenu :::::::::::::::::::::::::::::::::::: 66 iii 10 Area class ::::::::::::::::::::::::::::::::::::: 67 10.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::: 67 10.2 Area.ContextMenu ::::::::::::::::::::::::::::::::::::::::::: 67 10.3 Area.Disabled :::::::::::::::::::::::::::::::::::::::::::::::: 68 10.4 Area.FixHeight ::::::::::::::::::::::::::::::::::::::::::::::: 68 10.5 Area.FixWidth ::::::::::::::::::::::::::::::::::::::::::::::: 69 10.6 Area.FontName :::::::::::::::::::::::::::::::::::::::::::::: 69 10.7 Area.FontSize :::::::::::::::::::::::::::::::::::::::::::::::: 69 10.8 Area.FontStyle ::::::::::::::::::::::::::::::::::::::::::::::: 70 10.9 Area.Height :::::::::::::::::::::::::::::::::::::::::::::::::: 70 10.10 Area.Hide ::::::::::::::::::::::::::::::::::::::::::::::::::: 71 10.11 Area.Left ::::::::::::::::::::::::::::::::::::::::::::::::::: 71 10.12 Area.NoAutoKey:::::::::::::::::::::::::::::::::::::::::::: 71 10.13 Area.Redraw :::::::::::::::::::::::::::::::::::::::::::::::: 72 10.14 Area.Tooltip :::::::::::::::::::::::::::::::::::::::::::::::: 72 10.15 Area.Top:::::::::::::::::::::::::::::::::::::::::::::::::::: 72 10.16 Area.Weight :::::::::::::::::::::::::::::::::::::::::::::::: 73 10.17 Area.Width ::::::::::::::::::::::::::::::::::::::::::::::::: 73 11 Busybar class:::::::::::::::::::::::::::::::::: 75 11.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::: 75 11.2 Busybar.Move :::::::::::::::::::::::::::::::::::::::::::::::: 75 11.3 Busybar.Reset:::::::::::::::::::::::::::::::::::::::::::::::: 75 12 Button class ::::::::::::::::::::::::::::::::::: 77 12.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::: 77 12.2 Button.Hint :::::::::::::::::::::::::::::::::::::::::::::::::: 77 12.3 Button.Icon :::::::::::::::::::::::::::::::::::::::::::::::::: 77 12.4 Button.IconPos::::::::::::::::::::::::::::::::::::::::::::::: 78 12.5 Button.IconScale ::::::::::::::::::::::::::::::::::::::::::::: 78 12.6 Button.IconType ::::::::::::::::::::::::::::::::::::::::::::: 79 12.7 Button.Pressed ::::::::::::::::::::::::::::::::::::::::::::::: 79 12.8 Button.Selected :::::::::::::::::::::::::::::::::::::::::::::: 80 12.9 Button.Text :::::::::::::::::::::::::::::::::::::::::::::::::: 80 12.10 Button.Toggle::::::::::::::::::::::::::::::::::::::::::::::: 80 13 Checkbox class :::::::::::::::::::::::::::::::: 83 13.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::: 83 13.2 Checkbox.Right :::::::::::::::::::::::::::::::::::::::::::::: 83 13.3 Checkbox.Selected:::::::::::::::::::::::::::::::::::::::::::: 83 iv RapaGUI manual 14 Choice class ::::::::::::::::::::::::::::::::::: 85 14.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::: 85 14.2 Choice.Active :::::::::::::::::::::::::::::::::::::::::::::::: 85 14.3 Choice.Clear ::::::::::::::::::::::::::::::::::::::::::::::::: 85 14.4 Choice.Count::::::::::::::::::::::::::::::::::::::::::::::::: 86 14.5 Choice.GetEntry ::::::::::::::::::::::::::::::::::::::::::::: 86 14.6 Choice.Insert ::::::::::::::::::::::::::::::::::::::::::::::::: 86 14.7 Choice.Remove ::::::::::::::::::::::::::::::::::::::::::::::: 87 14.8 Choice.Rename::::::::::::::::::::::::::::::::::::::::::::::: 88 15 Combobox class ::::::::::::::::::::::::::::::: 89 15.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::: 89 15.2 Combobox.Acknowledge :::::::::::::::::::::::::::::::::::::: 89 15.3 Combobox.Clear ::::::::::::::::::::::::::::::::::::::::::::: 89 15.4 Combobox.Close ::::::::::::::::::::::::::::::::::::::::::::: 90 15.5 Combobox.Count::::::::::::::::::::::::::::::::::::::::::::: 90 15.6 Combobox.GetEntry ::::::::::::::::::::::::::::::::::::::::: 90 15.7 Combobox.Insert ::::::::::::::::::::::::::::::::::::::::::::: 91 15.8 Combobox.Open ::::::::::::::::::::::::::::::::::::::::::::: 91 15.9 Combobox.Popup :::::::::::::::::::::::::::::::::::::::::::: 92 15.10 Combobox.Remove :::::::::::::::::::::::::::::::::::::::::: 92 15.11 Combobox.Rename:::::::::::::::::::::::::::::::::::::::::: 92 15.12 Combobox.Selected:::::::::::::::::::::::::::::::::::::::::: 93 15.13 Combobox.Value :::::::::::::::::::::::::::::::::::::::::::: 93 16 Dialog class:::::::::::::::::::::::::::::::::::: 95 16.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::: 95 16.2 Dialog.EndModal::::::::::::::::::::::::::::::::::::::::::::: 96 16.3 Dialog.ShowModal ::::::::::::::::::::::::::::::::::::::::::: 96 17 Finddialog class ::::::::::::::::::::::::::::::: 99 17.1 Overview:::::::::::::::::::::::::::::::::::::::::::::::::::::