Difference between revisions of "Talk:CudaText API"
From Lazarus wiki
Jump to navigationJump to searchLine 2: | Line 2: | ||
=Proposed= | =Proposed= | ||
− | tree_proc( | + | tree_proc(id_tree, id_action, item, index, text, icon) |
− | Controls | + | Controls treeview-control. |
− | |||
− | |||
− | * | + | * Param id_tree is int handle of treeview. |
+ | * Param item is handle of treeview item. Can be 0 for invisible root-item, e.g. you can clear tree using root-item. | ||
− | Possible values of | + | Possible values of id_action: |
* TREE_ITEM_ENUM: Enumerates subitems of item. Param item. Gets list of subitem handles. | * TREE_ITEM_ENUM: Enumerates subitems of item. Param item. Gets list of subitem handles. | ||
Line 20: | Line 19: | ||
* TREE_ICON_DELETE: Deletes icon from imagelist (note: icons after this imagelist index will shift, will have new imagelist index). Param icon: index in imagelist (0..count-1). Gets bool: index existed before. | * TREE_ICON_DELETE: Deletes icon from imagelist (note: icons after this imagelist index will shift, will have new imagelist index). Param icon: index in imagelist (0..count-1). Gets bool: index existed before. | ||
− | |||
== Sidebar tabs == | == Sidebar tabs == |
Revision as of 03:33, 24 January 2016
Proposed
tree_proc(id_tree, id_action, item, index, text, icon)
Controls treeview-control.
- Param id_tree is int handle of treeview.
- Param item is handle of treeview item. Can be 0 for invisible root-item, e.g. you can clear tree using root-item.
Possible values of id_action:
- TREE_ITEM_ENUM: Enumerates subitems of item. Param item. Gets list of subitem handles.
- TREE_ITEM_ADD: Adds subitem as item's child. Param item. Param index: at which subitem index to insert (0..child_count-1), or -1 to append. Param text: caption of item. Param icon: index in imagelist or -1.
- TREE_ITEM_DELETE: Deletes item (with all subitems). Param item.
- TREE_ITEM_SET_NAME: Sets new item name. Params: item, text.
- TREE_ITEM_SET_ICON: Sets new item icon. Params: item, icon: index in imagelist.
- TREE_ICON_ADD: Adds icon to imagelist. Param text: path to png file. Gets imagelist index of new icon.
- TREE_ICON_DELETE: Deletes icon from imagelist (note: icons after this imagelist index will shift, will have new imagelist index). Param icon: index in imagelist (0..count-1). Gets bool: index existed before.
Sidebar tabs
- PROC_SIDEPANEL_ADD: Adds tab+control to sidebar. Text is ","-separated params: caption of tab, index of tab (0-based, -1 to add tab to end), type of control. Types of control allowed: "tree", "list". Gets bool: params ok, tab was added.
- PROC_SIDEPANEL_ACTIVATE: Activates tab in sidebar. Text is caption of tab. Gets bool: tab found/activated.
- PROC_SIDEPANEL_ENUM: Gets str, "\n"-separated captions of sidebar tabs.
- PROC_SIDEPANEL_GET_CONTROL: Gets int handle of control, associated with tab. Text is caption of tab. Gets None if cannot find tab.