Table.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #include "imguiWrappedHeader.h"
  2. #include "Table.h"
  3. #include "WrapperConverter.h"
  4. IggBool iggBeginTable(const char *str_id, int column, int flags,
  5. IggVec2 const *outer_size, float inner_width) {
  6. Vec2Wrapper outerSizeArg(outer_size);
  7. return ImGui::BeginTable(str_id, column, flags, *outerSizeArg, inner_width) ? 1 : 0;
  8. }
  9. void iggEndTable() { ImGui::EndTable(); }
  10. void iggTableNextRow(int row_flags, float min_row_height) {
  11. ImGui::TableNextRow(row_flags, min_row_height);
  12. }
  13. IggBool iggTableNextColumn() { return ImGui::TableNextColumn() ? 1 : 0; }
  14. IggBool iggTableSetColumnIndex(int column_n) {
  15. return ImGui::TableSetColumnIndex(column_n) ? 1 : 0;
  16. }
  17. void iggTableSetupColumn(const char *label, int flags,
  18. float init_width_or_weight, unsigned int user_id) {
  19. ImGui::TableSetupColumn(label, flags, init_width_or_weight, user_id);
  20. }
  21. void iggTableSetupScrollFreeze(int cols, int rows) {
  22. ImGui::TableSetupScrollFreeze(cols, rows);
  23. }
  24. void iggTableHeadersRow() { ImGui::TableHeadersRow(); }
  25. void iggTableHeader(const char *label) { ImGui::TableHeader(label); }
  26. IggImGuiTableSortSpecs *iggTableGetSortSpecs() {
  27. ImGuiTableSortSpecs *specs = ImGui::TableGetSortSpecs();
  28. return reinterpret_cast<IggImGuiTableSortSpecs *>(specs);
  29. }
  30. int iggTableGetColumnCount() { return ImGui::TableGetColumnCount(); }
  31. int iggTableGetColumnIndex() { return ImGui::TableGetColumnIndex(); }
  32. int iggTableGetRowIndex() { return ImGui::TableGetRowIndex(); }
  33. const char *iggTableGetColumnName(int column_n) {
  34. return ImGui::TableGetColumnName(column_n);
  35. }
  36. void iggTableSetBgColor(int target, unsigned int color, int column_n) {
  37. ImGui::TableSetBgColor(target, color, column_n);
  38. }
  39. int iggTableGetColumnFlags(int column_n) {
  40. return ImGui::TableGetColumnFlags(column_n);
  41. }