Skip to content

Commit 9b11a75

Browse files
committed
Initial commit
1 parent 7556324 commit 9b11a75

File tree

639 files changed

+277987
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

639 files changed

+277987
-2
lines changed

BUILD.txt

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
Welcome to PureBasic OpenSource Projects !
3+
4+
For now, to be able to compile the sources, you will need Windows, as it's the only
5+
supported OS (will change soon). That said, you can try to compile on Linux/OSX
6+
as the makefile contains all needed info to do so.
7+
8+
1. Install UnxUtils
9+
-------------------
10+
11+
You can download it here:
12+
https://sourceforge.net/projects/unxutils/
13+
14+
Be sure to add <UnxUtilsInstallPath>\usr\local\wbin in your PATH
15+
16+
17+
2. Install VisualStudio C++ 2013 Community edition
18+
--------------------------------------------------
19+
20+
Some code source are in C and requiers VS to compile. You can also
21+
try with a more recent version, but we use the 2013 version here.
22+
23+
24+
3. Install the Windows Plateform SDK
25+
------------------------------------
26+
27+
We use an old version (7.0) but new version could also work
28+
29+
30+
4. Tune the launch script
31+
-------------------------
32+
33+
To do so, do a copy of Window-x64.cmd or Window-x86.cmd and edit it:
34+
- set PUREBASIC_HOME to a working PureBasic installation
35+
- check all the other path to see if it matches you current system
36+
37+
38+
5. Launch the makefile
39+
----------------------
40+
41+
- Double-click on Window-x64.cmd and go in PureBasicIDE directory
42+
- type: make
43+
44+
If all is setup correctly, it should compile all the dependencies and the IDE
45+
A 'Build' directory will be created with all temporary files in it.
46+
47+
Once you have successfully launched the make once, you can then use
48+
PureBasic to open the "PureBasic IDE.pbp" project file and
49+
run it from PureBasic itself (be sure to adjust the constants in 'Compilers Options.../Contants')
50+
- The #BUILD_DIRECTORY constant must point to the Build/x64/ide/ folder created before by the 'make'
51+
- The #PureBasicPath constant must point to a full PureBasic installation.
52+
53+
Don't hesitate to drop a word to improve this build guide as it's very slim for now !
54+
55+
Have fun hacking,
56+
57+
The Fantaisie Software Team

DialogManager/Common.pb

