<?xml version="1.0" encoding="ISO-8859-1"?>
<device image="light.gif">
 <information>
  <name>Generic RGBA-Device with virtual Dimmer</name>
  <author>Stefan Krupop</author>
 </information>
 <channels>
  <function channel="0" minvalue="0" maxvalue="255" name="Rot" fade="yes" type="r" action="GetColor" />
  <function channel="1" minvalue="0" maxvalue="255" name="Grün" fade="yes" type="g" action="GetColor" />
  <function channel="2" minvalue="0" maxvalue="255" name="Blau" fade="yes" type="b" action="GetColor" />
  <function channel="3" minvalue="0" maxvalue="255" name="Amber" fade="yes"/>
  <virtual channel="4" minvalue="0" maxvalue="255" name="Virtual dimmer" fade="yes" type="dimmer">
   <channel channel="0"/>
   <channel channel="1"/>
   <channel channel="2"/>
   <channel channel="3"/>
  </virtual>
 </channels>
 <form width="177" height="208">
  <deviceimage top="0" left="0"/>
  <devicename top="0" left="40"/>
  <deviceadress top="16" left="40"/>
  <colorpicker mode="rgb" top="40" left="0" height="75" width="177" name="ColPicker" action="SetColor" />
  <slider top="130" left="0" height="25" width="177" startvalue="0" endvalue="255" tickfreq="50" smallchange="10" largechange="50" channel="3"/>
  <slider top="155" left="0" height="25" width="177" startvalue="0" endvalue="255" tickfreq="50" smallchange="10" largechange="50" channel="4"/>
  <command top="185" left="0" width="177" height="22" caption="Show color info" action="ShowColor" />
 </form>
  <code>
   <procedure name="INITCONTROLS">
!call|GetColor$
   </procedure>  
   <procedure name="GetColor">
!set_control|ColPicker:1|{channel_0}$
!set_control|ColPicker:2|{channel_1}$
!set_control|ColPicker:3|{channel_2}$
   </procedure>
   <procedure name="SetColor">
!set_channel|0|{ColPicker:1}$
!set_channel|1|{ColPicker:2}$
!set_channel|2|{ColPicker:3}$
   </procedure>
   <procedure name="ShowColor">
!msgbox|{ColPicker:1}:{ColPicker:2}:{ColPicker:3}$
   </procedure>
  </code>
</device>