2005-02-08, 05:43 AM
I'm tossing this out for comments from Sub, PlugIn Developers and Skin Designers. I've tried to address some of the issues I've seen between the various plugins and also designers for skinning control and layout.
Below is a suggested future edition for the Skinning files. One of the problems from a skin designer aspect I can see is that the Layout and positioning is still pretty much tied to the Plugin code. An easy way to visualize what the placement looks like is not given, as no representation of the actual screen to be displayed is defined.
The following tries to represent this from a skinning design perspective instead of a coding perspective, but also give the plugin designer some functionality extensibility. There are two points of view for skins, the coders point of view and the layout design point of view.
These are the areas that this tries to address:
1. Standardization across plugins and skin files.
2. Make the skin files, more friendly for future GUI skinning tool. If somebody wants to write one using JasonF's Widget Library.
3. Represent what the actual screens look like.
4. Provide a Schema that will make sure that a Skin.xml is valid before a plugin tries to use it. If it doesn't pass Validation, then the plugin doesn't start. Some of this will relieve the plugin from having to do it's own validation checking, but not all.
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
<Widgets>
<Buttons>
<Button> </Button>
<Button> </Button>
</Buttons>
<SpecialElements>
<SpecialElement></SpecialElement>
</SpecialElements>
<CompositeImages>
<CompositeImage></CompositeImage>
<CompositeImage></CompositeImage>
<CompositeImage></CompositeImage>
</CompositeImages>
<Panels>
<Panel></Panel>
</Panel>
<Menus>
<Menu type="Navigation"></Menu>
<Menu type="Standard"></Menu>
</Menus>
<Widgets>
<Screens>
<Screen identifier='ScreenId'>
<ScreenWidgets>
</ScreenWidgets>
<LayOut background="Blah">
<Widget type="Button" name="View" xpos="1" ypos="22"/>
<Widget type="SpecialElement" name="Name" xpos="44" ypos="33"/>
<Widget type="CompositeImage" name="NormalButtonImage" xpos="4" ypos="5"/>
<Pannel xpos="40" ypos="90">Screen2</Pannel>
</LayOut>
</Screen>
<Screen identifier='ScreenId2'>
<ScreenWidgets>
</ScreenWidgets>
<LayOut background="Blah">
<Widget type="Button" name="View" xpos="1" ypos="22"/>
<Widget type="SpecialElement" name="Name" xpos="44" ypos="33"/>
<Widget type="CompositeImage" name="NormalButtonImage" xpos="4" ypos="5"/>
<Pannel xpos="40" ypos="90">Screen2</Pannel>
</LayOut>
</Screen>
</Screens>
[/QUOTE]
loc - is now represented by xpos and ypos
size - is now width and height
This was done for several XML design reasons. Mainly because it requires less parsing code to be written to interpret or extract out a position.
If a plugin had more than one screen, it would have multiple screen elements under the Screens group. One for each screen that it defined. Screens would include PopUps and OverLay Screens as well as standard Screens.
Each Screen has a LayOut group, which contains Widgets. Widgets are the various Objects that make up that screen. They can include Buttons, Menus, CompositeImages, or Pannels.
The default skin for a Plugin would have all the Screens defined that it expects. Plus all the Widgets that it will use. Designers could then make layout changes as appropriate for their skin, but in a format that hopefully actually represents the screen they are working.
If this is adopted by Sub for a future version of GBPVR an XSLT could be created that would convert the existing skin.xml files to the new format, to make migration simpler for the plugin developer, and easier on designers when converting existing skins.
Below is a suggested future edition for the Skinning files. One of the problems from a skin designer aspect I can see is that the Layout and positioning is still pretty much tied to the Plugin code. An easy way to visualize what the placement looks like is not given, as no representation of the actual screen to be displayed is defined.
The following tries to represent this from a skinning design perspective instead of a coding perspective, but also give the plugin designer some functionality extensibility. There are two points of view for skins, the coders point of view and the layout design point of view.
These are the areas that this tries to address:
1. Standardization across plugins and skin files.
2. Make the skin files, more friendly for future GUI skinning tool. If somebody wants to write one using JasonF's Widget Library.
3. Represent what the actual screens look like.
4. Provide a Schema that will make sure that a Skin.xml is valid before a plugin tries to use it. If it doesn't pass Validation, then the plugin doesn't start. Some of this will relieve the plugin from having to do it's own validation checking, but not all.
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
<Widgets>
<Buttons>
<Button> </Button>
<Button> </Button>
</Buttons>
<SpecialElements>
<SpecialElement></SpecialElement>
</SpecialElements>
<CompositeImages>
<CompositeImage></CompositeImage>
<CompositeImage></CompositeImage>
<CompositeImage></CompositeImage>
</CompositeImages>
<Panels>
<Panel></Panel>
</Panel>
<Menus>
<Menu type="Navigation"></Menu>
<Menu type="Standard"></Menu>
</Menus>
<Widgets>
<Screens>
<Screen identifier='ScreenId'>
<ScreenWidgets>
</ScreenWidgets>
<LayOut background="Blah">
<Widget type="Button" name="View" xpos="1" ypos="22"/>
<Widget type="SpecialElement" name="Name" xpos="44" ypos="33"/>
<Widget type="CompositeImage" name="NormalButtonImage" xpos="4" ypos="5"/>
<Pannel xpos="40" ypos="90">Screen2</Pannel>
</LayOut>
</Screen>
<Screen identifier='ScreenId2'>
<ScreenWidgets>
</ScreenWidgets>
<LayOut background="Blah">
<Widget type="Button" name="View" xpos="1" ypos="22"/>
<Widget type="SpecialElement" name="Name" xpos="44" ypos="33"/>
<Widget type="CompositeImage" name="NormalButtonImage" xpos="4" ypos="5"/>
<Pannel xpos="40" ypos="90">Screen2</Pannel>
</LayOut>
</Screen>
</Screens>
[/QUOTE]
loc - is now represented by xpos and ypos
size - is now width and height
This was done for several XML design reasons. Mainly because it requires less parsing code to be written to interpret or extract out a position.
If a plugin had more than one screen, it would have multiple screen elements under the Screens group. One for each screen that it defined. Screens would include PopUps and OverLay Screens as well as standard Screens.
Each Screen has a LayOut group, which contains Widgets. Widgets are the various Objects that make up that screen. They can include Buttons, Menus, CompositeImages, or Pannels.
The default skin for a Plugin would have all the Screens defined that it expects. Plus all the Widgets that it will use. Designers could then make layout changes as appropriate for their skin, but in a format that hopefully actually represents the screen they are working.
If this is adopted by Sub for a future version of GBPVR an XSLT could be created that would convert the existing skin.xml files to the new format, to make migration simpler for the plugin developer, and easier on designers when converting existing skins.