Skip to content

Commit

Permalink
Cleanup and bugfixing
Browse files Browse the repository at this point in the history
- Cleanup of the code
- Workaround for a PureBasic bug:
http://www.purebasic.fr/english/viewtopic.php?f=4&t=62586
- Fixed the string encoding in the editor node
  • Loading branch information
Dadido3 committed Jul 12, 2015
1 parent 4640660 commit 3c43383
Show file tree
Hide file tree
Showing 18 changed files with 105 additions and 154 deletions.
51 changes: 26 additions & 25 deletions D3hex.pbp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<section name="data">
<explorer view="Includes\Nodes\View2D\" pattern="0"/>
<log show="1"/>
<lastopen date="2015-07-11 23:10" user="David Vogel" host="DAVIDS"/>
<lastopen date="2015-07-12 13:33" user="David Vogel" host="DAVIDS"/>
</section>
<section name="files">
<file name="Includes\About.pbi">
Expand All @@ -24,7 +24,7 @@
</file>
<file name="Includes\D3docker\D3docker.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+++"/>
<fingerprint md5="cdfd9e679d14f45bacc5ec1cc5af92d0"/>
<fingerprint md5="5f0df95290d3846e75e992d708593b75"/>
</file>
<file name="Includes\D3docker\TabBarGadget.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++"/>
Expand All @@ -48,7 +48,7 @@
</file>
<file name="Includes\Logger.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="++"/>
<fingerprint md5="de9783e52412c353f1396266800abde1"/>
<fingerprint md5="2cca0155180b46bf66cd1a74501a2983"/>
</file>
<file name="Includes\Memory.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="++"/>
Expand All @@ -60,31 +60,31 @@
</file>
<file name="Includes\Node_Editor.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++"/>
<fingerprint md5="8a99939f03ec21ffdaeaefe4d0abab2f"/>
<fingerprint md5="f24a539427f8c4fa3f42a5c698e70ecd"/>
</file>
<file name="Includes\Node_Type.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++"/>
<fingerprint md5="48f2f20689849cf21d0bb933f9f922ae"/>
</file>
<file name="Includes\Nodes\Binary_Operation\Binary_Operation.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="34df02dc55dbccbb51183d0fbc93f269"/>
<fingerprint md5="8fccd9bbad043aa175c53512d81d0933"/>
</file>
<file name="Includes\Nodes\Copy\Copy.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="8bfecff3285340fe28e9830ebf1afab7"/>
<fingerprint md5="a689a961d42884f1f1b151467b1c685f"/>
</file>
<file name="Includes\Nodes\Data_Inspector\Data_Inspector.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++++"/>
<fingerprint md5="f1a2a8430336c10333bd098c1b66aac9"/>
<fingerprint md5="c3d6097df6b5bcf909149bd78ab12294"/>
</file>
<file name="Includes\Nodes\Dummy\Dummy.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="++++"/>
<fingerprint md5="7cc260595bac7e1c2f93dd076c349ac1"/>
</file>
<file name="Includes\Nodes\Editor\Editor.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++++"/>
<fingerprint md5="0561fee708c846508fcabf113c58f043"/>
<fingerprint md5="aa302dfa319089e979d431a8ba1a3f1a"/>
</file>
<file name="Includes\Nodes\Editor\Editor_Goto.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="++++"/>
Expand All @@ -96,42 +96,42 @@
</file>
<file name="Includes\Nodes\File\File.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="c96e15ed5ef12d0098555d01d8bc5a98"/>
<fingerprint md5="8a76c797702acd3dd6f9e475ca69df47"/>
</file>
<file name="Includes\Nodes\Hash_Generator\Hash_Generator.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="23e043d5291ae2181e38a883b44f0608"/>
<fingerprint md5="123d942d1285b3330eb7723afe44c029"/>
</file>
<file name="Includes\Nodes\History\History.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="a1b8c91a7bc7777d821c9f2b8da236a5"/>
<fingerprint md5="1afffb096af81eb359d712db406113dc"/>
</file>
<file name="Includes\Nodes\Network_Terminal\Network_Terminal.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="94287c72db1255e86e7a59b56875f230"/>
<fingerprint md5="e28ab39c6cbf38c39f91839423036e24"/>
</file>
<file name="Includes\Nodes\Process\Process.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="079804b2757836270b96b8f217d2f196"/>
<fingerprint md5="16869d1faefa0af38d780dd1ab98eaf7"/>
</file>
<file name="Includes\Nodes\Random\Random.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="ac828c857be729c764f9523ebf27533a"/>
<fingerprint md5="344cd19ab0c97ef4dae0288a4ed4b470"/>
</file>
<file name="Includes\Nodes\View1D\View1D.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++++"/>
<fingerprint md5="563a86271dce1a6426041d9841b86ab5"/>
<fingerprint md5="ad138ae05bf16565cefac078b9d31d59"/>
</file>
<file name="Includes\Nodes\View1D\View1D_Settings.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="++++"/>
<fingerprint md5="142f7c59285f04885992186e1e7725f3"/>
</file>
<file name="Includes\Nodes\View2D\View2D.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<fingerprint md5="d418cf37921baf0cc7fd344751bb2492"/>
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++++"/>
<fingerprint md5="9e2aec11db31e9524d61aaf0d096d1a6"/>
</file>
<file name="Includes\Nodes\View2D\View2D_Settings.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="+++-"/>
<config load="0" scan="1" panel="1" warn="1" lastopen="0" panelstate="++++"/>
<fingerprint md5="d9ab11388924f241912c6eec8415774d"/>
</file>
<file name="Includes\UnitEngine.pbi">
Expand All @@ -140,7 +140,7 @@
</file>
<file name="Includes\Window.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++"/>
<fingerprint md5="875f78d774a12036f95d450afbdfba2c"/>
<fingerprint md5="2ba8f158d824df8c4a119c348ee0875b"/>
</file>
<file name="Includes\ZLib.pbi">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="++"/>
Expand All @@ -152,7 +152,7 @@
</file>
<file name="Main.pb">
<config load="0" scan="1" panel="1" warn="1" lastopen="1" panelstate="+"/>
<fingerprint md5="941ac97875c3cfda594b95dab3409afd"/>
<fingerprint md5="bcb78203946ada0c406850db7bfa17cb"/>
</file>
</section>
<section name="targets">
Expand All @@ -162,10 +162,11 @@
<compiler version="PureBasic 5.31 (Windows - x86)"/>
<executable value="Distribution\x86\D3hex.x86.exe"/>
<directory value="Distribution\x86\"/>
<options unicode="1" xpskin="1" user="1" onerror="1"/>
<options unicode="1" xpskin="1" user="1" onerror="1" debug="1"/>
<purifier enable="1" granularity="1,1,1,1"/>
<icon enable="1">Data\Images\Icon.ico</icon>
<compilecount enable="1" value="244"/>
<buildcount enable="1" value="55"/>
<compilecount enable="1" value="523"/>
<buildcount enable="1" value="56"/>
<versioninfo enable="1">
<field3 value="D3hex"/>
<field14 value="D3nexus.de"/>
Expand All @@ -181,8 +182,8 @@
<options unicode="1" xpskin="1" user="1" onerror="1" debug="1"/>
<purifier enable="0" granularity="1,1,1,1"/>
<icon enable="1">Data\Images\Icon.ico</icon>
<compilecount enable="1" value="3758"/>
<buildcount enable="1" value="62"/>
<compilecount enable="1" value="3760"/>
<buildcount enable="1" value="63"/>
<versioninfo enable="1">
<field3 value="D3hex"/>
<field14 value="D3nexus.de"/>
Expand Down
58 changes: 28 additions & 30 deletions Includes/D3docker/D3docker.pbi
Original file line number Diff line number Diff line change
Expand Up @@ -597,46 +597,42 @@ Module D3docker
If Not *Gadget
ProcedureReturn #Null
EndIf
Protected Window.i
Protected *Window.Window
Protected *params.GADGET_PARAMS=GetParams(*Gadget)
With *params
AddElement(\Window())

