Browse Source

* Patch from Paul Ishenin to implement SetDesigning and SetDesignInstance

git-svn-id: trunk@10890 -
michael 17 years ago
parent
commit
ee1757a6c5
2 changed files with 25 additions and 5 deletions
  1. 3 1
      rtl/objpas/classes/classesh.inc
  2. 22 4
      rtl/objpas/classes/compon.inc

+ 3 - 1
rtl/objpas/classes/classesh.inc

@@ -1510,7 +1510,9 @@ type
     procedure PaletteCreated; dynamic;
     procedure ReadState(Reader: TReader); virtual;
     procedure SetAncestor(Value: Boolean);
-    procedure SetDesigning(Value: Boolean);
+    procedure SetDesigning(Value: Boolean; SetChildren : Boolean = True);
+    procedure SetDesignInstance(Value: Boolean);
+    procedure SetInline(Value: Boolean);
     procedure SetName(const NewName: TComponentName); virtual;
     procedure SetChildOrder(Child: TComponent; Order: Integer); dynamic;
     procedure SetParentComponent(Value: TComponent); dynamic;

+ 22 - 4
rtl/objpas/classes/compon.inc

@@ -288,20 +288,38 @@ begin
 end;
 
 
-Procedure TComponent.SetDesigning(Value: Boolean);
+Procedure TComponent.SetDesigning(Value: Boolean; SetChildren : Boolean = True);
 
 Var Runner : Longint;
 
 begin
   If Value then
-    Include(FComponentSTate,csDesigning)
+    Include(FComponentState,csDesigning)
   else
-    Exclude(FComponentSTate,csDesigning);
-  if Assigned(FComponents) then
+    Exclude(FComponentState,csDesigning);
+  if Assigned(FComponents) and SetChildren then
     For Runner:=0 To FComponents.Count - 1 do
       TComponent(FComponents.items[Runner]).SetDesigning(Value);
 end;
 
+Procedure TComponent.SetDesignInstance(Value: Boolean);
+
+begin
+  If Value then
+    Include(FComponentState,csDesignInstance)
+  else
+    Exclude(FComponentState,csDesignInstance);
+end;
+
+Procedure TComponent.SetInline(Value: Boolean);
+
+begin
+  If Value then
+    Include(FComponentState,csInline)
+  else
+    Exclude(FComponentState,csInline);
+end;
+
 
 Procedure TComponent.SetName(const NewName: TComponentName);