Skip to content

Commit eda6aad

Browse files
committed
reduce font size in ide memo to avoid high-dpi issue
1 parent b787db1 commit eda6aad

File tree

9 files changed

+175
-44
lines changed

9 files changed

+175
-44
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BookPart 3
22

3-
Update (11/10/2021): Clean up of code and uploaded ne chapters and new pdf. Note the book is very incomplete.
3+
Update (11/19/2021) To make things a little more interting I added very simple graphics module which can be used by the IDE. Also released a new binary with this functionality.
44

55
Update (11/6/2021): Added new binary release (3.0.2.0). Includes console, dll library and GUI app in binary form.
66

RhodusIDE/Win32/Release/examples.json

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"examples": [
3+
{
4+
"name": "Print method",
5+
"src": "println(\"This how you print things\")"
6+
},
7+
{
8+
"name": "Assignment",
9+
"src":
10+
"a = 3
11+
b = \"a string\"
12+
c = 3.1415
13+
d = False
14+
e = [1,False, 5.67, [5,6]]
15+
println (a)
16+
println (b)
17+
println (c)
18+
println (d)
19+
println (e)"
20+
},
21+
{"name": "For Loop",
22+
"src":
23+
"for i = 1 to 5 do
24+
println (i)
25+
end"
26+
},
27+
{
28+
"name": "While loop",
29+
"src":
30+
"i = 5
31+
while i >= 1 do
32+
println (i)
33+
i = i - 1
34+
end
35+
"
36+
},
37+
{
38+
"name": "Repeat loop",
39+
"src":
40+
"i = 5
41+
repeat
42+
println (i)
43+
i = i - 1
44+
until i < 1
45+
"
46+
},
47+
{
48+
"name": "Arithmetic",
49+
"src":
50+
"a = 3.4; b = 7.8
51+
println (-a, \" \", a/b, \" \", a*b, \" \")
52+
println (a+b, \" \", a-b, \" \", a mod b, \" \", 12 div 5)
53+
"
54+
},
55+
{
56+
"name": "Math",
57+
"src":
58+
"import math
59+
println (\"Pi constant = \", math.pi)
60+
println (math.sin (math.pi))"
61+
},
62+
{
63+
"name": "dir()",
64+
"src":
65+
"import math
66+
println (math.dir())"
67+
},
68+
{
69+
"name": "User functions",
70+
"src":
71+
"function callme (a, b)
72+
c = a + b
73+
return c
74+
end
75+
76+
println (callme (2,3))
77+
println (callme (\"Hello \", \"World\"))
78+
"
79+
},
80+
{
81+
"name": "Lists",
82+
"src":
83+
"a = [1,2,3,4]
84+
println (a)
85+
b = [True, False]
86+
c = a + b
87+
println (c)
88+
a = [1,True,3.14,\"Rhodus\",[5,6,[8,9]]]
89+
x = a[2]
90+
println (x)
91+
println (a[4,2])
92+
a[4,2] = [\"abc\"]
93+
println (a)
94+
"
95+
},
96+
{
97+
"name": "Arrays",
98+
"src":
99+
"a = array([1,2,3,4])
100+
b = array([0]*20)
101+
102+
println (a.len())
103+
println (b.len())
104+
println (b)
105+
"
106+
},
107+
{
108+
"name": "Graphics_1",
109+
"src":
110+
"import graphics
111+
112+
graphics.moveto(10,10)
113+
graphics.lineto(123,140)
114+
"
115+
}
116+
]
117+
}

RhodusIDE/ufMain.dfm

+35-31
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ object frmMain: TfrmMain
22
Left = 0
33
Top = 0
44
Caption = 'Rhodus IDE'
5-
ClientHeight = 957
6-
ClientWidth = 1575
5+
ClientHeight = 1109
6+
ClientWidth = 1749
77
Color = clBtnFace
88
Font.Charset = DEFAULT_CHARSET
99
Font.Color = clWindowText
@@ -16,21 +16,22 @@ object frmMain: TfrmMain
1616
PixelsPerInch = 144
1717
TextHeight = 25
1818
object Splitter2: TSplitter
19-
Left = 1099
19+
Left = 1211
2020
Top = 86
2121
Width = 5
22-
Height = 871
22+
Height = 1023
2323
Margins.Left = 5
2424
Margins.Top = 5
2525
Margins.Right = 5
2626
Margins.Bottom = 5
2727
Align = alRight
2828
ExplicitLeft = 1179
29+
ExplicitHeight = 871
2930
end
3031
object Panel1: TPanel
3132
Left = 0
3233
Top = 0
33-
Width = 1575
34+
Width = 1749
3435
Height = 86
3536
Margins.Left = 5
3637
Margins.Top = 5
@@ -40,10 +41,10 @@ object frmMain: TfrmMain
4041
TabOrder = 0
4142
ExplicitWidth = 1561
4243
DesignSize = (
43-
1575
44+
1749
4445
86)
4546
object lblVersion: TLabel
46-
Left = 1359
47+
Left = 1533
4748
Top = 18
4849
Width = 77
4950
Height = 25
@@ -53,6 +54,7 @@ object frmMain: TfrmMain
5354
Margins.Bottom = 5
5455
Anchors = [akTop, akRight]
5556
Caption = 'lblVersion'
57+
ExplicitLeft = 1359
5658
end
5759
object Label1: TLabel
5860
Left = 454
@@ -136,7 +138,7 @@ object frmMain: TfrmMain
136138
Left = 0
137139
Top = 86
138140
Width = 278
139-
Height = 871
141+
Height = 1023
140142
Margins.Left = 5
141143
Margins.Top = 5
142144
Margins.Right = 5
@@ -162,7 +164,7 @@ object frmMain: TfrmMain
162164
Left = 1
163165
Top = 349
164166
Width = 276
165-
Height = 521
167+
Height = 673
166168
Margins.Left = 5
167169
Margins.Top = 5
168170
Margins.Right = 5
@@ -177,19 +179,20 @@ object frmMain: TfrmMain
177179
object Panel3: TPanel
178180
Left = 278
179181
Top = 86
180-
Width = 821
181-
Height = 871
182+
Width = 933
183+
Height = 1023
182184
Margins.Left = 5
183185
Margins.Top = 5
184186
Margins.Right = 5
185187
Margins.Bottom = 5
186188
Align = alClient
187189
TabOrder = 2
188190
ExplicitWidth = 901
191+
ExplicitHeight = 871
189192
object Splitter1: TSplitter
190193
Left = 1
191-
Top = 506
192-
Width = 819
194+
Top = 658
195+
Width = 931
193196
Height = 4
194197
Cursor = crVSplit
195198
Margins.Left = 5
@@ -198,12 +201,13 @@ object frmMain: TfrmMain
198201
Margins.Bottom = 5
199202
Align = alBottom
200203
ExplicitLeft = 2
204+
ExplicitTop = 506
201205
ExplicitWidth = 898
202206
end
203207
object moutput: TMemo
204208
Left = 1
205-
Top = 510
206-
Width = 819
209+
Top = 662
210+
Width = 931
207211
Height = 360
208212
Margins.Left = 5
209213
Margins.Top = 5
@@ -225,8 +229,8 @@ object frmMain: TfrmMain
225229
object editor: TMemo
226230
Left = 1
227231
Top = 1
228-
Width = 819
229-
Height = 505
232+
Width = 931
233+
Height = 657
230234
Margins.Left = 5
231235
Margins.Top = 5
232236
Margins.Right = 5
@@ -235,7 +239,7 @@ object frmMain: TfrmMain
235239
Color = clWhite
236240
Font.Charset = DEFAULT_CHARSET
237241
Font.Color = clCream
238-
Font.Height = -24
242+
Font.Height = -16
239243
Font.Name = 'Fira Code Medium'
240244
Font.Style = []
241245
Lines.Strings = (
@@ -269,15 +273,14 @@ object frmMain: TfrmMain
269273
ScrollBars = ssBoth
270274
TabOrder = 1
271275
StyleElements = [seClient, seBorder]
272-
ExplicitWidth = 885
273-
ExplicitHeight = 498
276+
ExplicitWidth = 896
274277
end
275278
end
276279
object pnlRight: TPanel
277-
Left = 1104
280+
Left = 1216
278281
Top = 86
279-
Width = 471
280-
Height = 871
282+
Width = 533
283+
Height = 1023
281284
Margins.Left = 5
282285
Margins.Top = 5
283286
Margins.Right = 5
@@ -287,8 +290,8 @@ object frmMain: TfrmMain
287290
OnResize = pnlRightResize
288291
object Splitter3: TSplitter
289292
Left = 1
290-
Top = 411
291-
Width = 469
293+
Top = 563
294+
Width = 531
292295
Height = 3
293296
Cursor = crVSplit
294297
Margins.Left = 5
@@ -297,12 +300,13 @@ object frmMain: TfrmMain
297300
Margins.Bottom = 5
298301
Align = alBottom
299302
ExplicitLeft = 4
303+
ExplicitTop = 411
300304
ExplicitWidth = 389
301305
end
302306
object pnlInfo: TPanel
303307
Left = 1
304-
Top = 414
305-
Width = 469
308+
Top = 566
309+
Width = 531
306310
Height = 456
307311
Margins.Left = 5
308312
Margins.Top = 5
@@ -317,8 +321,8 @@ object frmMain: TfrmMain
317321
object pnlImage: TPanel
318322
Left = 1
319323
Top = 1
320-
Width = 469
321-
Height = 410
324+
Width = 531
325+
Height = 562
322326
Margins.Left = 5
323327
Margins.Top = 5
324328
Margins.Right = 5
@@ -334,8 +338,8 @@ object frmMain: TfrmMain
334338
object pnlDrawing: TImage
335339
Left = 1
336340
Top = 1
337-
Width = 467
338-
Height = 408
341+
Width = 529
342+
Height = 560
339343
Margins.Left = 5
340344
Margins.Top = 5
341345
Margins.Right = 5

RhodusIDE/ufMain.pas

+5-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ implementation
7878
TRhodusRun = function (handle : THandle; code : AnsiString) : integer; stdcall;
7979
TRhodusTerminate = procedure (handle : THandle); stdcall;
8080
TRhodusGetLastError = function (handle : THandle) : PRhodusError; stdcall;
81-
TRhodusGetSettings = function (handle : THandle) : PRhodusSettings; stdcall;
81+
TRhodusGetSettings = function (handle : THandle) : PRhodusSettings; cdecl;
8282

8383
var config : TRhodusConfig;
8484
graphicsMethods : TGraphicsMethods;
@@ -213,6 +213,7 @@ procedure TfrmMain.FileListBox1Click(Sender: TObject);
213213
procedure TfrmMain.FormCreate(Sender: TObject);
214214
var i : integer;
215215
begin
216+
try
216217
handle := LoadLibrary('librhodus.dll');
217218
@rhodus_initialize := GetProcAddress(Handle, 'rhodus_initialize');
218219
@rhodus_run := GetProcAddress(Handle, 'rhodus_run');
@@ -240,6 +241,9 @@ procedure TfrmMain.FormCreate(Sender: TObject);
240241
cboExamples.ItemIndex := -1;
241242

242243
gClear;
244+
except
245+
showmessage ('Error');
246+
end;
243247
end;
244248

245249
procedure TfrmMain.N2Click(Sender: TObject);

Rhodus_Version_3/RhodusVersionThreeProject.dproj

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<FrameworkType>None</FrameworkType>
66
<MainSource>RhodusVersionThreeProject.dpr</MainSource>
77
<Base>True</Base>
8-
<Config Condition="'$(Config)'==''">Debug</Config>
8+
<Config Condition="'$(Config)'==''">Release</Config>
99
<Platform Condition="'$(Platform)'==''">Win32</Platform>
1010
<TargetedPlatforms>3</TargetedPlatforms>
1111
<AppType>Console</AppType>
@@ -263,23 +263,23 @@
263263
<Overwrite>true</Overwrite>
264264
</Platform>
265265
</DeployFile>
266-
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
267-
<Platform Name="OSX32">
266+
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
267+
<Platform Name="iOSSimulator">
268268
<Overwrite>true</Overwrite>
269269
</Platform>
270270
</DeployFile>
271-
<DeployFile LocalName="Win32\Release\RhodusVersionThreeProject.exe" Configuration="Release" Class="ProjectOutput">
271+
<DeployFile LocalName="Win32\Debug\RhodusVersionThreeProject.exe" Configuration="Debug" Class="ProjectOutput">
272272
<Platform Name="Win32">
273273
<RemoteName>RhodusVersionThreeProject.exe</RemoteName>
274274
<Overwrite>true</Overwrite>
275275
</Platform>
276276
</DeployFile>
277-
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
278-
<Platform Name="iOSSimulator">
277+
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
278+
<Platform Name="OSX32">
279279
<Overwrite>true</Overwrite>
280280
</Platform>
281281
</DeployFile>
282-
<DeployFile LocalName="Win32\Debug\RhodusVersionThreeProject.exe" Configuration="Debug" Class="ProjectOutput">
282+
<DeployFile LocalName="Win32\Release\RhodusVersionThreeProject.exe" Configuration="Release" Class="ProjectOutput">
283283
<Platform Name="Win32">
284284
<RemoteName>RhodusVersionThreeProject.exe</RemoteName>
285285
<Overwrite>true</Overwrite>
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)