The Lederhosen project - The Second Coming
My proposal is to make falagard widgets derivable. Basically they should work the same way once they are loaded into the internal data structures, but in XML the possibility will be given to inherit each widget from a parent widget, modifying certain properties and elements to skin the original widget in a specific way. This should allow slimmer LNF's that rely on one generic LNF containing general widget designs. These slimmer LNF's will merely contain that information that is necessary to give the widget a new look based on user-defined imagery, fonts, etc. The TaharezLook is the most complete LNF of all and will therefore be used as basis for creating the one inheriting LNF, which will contain all the inheriting widgets.
The following contains an example of inheritanced based on Vanilla/Button
Original Vanilla/Button:
<WidgetLook name="Vanilla/Editbox"> <PropertyDefinition redrawOnWrite="true" initialValue="FFDFDFDF" type="ColourRect" name="ReadOnlyBGColour"/> <PropertyDefinition redrawOnWrite="true" initialValue="FF000000" type="ColourRect" name="NormalTextColour"/> <PropertyDefinition redrawOnWrite="true" initialValue="FFFFFFFF" type="ColourRect" name="SelectedTextColour"/> <PropertyDefinition redrawOnWrite="true" initialValue="FF607FFF" type="ColourRect" name="ActiveSelectionColour"/> <PropertyDefinition redrawOnWrite="true" initialValue="FF808080" type="ColourRect" name="InactiveSelectionColour"/> <Property name="Size" value="{{0, 256}, {0, 32}}" /> <NamedArea name="TextArea"> <Area> <Dim type="LeftEdge"> <AbsoluteDim value="7"/> </Dim> <Dim type="TopEdge"> <AbsoluteDim value="3"/> </Dim> <Dim type="RightEdge"> <UnifiedDim scale="1.0" type="RightEdge" offset="-7"/> </Dim> <Dim type="BottomEdge"> <UnifiedDim scale="1.0" type="BottomEdge" offset="-7"/> </Dim> </Area> </NamedArea> <ImagerySection name="selection"> <ImageryComponent> <Area> <Dim type="LeftEdge"> <AbsoluteDim value="0"/> </Dim> <Dim type="TopEdge"> <AbsoluteDim value="0"/> </Dim> <Dim type="RightEdge"> <UnifiedDim scale="1.0" type="RightEdge"/> </Dim> <Dim type="BottomEdge"> <UnifiedDim scale="1.0" type="BottomEdge"/> </Dim> </Area> <Image name="Vanilla-Images/GenericBrush"/> <VertFormat type="Stretched"/> <HorzFormat type="Stretched"/> </ImageryComponent> </ImagerySection> <ImagerySection name="Caret"> <ImageryComponent> <Area> <Dim type="LeftEdge"> <AbsoluteDim value="0"/> </Dim> <Dim type="TopEdge"> <AbsoluteDim value="0"/> </Dim> <Dim type="Width"> <AbsoluteDim value="2"/> </Dim> <Dim type="BottomEdge"> <UnifiedDim scale="1.0" type="BottomEdge"/> </Dim> </Area> <Image name="Vanilla-Images/GenericBrush"/> <Colours topLeft="FF2222FF" bottomLeft="FF2222FF" topRight="FF2222FF" bottomRight="FF2222FF"/> <VertFormat type="Stretched"/> <HorzFormat type="Stretched"/> </ImageryComponent> </ImagerySection> <StateImagery name="Enabled"> <Layer> <Section section="Frame" look="Vanilla/Shared"/> </Layer> </StateImagery> <StateImagery name="ReadOnly"> <Layer> <Section section="Frame" look="Vanilla/Shared"> <ColourProperty name="ReadOnlyBGColour"/> </Section> </Layer> </StateImagery> <StateImagery name="Disabled"> <Layer> <Section section="Frame" look="Vanilla/Shared"> <ColourProperty name="ReadOnlyBGColour"/> </Section> </Layer> </StateImagery> <StateImagery name="ActiveSelection"> <Layer> <Section section="selection"> <ColourProperty name="ActiveSelectionColour"/> </Section> </Layer> </StateImagery> <StateImagery name="InactiveSelection"> <Layer> <Section section="selection"> <ColourProperty name="InactiveSelectionColour"/> </Section> </Layer> </StateImagery> </WidgetLook>