[Fresco-devel] DesktopKit, WidgetKit and theming stuff

Pier Luigi Fiorini <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
In these days of vacation (when I was drunk :) I have worked much on the 
theming stuff.
I hope I can explain it well, but my English sucks...

I am working on a patch that divides the DesktopKit in many 
implementations as the WidgetKit do with its Motif style for example.
There are also new DesktopKit and WidgetKit themes.
Screenshots here:
http://digilander.libero.it/plfiorini/fresco/pyro/Pyro-WidgetKit1.png
http://digilander.libero.it/plfiorini/fresco/pyro/Pyro-WidgetKit2.png

There are some .cc and .hh files that must be shared by every DesktopKit 
and WidgetKit implementation IMHO to avoid reinventing the wheel.
For the DesktopKit the files are:
Manipulator.[cc|hh]
Pulldown.[cc|hh]
WindowImpl.[cc|hh]
For the WidgetKit the files are:
Adjustable.[cc|hh]
Choice.[cc|hh]
Gauge.[cc|hh]
Panner.[cc|hh]
Scrollbar.[cc|hh]
Slider.[cc|hh]
Terminal.[cc|hh]

There's only a problem, this files at the moment depend a bit on the 
DesktopKit or on the WidgetKit implementation (for example Choice draws 
a black border with 20.0 of thickness which is not good for every theme).
I think we should take the implementation-specific code from this files 
and put it on the implementation, other parts of the code will remain on 
their files and will be shared between all the implementations.

Another think I am working on is a theming system.
I like very much XML and attached there's a draft implementation.
scanline on IRC have another idea but I'm sure he will answer this 
message so we will be able to think to the better implementation as we 
can do.

I hope you have understood what I have wrote :)
theme.xml (text/xml, 934 B)
<!--<!DOCTYPE fresco-theme SYSTEM "../fresco-theme.dtd">-->
<!xml version="1.0">
<fresco-theme>
	<info>
		<name>Pyro</name>
		<inherits>Default</inherits>
		<author>Pier Luigi Fiorini</author>
		<copyright>Copyright (C) 2003</copyright>
		<description>Simple theme provided by Pyro</description>
	</info>
	<DesktopKit>
		<titlebar background="color" bgcolor="#0000ff" alpha="0.5">
			<title align="left" fgcolor="#ffffff"/>
			<border enabled="true" spec="colored" color="#000000" thickness="1.0"/>
		</titlebar>
		<roll>
			<normal>roll_normal.png</normal>
			<pressed>roll_pressed.png</pressed>
		</roll>
		<close>
			<normal>close_normal.png</normal>
			<pressed>close_pressed.png</pressed>
		</close>
	</DesktopKit>
	<WidgetKit>
		<engine>Pyro</engine>
		<button>
			<margin>38.0</margin>
			<normal bgcolor="#efebef" fgcolor="#000000"/>
			<pressed bgcolor="#bdbabd" fgcolor="#000000"/>
		</button>
	</WidgetKit>
</fresco-theme>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.