GUI Editor Design Concept

Table of Contents

Revision
Purpose
Structure
Tools
Menu

Revision

0.1
	First version. 

Purpose

The purpose of the GUI editor is to provide an easy way to create GUI definition files and GUI resource files for the GUI library.

Structure

Interface

The interface of the application is Multiple Document and consist of the Menu, Toolbar, status bar, and Workspace area.
The menu holds options regarding files (open, save, close, etc), configuration (grid, snap, rulers, etc), window placement (tile, cascade), and help functions (contents, about, etc).
The Toolbar provides access to tools, such as Rect (for defining parts of a GUI definition file, etc) and Text (for defining window caption in a GUI resource file).
The Status bar provides feedback of configuration status (Grid, Snap, etc).
The Workspace contains the file windows of the current open workspace.

Files

There are three kinds files that can be edited in the Editor, the definition and resource files, and the workspace they are contained in. All types are stored using XML.
The definition files specifies an image and defines the regions of that image that make up the appearance of the different component classes (window, button, text, etc).
The resource files uses a definition file to define the structure of a GUI hierarchy, which could be just a window with controls, or an entire GUI. They also defines the relationship between controls, such as defining a button that displays another window.
The workspace files contain a link to a definition file and a list of links to resource files using that definition.

Tools

These tools are placed in the Toolbar, in the Edit menu under Tools, and also have shortcut keys.

Rect - This tool is used in definition files to define a region, such as the part of an image that is to be used as a border for a GUI component. In resource files it can be used to define the size and position of a specific component, such as a window or button.
Select - This tool is used in both definition and resource files to select one or more regions/components.
Move - Used to move the selected regions/components.
Resize - Used for resizing a region/component.
Component - In a definition file, this creates a new component definition (a group of regions). If use with a resource file, this creates a new component of the desired type of a default size, or within the currently selected rect. If an attempt to create a non-defined component is made, it will fail. A component must be defined in the definition file before it can be used in a resource file.
Edit - Edits the properties of the current selected region/component.

Menu

File
New
Resource File
Definition File
Workspace
Save
Save As
Close
Open Workspace
Close Workspace
Exit
Edit
Tools
Rect
Select
Move
Resize
Component
Edit
Workspace Properties
Properties
Window
Tile
Cascade
Help
Contents
About