Commit Graph

325 Commits

Author SHA1 Message Date
Evan Pezent
93ce4160a4 refactor a few time utils; add Now/Today (#605) 2024-12-21 11:32:57 -06:00
ocornut
419a8a0f5f Added support for IMGUI_DISABLE. (#563) 2024-10-29 17:36:47 +01:00
Michael Böhme
9be791503c Added header guard for IMGUI_DEFINE_MATH_OPERATORS (#546, #449) 2024-10-29 17:29:17 +01:00
helmutbuhler
33811aae48 Fix typo in user guide 2024-10-29 17:26:20 +01:00
ocornut
f156599fae Remove trailing blanks. 2024-01-22 11:32:06 +01:00
ocornut
1f7a8c0314 Using offsetof() instead of obsoleted IM_OFFSETOF()
Said macro has been using offsetof() for a long time now.
2023-11-09 16:45:57 +01:00
elvissteinjr
065acc3319 Fix EndPlot() not deducing auto color for ImPlotCol_PlotBorder (#517) 2023-09-26 10:16:40 -05:00
ocornut
5e5e884a7d Fix using ImFloor() instead of IM_FLOOR().
Macro got renamed in IMGUI_VERSION_NUM 18993. Technically old ImFloor()/IM_FLOOR() was a trunc(). New ImFloor() is an actual floor(), works with signed value, so good for position.
2023-09-26 11:15:30 +02:00
Mikhail
7b9171569b Ability to query point, line and rect drags for their click, hovered and held states (#507)
* Added optional parameters to Drag.. functions to query state of items: clicked, hovered, held

See also #506

* Updated click/hover/held code

* Added demo
* DragRect is now report state of the entire rect

* Fix DragRect interaction; improve demo; some preferential changes

* Added held state handling for the DragRect rectangle

---------

Co-authored-by: epezent <epezent16@gmail.com>
2023-08-23 11:55:25 -05:00
Evan Pezent
a2632b9d0b Implement legend scrolling and update scroll capture behavior when zooming (#504)
* Fully functional legend scrolling

* refactor legend scroll capture

* remove ImPlotFlags_NoChild scroll capturing in favor of ImGui::SetKeyOwner

* change scroll capture behavior to only capture if scroll can be consumed

* rev version, add note about removal of ImPlotFlags_NoChild
2023-08-20 17:17:34 -05:00
epezent
18c72431f8 Update version and copyright year 2023-08-19 21:43:34 -05:00
epezent
b5b796a1d4 Skip tick Locators if plot height/width is 0 or negative 2023-08-19 20:59:30 -05:00
epezent
1ff4b45819 Fix IsSubplotsHovered with ImGuiHoveredFlags_AllowWhenBlockedByActiveItem 2023-08-19 20:29:20 -05:00
Marcus Eriksson
59a97acc66 Use %g for the min/max sliders in the plot axis context menu (#474)
Co-authored-by: sthenic <sthenic@users.noreply.github.com>
2023-08-18 19:35:20 -05:00
Giuseppe Barbieri
cf9834b633 Update implot_internal.h (#487)
* Update implot_internal.h

Removed duplicated code

* Update implot.cpp

Fixed bug in ShowPlotContextMenu
2023-08-18 19:31:49 -05:00
ocornut
85573fe04a Version 0.15
Add missing changelog.
v0.15 tag/release was previously set on cc5e1da about 3 weeks ago, will attempt to change tag into this commit.
2023-08-06 19:22:08 +02:00
ocornut
cc5e1daa5c Fixes for 1.89.7 + new ImGuiButtonFlags_AllowOverlap behavior handled by ButtonBehavior() fixes other items from hovering while dragging plot. 2023-06-28 15:04:11 +02:00
ocornut
6dd8007e8e Removed misleading/unnecessary use of ImGuiButtonFlags_AllowItemOverlap in BeginSubplots(). (#203)
Likely this was pulled from SplitterBehavior(), where it made senses but only given the possibility user would call SetItemAllowOverlap() after.
AFAIK after debugging the code I _think_ this has no meaningful side-effect. Also removed same thing in Tables code in core lib.
Flag added in 4a1ee88c13.
2023-06-28 15:04:11 +02:00
omar
18758e237e Avoid fetching GImPlot multiple times when possible. (#468)
In the case this is a thread_local variable it is best to avoid fetching too many times.
Either way local caching tends to be beneficial as a non-local variable would often be fetched multiple times.
2023-04-19 18:35:30 +02:00
Minty-Meeo
fb084f3719 Use 'nullptr' instead of 'NULL' (#465) 2023-04-17 15:21:32 +02:00
omar
33c5a965f5 Fixes for requirement to define IMGUI_DEFINE_MATH_OPERATORS before imgui.h (or at least at imconfig) (#449) 2023-02-15 19:53:25 -06:00
omar
626e391670 Fixes for ImGuiModFlags_XXX -> ImGuiMod_XXX (v1.89) (#347) (#407)
Sorry!
2022-09-29 13:00:23 -05:00
omar
8879c99aef Fix for allowing core imgui to use typed ImGuiCol / ImGuiStyleVar enums. (#405) 2022-09-23 19:30:19 -05:00
Evan Pezent
3e13c95986 Add ImPlotLegendFlags_Sort (#404)
* add ImPlotLegendFlags_Sort

* replace qsort_s with qsort
2022-09-17 14:23:26 -05:00
Evan Pezent
4ba42f200a address a few static analysis warnings 2022-09-17 13:17:07 -05:00
Evan Pezent
57149164d5 Fix clamp in SetupAxisTicks 2022-09-17 10:25:30 -05:00
Evan Pezent
921a81f307 Replace assert with clamp in SetupAxisTicks 2022-09-17 10:20:20 -05:00
ozlb
e80e42e8b4 ImPlotTimeFmt_MinSMs (#383) 2022-07-29 07:57:51 -05:00
ozlb
220f5c9ab4 Annotation Label y axis fix (#384) 2022-07-28 22:41:21 -05:00
Evan Pezent
7a470b2e17 add ImPlotAxisFlags_NoSideSwitch and ImPlotAxisFlags_NoHighlight 2022-07-07 20:27:24 -05:00
Evan Pezent
f33a5990d7 Merge branch 'master' of https://github.com/epezent/implot 2022-07-07 19:04:24 -05:00
Evan Pezent
1fed5c2c19 temp fix for time formatted mouse position text 2022-07-07 19:04:16 -05:00
K
b4aec718a5 fix merge typo in Locator_Time() (#380) 2022-07-07 18:31:05 -05:00
Evan Pezent
6c00109636 make ColormapScale reversable 2022-06-20 07:48:51 -05:00
Evan Pezent
0f4d4dccc3 add ImPlotColormapScaleFlags 2022-06-19 22:51:51 -05:00
Evan Pezent
63d5ed94b7 Features/item flags (#319)
* add PlotBarGroups and layout some plans for flags

* exprimentin

* item flags added to each plotter

* rendering templates

* rendering templates

* item flags and axis scales

* item flags

* template markers

* markers

* benching

* buffer

* inline adjust

* inline fix

* dunno

* fix some todos

* tickers

* clean up

* update TODO

* update breaking changes

* demo cleanup

* remove TODO label

* header cleanup
2022-06-18 22:59:32 -05:00
Rokas Kupstys
79b05d5e25 Fix freed memory read error in AddTicksTime(). Invalid read occurred when LabelTickTime() resizes ticks.TextBuffer while last_major held pointer pointing into old now freed buffer. (#365)
Fixed a warning about condition depending on uninitialized ImPlotLegend::PreviousLocation.
2022-06-17 09:09:25 -05:00
Evan Pezent
32a4617cd6 fix legend icons and drag tools with ImGui::KeepAliveID 2022-05-08 10:23:42 -05:00
omar
1160243218 Fix for 1.88 WIP (18716) renaming ImGuiKeyModFlags to ImGuiModFlags (#347) 2022-04-05 06:58:12 -07:00
Evan Pezent
f438a21813 fix comment find/replace accident 2022-01-30 10:26:21 -08:00
Evan Pezent
86f4dd6e5c use ImFormatString instead of sprintf/snprintf 2022-01-30 10:19:29 -08:00
Evan Pezent
adfc96810e remove unecessary msvc warning disables 2022-01-30 10:08:55 -08:00
Evan Pezent
8d3bd31395 -Wformat-nonliteral 2022-01-30 10:06:39 -08:00
Evan Pezent
c0da6fea04 add PlotBarGroups 2021-10-24 00:25:46 -07:00
Evan Pezent
6ee1559715 Setup API (#294)
* add new padding algo

* opposite working for y and x

* remove name axis colors

* move title label rendering

* axis dev

* clean up

* pre formatter

* formatter

* changing over to multi x axes

* more multi x changes

* more multi x changes

* more multi x changes

* setup 75% there

* 85% there

* 85% there

* remove query

* update input handling

* input and dnd tweaking

* input testing

* update demo

* setup debug

* setup debug

* bug fixes

* bug fixes

* more debug

* input

* more setup

* setup api almost complete

* setup api almost complete

* more clean up

* cleanup

* final commit before merge
2021-10-19 20:01:06 -07:00
Evan Pezent
c40206f2ea spaces 2021-09-07 20:24:34 -07:00
sergeyn
0fb3346a7a custom context management (same way as in ImGui) (#278) 2021-08-24 08:08:00 -07:00
Evan Pezent
3e96fd7c02 improve indexing, line rendering performance by 45% (#270)
* add IndexData and Indexers

* simplify transformers

* 30% improvement

* moving around

* add TODO.md

* fix bar plot aliasing

* finishup indexing

* remove debug bools
2021-07-30 20:27:02 -07:00
Evan Pezent
c8601ac0d5 rev version, fix unused lines 2021-07-29 19:14:13 -07:00
Evan Pezent
4be83def59 add IsSubplotsHovered 2021-07-28 11:52:57 -07:00