Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade/v1.82 #192

Merged
merged 116 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
2ce6a3a
checkout imgui-cpp v1.79
KinoxKlark Dec 14, 2020
d383ef0
checkout actual v1.97 branch, not master -.-
KinoxKlark Dec 14, 2020
df37255
fix direct errors: DisplayVisibleMin, DisplayVisibleMax removed and C…
KinoxKlark Dec 14, 2020
e58e611
Mark Obsoleted functions
KinoxKlark Dec 14, 2020
51dd2f8
update api - shall be fix!
KinoxKlark Dec 14, 2020
c0dc4e7
old api bug fixes
KinoxKlark Dec 14, 2020
97f14cd
update forward declaration
KinoxKlark Dec 14, 2020
3c54a6d
api update
KinoxKlark Dec 14, 2020
2dd78bc
update enums
KinoxKlark Dec 14, 2020
60151d4
fix tests
KinoxKlark Dec 14, 2020
2df3d4b
enum implementation
KinoxKlark Dec 14, 2020
d800520
Mapping of SetNextWindowSizeConstraints() - Ignore callbacks for now
KinoxKlark Dec 14, 2020
8fd6b38
Merge branch 'master' into upgrade/v1.79
KinoxKlark Dec 14, 2020
0d2d6f0
mapping of SetScrollHereX/Y and SetScrollFromPosX/Y
KinoxKlark Dec 14, 2020
ebabdb7
mapping SliderAngle + add SliderFlags documentation
KinoxKlark Dec 15, 2020
94b5c89
Update SliderXXX to use SliderFlags + doc, kept power parameter for l…
KinoxKlark Dec 15, 2020
4549962
Update DragXXX to use SliderFlags + doc, kept power parameter for leg…
KinoxKlark Dec 15, 2020
0f7fdae
update sliderflag doc
KinoxKlark Dec 15, 2020
42beb43
remove NEW mark from updated api
KinoxKlark Dec 15, 2020
b66cc09
mapping of GetDragDropPayload()
KinoxKlark Dec 15, 2020
a4d704f
mapping of ShowAboutWindow()
KinoxKlark Dec 15, 2020
92972ad
mapping of BeginTabBar(), EndTabBar(), EndTabItem(), TabItemButton(),…
KinoxKlark Dec 15, 2020
f36d076
fix doc for slider flags
KinoxKlark Dec 15, 2020
32b5b52
update flags documentation
KinoxKlark Dec 15, 2020
0f6660b
mapping of ImDrawData::DisplayPos, ImDrawData::DisplaySize, and ImDra…
KinoxKlark Dec 15, 2020
b4029a6
mapping of IsItemEdited(), IsItemActivated(), IsItemDeactivated(), Is…
KinoxKlark Dec 15, 2020
67f729e
mapping of ImGuiStyle::LogSliderDeadzone, ImGuiStyle::TabRounding, Im…
KinoxKlark Dec 15, 2020
dac7b8e
mapping of GetBackgroundDrawList() and GetForegroundDrawList()
KinoxKlark Dec 15, 2020
252005a
mapping of InputTextWithHint()
KinoxKlark Dec 15, 2020
964a838
InputFloatXXX() was already upto date
KinoxKlark Dec 15, 2020
51ca1f9
mapping of SetNextItemWidth()
KinoxKlark Dec 15, 2020
2fa6b3e
Change signature of AddInputCharacter from 'unsigned short c' to 'uns…
KinoxKlark Dec 15, 2020
4050e24
mapping of SetNextItemOpen()
KinoxKlark Dec 15, 2020
6f63f75
Merge branch 'master' into upgrade/v1.79
KinoxKlark Dec 15, 2020
ddb84d3
apply patch from @swistakm
KinoxKlark Dec 15, 2020
200715a
update font api
KinoxKlark Dec 16, 2020
eaabd33
mapping of GetTreeNodeToLabelSpacing()
KinoxKlark Dec 16, 2020
bce2b62
mapping of ImGuiStyle::ColorButtonPosition and ImGuiStyle::WindowMenu…
KinoxKlark Dec 16, 2020
c2f5d79
update draw api
KinoxKlark Dec 16, 2020
51b41cf
minor notation fix in api
KinoxKlark Dec 16, 2020
dd4f167
mapping of ImDrawList::AddNgon() ImDrawList::AddNgonFilled()
KinoxKlark Dec 16, 2020
31b092c
AddRect*() fix DrawCornerFlag defaults + AddCircle*() num_segment now…
KinoxKlark Dec 16, 2020
7384bc4
IsKeyPressed() first argument should not be default anymore + fixing …
KinoxKlark Dec 16, 2020
3d1bbff
IsItemClicked() args change from int to ImGuiMouseButton
KinoxKlark Dec 16, 2020
39674fa
doc change for ChannelsSplit()
KinoxKlark Dec 16, 2020
9c0516b
mapping of AddInputCharacterUTF16()
KinoxKlark Dec 16, 2020
2be7847
update mapping of BeginPopupContextWindow()
KinoxKlark Dec 16, 2020
5a725f0
mapping of OpenPopupOnItemClick(), BeginPopupContextVoid(), and IsPop…
KinoxKlark Dec 16, 2020
b9f2476
mapping of GetGlyphRangesThai() and GetGlyphRangesVietnamese()
KinoxKlark Dec 16, 2020
5337f39
clean api : obsoleted use of power in float/scalar drag and siders
KinoxKlark Dec 16, 2020
84eb46b
mapping of ImGuiIO::MetricsRenderIndices, ImGuiIO::MetricsRenderWindo…
KinoxKlark Dec 16, 2020
638f0a3
InvisibleButton() now take a ImGuiButtonFlags as input
KinoxKlark Dec 16, 2020
dab06b8
update api
KinoxKlark Dec 16, 2020
b0650e2
update api
KinoxKlark Dec 16, 2020
f9dc20b
code homogenization: arguments have name and default values are indic…
KinoxKlark Dec 16, 2020
eb817ef
Merge branch 'master' into upgrade/v1.79
KinoxKlark Dec 16, 2020
696416b
fix InputDouble()
KinoxKlark Dec 16, 2020
6cc0b37
mapping of ImGuiIO::ConfigWindowsMoveFromTitleBarOnly and ImGuiIO::Co…
KinoxKlark Dec 16, 2020
3bce3b6
mapping of CaptureMouseFromApp()
KinoxKlark Dec 16, 2020
1037fda
mapping of GetClipboardText() and SetClipboardText() + fix of GetClip…
KinoxKlark Dec 18, 2020
5a426eb
mapping of LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), Sa…
KinoxKlark Dec 19, 2020
516ec50
fix typo : setting -> settings
KinoxKlark Dec 19, 2020
b0c9bb4
mapping of ColorConvertU32ToFloat4(), ColorConvertFloat4ToU32(), Colo…
KinoxKlark Dec 19, 2020
5db7555
mapping of InputScalar(), InputScalarN(), DragScalar(), DragScalarN()…
KinoxKlark Dec 21, 2020
d106dda
Merge branch 'master' into upgrade/v1.79
KinoxKlark Dec 21, 2020
dd26f85
merge
KinoxKlark Dec 21, 2020
dec88c9
mapping of DragFloatRange2() and DragIntRange2()
KinoxKlark Dec 22, 2020
0f62cf5
fix various compiler warning
KinoxKlark Dec 22, 2020
c7768d9
mapping of PushClipRect() and PopClipRect()
KinoxKlark Dec 23, 2020
46c8d0e
mapping of various methods in DrawList: Flags, PushClipRect(), PushCl…
KinoxKlark Dec 23, 2020
fa9f6a4
mapping of ImDrawList methods: PrimReserve(), PrimUnreserve(), PrimRe…
KinoxKlark Dec 23, 2020
fd0eb13
Add submodule pyimgui.internal for the mapping of imgui_internal.h + …
KinoxKlark Dec 23, 2020
46ef460
fix completion.py: should take a list of .pxd files instead of a uniq…
KinoxKlark Dec 23, 2020
93226a4
fix missing directives in common.pyx
KinoxKlark Dec 24, 2020
5446512
fix completion estimate file encoding (did not work on window)
KinoxKlark Dec 24, 2020
fd755b3
internal enums
KinoxKlark Dec 26, 2020
6a32d05
internal API
KinoxKlark Dec 26, 2020
8fc3f07
Update key mapping + fix pygame key mapping and deltatime
KinoxKlark Jan 23, 2021
53fe1f3
fix io.delta_time <= 0.0 error
KinoxKlark Jan 23, 2021
8d5ce56
mapping of io.NavInputs
KinoxKlark Jan 23, 2021
f8c8e35
fix typo: NAV_INPUT_TWEAK_FAST
KinoxKlark Jan 23, 2021
8ef4914
typo NAV_INPUT_TWEAK_SLOW again...
KinoxKlark Jan 25, 2021
e7c80f6
implement callbacks
KinoxKlark Jan 25, 2021
c4e4e4d
mapping of ImGuiSizeCallbackData
KinoxKlark Jan 25, 2021
d9346a5
mapping of ImGuiInputTextCallbackData
KinoxKlark Jan 25, 2021
f19e8c7
code cleaning
KinoxKlark Jan 25, 2021
9ea8871
adding callback tests
KinoxKlark Jan 26, 2021
4fedfce
merge with master
KinoxKlark Jan 26, 2021
7fb352b
update imgui submodule from 1.79 to 1.80
KinoxKlark Jan 26, 2021
dae3053
update API to 1.80
KinoxKlark Jan 26, 2021
d6ad0f6
add new flags
KinoxKlark Jan 26, 2021
c5e040c
mapping of ImGuiIO::ConfigDragClickToInputText and ImGuiStyle::CellPa…
KinoxKlark Jan 26, 2021
0e9560d
ProgressBar() now takes (-FLT_MIN,0) as default value for size_arg
KinoxKlark Jan 26, 2021
c02dbde
renaming of CollapsingHeader's argument from p_open to p_visible
KinoxKlark Jan 26, 2021
b2e93fd
mapping of BeginTable(), EndTable(), TableNextColumn(), TableSetColum…
KinoxKlark Jan 26, 2021
697908a
Merge branch 'master' into upgrade/v1.79
KinoxKlark Jan 30, 2021
e85c064
change directory for callbacks tests beacause it produces errors in t…
KinoxKlark Feb 11, 2021
8343a5a
stretch upgrade to ImGui v1.81
KinoxKlark Feb 11, 2021
5e0490c
Merge branch 'upgrade/v1.79' of https://github.com/KinoxKlark/pyimgui…
KinoxKlark Feb 11, 2021
ddefb4b
change internal api notes from 'yet to be mapped' to 'may or may not …
KinoxKlark Feb 12, 2021
879b0e3
mark callback api for future implementation if callback system is acc…
KinoxKlark Feb 12, 2021
6c98874
move again callbacks tests to tests/ and ignore this file in setup.cfg
KinoxKlark Feb 12, 2021
0fa1730
Merge branch 'master' into upgrade/v1.79
KinoxKlark Mar 22, 2021
81d8b88
merge with with master
KinoxKlark Mar 22, 2021
0da3b78
Merge branch 'upgrade/v1.79' of https://github.com/KinoxKlark/pyimgui…
KinoxKlark Mar 22, 2021
a2f46a7
stretch upgrade to imgui v1.82
KinoxKlark Mar 22, 2021
b4faf40
fix: wrong flags marked as obsoleted
KinoxKlark Mar 22, 2021
f31188d
attempt to fix python 2.7 build pipeline
KinoxKlark Mar 23, 2021
04bb87e
wrap str in _bytes()
hinxx Mar 23, 2021
3b1c177
Merge pull request #1 from hinxx/string-as-bytes
KinoxKlark Mar 23, 2021
22d452b
Upgraded demos to function on 1.82
billsix Mar 27, 2021
45e186d
Merge pull request #3 from billsix/upgrade/v1.79
KinoxKlark Mar 27, 2021
bd532d5
Merge push request #224 from @gqw: fix - example cannot close custom …
KinoxKlark Apr 5, 2021
589a300
Merge branch 'upgrade/v1.79' of https://github.com/KinoxKlark/pyimgui…
KinoxKlark Apr 5, 2021
e559f9f
Merge branch 'dev/version-2.0' into upgrade/v1.79
KinoxKlark Aug 27, 2021
8f4e372
fix flag + readme badge
KinoxKlark Aug 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ clean:
.PHONY: build
build: bootstrap
_CYTHONIZE_WITH_COVERAGE=1 python -m pip install -e . -v
python ci/completion.py -o README.md with-pxd imgui/cimgui.pxd
python ci/completion.py -o README.md with-pxd imgui/cimgui.pxd imgui/internal.pxd


