mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 07:19:40 +02:00
- constructor/destructor is now supported
- resourcestrings are being used from Darius git-svn-id: trunk@7709 -
This commit is contained in:
parent
e15d34e787
commit
5602b9a48c
@ -2835,6 +2835,14 @@ resourcestring
|
|||||||
lisCEOWhenSwitchingFile = 'When switching file in source editor';
|
lisCEOWhenSwitchingFile = 'When switching file in source editor';
|
||||||
lisCEOOnIdle = 'On idle';
|
lisCEOOnIdle = 'On idle';
|
||||||
|
|
||||||
|
lisMenuLazDoc = 'LazDoc';
|
||||||
|
lisLazDocMainFormCaption = 'LazDoc editor';
|
||||||
|
lisLazDocNoTagCaption = '<NONE>';
|
||||||
|
lisLazDocNoDocumentation = 'Documentation entry does not exist';
|
||||||
|
lisLazDocShortTag = 'Short';
|
||||||
|
lisLazDocDescrTag = 'Description';
|
||||||
|
lisLazDocErrorsTag = 'Errors';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -1,34 +1,34 @@
|
|||||||
object LazDocForm: TLazDocForm
|
object LazDocForm: TLazDocForm
|
||||||
ActiveControl = ErrorsTabSheet
|
ActiveControl = ShortTabSheet
|
||||||
BorderStyle = bsSizeToolWin
|
BorderStyle = bsSizeToolWin
|
||||||
Caption = 'LazDoc editor'
|
Caption = 'LazDoc editor'
|
||||||
ClientHeight = 195
|
ClientHeight = 117
|
||||||
ClientWidth = 753
|
ClientWidth = 753
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
HorzScrollBar.Page = 752
|
HorzScrollBar.Page = 752
|
||||||
VertScrollBar.Page = 194
|
VertScrollBar.Page = 116
|
||||||
Left = 245
|
Left = 260
|
||||||
Height = 195
|
Height = 117
|
||||||
Top = 506
|
Top = 584
|
||||||
Width = 753
|
Width = 753
|
||||||
object PageControl: TPageControl
|
object PageControl: TPageControl
|
||||||
ActivePage = ErrorsTabSheet
|
ActivePage = ShortTabSheet
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.OnChange = nil
|
TabIndex = 0
|
||||||
TabIndex = 2
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TabPosition = tpBottom
|
TabPosition = tpBottom
|
||||||
Height = 195
|
Height = 117
|
||||||
Width = 753
|
Width = 753
|
||||||
object ShortTabSheet: TTabSheet
|
object ShortTabSheet: TTabSheet
|
||||||
Caption = 'ShortTabSheet'
|
Caption = 'ShortTabSheet'
|
||||||
ClientHeight = 169
|
ClientHeight = 91
|
||||||
ClientWidth = 745
|
ClientWidth = 745
|
||||||
Height = 169
|
Height = 91
|
||||||
Width = 745
|
Width = 745
|
||||||
object ShortEdit: TEdit
|
object ShortEdit: TEdit
|
||||||
Align = alTop
|
Align = alTop
|
||||||
|
BorderSpacing.OnChange = nil
|
||||||
OnChange = DescrMemoChange
|
OnChange = DescrMemoChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = 'ShortEdit'
|
Text = 'ShortEdit'
|
||||||
@ -38,13 +38,12 @@ object LazDocForm: TLazDocForm
|
|||||||
end
|
end
|
||||||
object DescrTabSheet: TTabSheet
|
object DescrTabSheet: TTabSheet
|
||||||
Caption = 'DescrTabSheet'
|
Caption = 'DescrTabSheet'
|
||||||
ClientHeight = 169
|
ClientHeight = 91
|
||||||
ClientWidth = 745
|
ClientWidth = 745
|
||||||
Height = 169
|
Height = 91
|
||||||
Width = 745
|
Width = 745
|
||||||
object DescrMemo: TMemo
|
object DescrMemo: TMemo
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.OnChange = nil
|
|
||||||
Font.CharSet = ANSI_CHARSET
|
Font.CharSet = ANSI_CHARSET
|
||||||
Font.Color = clBlack
|
Font.Color = clBlack
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
@ -55,18 +54,19 @@ object LazDocForm: TLazDocForm
|
|||||||
)
|
)
|
||||||
OnChange = DescrMemoChange
|
OnChange = DescrMemoChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Height = 169
|
Height = 91
|
||||||
Width = 745
|
Width = 745
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ErrorsTabSheet: TTabSheet
|
object ErrorsTabSheet: TTabSheet
|
||||||
Caption = 'ErrorsTabSheet'
|
Caption = 'ErrorsTabSheet'
|
||||||
ClientHeight = 169
|
ClientHeight = 91
|
||||||
ClientWidth = 745
|
ClientWidth = 745
|
||||||
Height = 169
|
Height = 91
|
||||||
Width = 745
|
Width = 745
|
||||||
object ErrorsMemo: TMemo
|
object ErrorsMemo: TMemo
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
BorderSpacing.OnChange = nil
|
||||||
Font.CharSet = ANSI_CHARSET
|
Font.CharSet = ANSI_CHARSET
|
||||||
Font.Color = clBlack
|
Font.Color = clBlack
|
||||||
Font.Height = -12
|
Font.Height = -12
|
||||||
@ -77,7 +77,7 @@ object LazDocForm: TLazDocForm
|
|||||||
)
|
)
|
||||||
OnChange = DescrMemoChange
|
OnChange = DescrMemoChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Height = 169
|
Height = 91
|
||||||
Width = 745
|
Width = 745
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TLazDocForm','FORMDATA',[
|
LazarusResources.Add('TLazDocForm','FORMDATA',[
|
||||||
'TPF0'#11'TLazDocForm'#10'LazDocForm'#13'ActiveControl'#7#14'ErrorsTabSheet'
|
'TPF0'#11'TLazDocForm'#10'LazDocForm'#13'ActiveControl'#7#13'ShortTabSheet'#11
|
||||||
+#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#13'LazDoc editor'#12'Clien'
|
+'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#13'LazDoc editor'#12'ClientHe'
|
||||||
+'tHeight'#3#195#0#11'ClientWidth'#3#241#2#8'OnCreate'#7#10'FormCreate'#13'Pi'
|
+'ight'#2'u'#11'ClientWidth'#3#241#2#8'OnCreate'#7#10'FormCreate'#13'PixelsPe'
|
||||||
+'xelsPerInch'#2'`'#18'HorzScrollBar.Page'#3#240#2#18'VertScrollBar.Page'#3
|
+'rInch'#2'`'#18'HorzScrollBar.Page'#3#240#2#18'VertScrollBar.Page'#2't'#4'Le'
|
||||||
+#194#0#4'Left'#3#245#0#6'Height'#3#195#0#3'Top'#3#250#1#5'Width'#3#241#2#0#12
|
+'ft'#3#4#1#6'Height'#2'u'#3'Top'#3'H'#2#5'Width'#3#241#2#0#12'TPageControl'
|
||||||
+'TPageControl'#11'PageControl'#10'ActivePage'#7#14'ErrorsTabSheet'#5'Align'#7
|
+#11'PageControl'#10'ActivePage'#7#13'ShortTabSheet'#5'Align'#7#8'alClient'#8
|
||||||
+#8'alClient'#22'BorderSpacing.OnChange'#13#8'TabIndex'#2#2#8'TabOrder'#2#0#11
|
+'TabIndex'#2#0#8'TabOrder'#2#0#11'TabPosition'#7#8'tpBottom'#6'Height'#2'u'#5
|
||||||
+'TabPosition'#7#8'tpBottom'#6'Height'#3#195#0#5'Width'#3#241#2#0#9'TTabSheet'
|
+'Width'#3#241#2#0#9'TTabSheet'#13'ShortTabSheet'#7'Caption'#6#13'ShortTabShe'
|
||||||
+#13'ShortTabSheet'#7'Caption'#6#13'ShortTabSheet'#12'ClientHeight'#3#169#0#11
|
+'et'#12'ClientHeight'#2'['#11'ClientWidth'#3#233#2#6'Height'#2'['#5'Width'#3
|
||||||
+'ClientWidth'#3#233#2#6'Height'#3#169#0#5'Width'#3#233#2#0#5'TEdit'#9'ShortE'
|
+#233#2#0#5'TEdit'#9'ShortEdit'#5'Align'#7#5'alTop'#22'BorderSpacing.OnChange'
|
||||||
+'dit'#5'Align'#7#5'alTop'#8'OnChange'#7#15'DescrMemoChange'#8'TabOrder'#2#0#4
|
+#13#8'OnChange'#7#15'DescrMemoChange'#8'TabOrder'#2#0#4'Text'#6#9'ShortEdit'
|
||||||
+'Text'#6#9'ShortEdit'#6'Height'#2#23#5'Width'#3#233#2#0#0#0#9'TTabSheet'#13
|
+#6'Height'#2#23#5'Width'#3#233#2#0#0#0#9'TTabSheet'#13'DescrTabSheet'#7'Capt'
|
||||||
+'DescrTabSheet'#7'Caption'#6#13'DescrTabSheet'#12'ClientHeight'#3#169#0#11'C'
|
+'ion'#6#13'DescrTabSheet'#12'ClientHeight'#2'['#11'ClientWidth'#3#233#2#6'He'
|
||||||
+'lientWidth'#3#233#2#6'Height'#3#169#0#5'Width'#3#233#2#0#5'TMemo'#9'DescrMe'
|
+'ight'#2'['#5'Width'#3#233#2#0#5'TMemo'#9'DescrMemo'#5'Align'#7#8'alClient'
|
||||||
+'mo'#5'Align'#7#8'alClient'#22'BorderSpacing.OnChange'#13#12'Font.CharSet'#7
|
+#12'Font.CharSet'#7#12'ANSI_CHARSET'#10'Font.Color'#7#7'clBlack'#11'Font.Hei'
|
||||||
+#12'ANSI_CHARSET'#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#244#9'Font.N'
|
+'ght'#2#244#9'Font.Name'#6#11'Courier New'#10'Font.Pitch'#7#7'fpFixed'#13'Li'
|
||||||
+'ame'#6#11'Courier New'#10'Font.Pitch'#7#7'fpFixed'#13'Lines.Strings'#1#6#9
|
+'nes.Strings'#1#6#9'DescrMemo'#0#8'OnChange'#7#15'DescrMemoChange'#8'TabOrde'
|
||||||
+'DescrMemo'#0#8'OnChange'#7#15'DescrMemoChange'#8'TabOrder'#2#0#6'Height'#3
|
+'r'#2#0#6'Height'#2'['#5'Width'#3#233#2#0#0#0#9'TTabSheet'#14'ErrorsTabSheet'
|
||||||
+#169#0#5'Width'#3#233#2#0#0#0#9'TTabSheet'#14'ErrorsTabSheet'#7'Caption'#6#14
|
+#7'Caption'#6#14'ErrorsTabSheet'#12'ClientHeight'#2'['#11'ClientWidth'#3#233
|
||||||
+'ErrorsTabSheet'#12'ClientHeight'#3#169#0#11'ClientWidth'#3#233#2#6'Height'#3
|
+#2#6'Height'#2'['#5'Width'#3#233#2#0#5'TMemo'#10'ErrorsMemo'#5'Align'#7#8'al'
|
||||||
+#169#0#5'Width'#3#233#2#0#5'TMemo'#10'ErrorsMemo'#5'Align'#7#8'alClient'#12
|
+'Client'#22'BorderSpacing.OnChange'#13#12'Font.CharSet'#7#12'ANSI_CHARSET'#10
|
||||||
+'Font.CharSet'#7#12'ANSI_CHARSET'#10'Font.Color'#7#7'clBlack'#11'Font.Height'
|
+'Font.Color'#7#7'clBlack'#11'Font.Height'#2#244#9'Font.Name'#6#11'Courier Ne'
|
||||||
+#2#244#9'Font.Name'#6#11'Courier New'#10'Font.Pitch'#7#7'fpFixed'#13'Lines.S'
|
+'w'#10'Font.Pitch'#7#7'fpFixed'#13'Lines.Strings'#1#6#10'ErrorsMemo'#0#8'OnC'
|
||||||
+'trings'#1#6#10'ErrorsMemo'#0#8'OnChange'#7#15'DescrMemoChange'#8'TabOrder'#2
|
+'hange'#7#15'DescrMemoChange'#8'TabOrder'#2#0#6'Height'#2'['#5'Width'#3#233#2
|
||||||
+#0#6'Height'#3#169#0#5'Width'#3#233#2#0#0#0#0#0
|
+#0#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -41,6 +41,7 @@ uses
|
|||||||
DOM,
|
DOM,
|
||||||
Forms,
|
Forms,
|
||||||
Graphics,
|
Graphics,
|
||||||
|
LazarusIDEStrConsts,
|
||||||
LCLProc,
|
LCLProc,
|
||||||
LResources,
|
LResources,
|
||||||
StdCtrls,
|
StdCtrls,
|
||||||
@ -89,10 +90,6 @@ type
|
|||||||
property DocFileName: String read FDocFileName write SetDocFileName;
|
property DocFileName: String read FDocFileName write SetDocFileName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
|
||||||
MAINFORMCAPTION = 'LazDoc editor';
|
|
||||||
NODOCUMENTATION = 'Documentation entry does not exist';
|
|
||||||
|
|
||||||
var
|
var
|
||||||
LazDocForm: TLazDocForm;
|
LazDocForm: TLazDocForm;
|
||||||
doc: TXMLdocument = nil; // maybe better to make it a member field of TLazFormDoc
|
doc: TXMLdocument = nil; // maybe better to make it a member field of TLazFormDoc
|
||||||
@ -139,13 +136,13 @@ end;
|
|||||||
|
|
||||||
procedure TLazDocForm.FormCreate(Sender: TObject);
|
procedure TLazDocForm.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Caption := MAINFORMCAPTION;
|
Caption := lisLazDocMainFormCaption;
|
||||||
|
|
||||||
with PageControl do
|
with PageControl do
|
||||||
begin
|
begin
|
||||||
Page[0].Caption := 'Short';
|
Page[0].Caption := lisLazDocShortTag;
|
||||||
Page[1].Caption := 'Description';
|
Page[1].Caption := lisLazDocDescrTag;
|
||||||
Page[2].Caption := 'Errors';
|
Page[2].Caption := lisLazDocErrorsTag;
|
||||||
PageIndex := 0;
|
PageIndex := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -302,6 +299,16 @@ begin
|
|||||||
Result := ExtractFuncProc(Point(xpos, ypos), 'function', source);
|
Result := ExtractFuncProc(Point(xpos, ypos), 'function', source);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
if PosEx('constructor', source[ypos], xpos) = 1 then
|
||||||
|
begin
|
||||||
|
Result := ExtractFuncProc(Point(xpos, ypos), 'constructor', source);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if PosEx('desctructor', source[ypos], xpos) = 1 then
|
||||||
|
begin
|
||||||
|
Result := ExtractFuncProc(Point(xpos, ypos), 'desctructor', source);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -309,12 +316,12 @@ procedure TLazDocForm.SetCaption;
|
|||||||
var
|
var
|
||||||
strCaption: String;
|
strCaption: String;
|
||||||
begin
|
begin
|
||||||
strCaption := MAINFORMCAPTION + ' - ';
|
strCaption := lisLazDocMainFormCaption + ' - ';
|
||||||
|
|
||||||
if FCurrentElement <> '' then
|
if FCurrentElement <> '' then
|
||||||
strCaption := strCaption + FCurrentElement + ' - '
|
strCaption := strCaption + FCurrentElement + ' - '
|
||||||
else
|
else
|
||||||
strCaption := strCaption + '<NONE> - ';
|
strCaption := strCaption + lisLazDocNoTagCaption + ' - ';
|
||||||
|
|
||||||
Caption := strCaption + FDocFileName;
|
Caption := strCaption + FDocFileName;
|
||||||
end;
|
end;
|
||||||
@ -369,9 +376,9 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ShortEdit.Text := NODOCUMENTATION;
|
ShortEdit.Text := lisLazDocNoDocumentation;
|
||||||
DescrMemo.Lines.Text := NODOCUMENTATION;
|
DescrMemo.Lines.Text := lisLazDocNoDocumentation;
|
||||||
ErrorsMemo.Lines.Text := NODOCUMENTATION;
|
ErrorsMemo.Lines.Text := lisLazDocNoDocumentation;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//attach the update method again
|
//attach the update method again
|
||||||
|
@ -653,7 +653,7 @@ begin
|
|||||||
CreateMenuItem(ParentMI,itmToolGuessMisplacedIFDEF,'itmToolGuessMisplacedIFDEF',lisMenuGuessMisplacedIFDEF);
|
CreateMenuItem(ParentMI,itmToolGuessMisplacedIFDEF,'itmToolGuessMisplacedIFDEF',lisMenuGuessMisplacedIFDEF);
|
||||||
CreateMenuItem(ParentMI,itmToolMakeResourceString,'itmToolMakeResourceString',lisMenuMakeResourceString);
|
CreateMenuItem(ParentMI,itmToolMakeResourceString,'itmToolMakeResourceString',lisMenuMakeResourceString);
|
||||||
CreateMenuItem(ParentMI,itmToolDiff,'itmToolDiff',lisMenuDiff);
|
CreateMenuItem(ParentMI,itmToolDiff,'itmToolDiff',lisMenuDiff);
|
||||||
CreateMenuItem(ParentMI,itmToolLazDoc,'itmToolLazDoc','LazDoc'); //DBlaszijk 5-sep-05
|
CreateMenuItem(ParentMI,itmToolLazDoc,'itmToolLazDoc',lisMenuLazDoc); //DBlaszijk 5-sep-05
|
||||||
ParentMI.Add(CreateMenuSeparator);
|
ParentMI.Add(CreateMenuSeparator);
|
||||||
|
|
||||||
CreateMenuItem(ParentMI,itmToolCheckLFM,'itmToolCheckLFM',lisMenuCheckLFM);
|
CreateMenuItem(ParentMI,itmToolCheckLFM,'itmToolCheckLFM',lisMenuCheckLFM);
|
||||||
|
Loading…
Reference in New Issue
Block a user