Article Preview
Buy Now
FEATURE
Designing a Visual Layout Editor
Part One
Issue: 4.6 (July/August 2006)
Author: Charles Yeomans
Author Bio: Charles is the author of "I Declare: Calling External Functions in REALbasic", available online at
Article Description: No description available.
Article Length (in bytes): 34,927
Starting Page Number: 25
Article Number: 4610
Resource File(s):
4610.zip Updated: 2006-10-10 09:47:41
Related Web Link(s):
http://www.declareSub.com/
Excerpt of article text...
Adding visual layout capability to applications is a complex task. As evidence for this, you only need to leaf through the book "Design Patterns" to see that several of the patterns have their origins in designing visual layout editors. In this two-part article, we tackle the design of a simple layout editor. More precisely, we will develop a mockup of a layout editor that I hope will suggest how one might go about the design of a visual layout editor, and illustrate some technique.
Getting Started
As a model for the look-and-feel of our layout editor, we look to the REALbasic IDE. We will emulate its single-window design. Starting from a new project, rename
Window1
toLayoutEditor
. Open its editor, and a Listbox namedWidgetListbox
, and a Canvas namedLayoutCanvas
, arranging them as in the REALbasic IDE (see Figure 1).We will want to be able to double-click the LayoutCanvas, so we implement a quick DoubleClickCanvas class subclass of Canvas. Here are the properties, methods, and events to add to DoubleClickCanvas.
Private LastMouseUpTime as Integer
...End of Excerpt. Please purchase the magazine to read the full article.