Difference between revisions of "Talk:CudaText API"

From Free Pascal wiki
Jump to navigationJump to search
Line 3: Line 3:
 
===listbox_proc===
 
===listbox_proc===
  
  listbox_proc(id_listbox, id_action, index=0, text="")
+
  listbox_proc(id_listbox, id_action, index=0, text="", tag=0)
  
 
Perform action on listbox UI-control.
 
Perform action on listbox UI-control.
Line 12: Line 12:
 
Possible values of id_action:
 
Possible values of id_action:
  
* LISTBOX_ENUM: Enumerates items. Gets list of str, or None if empty.
+
* LISTBOX_GET_COUNT: Gets number if items.
* LISTBOX_ADD: Adds item. Param index: at which index to insert, or -1 to append. Param text.
+
* LISTBOX_ADD: Adds item (str) with associated tag (int). Param index: at which index to add, -1 to append.
 
* LISTBOX_DELETE: Deletes item. Param index.
 
* LISTBOX_DELETE: Deletes item. Param index.
 
* LISTBOX_DELETE_ALL: Deletes all items.
 
* LISTBOX_DELETE_ALL: Deletes all items.
* LISTBOX_SET: Sets item text. Params: index, text.
+
* LISTBOX_GET_ITEM: Gets item with given index as 2-tuple (str_text, int_tag), or None if index not correct.
 
+
* LISTBOX_SET_ITEM: Sets item with given index. Params: text, tag.
* LISTBOX_SELECT: Selects item. Param index, or -1 to remove selection.
+
* LISTBOX_GET_SEL:
* LISTBOX_GET_SELECTED: Gets index of selected item, or -1.
+
* LISTBOX_SET_SEL:  
 
+
* LISTBOX_GET_TOP:  
 +
* LISTBOX_SET_TOP:
 
* LISTBOX_LOCK: Disables repainting.
 
* LISTBOX_LOCK: Disables repainting.
 
* LISTBOX_UNLOCK: Enables repainting.
 
* LISTBOX_UNLOCK: Enables repainting.

Revision as of 21:47, 4 November 2016

todo

listbox_proc

listbox_proc(id_listbox, id_action, index=0, text="", tag=0)

Perform action on listbox UI-control.

  • Param id_listbox: int handle of listbox.
  • Param index: index of item (0-base).

Possible values of id_action:

  • LISTBOX_GET_COUNT: Gets number if items.
  • LISTBOX_ADD: Adds item (str) with associated tag (int). Param index: at which index to add, -1 to append.
  • LISTBOX_DELETE: Deletes item. Param index.
  • LISTBOX_DELETE_ALL: Deletes all items.
  • LISTBOX_GET_ITEM: Gets item with given index as 2-tuple (str_text, int_tag), or None if index not correct.
  • LISTBOX_SET_ITEM: Sets item with given index. Params: text, tag.
  • LISTBOX_GET_SEL:
  • LISTBOX_SET_SEL:
  • LISTBOX_GET_TOP:
  • LISTBOX_SET_TOP:
  • LISTBOX_LOCK: Disables repainting.
  • LISTBOX_UNLOCK: Enables repainting.