.PHONY: rebuild
Expand Down
6 changes: 3 additions & 3 deletions ansifeed-cpp/AnsiTextColored.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ namespace ImGui
// so this is merely to handle direct calls.

// Align to be pixel perfect
pos.x = (float)(int)pos.x + font->DisplayOffset.x;
pos.y = (float)(int)pos.y + font->DisplayOffset.y;
pos.x = (float)(int)pos.x;
pos.y = (float)(int)pos.y;
float x = pos.x;
float y = pos.y;
if (y > clip_rect.w)
Expand Down Expand Up @@ -447,7 +447,7 @@ namespace ImGui
if (text_end == NULL)
text_end = text + strlen(text); // FIXME-OPT

const ImVec2 text_pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrentLineTextBaseOffset);
const ImVec2 text_pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset);
const float wrap_pos_x = window->DC.TextWrapPos;
const bool wrap_enabled = wrap_pos_x >= 0.0f;
if (text_end - text > 2000 && !wrap_enabled) {
Expand Down
10 changes: 6 additions & 4 deletions ci/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ def with_nm(ctx, srclib, dstlib):


@cli.command(name='with-pxd')
@click.argument('pxd_file', type=click.File('r'))
@click.argument('pxd_files', type=click.File('r', encoding='utf-8'), nargs=-1)
@click.pass_context
def with_pxd(ctx, pxd_file):
lines = pxd_file.readlines()

def with_pxd(ctx, pxd_files):
lines = []
for pxd_file in pxd_files:
lines += pxd_file.readlines()

all_count = len(list(filter(ALL_RE.match, lines)))
done_count = len(list(filter(DONE_RE.match, lines)))

Expand Down
2 changes: 2 additions & 0 deletions doc/examples/integrations_all_in_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def main_pygame():
if event.type == pygame.QUIT:
sys.exit()
renderer.process_event(event)
renderer.process_inputs()
imgui.new_frame()
on_frame()
# note: cannot use screen.fill((1, 1, 1)) because pygame's screen
Expand Down Expand Up @@ -162,6 +163,7 @@ def __init__(self):
self._text = "Input text here"

def draw(self, *args, **kwargs):
self.process_inputs()
imgui.new_frame()
on_frame()
gl.glClearColor(1., 1., 1., 1)
Expand Down
1 change: 1 addition & 0 deletions doc/examples/integrations_cocos2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def __init__(self):
self._text = "Input text here"

def draw(self, *args, **kwargs):
self.process_inputs()
imgui.new_frame()

if imgui.begin_main_menu_bar():
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/integrations_pygame.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def main():
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()

impl.process_event(event)
impl.process_inputs()

imgui.new_frame()

Expand Down
1 change: 1 addition & 0 deletions doc/examples/integrations_pyglet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def main():
impl = create_renderer(window)

def update(dt):
impl.process_inputs()
imgui.new_frame()
if imgui.begin_main_menu_bar():
if imgui.begin_menu("File", True):
Expand Down
2 changes: 2 additions & 0 deletions doc/source/guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ Usage guide
treenode-flags
selectable-flag
inputtext-flags
slider-flags
tabbar-flags

17 changes: 17 additions & 0 deletions doc/source/guide/slider-flags.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. _guide-slider-flags:

Using slider flags
======================

Slider functions accept various flags to manage their behaviour.

List of all available slider flags (click to see documentation):

.. _slider-flag-options:

* :py:data:`imgui.SLIDER_FLAGS_NONE`
* :py:data:`imgui.SLIDER_FLAGS_ALWAYS_CLAMP` Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
* :py:data:`imgui.SLIDER_FLAGS_LOGARITHMIC` Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlags_NoRoundToFormat with this if using a format-string with small amount of digits.
* :py:data:`imgui.SLIDER_FLAGS_NO_ROUND_TO_FORMAT` Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits)
* :py:data:`imgui.SLIDER_FLAGS_NO_INPUT` Disable CTRL+Click or Enter key allowing to input text directly into the widget

