40 Commits

Author SHA1 Message Date
Chris Frantz
be4fe2af61 Initial Tables API
A naive and incomplete binding to the ImGui Tables API.

Signed-off-by: Chris Frantz <frantzcj@gmail.com>
2021-09-14 11:07:12 -04:00
dbr
79aaf9f62c fmt 2021-09-14 11:18:03 +10:00
dbr
32e0555f5f Add bindings to BeginDisabled/EndDisabled
Closes #518
2021-09-14 11:18:03 +10:00
dbr
28dece5682 Memories of DHTML snow effects, or, a typo 2021-09-14 11:18:03 +10:00
dbr
e39ab4249e Change structs to match imgui 1.84
Also change oddly-specific test to avoid having to change it every update
2021-09-14 11:18:03 +10:00
dbr
6007bc5a4b Update imgui to 1.84.2 #512
Changes required:
- Overloaded methods named slightly differently (e.g sys::igPlotHistogramFloatPtr to sys::igPlotHistogram_FloatPtr)
- ImGuiNavInput_KeyMenu_ was removed upstream, so NavInput::INTERNAL_COUNT needed tweaked
2021-09-14 11:17:55 +10:00
Jack Mac
ee1d921799 can't use intradoc...yet 2021-09-13 17:12:27 -04:00
Jack Mac
c62c609de5 making us have good links 2021-09-13 17:12:27 -04:00
Jack Mac
3eaee3359d imstr and imstring have been removed.
fixed some instability and added a hacky shim to input_text functions.
We're looking okay so far, but more testing will be needed
2021-09-13 17:12:00 -04:00
Jack Mac
694cd96d49 getting close! input_text resize is broken,
and i'll need to check the imgui docs example with std::string
to get a reference to how to do it properly.
2021-09-13 17:12:00 -04:00
Jack Spira
5143968429 updating more widgets. Wow this is boring! 2021-09-13 17:12:00 -04:00
Jack Spira
540aa5f292 converted combo_box and drag 2021-09-13 17:11:32 -04:00
Jack Spira
5802931a88 did some work and began converting modules over 2021-09-13 17:10:43 -04:00
Jack Spira
52e08bd09a init effort 2021-09-13 17:10:43 -04:00
Jack Spira
64f5787940 Somehow the text flags are getting sheared in multiline inputs?
let's just ignore them!
2021-09-07 15:04:30 -07:00
Jack Spira
9b27edf440 working on some tests. this commit is broken 2021-09-07 15:04:29 -07:00
dbr
28e66b833c fmt 2021-09-05 11:55:13 -07:00
dbr
5317eae5ec Also re-export InputTextFlags 2021-09-05 11:55:12 -07:00
dbr
1d9539754b Re-export imgui::widget::misc to expose ButtonFlags
Required to use ui.invisible_button_flags(...)
2021-09-05 11:55:12 -07:00
Thom Chiovoloni
cb918fc652 Update Dear Imgui to v1.82 2021-04-04 17:29:16 -07:00
dbr/Ben
965dd87892
Merge branch 'master' into drawimage 2021-03-09 10:27:23 +11:00
Thom Chiovoloni
d0e2be1678
Merge pull request #457 from dbr/imgui-v1.81 2021-03-06 15:49:11 -08:00
toyboot4e
9b90f0e9d0 Add doc aliases 2021-03-05 14:00:06 +09:00
Jonathan Spira
8c328001d0 Added ext function variants to the majority of overloaded functions in ImGui 2021-03-04 10:58:30 -08:00
dbr
507d5d5065 Update to imgui 1.81
Changes:

