IupTree - control

IUP - Portable User Interface

IupTree Callbacks

SELECTION_CB: Action generated when an element is selected or deselected. This action occurs when the user clicks with the mouse or uses the keyboard with the appropriate combination of keys.

int function(Ihandle *self, int id, int status) [in C]
elem:selection(id, status: number) -> (ret: number) [in IupLua3]
elem:selection_cb(id, status: number) -> (ret: number) [in IupLua5]

self: Identifier of the IupTree interacting with the user.
id: Node identifier.
status: 1 - node was selected, 0 - node was unselected.

This function must return IUP_IGNORE for the selected node not to be changed, or IUP_DEFAULT to change it.

BRANCHOPEN_CB: Action generated when a branch is expanded. This action occurs when the user clicks the "+" sign on the left of the branch, or when double clicks the branch image, or hits Enter on a collapsed branch.

int function(Ihandle *self, int id) [in C] 
elem:branchopen(id: number) -> (ret: number) [in IupLua3]
elem:branchopen_cb(id: number) -> (ret: number) [in IupLua5]

self: Identifier of the IupTree interacting with the user.
id: Node identifier.

This function must return IUP_IGNORE for the branch not to be opened, or IUP_DEFAULT for the branch to be opened.

BRANCHCLOSE_CB: Action generated when a branch is collapsed. This action occurs when the user clicks the "-" sign on the left of the branch, or when double clicks the branch image, or hits Enter on an expanded branch.

int function(Ihandle *self, int id); [in C]
elem:branchclose(id: number) -> (ret: number) [in IupLua3]
elem:branchclose_cb(id: number) -> (ret: number) [in IupLua5]

self: Identifier of the IupTree interacting with the user.
id: Identifier of the clicked node.

This function must return IUP_IGNORE for the branch not to be closed, or IUP_DEFAULT for the branch to be closed.

EXECUTELEAF_CB: Action generated when a leaf is to be executed. This action occurs when the user double clicks the leaf image, or hits Enter on a leaf.

int function(Ihandle *self, int id); [in C] 
elem:executeleaf(id: number) -> (ret: number) [in IupLua3]
elem:executeleaf_cb(id: number) -> (ret: number) [in IupLua5]

self: Identifier of the IupTree interacting with the user.
id: Identifier of the clicked node

RENAMENODE_CB: Action generated when a node is to be renamed. It occurs only when the user double clicks the text associated to a node (leaf or branch).

int function(Ihandle *self, int id, char *name); [in C]
elem:renamenode(id: number, name: string) -> (ret: number) [in IupLua3]
elem:renamenode_cb(id: number, name: string) -> (ret: number) [in IupLua5]

self: Identifier of the IupTree interacting with the user.
id: Identifier of the clicked node.
name: Name of the clicked node.

DRAGDROP_CB: Action generated when a drag & drop is executed. Only active if SHOWDRAGDROP=YES.

int function(Ihandle *self, int drag_id, int drop_id, int isshift, int iscontrol); [in C] 
elem:dragdrop(drag_id, drop_id, isshift, iscontrol: number) -> (ret: number) [in IupLua3]
elem:dragdrop_cb(drag_id, drop_id, isshift, iscontrol: number) -> (ret: number) [in IupLua5]

self: Identifier of the IupTree interacting with the user.
drag_id: Identifier of the clicked node where the drag start.
drop_id: Identifier of the clicked node where the drop were executed.
isshift: Boolean flag indicatinf the shift key state.
iscontrol: Boolean flag indicatinf the control key state.

RIGHTCLICK_CB: Action generated when the right mouse button is pressed over the IupTree.

int function(Ihandle *self, int id); [in C] 
elem:rightclick(id: number) -> (ret: number) [in IupLua3]
elem:rightclick_cb(id: number) -> (ret: number) [in IupLua5]

self: Identifier of the IupTree interacting with the user.
id: Identifier of the clicked node.


The canvas callback K_ANY if set will be called before the internal callback. The IupGetAttribute always returns the internal callback.

The canvas callbacks ACTION, SCROLL_CB, MAP_CB, RESIZE_CB and BUTTON_CB can not be changed. The other callbacks can be freely changed.

See IupCanvas.