浏览代码

Add option UI.

Martijn Laan 5 年之前
父节点
当前提交
48c34c70e2
共有 3 个文件被更改,包括 33 次插入22 次删除
  1. 2 0
      Projects/CompForm.pas
  2. 30 22
      Projects/CompOptions.dfm
  3. 1 0
      Projects/CompOptions.pas

+ 2 - 0
Projects/CompForm.pas

@@ -2427,6 +2427,7 @@ begin
     OptionsForm.AutoIndentCheck.Checked := FOptions.AutoIndent;
     OptionsForm.IndentationGuidesCheck.Checked := FOptions.IndentationGuides;
     OptionsForm.GutterLineNumbersCheck.Checked := FOptions.GutterLineNumbers;
+    OptionsForm.ShowPreprocessorOutputCheck.Checked := FOptions.ShowPreprocessorOutput;
     OptionsForm.OpenIncludedFilesCheck.Checked := FOptions.OpenIncludedFiles;
     OptionsForm.ThemeComboBox.ItemIndex := Ord(FOptions.ThemeType);
     OptionsForm.FontPanel.Font.Assign(FMainMemo.Font);
@@ -2455,6 +2456,7 @@ begin
     FOptions.AutoIndent := OptionsForm.AutoIndentCheck.Checked;
     FOptions.IndentationGuides := OptionsForm.IndentationGuidesCheck.Checked;
     FOptions.GutterLineNumbers := OptionsForm.GutterLineNumbersCheck.Checked;
+    FOptions.ShowPreprocessorOutput := OptionsForm.ShowPreprocessorOutputCheck.Checked;
     FOptions.OpenIncludedFiles := OptionsForm.OpenIncludedFilesCheck.Checked;
     FOptions.ThemeType := TThemeType(OptionsForm.ThemeComboBox.ItemIndex);
     

+ 30 - 22
Projects/CompOptions.dfm

@@ -4,7 +4,7 @@ object OptionsForm: TOptionsForm
   BorderIcons = [biSystemMenu]
   BorderStyle = bsDialog
   Caption = 'Options'
-  ClientHeight = 349
+  ClientHeight = 355
   ClientWidth = 589
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
@@ -17,14 +17,14 @@ object OptionsForm: TOptionsForm
   OnCreate = FormCreate
   DesignSize = (
     589
-    349)
+    355)
   PixelsPerInch = 96
   TextHeight = 13
   object GroupBox1: TGroupBox
     Left = 8
     Top = 8
     Width = 281
-    Height = 233
+    Height = 245
     Anchors = [akLeft, akTop, akBottom]
     Caption = ' Miscellaneous '
     TabOrder = 0
@@ -46,72 +46,80 @@ object OptionsForm: TOptionsForm
     end
     object AutosaveCheck: TCheckBox
       Left = 8
-      Top = 76
+      Top = 96
       Width = 265
       Height = 17
       Caption = 'Automatically sa&ve before compiling'
-      TabOrder = 3
+      TabOrder = 4
     end
     object BackupCheck: TCheckBox
       Left = 8
-      Top = 96
+      Top = 116
       Width = 265
       Height = 17
       Caption = 'Create &backups when saving'
-      TabOrder = 4
+      TabOrder = 5
     end
     object UndoAfterSaveCheck: TCheckBox
       Left = 8
-      Top = 116
+      Top = 136
       Width = 265
       Height = 17
       Caption = 'Allow &Undo after save'
-      TabOrder = 5
+      TabOrder = 6
     end
     object FullPathCheck: TCheckBox
       Left = 8
-      Top = 136
+      Top = 156
       Width = 265
       Height = 17
       Caption = 'Display &full path in title bar'
-      TabOrder = 6
+      TabOrder = 7
     end
     object PauseOnDebuggerExceptionsCheck: TCheckBox
       Left = 8
-      Top = 156
+      Top = 176
       Width = 265
       Height = 17
       Caption = '&Pause on exceptions'
-      TabOrder = 7
+      TabOrder = 8
     end
     object RunAsDifferentUserCheck: TCheckBox
       Left = 8
-      Top = 176
+      Top = 196
       Width = 265
       Height = 17
       Caption = '*'
-      TabOrder = 8
+      TabOrder = 9
     end
     object ColorizeCompilerOutputCheck: TCheckBox
       Left = 8
-      Top = 196
+      Top = 216
       Width = 265
       Height = 17
       Caption = 'Colori&ze "Compiler Output" view'
-      TabOrder = 9
+      TabOrder = 10
     end
     object OpenIncludedFilesCheck: TCheckBox
       Left = 8
-      Top = 56
+      Top = 76
       Width = 265
       Height = 17
       Caption = 'Automatically open #include files'
+      TabOrder = 3
+    end
+    object ShowPreprocessorOutputCheck: TCheckBox
+      Left = 8
+      Top = 56
+      Width = 265
+      Height = 17
+      Caption = 'Automatically show preprocessor output'
       TabOrder = 2
     end
   end
   object GroupBox2: TGroupBox
     Left = 8
-    Top = 248
+    Top = 254
     Width = 281
     Height = 57
     Anchors = [akLeft, akBottom]
@@ -135,7 +143,7 @@ object OptionsForm: TOptionsForm
     Left = 300
     Top = 8
     Width = 281
-    Height = 297
+    Height = 303
     Anchors = [akLeft, akTop, akBottom]
     Caption = ' Editor '
     TabOrder = 2
@@ -275,7 +283,7 @@ object OptionsForm: TOptionsForm
   end
   object OKButton: TButton
     Left = 428
-    Top = 317
+    Top = 323
     Width = 73
     Height = 23
     Anchors = [akLeft, akBottom]
@@ -286,7 +294,7 @@ object OptionsForm: TOptionsForm
   end
   object CancelButton: TButton
     Left = 508
-    Top = 317
+    Top = 323
     Width = 73
     Height = 23
     Anchors = [akLeft, akBottom]

+ 1 - 0
Projects/CompOptions.pas

@@ -50,6 +50,7 @@ type
     Label3: TNewStaticText;
     ThemeComboBox: TComboBox;
     OpenIncludedFilesCheck: TCheckBox;
+    ShowPreprocessorOutputCheck: TCheckBox;
     procedure AssocButtonClick(Sender: TObject);
     procedure ChangeFontButtonClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);