| 1 | namespace CascadeIDE.Services; |
| 2 | |
| 3 | /// <summary>Тема, layout UI, контролы, панель отладки (partial IdeCommands).</summary> |
| 4 | public static partial class IdeCommands |
| 5 | { |
| 6 | /// <summary>Снимок темы UI и лэйаута (включая resolved-ресурсы). returns: json.</summary> |
| 7 | public const string GetUiTheme = "get_ui_theme"; |
| 8 | /// <summary>Применить тему UI из JSON. args: theme:string; returns: text; example: {"theme":"{}"}.</summary> |
| 9 | public const string SetUiTheme = "set_ui_theme"; |
| 10 | /// <summary>Дерево UI по всем окнам верхнего уровня: JSON с массивом windows (role, window_type, title, is_active, root — то же дерево, что раньше для MainWindow). returns: json.</summary> |
| 11 | public const string GetUiLayout = "get_ui_layout"; |
| 12 | /// <summary>Цвета под курсором (прямые и effective). returns: json.</summary> |
| 13 | public const string GetColorsUnderCursor = "get_colors_under_cursor"; |
| 14 | /// <summary>Снимок внешнего вида контрола (под курсором или по имени). args: name?:string; returns: json; example: {"name":"BuildButton"}.</summary> |
| 15 | public const string GetControlAppearance = "get_control_appearance"; |
| 16 | /// <summary>Изменить раскладку/позицию контрола. args: name:string, layout:string; returns: text; example: {"name":"BuildButton","layout":"{}"}.</summary> |
| 17 | public const string SetControlLayout = "set_control_layout"; |
| 18 | /// <summary>Установить текст в контроле ввода. args: name:string, text:string; returns: text; example: {"name":"ChatInput","text":"hi"}.</summary> |
| 19 | public const string SetControlText = "set_control_text"; |
| 20 | /// <summary>Клик по кнопке (под курсором или по имени). args: name?:string; returns: text; example: {"name":"BuildButton"}.</summary> |
| 21 | public const string ClickControl = "click_control"; |
| 22 | /// <summary>Отправить хоткей в контрол. args: keys:string, name?:string; returns: text; example: {"keys":"Ctrl+S"}.</summary> |
| 23 | public const string SendKeys = "send_keys"; |
| 24 | /// <summary>Передать фокус контролу (под курсором или по имени). args: name?:string; returns: text; example: {"name":"Editor"}.</summary> |
| 25 | public const string SetFocus = "set_focus"; |
| 26 | /// <summary>Подсветить контрол рамкой в том окне, где он находится (главное, окно-хост Mfd и т.д.). args: name?:string; returns: text; example: {"name":"BuildButton"}.</summary> |
| 27 | public const string HighlightControl = "highlight_control"; |
| 28 | /// <summary>Изменить размер панели. args: panel:string, width?:integer, height?:integer; returns: text; example: {"panel":"terminal","height":300}.</summary> |
| 29 | public const string SetPanelSize = "set_panel_size"; |
| 30 | /// <summary>Список поддерживаемых языков подсветки редактора. returns: json.</summary> |
| 31 | public const string GetSupportedEditorLanguages = "get_supported_editor_languages"; |
| 32 | |
| 33 | /// <summary>Добавить контрол в UI (Debug). args: parent_name:string, control_type:string, content?:string, name?:string; returns: text; example: {"parent_name":"Root","control_type":"TextBlock","content":"Hi"}.</summary> |
| 34 | public const string AddControl = "add_control"; |
| 35 | } |
| 36 | |