34 changes: 34 additions & 0 deletions doc/source/guide/tabbar-flag.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _guide-tabbar-flags:

Using tab bar flags
======================

Tab Bar functions accept various flags to manage their behaviour.

List of all available tab bar flags (click to see documentation):

.. _tabbar-flag-options:
* :py:data:`imgui.TAB_BAR_NONE`
* :py:data:`imgui.TAB_BAR_REORDERABLE`
* :py:data:`imgui.TAB_BAR_AUTO_SELECT_NEW_TABS`
* :py:data:`imgui.TAB_BAR_TAB_LIST_POPUP_BUTTON`
* :py:data:`imgui.TAB_BAR_NO_CLOSE_WITH_MIDDLE_MOUSE_BUTTON`
* :py:data:`imgui.TAB_BAR_NO_TAB_LIST_SCROLLING_BUTTONS`
* :py:data:`imgui.TAB_BAR_NO_TOOLTIP`
* :py:data:`imgui.TAB_BAR_FITTING_POLICY_RESIZE_DOWN`
* :py:data:`imgui.TAB_BAR_FITTING_POLICY_SCROLL`
* :py:data:`imgui.TAB_BAR_FITTING_POLICY_MASK`
* :py:data:`imgui.TAB_BAR_FITTING_POLICY_DEFAULT`

List of all available tab item flags (click to see documentation):

.. _tabitem-flag-options:
* :py:data:`imgui.TAB_ITEM_NONE`
* :py:data:`imgui.TAB_ITEM_UNSAVED_DOCUMENT`
* :py:data:`imgui.TAB_ITEM_SET_SELECTED`
* :py:data:`imgui.TAB_ITEM_NO_CLOSE_WITH_MIDDLE_MOUSE_BUTTON`
* :py:data:`imgui.TAB_ITEM_NO_PUSH_ID`
* :py:data:`imgui.TAB_ITEM_NO_TOOLTIP`
* :py:data:`imgui.TAB_ITEM_NO_REORDER`
* :py:data:`imgui.TAB_ITEM_LEADING`
* :py:data:`imgui.TAB_ITEM_TRAILING`
6 changes: 6 additions & 0 deletions doc/source/reference/imgui.internal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
imgui.internal module
=================

.. automodule:: imgui.internal
:members:
:undoc-members:
2 changes: 1 addition & 1 deletion imgui-cpp
Submodule imgui-cpp updated 183 files
Loading