Difference between revisions of "Talk:CudaText API"
From Lazarus wiki
Jump to navigationJump to searchLine 17: | Line 17: | ||
* TOOLBAR_SET_ICON_INDEX: Change icon index for one button. Params: | * TOOLBAR_SET_ICON_INDEX: Change icon index for one button. Params: | ||
− | ** index - button index | + | ** index - button index |
− | ** index2 - icon index ( | + | ** index2 - icon index (in toolbar's image list), or -1 for none |
* TOOLBAR_ADD_ICON: Add an icon (to toolbar's image list) from picture file (png). Params: text - picture filename (picture size must not be equal to current icon sizes). Gets icon index for new icon, or None if cannot add. | * TOOLBAR_ADD_ICON: Add an icon (to toolbar's image list) from picture file (png). Params: text - picture filename (picture size must not be equal to current icon sizes). Gets icon index for new icon, or None if cannot add. | ||
Line 29: | Line 29: | ||
** command - description of command of button. Can be: int_command, str(int_command), "py_module,method", "py_module,method,param". | ** command - description of command of button. Can be: int_command, str(int_command), "py_module,method", "py_module,method,param". | ||
** hint - hint/tooltip of button | ** hint - hint/tooltip of button | ||
− | ** index - icon index (in toolbar's image list) | + | ** index - icon index (in toolbar's image list), or -1 for none |
* TOOLBAR_ENUM: Enumaretes buttons. Gets list of dict, each dict item is: {"caption": str; "command": str; "hint": str}. | * TOOLBAR_ENUM: Enumaretes buttons. Gets list of dict, each dict item is: {"caption": str; "command": str; "hint": str}. |
Revision as of 21:36, 29 March 2017
(no text)
toolbar_proc (to do)
toolbar_proc(id_toolbar, id_action, text="", command="", hint="", index=-1, index2=-1)
Perform action on some toolbar.
Param id_toolbar: currently can be "top" for main toolbar. Function gets None, if id_toolbar not correct.
Param id_action possible values:
- TOOLBAR_GET_ICON_SIZES: Get sizes of icons, as 2-tuple (width, height).
- TOOLBAR_SET_ICON_SIZES: Set sizes of icons. Params:
- index - icon width
- index2 - icon height
- TOOLBAR_SET_ICON_INDEX: Change icon index for one button. Params:
- index - button index
- index2 - icon index (in toolbar's image list), or -1 for none
- TOOLBAR_ADD_ICON: Add an icon (to toolbar's image list) from picture file (png). Params: text - picture filename (picture size must not be equal to current icon sizes). Gets icon index for new icon, or None if cannot add.
- TOOLBAR_DELETE_ALL: Delete all buttons.
- TOOLBAR_DELETE_BUTTON: Delete one button. Params: index - button index.
- TOOLBAR_ADD_BUTTON: Add one button. Params:
- text - caption of button. Use "-" for separators.
- command - description of command of button. Can be: int_command, str(int_command), "py_module,method", "py_module,method,param".
- hint - hint/tooltip of button
- index - icon index (in toolbar's image list), or -1 for none
- TOOLBAR_ENUM: Enumaretes buttons. Gets list of dict, each dict item is: {"caption": str; "command": str; "hint": str}.