main page

Tutorial 1:

[MainWindow]
Class=MainWindow
MinWidth=100
MinHeight=100

Window1.Name=SimpleTile
Window1.X=0
Window1.Y=0

[SimpleTile]
Class=Menu
Graphics.middle=circle.gif
Stretch=ToContent
Action.rbtndown=MenuTool
Action.lbtndown=AppDragWindow


This example will make a "skin" of a grey circle and it will bring up the tools menu on a right click. (This is so you can still change skins.) Click and drag will move the window around.

Breaking down the example.

[MainWindow] Definition of the containing window. This does not have graphics of its own.
Class=MainWindow Each window must define its class. Its class defines its possible behaviors. There can only be one class of MainWindow.
MinWidth=100
MinHeight=100
This defines the starting size of the skinned window as well as the minimum size of any resizable windows.
Window1.Name=SimpleTile This is the start of a definition of a child window. The name binds the specific child definition to the template defined later in the .ini file
Window1.X=0
Window1.Y=0
This sets the child window's position relative to its owner. In this case the owner is the MainWindow.
[SimpleTile] The start of the template definition for SimpleTile.
Class=Menu "Tile" is the most basic class. "Menu" is used when we want the tile to trigger a menu popup,
Graphics.middle=circle.gif The graphics subgroup of a template definition can be much more complex. The simplest is to define the .middle.
Stretch=ToContent Stretch by default is disabled. "ToContent" means the window being created will be defined by the Graphics subset. "ToFit" means the image is stretched or shrunk to fit in the window's size definition.
Action.rbtndown=MenuTool Actions will be listed later. "rbtndown" is the trigger for the invocation of the"MenuTool". That will send the message to open the Tools Menu.
Action.lbtndown=AppDragWindow "lbtndown" is the trigger for the invocation of "AppDragWindow". This allows click and dragging the window.

Tutorial 1 does not have any real functionality to it. In Tutorial 2 we will apply a color to the graphic and make it resizable. (We added the complexity for a menu so its possible to change skins even from Tutorial 1.)

main page