-
Notifications
You must be signed in to change notification settings - Fork 36
how it works
- is an NSView
- Element has 3 parts: Skin, Style and State
- Every GUI component has 1 Element
There are 2 types of Skin classes:
- GraphicsSkin
- TextSkin (NSTextField)
Is a NSView and has 1 or many Graphics classes
The Graphics class is an NSView and has 2 CAShape classes attached:
- LineShape
- FillShape
There are 2 Shape layers so that we can update each one separately.
A core Graphic class is decorated to allow for many variations, Gradient, Solid, Translucent, with or without drop-shadow, SVGGraphic etc
A style has Selectors, StyleProperties
- A StyleProperty contains all the graphics attributes that can style a Skin
- A Selector contains the address of which Element should be styled
The state is just a string that changes over time when the user interacts with the Element. Can be overDownCheckedFocused etc. then the Element is styled accordingly, by looking for a style that matches this combination of states.
The StyleManager derives its styles by parsing a .css file It supports chain importing other .css files
GUI components are aligned and positioned through .css layout rules. Float, clear, display etc. components can also be positioned manually with swift code.
Multiple SVG vector graphics can be easily inserted in any Skin.