IconHolder

From TrillWiki

Jump to: navigation, search

[edit] Medium Iconholder

The Iconholder is the control that holds the server connection icons on buddylist.

Contents


[edit] XML Tree

<trillian>
<prefs>
<control type="iconholder|menubar">...</control>
</prefs>
</trillian>

Note for plugin devs: "iconholder" is a specific type that is only used for one purpose. However, "menubar" is a generic type that is used for window menus, etc. Finding the correct <control>s for the 3.0's menubar based iconholder involves tedious work trying to find the correct menubars. (Look for all contact list <window>s, look for all <icontrol>s with the type="iconholder" in those windows. Find the <control>s referenced in their "source". Determine if they are type="menubar" ones or type="iconholder" ones.) A simpler brute-force method is to just search all controls and force your code in all menubar and iconholder controls and hope one is the right one. Using the name="" attribute is NOT a good way to identify the correct control since not all skins use the same names. For compatibility purposes, be sure to search for / add code to both "menubar" and "iconholder" controls. Also note, when inserting your code, that "iconholder" uses <icon>-based code, while "menubar" uses <background>-based switcher code.

[edit] Code

This is the code for the legacy iconholder. See below for the code for the new menubar-based iconholder

<control name="[name]" type="iconholder">
...
</control>

All the code for the icons is contained between these tags.

<icon name= "[medium]" type= "[status]" state= "[state]"><source name= "[ bitmap name ]" left="" right="" top="" bottom=""/></icon>

For each state of each status of each medium, you will need a version of the above line. This is when you begin to understand why coders are protective of their code. There can be up to 11 statuses (icons) for each medium, with 4 states (of the button - flat, hover, push and menu) for each of these statuses. All of this needs to be coded. Don't be put off by it though.

  1. It is very straightforward and repetetive: once you get the idea, it's just a case of filling in numbers.
  2. You can skip out statuses: medium specific statuses will be replaced with the away status if not coded.

Below is a table showing which statuses apply to which medium.

Status Name Needed ICQ MSN AIM Yahoo! IRC JABBER Novell Skype
online X X X X X X X X X
offline X X X X X X X X X
away X X X X X X X X X
maybe X
mixed X X X X X X X X
not available X X
invisible X X X X X X X
dnd X (pre 3.0) X X
do not disturb X* (3.0+)
idle X X X X X X
free for chat X
chat X
skype me X
occupied X
mail X X X X
busy X X X
on the phone X X
out to lunch X X
xa X
  • Note that the iconholder uses "do not disturb" for ICQ after Trillian 3.0, while the list control uses "DND"

Note: STIXE also supports the following mediums which we assume CS will create, but we have not listed here: Exchange, Sametime, SurfSimple, and !VibePhone. Refer to /stixe/elements/extras/<medium>.dtd if you wish to add support for these. Furthermore, third party medium plugins exist, such as: Sametime, EQIM, NETSEND, SILC, etc. Refer to their pages for required icons. (see the list of medium plugins)

Anything not marked as needed, if missed out, will be replaced with a blank spot. Each status has 4 states: flat, hover, push and menu. This corresponds to the mouse state with them, i.e. if the mouse is down then the state 'push' will be used, if the menu is up, then 'menu' will be used.

<color name="normal-back" red="" green="" blue=""/>

If DLLs have been removed by the user, the icons won't display. This colo(u)r statement is the colo(u)r that will fill the space that the icon would have been.

As a final note, if you have a non-rectangular shaped iconholder, mainregion code is availble for use.

[edit] Trillian 1.0

As of 1.0, you can add left and right arrows to 'scroll' the iconholder if the buddylist is made too short. These arrows are more icons, added as above, only they only have three states - no menu state. Include them as below (with the <source> tags):

<icon name= "left_arrow" type= "left_arrow" state= "" >
<icon name= "right_arrow" type= "right_arrow" state= "" >


[edit] Trillian 3.0

As of Trillian 3.0 the iconholder can now be menubar-based.

In the contact list window you call the icontrol exactly as the old iconholder, with type="iconholder".

The creation of the control to be used for it is in essence this: The main control is a menubar. The button-type setting references a resizeable-button control, which has a switcher named "icon" in it. NOTE: It's important to notice that the menubar iconholder uses <background>-based switcher code, unlike the <icon>-based code for the older-style "iconholder". However, the switcher's <background>s use the same names as the normal <icon>s

<control name="[name]" type="menubar">
<settings name="button-type" value="[button-name]"/>
<settings name="button-minx" value=""/><!-- 3.0 seems to be 4px off. -->
<settings name="button-maxx" value=""/>
<settings name="button-miny" value=""/>
<settings name="button-maxy" value=""/>
<settings name="button-spacing-x" value=""/>
<settings name="button-spacing-y" value=""/>
<!-- I can't get the following to work, but supposedly -->
<!-- 0 for horizontal, 1 for vertical -->
<settings name="button-direction" value="0"/>
<settings name="menu-direction" value="0"/>
</control>
<control name="[button-name]" type="resizeable-button">
<!-- normal resizeable-button background stuff -->
<icontrol source="[switcher-name]" name="icon" visible="1">
<!-- rect stuff -->
</icontrol>
</control>
<control name="[switcher-name]" type="switcher">
<!-- the following codes the icon for the pop-up menu
if the iconholder is too narrow. Like the arrows
in the 1.0 version -->
<background name="..." state="push">
<source name="" left= "" right="" top="" bottom=""/>
</background>
<!-- then all of the other mediums/states/types (see above) -->
<background name="YAHOO" state="push" type="mail">
<source name="" left="" right="" top="" bottom=""/>
</background>
</control>