Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Concept of the CSLib GUI

The GUI of CSLib is based one single class CSGrafikElement. This class is the base class of all other elements, widgets, windows, desktop and other entities. The base class keeps track of position, sizing and the like. Also it provides mechanisms for painting and string output and LAF support and children (other CSGrafikElement elements). For a complete list of features and supporting methods see CSGrafikElement.

GraphicElement Structure

Each CSGraphicElement constists of: During each painting of a GraphicElement these are drawn on screen in the above order. Usually the area and the border are determined by the currently set LAF. But one can set elements their own special version, the own area's and border's must fullfill the interface defined in the classes CSBorder and CSArea.

Borders

As of now their are two different types of borders. One can define own borders, which (as a thought) include animations, changing colors or the like.

Areas

As of now their are several different types of areas. One can define own areas, which (as a thought) include animations, changing colors or the like.

Children

Each GraphicElement can take a(ny) number of GraphicElements as children. Children can be arranged via a CSLayoutManager. elements added to another element can have different options:

Messages

If something happens -> a message is passed to everyone who is interested. A listener can be added to each element. The message that is sent will be of the type CSMessage in special GuiMessage.

Internal Messages

The receiver of Gui-driven events (mouse movement, clicks, etc) will allways be the element that is furthest down the element hierachie.
e.g.
The desktop has a window, the window has a panel, which has a button. If the mouse is hovering above the button and the user clicks the (mouse) button. The CSButton, which is part of the panel, which is part of the window... receives a MOUSE_BUTTON_PRESSED_MESSAGE - message. The innermost element is responsible for the message. If it not interested in it, it should pass the message on to it's parent - element (one up in the hierachy)!
Generated on Wed Jul 14 00:45:34 2004 for CSLib by doxygen 1.3.6