- No more ListBox::calculate_size(...) as this was deprecated upstream
2021-03-03 15:36:28 +11:00
Jonathan Spira
468d6c8a33 removed my changelog 2021-02-28 21:29:06 -08:00
Jonathan Spira
52b0da64a5 holy god, the suffering 2021-02-28 21:29:05 -08:00
dbr
a90989db58 Make draw_list module public 2021-02-20 20:01:26 +11:00
dbr
b3a50e6928 Finally, remove legacy.rs
Any use of imgui::ImGuiTreeNodeFlags should be updated to imgui::TreeNodeFlags
2021-02-11 14:33:10 +11:00
Jonathan Spira
6b2983e591
Merge branch 'master' into feat_drag_drop 2021-02-04 00:40:57 -08:00
Jonathan Spira
2a1ced631a Updated 2021-02-03 00:40:10 -08:00
Thom Chiovoloni
a359c3940f Update pointless test 2021-02-01 08:37:31 -08:00
Thom Chiovoloni
59970d670e Constify a large number of fns 2021-02-01 03:00:04 -08:00
Thom Chiovoloni
4f1cde06f2 ImColor changes and improvements:
- Renamed to `ImColor32` to avoid confusion with `ImColor` from the C++.
  code: https://github.com/ocornut/imgui/blob/9499afdf/imgui.h#L2180
    - Eventually I'd probably like to add something mirroring the actual
      `ImColor`.

- Now supports construction and access from `const fn` where possible.
    - Still impossible for the `f32` APIs

- Now supports `.r`/`.g`/`.b`/.a` field access (read and write), by way
  of a new type `imgui::color::ImColor32Fields`, which essentially
  exists just to serve this purpose. This is a bit cludgey, but lets us
  provide the ability for reading and writing `r/g/b/a` values without
  adding many `fn get_r(self) -> u8` and `fn set_r(&mut self, r: u8);`
  style functions.

- No longer requires FFI calls to construct from RGB floats.
    - This gives much more freedom to the optimizer, as external calls
      are impenetrable optimization barriers (It has to pessimistially
      assume that they read/write to all globally accessable memory, and
      must be called in the exact order that is listed).
    - Also, it allows inlining these calls, and avoid computing the same
      value twice (if the args are the same).

    - Also improves usage from IDEs, debuggers, etc, and avoids a rare
      possibility of UB if NaN was passed in (however, this almost
      certainly could only cause problems if cross-lang LTO was used,
      which I believe we don't support).

    - This code is more complex than needed, but was taken from another
      project of mine (functions were renamed to line up with imgui's
      names), and has good (literally exhaustive) test coverage.

    - Unfortunately, float arithmetic in const fn is still not allowed,
      so for now these aren't usable `const fn`.

- Added utility constants to mirror the `IM_COL32_WHITE`,
  `IM_COL32_BLACK`, `IM_COL32_BLACK_TRANS` constants.
2021-02-01 01:45:39 -08:00
Jonathan Spira
72007c06b6 final version 2021-01-26 00:31:51 -08:00
Jonathan Spira
35c0cf0e6f drag and drop experimental implementation 2021-01-24 14:55:03 -08:00
nsf
171d86aea1 Refactor WindowDrawList into DrawListMut and fix #413.
- Rename WindowDrawList -> DrawListMut. It's not about window draw lists, but
  about background/foreground draw lists as well. The naming was not an easy
  choice, but seems like in rust it's a common convention to add a Mut suffix for
  mutable entities. Imgui-rs already has DrawList and it acts as an immutable
  reference type for rendering implementations to consume. Hence the name
  DrawListMut, which becomes a mutable reference to draw list with methods
  to modify it.
- Add Ui::get_foreground_draw_list(). Same as Ui::get_background_draw_list()
  but for foreground.
- Add draw_list example which shows the use of all three draw lists
  (window, bg, fg).
2020-12-31 20:20:36 -08:00
henbr
936e63bdfa Add ListClipper wrapper 2020-12-31 13:06:29 -08:00
Willem Verstraeten
9210130872 added richer support for ListBox 2020-12-13 10:54:35 -08:00
Thom Chiovoloni
0df089ab29 Move to virtual workspace 2020-12-06 09:32:21 -08:00