Skip to content

Commit 38529a7

Browse files
committed
accept -f in mcxshow and mcxviewer
1 parent 34ecf5f commit 38529a7

File tree

5 files changed

+288
-259
lines changed

5 files changed

+288
-259
lines changed

mcxstudio/mcxrender.lfm

Lines changed: 71 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,67 @@
11
object fmDomain: TfmDomain
22
Left = 2285
3-
Height = 639
3+
Height = 732
44
Top = 198
5-
Width = 1048
5+
Width = 1201
66
Caption = 'MCX Domain Renderer'
7-
ClientHeight = 639
8-
ClientWidth = 1048
9-
Font.Height = -11
7+
ClientHeight = 732
8+
ClientWidth = 1201
9+
DesignTimePPI = 110
10+
Font.Height = -13
1011
Font.Name = 'MS Sans Serif'
1112
OnCreate = FormCreate
1213
OnDestroy = FormDestroy
1314
OnResize = FormResize
1415
OnShow = FormShow
15-
Position = poOwnerFormCenter
16-
LCLVersion = '2.0.6.0'
16+
Position = poScreenCenter
17+
LCLVersion = '2.0.8.0'
1718
object glCanvas: TGLSceneViewer
18-
Left = 418
19-
Height = 584
20-
Top = 55
21-
Width = 630
19+
Left = 479
20+
Height = 669
21+
Top = 63
22+
Width = 722
2223
Camera = glCamera
2324
VSync = vsmSync
2425
Buffer.BackgroundColor = clSilver
2526
Buffer.AmbientColor.Red = 0.200000002980232
2627
Buffer.AmbientColor.Green = 0.200000002980232
2728
Buffer.AmbientColor.Blue = 0.200000002980232
2829
Buffer.AmbientColor.Alpha = 1
29-
FieldOfView = 135.318710327148
30+
FieldOfView = 140.529663085938
3031
Align = alClient
3132
OnMouseDown = glCanvasMouseDown
3233
OnMouseMove = glCanvasMouseMove
3334
OnMouseWheel = glCanvasMouseWheel
3435
TabOrder = 0
3536
end
3637
object Splitter1: TSplitter
37-
Left = 413
38-
Height = 584
39-
Top = 55
40-
Width = 5
38+
Left = 473
39+
Height = 669
40+
Top = 63
41+
Width = 6
4142
OnMoved = Splitter1Moved
4243
end
4344
object plEditor: TPanel
4445
Left = 0
45-
Height = 584
46-
Top = 55
47-
Width = 413
46+
Height = 669
47+
Top = 63
48+
Width = 473
4849
Align = alLeft
49-
ClientHeight = 584
50-
ClientWidth = 413
51-
Font.Height = -11
50+
ClientHeight = 669
51+
ClientWidth = 473
52+
Font.Height = -13
5253
Font.Name = 'MS Sans Serif'
5354
ParentFont = False
5455
TabOrder = 2
5556
OnMouseEnter = plEditorMouseEnter
5657
OnMouseLeave = plEditorMouseLeave
5758
inline mmShapeJSON: TSynEdit
5859
Left = 1
59-
Height = 582
60+
Height = 667
6061
Top = 1
61-
Width = 411
62+
Width = 471
6263
Align = alClient
63-
Font.Height = -12
64+
Font.Height = -14
6465
Font.Name = 'Courier New'
6566
Font.Pitch = fpFixed
6667
Font.Quality = fqNonAntialiased
@@ -69,7 +70,7 @@ object fmDomain: TfmDomain
6970
TabOrder = 0
7071
OnMouseEnter = plEditorMouseEnter
7172
OnMouseLeave = plEditorMouseLeave
72-
Gutter.Width = 31
73+
Gutter.Width = 37
7374
Gutter.MouseActions = <>
7475
RightGutter.Width = 0
7576
RightGutter.MouseActions = <>
@@ -558,12 +559,12 @@ object fmDomain: TfmDomain
558559
LineHighlightColor.Foreground = clNone
559560
inline SynLeftGutterPartList1: TSynGutterPartList
560561
object SynGutterMarks1: TSynGutterMarks
561-
Width = 24
562+
Width = 28
562563
Visible = False
563564
MouseActions = <>
564565
end
565566
object SynGutterLineNumber1: TSynGutterLineNumber
566-
Width = 15
567+
Width = 17
567568
MouseActions = <>
568569
MarkupInfo.Background = clBtnFace
569570
MarkupInfo.Foreground = clNone
@@ -573,7 +574,7 @@ object fmDomain: TfmDomain
573574
LeadingZeros = False
574575
end
575576
object SynGutterChanges1: TSynGutterChanges
576-
Width = 4
577+
Width = 5
577578
MouseActions = <>
578579
ModifiedColor = 59900
579580
SavedColor = clGreen
@@ -586,6 +587,7 @@ object fmDomain: TfmDomain
586587
end
587588
object SynGutterCodeFolding1: TSynGutterCodeFolding
588589
AutoSize = False
590+
Width = 13
589591
MouseActions = <>
590592
MarkupInfo.Background = clNone
591593
MarkupInfo.Foreground = clGray
@@ -597,14 +599,14 @@ object fmDomain: TfmDomain
597599
end
598600
object ToolBar1: TToolBar
599601
Left = 0
600-
Height = 55
602+
Height = 63
601603
Top = 0
602-
Width = 1048
603-
ButtonHeight = 50
604-
ButtonWidth = 50
604+
Width = 1201
605+
ButtonHeight = 57
606+
ButtonWidth = 57
605607
Caption = 'ToolBar1'
606608
Color = clWhite
607-
Font.Height = -11
609+
Font.Height = -13
608610
Font.Name = 'MS Sans Serif'
609611
Images = ImageList3
610612
ParentColor = False
@@ -619,60 +621,60 @@ object fmDomain: TfmDomain
619621
Action = acRender
620622
end
621623
object ToolButton2: TToolButton
622-
Left = 53
624+
Left = 58
623625
Top = 2
624626
Action = acHideBBX
625627
end
626628
object ToolButton3: TToolButton
627-
Left = 105
629+
Left = 115
628630
Top = 2
629631
Action = acResetCamera
630632
end
631633
object ToolButton4: TToolButton
632-
Left = 214
634+
Left = 234
633635
Top = 2
634636
Action = acSaveImage
635637
end
636638
object ToolButton5: TToolButton
637-
Left = 323
639+
Left = 442
638640
Top = 2
639641
Action = acSaveJSON
640642
end
641643
object ToolButton6: TToolButton
642-
Left = 435
644+
Left = 504
643645
Top = 2
644646
Action = acExit
645647
end
646648
object ToolButton8: TToolButton
647-
Left = 271
649+
Left = 296
648650
Top = 2
649651
Action = acLoadJSON
650652
end
651653
object btPin: TToolButton
652-
Left = 157
654+
Left = 172
653655
Hint = 'Show editor'
654656
Top = 2
655657
Caption = 'Pin Editor'
656658
ImageIndex = 3
657659
Style = tbsCheck
658660
end
659661
object ToolButton11: TToolButton
660-
Left = 209
661-
Height = 50
662+
Left = 229
663+
Height = 57
662664
Top = 2
663665
Caption = 'ToolButton11'
664666
Style = tbsDivider
665667
end
666668
object ToolButton7: TToolButton
667-
Left = 266
668-
Height = 50
669+
Left = 291
670+
Height = 57
669671
Top = 2
670672
Caption = 'ToolButton7'
671673
Style = tbsDivider
672674
end
673675
object ToolButton9: TToolButton
674-
Left = 375
675-
Height = 50
676+
Left = 499
677+
Height = 57
676678
Top = 2
677679
Caption = 'ToolButton9'
678680
Style = tbsDivider
@@ -682,18 +684,21 @@ object fmDomain: TfmDomain
682684
Height = 50
683685
Hint = 'Change Background Color'
684686
Top = 2
685-
Width = 51
687+
Width = 58
686688
Align = alLeft
687689
BorderWidth = 2
688690
ButtonColorSize = 16
689691
ButtonColor = clSilver
690692
Flat = True
693+
Font.Height = -13
694+
Font.Name = 'MS Sans Serif'
691695
OnColorChanged = btBackgroundColorChanged
696+
ParentFont = False
692697
end
693698
end
694699
object glShape: TGLScene
695-
left = 463
696-
top = 8
700+
left = 531
701+
top = 9
697702
object XYGrid: TGLXYZGrid
698703
TagFloat = 0
699704
PitchAngle = 0
@@ -908,8 +913,8 @@ object fmDomain: TfmDomain
908913
Up.Coordinates = {
909914
00000000000000000000803F00000000
910915
}
911-
left = 241
912-
top = 145
916+
left = 276
917+
top = 166
913918
end
914919
object DCCoordsX: TGLDummyCube
915920
TagFloat = 0
@@ -948,13 +953,13 @@ object fmDomain: TfmDomain
948953
object SynUNIXShellScriptSyn1: TSynUNIXShellScriptSyn
949954
DefaultFilter = 'UNIX Shell Scripts (*.sh)|*.sh'
950955
Enabled = False
951-
left = 960
952-
top = 8
956+
left = 1100
957+
top = 9
953958
end
954959
object acShapeRender: TActionList
955960
Images = ImageList3
956-
left = 536
957-
top = 8
961+
left = 614
962+
top = 9
958963
object acResetCamera: TAction
959964
Caption = 'acResetCamera'
960965
Hint = 'Reset Camera'
@@ -1000,15 +1005,15 @@ object fmDomain: TfmDomain
10001005
end
10011006
object dlSaveScreen: TSavePictureDialog
10021007
Filter = 'Bitmaps (*.bmp)|*.bmp|All files (*)|*'
1003-
left = 632
1004-
top = 8
1008+
left = 724
1009+
top = 9
10051010
end
10061011
object ImageList3: TImageList
10071012
Height = 48
10081013
ImageType = itMask
10091014
Width = 48
1010-
left = 721
1011-
top = 8
1015+
left = 826
1016+
top = 9
10121017
Bitmap = {
10131018
4C69080000003000000030000000000000000000000000000000000000000000
10141019
0000000000000000000000000000000000000000000000000000000000000000
@@ -3321,21 +3326,20 @@ object fmDomain: TfmDomain
33213326
DefaultExt = '.json'
33223327
Filter = 'JSON File (*.json)|*.json|All (*.*)|*.*'
33233328
Options = [ofOverwritePrompt, ofEnableSizing, ofViewDetail]
3324-
left = 808
3325-
top = 8
3329+
left = 926
3330+
top = 9
33263331
end
33273332
object dlSaveFile: TSaveDialog
33283333
DefaultExt = '.json'
33293334
Filter = 'JSON File (*.json)|*.json|All (*.*)|*.*'
33303335
Options = [ofOverwritePrompt, ofEnableSizing, ofViewDetail]
3331-
left = 896
3332-
top = 8
3336+
left = 1027
3337+
top = 9
33333338
end
33343339
object GLWinBmpFont: TGLWindowsBitmapFont
33353340
Font.Color = clWhite
3336-
Font.Height = 20
33373341
Font.Name = 'Arial'
3338-
left = 592
3339-
top = 8
3342+
left = 678
3343+
top = 9
33403344
end
33413345
end

mcxstudio/mcxrender.pas

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,9 @@ procedure TfmDomain.FormCreate(Sender: TObject);
873873
colormap[i][2]:=random;
874874
end;
875875
editorwidth:=plEditor.Width;
876+
if(Application.HasOption('f','json')) then begin
877+
mmShapeJSON.Lines.LoadFromFile(Application.GetOptionValue('f', 'json'));
878+
end;
876879
end;
877880

878881
procedure TfmDomain.FormDestroy(Sender: TObject);

0 commit comments

Comments
 (0)