diff --git a/.gitignore b/.gitignore index 847c9c5..f18a461 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ Thumbs.db .cproject builtins imgui.ini +/.editor_settings \ No newline at end of file diff --git a/api.json b/api.json new file mode 100644 index 0000000..9b6be42 --- /dev/null +++ b/api.json @@ -0,0 +1,1957 @@ +{ + "groups": [ + { + "files": [ + { + "entries": [ + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "image_b64_decode", + "params": [ + { + "description": "", + "name": "data", + "type": "string" + }, + { + "description": "", + "name": "length", + "type": "number" + } + ], + "params_string": "data,length", + "returns": [ + { + "description": "Data", + "name": "decoded", + "type": "string" + } + ], + "summary": "ImageB64Decode", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "image_load_data", + "params": [ + { + "description": "", + "name": "filename", + "type": "string" + }, + { + "description": "", + "name": "data", + "type": "string" + }, + { + "description": "", + "name": "data_length", + "type": "number" + } + ], + "params_string": "filename,data,data_length", + "returns": [ + { + "description": "", + "name": "texture_id", + "type": "number" + }, + { + "description": "", + "name": "width", + "type": "number" + }, + { + "description": "", + "name": "height", + "type": "number" + } + ], + "summary": "ImageLoadData", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "image_load", + "params": [ + { + "description": "", + "name": "filename", + "type": "string" + } + ], + "params_string": "filename", + "returns": [ + { + "description": "", + "name": "texture_id", + "type": "number" + }, + { + "description": "", + "name": "width", + "type": "number" + }, + { + "description": "", + "name": "height", + "type": "number" + } + ], + "summary": "ImageLoad", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "add_line", + "params": [ + { + "description": "", + "name": "x1", + "type": "number" + }, + { + "description": "", + "name": "y1", + "type": "number" + }, + { + "description": "", + "name": "x2", + "type": "number" + }, + { + "description": "", + "name": "y2", + "type": "number" + }, + { + "description": "", + "name": "r", + "type": "number" + }, + { + "description": "", + "name": "g", + "type": "number" + }, + { + "description": "", + "name": "b", + "type": "number" + }, + { + "description": "", + "name": "a", + "type": "number" + } + ], + "params_string": "x1,y1,x2,y2,r,g,b,a", + "returns": [], + "summary": "DrawListAddLine", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "add_rect", + "params": [ + { + "description": "", + "name": "x1", + "type": "number" + }, + { + "description": "", + "name": "y1", + "type": "number" + }, + { + "description": "", + "name": "x2", + "type": "number" + }, + { + "description": "", + "name": "y2", + "type": "number" + }, + { + "description": "", + "name": "r", + "type": "number" + }, + { + "description": "", + "name": "g", + "type": "number" + }, + { + "description": "", + "name": "b", + "type": "number" + }, + { + "description": "", + "name": "a", + "type": "number" + }, + { + "description": "", + "name": "thickness", + "type": "number" + } + ], + "params_string": "x1,y1,x2,y2,r,g,b,a,thickness", + "returns": [], + "summary": "DrawListAddRect", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_display_size", + "params": [ + { + "description": "", + "name": "w", + "type": "number" + }, + { + "description": "", + "name": "h", + "type": "number" + } + ], + "params_string": "w,h", + "returns": [], + "summary": "SetDisplaySize", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_mouse_input", + "params": [ + { + "description": "", + "name": "x", + "type": "number" + }, + { + "description": "", + "name": "y", + "type": "number" + }, + { + "description": "", + "name": "down1", + "type": "number" + }, + { + "description": "", + "name": "down2", + "type": "number" + }, + { + "description": "", + "name": "down3", + "type": "number" + }, + { + "description": "", + "name": "wheel", + "type": "number" + } + ], + "params_string": "x,y,down1,down2,down3,wheel", + "returns": [], + "summary": "SetMouseInput", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_mouse_pos", + "params": [ + { + "description": "", + "name": "x", + "type": "number" + }, + { + "description": "", + "name": "y", + "type": "number" + } + ], + "params_string": "x,y", + "returns": [], + "summary": "SetMousePos", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_mouse_button", + "params": [ + { + "description": "", + "name": "index", + "type": "number" + }, + { + "description": "", + "name": "down", + "type": "number" + } + ], + "params_string": "index,down", + "returns": [], + "summary": "SetMouseButton", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_mouse_wheel", + "params": [ + { + "description": "", + "name": "wheel", + "type": "number" + } + ], + "params_string": "wheel", + "returns": [], + "summary": "SetMouseWheel", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_key_down", + "params": [ + { + "description": "", + "name": "key", + "type": "number" + }, + { + "description": "", + "name": "down", + "type": "boolean" + } + ], + "params_string": "key,down", + "returns": [], + "summary": "SetKeyDown", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_key_modifier_ctrl", + "params": [ + { + "description": "", + "name": "down", + "type": "boolean" + } + ], + "params_string": "down", + "returns": [], + "summary": "SetKeyModifierCtrl", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_key_modifier_shift", + "params": [ + { + "description": "", + "name": "down", + "type": "boolean" + } + ], + "params_string": "down", + "returns": [], + "summary": "SetKeyModifierShift", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_key_modifier_alt", + "params": [ + { + "description": "", + "name": "down", + "type": "boolean" + } + ], + "params_string": "down", + "returns": [], + "summary": "SetKeyModifierAlt", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_key_modifier_super", + "params": [ + { + "description": "", + "name": "down", + "type": "boolean" + } + ], + "params_string": "down", + "returns": [], + "summary": "SetKeyModifierSuper", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "add_input_character", + "params": [ + { + "description": "", + "name": "character", + "type": "string" + } + ], + "params_string": "character", + "returns": [], + "summary": "AddInputCharacter", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "add_input_characters", + "params": [ + { + "description": "", + "name": "characters", + "type": "string" + } + ], + "params_string": "characters", + "returns": [], + "summary": "AddInputCharacters", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "tree_node", + "params": [ + { + "description": "", + "name": "text", + "type": "string" + }, + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "text,flags", + "returns": [], + "summary": "TreeNode", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "tree_pop", + "params": [], + "returns": [], + "summary": "TreePop", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "push_id", + "params": [ + { + "description": "", + "name": "text", + "type": "string" + } + ], + "params_string": "text", + "returns": [], + "summary": "PushId", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "pop_id", + "params": [], + "returns": [], + "summary": "PopId", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "begin", + "params": [ + { + "description": "", + "name": "title", + "type": "string" + }, + { + "description": "", + "name": "is_open", + "type": "boolean" + }, + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "title,is_open,flags", + "returns": [ + { + "description": "", + "name": "result", + "type": "bool" + }, + { + "description": "", + "name": "is_open", + "type": "bool" + } + ], + "summary": "Begin", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end", + "params": [], + "returns": [], + "summary": "End", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_next_window_size", + "params": [ + { + "description": "", + "name": "width", + "type": "number" + }, + { + "description": "", + "name": "height", + "type": "number" + }, + { + "description": "", + "name": "cond", + "type": "number" + } + ], + "params_string": "width,height,cond", + "returns": [], + "summary": "SetNextWindowSize", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_next_window_pos", + "params": [ + { + "description": "", + "name": "x", + "type": "number" + }, + { + "description": "", + "name": "y", + "type": "number" + }, + { + "description": "", + "name": "cond", + "type": "number" + } + ], + "params_string": "x,y,cond", + "returns": [], + "summary": "SetNextWindowPos", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": true, + "name": "get_window_size", + "params": [], + "returns": [ + { + "description": "", + "name": "width", + "type": "number" + }, + { + "description": "", + "name": "height", + "type": "number" + } + ], + "summary": "GetWindowSize", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": true, + "name": "get_window_pos", + "params": [], + "returns": [ + { + "description": "", + "name": "x", + "type": "number" + }, + { + "description": "", + "name": "y", + "type": "number" + } + ], + "summary": "GetWindowPos", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "is_window_focused", + "params": [ + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "flags", + "returns": [ + { + "description": "", + "name": "focused", + "type": "boolean" + } + ], + "summary": "IsWindowFocused", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": true, + "name": "get_content_region_avail", + "params": [], + "returns": [ + { + "description": "", + "name": "x", + "type": "number" + }, + { + "description": "", + "name": "y", + "type": "number" + } + ], + "summary": "GetContentRegionAvail", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": true, + "name": "get_window_content_region_max", + "params": [], + "returns": [ + { + "description": "", + "name": "x", + "type": "number" + }, + { + "description": "", + "name": "y", + "type": "number" + } + ], + "summary": "GetWindowContentRegionMax", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "begin_child", + "params": [ + { + "description": "", + "name": "title", + "type": "string" + }, + { + "description": "", + "name": "width", + "type": "number" + }, + { + "description": "", + "name": "border", + "type": "number" + }, + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "title,width,border,flags", + "returns": [ + { + "description": "", + "name": "result", + "type": "bool" + } + ], + "summary": "BeginChild", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_child", + "params": [], + "returns": [], + "summary": "EndChild", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "begin_popup_context_item", + "params": [ + { + "description": "", + "name": "id", + "type": "string" + } + ], + "params_string": "id", + "returns": [ + { + "description": "", + "name": "result", + "type": "boolean" + } + ], + "summary": "BeginPopupContextItem", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "begin_popup", + "params": [ + { + "description": "", + "name": "id", + "type": "string" + }, + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "id,flags", + "returns": [ + { + "description": "", + "name": "result", + "type": "boolean" + } + ], + "summary": "BeginPopup", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "begin_popup_modal", + "params": [ + { + "description": "", + "name": "id", + "type": "string" + }, + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "id,flags", + "returns": [ + { + "description": "", + "name": "result", + "type": "boolean" + } + ], + "summary": "BeginPopupModal", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "open_popup", + "params": [ + { + "description": "", + "name": "id", + "type": "string" + }, + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "id,flags", + "returns": [ + { + "description": "", + "name": "result", + "type": "boolean" + } + ], + "summary": "OpenPopup", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "close_current_popup", + "params": [], + "returns": [], + "summary": "CloseCurrentPopup", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_popup", + "params": [], + "returns": [], + "summary": "EndPopup", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "begin_drag_drop_source", + "params": [ + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "flags", + "returns": [], + "summary": "BeginDragDropSource", + "tresult": "boolean result", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_drag_drop_source", + "params": [], + "returns": [], + "summary": "EndDragDropSource", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "begin_drag_drop_target", + "params": [], + "returns": [], + "summary": "BeginDragDropTarget", + "tresult": "boolean result", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_drag_drop_target", + "params": [], + "returns": [], + "summary": "EndDragDropTarget", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "set_drag_drop_payload", + "params": [ + { + "description": "", + "name": "type", + "type": "string" + }, + { + "description": "", + "name": "payload", + "type": "string" + } + ], + "params_string": "type,payload", + "returns": [], + "summary": "SetDragDropPayload", + "tresult": "boolean result", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "accept_drag_drop_payload", + "params": [ + { + "description": "", + "name": "type", + "type": "string" + }, + { + "description": "", + "name": "flags", + "type": "number" + } + ], + "params_string": "type,flags", + "returns": [], + "summary": "AcceptDragDropPayload", + "tresult": "string payload", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": false, + "name": "begin_combo", + "params": [ + { + "description": "", + "name": "label", + "type": "string" + }, + { + "description": "", + "name": "preview", + "type": "string" + } + ], + "params_string": "label,preview", + "returns": [], + "summary": "BeginCombo", + "tresult": "boolean result", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_combo", + "params": [], + "returns": [], + "summary": "EndCombo", + "usage": null + }, + { + "description": "", + "has_params": true, + "has_returns": true, + "name": "combo", + "params": [ + { + "description": "", + "name": "label", + "type": "string" + }, + { + "description": "", + "name": "current", + "type": "number" + }, + { + "description": "", + "name": "items", + "type": "table" + } + ], + "params_string": "label,current,items", + "returns": [ + { + "description": "", + "name": "result", + "type": "boolean" + }, + { + "description": "", + "name": "r", + "type": "numbe" + } + ], + "summary": "Combo", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "begin_table", + "params": [], + "returns": [], + "summary": "BeginTable", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_table", + "params": [], + "returns": [], + "summary": "EndTable", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "table_headers_row", + "params": [], + "returns": [], + "summary": "TableHeadersRow", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "table_setup_column", + "params": [], + "returns": [], + "summary": "TableSetupColumn", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "table_set_column_index", + "params": [], + "returns": [], + "summary": "TableSetColumnIndex", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "table_next_column", + "params": [], + "returns": [], + "summary": "TableNextColumn", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "table_next_row", + "params": [], + "returns": [], + "summary": "TableNextRow", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "table_setup_scroll_freeze", + "params": [], + "returns": [], + "summary": "TableSetupScrollFreeze", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "begin_tooltip", + "params": [], + "returns": [], + "summary": "BeginTooltip", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_tooltip", + "params": [], + "returns": [], + "summary": "EndTooltip", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "begin_tab_bar", + "params": [], + "returns": [], + "summary": "BeginTabBar", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_tab_bar", + "params": [], + "returns": [], + "summary": "EndTabBar", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "begin_tab_item", + "params": [], + "returns": [], + "summary": "BeginTabItem", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_tab_item", + "params": [], + "returns": [], + "summary": "EndTabItem", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "text", + "params": [], + "returns": [], + "summary": "Text", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "text_get_size", + "params": [], + "returns": [], + "summary": "TextGetSize", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "text_colored", + "params": [], + "returns": [], + "summary": "TextColored", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "input_text", + "params": [], + "returns": [], + "summary": "InputText", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "input_int", + "params": [], + "returns": [], + "summary": "InputInt", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "input_float", + "params": [], + "returns": [], + "summary": "InputFloat", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "input_double", + "params": [], + "returns": [], + "summary": "InputDouble", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "input_int4", + "params": [], + "returns": [], + "summary": "InputInt4", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "input_float3", + "params": [], + "returns": [], + "summary": "InputFloat3", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "input_float4", + "params": [], + "returns": [], + "summary": "InputFloat4", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "slider_float", + "params": [], + "returns": [], + "summary": "SliderFloat", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "selectable", + "params": [], + "returns": [], + "summary": "Selectable", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "button", + "params": [], + "returns": [], + "summary": "Button", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "button_image", + "params": [], + "returns": [], + "summary": "ButtonImage", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "checkbox", + "params": [], + "returns": [], + "summary": "Checkbox", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "radio_button", + "params": [], + "returns": [], + "summary": "RadioButton", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "begin_menu_bar", + "params": [], + "returns": [], + "summary": "BeginMenuBar", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_menu_bar", + "params": [], + "returns": [], + "summary": "EndMenuBar", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "begin_main_menu_bar", + "params": [], + "returns": [], + "summary": "BeginMainMenuBar", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_main_menu_bar", + "params": [], + "returns": [], + "summary": "EndMainMenuBar", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "begin_menu", + "params": [], + "returns": [], + "summary": "BeginMenu", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "end_menu", + "params": [], + "returns": [], + "summary": "EndMenu", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "menu_item", + "params": [], + "returns": [], + "summary": "MenuItem", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "same_line", + "params": [], + "returns": [], + "summary": "SameLine", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "new_line", + "params": [], + "returns": [], + "summary": "NewLine", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "bullet", + "params": [], + "returns": [], + "summary": "Bullet", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "indent", + "params": [], + "returns": [], + "summary": "Indent", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "unindent", + "params": [], + "returns": [], + "summary": "Unindent", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "spacing", + "params": [], + "returns": [], + "summary": "Spacing", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "separator", + "params": [], + "returns": [], + "summary": "Separator", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "get_cursor_screen_pos", + "params": [], + "returns": [], + "summary": "GetCursorScreenPos", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "plot_lines", + "params": [], + "returns": [], + "summary": "PlotLines", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "plot_histogram", + "params": [], + "returns": [], + "summary": "PlotHistogram", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "demo", + "params": [], + "returns": [], + "summary": "Demo", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "is_mouse_double_clicked", + "params": [], + "returns": [], + "summary": "IsMouseDoubleClicked", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "is_mouse_clicked", + "params": [], + "returns": [], + "summary": "IsMouseClicked", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "is_item_active", + "params": [], + "returns": [], + "summary": "IsItemActive", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "is_item_focused", + "params": [], + "returns": [], + "summary": "IsItemFocused", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "is_item_clicked", + "params": [], + "returns": [], + "summary": "IsItemClicked", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "is_item_double_clicked", + "params": [], + "returns": [], + "summary": "IsItemDoubleClicked", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "is_item_hovered", + "params": [], + "returns": [], + "summary": "IsItemHovered", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "get_item_rect_max", + "params": [], + "returns": [], + "summary": "GetItemRectMax", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_keyboard_focus_here", + "params": [], + "returns": [], + "summary": "SetKeyboardFocusHere", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "get_style", + "params": [], + "returns": [], + "summary": "GetStyle", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_style", + "params": [], + "returns": [], + "summary": "SetStyle", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_style_color", + "params": [], + "returns": [], + "summary": "SetStyleColor", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "push_style_color", + "params": [], + "returns": [], + "summary": "PushStyleColor", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "pop_style_color", + "params": [], + "returns": [], + "summary": "PopStyleColor", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_window_font_scale", + "params": [], + "returns": [], + "summary": "SetWindowFontScale", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_global_font_scale", + "params": [], + "returns": [], + "summary": "SetGlobalFontScale", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "scale_all_sizes", + "params": [], + "returns": [], + "summary": "ScaleAllSizes", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_cursor_pos", + "params": [], + "returns": [], + "summary": "SetCursorPos", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "push_item_width", + "params": [], + "returns": [], + "summary": "PushItemWidth", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "pop_item_width", + "params": [], + "returns": [], + "summary": "PopItemWidth", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_next_item_width", + "params": [], + "returns": [], + "summary": "SetNextItemWidth", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "calc_item_width", + "params": [], + "returns": [], + "summary": "CalcItemWidth", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_scroll_here_y", + "params": [], + "returns": [], + "summary": "SetScrollHereY", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "font_add_t_t_f_file", + "params": [], + "returns": [], + "summary": "FontAddTTFFile", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "font_add_t_t_f_data", + "params": [], + "returns": [], + "summary": "FontAddTTFData", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "font_push", + "params": [], + "returns": [], + "summary": "FontPush", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "font_pop", + "params": [], + "returns": [], + "summary": "FontPop", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "font_scale", + "params": [], + "returns": [], + "summary": "FontScale", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "get_frame_height", + "params": [], + "returns": [], + "summary": "GetFrameHeight", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "draw_line", + "params": [], + "returns": [], + "summary": "DrawLine", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "draw_rect", + "params": [], + "returns": [], + "summary": "DrawRect", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "draw_rect_filled", + "params": [], + "returns": [], + "summary": "DrawRectFilled", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "draw_progress_bar", + "params": [], + "returns": [], + "summary": "DrawProgressBar", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_rendering_enabled", + "params": [], + "returns": [], + "summary": "SetRenderingEnabled", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "want_capture_mouse", + "params": [], + "returns": [], + "summary": "WantCaptureMouse", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "want_capture_keyboard", + "params": [], + "returns": [], + "summary": "WantCaptureKeyboard", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "want_capture_text", + "params": [], + "returns": [], + "summary": "WantCaptureText", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_defaults", + "params": [], + "returns": [], + "summary": "SetDefaults", + "usage": null + }, + { + "description": "", + "has_params": false, + "has_returns": false, + "name": "set_ini_filename", + "params": [], + "returns": [], + "summary": "SetIniFilename", + "usage": null + } + ], + "filename": "imgui/src/extension_imgui.cpp", + "group": "src", + "module": "extension_imgui" + } + ], + "group": "src" + } + ] +} \ No newline at end of file diff --git a/api.md b/api.md new file mode 100644 index 0000000..302a593 --- /dev/null +++ b/api.md @@ -0,0 +1,884 @@ +# API reference + +* src + * [extension_imgui](#extension_imgui) + +# src + +## extension_imgui +*File: `imgui/src/extension_imgui.cpp`* + + + + +### image_b64_decode(data,length) +ImageB64Decode + + +PARAMS +* `data` [`string`] - +* `length` [`number`] - + +RETURNS +* `decoded` [`string`] - Data + + +### image_load_data(filename,data,data_length) +ImageLoadData + + +PARAMS +* `filename` [`string`] - +* `data` [`string`] - +* `data_length` [`number`] - + +RETURNS +* `texture_id` [`number`] - +* `width` [`number`] - +* `height` [`number`] - + + +### image_load(filename) +ImageLoad + + +PARAMS +* `filename` [`string`] - + +RETURNS +* `texture_id` [`number`] - +* `width` [`number`] - +* `height` [`number`] - + + +### add_line(x1,y1,x2,y2,r,g,b,a) +DrawListAddLine + + +PARAMS +* `x1` [`number`] - +* `y1` [`number`] - +* `x2` [`number`] - +* `y2` [`number`] - +* `r` [`number`] - +* `g` [`number`] - +* `b` [`number`] - +* `a` [`number`] - + + +### add_rect(x1,y1,x2,y2,r,g,b,a,thickness) +DrawListAddRect + + +PARAMS +* `x1` [`number`] - +* `y1` [`number`] - +* `x2` [`number`] - +* `y2` [`number`] - +* `r` [`number`] - +* `g` [`number`] - +* `b` [`number`] - +* `a` [`number`] - +* `thickness` [`number`] - + + +### set_display_size(w,h) +SetDisplaySize + + +PARAMS +* `w` [`number`] - +* `h` [`number`] - + + +### set_mouse_input(x,y,down1,down2,down3,wheel) +SetMouseInput + + +PARAMS +* `x` [`number`] - +* `y` [`number`] - +* `down1` [`number`] - +* `down2` [`number`] - +* `down3` [`number`] - +* `wheel` [`number`] - + + +### set_mouse_pos(x,y) +SetMousePos + + +PARAMS +* `x` [`number`] - +* `y` [`number`] - + + +### set_mouse_button(index,down) +SetMouseButton + + +PARAMS +* `index` [`number`] - +* `down` [`number`] - + + +### set_mouse_wheel(wheel) +SetMouseWheel + + +PARAMS +* `wheel` [`number`] - + + +### set_key_down(key,down) +SetKeyDown + + +PARAMS +* `key` [`number`] - +* `down` [`boolean`] - + + +### set_key_modifier_ctrl(down) +SetKeyModifierCtrl + + +PARAMS +* `down` [`boolean`] - + + +### set_key_modifier_shift(down) +SetKeyModifierShift + + +PARAMS +* `down` [`boolean`] - + + +### set_key_modifier_alt(down) +SetKeyModifierAlt + + +PARAMS +* `down` [`boolean`] - + + +### set_key_modifier_super(down) +SetKeyModifierSuper + + +PARAMS +* `down` [`boolean`] - + + +### add_input_character(character) +AddInputCharacter + + +PARAMS +* `character` [`string`] - + + +### add_input_characters(characters) +AddInputCharacters + + +PARAMS +* `characters` [`string`] - + + +### tree_node(text,flags) +TreeNode + + +PARAMS +* `text` [`string`] - +* `flags` [`number`] - + + +### tree_pop() +TreePop + + + +### push_id(text) +PushId + + +PARAMS +* `text` [`string`] - + + +### pop_id() +PopId + + + +### begin(title,is_open,flags) +Begin + + +PARAMS +* `title` [`string`] - +* `is_open` [`boolean`] - +* `flags` [`number`] - + +RETURNS +* `result` [`bool`] - +* `is_open` [`bool`] - + + +### end() +End + + + +### set_next_window_size(width,height,cond) +SetNextWindowSize + + +PARAMS +* `width` [`number`] - +* `height` [`number`] - +* `cond` [`number`] - + + +### set_next_window_pos(x,y,cond) +SetNextWindowPos + + +PARAMS +* `x` [`number`] - +* `y` [`number`] - +* `cond` [`number`] - + + +### get_window_size() +GetWindowSize + + +RETURNS +* `width` [`number`] - +* `height` [`number`] - + + +### get_window_pos() +GetWindowPos + + +RETURNS +* `x` [`number`] - +* `y` [`number`] - + + +### is_window_focused(flags) +IsWindowFocused + + +PARAMS +* `flags` [`number`] - + +RETURNS +* `focused` [`boolean`] - + + +### get_content_region_avail() +GetContentRegionAvail + + +RETURNS +* `x` [`number`] - +* `y` [`number`] - + + +### get_window_content_region_max() +GetWindowContentRegionMax + + +RETURNS +* `x` [`number`] - +* `y` [`number`] - + + +### begin_child(title,width,border,flags) +BeginChild + + +PARAMS +* `title` [`string`] - +* `width` [`number`] - +* `border` [`number`] - +* `flags` [`number`] - + +RETURNS +* `result` [`bool`] - + + +### end_child() +EndChild + + + +### begin_popup_context_item(id) +BeginPopupContextItem + + +PARAMS +* `id` [`string`] - + +RETURNS +* `result` [`boolean`] - + + +### begin_popup(id,flags) +BeginPopup + + +PARAMS +* `id` [`string`] - +* `flags` [`number`] - + +RETURNS +* `result` [`boolean`] - + + +### begin_popup_modal(id,flags) +BeginPopupModal + + +PARAMS +* `id` [`string`] - +* `flags` [`number`] - + +RETURNS +* `result` [`boolean`] - + + +### open_popup(id,flags) +OpenPopup + + +PARAMS +* `id` [`string`] - +* `flags` [`number`] - + +RETURNS +* `result` [`boolean`] - + + +### close_current_popup() +CloseCurrentPopup + + + +### end_popup() +EndPopup + + + +### begin_drag_drop_source(flags) +BeginDragDropSource + + +PARAMS +* `flags` [`number`] - + + +### end_drag_drop_source() +EndDragDropSource + + + +### begin_drag_drop_target() +BeginDragDropTarget + + + +### end_drag_drop_target() +EndDragDropTarget + + + +### set_drag_drop_payload(type,payload) +SetDragDropPayload + + +PARAMS +* `type` [`string`] - +* `payload` [`string`] - + + +### accept_drag_drop_payload(type,flags) +AcceptDragDropPayload + + +PARAMS +* `type` [`string`] - +* `flags` [`number`] - + + +### begin_combo(label,preview) +BeginCombo + + +PARAMS +* `label` [`string`] - +* `preview` [`string`] - + + +### end_combo() +EndCombo + + + +### combo(label,current,items) +Combo + + +PARAMS +* `label` [`string`] - +* `current` [`number`] - +* `items` [`table`] - + +RETURNS +* `result` [`boolean`] - +* `r` [`numbe`] - + + +### begin_table() +BeginTable + + + +### end_table() +EndTable + + + +### table_headers_row() +TableHeadersRow + + + +### table_setup_column() +TableSetupColumn + + + +### table_set_column_index() +TableSetColumnIndex + + + +### table_next_column() +TableNextColumn + + + +### table_next_row() +TableNextRow + + + +### table_setup_scroll_freeze() +TableSetupScrollFreeze + + + +### begin_tooltip() +BeginTooltip + + + +### end_tooltip() +EndTooltip + + + +### begin_tab_bar() +BeginTabBar + + + +### end_tab_bar() +EndTabBar + + + +### begin_tab_item() +BeginTabItem + + + +### end_tab_item() +EndTabItem + + + +### text() +Text + + + +### text_get_size() +TextGetSize + + + +### text_colored() +TextColored + + + +### input_text() +InputText + + + +### input_int() +InputInt + + + +### input_float() +InputFloat + + + +### input_double() +InputDouble + + + +### input_int4() +InputInt4 + + + +### input_float3() +InputFloat3 + + + +### input_float4() +InputFloat4 + + + +### slider_float() +SliderFloat + + + +### selectable() +Selectable + + + +### button() +Button + + + +### button_image() +ButtonImage + + + +### checkbox() +Checkbox + + + +### radio_button() +RadioButton + + + +### begin_menu_bar() +BeginMenuBar + + + +### end_menu_bar() +EndMenuBar + + + +### begin_main_menu_bar() +BeginMainMenuBar + + + +### end_main_menu_bar() +EndMainMenuBar + + + +### begin_menu() +BeginMenu + + + +### end_menu() +EndMenu + + + +### menu_item() +MenuItem + + + +### same_line() +SameLine + + + +### new_line() +NewLine + + + +### bullet() +Bullet + + + +### indent() +Indent + + + +### unindent() +Unindent + + + +### spacing() +Spacing + + + +### separator() +Separator + + + +### get_cursor_screen_pos() +GetCursorScreenPos + + + +### plot_lines() +PlotLines + + + +### plot_histogram() +PlotHistogram + + + +### demo() +Demo + + + +### is_mouse_double_clicked() +IsMouseDoubleClicked + + + +### is_mouse_clicked() +IsMouseClicked + + + +### is_item_active() +IsItemActive + + + +### is_item_focused() +IsItemFocused + + + +### is_item_clicked() +IsItemClicked + + + +### is_item_double_clicked() +IsItemDoubleClicked + + + +### is_item_hovered() +IsItemHovered + + + +### get_item_rect_max() +GetItemRectMax + + + +### set_keyboard_focus_here() +SetKeyboardFocusHere + + + +### get_style() +GetStyle + + + +### set_style() +SetStyle + + + +### set_style_color() +SetStyleColor + + + +### push_style_color() +PushStyleColor + + + +### pop_style_color() +PopStyleColor + + + +### set_window_font_scale() +SetWindowFontScale + + + +### set_global_font_scale() +SetGlobalFontScale + + + +### scale_all_sizes() +ScaleAllSizes + + + +### set_cursor_pos() +SetCursorPos + + + +### push_item_width() +PushItemWidth + + + +### pop_item_width() +PopItemWidth + + + +### set_next_item_width() +SetNextItemWidth + + + +### calc_item_width() +CalcItemWidth + + + +### set_scroll_here_y() +SetScrollHereY + + + +### font_add_t_t_f_file() +FontAddTTFFile + + + +### font_add_t_t_f_data() +FontAddTTFData + + + +### font_push() +FontPush + + + +### font_pop() +FontPop + + + +### font_scale() +FontScale + + + +### get_frame_height() +GetFrameHeight + + + +### draw_line() +DrawLine + + + +### draw_rect() +DrawRect + + + +### draw_rect_filled() +DrawRectFilled + + + +### draw_progress_bar() +DrawProgressBar + + + +### set_rendering_enabled() +SetRenderingEnabled + + + +### want_capture_mouse() +WantCaptureMouse + + + +### want_capture_keyboard() +WantCaptureKeyboard + + + +### want_capture_text() +WantCaptureText + + + +### set_defaults() +SetDefaults + + + +### set_ini_filename() +SetIniFilename + + + +--- + diff --git a/api_markdown.mtl b/api_markdown.mtl new file mode 100644 index 0000000..5b05424 --- /dev/null +++ b/api_markdown.mtl @@ -0,0 +1,46 @@ +# API reference + +{{#groups}} +* {{group}} +{{#files}} + * [{{#type}}{{type}}{{/type}}{{^type}}{{module}}{{/type}}](#{{#type}}{{type}}{{/type}}{{^type}}{{module}}{{/type}}) +{{/files}} +{{/groups}} + +{{#groups}} +# {{group}} + +{{#files}} +## {{#type}}{{type}}{{/type}}{{^type}}{{module}}{{/type}} +*File: `{{filename}}`* + +{{#file_summary}}{{file_summary}} {{/file_summary}}{{file_description}} +{{#usage}} + +```lua +{{{usage}}}```{{/usage}} + +{{#entries}} +{{#type}} +### {{type}}.{{name}}{{#field_type}} [`{{field_type}}`]{{/field_type}}{{^field}}({{params_string}}){{/field}} +{{/type}} +{{^type}} +### {{name}}{{#field_type}} [`{{field_type}}`]{{/field_type}}{{^field}}({{params_string}}){{/field}} +{{/type}} +{{#summary}}{{summary}} {{/summary}}{{description}} +{{#usage}}``` +{{{usage}}}```{{/usage}} +{{#has_params}} + +PARAMS +{{#params}}* `{{name}}` {{#type}}[`{{type}}`] {{/type}}- {{description}} +{{/params}}{{/has_params}}{{#has_returns}} +RETURNS +{{#returns}}* `{{name}}` {{#type}}[`{{type}}`] {{/type}}- {{description}} +{{/returns}}{{/has_returns}} + +{{/entries}} +--- + +{{/files}} +{{/groups}} \ No newline at end of file diff --git a/api_script.mtl b/api_script.mtl new file mode 100644 index 0000000..130dc88 --- /dev/null +++ b/api_script.mtl @@ -0,0 +1,38 @@ +- name: imgui + type: table + desc: Functions and constants for interacting with Dear ImGUI + + members: +{{#groups}} +{{#files}} +{{#entries}} +{{^field}} + - name: {{name}} + type: function + desc: {{#summary}}{{summary}} {{/summary}}{{description}} + {{#has_params}} + parameters: + {{#params}} + - name: {{name}} + type: {{type}} +{{#description}} desc: {{description}}{{/description}} + {{/params}} + {{/has_params}} + {{#has_returns}} + returns: + {{#returns}} + - name: {{name}} + type: {{type}} +{{#description}} desc: {{description}}{{/description}} + {{/returns}} + {{/has_returns}} +{{/field}} +{{#field}} + - name: {{name}} + type: number + desc: {{#summary}}{{summary}} {{/summary}}{{description}} +{{/field}} + +{{/entries}} +{{/files}} +{{/groups}} \ No newline at end of file diff --git a/generatedocs.py b/generatedocs.py new file mode 100755 index 0000000..b715499 --- /dev/null +++ b/generatedocs.py @@ -0,0 +1,305 @@ +#!/usr/bin/env python + +import os +import sys +import shutil +import json +import re +import codecs +import fnmatch +import pystache + + +def capitalize(s): + if len(s) == 0: return s + return s[0].upper() + s[1:] + +def is_cpp(filetype): + return filetype in ["cpp", "c", "h"] + +def is_lua(filetype): + return filetype in ["lua", "script", "gui_script", "render_script"] + +def render(data, templatefile, outfile): + with open(templatefile, 'r') as f: + template = f.read() + result = pystache.render(template, data) + with codecs.open(outfile, "wb", encoding="utf-8") as f: + f.write(result) + # f.write(html.unescape(result)) + + +def find_files(root_dir, file_pattern): + matches = [] + for root, dirnames, filenames in os.walk(root_dir): + for filename in filenames: + fullname = os.path.join(root, filename) + if fnmatch.fnmatch(filename, file_pattern): + matches.append(os.path.join(root, filename)) + matches.sort() + return matches + +# M.foobar = function +# function M.foobar +# local function foobar +# M.foobar = +# local foobar = +def get_lua_field_name(line): + m = re.match("(\w*)\.(\w*) = function.*", line) + if m: + return m.groups()[1] + m = re.match("function (\w*)\.(\w*)", line) + if m: + return m.groups()[1] + m = re.match("(\w*)\.(\w*) = .*", line) + if m: + return m.groups()[1] + m = re.match("local function (\w*)", line) + if m: + return m.groups()[0] + m = re.match("local (\w*) = .*", line) + if m: + return m.groups()[0] + return None + +# int SteamUserStats_RequestCurrentStats(lua_State* L) { +def get_cpp_field_name(line): + m = re.match(".*?\s+(.*?)\(.*\)", line) + if m: + return m.groups()[0] + return None + +def get_field_name(line, filetype): + if is_cpp(filetype): + return get_cpp_field_name(line) + elif is_lua(filetype): + return get_lua_field_name(line) + else: + return None + +def parse_param(line, param, original = None): + line = line.replace("@" + (param if not original else original) + " ", "") + param_name = line.split(' ', 1)[0] + param_desc = line.removeprefix(param_name).strip() + return { + "name": param_name, + "description": capitalize(param_desc), + "type": None if param == "param" else param + } + +def entry_start_token(filetype): + if is_lua(filetype): + return "--- " + elif is_cpp(filetype): + return "/** " + else: + return None + +def entry_line_token(filetype): + if is_lua(filetype): + return "--" + elif is_cpp(filetype): + return "*" + else: + return None + +def entry_end_token(filetype): + if is_lua(filetype): + return "" + elif is_cpp(filetype): + return "*/" + else: + return None + +def process_entry(line, lines, filetype): + entry = {} + line = line.replace(entry_start_token(filetype), "") + entry["summary"] = capitalize(line.strip()) + entry["description"] = "" + entry["usage"] = None + entry["params"] = [] + entry["returns"] = [] + while len(lines) > 0: + line = lines.pop(0).strip() + + # end of entry + # try to figure out name of entry (unless it has been explicitly set) + line_token = entry_line_token(filetype) + end_token = entry_end_token(filetype) + if len(end_token) > 0 and line.startswith(end_token): + line = lines.pop(0).strip() + if "name" not in entry: + entry["name"] = get_field_name(line, filetype) + break + elif not line.startswith(line_token): + if "name" not in entry: + entry["name"] = get_field_name(line, filetype) + break + + line = line[len(line_token):].strip() + + # generic parameter + if line.startswith("@param"): + entry["params"].append(parse_param(line, "param")) + + # typed parameter + elif line.startswith("@number"): + entry["params"].append(parse_param(line, "number")) + elif line.startswith("@string"): + entry["params"].append(parse_param(line, "string")) + elif line.startswith("@table"): + entry["params"].append(parse_param(line, "table")) + elif line.startswith("@function"): + entry["params"].append(parse_param(line, "function")) + elif line.startswith("@bool"): + entry["params"].append(parse_param(line, "boolean", original = "bool")) + elif line.startswith("@vec2"): + entry["params"].append(parse_param(line, "vec2")) + elif line.startswith("@vec3"): + entry["params"].append(parse_param(line, "vec3")) + elif line.startswith("@vec4"): + entry["params"].append(parse_param(line, "vec4")) + + # generic return + elif line.startswith("@return"): + line = line.replace("@return", "").strip() + m = re.match("(\w*?) (.*)", line) + if m: + return_name = m.groups()[0] + return_desc = m.groups()[1] + entry["returns"].append({ + "name": return_name, + "description": capitalize(return_desc) + }) + # typed return + elif line.startswith("@treturn"): + line = line.replace("@treturn", "").strip() + m = re.match("(\w+)\s*(\w+)\s*(.*)", line) + if m: + return_type = m.groups()[0] + return_name = m.groups()[1] + return_desc = m.groups()[2] + entry["returns"].append({ + "name": return_name, + "type": return_type, + "description": capitalize(return_desc) + }) + # typed parameter + elif line.startswith("@tparam"): + line = line.replace("@tparam", "").strip() + m = re.match("(\w+)\s*(\w+)\s*(.*)", line) + if m: + param_type = m.groups()[0] + param_name = m.groups()[1] + param_desc = m.groups()[2] + entry["params"].append({ + "name": param_name, + "type": param_type, + "description": capitalize(param_desc) + }) + elif line.startswith("@field"): + entry["field"] = True + m = re.match("\@field (.*)", line) + if m: + entry["field_type"] = m.groups()[0] + if not "name" in entry: + entry["name"] = m.groups()[0] + elif line.startswith("@name"): + line = line.replace("@name", "").strip() + entry["name"] = line + elif line.startswith("@usage"): + entry["usage"] = line.replace("@usage", "") + elif line.startswith("@"): + m = re.match("\@(\w*?) (.*)", line) + if m: + tag = m.groups()[0] + text = m.groups()[1] + entry[tag] = text + else: + print("Found unknown tag: " + line) + else: + if entry.get("usage") is not None: + entry["usage"] = entry["usage"] + line + "\n" + else: + entry["description"] = entry["description"] + line + " " + + has_params = len(entry["params"]) > 0 + if has_params: + params = [] + for p in entry["params"]: + params.append(p["name"]) + entry["params_string"] = ",".join(params) + + entry["has_params"] = has_params + entry["has_returns"] = len(entry["returns"]) > 0 + entry["description"] = capitalize(entry["description"].strip()) + return entry + + +def process_lines(lines, filetype): + print("Processing {}".format(filename)) + entries = [] + while len(lines) > 0: + line = lines.pop(0).strip() + if line.startswith(entry_start_token(filetype)): + entry = process_entry(line, lines, filetype) + entries.append(entry) + return entries + + +groups_lookup = {} + +directory = "imgui" + +for filetype in ["lua", "cpp"]: + + pattern = "*." + filetype + files = find_files(directory, pattern) + for filename in files: + with open(filename, encoding='utf-8', errors='ignore') as f: + lines = f.readlines() + file_description = None + first_line = lines.pop(0).strip() + if first_line.startswith(entry_start_token(filetype)): + file_description = process_entry(first_line, lines, filetype) + if not file_description: + file_description = {} + else: + file_description["file_summary"] = file_description["summary"] + file_description["file_description"] = file_description["description"] + file_description["summary"] = None + file_description["description"] = None + + file_entries = process_lines(lines, filetype) + if file_entries: + # components, events, info etc + if "group" not in file_description: + group_name = os.path.dirname(filename).replace(directory + "/", "") + file_description["group"] = group_name + if "module" not in file_description: + module = os.path.basename(filename).replace("." + filetype, "") + file_description["module"] = module + file_description["entries"] = file_entries + file_description["filename"] = filename + + group_name = file_description["group"] + if group_name not in groups_lookup: + groups_lookup[group_name] = { + "group": group_name, + "files": [] + } + groups_lookup[group_name]["files"].append(file_description) + + +groups = [] +for group_name in groups_lookup.keys(): + group = groups_lookup.get(group_name) + groups.append(group) + + +api = { "groups": groups } +with open("api.json", "w", encoding='utf-8') as f: + json.dump(api, f, indent=4, sort_keys=True) + +render(api, "api_markdown.mtl", "api.md") +render(api, "api_script.mtl", os.path.join(directory, "api", directory + ".script_api")) diff --git a/imgui/api/imgui.script_api b/imgui/api/imgui.script_api index 61167e4..331106a 100644 --- a/imgui/api/imgui.script_api +++ b/imgui/api/imgui.script_api @@ -1,1983 +1,898 @@ - name: imgui type: table - desc: Functions and constants for interacting with ImGUI APIs + desc: Functions and constants for interacting with Dear ImGUI members: + - name: image_b64_decode + type: function + desc: ImageB64Decode + parameters: + - name: data + type: string + - name: length + type: number -#***************************************************************************************************** -#***** DRAG AND DROP ********************************************************************************* -#***************************************************************************************************** + returns: + - name: decoded + type: string + desc: Data - - name: begin_dragdrop_source + - name: image_load_data type: function - + desc: ImageLoadData parameters: - - name: flags - type: number + - name: filename + type: string - return: - - name: result - type: bool + - name: data + type: string -#***************************************************************************************************** + - name: data_length + type: number - - name: end_dragdrop_source - type: function + returns: + - name: texture_id + type: number -#***************************************************************************************************** + - name: width + type: number - - name: begin_dragdrop_target + - name: height + type: number + + + - name: image_load type: function + desc: ImageLoad + parameters: + - name: filename + type: string - return: - - name: result - type: bool + returns: + - name: texture_id + type: number -#***************************************************************************************************** + - name: width + type: number - - name: end_dragdrop_target - type: function + - name: height + type: number -#***************************************************************************************************** - - name: set_dragdrop_payload + - name: add_line type: function - + desc: DrawListAddLine parameters: - - name: type - type: string + - name: x1 + type: number - - name: payload - type: string + - name: y1 + type: number - return: - - name: result - type: bool + - name: x2 + type: number -#***************************************************************************************************** + - name: y2 + type: number - - name: accept_dragdrop_payload - type: function + - name: r + type: number - parameters: - - name: type - type: string + - name: g + type: number - - name: flags - type: number + - name: b + type: number - return: - - name: payload - type: string + - name: a + type: number -#***************************************************************************************************** -#***** IMAGE **************************************************************************************** -#***************************************************************************************************** - - name: image_load + - name: add_rect type: function - + desc: DrawListAddRect parameters: - - name: filename - type: string - - return: - - name: imageid - type: number + - name: x1 + type: number -#***************************************************************************************************** + - name: y1 + type: number - - name: image_load_data - type: function + - name: x2 + type: number - parameters: - - name: imagename - type: string - - name: image_data - type: string - - name: image_data_len - type: number + - name: y2 + type: number - return: - - name: imageid - type: number + - name: r + type: number -#***************************************************************************************************** + - name: g + type: number - - name: image_get - type: function + - name: b + type: number - parameters: - - name: imagename - type: string + - name: a + type: number - return: - - name: imageid - type: number + - name: thickness + type: number -#***************************************************************************************************** - - name: image_free + - name: set_display_size type: function - + desc: SetDisplaySize parameters: - - name: imageid - type: number + - name: w + type: number -#***************************************************************************************************** + - name: h + type: number - - name: image_add - type: function + - name: set_mouse_input + type: function + desc: SetMouseInput parameters: - - name: imageid - type: number - - name: pixel_width - type: number - - name: pixel_height - type: number - - name: uv0x - type: number - - name: uv0y - type: number - - name: uv1x - type: number - - name: uv1y - type: number - -#***************************************************************************************************** + - name: x + type: number - - name: image_b64_decode - type: function + - name: y + type: number - parameters: - - name: image_data_base64 - type: string - - name: image_data_len - type: number + - name: down1 + type: number - return: - - name: image_data_raw - type: string + - name: down2 + type: number -#***************************************************************************************************** -#***** FONTS ***************************************************************************************** -#***************************************************************************************************** + - name: down3 + type: number - - name: font_add_ttf_file - type: function + - name: wheel + type: number + + - name: set_mouse_pos + type: function + desc: SetMousePos parameters: - - name: ttf_filename - type: string - - name: fontsize - type: number - - name: glyphranges - type: number + - name: x + type: number - return: - - name: fontid - type: number + - name: y + type: number -#***************************************************************************************************** - - name: font_add_ttf_data + - name: set_mouse_button type: function - + desc: SetMouseButton parameters: - - name: ttf_data - type: string - - name: ttf_data_size - type: number - - name: fontsize - type: number - - name: fontpixels - type: number - - name: glyphranges - type: number - - return: - - name: fontid - type: number - -#***************************************************************************************************** + - name: index + type: number + + - name: down + type: number - - name: font_push - type: function + - name: set_mouse_wheel + type: function + desc: SetMouseWheel parameters: - - name: fontid - type: number + - name: wheel + type: number -#***************************************************************************************************** - - name: font_pop + - name: set_key_down type: function + desc: SetKeyDown + parameters: + - name: key + type: number + - name: down + type: boolean -#***************************************************************************************************** - - name: font_scale + - name: set_key_modifier_ctrl type: function - + desc: SetKeyModifierCtrl parameters: - - name: fontid - type: number - - name: fontscale - type: number + - name: down + type: boolean -#***************************************************************************************************** - - name: get_frame_height + - name: set_key_modifier_shift type: function + desc: SetKeyModifierShift + parameters: + - name: down + type: boolean + - return: - - name: height - type: number + - name: set_key_modifier_alt + type: function + desc: SetKeyModifierAlt + parameters: + - name: down + type: boolean -#***************************************************************************************************** -#***** WINDOW **************************************************************************************** -#***************************************************************************************************** - - name: set_cursor_pos + - name: set_key_modifier_super type: function + desc: SetKeyModifierSuper + parameters: + - name: down + type: boolean + + - name: add_input_character + type: function + desc: AddInputCharacter parameters: - - name: x - type: number - - name: y - type: number + - name: character + type: string -#***************************************************************************************************** - - name: set_display_size + - name: add_input_characters type: function + desc: AddInputCharacters + parameters: + - name: characters + type: string + + - name: tree_node + type: function + desc: TreeNode parameters: - - name: width - type: number - - name: height - type: number + - name: text + type: string -#***************************************************************************************************** + - name: flags + type: number - - name: set_next_window_size + + - name: tree_pop type: function + desc: TreePop + - name: push_id + type: function + desc: PushId parameters: - - name: width - type: number - - name: height - type: number - - name: cond - type: number - optional: true + - name: text + type: string -#***************************************************************************************************** - - name: set_next_window_pos + - name: pop_id type: function + desc: PopId + - name: begin + type: function + desc: Begin parameters: - - name: x - type: number - - name: y - type: number - - name: cond - type: number - optional: true + - name: title + type: string -#***************************************************************************************************** + - name: is_open + type: boolean - - name: get_window_size - type: function + - name: flags + type: number - return: - - name: width - type: number - - name: height - type: number + returns: + - name: result + type: bool + - name: is_open + type: bool -#***************************************************************************************************** - - name: get_window_pos + - name: end type: function + desc: End - return: - - name: x - type: number - - name: y - type: number + - name: set_next_window_size + type: function + desc: SetNextWindowSize + parameters: + - name: width + type: number + - name: height + type: number -#***************************************************************************************************** + - name: cond + type: number - - name: begin_window - type: function + - name: set_next_window_pos + type: function + desc: SetNextWindowPos parameters: - - name: title - type: string - - name: open - type: boolean - - name: flags - type: number + - name: x + type: number + + - name: y + type: number - return: - - name: result - type: boolean - - name: isopen - type: boolean + - name: cond + type: number -#***************************************************************************************************** - - name: end_window + - name: get_window_size type: function + desc: GetWindowSize + returns: + - name: width + type: number -#***************************************************************************************************** + - name: height + type: number - - name: is_window_focused + + - name: get_window_pos type: function + desc: GetWindowPos + returns: + - name: x + type: number + - name: y + type: number + + + - name: is_window_focused + type: function + desc: IsWindowFocused parameters: - - name: flags - type: table + - name: flags + type: number - return: - - name: focused - type: boolean + returns: + - name: focused + type: boolean -#***************************************************************************************************** - name: get_content_region_avail type: function + desc: GetContentRegionAvail + returns: + - name: x + type: number - return: - - name: w - type: number - - name: h - type: number + - name: y + type: number -#***************************************************************************************************** - name: get_window_content_region_max type: function + desc: GetWindowContentRegionMax + returns: + - name: x + type: number - return: - - name: x - type: number - - name: y - type: number + - name: y + type: number -#***************************************************************************************************** - name: begin_child type: function - + desc: BeginChild parameters: - - name: title - type: string - - name: width - type: number - - name: height - type: number + - name: title + type: string - return: - - name: result - type: boolean + - name: width + type: number + - name: border + type: number + + - name: flags + type: number + + returns: + - name: result + type: bool -#***************************************************************************************************** - name: end_child type: function - -#***************************************************************************************************** -#***** COMBO ***************************************************************************************** -#***************************************************************************************************** + desc: EndChild - name: begin_popup_context_item type: function - + desc: BeginPopupContextItem parameters: - - name: id - type: string - - name: popup_flags - type: number + - name: id + type: string - return: - - name: result - type: boolean + returns: + - name: result + type: boolean -#***************************************************************************************************** - name: begin_popup type: function - + desc: BeginPopup parameters: - - name: id - type: string - - name: window_flags - type: number + - name: id + type: string + + - name: flags + type: number - return: - - name: result - type: boolean + returns: + - name: result + type: boolean -#***************************************************************************************************** - name: begin_popup_modal type: function - + desc: BeginPopupModal parameters: - - name: name - type: string - - name: window_flags - type: number + - name: id + type: string - return: - - name: result - type: boolean + - name: flags + type: number + + returns: + - name: result + type: boolean -#***************************************************************************************************** - name: open_popup type: function - + desc: OpenPopup parameters: - - name: id - type: string - - name: popup_flags - type: number + - name: id + type: string + + - name: flags + type: number + + returns: + - name: result + type: boolean -#***************************************************************************************************** - name: close_current_popup type: function - -#***************************************************************************************************** + desc: CloseCurrentPopup - name: end_popup type: function + desc: EndPopup -#***************************************************************************************************** -#***** COMBO ***************************************************************************************** -#***************************************************************************************************** - - - name: begin_combo + - name: begin_drag_drop_source type: function - + desc: BeginDragDropSource parameters: - - name: label - type: string - - name: preview - type: string + - name: flags + type: number - return: - - name: result - type: boolean - -#***************************************************************************************************** - - - name: end_combo + - name: end_drag_drop_source type: function + desc: EndDragDropSource - -#***************************************************************************************************** - - - name: combo + - name: begin_drag_drop_target type: function + desc: BeginDragDropTarget - parameters: - - name: label - type: string - - name: current - type: nummber - - name: items - type: table - - return: - - name: result - type: boolean - - name: current - type: number - -#***************************************************************************************************** -#***** TABLE ***************************************************************************************** -#***************************************************************************************************** - - - name: begin_table + - name: end_drag_drop_target type: function + desc: EndDragDropTarget + - name: set_drag_drop_payload + type: function + desc: SetDragDropPayload parameters: - - name: id - type: string - - name: column - type: number - - name: flags - type: number - - name: outer_size_x - type: number - - name: outer_size_y - type: number - - return: - - name: result - type: boolean - -#***************************************************************************************************** + - name: type + type: string - - name: end_table - type: function + - name: payload + type: string -#***************************************************************************************************** - - name: table_headers_row + - name: accept_drag_drop_payload type: function + desc: AcceptDragDropPayload + parameters: + - name: type + type: string + - name: flags + type: number -#***************************************************************************************************** - - name: table_setup_column + - name: begin_combo type: function - + desc: BeginCombo parameters: - - name: label - type: string - - name: flags - type: number - - name: init_width_or_weight - type: number + - name: label + type: string -#***************************************************************************************************** + - name: preview + type: string - - name: table_setup_scroll_freeze + + - name: end_combo type: function + desc: EndCombo + - name: combo + type: function + desc: Combo parameters: - - name: columns - type: number - - name: rows - type: number + - name: label + type: string -#***************************************************************************************************** + - name: current + type: number - - name: table_set_column_index - type: function + - name: items + type: table - parameters: - - name: column - type: number + returns: + - name: result + type: boolean + - name: r + type: numbe -#***************************************************************************************************** - - name: table_next_column + - name: begin_table type: function + desc: BeginTable -#***************************************************************************************************** - - - name: table_next_row + - name: end_table type: function + desc: EndTable -#***************************************************************************************************** -#***** TREE NODE ************************************************************************************* -#***************************************************************************************************** - - - name: tree_node + - name: table_headers_row type: function + desc: TableHeadersRow - parameters: - - name: text - type: string - - return: - - name: flags - type: number - -#***************************************************************************************************** - - - name: tree_pop + - name: table_setup_column type: function + desc: TableSetupColumn -#***************************************************************************************************** -#***** PUSH/POP ID *********************************************************************************** -#***************************************************************************************************** - - - name: push_id + - name: table_set_column_index type: function + desc: TableSetColumnIndex - parameters: - - name: text - type: string + - name: table_next_column + type: function + desc: TableNextColumn - - name: pop_id + - name: table_next_row type: function + desc: TableNextRow -#***************************************************************************************************** -#***** TOOLTIP *************************************************************************************** -#***************************************************************************************************** + - name: table_setup_scroll_freeze + type: function + desc: TableSetupScrollFreeze - name: begin_tooltip type: function - -#***************************************************************************************************** + desc: BeginTooltip - name: end_tooltip type: function - -#***************************************************************************************************** -#***** TAB BAR *************************************************************************************** -#***************************************************************************************************** + desc: EndTooltip - name: begin_tab_bar type: function - - parameters: - - name: id - type: string - - return: - - name: result - type: boolean - -#***************************************************************************************************** + desc: BeginTabBar - name: end_tab_bar type: function - -#***************************************************************************************************** + desc: EndTabBar - name: begin_tab_item type: function + desc: BeginTabItem - parameters: - - name: label - type: string - - name: open - type: boolean - - name: flags - type: number - - return: - - name: result - type: boolean - - name: open - type: boolean - -#***************************************************************************************************** -#***** COMPONENTS ************************************************************************************ -#***************************************************************************************************** + - name: end_tab_item + type: function + desc: EndTabItem - name: text type: function + desc: Text - parameters: - - name: text - type: string - -#***************************************************************************************************** + - name: text_get_size + type: function + desc: TextGetSize - name: text_colored type: function - - parameters: - - name: text - type: string - - name: Red - type: number - - name: Green - type: number - - name: Blue - type: number - - name: Alpha - type: number - -#***************************************************************************************************** + desc: TextColored - name: input_text type: function - - parameters: - - name: label - type: string - - name: text - type: string - - name: flags - type: number - - return: - - name: changed - type: boolean - -#***************************************************************************************************** + desc: InputText - name: input_int type: function - - parameters: - - name: label - type: string - - name: value - type: number - - return: - - name: changed - type: boolean - -#***************************************************************************************************** + desc: InputInt - name: input_float type: function + desc: InputFloat - parameters: - - name: label - type: string - - name: float - type: number - - name: step - type: number - - name: step_fast - type: number - - name: float_precision - type: number - - return: - - name: new_float - type: number - -#***************************************************************************************************** - - - name: input_float3 + - name: input_double type: function + desc: InputDouble - parameters: - - name: label - type: string - - name: v1 - type: number - - name: v2 - type: number - - name: v3 - type: number - - return: - - name: changed - type: boolean - - name: v1 - type: number - - name: v2 - type: number - - name: v3 - type: number - -#***************************************************************************************************** - - - name: input_float4 + - name: input_int4 type: function + desc: InputInt4 - parameters: - - name: label - type: string - - name: v1 - type: number - - name: v2 - type: number - - name: v3 - type: number - - name: v4 - type: number - - return: - - name: changed - type: boolean - - name: v1 - type: number - - name: v2 - type: number - - name: v3 - type: number - - name: v4 - type: number - -#***************************************************************************************************** - - - name: input_double + - name: input_float3 type: function + desc: InputFloat3 - parameters: - - name: label - type: string - - name: double - type: number - - name: step - type: number - - name: step_fast - type: number - - name: double_precision - type: number - - return: - - name: new_double - type: number - -#***************************************************************************************************** + - name: input_float4 + type: function + desc: InputFloat4 - name: slider_float type: function - - parameters: - - name: label - type: string - - name: float - type: number - - name: min - type: number - - name: max - type: number - - name: float_precision - type: number - - return: - - name: new_float - type: number - -#***************************************************************************************************** + desc: SliderFloat - name: selectable type: function - - parameters: - - name: text - type: string - - name: selected - type: boolean - - name: flags - type: number - - return: - - name: selected - type: boolean - - -#***************************************************************************************************** + desc: Selectable - name: button type: function - - parameters: - - name: text - type: string - - return: - - name: pushed - type: boolean - -#***************************************************************************************************** + desc: Button - name: button_image type: function - - parameters: - - name: imageid - type: number - - name: width(opt) - type: number - - name: height(opt) - type: number - - return: - - name: pushed - type: boolean - - -#***************************************************************************************************** + desc: ButtonImage - name: checkbox type: function - - parameters: - - name: text - type: string - - name: checked - type: boolean - - return: - - name: changed - type: boolean - - name: pushed - type: boolean - -#***************************************************************************************************** + desc: Checkbox - name: radio_button type: function - - parameters: - - name: text - type: string - - name: checked - type: boolean - - return: - - name: changed - type: boolean - - name: pushed - type: boolean - -#***************************************************************************************************** -#***** MENU BAR ************************************************************************************** -#***************************************************************************************************** + desc: RadioButton - name: begin_menu_bar type: function - - - returns: - - name: result - type: boolean - -#***************************************************************************************************** + desc: BeginMenuBar - name: end_menu_bar type: function - -#***************************************************************************************************** + desc: EndMenuBar - name: begin_main_menu_bar type: function - - - returns: - - name: result - type: boolean - -#***************************************************************************************************** + desc: BeginMainMenuBar - name: end_main_menu_bar type: function - -#***************************************************************************************************** + desc: EndMainMenuBar - name: begin_menu type: function - - - parameters: - - name: label - type: string - - - name: enabled - optional: true - type: bool - - - returns: - - name: result - type: boolean - -#***************************************************************************************************** + desc: BeginMenu - name: end_menu type: function - -#***************************************************************************************************** + desc: EndMenu - name: menu_item type: function + desc: MenuItem - - parameters: - - name: label - type: string - - - name: shortcut - type: string - optional: true - - - name: selected - type: boolean - optional: true - - - name: enabled - type: boolean - optional: true - - - returns: - - name: changed - type: boolean - - - name: selected - type: boolean - -#***************************************************************************************************** -#***** LAYOUT **************************************************************************************** -#***************************************************************************************************** - - - name: same_line - type: function - - parameters: - - name: offset - type: number - -#***************************************************************************************************** + - name: same_line + type: function + desc: SameLine - name: new_line type: function - -#***************************************************************************************************** + desc: NewLine - name: bullet type: function - -#***************************************************************************************************** + desc: Bullet - name: indent type: function - -#***************************************************************************************************** + desc: Indent - name: unindent type: function - -#***************************************************************************************************** + desc: Unindent - name: spacing type: function - -#***************************************************************************************************** + desc: Spacing - name: separator type: function - -#***************************************************************************************************** + desc: Separator - name: get_cursor_screen_pos type: function - - return: - - name: x - type: number - - name: y - type: number - - -#***************************************************************************************************** -#***** PRIMITIVES ************************************************************************************ -#***************************************************************************************************** - - - name: add_line - type: function - - parameters: - - name: x1 - type: number - - name: y1 - type: number - - name: x2 - type: number - - name: y2 - type: number - - name: r - type: number - - name: g - type: number - - name: b - type: number - - name: a - type: number - - name: thickness - type: number - -#***************************************************************************************************** - - - name: add_rect - type: function - - parameters: - - name: x1 - type: number - - name: y1 - type: number - - name: x2 - type: number - - name: y2 - type: number - - name: r - type: number - - name: g - type: number - - name: b - type: number - - name: a - type: number - - name: thickness - type: number - - -#***************************************************************************************************** -#***** PLOTS ***************************************************************************************** -#***************************************************************************************************** + desc: GetCursorScreenPos - name: plot_lines type: function - - parameters: - - name: label - type: string - - name: valueoffset - type: number - - name: width - type: number - - name: height - type: number - - name: plotdata - type: table - - -#***************************************************************************************************** + desc: PlotLines - name: plot_histogram type: function + desc: PlotHistogram - parameters: - - name: label - type: string - - name: valueoffset - type: number - - name: width - type: number - - name: height - type: number - - name: plotdata - type: table - -#***************************************************************************************************** - - - name: text_getsize - type: function - - return: - - name: textpixelsize - type: number - -#***************************************************************************************************** -#***** DRAWING *************************************************************************************** -#***************************************************************************************************** - - - name: draw_line - type: function - - parameters: - - name: x1 - type: number - - name: y1 - type: number - - name: x2 - type: number - - name: y2 - type: number - - name: color - type: number - -#***************************************************************************************************** - - - name: draw_rect - type: function - - parameters: - - name: x - type: number - - name: y - type: number - - name: width - type: number - - name: height - type: number - - name: color - type: number - -#***************************************************************************************************** - - - name: draw_rect_filled - type: function - - parameters: - - name: x - type: number - - name: y - type: number - - name: width - type: number - - name: height - type: number - - name: color - type: number - -#***************************************************************************************************** - - - name: draw_progress - type: function - - parameters: - - name: progress - type: number - - name: sizex - type: number - - name: sizey - type: number - -#***************************************************************************************************** - - - name: set_rendering_enabled - type: function - - parameters: - - name: enabled - type: boolean - -#***************************************************************************************************** -#***** INPUT ***************************************************************************************** -#***************************************************************************************************** - - - name: set_mouse_input - type: function - - parameters: - - name: x - type: number - - name: y - type: number - - name: mouse1 - type: number - - name: mouse2 - type: number - - name: mouse3 - type: number - - name: mousewheel - type: number - -#***************************************************************************************************** - - - name: set_mouse_button - type: function - - parameters: - - name: index - type: number - desc: one of imgui.MOUSEBUTTON_LEFT, imgui.MOUSEBUTTON_MIDDLE or imgui.MOUSEBUTTON_RIGHT - - name: state - type: number - -#***************************************************************************************************** - - - name: set_mouse_wheel - type: function - - parameters: - - name: mousewheel - type: number - -#***************************************************************************************************** - - - name: set_mouse_pos - type: function - - parameters: - - name: x - type: number - - name: y - type: number - -#***************************************************************************************************** - - - name: set_key_down - type: function - - parameters: - - name: keyid - type: number - - name: state - type: boolean - -#***************************************************************************************************** - - - name: set_key_modifier_ctrl - type: function - - parameters: - - name: state - type: boolean - -#***************************************************************************************************** - - - name: set_key_modifier_shift - type: function - - parameters: - - name: state - type: boolean - -#***************************************************************************************************** - - - name: set_key_modifier_alt - type: function - - parameters: - - name: state - type: boolean - -#***************************************************************************************************** - - - name: set_key_modifier_super - type: function - - parameters: - - name: state - type: boolean - -#***************************************************************************************************** - - - name: add_input_character - type: function - - parameters: - - name: character - type: string - -#***************************************************************************************************** - - - name: add_input_characters + - name: demo type: function - - parameters: - - name: characters - type: string - -#***************************************************************************************************** + desc: Demo - name: is_mouse_double_clicked type: function - - parameters: - - name: button - type: number - - return: - - name: clicked - type: boolean - -#***************************************************************************************************** - + desc: IsMouseDoubleClicked - name: is_mouse_clicked type: function - - parameters: - - name: button - type: number - - return: - - name: clicked - type: boolean - -#***************************************************************************************************** + desc: IsMouseClicked - name: is_item_active type: function - - return: - - name: active - type: boolean - -#***************************************************************************************************** + desc: IsItemActive - name: is_item_focused type: function - - return: - - name: focused - type: boolean - -#***************************************************************************************************** + desc: IsItemFocused - name: is_item_clicked type: function - - parameters: - - name: button - type: number - - return: - - name: clicked - type: boolean - -#***************************************************************************************************** + desc: IsItemClicked - name: is_item_double_clicked type: function - - parameters: - - name: button - type: number - - return: - - name: clicked - type: boolean - - -#***************************************************************************************************** + desc: IsItemDoubleClicked - name: is_item_hovered type: function - - return: - - name: hovered - type: boolean - -#***************************************************************************************************** + desc: IsItemHovered - name: get_item_rect_max type: function - - return: - - name: x - type: number - - name: y - type: number - -#***************************************************************************************************** + desc: GetItemRectMax - name: set_keyboard_focus_here type: function - - parameters: - - name: offset - type: number - -#***************************************************************************************************** -#***** STYLE ***************************************************************************************** -#***************************************************************************************************** - - - name: set_style - type: function - - parameters: - - name: style - type: table - -#***************************************************************************************************** + desc: SetKeyboardFocusHere - name: get_style type: function + desc: GetStyle - return: - - name: style - type: table - -#***************************************************************************************************** - - - name: set_style_window_rounding - type: function - - parameters: - - name: rounding - type: number - -#***************************************************************************************************** - - - name: set_style_window_bordersize - type: function - - parameters: - - name: bordersize - type: number - -#***************************************************************************************************** - - - name: set_style_child_bordersize - type: function - - parameters: - - name: bordersize - type: number - -#***************************************************************************************************** - - - name: set_style_frame_rounding - type: function - - parameters: - - name: rounding - type: number - -#***************************************************************************************************** - - - name: set_style_tab_rounding - type: function - - parameters: - - name: rounding - type: number - - -#***************************************************************************************************** - - - name: set_style_scrollbar_rounding - type: function - - parameters: - - name: rounding - type: number - -#***************************************************************************************************** - - - name: set_style_scrollbar_size + - name: set_style type: function - - parameters: - - name: size - type: number - -#***************************************************************************************************** + desc: SetStyle - name: set_style_color type: function - - parameters: - - name: style - type: number - - name: r - type: number - - name: g - type: number - - name: b - type: number - - name: a - type: number - -#***************************************************************************************************** + desc: SetStyleColor - name: push_style_color type: function - - parameters: - - name: color - type: number - - name: r - type: number - - name: g - type: number - - name: b - type: number - - name: a - type: number - -#***************************************************************************************************** + desc: PushStyleColor - name: pop_style_color type: function - - parameters: - - name: count - type: number - - -#***************************************************************************************************** - - - name: get_style_item_spacing - type: function - - return: - - name: x - type: number - - name: y - type: number - - -#***************************************************************************************************** + desc: PopStyleColor - name: set_window_font_scale type: function - - parameters: - - name: fontscale - type: number - -#***************************************************************************************************** + desc: SetWindowFontScale - name: set_global_font_scale type: function - - parameters: - - name: fontscale - type: number - - -#***************************************************************************************************** + desc: SetGlobalFontScale - name: scale_all_sizes type: function + desc: ScaleAllSizes - parameters: - - name: scale - type: number - -#***************************************************************************************************** -#***** ITEM WIDTH ************************************************************************************ -#***************************************************************************************************** + - name: set_cursor_pos + type: function + desc: SetCursorPos - name: push_item_width type: function - - parameters: - - name: width - type: number - -#***************************************************************************************************** + desc: PushItemWidth - name: pop_item_width type: function - -#***************************************************************************************************** + desc: PopItemWidth - name: set_next_item_width type: function - - parameters: - - name: width - type: number - -#***************************************************************************************************** + desc: SetNextItemWidth - name: calc_item_width type: function + desc: CalcItemWidth + + - name: set_scroll_here_y + type: function + desc: SetScrollHereY - return: - - name: width - type: number + - name: font_add_t_t_f_file + type: function + desc: FontAddTTFFile -#***************************************************************************************************** -#***** NAVIGATION ************************************************************************************ -#***************************************************************************************************** + - name: font_add_t_t_f_data + type: function + desc: FontAddTTFData - - name: set_scroll_here_y + - name: font_push type: function + desc: FontPush - parameters: - - name: center_y_ratio - type: number + - name: font_pop + type: function + desc: FontPop -#***************************************************************************************************** -#***** CAPTURE *************************************************************************************** -#***************************************************************************************************** + - name: font_scale + type: function + desc: FontScale - - name: want_mouse_input + - name: get_frame_height type: function + desc: GetFrameHeight - return: - - name: capture - type: boolean + - name: draw_line + type: function + desc: DrawLine + - name: draw_rect + type: function + desc: DrawRect - - name: want_keyboard_input + - name: draw_rect_filled type: function + desc: DrawRectFilled - return: - - name: capture - type: boolean + - name: draw_progress_bar + type: function + desc: DrawProgressBar + - name: set_rendering_enabled + type: function + desc: SetRenderingEnabled - - name: want_text_input + - name: want_capture_mouse type: function + desc: WantCaptureMouse - return: - - name: capture - type: boolean + - name: want_capture_keyboard + type: function + desc: WantCaptureKeyboard -#***************************************************************************************************** -#***** CONFIG **************************************************************************************** -#***************************************************************************************************** + - name: want_capture_text + type: function + desc: WantCaptureText - name: set_defaults type: function - -#***************************************************************************************************** + desc: SetDefaults - name: set_ini_filename type: function + desc: SetIniFilename - parameters: - - name: filename - type: string - -#***************************************************************************************************** - - - name: MOUSEBUTTON_LEFT - - name: MOUSEBUTTON_RIGHT - - name: MOUSEBUTTON_MIDDLE - - - name: SELECTABLE_DONT_CLOSE_POPUPS - - name: SELECTABLE_SPAN_ALL_COLUMNS - - name: SELECTABLE_ALLOW_DOUBLE_CLICK - - name: SELECTABLE_DISABLED - - name: SELECTABLE_ALLOW_ITEM_OVERLAP - - - name: TABITEM_UNSAVED_DOCUMENT - - name: TABITEM_SET_SELECTED - - name: TABITEM_NO_CLOSE_WITH_MIDDLE_MOUSE_BUTTON - - name: TABITEM_NO_PUSH_ID - - name: TABITEM_NO_TOOLTIP - - name: TABITEM_NO_REORDER - - name: TABITEM_LEADING - - name: TABITEM_TRAILING - - - name: FOCUSED_CHILD_WINDOWS - - name: FOCUSED_ROOT_WINDOW - - name: FOCUSED_ANY_WINDOW - - name: FOCUSED_ROOT_AND_CHILD_WINDOWS - - - name: TREENODE_SELECTED - - name: TREENODE_FRAMED - - name: TREENODE_ALLOW_ITEM_OVERLAP - - name: TREENODE_NO_TREE_PUSH_ON_OPEN - - name: TREENODE_NO_AUTO_OPEN_ON_LOG - - name: TREENODE_DEFAULT_OPEN - - name: TREENODE_OPEN_ON_DOUBLE_CLICK - - name: TREENODE_OPEN_ON_ARROW - - name: TREENODE_LEAF - - name: TREENODE_BULLET - - name: TREENODE_FRAME_PADDING - - name: TREENODE_SPAN_AVAILABLE_WIDTH - - name: TREENODE_SPAN_FULL_WIDTH - - name: TREENODE_NAV_LEFT_JUMPS_BACK_HERE - - - name: ImGuiCol_Text - - name: ImGuiCol_TextDisabled - - name: ImGuiCol_WindowBg - - name: ImGuiCol_ChildBg - - name: ImGuiCol_PopupBg - - name: ImGuiCol_Border - - name: ImGuiCol_BorderShadow - - name: ImGuiCol_FrameBg - - name: ImGuiCol_FrameBgHovered - - name: ImGuiCol_FrameBgActive - - name: ImGuiCol_TitleBg - - name: ImGuiCol_TitleBgActive - - name: ImGuiCol_TitleBgCollapsed - - name: ImGuiCol_MenuBarBg - - name: ImGuiCol_ScrollbarBg - - name: ImGuiCol_ScrollbarGrab - - name: ImGuiCol_ScrollbarGrabHovered - - name: ImGuiCol_ScrollbarGrabActive - - name: ImGuiCol_CheckMark - - name: ImGuiCol_SliderGrab - - name: ImGuiCol_SliderGrabActive - - name: ImGuiCol_Button - - name: ImGuiCol_ButtonHovered - - name: ImGuiCol_ButtonActive - - name: ImGuiCol_Header - - name: ImGuiCol_HeaderHovered - - name: ImGuiCol_HeaderActive - - name: ImGuiCol_Separator - - name: ImGuiCol_SeparatorHovered - - name: ImGuiCol_SeparatorActive - - name: ImGuiCol_ResizeGrip - - name: ImGuiCol_ResizeGripHovered - - name: ImGuiCol_ResizeGripActive - - name: ImGuiCol_Tab - - name: ImGuiCol_TabHovered - - name: ImGuiCol_TabActive - - name: ImGuiCol_TabUnfocused - - name: ImGuiCol_TabUnfocusedActive - - name: ImGuiCol_PlotLines - - name: ImGuiCol_PlotLinesHovered - - name: ImGuiCol_PlotHistogram - - name: ImGuiCol_PlotHistogramHovered - - name: ImGuiCol_TableHeaderBg - - name: ImGuiCol_TableBorderStrong - - name: ImGuiCol_TableBorderLight - - name: ImGuiCol_TableRowBg - - name: ImGuiCol_TableRowBgAlt - - name: ImGuiCol_TextSelectedBg - - name: ImGuiCol_DragDropTarget - - name: ImGuiCol_NavHighlight - - name: ImGuiCol_NavWindowingHighlight - - name: ImGuiCol_NavWindowingDimBg - - name: ImGuiCol_ModalWindowDimBg - - - name: TABLECOLUMN_NONE - - name: TABLECOLUMN_DEFAULTHIDE - - name: TABLECOLUMN_DEFAULTSORT - - name: TABLECOLUMN_WIDTHSTRETCH - - name: TABLECOLUMN_WIDTHFIXED - - name: TABLECOLUMN_NORESIZE - - name: TABLECOLUMN_NOREORDER - - name: TABLECOLUMN_NOHIDE - - name: TABLECOLUMN_NOCLIP - - name: TABLECOLUMN_NOSORT - - name: TABLECOLUMN_NOSORTASCENDING - - name: TABLECOLUMN_NOSORTDESCENDING - - name: TABLECOLUMN_NOHEADERWIDTH - - name: TABLECOLUMN_PREFERSORTASCENDING - - name: TABLECOLUMN_PREFERSORTDESCENDING - - name: TABLECOLUMN_INDENTENABLE - - name: TABLECOLUMN_INDENTDISABLE - - - name: WINDOWFLAGS_NONE - - name: WINDOWFLAGS_NOTITLEBAR - - name: WINDOWFLAGS_NORESIZE - - name: WINDOWFLAGS_NOMOVE - - name: WINDOWFLAGS_NOSCROLLBAR - - name: WINDOWFLAGS_NOSCROLLWITHMOUSE - - name: WINDOWFLAGS_NOCOLLAPSE - - name: WINDOWFLAGS_ALWAYSAUTORESIZE - - name: WINDOWFLAGS_NOBACKGROUND - - name: WINDOWFLAGS_NOSAVEDSETTINGS - - name: WINDOWFLAGS_NOMOUSEINPUTS - - name: WINDOWFLAGS_MENUBAR - - name: WINDOWFLAGS_HORIZONTALSCROLLBAR - - name: WINDOWFLAGS_NOFOCUSONAPPEARING - - name: WINDOWFLAGS_NOBRINGTOFRONTONFOCUS - - name: WINDOWFLAGS_ALWAYSVERTICALSCROLLBAR - - name: WINDOWFLAGS_ALWAYSHORIZONTALSCROLLBAR - - name: WINDOWFLAGS_ALWAYSUSEWINDOWPADDING - - name: WINDOWFLAGS_NONAVINPUTS - - name: WINDOWFLAGS_NONAVFOCUS - - name: WINDOWFLAGS_UNSAVEDDOCUMENT - - name: WINDOWFLAGS_NONAV - - name: WINDOWFLAGS_NODECORATION - - name: WINDOWFLAGS_NOINPUTS - - - name: POPUPFLAGS_NONE - - name: POPUPFLAGS_MOUSEBUTTONLEFT - - name: POPUPFLAGS_MOUSEBUTTONRIGHT - - name: POPUPFLAGS_MOUSEBUTTONMIDDLE - - name: POPUPFLAGS_MOUSEBUTTONMASK - - name: POPUPFLAGS_MOUSEBUTTONDEFAULT - - name: POPUPFLAGS_NOOPENOVEREXISTINGPOPUP - - name: POPUPFLAGS_NOOPENOVERITEMS - - name: POPUPFLAGS_ANYPOPUPID - - name: POPUPFLAGS_ANYPOPUPLEVEL - - name: POPUPFLAGS_ANYPOPUP - - - name: DROPFLAGS_NONE - - name: DROPFLAGS_SOURCENOPREVIEWTOOLTIP - - name: DROPFLAGS_SOURCENODISABLEHOVER - - name: DROPFLAGS_SOURCENOHOLDTOOPENOTHERS - - name: DROPFLAGS_SOURCEALLOWNULLID - - name: DROPFLAGS_SOURCEEXTERN - - name: DROPFLAGS_SOURCEAUTOEXPIREPAYLOAD - - name: DROPFLAGS_ACCEPTBEFOREDELIVERY - - name: DROPFLAGS_ACCEPTNODRAWDEFAULTRECT - - name: DROPFLAGS_ACCEPTNOPREVIEWTOOLTIP - - name: DROPFLAGS_ACCEPTPEEKONLY - - - name: TABLE_NONE - - name: TABLE_RESIZABLE - - name: TABLE_REORDERABLE - - name: TABLE_HIDEABLE - - name: TABLE_SORTABLE - - name: TABLE_NOSAVEDSETTINGS - - name: TABLE_CONTEXTMENUINBODY - - name: TABLE_ROWBG - - name: TABLE_BORDERSINNERH - - name: TABLE_BORDERSOUTERH - - name: TABLE_BORDERSINNERV - - name: TABLE_BORDERSOUTERV - - name: TABLE_BORDERSH - - name: TABLE_BORDERSV - - name: TABLE_BORDERSINNER - - name: TABLE_BORDERSOUTER - - name: TABLE_BORDERS - - name: TABLE_NOBORDERSINBODY - - name: TABLE_NOBORDERSINBODYUNTILRESIZE - - name: TABLE_SIZINGFIXEDFIT - - name: TABLE_SIZINGFIXEDSAME - - name: TABLE_SIZINGSTRETCHPROP - - name: TABLE_SIZINGSTRETCHSAME - - name: TABLE_NOHOSTEXTENDX - - name: TABLE_NOHOSTEXTENDY - - name: TABLE_NOKEEPCOLUMNSVISIBLE - - name: TABLE_PRECISEWIDTHS - - name: TABLE_NOCLIP - - name: TABLE_PADOUTERX - - name: TABLE_NOPADOUTERX - - name: TABLE_NOPADINNERX - - name: TABLE_SCROLLX - - name: TABLE_SCROLLY - - name: TABLE_SORTMULTI - - name: TABLE_SORTTRISTATE - - - name: INPUTFLAGS_NONE - - name: INPUTFLAGS_CHARSDECIMAL - - name: INPUTFLAGS_CHARSHEXADECIMAL - - name: INPUTFLAGS_CHARSUPPERCASE - - name: INPUTFLAGS_CHARSNOBLANK - - name: INPUTFLAGS_AUTOSELECTALL - - name: INPUTFLAGS_ENTERRETURNSTRUE - - name: INPUTFLAGS_CALLBACKCOMPLETION - - name: INPUTFLAGS_CALLBACKHISTORY - - name: INPUTFLAGS_CALLBACKALWAYS - - name: INPUTFLAGS_CALLBACKCHARFILTER - - name: INPUTFLAGS_ALLOWTABINPUT - - name: INPUTFLAGS_CTRLENTERFORNEWLINE - - name: INPUTFLAGS_NOHORIZONTALSCROLL - - name: INPUTFLAGS_ALWAYSOVERWRITE - - name: INPUTFLAGS_READONLY - - name: INPUTFLAGS_PASSWORD - - name: INPUTFLAGS_NOUNDOREDO - - name: INPUTFLAGS_CHARSSCIENTIFIC - - name: INPUTFLAGS_CALLBACKRESIZE - - name: INPUTFLAGS_CALLBACKEDIT - - name: INPUTFLAGS_ESCAPECLEARSALL - - - name: COND_NONE - - name: COND_ALWAYS - - name: COND_ONCE - - name: COND_FIRSTUSEEVER - - name: COND_APPEARING - - - name: DIR_NONE - - name: DIR_LEFT - - name: DIR_RIGHT - - name: DIR_UP - - name: DIR_DOWN - - - name: KEY_TAB - - name: KEY_LEFTARROW - - name: KEY_RIGHTARROW - - name: KEY_UPARROW - - name: KEY_DOWNARROW - - name: KEY_PAGEUP - - name: KEY_PAGEDOWN - - name: KEY_HOME - - name: KEY_END - - name: KEY_INSERT - - name: KEY_DELETE - - name: KEY_BACKSPACE - - name: KEY_SPACE - - name: KEY_ENTER - - name: KEY_ESCAPE - - name: KEY_KEYPADENTER - - name: KEY_A - - name: KEY_C - - name: KEY_V - - name: KEY_X - - name: KEY_Y - - name: KEY_Z - - - name: GLYPH_RANGES_DEFAULT - - name: GLYPH_RANGES_GREEK - - name: GLYPH_RANGES_KOREAN - - name: GLYPH_RANGES_JAPANESE - - name: GLYPH_RANGES_CHINESEFULL - - name: GLYPH_RANGES_CHINESESIMPLIFIEDCOMMON - - name: GLYPH_RANGES_CYRILLIC - - name: GLYPH_RANGES_THAI - - name: GLYPH_RANGES_VIETNAMESE diff --git a/imgui/src/extension_imgui.cpp b/imgui/src/extension_imgui.cpp index 7afae19..885ef4c 100644 --- a/imgui/src/extension_imgui.cpp +++ b/imgui/src/extension_imgui.cpp @@ -75,6 +75,12 @@ static void imgui_ClearGLError() // extern unsigned char *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp); // +/** ImageB64Decode + * @name image_b64_decode + * @string data + * @number length + * @treturn string decoded data + */ static int imgui_ImageB64Decode(lua_State *L) { DM_LUA_STACK_CHECK(L, 1); @@ -124,6 +130,16 @@ static int imgui_ImageInternalLoad(const char *filename, ImgObject *image) // Image handling needs to be smarter, but this will do for the time being. + +/** ImageLoadData + * @name image_load_data + * @string filename + * @string data + * @number data_length + * @treturn number texture_id + * @treturn number width + * @treturn number height + */ static int imgui_ImageLoadData(lua_State* L) { DM_LUA_STACK_CHECK(L, 3); @@ -172,6 +188,13 @@ static int imgui_ImageLoadData(lua_State* L) } // Image handling needs to be smarter, but this will do for the time being. +/** ImageLoad + * @name image_load + * @string filename + * @treturn number texture_id + * @treturn number width + * @treturn number height + */ static int imgui_ImageLoad(lua_State* L) { DM_LUA_STACK_CHECK(L, 3); @@ -282,6 +305,17 @@ static int imgui_ImageFree( lua_State *L ) // ----- PRIMITIVES ----------- // ---------------------------- +/** DrawListAddLine + * @name add_line + * @number x1 + * @number y1 + * @number x2 + * @number y2 + * @number r + * @number g + * @number b + * @number a + */ static int imgui_DrawListAddLine(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -305,6 +339,18 @@ static int imgui_DrawListAddLine(lua_State* L) return 0; } +/** DrawListAddRect + * @name add_rect + * @number x1 + * @number y1 + * @number x2 + * @number y2 + * @number r + * @number g + * @number b + * @number a + * @number thickness + */ static int imgui_DrawListAddRect(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -345,6 +391,11 @@ static void imgui_NewFrame() } } +/** SetDisplaySize + * @name set_display_size + * @number w + * @number h + */ static int imgui_SetDisplaySize(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -360,6 +411,15 @@ static int imgui_SetDisplaySize(lua_State* L) // ---------------------------- // ----- INPUT ---------------- // ---------------------------- +/** SetMouseInput + * @name set_mouse_input + * @number x + * @number y + * @number down1 + * @number down2 + * @number down3 + * @number wheel + */ static int imgui_SetMouseInput(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -385,6 +445,11 @@ static int imgui_SetMouseInput(lua_State* L) return 0; } +/** SetMousePos + * @name set_mouse_pos + * @number x + * @number y + */ static int imgui_SetMousePos(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -405,6 +470,11 @@ static int imgui_SetMousePos(lua_State* L) return 0; } +/** SetMouseButton + * @name set_mouse_button + * @number index + * @number down + */ static int imgui_SetMouseButton(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -413,6 +483,10 @@ static int imgui_SetMouseButton(lua_State* L) io.MouseDown[index] = luaL_checknumber(L, 2); return 0; } +/** SetMouseWheel + * @name set_mouse_wheel + * @number wheel + */ static int imgui_SetMouseWheel(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -420,6 +494,11 @@ static int imgui_SetMouseWheel(lua_State* L) io.MouseWheel += luaL_checknumber(L, 1); return 0; } +/** SetKeyDown + * @name set_key_down + * @number key + * @bool down + */ static int imgui_SetKeyDown(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -433,6 +512,10 @@ static int imgui_SetKeyDown(lua_State* L) // ---------------------------- // ----- KEY MODIFIERS -------- // ---------------------------- +/** SetKeyModifierCtrl + * @name set_key_modifier_ctrl + * @bool down + */ static int imgui_SetKeyModifierCtrl(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -440,6 +523,10 @@ static int imgui_SetKeyModifierCtrl(lua_State* L) io.KeyCtrl = lua_toboolean(L, 1); return 0; } +/** SetKeyModifierShift + * @name set_key_modifier_shift + * @bool down + */ static int imgui_SetKeyModifierShift(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -447,6 +534,10 @@ static int imgui_SetKeyModifierShift(lua_State* L) io.KeyShift = lua_toboolean(L, 1); return 0; } +/** SetKeyModifierAlt + * @name set_key_modifier_alt + * @bool down + */ static int imgui_SetKeyModifierAlt(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -454,6 +545,10 @@ static int imgui_SetKeyModifierAlt(lua_State* L) io.KeyAlt = lua_toboolean(L, 1); return 0; } +/** SetKeyModifierSuper + * @name set_key_modifier_super + * @bool down + */ static int imgui_SetKeyModifierSuper(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -466,6 +561,10 @@ static int imgui_SetKeyModifierSuper(lua_State* L) // ---------------------------- // ----- TEXT INPUT ----------- // ---------------------------- +/** AddInputCharacter + * @name add_input_character + * @string character + */ static int imgui_AddInputCharacter(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -475,6 +574,10 @@ static int imgui_AddInputCharacter(lua_State* L) io.AddInputCharacter(c); return 0; } +/** AddInputCharacters + * @name add_input_characters + * @string characters + */ static int imgui_AddInputCharacters(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -488,6 +591,11 @@ static int imgui_AddInputCharacters(lua_State* L) // ---------------------------- // ----- TREE ----------------- // ---------------------------- +/** TreeNode + * @name tree_node + * @string text + * @number flags + */ static int imgui_TreeNode(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -502,6 +610,10 @@ static int imgui_TreeNode(lua_State* L) lua_pushboolean(L, result); return 1; } + +/** TreePop + * @name tree_pop + */ static int imgui_TreePop(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -514,6 +626,10 @@ static int imgui_TreePop(lua_State* L) // ---------------------------- // ----- Push/Pop ID ---------- // ---------------------------- +/** PushId + * @name push_id + * @string text + */ static int imgui_PushId(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -524,6 +640,9 @@ static int imgui_PushId(lua_State* L) return 0; } +/** PopId + * @name pop_id + */ static int imgui_PopId(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -535,6 +654,14 @@ static int imgui_PopId(lua_State* L) // ---------------------------- // ----- WINDOW --------------- // ---------------------------- +/** Begin + * @name begin + * @string title + * @bool is_open + * @number flags + * @treturn bool result + * @treturn bool is_open + */ static int imgui_Begin(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -556,6 +683,9 @@ static int imgui_Begin(lua_State* L) lua_pushboolean(L, is_open); return 2; } +/** End + * @name end + */ static int imgui_End(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -563,6 +693,12 @@ static int imgui_End(lua_State* L) ImGui::End(); return 0; } +/** SetNextWindowSize + * @name set_next_window_size + * @number width + * @number height + * @number cond + */ static int imgui_SetNextWindowSize(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -577,6 +713,12 @@ static int imgui_SetNextWindowSize(lua_State* L) ImGui::SetNextWindowSize(ImVec2(width, height), cond); return 0; } +/** SetNextWindowPos + * @name set_next_window_pos + * @number x + * @number y + * @number cond + */ static int imgui_SetNextWindowPos(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -591,6 +733,11 @@ static int imgui_SetNextWindowPos(lua_State* L) ImGui::SetNextWindowPos(ImVec2(x, y), cond); return 0; } +/** GetWindowSize + * @name get_window_size + * @treturn number width + * @treturn number height + */ static int imgui_GetWindowSize(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -600,6 +747,11 @@ static int imgui_GetWindowSize(lua_State* L) lua_pushnumber(L, size.y); return 2; } +/** GetWindowPos + * @name get_window_pos + * @treturn number x + * @treturn number y + */ static int imgui_GetWindowPos(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -609,6 +761,11 @@ static int imgui_GetWindowPos(lua_State* L) lua_pushnumber(L, pos.y); return 2; } +/** IsWindowFocused + * @name is_window_focused + * @number flags + * @treturn boolean focused + */ static int imgui_IsWindowFocused(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -623,6 +780,11 @@ static int imgui_IsWindowFocused(lua_State* L) return 1; } +/** GetContentRegionAvail + * @name get_content_region_avail + * @treturn number x + * @treturn number y + */ static int imgui_GetContentRegionAvail(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -633,6 +795,11 @@ static int imgui_GetContentRegionAvail(lua_State* L) return 2; } +/** GetWindowContentRegionMax + * @name get_window_content_region_max + * @treturn number x + * @treturn number y + */ static int imgui_GetWindowContentRegionMax(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -646,6 +813,14 @@ static int imgui_GetWindowContentRegionMax(lua_State* L) // ---------------------------- // ----- CHILD WINDOW --------- // ---------------------------- +/** BeginChild + * @name begin_child + * @string title + * @number width + * @number border + * @number flags + * @treturn bool result + */ static int imgui_BeginChild(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -664,6 +839,9 @@ static int imgui_BeginChild(lua_State* L) return 1; } +/** EndChild + * @name end_child + */ static int imgui_EndChild(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -677,6 +855,11 @@ static int imgui_EndChild(lua_State* L) // ----- POPUP --------- // ---------------------------- +/** BeginPopupContextItem + * @name begin_popup_context_item + * @string id + * @treturn boolean result + */ static int imgui_BeginPopupContextItem(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -687,6 +870,12 @@ static int imgui_BeginPopupContextItem(lua_State* L) return 1; } +/** BeginPopup + * @name begin_popup + * @string id + * @number flags + * @treturn boolean result + */ static int imgui_BeginPopup(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -699,6 +888,12 @@ static int imgui_BeginPopup(lua_State* L) return 1; } +/** BeginPopupModal + * @name begin_popup_modal + * @string id + * @number flags + * @treturn boolean result + */ static int imgui_BeginPopupModal(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -711,6 +906,12 @@ static int imgui_BeginPopupModal(lua_State* L) return 1; } +/** OpenPopup + * @name open_popup + * @string id + * @number flags + * @treturn boolean result +*/ static int imgui_OpenPopup(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -722,6 +923,9 @@ static int imgui_OpenPopup(lua_State* L) return 0; } +/** CloseCurrentPopup + * @name close_current_popup + */ static int imgui_CloseCurrentPopup(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -730,6 +934,9 @@ static int imgui_CloseCurrentPopup(lua_State* L) return 0; } +/** EndPopup + * @name end_popup + */ static int imgui_EndPopup(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -741,6 +948,11 @@ static int imgui_EndPopup(lua_State* L) // ---------------------------- // ----- DRAG AND DROP -------- // ---------------------------- +/** BeginDragDropSource + * @name begin_drag_drop_source + * @number flags + * @tresult boolean result + */ static int imgui_BeginDragDropSource(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -754,6 +966,9 @@ static int imgui_BeginDragDropSource(lua_State* L) lua_pushboolean(L, result); return 1; } +/** EndDragDropSource + * @name end_drag_drop_source + */ static int imgui_EndDragDropSource(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -761,6 +976,10 @@ static int imgui_EndDragDropSource(lua_State* L) ImGui::EndDragDropSource(); return 0; } +/** BeginDragDropTarget + * @name begin_drag_drop_target + * @tresult boolean result + */ static int imgui_BeginDragDropTarget(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -769,6 +988,9 @@ static int imgui_BeginDragDropTarget(lua_State* L) lua_pushboolean(L, result); return 1; } +/** EndDragDropTarget + * @name end_drag_drop_target + */ static int imgui_EndDragDropTarget(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -777,6 +999,12 @@ static int imgui_EndDragDropTarget(lua_State* L) return 0; } +/** SetDragDropPayload + * @name set_drag_drop_payload + * @string type + * @string payload + * @tresult boolean result + */ static int imgui_SetDragDropPayload(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -788,6 +1016,12 @@ static int imgui_SetDragDropPayload(lua_State* L) lua_pushboolean(L, result); return 1; } +/** AcceptDragDropPayload + * @name accept_drag_drop_payload + * @string type + * @number flags + * @tresult string payload + */ static int imgui_AcceptDragDropPayload(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -811,6 +1045,12 @@ static int imgui_AcceptDragDropPayload(lua_State* L) // ---------------------------- // ----- COMBO --------- // ---------------------------- +/** BeginCombo + * @name begin_combo + * @string label + * @string preview + * @tresult boolean result + */ static int imgui_BeginCombo(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -821,6 +1061,9 @@ static int imgui_BeginCombo(lua_State* L) lua_pushboolean(L, result); return 1; } +/** EndCombo + * @name end_combo + */ static int imgui_EndCombo(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -828,6 +1071,14 @@ static int imgui_EndCombo(lua_State* L) ImGui::EndCombo(); return 0; } +/** Combo + * @name combo + * @string label + * @number current + * @table items + * @treturn boolean result + * @treturn number + */ static int imgui_Combo(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -861,6 +1112,9 @@ static int imgui_Combo(lua_State* L) // ---------------------------- // ----- TABLES --------- // ---------------------------- +/** BeginTable + * @name begin_table + */ static int imgui_BeginTable(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -882,6 +1136,9 @@ static int imgui_BeginTable(lua_State* L) lua_pushboolean(L, result); return 1; } +/** EndTable + * @name end_table + */ static int imgui_EndTable(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -889,6 +1146,9 @@ static int imgui_EndTable(lua_State* L) ImGui::EndTable(); return 0; } +/** TableHeadersRow + * @name table_headers_row + */ static int imgui_TableHeadersRow(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -896,6 +1156,9 @@ static int imgui_TableHeadersRow(lua_State* L) ImGui::TableHeadersRow(); return 0; } +/** TableSetupColumn + * @name table_setup_column + */ static int imgui_TableSetupColumn(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -914,6 +1177,9 @@ static int imgui_TableSetupColumn(lua_State* L) ImGui::TableSetupColumn(label, flags, weight); return 0; } +/** TableSetColumnIndex + * @name table_set_column_index + */ static int imgui_TableSetColumnIndex(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -922,6 +1188,9 @@ static int imgui_TableSetColumnIndex(lua_State* L) ImGui::TableSetColumnIndex(column); return 0; } +/** TableNextColumn + * @name table_next_column + */ static int imgui_TableNextColumn(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -929,6 +1198,9 @@ static int imgui_TableNextColumn(lua_State* L) ImGui::TableNextColumn(); return 0; } +/** TableNextRow + * @name table_next_row + */ static int imgui_TableNextRow(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -938,6 +1210,9 @@ static int imgui_TableNextRow(lua_State* L) } +/** TableSetupScrollFreeze + * @name table_setup_scroll_freeze + */ static int imgui_TableSetupScrollFreeze(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -952,6 +1227,9 @@ static int imgui_TableSetupScrollFreeze(lua_State* L) // ---------------------------- // ----- TOOLTIP --------- // ---------------------------- +/** BeginTooltip + * @name begin_tooltip + */ static int imgui_BeginTooltip(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -959,6 +1237,9 @@ static int imgui_BeginTooltip(lua_State* L) ImGui::BeginTooltip(); return 0; } +/** EndTooltip + * @name end_tooltip + */ static int imgui_EndTooltip(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -971,6 +1252,9 @@ static int imgui_EndTooltip(lua_State* L) // ---------------------------- // ----- TAB BAR --------- // ---------------------------- +/** BeginTabBar + * @name begin_tab_bar + */ static int imgui_BeginTabBar(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -980,6 +1264,9 @@ static int imgui_BeginTabBar(lua_State* L) lua_pushboolean(L, result); return 1; } +/** EndTabBar + * @name end_tab_bar + */ static int imgui_EndTabBar(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -987,6 +1274,9 @@ static int imgui_EndTabBar(lua_State* L) ImGui::EndTabBar(); return 0; } +/** BeginTabItem + * @name begin_tab_item + */ static int imgui_BeginTabItem(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1011,6 +1301,9 @@ static int imgui_BeginTabItem(lua_State* L) lua_pushboolean(L, open); return 2; } +/** EndTabItem + * @name end_tab_item + */ static int imgui_EndTabItem(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1024,6 +1317,9 @@ static int imgui_EndTabItem(lua_State* L) // ----- WIDGETS --------- // ---------------------------- +/** Text + * @name text + */ static int imgui_Text(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1039,6 +1335,9 @@ static int imgui_Text(lua_State* L) return 0; } +/** TextGetSize + * @name text_get_size + */ static int imgui_TextGetSize(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1058,6 +1357,9 @@ static int imgui_TextGetSize(lua_State* L) return 2; } +/** TextColored + * @name text_colored + */ static int imgui_TextColored(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1072,6 +1374,9 @@ static int imgui_TextColored(lua_State* L) return 0; } +/** InputText + * @name input_text + */ static int imgui_InputText(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1097,6 +1402,9 @@ static int imgui_InputText(lua_State* L) return 2; } +/** InputInt + * @name input_int + */ static int imgui_InputInt(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1116,6 +1424,9 @@ static int imgui_InputInt(lua_State* L) return 2; } +/** InputFloat + * @name input_float + */ static int imgui_InputFloat(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1156,6 +1467,9 @@ static int imgui_InputFloat(lua_State* L) return 2; } +/** InputDouble + * @name input_double + */ static int imgui_InputDouble(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1196,6 +1510,9 @@ static int imgui_InputDouble(lua_State* L) return 2; } +/** InputInt4 + * @name input_int4 + */ static int imgui_InputInt4(lua_State* L) { DM_LUA_STACK_CHECK(L, 5); @@ -1227,6 +1544,9 @@ static int imgui_InputInt4(lua_State* L) } +/** InputFloat3 + * @name input_float3 + */ static int imgui_InputFloat3(lua_State* L) { DM_LUA_STACK_CHECK(L, 4); @@ -1254,6 +1574,9 @@ static int imgui_InputFloat3(lua_State* L) return 4; } +/** InputFloat4 + * @name input_float4 + */ static int imgui_InputFloat4(lua_State* L) { DM_LUA_STACK_CHECK(L, 5); @@ -1284,6 +1607,9 @@ static int imgui_InputFloat4(lua_State* L) return 5; } +/** SliderFloat + * @name slider_float + */ static int imgui_SliderFloat(lua_State* L) { imgui_NewFrame(); @@ -1314,6 +1640,9 @@ static int imgui_SliderFloat(lua_State* L) } +/** Selectable + * @name selectable + */ static int imgui_Selectable(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1330,6 +1659,9 @@ static int imgui_Selectable(lua_State* L) return 1; } +/** Button + * @name button + */ static int imgui_Button(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1351,6 +1683,9 @@ static int imgui_Button(lua_State* L) return 1; } +/** ButtonImage + * @name button_image + */ static int imgui_ButtonImage(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1372,6 +1707,9 @@ static int imgui_ButtonImage(lua_State* L) return 1; } +/** Checkbox + * @name checkbox + */ static int imgui_Checkbox(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1384,6 +1722,9 @@ static int imgui_Checkbox(lua_State* L) return 2; } +/** RadioButton + * @name radio_button + */ static int imgui_RadioButton(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1396,6 +1737,9 @@ static int imgui_RadioButton(lua_State* L) return 2; } +/** BeginMenuBar + * @name begin_menu_bar + */ static int imgui_BeginMenuBar(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1407,6 +1751,9 @@ static int imgui_BeginMenuBar(lua_State* L) return 1; } +/** EndMenuBar + * @name end_menu_bar + */ static int imgui_EndMenuBar(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1417,6 +1764,9 @@ static int imgui_EndMenuBar(lua_State* L) return 0; } +/** BeginMainMenuBar + * @name begin_main_menu_bar + */ static int imgui_BeginMainMenuBar(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1428,6 +1778,9 @@ static int imgui_BeginMainMenuBar(lua_State* L) return 1; } +/** EndMainMenuBar + * @name end_main_menu_bar + */ static int imgui_EndMainMenuBar(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1438,6 +1791,9 @@ static int imgui_EndMainMenuBar(lua_State* L) return 0; } +/** BeginMenu + * @name begin_menu + */ static int imgui_BeginMenu(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1456,6 +1812,9 @@ static int imgui_BeginMenu(lua_State* L) return 1; } +/** EndMenu + * @name end_menu + */ static int imgui_EndMenu(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1466,6 +1825,9 @@ static int imgui_EndMenu(lua_State* L) return 0; } +/** MenuItem + * @name menu_item + */ static int imgui_MenuItem(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1490,6 +1852,9 @@ static int imgui_MenuItem(lua_State* L) // ---------------------------- // ----- LAYOUT --------- // ---------------------------- +/** SameLine + * @name same_line + */ static int imgui_SameLine(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1503,6 +1868,9 @@ static int imgui_SameLine(lua_State* L) ImGui::SameLine(offset); return 0; } +/** NewLine + * @name new_line + */ static int imgui_NewLine(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1511,6 +1879,9 @@ static int imgui_NewLine(lua_State* L) return 0; } +/** Bullet + * @name bullet + */ static int imgui_Bullet(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1519,6 +1890,9 @@ static int imgui_Bullet(lua_State* L) return 0; } +/** Indent + * @name indent + */ static int imgui_Indent(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1527,6 +1901,9 @@ static int imgui_Indent(lua_State* L) return 0; } +/** Unindent + * @name unindent + */ static int imgui_Unindent(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1535,6 +1912,9 @@ static int imgui_Unindent(lua_State* L) return 0; } +/** Spacing + * @name spacing + */ static int imgui_Spacing(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1543,6 +1923,9 @@ static int imgui_Spacing(lua_State* L) return 0; } +/** Separator + * @name separator + */ static int imgui_Separator(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1551,6 +1934,9 @@ static int imgui_Separator(lua_State* L) return 0; } +/** GetCursorScreenPos + * @name get_cursor_screen_pos + */ static int imgui_GetCursorScreenPos(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1567,6 +1953,9 @@ static int imgui_GetCursorScreenPos(lua_State* L) static float values_lines[MAX_HISTOGRAM_VALUES]; +/** PlotLines + * @name plot_lines + */ static int imgui_PlotLines(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1594,6 +1983,9 @@ static int imgui_PlotLines(lua_State* L) // Keep a label mapped histograms. This minimised alloc and realloc of value mem static float values_hist[MAX_HISTOGRAM_VALUES]; +/** PlotHistogram + * @name plot_histogram + */ static int imgui_PlotHistogram(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1621,6 +2013,9 @@ static int imgui_PlotHistogram(lua_State* L) // ---------------------------- // ----- IMGUI DEMO ----------- // ---------------------------- +/** Demo + * @name demo + */ static int imgui_Demo(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1635,6 +2030,9 @@ static int imgui_Demo(lua_State* L) // ---------------------------- // ----- INPUT ---------------- // ---------------------------- +/** IsMouseDoubleClicked + * @name is_mouse_double_clicked + */ static int imgui_IsMouseDoubleClicked(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1645,6 +2043,9 @@ static int imgui_IsMouseDoubleClicked(lua_State* L) return 1; } +/** IsMouseClicked + * @name is_mouse_clicked + */ static int imgui_IsMouseClicked(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1655,6 +2056,9 @@ static int imgui_IsMouseClicked(lua_State* L) return 1; } +/** IsItemActive + * @name is_item_active + */ static int imgui_IsItemActive(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1664,6 +2068,9 @@ static int imgui_IsItemActive(lua_State* L) return 1; } +/** IsItemFocused + * @name is_item_focused + */ static int imgui_IsItemFocused(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1673,6 +2080,9 @@ static int imgui_IsItemFocused(lua_State* L) return 1; } +/** IsItemClicked + * @name is_item_clicked + */ static int imgui_IsItemClicked(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1683,6 +2093,9 @@ static int imgui_IsItemClicked(lua_State* L) return 1; } +/** IsItemDoubleClicked + * @name is_item_double_clicked + */ static int imgui_IsItemDoubleClicked(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1694,6 +2107,9 @@ static int imgui_IsItemDoubleClicked(lua_State* L) return 1; } +/** IsItemHovered + * @name is_item_hovered + */ static int imgui_IsItemHovered(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1703,6 +2119,9 @@ static int imgui_IsItemHovered(lua_State* L) return 1; } +/** GetItemRectMax + * @name get_item_rect_max + */ static int imgui_GetItemRectMax(lua_State* L) { DM_LUA_STACK_CHECK(L, 2); @@ -1713,6 +2132,9 @@ static int imgui_GetItemRectMax(lua_State* L) return 2; } +/** SetKeyboardFocusHere + * @name set_keyboard_focus_here + */ static int imgui_SetKeyboardFocusHere(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -1727,6 +2149,9 @@ static int imgui_SetKeyboardFocusHere(lua_State* L) // ---------------------------- +/** GetStyle + * @name get_style + */ static int imgui_GetStyle(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -1908,6 +2333,9 @@ static int imgui_GetStyle(lua_State* L) return 1; } +/** SetStyle + * @name set_style + */ static int imgui_SetStyle(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2118,6 +2546,9 @@ static int imgui_SetStyle(lua_State* L) return 0; } +/** SetStyleColor + * @name set_style_color + */ static int imgui_SetStyleColor(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2129,6 +2560,9 @@ static int imgui_SetStyleColor(lua_State* L) style.Colors[luaL_checkinteger(L, 1)] = ImVec4(r, g, b, a); return 0; } +/** PushStyleColor + * @name push_style_color + */ static int imgui_PushStyleColor(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2140,6 +2574,9 @@ static int imgui_PushStyleColor(lua_State* L) ImGui::PushStyleColor(col, ImVec4(r, g, b, a)); return 0; } +/** PopStyleColor + * @name pop_style_color + */ static int imgui_PopStyleColor(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2152,6 +2589,9 @@ static int imgui_PopStyleColor(lua_State* L) return 0; } +/** SetWindowFontScale + * @name set_window_font_scale + */ static int imgui_SetWindowFontScale(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2160,6 +2600,9 @@ static int imgui_SetWindowFontScale(lua_State *L) return 0; } +/** SetGlobalFontScale + * @name set_global_font_scale + */ static int imgui_SetGlobalFontScale(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2169,6 +2612,9 @@ static int imgui_SetGlobalFontScale(lua_State *L) return 0; } +/** ScaleAllSizes + * @name scale_all_sizes + */ static int imgui_ScaleAllSizes(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2179,6 +2625,9 @@ static int imgui_ScaleAllSizes(lua_State *L) } +/** SetCursorPos + * @name set_cursor_pos + */ static int imgui_SetCursorPos(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2193,6 +2642,9 @@ static int imgui_SetCursorPos(lua_State *L) // ----- ITEM WIDTH ----------- // ---------------------------- +/** PushItemWidth + * @name push_item_width + */ static int imgui_PushItemWidth(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2201,6 +2653,9 @@ static int imgui_PushItemWidth(lua_State *L) return 0; } +/** PopItemWidth + * @name pop_item_width + */ static int imgui_PopItemWidth(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2208,6 +2663,9 @@ static int imgui_PopItemWidth(lua_State *L) return 0; } +/** SetNextItemWidth + * @name set_next_item_width + */ static int imgui_SetNextItemWidth(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2216,6 +2674,9 @@ static int imgui_SetNextItemWidth(lua_State *L) return 0; } +/** CalcItemWidth + * @name calc_item_width + */ static int imgui_CalcItemWidth(lua_State *L) { DM_LUA_STACK_CHECK(L, 1); @@ -2228,6 +2689,9 @@ static int imgui_CalcItemWidth(lua_State *L) // ----- NAVIGATION ----------------- // ---------------------------- +/** SetScrollHereY + * @name set_scroll_here_y + */ static int imgui_SetScrollHereY(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2300,6 +2764,9 @@ ImWchar* LuaToGlyphRanges(lua_State * L, int index) { return (ImWchar*)glyph_ranges; } +/** FontAddTTFFile + * @name font_add_t_t_f_file + */ static int imgui_FontAddTTFFile(lua_State * L) { DM_LUA_STACK_CHECK(L, 1); @@ -2323,6 +2790,9 @@ static int imgui_FontAddTTFFile(lua_State * L) return 1; } +/** FontAddTTFData + * @name font_add_t_t_f_data + */ static int imgui_FontAddTTFData(lua_State * L) { DM_LUA_STACK_CHECK(L, 1); @@ -2362,6 +2832,9 @@ static int imgui_FontAddTTFData(lua_State * L) return 1; } +/** FontPush + * @name font_push + */ static int imgui_FontPush(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2374,6 +2847,9 @@ static int imgui_FontPush(lua_State *L) return 0; } +/** FontPop + * @name font_pop + */ static int imgui_FontPop(lua_State *L) { DM_LUA_STACK_CHECK(L, 0); @@ -2381,6 +2857,9 @@ static int imgui_FontPop(lua_State *L) return 0; } +/** FontScale + * @name font_scale + */ static int imgui_FontScale(lua_State *L) { DM_LUA_STACK_CHECK(L, 1); @@ -2399,6 +2878,9 @@ static int imgui_FontScale(lua_State *L) } +/** GetFrameHeight + * @name get_frame_height + */ static int imgui_GetFrameHeight(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -2427,6 +2909,9 @@ static dmExtension::Result imgui_Draw(dmExtension::Params* params) return dmExtension::RESULT_OK; } +/** DrawLine + * @name draw_line + */ static int imgui_DrawLine(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2442,6 +2927,9 @@ static int imgui_DrawLine(lua_State* L) return 0; } +/** DrawRect + * @name draw_rect + */ static int imgui_DrawRect(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2457,6 +2945,9 @@ static int imgui_DrawRect(lua_State* L) return 0; } +/** DrawRectFilled + * @name draw_rect_filled + */ static int imgui_DrawRectFilled(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2472,6 +2963,9 @@ static int imgui_DrawRectFilled(lua_State* L) return 0; } +/** DrawProgressBar + * @name draw_progress_bar + */ static int imgui_DrawProgressBar(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2484,6 +2978,9 @@ static int imgui_DrawProgressBar(lua_State* L) return 0; } +/** SetRenderingEnabled + * @name set_rendering_enabled + */ static int imgui_SetRenderingEnabled(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2496,6 +2993,9 @@ static int imgui_SetRenderingEnabled(lua_State* L) // ----- INPUT CAPTURE ----------------- // ---------------------------- +/** WantCaptureMouse + * @name want_capture_mouse + */ static int imgui_WantCaptureMouse(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -2504,6 +3004,9 @@ static int imgui_WantCaptureMouse(lua_State* L) return 1; } +/** WantCaptureKeyboard + * @name want_capture_keyboard + */ static int imgui_WantCaptureKeyboard(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -2512,6 +3015,9 @@ static int imgui_WantCaptureKeyboard(lua_State* L) return 1; } +/** WantCaptureText + * @name want_capture_text + */ static int imgui_WantCaptureText(lua_State* L) { DM_LUA_STACK_CHECK(L, 1); @@ -2523,6 +3029,9 @@ static int imgui_WantCaptureText(lua_State* L) // ---------------------------- // ----- CONFIG ----------------- // ---------------------------- +/** SetDefaults + * @name set_defaults + */ static int imgui_SetDefaults(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -2533,6 +3042,9 @@ static int imgui_SetDefaults(lua_State* L) return 0; } +/** SetIniFilename + * @name set_ini_filename + */ static int imgui_SetIniFilename(lua_State* L) { DM_LUA_STACK_CHECK(L, 0); @@ -3141,3 +3653,4 @@ void OnEventDefoldImGui(dmExtension::Params* params, const dmExtension::Event* e } DM_DECLARE_EXTENSION(DefoldImGui, LIB_NAME, AppInitializeDefoldImGui, AppFinalizeDefoldImGui, InitializeDefoldImGui, OnUpdateDefoldImGui, OnEventDefoldImGui, FinalizeDefoldImGui) +