ListUpdateFont

From TrillWiki

Jump to: navigation, search

Change the font style and color for an item in the list.

Compatibility: 1.0 and higher

Contents

Syntax

plugin_send(MYGUID, "listUpdateFont", struct list_entry_t *);

Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.

Parameters

ListUpdateFont utilitizes the list_entry_t structure.

struct list_entry_t 
{
    unsigned int               struct_size;

    int                        num_left_icons;        
    struct list_bmp_t          *left_icons;

    int                        num_right_icons;        
    struct list_bmp_t          *right_icons;

    struct list_font_t         font;

    int                         section_id;
    int                         parent_id;
    int                         previous_id;
    int                         unique_id;

    int                         group;                
    int                         section;

    int                         drag_and_drop;
    int                         inline_editing;        
    int                         selectable;            
    int                         expanded;            
    int                         auto_expand;
    int                         no_group_icon;
    int                         no_double_click;
    int                         owner_drawn;
    int                         no_section_margins;
    
    int                         floating;
    int                         floating_x;
    int                         floating_y;

    char                        *tooltip;            
    char                        *text;                
    char                        *edit_string;
    char                        *real_name;

    void                        *data;                
    
    struct menu_entry_t         *menu_entry;

    ttkCallback                 callback;

    /* 2.0 
     */
    int                         inline_editing_quick;

    /* 3.0
     */
    int                         icon_mode;
    int                         icon_width;
    int                         icon_height;

    char                        *icon_name;
    char                        *panel;
};



unique_id
The list id that should be updated.
font
Fill the font structure how you want the item to look, see below for details.


Return Value

Negative value on error, 0 on success.

Remarks

None.



See also: listAddEntry

Additional Structures

list_font_t

 struct list_font_t { 
 	unsigned int   		struct_size; 
 
 	int			flags;  //0x00001 = skins 
 					//0x00010 = font file not the other stuff 
 
 	char   			*skin_name; 
 
 	HFONT   		font; 
 
 	//skin based 
 	char			*hover_fore; 
 	char			*hover_back; 
 	char			*select_fore; 
 	char			*select_back; 
 	char			*normal_fore; 
 	char			*normal_back; 
 
 	//nonskin based 
 	COLORREF  		hover_background; 
 	COLORREF  		hover_foreground; 
 	COLORREF  		select_background; 
 	COLORREF  		select_foreground; 
 	COLORREF  		background; 
 	COLORREF  		foreground; 
 
 }; 


flags
Specifies whether to use the skin based section (0x0001) or the non skin based section (0x0010).
skin_name
The name of the skin based font to use. This font is specified in the skin under the control section for the particular list control. It will specify the style and face to use.
font
If skin based fonts are not used, you can specify your own HFONT variable here.
hover_fore
If skin based fonts are used, you will mention the name of the hover_fore variable to use.
hover_back
If skin based fonts are used, you will mention the name of the hover_back variable to use.
Personal tools