Chapter 19. Windows Commands

Window Commands
WINDOWCREATE
WINDOWDELETE
WINDOWENABLE
Dialog Commands
DIALOGCREATE
DIALOGDELETE
DIALOGENABLE
Listbox Commands
LISTBOXCREATE
LISTBOXDELETE
LISTBOXENABLE
LISTBOXGETSELECT
LISTBOXADDSTRING
LISTBOXDELETESTRING
Combobox Commands
COMBOBOXCREATE
COMBOBOXDELETE
COMBOBOXENABLE
COMBOBOXGETTEXT
COMBOBOXSETTEXT
COMBOBOXADDSTRING
COMBOBOXDELETESTRING
Scrollbar Commands
SCROLLBARCREATE
SCROLLBARDELETE
SCROLLBARENABLE
SCROLLBARSET
SCROLLBARGET
Button Commands
BUTTONCREATE
BUTTONDELETE
BUTTONENABLE
BUTTONUPDATE
Static Commands
STATICCREATE
STATICDELETE
STATICUPDATE
Group Box Commands
GROUPBOXCREATE
GROUPBOXDELETE
Checkbox Commands
CHECKBOXCREATE
CHECKBOXDELETE
CHECKBOXENABLE
CHECKBOXSET
CHECKBOXGET
Radio Button Commands
RADIOBUTTONCREATE
RADIOBUTTONDELETE
RADIOBUTTONENABLE
RADIOBUTTONSET
RADIOBUTTONGET
Debug Commands
DEBUGWINDOWS
Modal vs. Modeless Windows
MESSAGEBOX
YESNOBOX
SELECTBOX
QUESTIONBOX
DIALOGFILEOPEN
DIALOGFILESAVE
WINDOWFILEEDIT
Example Code for Constructing a Window

This chapter describes how to create Graphical User Interfaces (GUIs) in FMSLogo.

The term "window" is very broad and includes simple windows, push buttons, dialog boxes, list boxes, combo boxes, scroll bars, buttons, static text, group boxes, checkboxes, and radio buttons. Using these elementary units, you can build up complex GUIs. Each window maintains a parent-child relationship with the windows that are placed on it. The way you program GUIs is modeled after how they are displayed, you create each individual sub-window and set up the parent-child relationships.

Each time a window is created, you must specify the parent that "owns" the window. You must also specify a "name" so that the new window may be referenced by other instructions. Most other commands use this name to identify the Window or control you wish to communicate with. When a parent window is deleted, its "child" Windows and controls are also deleted.

When controls are in windows, the coordinates used by all the Windows procedures are in Windows coordinate system (not the turtle coordinate system). That is the Y axis is upside down (positive numbers are down). Likewise, the origin is not the middle of the screen, it is the upper left hand corner of the window. Furthermore, the position and size are given in "dialog units", which are proportional to the size of the font that is being used. This ensures that the dialog boxes have a consistent layout, regardless of the font size.

When controls are on the FMSLogo screen window the coordinates are in the turtle coordinate system.


SourceForge.net Logo