MG: added some property editors and started component editors

git-svn-id: trunk@3270 -
This commit is contained in:
lazarus 2002-08-31 18:45:53 +00:00
parent 40969b15f4
commit a168428731
3 changed files with 29 additions and 5 deletions

View File

@ -1043,7 +1043,8 @@ end;
function TPascalParserTool.ReadParamType(ExceptionOnError, Extract: boolean;
Attr: TProcHeadAttributes): boolean;
var copying: boolean;
var
copying: boolean;
begin
copying:=[phpWithoutParamList,phpWithoutParamTypes]*Attr=[];
Result:=false;
@ -1079,12 +1080,27 @@ begin
CreateChildNode;
CurNode.Desc:=ctnIdentifier;
CurNode.EndPos:=CurPos.EndPos;
EndChildNode;
end;
if not Extract then
ReadNextAtom
else
ExtractNextAtom(copying,Attr);
if CurPos.Flag=cafPoint then begin
// first identifier was unitname -> read '.' + identifier
if not Extract then
ReadNextAtom
else
ExtractNextAtom(copying,Attr);
if not AtomIsIdentifier(ExceptionOnError) then exit;
CurNode.EndPos:=CurPos.EndPos;
if not Extract then
ReadNextAtom
else
ExtractNextAtom(copying,Attr);
end;
if (phpCreateNodes in Attr) then begin
EndChildNode;
end;
end else begin
if ExceptionOnError then
SaveRaiseExceptionFmt(ctsStrExpectedButAtomFound,[ctsIdentifier,GetAtom])

View File

@ -719,8 +719,8 @@ begin
end else begin
FCurrentEdit:=ValueEdit;
// XXX
//ValueEdit.ReadOnly:=paReadOnly in NewRow.Editor.GetAttributes;
//ValueEdit.MaxLength:=NewRow.Editor.GetEditLimit;
ValueEdit.ReadOnly:=paReadOnly in NewRow.Editor.GetAttributes;
ValueEdit.MaxLength:=NewRow.Editor.GetEditLimit;
ValueEdit.Text:=NewValue;
ValueEdit.Visible:=true;
end;

View File

@ -110,6 +110,7 @@ TCustomFormEditor
FComponentInterfaceList : TList; //used to track and find controls
FSelectedComponents : TComponentSelectionList;
FObj_Inspector : TObjectInspector;
function GetPropertyEditorHook: TPropertyEditorHook;
protected
Procedure RemoveFromComponentInterfaceList(Value :TIComponentInterface);
procedure SetSelectedComponents(TheSelectedComponents : TComponentSelectionList);
@ -137,7 +138,9 @@ TCustomFormEditor
Procedure ClearSelected;
property SelectedComponents : TComponentSelectionList
read FSelectedComponents write SetSelectedComponents;
property Obj_Inspector : TObjectInspector read FObj_Inspector write SetObj_Inspector;
property Obj_Inspector : TObjectInspector
read FObj_Inspector write SetObj_Inspector;
property PropertyEditorHook: TPropertyEditorHook read GetPropertyEditorHook;
end;
@ -762,6 +765,11 @@ begin
end;
end;
function TCustomFormEditor.GetPropertyEditorHook: TPropertyEditorHook;
begin
Result:=Obj_Inspector.PropertyEditorHook;
end;
Procedure TCustomFormEditor.RemoveFromComponentInterfaceList(
Value :TIComponentInterface);
Begin