OSDN Git Service

osdn 登録用コミット
authoryamat0jp <yamat0jp@yahoo.co.jp>
Sun, 26 Sep 2021 02:58:10 +0000 (11:58 +0900)
committeryamat0jp <yamat0jp@yahoo.co.jp>
Sun, 26 Sep 2021 02:58:10 +0000 (11:58 +0900)
Undo.pas
Unit1.dfm

index 6771af2..9f41381 100644 (file)
--- a/Undo.pas
+++ b/Undo.pas
@@ -47,9 +47,8 @@ type
   end;
 
   TUndoClass = class(TComponent)
-  const
-    Max = 5;
   private
+    FMax: integer;
     FStack: TObjectStack;
     FReStack: TObjectStack;
     FMemo: TCustomMemo;
@@ -81,6 +80,7 @@ type
     property Memo: TCustomMemo read FMemo write SetMemo;
     property CanUndo: Boolean read GetCanUndo;
     property CanRedo: Boolean read GetCanRedo;
+    property Max: integer read FMax write FMax;
   end;
 
 implementation
@@ -100,6 +100,7 @@ end;
 constructor TUndoClass.Create(AOwner: TComponent);
 begin
   inherited;
+  FMax := 5;
   FStack := TObjectStack.Create;
   FReStack := TObjectStack.Create;
 end;
index 648f5b2..c819e51 100644 (file)
--- a/Unit1.dfm
+++ b/Unit1.dfm
@@ -73,6 +73,7 @@ object Form1: TForm1
     object ToolButton8: TToolButton
       Left = 56
       Top = 0
+      Hint = 'Undo'
       Action = Action3
       Enabled = False
       ImageIndex = 4
@@ -88,6 +89,7 @@ object Form1: TForm1
     object ToolButton11: TToolButton
       Left = 87
       Top = 0
+      Hint = 'Redo'
       Action = Action5
       Enabled = False
       ImageIndex = 1
@@ -221,7 +223,7 @@ object Form1: TForm1
     Left = 200
     Top = 88
     Bitmap = {
-      494C010106000800940010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+      494C010106000800980010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
       0000000000003600000028000000400000002000000001002000000000000020
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000