mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 17:01:35 +02:00
MG: added some property editors and started component editors
git-svn-id: trunk@3270 -
This commit is contained in:
parent
40969b15f4
commit
a168428731
@ -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])
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user