+190
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
;--------------------------------------------------------------------------------------------
2+
; Copyright (c) Fantaise Software. All rights reserved.
3+
; Dual licensed under the GPL and Fantaisie Software licenses.
4+
; See LICENSE and LICENSE-FANTAISIE in the project root for license information.
5+
;--------------------------------------------------------------------------------------------
6+
7+
8+
; Define these for easier crossplatform development, also without the IDE
9+
;
10+
CompilerIf Defined(CompileWindows, #PB_Constant) = 0
11+
CompilerSelect #PB_Compiler_OS
12+
CompilerCase #PB_OS_Windows
13+
#CompileWindows = 1
14+
#CompileLinux = 0
15+
#CompileLinuxGtk1 = 0
16+
#CompileLinuxGtk2 = 0
17+
#CompileMac = 0
18+
#CompileMacCarbon = 0
19+
#CompileMacCocoa = 0
20+
21+
CompilerCase #PB_OS_Linux
22+
#CompileWindows = 0
23+
#CompileLinux = 1
24+
CompilerIf Subsystem("Gtk1")
25+
#CompileLinuxGtk1 = 1
26+
#CompileLinuxGtk2 = 0
27+
CompilerElse
28+
#CompileLinuxGtk1 = 0
29+
#CompileLinuxGtk2 = 1
30+
CompilerEndIf
31+
#CompileMac = 0
32+
#CompileMacCarbon = 0
33+
#CompileMacCocoa = 0
34+
35+
CompilerCase #PB_OS_MacOS
36+
#CompileWindows = 0
37+
#CompileLinux = 0
38+
#CompileLinuxGtk1 = 0
39+
#CompileLinuxGtk2 = 0
40+
#CompileMac = 1
41+
CompilerIf Subsystem("carbon")
42+
#CompileMacCocoa = 0
43+
#CompileMacCarbon = 1
44+
CompilerElse
45+
#CompileMacCocoa = 1
46+
#CompileMacCarbon = 0
47+
CompilerEndIf
48+
49+
CompilerEndSelect
50+
CompilerEndIf
51+
52+
53+
; Max number of childs that any container can have.
54+
;
55+
#MAX_CHILDLIST = 100
56+
57+
Enumeration 1
58+
#DIALOG_Window
59+
#DIALOG_Shortcut ; not a real object, only used during dialog creation
60+
61+
#DIALOG_Button
62+
#DIALOG_Checkbox
63+
#DIALOG_Image
64+
#DIALOG_Option
65+
#DIALOG_ListView
66+
#DIALOG_ListIcon
67+
#DIALOG_Tree
68+
#DIALOG_Container
69+
#DIALOG_ComboBox
70+
#DIALOG_Text
71+
#DIALOG_String
72+
#DIALOG_Panel
73+
#DIALOG_Tab
74+
#DIALOG_Scroll
75+
#DIALOG_Frame
76+
#DIALOG_Item
77+
#DIALOG_Column
78+
#DIALOG_Editor
79+
#DIALOG_Scintilla
80+
#DIALOG_ScrollBar
81+
#DIALOG_ProgressBar
82+
#DIALOG_ExplorerList
83+
#DIALOG_ExplorerTree
84+
#DIALOG_ExplorerCombo
85+
#DIALOG_Splitter
86+
#DIALOG_ShortcutGadget
87+
#DIALOG_ButtonImage
88+
#DIALOG_TrackBar
89+
#DIALOG_HyperLink
90+
91+
; virtual packing objects
92+
#DIALOG_VBox
93+
#DIALOG_HBox
94+
#DIALOG_Multibox
95+
#DIALOG_Singlebox
96+
#DIALOG_Gridbox
97+
#DIALOG_Empty
98+
EndEnumeration
99+
100+
; Alignment Properties
101+
;
102+
Enumeration ; also used for left, center, right
103+
#Dlg_Align_Top = 1 ; do not include 0 for better testing
104+
#Dlg_Align_Center
105+
#Dlg_Align_Bottom
106+
EndEnumeration
107+
108+
; Expansion Properties
109+
;
110+
Enumeration
111+
#Dlg_Expand_Yes = 1
112+
#Dlg_Expand_No
113+
#Dlg_Expand_Equal
114+
#Dlg_Expand_Item
115+
EndEnumeration
116+
117+
; Represents the size/position info for a dialog
118+
;
119+
Structure DialogPosition
120+
x.l
121+
y.l
122+
Width.l
123+
Height.l
124+
IsMaximized.l
125+
EndStructure
126+
127+
128+
; Representation of the fixed values in the datasection
129+
;
130+
Structure DialogObjectData
131+
Type.l
132+
Gadget.l ; remains .l as here are no PB_Any objects
133+
Flags.l
134+
MinWidth.l
135+
MinHeight.l
136+
HasText.l
137+
KeyCount.l
138+
EndStructure
139+
140+
; Representation of a shortcut in the datasection
141+
;
142+
Structure DialogShortcutData
143+
Type.l ; = #DIALOG_Shortcut
144+
Key.l
145+
MenuItem.l
146+
EndStructure
147+
148+
149+
; Functions implemented for each dialog object
150+
;
151+
; Note:
152+
; SizeRequestReal() should be the real function.
153+
; SizeRequest() should always be the DlgBase_SizeRequestWrapper()
154+
; function for all Objects. This wrapper properly checks for the
155+
; width="ignore" setting and applies it so it does not have to be done
156+
; in all code separately
157+
;
158+
; Do not call SizeRequestReal() directly, but always call through
159+
; SizeRequest()
160+
;
161+
Interface DialogObject
162+
SizeRequest(*Width.LONG, *Height.LONG)
163+
SizeRequestReal(*Width.LONG, *Height.LONG)
164+
SizeApply(x, y, Width, Height)
165+
AddChild(Child.DialogObject)
166+
FoldApply(State)
167+
Find(Name$)
168+
Finish()
169+
Update()
170+
Destroy()
171+
EndInterface
172+
173+
174+
; The Window object (the main object of a dialog) implements more methods for public access
175+
; by the user. Note that the DialogObject functions are designed to be called inside the
176+
; Dialog files only.
177+
;
178+
Interface DialogWindow Extends DialogObject
179+
Window() ; Get the #Window number of the dialog window
180+
Gadget(Name$) ; Get the #Gadget number of the gadget where the 'name' tag is set to Name$ (case insensitive)
181+
Fold(Name$, State); Fold/Unfold an object based on its 'name' tag
182+
LanguageUpdate() ; Update all language strings
183+
GuiUpdate() ; Re-calculate and resize gui (call this when for example font sizes have changed, or after language updates)
184+
SizeUpdate() ; call this after a #PB_Event_SizeWindow for a resizable dialog. (updates all sizes to fit the current window size)
185+
Close(*Sizing.DialogPosition = 0) ; close the window and free all data. fill the *Sizing structrue with data if present
186+
EndInterface
187+
188+
189+
Declare OpenDialog(*DataOffset.DialogObjectData, ParentID = 0, *Sizing.DialogPosition = 0)
190+

0 commit comments

Comments
 (0)