Difference between revisions of "Talk:CudaText API"

From Lazarus wiki
Jump to navigationJump to search
(moved all to Main page)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
(no text)
 
  
== Dlg_proc (temp text) ==
 
 
===dlg_proc===
 
 
dlg_proc(id_dialog, id_action, prop="", index=-1, index2=-1)
 
 
Advanced work with dialogs. More advanced than dlg_custom(), e.g. dialogs can show as modal/nonmodal.
 
 
====Form properties====
 
 
* "cap": str: Caption of form.
 
* "x", "y": int: Position (screen coordinates), left/top.
 
* "w", "h": int: Size, width/height.
 
* "w_min", "w_max": int: Constraints for width, min/max value.
 
* "h_min", "h_max": int: Constraints for height, min/max value.
 
* "resize": bool: If on, allows form to resize.
 
 
====Control properties====
 
 
* "name": str: Optional word-like string, name of control, to find control later by name.
 
* "cap": str: Caption of control.
 
* "x", "y": int: Position (coordinates relative to dialog), left/top.
 
* "w", "h": int: Size, width/height.
 
* "en": bool: Enabled state.
 
* "vis": bool: Visible state.
 
* "font": str: Font props, in the form "font_name,int_font_size,int_font_color".
 
* "hint": str: Hint (tooltip) for mouse-over. Newlines must be "\r".
 
* "act": bool: Active state. For active control, change of value calls the event (on_dlg or custom callback). Buttons are active by default.
 
* "props": str: Advanced control-specific props. Described in dlg_custom.
 
* "items": str: Usually tab-separated items. Described in dlg_custom.
 
* "val": str: Value of control. Described in dlg_custom.
 
* "tag": str: Any string, set by plugin.
 
 
* "callback": str: If not empty, active control calls this callback instead of on_dlg event. Has one of forms:
 
** "module=mmm;cmd=nnn;" - to call method nnn (in class Command) in plugin mmm (mmm is usually subfolder in the "cudatext/py", but can be any module name)
 
** "mmm.nnn" - the same, to call method, short form
 
** "module=mmm;func=nnn;" - to call function nnn in root of module mmm
 

Latest revision as of 00:49, 16 April 2017