icon compositions


Description

An icon is the graphical representation of the node.

Diagram

diagram of <icon>


A yellow leaf

<diputree>
 <has>
  <l>
   <lt>yellow</lt>
   <hasicon>
    <icon>
     <when>
      <closed/>
     </when>
     <hascolor>
      <rgb>
       <i>0xFFFF00</i>
      </rgb>
     </hascolor>
    </icon>
   </hasicon>
  </l>
 </has>
</diputree>

Explanation

<diputree>
 <has>
  <l>
   <lt>red</lt>

the hasicon relation between the leaf and the icon

   <hasicon>
    <icon>

the when relation between the icon and closed

     <when>
      <closed/>
     </when>

the hascolor relation between the icon and rgb

     <hascolor>
      <rgb>
       <i>0xFFFF00</i>
      </rgb>
     </hascolor>
    </icon>
   </hasicon>
  </l>
 </has>
</diputree>


A question mark icon

<diputree>
 <has>
  <l>
   <lt>question?</lt>
   <hasicon>
    <icon>
     <when>
      <closed/>
     </when>
     <hasimage>
      <uri>
       <s>../../images/quest.gif</s>
      </uri>
     </hasimage>
    </icon>
   </hasicon>
  </l>
 </has>
</diputree>

Explanation

<diputree>
 <has>
  <l>
   <lt>question?</lt>
   <hasicon>
    <icon>
     <when>
      <closed/>
     </when>

the hasimage relation between the icon and the uri

     <hasimage>
      <uri>
       <s>../../images/quest.gif</s>
      </uri>
     </hasimage>
    </icon>
   </hasicon>
  </l>
 </has>
</diputree>


An animated icon

<diputree>
 <has>
  <b>
   <lt>flap, flap ...</lt>
   <hasicon>
    <icon>
     <when>
      <closed/>
     </when>
     <hasimage>
      <uri>
       <s>../../images/folder.gif</s>
      </uri>
     </hasimage>
    </icon>
   </hasicon>
  </b>
 </has>
</diputree>

Explanation

<diputree>
 <has>
  <b>
   <lt>question?</lt>
   <hasicon>
    <icon>
     <when>
      <closed/>
     </when>

the hasimage relation between the icon and the uri

     <hasimage>
      <uri>
       <s>../../images/folder.gif</s>
      </uri>
     </hasimage>
    </icon>
   </hasicon>
  </b>
 </has>
</diputree>


No icon

<diputree>
 <has>
  <l>
   <lt>just some text!</lt>
   <hasicon>
    <none/>
   </hasicon>
  </l>
 </has>
</diputree>

Explanation

<diputree>
 <has>
  <l>
   <lt>just some text!</lt>

the hasicon relation between the leaf and none

   <hasicon>
    <none/>
   </hasicon>
  </l>
 </has>
</diputree>


diputree documentation © 2000 dipu