Skip to content

Commit

Permalink
Big refacto Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Lecrapouille committed Nov 27, 2023
1 parent 2fda06e commit 16942a5
Show file tree
Hide file tree
Showing 47 changed files with 1,317 additions and 1,286 deletions.
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ include $(M)/Makefile.header
###################################################
# Inform Makefile where to find *.cpp files
#
VPATH += $(P)/include $(P)/src $(P)/src/Net
VPATH += $(P)/src/Net/Formats $(P)/src/Editor
VPATH += $(P)/include $(P)/src $(P)/src/Utils $(P)/src/Net
VPATH += $(P)/src/Net/Imports VPATH += $(P)/src/Net/Exports
VPATH += $(P)/src/Application $(P)/src/Editor $(P)/src/Editor/DearImGui

###################################################
# Inform Makefile where to find header files
Expand Down Expand Up @@ -73,18 +74,18 @@ endif
#
ifeq ($(BACKEND),RayLib)
VPATH += $(THIRDPART)/rlImGui
VPATH += $(P)/src/Editor/Backends/RayLib
VPATH += $(P)/src/Application/DearImGui/Backends/RayLib
INCLUDES += -I$(THIRDPART)/rlImGui
INCLUDES += -I$(P)/src/Editor/Backends/RayLib
INCLUDES += -I$(P)/src/Application/DearImGui/Backends/RayLib
DEARIMGUI_BACKEND_OBJS += rlImGui.o
endif

###################################################
# Dear ImGui backends: OpenGL/GLFW3
#
ifeq ($(BACKEND),GLFW3)
VPATH += $(P)/src/Editor/Backends/GLFW3
INCLUDES += -I$(P)/src/Editor/Backends/GLFW3
VPATH += $(P)/src/Application/DearImGui/Backends/GLFW3
INCLUDES += -I$(P)/src/Application/DearImGui/Backends/GLFW3
DEARIMGUI_BACKEND_OBJS += imgui_impl_glfw.o imgui_impl_opengl3.o
endif

Expand Down Expand Up @@ -177,14 +178,14 @@ endif
###################################################
# Make the list of compiled files for the application
#
LIB_OBJS += Path.o Howard.o TimedTokens.o Receptivities.o
LIB_OBJS += Path.o Howard.o Utils.o TimedTokens.o Receptivities.o
LIB_OBJS += PetriNet.o Algorithms.o Simulation.o
LIB_OBJS += ImportJSON.o ExportJSON.o ExportSymfony.o ExportPnEditor.o
LIB_OBJS += ExportPetriLaTeX.o ExportJulia.o ExportGraphviz.o ExportDrawIO.o
LIB_OBJS += ExportGrafcetCpp.o
OBJS += $(DEARIMGUI_BACKEND_OBJS) $(DEARIMGUI_OBJS)
OBJS += $(LIB_OBJS)
OBJS += Application.o PetriEditor.o main.o
OBJS += DearUtils.o Drawable.o Application.o PetriEditor.o main.o

