Window
From TrillWiki
[edit] Window and Taskbaricon Code
Window code is what tells Trillian how to actually use the <component>s you define elsewhere. Taskbaricon defines the icon shown in the windows taskbar.
Contents |
[edit] XML Tree
The <window>s and <taskbaricon>s are defined in your main <trillian> level.
- <trillian>
- <window [attributes] />
- <taskbaricon [attributes] />
- </trillian>
[edit] Window
- <window type="" name="" source="" phase="" taskbar="" container_taskbar="" description="" />
| Attribute | Priority | Description, Possible Values |
| type | Required | contact list, privmsg, channel, console, container, template, file transfer inbound, file transfer outbound |
|---|---|---|
| name | Required | multiple, all, aim, icq, irc, msn, yahoo 2.0: jabber, etc. |
| source | Required | value found in a <component name="<name>"> |
| phase | Optional | value found in a phase button's <action name="setPhase" value="[phase]" /> |
| description | Optional | 0.7, 1.0: Name listed in prefs -> contact list -> layout 2.0: Name listed in right-click -> advanced options -> layout menu |
| layout | Optional | 2.0: yes,no - determines if the description is listed in advanced options -> layout |
| tabbed | Optional | 2.0: yes,no - indicates windows for tabbed containers |
| taskbar | Optional | taskbaricon to use. Also window's ClassName ( see below* ) |
| taskbar_basic | Optional | 3.0: taskbaricon to use if Trillian is in Basic mode. |
| container_taskbar | Optional | the button (icon) to be used in the container's taskbar NOTE: this is the name used by the taskbar icon switcher |
| container_taskbar_basic | Optional | 3.0: the button (icon) to be used in the container's taskbar if Trillian is in Basic mode |
[edit] Taskbar Icon
- <taskbaricon name="['taskbar' name]" file="[iconfilename]"/>
| Attribute | Priority | Description, Possible Values |
| name | Required | The name of the icon file |
|---|---|---|
| file | Required | The path and filename. This is in relation to the trillian.xml file (not the current file) |
Note, this name also corresponds to the window's ClassName ( see below* )
[edit] Windows ClassName
Note to programmers and skinners from Tometheus.
- The taskbar="" entry in the <window> code is what sets the name found with the windows API's GetClassName command. This makes it difficult to make third party programs that will work with all skins, using traditional methods, since different skinners use different names for these beasts. For example, with the contact list, Kid used 'icoTrilly', while MD uses 'trillian-icon'.
- Another difficulty is that skinners will use the same name for multiple types of windows. This means that it's sometimes impossible to find a window of a certain type (i.e. the contact list) from an external program using FindWindow(). For example, "icoTrilly" might find the contact list, a container, or a template window. Nemesis][ and I have already run into this problem.
- Thirdly, the types of names people use can make it hard to even tell if a window is a trillian window at all. For example, a person might simply use the name 'AIM' for all AIM windows, which gives no indication that it's a Trillian window and not a native AIM window. (If you really want to mess end-users up, name it 'progman' or 'Winamp v1.x' or something like that :) )
2003.10.11 For programmers, it is possible to find most windows if you put a little effort into it. Enumerate the trillian thread and look at all the first level child windows. For instance, look at the child windows to see if one has a child named 'iconholder' - this will find the contact list. If it's not a contact list and has 'list' child, then it's a channel. After those are filtered out, look at all the children that have 'display's (Or in Trillian 2.0+, look for "Unicode Trillian Window") and you can weed out the consoles from the message windows by looking at the names. Consoles always have the word 'console' in the name. (I'm not sure if this will last with the new medium SDK.) with all the remaining children, check if they contain a valid window as listed above - it's a container. The windows that are left are template windows, tooltips, alerts, etc.
See the Discussion page for additional comments on this topic.
(As a side note to the programmers, the main Trillian window can be found with the classname "trillian".)
