mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 22:58:50 +02:00
IDE: fpdoc editor: added menu item to insert PrintShort tag, from Graeme, bug #14369
git-svn-id: trunk@21341 -
This commit is contained in:
parent
fe771bf068
commit
d86f3e5aec
@ -3,7 +3,7 @@ object FPDocEditor: TFPDocEditor
|
||||
Height = 126
|
||||
Top = 620
|
||||
Width = 753
|
||||
ActiveControl = ShortEdit
|
||||
ActiveControl = LeftBtnPanel
|
||||
Caption = 'FPDoc editor'
|
||||
ClientHeight = 126
|
||||
ClientWidth = 753
|
||||
@ -26,8 +26,8 @@ object FPDocEditor: TFPDocEditor
|
||||
OnPageChanged = PageControlChange
|
||||
object ShortTabSheet: TTabSheet
|
||||
Caption = 'ShortTabSheet'
|
||||
ClientHeight = 95
|
||||
ClientWidth = 709
|
||||
ClientHeight = 91
|
||||
ClientWidth = 707
|
||||
object LinkLabel: TLabel
|
||||
AnchorSideTop.Control = LinkEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
@ -59,7 +59,7 @@ object FPDocEditor: TFPDocEditor
|
||||
Left = 82
|
||||
Height = 27
|
||||
Top = 0
|
||||
Width = 625
|
||||
Width = 623
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 2
|
||||
@ -105,7 +105,7 @@ object FPDocEditor: TFPDocEditor
|
||||
Left = 72
|
||||
Height = 27
|
||||
Top = 29
|
||||
Width = 635
|
||||
Width = 633
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 2
|
||||
@ -118,13 +118,13 @@ object FPDocEditor: TFPDocEditor
|
||||
end
|
||||
object InheritedTabSheet: TTabSheet
|
||||
Caption = 'InheritedTabSheet'
|
||||
ClientHeight = 95
|
||||
ClientWidth = 709
|
||||
ClientHeight = 91
|
||||
ClientWidth = 707
|
||||
object InheritedShortLabel: TLabel
|
||||
Left = 0
|
||||
Height = 14
|
||||
Top = 2
|
||||
Width = 709
|
||||
Width = 707
|
||||
Align = alTop
|
||||
BorderSpacing.Top = 2
|
||||
Caption = 'InheritedShortLabel'
|
||||
@ -139,7 +139,7 @@ object FPDocEditor: TFPDocEditor
|
||||
Left = 0
|
||||
Height = 27
|
||||
Top = 18
|
||||
Width = 709
|
||||
Width = 707
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
ReadOnly = True
|
||||
@ -191,13 +191,13 @@ object FPDocEditor: TFPDocEditor
|
||||
end
|
||||
object DescrTabSheet: TTabSheet
|
||||
Caption = 'DescrTabSheet'
|
||||
ClientHeight = 95
|
||||
ClientWidth = 709
|
||||
ClientHeight = 91
|
||||
ClientWidth = 707
|
||||
object DescrMemo: TMemo
|
||||
Left = 0
|
||||
Height = 91
|
||||
Height = 87
|
||||
Top = 0
|
||||
Width = 707
|
||||
Width = 705
|
||||
Align = alClient
|
||||
BorderSpacing.Right = 2
|
||||
BorderSpacing.Bottom = 4
|
||||
@ -211,13 +211,13 @@ object FPDocEditor: TFPDocEditor
|
||||
end
|
||||
object ErrorsTabSheet: TTabSheet
|
||||
Caption = 'ErrorsTabSheet'
|
||||
ClientHeight = 95
|
||||
ClientWidth = 709
|
||||
ClientHeight = 91
|
||||
ClientWidth = 707
|
||||
object ErrorsMemo: TMemo
|
||||
Left = 0
|
||||
Height = 91
|
||||
Height = 87
|
||||
Top = 0
|
||||
Width = 707
|
||||
Width = 705
|
||||
Align = alClient
|
||||
BorderSpacing.Right = 2
|
||||
BorderSpacing.Bottom = 4
|
||||
@ -230,13 +230,13 @@ object FPDocEditor: TFPDocEditor
|
||||
end
|
||||
object SeeAlsoTabSheet: TTabSheet
|
||||
Caption = 'SeeAlsoTabSheet'
|
||||
ClientHeight = 95
|
||||
ClientWidth = 709
|
||||
ClientHeight = 91
|
||||
ClientWidth = 707
|
||||
object SeeAlsoMemo: TMemo
|
||||
Left = 0
|
||||
Height = 95
|
||||
Height = 91
|
||||
Top = 0
|
||||
Width = 709
|
||||
Width = 707
|
||||
Align = alClient
|
||||
Lines.Strings = (
|
||||
'SeeAlsoMemo'
|
||||
@ -247,13 +247,13 @@ object FPDocEditor: TFPDocEditor
|
||||
end
|
||||
object ExampleTabSheet: TTabSheet
|
||||
Caption = 'ExampleTabSheet'
|
||||
ClientHeight = 95
|
||||
ClientWidth = 709
|
||||
ClientHeight = 91
|
||||
ClientWidth = 707
|
||||
object ExampleEdit: TEdit
|
||||
Left = 0
|
||||
Height = 27
|
||||
Top = 0
|
||||
Width = 707
|
||||
Width = 705
|
||||
Align = alTop
|
||||
BorderSpacing.Right = 2
|
||||
OnChange = ExampleEditChange
|
||||
@ -265,7 +265,7 @@ object FPDocEditor: TFPDocEditor
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ExampleTabSheet
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 570
|
||||
Left = 568
|
||||
Height = 23
|
||||
Top = 33
|
||||
Width = 133
|
||||
@ -413,5 +413,9 @@ object FPDocEditor: TFPDocEditor
|
||||
Caption = 'CopyShortToDescrMenuItem'
|
||||
OnClick = CopyShortToDescrMenuItemClick
|
||||
end
|
||||
object InsertPrintShortTag: TMenuItem
|
||||
Caption = 'InsertPrintShortTag'
|
||||
OnClick = InsertPrintShortTagClick
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ Das ist eine automatisch erzeugte Lazarus-Ressourcendatei }
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TFPDocEditor','FORMDATA',[
|
||||
'TPF0'#12'TFPDocEditor'#11'FPDocEditor'#4'Left'#3'>'#1#6'Height'#2'~'#3'Top'#3
|
||||
+'l'#2#5'Width'#3#241#2#13'ActiveControl'#7#9'ShortEdit'#7'Caption'#6#12'FPDo'
|
||||
+'c editor'#12'ClientHeight'#2'~'#11'ClientWidth'#3#241#2#8'OnCreate'#7#10'Fo'
|
||||
+'rmCreate'#9'OnDestroy'#7#11'FormDestroy'#8'OnResize'#7#10'FormResize'#10'LC'
|
||||
+'LVersion'#6#6'0.9.27'#0#12'TPageControl'#11'PageControl'#4'Left'#2'('#6'Hei'
|
||||
+'ght'#2'~'#3'Top'#2#0#5'Width'#3#201#2#10'ActivePage'#7#13'ShortTabSheet'#5
|
||||
+'l'#2#5'Width'#3#241#2#13'ActiveControl'#7#12'LeftBtnPanel'#7'Caption'#6#12
|
||||
+'FPDoc editor'#12'ClientHeight'#2'~'#11'ClientWidth'#3#241#2#8'OnCreate'#7#10
|
||||
+'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#8'OnResize'#7#10'FormResize'#10
|
||||
+'LCLVersion'#6#6'0.9.27'#0#12'TPageControl'#11'PageControl'#4'Left'#2'('#6'H'
|
||||
+'eight'#2'~'#3'Top'#2#0#5'Width'#3#201#2#10'ActivePage'#7#13'ShortTabSheet'#5
|
||||
+'Align'#7#8'alClient'#9'PopupMenu'#7#10'PopupMenu1'#8'TabIndex'#2#0#8'TabOrd'
|
||||
+'er'#2#0#11'TabPosition'#7#8'tpBottom'#8'OnChange'#7#17'PageControlChange'#13
|
||||
+'OnPageChanged'#7#17'PageControlChange'#0#9'TTabSheet'#13'ShortTabSheet'#7'C'
|
||||
+'aption'#6#13'ShortTabSheet'#12'ClientHeight'#2'_'#11'ClientWidth'#3#197#2#0
|
||||
+'aption'#6#13'ShortTabSheet'#12'ClientHeight'#2'['#11'ClientWidth'#3#195#2#0
|
||||
+#6'TLabel'#9'LinkLabel'#21'AnchorSideTop.Control'#7#8'LinkEdit'#18'AnchorSid'
|
||||
+'eTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#18#3'Top'#2'!'#5'Width'#2
|
||||
+'<'#17'BorderSpacing.Top'#2#6#7'Caption'#6#9'LinkLabel'#11'ParentColor'#8#0#0
|
||||
@ -20,7 +20,7 @@ LazarusResources.Add('TFPDocEditor','FORMDATA',[
|
||||
+#6#7'Caption'#6#10'ShortLabel'#11'ParentColor'#8#0#0#5'TEdit'#9'ShortEdit'#22
|
||||
+'AnchorSideLeft.Control'#7#10'ShortLabel'#19'AnchorSideLeft.Side'#7#9'asrBot'
|
||||
+'tom'#23'AnchorSideRight.Control'#7#13'ShortTabSheet'#20'AnchorSideRight.Sid'
|
||||
+'e'#7#9'asrBottom'#4'Left'#2'R'#6'Height'#2#27#3'Top'#2#0#5'Width'#3'q'#2#7
|
||||
+'e'#7#9'asrBottom'#4'Left'#2'R'#6'Height'#2#27#3'Top'#2#0#5'Width'#3'o'#2#7
|
||||
+'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#19'B'
|
||||
+'orderSpacing.Right'#2#2#8'OnChange'#7#20'ShortEditEditingDone'#13'OnEditing'
|
||||
+'Done'#7#20'ShortEditEditingDone'#8'TabOrder'#2#0#4'Text'#6#9'ShortEdit'#0#0
|
||||
@ -36,19 +36,19 @@ LazarusResources.Add('TFPDocEditor','FORMDATA',[
|
||||
+'el'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'Sh'
|
||||
+'ortEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7
|
||||
+#13'ShortTabSheet'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2'H'#6'He'
|
||||
+'ight'#2#27#3'Top'#2#29#5'Width'#3'{'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'a'
|
||||
+'ight'#2#27#3'Top'#2#29#5'Width'#3'y'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'a'
|
||||
+'kRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#2#19'BorderSpa'
|
||||
+'cing.Right'#2#2#8'OnChange'#7#19'LinkEditEditingDone'#13'OnEditingDone'#7#19
|
||||
+'LinkEditEditingDone'#8'TabOrder'#2#3#4'Text'#6#8'LinkEdit'#0#0#0#9'TTabShee'
|
||||
+'t'#17'InheritedTabSheet'#7'Caption'#6#17'InheritedTabSheet'#12'ClientHeight'
|
||||
+#2'_'#11'ClientWidth'#3#197#2#0#6'TLabel'#19'InheritedShortLabel'#4'Left'#2#0
|
||||
+#6'Height'#2#14#3'Top'#2#2#5'Width'#3#197#2#5'Align'#7#5'alTop'#17'BorderSpa'
|
||||
+#2'['#11'ClientWidth'#3#195#2#0#6'TLabel'#19'InheritedShortLabel'#4'Left'#2#0
|
||||
+#6'Height'#2#14#3'Top'#2#2#5'Width'#3#195#2#5'Align'#7#5'alTop'#17'BorderSpa'
|
||||
+'cing.Top'#2#2#7'Caption'#6#19'InheritedShortLabel'#11'ParentColor'#8#0#0#5
|
||||
+'TEdit'#18'InheritedShortEdit'#22'AnchorSideLeft.Control'#7#17'InheritedTabS'
|
||||
+'heet'#21'AnchorSideTop.Control'#7#19'InheritedShortLabel'#18'AnchorSideTop.'
|
||||
+'Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#17'InheritedTabSheet'#20
|
||||
+'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2#27#3'Top'#2#18
|
||||
+#5'Width'#3#197#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpa'
|
||||
+#5'Width'#3#195#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpa'
|
||||
+'cing.Top'#2#2#8'ReadOnly'#9#8'TabOrder'#2#0#4'Text'#6#18'InheritedShortEdit'
|
||||
+#0#0#7'TButton'#21'MoveToInheritedButton'#21'AnchorSideTop.Control'#7#18'Inh'
|
||||
+'eritedShortEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'
|
||||
@ -66,28 +66,28 @@ LazarusResources.Add('TFPDocEditor','FORMDATA',[
|
||||
+'t'#2#23#3'Top'#2'3'#5'Width'#3#151#0#8'AutoSize'#9#18'BorderSpacing.Left'#2
|
||||
+#10#7'Caption'#6#24'AddLinkToInheritedButton'#7'OnClick'#7#29'AddLinkToInher'
|
||||
,'itedButtonClick'#8'TabOrder'#2#3#0#0#0#9'TTabSheet'#13'DescrTabSheet'#7'Cap'
|
||||
+'tion'#6#13'DescrTabSheet'#12'ClientHeight'#2'_'#11'ClientWidth'#3#197#2#0#5
|
||||
+'TMemo'#9'DescrMemo'#4'Left'#2#0#6'Height'#2'['#3'Top'#2#0#5'Width'#3#195#2#5
|
||||
+'tion'#6#13'DescrTabSheet'#12'ClientHeight'#2'['#11'ClientWidth'#3#195#2#0#5
|
||||
+'TMemo'#9'DescrMemo'#4'Left'#2#0#6'Height'#2'W'#3'Top'#2#0#5'Width'#3#193#2#5
|
||||
+'Align'#7#8'alClient'#19'BorderSpacing.Right'#2#2#20'BorderSpacing.Bottom'#2
|
||||
+#4#13'Lines.Strings'#1#6#9'DescrMemo'#0#8'OnChange'#7#15'DescrMemoChange'#9
|
||||
+'PopupMenu'#7#10'PopupMenu1'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#14'ErrorsTab'
|
||||
+'Sheet'#7'Caption'#6#14'ErrorsTabSheet'#12'ClientHeight'#2'_'#11'ClientWidth'
|
||||
+#3#197#2#0#5'TMemo'#10'ErrorsMemo'#4'Left'#2#0#6'Height'#2'['#3'Top'#2#0#5'W'
|
||||
+'idth'#3#195#2#5'Align'#7#8'alClient'#19'BorderSpacing.Right'#2#2#20'BorderS'
|
||||
+'Sheet'#7'Caption'#6#14'ErrorsTabSheet'#12'ClientHeight'#2'['#11'ClientWidth'
|
||||
+#3#195#2#0#5'TMemo'#10'ErrorsMemo'#4'Left'#2#0#6'Height'#2'W'#3'Top'#2#0#5'W'
|
||||
+'idth'#3#193#2#5'Align'#7#8'alClient'#19'BorderSpacing.Right'#2#2#20'BorderS'
|
||||
+'pacing.Bottom'#2#4#13'Lines.Strings'#1#6#10'ErrorsMemo'#0#8'OnChange'#7#16
|
||||
+'ErrorsMemoChange'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#15'SeeAlsoTabSheet'#7
|
||||
+'Caption'#6#15'SeeAlsoTabSheet'#12'ClientHeight'#2'_'#11'ClientWidth'#3#197#2
|
||||
+#0#5'TMemo'#11'SeeAlsoMemo'#4'Left'#2#0#6'Height'#2'_'#3'Top'#2#0#5'Width'#3
|
||||
+#197#2#5'Align'#7#8'alClient'#13'Lines.Strings'#1#6#11'SeeAlsoMemo'#0#13'OnE'
|
||||
+'Caption'#6#15'SeeAlsoTabSheet'#12'ClientHeight'#2'['#11'ClientWidth'#3#195#2
|
||||
+#0#5'TMemo'#11'SeeAlsoMemo'#4'Left'#2#0#6'Height'#2'['#3'Top'#2#0#5'Width'#3
|
||||
+#195#2#5'Align'#7#8'alClient'#13'Lines.Strings'#1#6#11'SeeAlsoMemo'#0#13'OnE'
|
||||
+'ditingDone'#7#22'SeeAlsoMemoEditingDone'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'
|
||||
+#15'ExampleTabSheet'#7'Caption'#6#15'ExampleTabSheet'#12'ClientHeight'#2'_'
|
||||
+#11'ClientWidth'#3#197#2#0#5'TEdit'#11'ExampleEdit'#4'Left'#2#0#6'Height'#2
|
||||
+#27#3'Top'#2#0#5'Width'#3#195#2#5'Align'#7#5'alTop'#19'BorderSpacing.Right'#2
|
||||
+#15'ExampleTabSheet'#7'Caption'#6#15'ExampleTabSheet'#12'ClientHeight'#2'['
|
||||
+#11'ClientWidth'#3#195#2#0#5'TEdit'#11'ExampleEdit'#4'Left'#2#0#6'Height'#2
|
||||
+#27#3'Top'#2#0#5'Width'#3#193#2#5'Align'#7#5'alTop'#19'BorderSpacing.Right'#2
|
||||
+#2#8'OnChange'#7#17'ExampleEditChange'#8'TabOrder'#2#0#4'Text'#6#11'ExampleE'
|
||||
+'dit'#0#0#7'TButton'#19'BrowseExampleButton'#21'AnchorSideTop.Control'#7#11
|
||||
+'ExampleEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Contr'
|
||||
+'ol'#7#15'ExampleTabSheet'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3
|
||||
+':'#2#6'Height'#2#23#3'Top'#2'!'#5'Width'#3#133#0#7'Anchors'#11#5'akTop'#7'a'
|
||||
+'8'#2#6'Height'#2#23#3'Top'#2'!'#5'Width'#3#133#0#7'Anchors'#11#5'akTop'#7'a'
|
||||
+'kRight'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#19'Browse'
|
||||
+'ExampleButton'#7'OnClick'#7#24'BrowseExampleButtonClick'#8'TabOrder'#2#1#0#0
|
||||
+#0#0#6'TPanel'#12'LeftBtnPanel'#4'Left'#2#0#6'Height'#2'~'#3'Top'#2#0#5'Widt'
|
||||
@ -124,5 +124,7 @@ LazarusResources.Add('TFPDocEditor','FORMDATA',[
|
||||
+#2#0#4'left'#3#240#0#3'top'#2#16#0#0#10'TPopupMenu'#10'PopupMenu1'#7'OnPopup'
|
||||
+#7#15'PopupMenu1Popup'#4'left'#3#24#1#3'top'#2#16#0#9'TMenuItem'#24'CopyShor'
|
||||
+'tToDescrMenuItem'#7'Caption'#6#24'CopyShortToDescrMenuItem'#7'OnClick'#7#29
|
||||
+'CopyShortToDescrMenuItemClick'#0#0#0#0
|
||||
+'CopyShortToDescrMenuItemClick'#0#0#9'TMenuItem'#19'InsertPrintShortTag'#7'C'
|
||||
+'aption'#6#19'InsertPrintShortTag'#7'OnClick'#7#24'InsertPrintShortTagClick'
|
||||
+#0#0#0#0
|
||||
]);
|
||||
|
@ -97,6 +97,7 @@ type
|
||||
ShortLabel: TLabel;
|
||||
ShortTabSheet: TTabSheet;
|
||||
UnderlineFormatButton: TSpeedButton;
|
||||
InsertPrintShortTag: TMenuItem;
|
||||
procedure AddLinkToInheritedButtonClick(Sender: TObject);
|
||||
procedure ApplicationIdle(Sender: TObject; var Done: Boolean);
|
||||
procedure BrowseExampleButtonClick(Sender: TObject);
|
||||
@ -118,6 +119,7 @@ type
|
||||
procedure SaveButtonClick(Sender: TObject);
|
||||
procedure SeeAlsoMemoEditingDone(Sender: TObject);
|
||||
procedure ShortEditEditingDone(Sender: TObject);
|
||||
procedure InsertPrintShortTagClick(Sender: TObject);
|
||||
private
|
||||
FCaretXY: TPoint;
|
||||
FModified: Boolean;
|
||||
@ -235,6 +237,7 @@ begin
|
||||
AddLinkToInheritedButton.Caption:=lisLDAddLinkToInherited;
|
||||
|
||||
CopyShortToDescrMenuItem.Caption:=lisAppendShortDescriptionToLongDescription;
|
||||
InsertPrintShortTag.Caption:=lisInsertPrintShortTag;
|
||||
|
||||
Reset;
|
||||
|
||||
@ -431,6 +434,7 @@ begin
|
||||
CopyShortToDescrMenuItem.Visible:=
|
||||
(PageControl.ActivePage = DescrTabSheet)
|
||||
or (PageControl.ActivePage = ShortTabSheet);
|
||||
InsertPrintShortTag.Visible := CopyShortToDescrMenuItem.Visible;
|
||||
end;
|
||||
|
||||
procedure TFPDocEditor.SaveButtonClick(Sender: TObject);
|
||||
@ -450,6 +454,14 @@ begin
|
||||
Modified:=true;
|
||||
end;
|
||||
|
||||
procedure TFPDocEditor.InsertPrintShortTagClick(Sender: TObject);
|
||||
const
|
||||
cPrintShort = '<printshort id="%s"/>';
|
||||
begin
|
||||
DescrMemo.SelText:=Format(cPrintShort, [fChain[0].ElementName]);
|
||||
Modified:=true;
|
||||
end;
|
||||
|
||||
function TFPDocEditor.GetContextTitle(Element: TCodeHelpElement): string;
|
||||
// get codetools path. for example: TButton.Align
|
||||
begin
|
||||
|
@ -4445,6 +4445,7 @@ resourcestring
|
||||
+'exist. Values were not checked.';
|
||||
lisAppendShortDescriptionToLongDescription = 'Append short description to '
|
||||
+'long description';
|
||||
lisInsertPrintShortTag = 'Insert PrintShort tag';
|
||||
lisAutomaticallyInvokeAfterPoint = 'Automatically invoke after point';
|
||||
|
||||
implementation
|
||||
|
Loading…
Reference in New Issue
Block a user