###################################################
# Compile the project, the static and shared libraries
Expand Down
5 changes: 3 additions & 2 deletions external/compile-external-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ print-compile raylib
(
cd raylib/src

# Fucking poor API !!!!! Need to hot patch
# Concerning .backup see https://www.themoderncoder.com/fix-sed-i-error-macos/
# Need to patch TakeScreenshot() function because it only accepts file name instead
# of file path which is the poorest idea ever!
# Note: Concerning .backup see https://www.themoderncoder.com/fix-sed-i-error-macos/
sed -i.backup 's/ExportImage(image, path)/ExportImage(image, fileName)/g' rcore.c

mkdir -p $ARCHI
Expand Down
284 changes: 28 additions & 256 deletions imgui.ini
Original file line number Diff line number Diff line change
@@ -1,281 +1,53 @@
[Window][Debug##Default]
Pos=781,204
Size=664,636
Collapsed=0

[Window][Dear ImGui Demo]
Pos=0,20
Size=693,670
Collapsed=0
DockId=0x00000002,2

[Window][DockSpace]
Size=1920,1080
Collapsed=0

[Window][DockSpaceViewport_11111111]
Pos=0,20
Size=1024,748
Collapsed=0

[Window][Delete?]
Pos=804,486
Size=311,107
Collapsed=0

[Window][DockSpace Demo]
Size=1920,1080
Collapsed=0

[Window][Dear ImGui Debug Log]
Pos=60,60
Size=607,156
Collapsed=0

[Window][Dear ImGui ID Stack Tool]
Pos=60,60
Size=440,289
Collapsed=0

[Window][About Dear ImGui]
Pos=60,60
Size=570,132
Collapsed=0

[Window][Dear ImGui Style Editor]
Pos=60,60
Size=350,1074
Pos=0,19
Size=1024,749
Collapsed=0

[Window][Example: Simple layout]
[Window][Debug##Default]
Pos=60,60
Size=500,440
Collapsed=0

[Window][Example: Custom rendering]
Pos=1,2
Size=1920,1080
Collapsed=0

[Window][Petri net: foo bar]
Pos=0,20
Size=693,670
Collapsed=0
DockId=0x00000002,0

[Window][Example: Custom Node Graph]
Size=1920,1080
Collapsed=0

[Window][Help]
Pos=505,19
Size=295,581
Collapsed=0

[Window][About]
Pos=505,19
Size=295,581
Size=400,400
Collapsed=0

[Window][Console]
Pos=0,20
Size=693,670
Pos=0,19
Size=751,699
Collapsed=0
DockId=0x00000002,1
DockId=0x00000001,1

[Window][Message]
Pos=0,692
Size=1024,76
Pos=0,720
Size=1024,48
Collapsed=0
DockId=0x00000004,0

[Window][Choose the Petri file to load##ChooseFileDlgKey]
Pos=62,98
Size=665,461
Collapsed=0

[Window][Critical Cycle]
Pos=332,231
Size=296,137
Collapsed=0

[Window][Counter Equation]
Pos=776,442
Size=500,144
Collapsed=0

[Window][Choose the Petri file to save##ChooseFileDlgKey]
Pos=75,72
Size=576,389
Collapsed=0

[Window][The file Already Exist !##Choose the Petri file to saveChooseFileDlgKeyOverWriteDialog]
Pos=243,240
Size=240,71
Collapsed=0

[Window][AboutModal]
Pos=332,273
Size=136,54
Collapsed=0

[Window][About TimedPetriNetEditor]
Pos=213,180
Size=374,240
Collapsed=0

[Window][Help TimedPetriNetEditor]
Pos=87,227
Size=296,94
[Window][Places]
Pos=753,19
Size=271,699
Collapsed=0
DockId=0x00000002,1

[Window][Dater Equation]
Pos=223,228
Size=353,144
[Window][Transitions]
Pos=753,19
Size=271,699
Collapsed=0
DockId=0x00000002,0

[Window][Arcs]
Pos=695,20
Size=329,670
Pos=753,19
Size=271,699
Collapsed=0
DockId=0x00000001,2
DockId=0x00000002,2

[Window][Places]
Pos=695,20
Size=329,670
[Window][Petri net]
Pos=0,19
Size=751,699
Collapsed=0
DockId=0x00000001,0

[Window][Transitions]
Pos=695,20
Size=329,670
Collapsed=0
DockId=0x00000001,1

[Table][0x5CB1E615,4]
RefScale=13
Column 0 Sort=0v

[Table][0xFA6BC193,4]
RefScale=13
Column 0 Sort=0v

[Table][0x27AC7ADE,4]
RefScale=13
Column 0 Sort=0v

[Table][0xBF212029,4]
RefScale=13
Column 0 Sort=0v

[Table][0x6DCF50C8,4]
RefScale=13
Column 0 Sort=0v

[Table][0x0A9CE5B8,4]
RefScale=13
Column 0 Sort=0v

[Table][0x940ED232,4]
RefScale=13
Column 0 Sort=0v

[Table][0xEE0E2E67,4]
RefScale=13
Column 0 Sort=0v

[Table][0xE1FA4928,4]
RefScale=13
Column 0 Sort=0v

[Table][0x20E863AE,4]
RefScale=13
Column 0 Sort=0v

[Table][0xFFD5BAA7,4]
RefScale=13
Column 0 Sort=0v

[Table][0x9F8E090C,4]
RefScale=13
Column 0 Sort=0v

[Table][0x359FB4DC,4]
RefScale=13
Column 0 Sort=0v

[Table][0x8242947C,4]
RefScale=13
Column 0 Sort=0v

[Table][0x6DE60373,4]
RefScale=13
Column 0 Sort=0v

[Table][0x90DFF51C,4]
RefScale=13
Column 0 Sort=0v

[Table][0xB15C86FD,4]
RefScale=13
Column 0 Sort=0v

[Table][0xD22D37B8,4]
RefScale=13
Column 0 Sort=0v

[Table][0x27F1DBA7,4]
RefScale=13
Column 0 Sort=0v

[Table][0x7FA8AEDA,4]
RefScale=13
Column 0 Sort=0v

[Table][0x4C2E65B9,4]
RefScale=13
Column 0 Sort=0v

[Table][0xECA17136,4]
RefScale=13
Column 0 Sort=0v

[Table][0x21776C74,4]
RefScale=13
Column 0 Sort=0v

[Table][0x78B7541D,4]
RefScale=13
Column 0 Sort=0v

[Table][0xC1B7183B,4]
RefScale=13
Column 0 Sort=0v

[Table][0x5E4D8569,4]
RefScale=13
Column 0 Sort=0v

[Table][0x9ABAB260,4]
RefScale=13
Column 0 Sort=0v

[Table][0x8D823AAD,4]
RefScale=13
Column 0 Sort=0v

[Table][0x422FC357,4]
RefScale=13
Column 0 Sort=0v

[Table][0x805746F5,4]
RefScale=13
Column 0 Sort=0v

[Docking][Data]
DockSpace ID=0x8B93E3BD Window=0xA787BDB4 Pos=0,20 Size=1024,748 Split=Y
DockNode ID=0x00000003 Parent=0x8B93E3BD SizeRef=1920,931 Split=X
DockNode ID=0x00000002 Parent=0x00000003 SizeRef=1589,1009 CentralNode=1 Selected=0x313AEB1D
DockNode ID=0x00000001 Parent=0x00000003 SizeRef=329,1009 Selected=0x081FB661
DockNode ID=0x00000004 Parent=0x8B93E3BD SizeRef=1920,76 Selected=0x6B041B99
DockSpace ID=0x8B93E3BD Window=0xA787BDB4 Pos=0,19 Size=1024,749 Split=Y
DockNode ID=0x00000003 Parent=0x8B93E3BD SizeRef=1920,960 Split=X
DockNode ID=0x00000001 Parent=0x00000003 SizeRef=1647,1010 CentralNode=1 Selected=0x249E7C8C
DockNode ID=0x00000002 Parent=0x00000003 SizeRef=271,1010 Selected=0x6372E3B7
DockNode ID=0x00000004 Parent=0x8B93E3BD SizeRef=1920,48 Selected=0x6B041B99

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
//=============================================================================

#include "Editor/Backends/GLFW3/Application.hpp"
#include "Application/DearImGui/Backends/GLFW3/Application.hpp"

#include <cstdlib>
#include <functional>
Expand Down Expand Up @@ -69,9 +69,6 @@ Application::Application(size_t const width, size_t const height, std::string co
ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking

// Add custom fonts
io.Fonts->AddFontFromFileTTF("/home/qq/MyGitHub/TimedPetriNetEditor-dev/data/Ruda.ttf", 13.0f);
}

Application::~Application()
Expand Down
File renamed without changes.
Loading

0 comments on commit 16942a5

Please sign in to comment.