You are on page 1of 5

Paleta UI Design Documentation

By:Alfredo Alvarez

On this document we will describe the different systems that compose PaletaUi and
show their design. The purpose of this document is to understand the Architecture
to be able to follow it going forward.

UI Management System
Purpose is to be faade to Paleta UI and handle the Interactions between the
external engine and Paleta.
The system is composed of the UIManager , View, Frame, Virtual Mouse.
When this system gets initialized it needs the size for the screen. Its worth noticing
that UIManager is a singleton.

Widget System
The Decision here was that most of the items were going to be a square and that we
needed to be able to set their position in a relative way to its owner so the draw for
widget takes and x and y that is calculated. Is worth looking at the fact that Textbox
and button inherit from Label. The widget provides sizing, coordinates and ability to
change a background to all its children. The widget is abstract. All Widgets are
focusable if set.
Worth mentioning that the Panel implements a Component Pattern since it can have
more widgets inside.

Command System
The Command systems follow the command pattern and abstract action away from
the even that causes it. The system only comes with 2 commands in it. Debug
Command which just tells you if someone fired the command. Set Focus which gives
focus to that specific widget.

Focus Manager
Is a Singleton that keeps track of what widget is being used. The SetFocus
Command Calls the SetFocusMethod for the textboxes who are the only ones using
it right now.

Has Name Interface

Allows us to have a name property to be able to do searched by name when we do
views declaratively.

WidgetSerializer System
Responsible for creating the counterparts of the same name from the widget
system. Widget Serializer follows a chain of responsibility pattern pivoting on the
Name property from the hasName interface. It preloads the known components and
has an add method for extension components that are created outside of the