mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-14 13:38:31 +01:00
even some more work
This commit is contained in:
@@ -588,7 +588,7 @@ CIMGUI_API void igPlotLinesFloatPtr(const char* label,const float* values,int v
|
|||||||
{
|
{
|
||||||
return ImGui::PlotLines(label,values,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size,stride);
|
return ImGui::PlotLines(label,values,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size,stride);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igPlotLinesPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size)
|
CIMGUI_API void igPlotLinesFnPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size)
|
||||||
{
|
{
|
||||||
return ImGui::PlotLines(label,values_getter,data,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size);
|
return ImGui::PlotLines(label,values_getter,data,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size);
|
||||||
}
|
}
|
||||||
@@ -596,7 +596,7 @@ CIMGUI_API void igPlotHistogramFloatPtr(const char* label,const float* values,i
|
|||||||
{
|
{
|
||||||
return ImGui::PlotHistogram(label,values,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size,stride);
|
return ImGui::PlotHistogram(label,values,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size,stride);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igPlotHistogramPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size)
|
CIMGUI_API void igPlotHistogramFnPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size)
|
||||||
{
|
{
|
||||||
return ImGui::PlotHistogram(label,values_getter,data,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size);
|
return ImGui::PlotHistogram(label,values_getter,data,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size);
|
||||||
}
|
}
|
||||||
@@ -624,7 +624,7 @@ CIMGUI_API bool igComboStr(const char* label,int* current_item,const char* item
|
|||||||
{
|
{
|
||||||
return ImGui::Combo(label,current_item,items_separated_by_zeros,popup_max_height_in_items);
|
return ImGui::Combo(label,current_item,items_separated_by_zeros,popup_max_height_in_items);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igComboPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int popup_max_height_in_items)
|
CIMGUI_API bool igComboFnPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int popup_max_height_in_items)
|
||||||
{
|
{
|
||||||
return ImGui::Combo(label,current_item,items_getter,data,items_count,popup_max_height_in_items);
|
return ImGui::Combo(label,current_item,items_getter,data,items_count,popup_max_height_in_items);
|
||||||
}
|
}
|
||||||
@@ -856,7 +856,7 @@ CIMGUI_API void igSetNextTreeNodeOpen(bool is_open,ImGuiCond cond)
|
|||||||
{
|
{
|
||||||
return ImGui::SetNextTreeNodeOpen(is_open,cond);
|
return ImGui::SetNextTreeNodeOpen(is_open,cond);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igCollapsingHeaderTreeNodeFlags(const char* label,ImGuiTreeNodeFlags flags)
|
CIMGUI_API bool igCollapsingHeader(const char* label,ImGuiTreeNodeFlags flags)
|
||||||
{
|
{
|
||||||
return ImGui::CollapsingHeader(label,flags);
|
return ImGui::CollapsingHeader(label,flags);
|
||||||
}
|
}
|
||||||
@@ -876,7 +876,7 @@ CIMGUI_API bool igListBoxStr_arr(const char* label,int* current_item,const char
|
|||||||
{
|
{
|
||||||
return ImGui::ListBox(label,current_item,items,items_count,height_in_items);
|
return ImGui::ListBox(label,current_item,items,items_count,height_in_items);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igListBoxPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int height_in_items)
|
CIMGUI_API bool igListBoxFnPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int height_in_items)
|
||||||
{
|
{
|
||||||
return ImGui::ListBox(label,current_item,items_getter,data,items_count,height_in_items);
|
return ImGui::ListBox(label,current_item,items_getter,data,items_count,height_in_items);
|
||||||
}
|
}
|
||||||
@@ -1327,31 +1327,31 @@ CIMGUI_API inline void ImGuiIO_ClearInputCharacters(ImGuiIO* self)
|
|||||||
{
|
{
|
||||||
return self->ClearInputCharacters();
|
return self->ClearInputCharacters();
|
||||||
}
|
}
|
||||||
CIMGUI_API const char* TextRange_begin(ImGuiTextFilter::TextRange* self)
|
CIMGUI_API const char* TextRange_begin(TextRange* self)
|
||||||
{
|
{
|
||||||
return self->begin();
|
return self->begin();
|
||||||
}
|
}
|
||||||
CIMGUI_API const char* TextRange_end(ImGuiTextFilter::TextRange* self)
|
CIMGUI_API const char* TextRange_end(TextRange* self)
|
||||||
{
|
{
|
||||||
return self->end();
|
return self->end();
|
||||||
}
|
}
|
||||||
CIMGUI_API bool TextRange_empty(ImGuiTextFilter::TextRange* self)
|
CIMGUI_API bool TextRange_empty(TextRange* self)
|
||||||
{
|
{
|
||||||
return self->empty();
|
return self->empty();
|
||||||
}
|
}
|
||||||
CIMGUI_API char TextRange_front(ImGuiTextFilter::TextRange* self)
|
CIMGUI_API char TextRange_front(TextRange* self)
|
||||||
{
|
{
|
||||||
return self->front();
|
return self->front();
|
||||||
}
|
}
|
||||||
CIMGUI_API bool TextRange_is_blank(ImGuiTextFilter::TextRange* self,char c)
|
CIMGUI_API bool TextRange_is_blank(TextRange* self,char c)
|
||||||
{
|
{
|
||||||
return self->is_blank(c);
|
return self->is_blank(c);
|
||||||
}
|
}
|
||||||
CIMGUI_API void TextRange_trim_blanks(ImGuiTextFilter::TextRange* self)
|
CIMGUI_API void TextRange_trim_blanks(TextRange* self)
|
||||||
{
|
{
|
||||||
return self->trim_blanks();
|
return self->trim_blanks();
|
||||||
}
|
}
|
||||||
CIMGUI_API void TextRange_split(ImGuiTextFilter::TextRange* self,char separator,ImVector<TextRange> out)
|
CIMGUI_API void TextRange_split(TextRange* self,char separator,ImVector_TextRange out)
|
||||||
{
|
{
|
||||||
return self->split(separator,out);
|
return self->split(separator,out);
|
||||||
}
|
}
|
||||||
@@ -1811,31 +1811,31 @@ CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self)
|
|||||||
{
|
{
|
||||||
return self->GetGlyphRangesThai();
|
return self->GetGlyphRangesThai();
|
||||||
}
|
}
|
||||||
CIMGUI_API bool GlyphRangesBuilder_GetBit(ImFontAtlas::GlyphRangesBuilder* self,int n)
|
CIMGUI_API bool GlyphRangesBuilder_GetBit(GlyphRangesBuilder* self,int n)
|
||||||
{
|
{
|
||||||
return self->GetBit(n);
|
return self->GetBit(n);
|
||||||
}
|
}
|
||||||
CIMGUI_API void GlyphRangesBuilder_SetBit(ImFontAtlas::GlyphRangesBuilder* self,int n)
|
CIMGUI_API void GlyphRangesBuilder_SetBit(GlyphRangesBuilder* self,int n)
|
||||||
{
|
{
|
||||||
return self->SetBit(n);
|
return self->SetBit(n);
|
||||||
}
|
}
|
||||||
CIMGUI_API void GlyphRangesBuilder_AddChar(ImFontAtlas::GlyphRangesBuilder* self,ImWchar c)
|
CIMGUI_API void GlyphRangesBuilder_AddChar(GlyphRangesBuilder* self,ImWchar c)
|
||||||
{
|
{
|
||||||
return self->AddChar(c);
|
return self->AddChar(c);
|
||||||
}
|
}
|
||||||
CIMGUI_API void GlyphRangesBuilder_AddText(ImFontAtlas::GlyphRangesBuilder* self,const char* text,const char* text_end)
|
CIMGUI_API void GlyphRangesBuilder_AddText(GlyphRangesBuilder* self,const char* text,const char* text_end)
|
||||||
{
|
{
|
||||||
return self->AddText(text,text_end);
|
return self->AddText(text,text_end);
|
||||||
}
|
}
|
||||||
CIMGUI_API void GlyphRangesBuilder_AddRanges(ImFontAtlas::GlyphRangesBuilder* self,const ImWchar* ranges)
|
CIMGUI_API void GlyphRangesBuilder_AddRanges(GlyphRangesBuilder* self,const ImWchar* ranges)
|
||||||
{
|
{
|
||||||
return self->AddRanges(ranges);
|
return self->AddRanges(ranges);
|
||||||
}
|
}
|
||||||
CIMGUI_API void GlyphRangesBuilder_BuildRanges(ImFontAtlas::GlyphRangesBuilder* self,ImVector<ImWchar>* out_ranges)
|
CIMGUI_API void GlyphRangesBuilder_BuildRanges(GlyphRangesBuilder* self,ImVector_ImWchar* out_ranges)
|
||||||
{
|
{
|
||||||
return self->BuildRanges(out_ranges);
|
return self->BuildRanges(out_ranges);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool CustomRect_IsPacked(ImFontAtlas::CustomRect* self)
|
CIMGUI_API bool CustomRect_IsPacked(CustomRect* self)
|
||||||
{
|
{
|
||||||
return self->IsPacked();
|
return self->IsPacked();
|
||||||
}
|
}
|
||||||
@@ -1849,7 +1849,7 @@ CIMGUI_API int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self,ImFont* fon
|
|||||||
}
|
}
|
||||||
CIMGUI_API const CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self,int index)
|
CIMGUI_API const CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self,int index)
|
||||||
{
|
{
|
||||||
return (CustomRect*) self->GetCustomRectByIndex(index);
|
return self->GetCustomRectByIndex(index);
|
||||||
}
|
}
|
||||||
CIMGUI_API void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self,const CustomRect* rect,ImVec2* out_uv_min,ImVec2* out_uv_max)
|
CIMGUI_API void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self,const CustomRect* rect,ImVec2* out_uv_min,ImVec2* out_uv_max)
|
||||||
{
|
{
|
||||||
|
@@ -1,3 +1,14 @@
|
|||||||
|
#ifndef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||||
|
typedef ImFontAtlas::GlyphRangesBuilder GlyphRangesBuilder;
|
||||||
|
typedef ImFontAtlas::CustomRect CustomRect;
|
||||||
|
typedef ImGuiTextFilter::TextRange TextRange;
|
||||||
|
typedef ImGuiStorage::Pair Pair;
|
||||||
|
typedef ImVector<TextRange> ImVector_TextRange;
|
||||||
|
typedef ImVector<ImWchar> ImVector_ImWchar;
|
||||||
|
#else //CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||||
|
typedef ImVector ImVector_TextRange;
|
||||||
|
typedef ImVector ImVector_ImWchar;
|
||||||
|
#endif //CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||||
CIMGUI_API ImGuiContext* igCreateContext(ImFontAtlas* shared_font_atlas);
|
CIMGUI_API ImGuiContext* igCreateContext(ImFontAtlas* shared_font_atlas);
|
||||||
CIMGUI_API void igDestroyContext(ImGuiContext* ctx);
|
CIMGUI_API void igDestroyContext(ImGuiContext* ctx);
|
||||||
CIMGUI_API ImGuiContext* igGetCurrentContext();
|
CIMGUI_API ImGuiContext* igGetCurrentContext();
|
||||||
@@ -141,16 +152,16 @@ CIMGUI_API bool igCheckboxFlags(const char* label,unsigned int* flags,unsigned
|
|||||||
CIMGUI_API bool igRadioButtonBool(const char* label,bool active);
|
CIMGUI_API bool igRadioButtonBool(const char* label,bool active);
|
||||||
CIMGUI_API bool igRadioButtonIntPtr(const char* label,int* v,int v_button);
|
CIMGUI_API bool igRadioButtonIntPtr(const char* label,int* v,int v_button);
|
||||||
CIMGUI_API void igPlotLinesFloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride);
|
CIMGUI_API void igPlotLinesFloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride);
|
||||||
CIMGUI_API void igPlotLinesPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size);
|
CIMGUI_API void igPlotLinesFnPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size);
|
||||||
CIMGUI_API void igPlotHistogramFloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride);
|
CIMGUI_API void igPlotHistogramFloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride);
|
||||||
CIMGUI_API void igPlotHistogramPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size);
|
CIMGUI_API void igPlotHistogramFnPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size);
|
||||||
CIMGUI_API void igProgressBar(float fraction,const ImVec2 size_arg,const char* overlay);
|
CIMGUI_API void igProgressBar(float fraction,const ImVec2 size_arg,const char* overlay);
|
||||||
CIMGUI_API void igBullet();
|
CIMGUI_API void igBullet();
|
||||||
CIMGUI_API bool igBeginCombo(const char* label,const char* preview_value,ImGuiComboFlags flags);
|
CIMGUI_API bool igBeginCombo(const char* label,const char* preview_value,ImGuiComboFlags flags);
|
||||||
CIMGUI_API void igEndCombo();
|
CIMGUI_API void igEndCombo();
|
||||||
CIMGUI_API bool igComboStr_arr(const char* label,int* current_item,const char* const items[],int items_count,int popup_max_height_in_items);
|
CIMGUI_API bool igComboStr_arr(const char* label,int* current_item,const char* const items[],int items_count,int popup_max_height_in_items);
|
||||||
CIMGUI_API bool igComboStr(const char* label,int* current_item,const char* items_separated_by_zeros,int popup_max_height_in_items);
|
CIMGUI_API bool igComboStr(const char* label,int* current_item,const char* items_separated_by_zeros,int popup_max_height_in_items);
|
||||||
CIMGUI_API bool igComboPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int popup_max_height_in_items);
|
CIMGUI_API bool igComboFnPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int popup_max_height_in_items);
|
||||||
CIMGUI_API bool igDragFloat(const char* label,float* v,float v_speed,float v_min,float v_max,const char* display_format,float power);
|
CIMGUI_API bool igDragFloat(const char* label,float* v,float v_speed,float v_min,float v_max,const char* display_format,float power);
|
||||||
CIMGUI_API bool igDragFloat2(const char* label,float v[2],float v_speed,float v_min,float v_max,const char* display_format,float power);
|
CIMGUI_API bool igDragFloat2(const char* label,float v[2],float v_speed,float v_min,float v_max,const char* display_format,float power);
|
||||||
CIMGUI_API bool igDragFloat3(const char* label,float v[3],float v_speed,float v_min,float v_max,const char* display_format,float power);
|
CIMGUI_API bool igDragFloat3(const char* label,float v[3],float v_speed,float v_min,float v_max,const char* display_format,float power);
|
||||||
@@ -205,12 +216,12 @@ CIMGUI_API void igTreePop();
|
|||||||
CIMGUI_API void igTreeAdvanceToLabelPos();
|
CIMGUI_API void igTreeAdvanceToLabelPos();
|
||||||
CIMGUI_API float igGetTreeNodeToLabelSpacing();
|
CIMGUI_API float igGetTreeNodeToLabelSpacing();
|
||||||
CIMGUI_API void igSetNextTreeNodeOpen(bool is_open,ImGuiCond cond);
|
CIMGUI_API void igSetNextTreeNodeOpen(bool is_open,ImGuiCond cond);
|
||||||
CIMGUI_API bool igCollapsingHeaderTreeNodeFlags(const char* label,ImGuiTreeNodeFlags flags);
|
CIMGUI_API bool igCollapsingHeader(const char* label,ImGuiTreeNodeFlags flags);
|
||||||
CIMGUI_API bool igCollapsingHeaderBoolPtr(const char* label,bool* p_open,ImGuiTreeNodeFlags flags);
|
CIMGUI_API bool igCollapsingHeaderBoolPtr(const char* label,bool* p_open,ImGuiTreeNodeFlags flags);
|
||||||
CIMGUI_API bool igSelectableBool(const char* label,bool selected,ImGuiSelectableFlags flags,const ImVec2 size);
|
CIMGUI_API bool igSelectableBool(const char* label,bool selected,ImGuiSelectableFlags flags,const ImVec2 size);
|
||||||
CIMGUI_API bool igSelectableBoolPtr(const char* label,bool* p_selected,ImGuiSelectableFlags flags,const ImVec2 size);
|
CIMGUI_API bool igSelectableBoolPtr(const char* label,bool* p_selected,ImGuiSelectableFlags flags,const ImVec2 size);
|
||||||
CIMGUI_API bool igListBoxStr_arr(const char* label,int* current_item,const char* const items[],int items_count,int height_in_items);
|
CIMGUI_API bool igListBoxStr_arr(const char* label,int* current_item,const char* const items[],int items_count,int height_in_items);
|
||||||
CIMGUI_API bool igListBoxPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int height_in_items);
|
CIMGUI_API bool igListBoxFnPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int height_in_items);
|
||||||
CIMGUI_API bool igListBoxHeaderVec2(const char* label,const ImVec2 size);
|
CIMGUI_API bool igListBoxHeaderVec2(const char* label,const ImVec2 size);
|
||||||
CIMGUI_API bool igListBoxHeaderInt(const char* label,int items_count,int height_in_items);
|
CIMGUI_API bool igListBoxHeaderInt(const char* label,int items_count,int height_in_items);
|
||||||
CIMGUI_API void igListBoxFooter();
|
CIMGUI_API void igListBoxFooter();
|
||||||
@@ -322,13 +333,13 @@ CIMGUI_API void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self,float scale_factor);
|
|||||||
CIMGUI_API void ImGuiIO_AddInputCharacter(ImGuiIO* self,ImWchar c);
|
CIMGUI_API void ImGuiIO_AddInputCharacter(ImGuiIO* self,ImWchar c);
|
||||||
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self,const char* utf8_chars);
|
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self,const char* utf8_chars);
|
||||||
CIMGUI_API inline void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
|
CIMGUI_API inline void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
|
||||||
CIMGUI_API const char* TextRange_begin(ImGuiTextFilter::TextRange* self);
|
CIMGUI_API const char* TextRange_begin(TextRange* self);
|
||||||
CIMGUI_API const char* TextRange_end(ImGuiTextFilter::TextRange* self);
|
CIMGUI_API const char* TextRange_end(TextRange* self);
|
||||||
CIMGUI_API bool TextRange_empty(ImGuiTextFilter::TextRange* self);
|
CIMGUI_API bool TextRange_empty(TextRange* self);
|
||||||
CIMGUI_API char TextRange_front(ImGuiTextFilter::TextRange* self);
|
CIMGUI_API char TextRange_front(TextRange* self);
|
||||||
CIMGUI_API bool TextRange_is_blank(ImGuiTextFilter::TextRange* self,char c);
|
CIMGUI_API bool TextRange_is_blank(TextRange* self,char c);
|
||||||
CIMGUI_API void TextRange_trim_blanks(ImGuiTextFilter::TextRange* self);
|
CIMGUI_API void TextRange_trim_blanks(TextRange* self);
|
||||||
CIMGUI_API void TextRange_split(ImGuiTextFilter::TextRange* self,char separator,ImVector<TextRange> out);
|
CIMGUI_API void TextRange_split(TextRange* self,char separator,ImVector_TextRange out);
|
||||||
CIMGUI_API bool ImGuiTextFilter_Draw(ImGuiTextFilter* self,const char* label,float width);
|
CIMGUI_API bool ImGuiTextFilter_Draw(ImGuiTextFilter* self,const char* label,float width);
|
||||||
CIMGUI_API bool ImGuiTextFilter_PassFilter(ImGuiTextFilter* self,const char* text,const char* text_end);
|
CIMGUI_API bool ImGuiTextFilter_PassFilter(ImGuiTextFilter* self,const char* text,const char* text_end);
|
||||||
CIMGUI_API void ImGuiTextFilter_Build(ImGuiTextFilter* self);
|
CIMGUI_API void ImGuiTextFilter_Build(ImGuiTextFilter* self);
|
||||||
@@ -443,13 +454,13 @@ CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesJapanese(ImFontAtlas* self)
|
|||||||
CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesChinese(ImFontAtlas* self);
|
CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesChinese(ImFontAtlas* self);
|
||||||
CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self);
|
CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self);
|
||||||
CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self);
|
CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self);
|
||||||
CIMGUI_API bool GlyphRangesBuilder_GetBit(ImFontAtlas::GlyphRangesBuilder* self,int n);
|
CIMGUI_API bool GlyphRangesBuilder_GetBit(GlyphRangesBuilder* self,int n);
|
||||||
CIMGUI_API void GlyphRangesBuilder_SetBit(ImFontAtlas::GlyphRangesBuilder* self,int n);
|
CIMGUI_API void GlyphRangesBuilder_SetBit(GlyphRangesBuilder* self,int n);
|
||||||
CIMGUI_API void GlyphRangesBuilder_AddChar(ImFontAtlas::GlyphRangesBuilder* self,ImWchar c);
|
CIMGUI_API void GlyphRangesBuilder_AddChar(GlyphRangesBuilder* self,ImWchar c);
|
||||||
CIMGUI_API void GlyphRangesBuilder_AddText(ImFontAtlas::GlyphRangesBuilder* self,const char* text,const char* text_end);
|
CIMGUI_API void GlyphRangesBuilder_AddText(GlyphRangesBuilder* self,const char* text,const char* text_end);
|
||||||
CIMGUI_API void GlyphRangesBuilder_AddRanges(ImFontAtlas::GlyphRangesBuilder* self,const ImWchar* ranges);
|
CIMGUI_API void GlyphRangesBuilder_AddRanges(GlyphRangesBuilder* self,const ImWchar* ranges);
|
||||||
CIMGUI_API void GlyphRangesBuilder_BuildRanges(ImFontAtlas::GlyphRangesBuilder* self,ImVector<ImWchar>* out_ranges);
|
CIMGUI_API void GlyphRangesBuilder_BuildRanges(GlyphRangesBuilder* self,ImVector_ImWchar* out_ranges);
|
||||||
CIMGUI_API bool CustomRect_IsPacked(ImFontAtlas::CustomRect* self);
|
CIMGUI_API bool CustomRect_IsPacked(CustomRect* self);
|
||||||
CIMGUI_API int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self,unsigned int id,int width,int height);
|
CIMGUI_API int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self,unsigned int id,int width,int height);
|
||||||
CIMGUI_API int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self,ImFont* font,ImWchar id,int width,int height,float advance_x,const ImVec2 offset);
|
CIMGUI_API int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self,ImFont* font,ImWchar id,int width,int height,float advance_x,const ImVec2 offset);
|
||||||
CIMGUI_API const CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self,int index);
|
CIMGUI_API const CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self,int index);
|
||||||
|
@@ -26,3 +26,7 @@ CIMGUI_API void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const ch
|
|||||||
buffer->appendfv(fmt, args);
|
buffer->appendfv(fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void ImFontConfig_DefaultConstructor(ImFontConfig *config)
|
||||||
|
{
|
||||||
|
*config = ImFontConfig();
|
||||||
|
}
|
||||||
|
@@ -35,7 +35,7 @@ typedef unsigned long long ImU64;
|
|||||||
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||||
#include "imgui_structs.h"
|
#include "imgui_structs.h"
|
||||||
#endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
#endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||||
|
/*
|
||||||
struct GlyphRangesBuilder
|
struct GlyphRangesBuilder
|
||||||
{
|
{
|
||||||
ImVector<unsigned char> UsedChars;
|
ImVector<unsigned char> UsedChars;
|
||||||
@@ -67,10 +67,17 @@ typedef struct TextRange TextRange;
|
|||||||
};
|
};
|
||||||
typedef struct Pair Pair;
|
typedef struct Pair Pair;
|
||||||
|
|
||||||
|
typedef ImFontAtlas::GlyphRangesBuilder GlyphRangesBuilder;
|
||||||
|
typedef ImFontAtlas::CustomRect CustomRect;
|
||||||
|
typedef ImGuiTextFilter::TextRange TextRange;
|
||||||
|
typedef ImGuiStorage::Pair Pair;
|
||||||
|
*/
|
||||||
|
|
||||||
#include "auto_funcs.h"
|
#include "auto_funcs.h"
|
||||||
|
|
||||||
|
//no LogTextV
|
||||||
CIMGUI_API void igLogText(CONST char *fmt, ...);
|
CIMGUI_API void igLogText(CONST char *fmt, ...);
|
||||||
|
//no appendfV
|
||||||
CIMGUI_API void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...);
|
CIMGUI_API void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...);
|
||||||
|
CIMGUI_API void ImFontConfig_DefaultConstructor(ImFontConfig *config);
|
||||||
|
|
||||||
|
@@ -12,7 +12,10 @@ end
|
|||||||
|
|
||||||
local cimgui_manuals = {
|
local cimgui_manuals = {
|
||||||
igLogText = true,
|
igLogText = true,
|
||||||
ImGuiTextBuffer_appendf = true
|
ImGuiTextBuffer_appendf = true,
|
||||||
|
-------------------------
|
||||||
|
--TextRange_split = true,
|
||||||
|
--ImFontAtlas_CalcCustomRectUV = true
|
||||||
}
|
}
|
||||||
|
|
||||||
local function get_manuals(def)
|
local function get_manuals(def)
|
||||||
@@ -25,6 +28,9 @@ local cimgui_overloads = {
|
|||||||
["(const char*,const char*)"] = "igPushIDRange",
|
["(const char*,const char*)"] = "igPushIDRange",
|
||||||
["(const void*)"] = "igPushIDPtr",
|
["(const void*)"] = "igPushIDPtr",
|
||||||
["(int)"] = "igPushIDInt"
|
["(int)"] = "igPushIDInt"
|
||||||
|
},
|
||||||
|
igCollapsingHeader = {
|
||||||
|
["(const char*,ImGuiTreeNodeFlags)"] = "igCollapsingHeader"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,6 +46,7 @@ end
|
|||||||
|
|
||||||
cdefs = {}
|
cdefs = {}
|
||||||
local embeded_structs = {}
|
local embeded_structs = {}
|
||||||
|
local ImVector_templates = {}
|
||||||
location_re = '^# %d+ "([^"]*)"'
|
location_re = '^# %d+ "([^"]*)"'
|
||||||
cimpath_re = '^(.*[\\/])(imgui)%.h$'
|
cimpath_re = '^(.*[\\/])(imgui)%.h$'
|
||||||
define_re = "^#define%s+([^%s]+)%s+([^%s]+)$"
|
define_re = "^#define%s+([^%s]+)%s+([^%s]+)$"
|
||||||
@@ -144,6 +151,13 @@ repeat -- simulate continue with break
|
|||||||
local argscsinpars = args:gsub("(=[^,%(%)]*)(%b())","%1")
|
local argscsinpars = args:gsub("(=[^,%(%)]*)(%b())","%1")
|
||||||
argscsinpars = argscsinpars:gsub("(=[^,%(%)]*)([,%)])","%2")
|
argscsinpars = argscsinpars:gsub("(=[^,%(%)]*)([,%)])","%2")
|
||||||
argscsinpars = argscsinpars:gsub("&","")
|
argscsinpars = argscsinpars:gsub("&","")
|
||||||
|
|
||||||
|
local template = argscsinpars:match("ImVector<([%w_]+)>")
|
||||||
|
if template then
|
||||||
|
ImVector_templates[template] = true
|
||||||
|
end
|
||||||
|
|
||||||
|
argscsinpars = argscsinpars:gsub("<([%w_]+)>","_%1") --ImVector
|
||||||
--print(funcname,ret,args,argscsinpars)
|
--print(funcname,ret,args,argscsinpars)
|
||||||
-- local signature = argscsinpars:gsub("([%w%s%*_]+)%s[%w_]+%s*([,%)])","%1%2")
|
-- local signature = argscsinpars:gsub("([%w%s%*_]+)%s[%w_]+%s*([,%)])","%1%2")
|
||||||
-- signature = signature:gsub("%s*([,%)])","%1")
|
-- signature = signature:gsub("%s*([,%)])","%1")
|
||||||
@@ -228,7 +242,25 @@ local function get_types(v)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local function typetoStr(typ)
|
||||||
|
--typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","%1") -- funcs
|
||||||
|
typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","FnPtr")
|
||||||
|
typ = typ:gsub("[%w_]+%[(%d*)%]","arr%1")
|
||||||
|
typ = typ:gsub("%*","Ptr")
|
||||||
|
typ = typ:gsub("void","")
|
||||||
|
typ = typ:gsub("unsigned%s","u")
|
||||||
|
typ = typ:gsub("const%s","")--"c")
|
||||||
|
typ = typ:gsub("%s+","_")
|
||||||
|
typ = typ:gsub("charPtr","Str")
|
||||||
|
typ = typ:gsub("int","Int")
|
||||||
|
typ = typ:gsub("bool","Bool")
|
||||||
|
typ = typ:gsub("float","Float")
|
||||||
|
typ = typ:gsub("uInt","Uint")
|
||||||
|
typ = typ:gsub("ImGui","")
|
||||||
|
typ = typ:gsub("Im","")
|
||||||
|
typ = typ:gsub("[<>]","")
|
||||||
|
return typ
|
||||||
|
end
|
||||||
local function name_overloadsAlgo(v)
|
local function name_overloadsAlgo(v)
|
||||||
local aa = {}
|
local aa = {}
|
||||||
local bb = {}
|
local bb = {}
|
||||||
@@ -288,24 +320,7 @@ local function name_overloadsAlgo(v)
|
|||||||
end
|
end
|
||||||
return aa,bb
|
return aa,bb
|
||||||
end
|
end
|
||||||
local function typetoStr(typ)
|
|
||||||
typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","%1") -- funcs
|
|
||||||
typ = typ:gsub("[%w_]+%[(%d*)%]","arr%1")
|
|
||||||
typ = typ:gsub("%*","Ptr")
|
|
||||||
typ = typ:gsub("void","")
|
|
||||||
typ = typ:gsub("unsigned%s","u")
|
|
||||||
typ = typ:gsub("const%s","")--"c")
|
|
||||||
typ = typ:gsub("%s+","_")
|
|
||||||
typ = typ:gsub("charPtr","Str")
|
|
||||||
typ = typ:gsub("int","Int")
|
|
||||||
typ = typ:gsub("bool","Bool")
|
|
||||||
typ = typ:gsub("float","Float")
|
|
||||||
typ = typ:gsub("uInt","Uint")
|
|
||||||
typ = typ:gsub("ImGui","")
|
|
||||||
typ = typ:gsub("Im","")
|
|
||||||
typ = typ:gsub("[<>]","")
|
|
||||||
return typ
|
|
||||||
end
|
|
||||||
local numoverloaded = 0
|
local numoverloaded = 0
|
||||||
print"overloading"
|
print"overloading"
|
||||||
for k,v in pairs(defsT) do
|
for k,v in pairs(defsT) do
|
||||||
@@ -316,7 +331,7 @@ for k,v in pairs(defsT) do
|
|||||||
local typesc,post = name_overloadsAlgo(v)
|
local typesc,post = name_overloadsAlgo(v)
|
||||||
for i,t in ipairs(v) do
|
for i,t in ipairs(v) do
|
||||||
t.ov_cimguiname = getcimguiname_overload(t.stname,t.funcname,t.signature) or k..typetoStr(post[i])
|
t.ov_cimguiname = getcimguiname_overload(t.stname,t.funcname,t.signature) or k..typetoStr(post[i])
|
||||||
print(i,t.signature,t.ret,t.ov_cimguiname)--post[i],typetoStr(post[i]))
|
print(i,t.signature,t.ret,t.ov_cimguiname,post[i])--,typetoStr(post[i]))
|
||||||
--prtable(typesc[i])
|
--prtable(typesc[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -332,9 +347,14 @@ for i,t in ipairs(cdefs) do
|
|||||||
end
|
end
|
||||||
print"//embeded_structs---------------------------------------------------------------------------"
|
print"//embeded_structs---------------------------------------------------------------------------"
|
||||||
for k,v in pairs(embeded_structs) do
|
for k,v in pairs(embeded_structs) do
|
||||||
print(k,v)
|
--print(k,v)
|
||||||
|
io.write("typedef ",v," ",k,";\n")
|
||||||
end
|
end
|
||||||
--[[
|
for k,v in pairs(ImVector_templates) do
|
||||||
|
--print(k,v)
|
||||||
|
io.write("typedef ImVector<",k,"> ImVector_",k,";\n")
|
||||||
|
end
|
||||||
|
---[[
|
||||||
print"//constructors------------------------------------------------------------------"
|
print"//constructors------------------------------------------------------------------"
|
||||||
for i,t in ipairs(cdefs) do
|
for i,t in ipairs(cdefs) do
|
||||||
if not t.ret then
|
if not t.ret then
|
||||||
@@ -342,7 +362,22 @@ for i,t in ipairs(cdefs) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
--]]
|
--]]
|
||||||
|
---------------------------------------------------------------------------------------------
|
||||||
|
-- auto_funcs.h
|
||||||
local hfile = io.open("./auto_funcs.h","w")
|
local hfile = io.open("./auto_funcs.h","w")
|
||||||
|
hfile:write("#ifndef CIMGUI_DEFINE_ENUMS_AND_STRUCTS\n")
|
||||||
|
for k,v in pairs(embeded_structs) do
|
||||||
|
--print(k,v)
|
||||||
|
hfile:write("typedef ",v," ",k,";\n")
|
||||||
|
end
|
||||||
|
for k,v in pairs(ImVector_templates) do
|
||||||
|
hfile:write("typedef ImVector<",k,"> ImVector_",k,";\n")
|
||||||
|
end
|
||||||
|
hfile:write("#else //CIMGUI_DEFINE_ENUMS_AND_STRUCTS\n")
|
||||||
|
for k,v in pairs(ImVector_templates) do
|
||||||
|
hfile:write("typedef ImVector ImVector_",k,";\n")
|
||||||
|
end
|
||||||
|
hfile:write("#endif //CIMGUI_DEFINE_ENUMS_AND_STRUCTS\n")
|
||||||
for _,t in ipairs(cdefs) do
|
for _,t in ipairs(cdefs) do
|
||||||
local cimf = defsT[t.cimguiname]
|
local cimf = defsT[t.cimguiname]
|
||||||
local def = cimf[t.signature]
|
local def = cimf[t.signature]
|
||||||
@@ -352,7 +387,8 @@ for _,t in ipairs(cdefs) do
|
|||||||
hfile:write("CIMGUI_API"," ",def.ret," ",def.ov_cimguiname or def.cimguiname,def.args,";\n")
|
hfile:write("CIMGUI_API"," ",def.ret," ",def.ov_cimguiname or def.cimguiname,def.args,";\n")
|
||||||
else
|
else
|
||||||
local empty = def.args:match("^%(%)") --no args
|
local empty = def.args:match("^%(%)") --no args
|
||||||
local imgui_stname = embeded_structs[def.stname] or def.stname
|
--local imgui_stname = embeded_structs[def.stname] or def.stname
|
||||||
|
local imgui_stname = def.stname
|
||||||
local args = def.args:gsub("^%(","("..imgui_stname.."* self"..(empty and "" or ","))
|
local args = def.args:gsub("^%(","("..imgui_stname.."* self"..(empty and "" or ","))
|
||||||
hfile:write("CIMGUI_API"," ",def.ret," ",def.ov_cimguiname or def.cimguiname,args,";\n")
|
hfile:write("CIMGUI_API"," ",def.ret," ",def.ov_cimguiname or def.cimguiname,args,";\n")
|
||||||
end
|
end
|
||||||
@@ -369,11 +405,12 @@ for _,t in ipairs(cdefs) do
|
|||||||
local manual = get_manuals(def)
|
local manual = get_manuals(def)
|
||||||
if not manual and def.ret then --not constructor
|
if not manual and def.ret then --not constructor
|
||||||
local ptret = def.retref and "&" or ""
|
local ptret = def.retref and "&" or ""
|
||||||
local castret = def.ret:gsub("[^%s]+",function(x)
|
-- local castret = def.ret:gsub("[^%s]+",function(x)
|
||||||
local y = x:gsub("%*","")
|
-- local y = x:gsub("%*","")
|
||||||
local typ = embeded_structs[y]
|
-- local typ = embeded_structs[y]
|
||||||
if typ then return "("..x..")" else return "" end
|
-- if typ then return "("..x..")" else return "" end
|
||||||
end)
|
-- end)
|
||||||
|
local castret = ""
|
||||||
if def.stname == "ImGui" then
|
if def.stname == "ImGui" then
|
||||||
if def.isvararg then
|
if def.isvararg then
|
||||||
local call_args = def.call_args:gsub("%.%.%.","args")
|
local call_args = def.call_args:gsub("%.%.%.","args")
|
||||||
@@ -393,7 +430,8 @@ for _,t in ipairs(cdefs) do
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
local empty = def.args:match("^%(%)") --no args
|
local empty = def.args:match("^%(%)") --no args
|
||||||
local imgui_stname = embeded_structs[def.stname] or def.stname
|
--local imgui_stname = embeded_structs[def.stname] or def.stname
|
||||||
|
local imgui_stname = def.stname
|
||||||
local args = def.args:gsub("^%(","("..imgui_stname.."* self"..(empty and "" or ","))
|
local args = def.args:gsub("^%(","("..imgui_stname.."* self"..(empty and "" or ","))
|
||||||
if def.isvararg then
|
if def.isvararg then
|
||||||
local call_args = def.call_args:gsub("%.%.%.","args")
|
local call_args = def.call_args:gsub("%.%.%.","args")
|
||||||
|
@@ -13,6 +13,7 @@ define_re = "^#define%s+([^%s]+)%s+([^%s]+)$"
|
|||||||
function_re = "%b()"
|
function_re = "%b()"
|
||||||
function_closed_re = "[;}]$"
|
function_closed_re = "[;}]$"
|
||||||
function_closing_re = "}"
|
function_closing_re = "}"
|
||||||
|
functype_re = "(%(%*)[%w_]+(%)%([^%(%)]*%))"
|
||||||
|
|
||||||
number_re = "^-?[0-9]+$"
|
number_re = "^-?[0-9]+$"
|
||||||
hex_re = "0x[0-9a-fA-F]+$"
|
hex_re = "0x[0-9a-fA-F]+$"
|
||||||
@@ -48,7 +49,8 @@ repeat -- simulate continue with break
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
if line:match(function_re) and not line:match("typedef.*%b().*%b().*") then
|
if line:match(function_re) and not line:match("typedef.*%b().*%b().*")
|
||||||
|
and not line:match(functype_re) then
|
||||||
-- function and functypedef
|
-- function and functypedef
|
||||||
if not line:match(function_closed_re) then
|
if not line:match(function_closed_re) then
|
||||||
in_function = true
|
in_function = true
|
||||||
|
@@ -454,8 +454,12 @@ struct ImGuiIO
|
|||||||
ImVec2 DisplayVisibleMax;
|
ImVec2 DisplayVisibleMax;
|
||||||
bool OptMacOSXBehaviors;
|
bool OptMacOSXBehaviors;
|
||||||
bool OptCursorBlink;
|
bool OptCursorBlink;
|
||||||
|
const char* (*GetClipboardTextFn)(void* user_data);
|
||||||
|
void (*SetClipboardTextFn)(void* user_data, const char* text);
|
||||||
void* ClipboardUserData;
|
void* ClipboardUserData;
|
||||||
|
void (*ImeSetInputScreenPosFn)(int x, int y);
|
||||||
void* ImeWindowHandle;
|
void* ImeWindowHandle;
|
||||||
|
void (*RenderDrawListsFn)(ImDrawData* data);
|
||||||
ImVec2 MousePos;
|
ImVec2 MousePos;
|
||||||
bool MouseDown[5];
|
bool MouseDown[5];
|
||||||
float MouseWheel;
|
float MouseWheel;
|
||||||
@@ -713,6 +717,36 @@ struct ImFont
|
|||||||
int MetricsTotalSurface;
|
int MetricsTotalSurface;
|
||||||
};
|
};
|
||||||
typedef struct ImFont ImFont;
|
typedef struct ImFont ImFont;
|
||||||
|
struct GlyphRangesBuilder
|
||||||
|
{
|
||||||
|
ImVector/*<unsigned char>*/ UsedChars;
|
||||||
|
};
|
||||||
|
typedef struct GlyphRangesBuilder GlyphRangesBuilder;
|
||||||
|
|
||||||
|
struct CustomRect
|
||||||
|
{
|
||||||
|
unsigned int ID;
|
||||||
|
unsigned short Width, Height;
|
||||||
|
unsigned short X, Y;
|
||||||
|
float GlyphAdvanceX;
|
||||||
|
ImVec2 GlyphOffset;
|
||||||
|
ImFont* Font;
|
||||||
|
};
|
||||||
|
typedef struct CustomRect CustomRect;
|
||||||
|
|
||||||
|
struct TextRange
|
||||||
|
{
|
||||||
|
const char* b;
|
||||||
|
const char* e;
|
||||||
|
};
|
||||||
|
typedef struct TextRange TextRange;
|
||||||
|
|
||||||
|
struct Pair
|
||||||
|
{
|
||||||
|
ImGuiID key;
|
||||||
|
union { int val_i; float val_f; void* val_p; };
|
||||||
|
};
|
||||||
|
typedef struct Pair Pair;
|
||||||
|
|
||||||
#endif //IMGUI_STRUCTS_INCLUDED
|
#endif //IMGUI_STRUCTS_INCLUDED
|
||||||
//////////////// END AUTOGENERATED SEGMENT
|
//////////////// END AUTOGENERATED SEGMENT
|
||||||
|
Reference in New Issue
Block a user