<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=GUI</id>
	<title>GUI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=GUI"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=GUI&amp;action=history"/>
	<updated>2026-05-01T10:59:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=GUI&amp;diff=1383&amp;oldid=prev</id>
		<title>Redspark: Initial Page</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=GUI&amp;diff=1383&amp;oldid=prev"/>
		<updated>2025-03-31T15:38:46Z</updated>

		<summary type="html">&lt;p&gt;Initial Page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This module provides classes and utilities for making GUI (Graphical User Interface) apps, like the desktop demo.&lt;br /&gt;
&lt;br /&gt;
== Classes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.Image9Slice|Image9Slice]] || An image wrapper with margins that are not stretched, and a middle that is stretched when drawn to any size.&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.Scrollbar|Scrollbar]] || Base class for other scrollbar classes.&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.ScrollbarH| ScrollbarH]] || Horizontal Scrollbar&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.ScrollbarV|ScrollbarV]] || Vertical Scrollbar&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.Window|Window]] || Window class inherits from the [[events.EventSprite]] class&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.Menubar|Menubar]] || Represents a group of Menus drawn horizontally as a single unit.&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.Menu|Menu]] || Represents a group of MenuItems as a menu or submenu.&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.MenuItem|MenuItem]] || Represents a single item within a menu.&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.InputField|InputField]] || Numeric input field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.clearScratch|clearScratch(width=256, height=256, color=&amp;quot;#FFFFFF&amp;quot;)]] || Clear our off-screen &amp;quot;scratch&amp;quot; display, used for drawing or compositing things to create an image or sprite).&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.drawMenuItem|drawMenuItem(g, menuText, left, bottom, width=100, highlighted=false, disabled=false)]] || Draw a single menu item.&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.drawMenuItem|drawMenuItem(g, menuText, left, bottom, width=100, highlighted=false, disabled=false)]] || A helper function for drawMenuItem.&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.calcMenuItemWidth|calcMenuItemWidth(menuText)]] || Calculates the menu item text width in pixels plus padding.&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.calcMenuItemWidth| drawMenuBottom(g, left, menuBottom, width=100)]] || Draws the bottom of the menu.  Note that the third parameter is the bottom of the bottommost menu item; we actually draw below that (border and shadow).&lt;br /&gt;
|-&lt;br /&gt;
| [[gui.setupDisplays|setupDisplays]] || Setups up the display layers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| gfxSource || An image template used to draw certain GUI controls.  See /sys/data/desktop/desktopGfx.png for an example.&lt;br /&gt;
|-&lt;br /&gt;
| smallFont || A bmfFont.  If /usr/fonts/minimicro-pro-12.bmf does not exist, then /sys/fonts/minimicro-pro-12.bmf is used.&lt;br /&gt;
|-&lt;br /&gt;
| medFont || A bmfFont.  If /usr/fonts/minimicro-pro-16.bmf does not exist, then /sys/fonts/minimicro-pro-16.bmf is used.&lt;br /&gt;
|-&lt;br /&gt;
| largeFont || A bmfFont.  If /usr/fonts/minimicro-pro-20.bmf does not exist, then /sys/fonts/minimicro-pro-20.bmf is used.&lt;br /&gt;
|-&lt;br /&gt;
| images || A map of various control images pulled from the gfxSource image.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
=== Window.dragMode ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| kDragMove || Moving the window&lt;br /&gt;
|-&lt;br /&gt;
| kDragResize || Stretching the window&lt;br /&gt;
|-&lt;br /&gt;
| kDragSelect || Selecting stuff within the window&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Window.partHit ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| kPartTitle || Title bar&lt;br /&gt;
|-&lt;br /&gt;
| kPartFrame || Frame&lt;br /&gt;
|-&lt;br /&gt;
| kPartResize || Resize grip box&lt;br /&gt;
|-&lt;br /&gt;
| kPartContent || Content area&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Drawing ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| kScrollbarSize || Default thickness for any scrollbar&lt;br /&gt;
|-&lt;br /&gt;
| kMenuBarHeight || Height of the menu bar at top of screen&lt;br /&gt;
|-&lt;br /&gt;
| kMenuItemHeight || Height of one item in a menu&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Misc. ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| selectionColor || Color string&lt;br /&gt;
|-&lt;br /&gt;
| scrollWheelSpeed || Distance to scroll when mouse wheel is turned&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;br /&gt;
[[Category:Sys Modules]]&lt;/div&gt;</summary>
		<author><name>Redspark</name></author>
		
	</entry>
</feed>