List dragCheck

From TrillWiki

Jump to: navigation, search

The list_dragCheck notification is sent to see whether a plugin supports dragging at all for a particular entry. This allows plugins to provide real time drag and drop support without having to limit their floating capability.

Compatibility: 2.0 and higher

Contents

Syntax

callback(int window_id, char *icontrol, "list_dragCheck", list_entry_t *data, void *userData);

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

List dragCheck 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 id of the list entry being dragged.
previous_id
The current entry previous id to the list entry being dragged.
parent_id
The current parent id of the list entry being dragged.
section_id
The section of the list entry being dragged.


Return Value

Must return 1 if the list entry can be moved, 0 otherwise.

Remarks

There are more checks that follow this notification, this is the preliminary notification to see if we should continue on with the other checks.


See also: list_dragFinish