PushListPosition(\Window())
Window = OpenWindow(#PB_Any, X, Y, Width, Height, Title, Flags, WindowID(\Parent_Window))
PopListPosition(\Window())
*Window = AddElement(\Window())

\Window()\Window = Window
\Window()\hWnd = WindowID(\Window()\Window)
\Window()\Gadget = *Gadget
;SetWindowData(\Window()\Window, \Window())
SetWindowCallback(@Window_Callback(), \Window()\Window)
*Window\Window = OpenWindow(#PB_Any, X, Y, Width, Height, Title, Flags, WindowID(\Parent_Window))
*Window\hWnd = WindowID(*Window\Window)
*Window\Gadget = *Gadget
;SetWindowData(*Window\Window, *Window)
SetWindowCallback(@Window_Callback(), *Window\Window)

SmartWindowRefresh(\Window()\Window, #True)
SmartWindowRefresh(*Window\Window, #True)

\Window()\Resize_Priority = Resize_Priority
*Window\Resize_Priority = Resize_Priority

\Window()\Flags_Normal = GetWindowLong_(\Window()\hWnd, #GWL_STYLE)
\Window()\Flags_Docked = \Window()\Flags_Normal
\Window()\Flags_Docked & ~#WS_POPUP
\Window()\Flags_Docked & ~#WS_SIZEBOX
\Window()\Flags_Docked & ~#WS_DLGFRAME
\Window()\Flags_Docked & ~#WS_BORDER
\Window()\Flags_Docked | #WS_CHILD
;\Window()\Flags_Docked | #WS_EX_MDICHILD
*Window\Flags_Normal = GetWindowLong_(*Window\hWnd, #GWL_STYLE)
*Window\Flags_Docked = *Window\Flags_Normal
*Window\Flags_Docked & ~#WS_POPUP
*Window\Flags_Docked & ~#WS_SIZEBOX
*Window\Flags_Docked & ~#WS_DLGFRAME
*Window\Flags_Docked & ~#WS_BORDER
*Window\Flags_Docked | #WS_CHILD
;*Window\Flags_Docked | #WS_EX_MDICHILD

_Window_Set_Active(*Gadget, \Window(), #False)
_Window_Set_Active(*Gadget, *Window, #False)

If \Window()\Flags_Normal & #WS_SIZEBOX
_Window_Bounds(*Gadget, \Window(), #PB_Default, #PB_Default, #PB_Default, #PB_Default)
If *Window\Flags_Normal & #WS_SIZEBOX
_Window_Bounds(*Gadget, *Window, #PB_Default, #PB_Default, #PB_Default, #PB_Default)
Else
\Window()\Min_Width = Width
\Window()\Min_Height = Height
\Window()\Max_Width = \Window()\Min_Width
\Window()\Max_Height = \Window()\Min_Height
*Window\Min_Width = Width
*Window\Min_Height = Height
*Window\Max_Width = *Window\Min_Width
*Window\Max_Height = *Window\Min_Height
EndIf

ProcedureReturn \Window()\Window
ProcedureReturn *Window\Window
EndWith
EndProcedure

Expand Down Expand Up @@ -1383,6 +1379,7 @@ Module D3docker

Default
FreeStructure(*Container) : *Container = #Null
ProcedureReturn #Null
EndSelect
EndWith

Expand Down Expand Up @@ -2289,7 +2286,8 @@ Module D3docker

EndModule
; IDE Options = PureBasic 5.31 (Windows - x64)
; CursorPosition = 41
; CursorPosition = 1348
; FirstLine = 1318
; Folding = --------
; EnableUnicode
; EnableXP
6 changes: 2 additions & 4 deletions Includes/Logger.pbi
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ Module Logger

Procedure Window_Event_SizeWindow()
Protected Event_Window = EventWindow()
Protected Event_Gadget = EventGadget()
Protected Event_Type = EventType()

EndProcedure

Expand Down Expand Up @@ -270,8 +268,8 @@ Module Logger

EndModule
; IDE Options = PureBasic 5.31 (Windows - x64)
; CursorPosition = 258
; FirstLine = 213
; CursorPosition = 184
; FirstLine = 156
; Folding = ---
; EnableUnicode
; EnableXP
8 changes: 5 additions & 3 deletions Includes/Node_Editor.pbi
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ Module Node_Editor

NBT::Element_Delete(*NBT_Element)

SetToolBarButtonState(Window\ToolBar, #Menu_Grid_Snapping, Window\Snapping)
If Window\Window
SetToolBarButtonState(Window\ToolBar, #Menu_Grid_Snapping, Window\Snapping)
EndIf

Window\Redraw = #True

Expand Down Expand Up @@ -1152,8 +1154,8 @@ Module Node_Editor
EndModule

; IDE Options = PureBasic 5.31 (Windows - x64)
; CursorPosition = 1034
; FirstLine = 1006
; CursorPosition = 1099
; FirstLine = 1084
; Folding = ----
; EnableUnicode
; EnableXP
6 changes: 2 additions & 4 deletions Includes/Nodes/Binary_Operation/Binary_Operation.pbi
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,6 @@ Module _Node_Binary_Operation

Procedure Window_Event_SizeWindow()
Protected Event_Window = EventWindow()
Protected Event_Gadget = EventGadget()
Protected Event_Type = EventType()

Protected *Window.Window::Object = Window::Get(Event_Window)
If Not *Window
Expand Down Expand Up @@ -1089,8 +1087,8 @@ Module _Node_Binary_Operation
EndModule

; IDE Options = PureBasic 5.31 (Windows - x64)
; CursorPosition = 939
; FirstLine = 923
; CursorPosition = 871
; FirstLine = 867
; Folding = -----
; EnableUnicode
; EnableXP
6 changes: 2 additions & 4 deletions Includes/Nodes/Copy/Copy.pbi
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,6 @@ Module _Node_Copy

Procedure Window_Event_SizeWindow()
Protected Event_Window = EventWindow()
Protected Event_Gadget = EventGadget()
Protected Event_Type = EventType()

Protected *Window.Window::Object = Window::Get(Event_Window)
If Not *Window
Expand Down Expand Up @@ -686,8 +684,8 @@ Module _Node_Copy
EndModule

; IDE Options = PureBasic 5.31 (Windows - x64)
; CursorPosition = 407
; FirstLine = 388
; CursorPosition = 339
; FirstLine = 335
; Folding = ---
; EnableUnicode
; EnableXP
6 changes: 2 additions & 4 deletions Includes/Nodes/Data_Inspector/Data_Inspector.pbi
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,6 @@ Module _Node_Data_Inspector

Procedure Window_Event_SizeWindow()
Protected Event_Window = EventWindow()
Protected Event_Gadget = EventGadget()
Protected Event_Type = EventType()

Protected *Window.Window::Object = Window::Get(Event_Window)
If Not *Window
Expand Down Expand Up @@ -968,8 +966,8 @@ Module _Node_Data_Inspector
EndModule

; IDE Options = PureBasic 5.31 (Windows - x64)
; CursorPosition = 845
; FirstLine = 836
; CursorPosition = 769
; FirstLine = 765
; Folding = ---
; EnableUnicode
; EnableXP
Loading

0 comments on commit 3c43383

Please sign in to comment.