gDesklet Weather Forecast XUL Sample - Sign up for the "Is it hot or not?" Series
Gerald Bauer <[email protected]>
| Newsgroups | gmane.comp.lang.xul.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Let us know if anyone is interested in joining the
XUL Challenge Round 2.
In the new "Is it hot or not?" series I suggest
creating an applet/desklet that shows a five day
weather forecast using a web service (e.g.
weather.com).
As an example check out the gDesklet XUL sample:
<display window-flags="sticky, below">
<sensor id="w" module="iWeather"/>
<group id="canvas" >
<group id="today">
<image id="ccIcon" x="0" y="0"
watch="uri=w:ccIcon, color=f:color1, font=f:font1"/>
<label id="ccTemp" relative-to="ccIcon, x" x="0"
y="0" watch="value=w:ccTemp" color="white" font="Sans
bold 18"/>
<label id="location" relative-to="ccTemp, y"
watch="value=w:location" color="#f0f0f0" font="Sans
bold 12"/>
<label id="ccSky" relative-to="location, y"
watch="value=w:ccSky" color="#f0f0f0" font="Sans bold
12"/>
<label id="ccFlik" relative-to="ccSky, y"
watch="value=w:ccFlik" color="#f0f0f0" font="Sans bold
12"/>
<label id="ccBar" relative-to="ccFlik, y"
watch="value=w:ccBar" color="#f0f0f0" font="Sans bold
12"/>
<label id="ccWind" relative-to="ccBar, y"
watch="value=w:ccWind" color="#f0f0f0" font="Sans bold
12"/>
<label id="ccHmid" relative-to="ccWind, y"
watch="value=w:ccHmid" color="#f0f0f0" font="Sans bold
12"/>
<label id="ccVis" relative-to="ccHmid, y"
watch="value=w:ccVis" color="#f0f0f0" font="Sans bold
12"/>
<label id="ccUv" relative-to="ccVis, y"
watch="value=w:ccUv" color="#f0f0f0" font="Sans bold
12"/>
<label id="ccDewp" relative-to="ccUv, y"
watch="value=w:ccDewp" color="#f0f0f0" font="Sans bold
12"/>
</group>
<group id="forecast" relative-to="today, x" x="20"
y="0" watch="color=f:color0, font=f:font0">
<array layout="horizontal"
watch="length=w:forecastDays">
<group id="forecastDay" x="20">
<label id="forecastDay" color="white"
watch="value=w:forecastDay" />
<group id="dayNight" relative-to="forecastDay,
y">
<group id="day">
<image id="forecastDayIcon" anchor="n"
watch="uri=w:forecastDayIcon" />
<label id="forecastTempHi" anchor="n"
relative-to="forecastDayIcon, y" color="white"
watch="value=w:forecastTempHi" />
<label id="forecastDayHmid" anchor="n"
relative-to="forecastTempHi, y" color="white"
watch="value=w:forecastDayHmid" />
<label id="forecastDayPpcp" anchor="n"
relative-to="forecastDayHmid, y" color="white"
watch="value=w:forecastDayPpcp" />
<label id="forecastDayWind" anchor="n"
relative-to="forecastDayPpcp, y" color="white"
watch="value=w:forecastDayWind" />
<label id="forecastSunrise" anchor="n"
relative-to="forecastDayWind, y" color="white"
watch="value=w:forecastSunrise" />
</group>
<group id="night" relative-to="day, x"
x="5">
<image id="forecastNightIcon" anchor="n"
watch="uri=w:forecastNightIcon" />
<label id="forecastTempLow" anchor="n"
relative-to="forecastNightIcon, y" color="white"
watch="value=w:forecastTempLow" />
<label id="forecastNightHmid" anchor="n"
relative-to="forecastTempLow, y" color="white"
watch="value=w:forecastNightHmid" />
<label id="forecastNightPpcp" anchor="n"
relative-to="forecastNightHmid, y" color="white"
watch="value=w:forecastNightPpcp" />
<label id="forecastNightWind" anchor="n"
relative-to="forecastNightPpcp, y" color="white"
watch="value=w:forecastNightWind" />
<label id="forecastSunset" anchor="n"
relative-to="forecastNightWind, y" color="white"
watch="value=w:forecastSunset" />
</group>
</group>
</group>
</array>
</group>
</group>
</display>
Pretty impressive, isn't it? Anyways, let us know if
you want to join in and I sign you up in the XUL
Challenge Round 2 also known as the "Is it hot or
not?" series.
- Gerald
-------------------
Gerald Bauer
XUL Alliance | http://xul.sourceforge.net
United XAML | http://xaml.sourceforge.net
The Thinlet World | http://thinlet.blog-city.com
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com