Skip to content

Commit

Permalink
Refactor: Added empty imgui_widgets.cpp + updated project files / mak…
Browse files Browse the repository at this point in the history
…efiles etc. accordingly (#2036)
  • Loading branch information
ocornut committed Aug 30, 2018
1 parent 6c34bff commit e312363
Show file tree
Hide file tree
Showing 29 changed files with 76 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Dear ImGui is self-contained within a few files that you can easily copy and com
- imgui.h
- imgui_demo.cpp
- imgui_draw.cpp
- imgui_widgets.cpp
- imgui_internal.h
- imconfig.h (empty by default, user-editable)
- stb_rect_pack.h
Expand Down
1 change: 1 addition & 0 deletions examples/example_allegro5/example_allegro5.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_allegro5.cpp" />
<ClCompile Include="imconfig_allegro5.h" />
<ClCompile Include="main.cpp" />
Expand Down
3 changes: 3 additions & 0 deletions examples/example_allegro5/example_allegro5.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<ClCompile Include="imconfig_allegro5.h">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\imconfig.h">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_freeglut.cpp" />
<ClCompile Include="..\imgui_impl_opengl2.cpp" />
<ClCompile Include="main.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<ClCompile Include="..\imgui_impl_opengl2.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\imconfig.h">
Expand Down
2 changes: 1 addition & 1 deletion examples/example_glfw_opengl2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
EXE = example_glfw_opengl2
SOURCES = main.cpp
SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_opengl2.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))

UNAME_S := $(shell uname -s)
Expand Down
1 change: 1 addition & 0 deletions examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_glfw.cpp" />
<ClCompile Include="..\imgui_impl_opengl2.cpp" />
<ClCompile Include="main.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<ClCompile Include="..\imgui_impl_opengl2.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\imconfig.h">
Expand Down
2 changes: 1 addition & 1 deletion examples/example_glfw_opengl3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
EXE = example_glfw_opengl3
SOURCES = main.cpp
SOURCES += ../imgui_impl_glfw.cpp ../imgui_impl_opengl3.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
UNAME_S := $(shell uname -s)

Expand Down
1 change: 1 addition & 0 deletions examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_glfw.cpp" />
<ClCompile Include="..\imgui_impl_opengl3.cpp" />
<ClCompile Include="..\libs\gl3w\GL\gl3w.c" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
<ClCompile Include="..\imgui_impl_opengl3.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\imconfig.h">
Expand Down
1 change: 1 addition & 0 deletions examples/example_marmalade/marmalade_example.mkb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ files
../../imgui.cpp
../../imgui_demo.cpp
../../imgui_draw.cpp
../../imgui_widgets.cpp
../../imconfig.h
../../imgui.h
../../imgui_internal.h
Expand Down
2 changes: 1 addition & 1 deletion examples/example_sdl_opengl2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

EXE = example_sdl_opengl2
SOURCES = main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))

UNAME_S := $(shell uname -s)
Expand Down
3 changes: 2 additions & 1 deletion examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}</ProjectGuid>
<ProjectGuid>{94E991D0-790A-4DAF-B442-AAADE3233C75}</ProjectGuid>
<RootNamespace>example_sdl_opengl2</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down Expand Up @@ -153,6 +153,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_opengl2.cpp" />
<ClCompile Include="..\imgui_impl_sdl.cpp" />
<ClCompile Include="main.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<ClCompile Include="..\imgui_impl_opengl2.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\imconfig.h">
Expand Down
2 changes: 1 addition & 1 deletion examples/example_sdl_opengl3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
EXE = example_sdl_opengl3
SOURCES = main.cpp
SOURCES += ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
UNAME_S := $(shell uname -s)

Expand Down
1 change: 1 addition & 0 deletions examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_opengl3.cpp" />
<ClCompile Include="..\imgui_impl_sdl.cpp" />
<ClCompile Include="..\libs\gl3w\GL\gl3w.c" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
<ClCompile Include="..\imgui_impl_sdl.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\imconfig.h">
Expand Down
1 change: 1 addition & 0 deletions examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_sdl.cpp" />
<ClCompile Include="..\imgui_impl_vulkan.cpp" />
<ClCompile Include="main.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<ClCompile Include="..\imgui_impl_vulkan.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\imconfig.h">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_dx10.cpp" />
<ClCompile Include="..\imgui_impl_win32.cpp" />
<ClCompile Include="main.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<ClCompile Include="..\imgui_impl_win32.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\README.txt" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_dx11.cpp" />
<ClCompile Include="..\imgui_impl_win32.cpp" />
<ClCompile Include="main.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<ClCompile Include="..\imgui_impl_dx11.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\README.txt" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_dx12.cpp" />
<ClCompile Include="..\imgui_impl_win32.cpp" />
<ClCompile Include="main.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<ClCompile Include="..\imgui_impl_win32.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\README.txt" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
<ClCompile Include="..\..\imgui.cpp" />
<ClCompile Include="..\..\imgui_demo.cpp" />
<ClCompile Include="..\..\imgui_draw.cpp" />
<ClCompile Include="..\..\imgui_widgets.cpp" />
<ClCompile Include="..\imgui_impl_dx9.cpp" />
<ClCompile Include="..\imgui_impl_win32.cpp" />
<ClCompile Include="main.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<ClCompile Include="..\imgui_impl_dx9.cpp">
<Filter>sources</Filter>
</ClCompile>
<ClCompile Include="..\..\imgui_widgets.cpp">
<Filter>imgui</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\imconfig.h">
Expand Down
25 changes: 25 additions & 0 deletions imgui_widgets.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// dear imgui, v1.64 WIP
// (widgets code)

#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif

#include "imgui.h"
#ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
#endif
#include "imgui_internal.h"

//-------------------------------------------------------------------------
// Forward Declarations
//-------------------------------------------------------------------------

//-------------------------------------------------------------------------
// Shared Utilities
//-------------------------------------------------------------------------

//-------------------------------------------------------------------------
// Widgets
//-------------------------------------------------------------------------

0 comments on commit e312363

Please sign in to comment.