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.

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.