Re: Clarification of layout proposal
David Crawshaw <[email protected]> Thu, 3 Apr 2003 20:10:36 +1000
| Newsgroups | gmane.comp.java.xwt.general |
|---|---|
| Message-ID | <[email protected]> |
On Thursday, April 3, 2003, at 08:11 PM, Charles Goodwin wrote:
> Let's remember it was you who *insisted* (and convinced me) that
> separating
> out the preapplies is a good thing.
Is this the point I've been making for the past -- oh -- 200 emails? If
so, yes, this is a good thing. Really, it is. :-)
> Then, yes, you have 2 versions of many of the widgets.
>
> 1) lib is generic code. 2) theme is box theming code. They are 2
> distinct
> concepts.
Yes, this is true! However, 2) -- the box theming code -- is theme
specific. It belongs in xwt.theme only in the 'abstract sense' of the
term. It will be in xwt.theme, but only after your overlay
org.xwt.theme.<whatever> onto xwt.theme, which is the theme where you
actually have this code.
> eg belongs in lib
>
> _somelibtrap = function( x ) {
> if ( x ) y = true;
> else z = true;
> }
Yes, this should be in xwt.lib.
>
> eg belongs in theme
>
> _layoutbox = function( x ) {
> arguments.cascade( x );
> layoutbox._SizeChange = function() {
> somelibtrap = true;
> }
> }
>
> _keypress = function( k ) { ... } // common keybindings, like "tab" in
> focusable
This should literally be in the theme. As in,
org.xwt.theme.monopoly.mybox
Then xwt.widget.mybox should have:
<xwt>
<preapply name="xwt.theme.focusable"/>
<preapply name="xwt.theme.mybox"/>
</template>
</xwt>
Then you overlay org.xwt.theme.monopoly over xwt.theme, and everything
starts working.
Your theme independent code is in xwt.lib
Your theme dependent code is in org.xwt.theme.<mytheme>
The preapplies are happening in xwt.widget
d
_______________________________________________
http://lists.xwt.org/listinfo/dev