mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 02:49:19 +02:00
IDE: fpdoc editor: sync DescrShortEdit
git-svn-id: trunk@25963 -
This commit is contained in:
parent
d57d790cfc
commit
d7543281a3
@ -1,7 +1,7 @@
|
|||||||
object FPDocEditor: TFPDocEditor
|
object FPDocEditor: TFPDocEditor
|
||||||
Left = 284
|
Left = 327
|
||||||
Height = 156
|
Height = 156
|
||||||
Top = 355
|
Top = 397
|
||||||
Width = 753
|
Width = 753
|
||||||
ActiveControl = PageControl
|
ActiveControl = PageControl
|
||||||
Caption = 'FPDoc editor'
|
Caption = 'FPDoc editor'
|
||||||
@ -27,15 +27,15 @@ object FPDocEditor: TFPDocEditor
|
|||||||
OnPageChanged = PageControlChange
|
OnPageChanged = PageControlChange
|
||||||
object ShortTabSheet: TTabSheet
|
object ShortTabSheet: TTabSheet
|
||||||
Caption = 'ShortTabSheet'
|
Caption = 'ShortTabSheet'
|
||||||
ClientHeight = 129
|
ClientHeight = 123
|
||||||
ClientWidth = 688
|
ClientWidth = 686
|
||||||
object LinkLabel: TLabel
|
object LinkLabel: TLabel
|
||||||
AnchorSideTop.Control = LinkEdit
|
AnchorSideTop.Control = LinkEdit
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 18
|
Height = 18
|
||||||
Top = 33
|
Top = 33
|
||||||
Width = 60
|
Width = 63
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'LinkLabel'
|
Caption = 'LinkLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -60,7 +60,7 @@ object FPDocEditor: TFPDocEditor
|
|||||||
Left = 82
|
Left = 82
|
||||||
Height = 27
|
Height = 27
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 604
|
Width = 602
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSelect = False
|
AutoSelect = False
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
@ -74,9 +74,9 @@ object FPDocEditor: TFPDocEditor
|
|||||||
AnchorSideTop.Control = LinkEdit
|
AnchorSideTop.Control = LinkEdit
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 29
|
Height = 27
|
||||||
Top = 62
|
Top = 62
|
||||||
Width = 98
|
Width = 104
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'CreateButton'
|
Caption = 'CreateButton'
|
||||||
@ -90,10 +90,10 @@ object FPDocEditor: TFPDocEditor
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = ShortTabSheet
|
AnchorSideRight.Control = ShortTabSheet
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 72
|
Left = 75
|
||||||
Height = 27
|
Height = 27
|
||||||
Top = 29
|
Top = 29
|
||||||
Width = 614
|
Width = 609
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSelect = False
|
AutoSelect = False
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
@ -209,7 +209,7 @@ object FPDocEditor: TFPDocEditor
|
|||||||
ClientHeight = 29
|
ClientHeight = 29
|
||||||
ClientWidth = 686
|
ClientWidth = 686
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object ShortEdit2: TEdit
|
object DescrShortEdit: TEdit
|
||||||
AnchorSideLeft.Control = ShortPanel
|
AnchorSideLeft.Control = ShortPanel
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 61
|
Left = 61
|
||||||
@ -225,7 +225,7 @@ object FPDocEditor: TFPDocEditor
|
|||||||
OnEditingDone = ShortEditEditingDone
|
OnEditingDone = ShortEditEditingDone
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = 'ShortEdit'
|
Text = 'DescrShortEdit'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -70,7 +70,7 @@ type
|
|||||||
BoldFormatButton: TSpeedButton;
|
BoldFormatButton: TSpeedButton;
|
||||||
BrowseExampleButton: TButton;
|
BrowseExampleButton: TButton;
|
||||||
ShortPanel: TPanel;
|
ShortPanel: TPanel;
|
||||||
ShortEdit2: TEdit;
|
DescrShortEdit: TEdit;
|
||||||
TopicShort: TEdit;
|
TopicShort: TEdit;
|
||||||
TopicDescr: TMemo;
|
TopicDescr: TMemo;
|
||||||
Panel3: TPanel;
|
Panel3: TPanel;
|
||||||
@ -327,9 +327,10 @@ procedure TFPDocEditor.FormatButtonClick(Sender: TObject);
|
|||||||
|
|
||||||
procedure InsertTag(const StartTag, EndTag: String);
|
procedure InsertTag(const StartTag, EndTag: String);
|
||||||
begin
|
begin
|
||||||
if PageControl.ActivePage = ShortTabSheet then
|
if PageControl.ActivePage = ShortTabSheet then begin
|
||||||
ShortEdit.SelText := StartTag + ShortEdit.SelText + EndTag
|
ShortEdit.SelText := StartTag + ShortEdit.SelText + EndTag;
|
||||||
else if PageControl.ActivePage = DescrTabSheet then
|
DescrShortEdit.Text:=ShortEdit.Text;
|
||||||
|
end else if PageControl.ActivePage = DescrTabSheet then
|
||||||
DescrMemo.SelText := StartTag + DescrMemo.SelText + EndTag
|
DescrMemo.SelText := StartTag + DescrMemo.SelText + EndTag
|
||||||
else if PageControl.ActivePage = ErrorsTabSheet then
|
else if PageControl.ActivePage = ErrorsTabSheet then
|
||||||
ErrorsMemo.SelText := StartTag + ErrorsMemo.SelText + EndTag
|
ErrorsMemo.SelText := StartTag + ErrorsMemo.SelText + EndTag
|
||||||
@ -391,8 +392,10 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
LinkSrc:=LinkSrc+'>'+LinkTitle+'</link>';
|
LinkSrc:=LinkSrc+'>'+LinkTitle+'</link>';
|
||||||
end;
|
end;
|
||||||
if PageControl.ActivePage = ShortTabSheet then
|
if PageControl.ActivePage = ShortTabSheet then begin
|
||||||
ShortEdit.SelText := LinkSrc;
|
ShortEdit.SelText := LinkSrc;
|
||||||
|
DescrShortEdit.Text := ShortEdit.Text;
|
||||||
|
end;
|
||||||
if PageControl.ActivePage = DescrTabSheet then
|
if PageControl.ActivePage = DescrTabSheet then
|
||||||
DescrMemo.SelText := LinkSrc;
|
DescrMemo.SelText := LinkSrc;
|
||||||
if PageControl.ActivePage = SeeAlsoTabSheet then
|
if PageControl.ActivePage = SeeAlsoTabSheet then
|
||||||
@ -548,17 +551,41 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPDocEditor.ShortEditChange(Sender: TObject);
|
procedure TFPDocEditor.ShortEditChange(Sender: TObject);
|
||||||
|
// called by ShortEdit and DescrShortEdit
|
||||||
|
var
|
||||||
|
NewShort: String;
|
||||||
begin
|
begin
|
||||||
if fpdefReading in FFlags then exit;
|
if fpdefReading in FFlags then exit;
|
||||||
SaveButton.Enabled:=ShortEdit.Text<>FOldVisualValues[fpdiShort];
|
//debugln(['TFPDocEditor.ShortEditChange ',DbgSName(Sender)]);
|
||||||
ShortEdit2.Text := ShortEdit.Text;
|
if Sender=DescrShortEdit then
|
||||||
|
NewShort:=DescrShortEdit.Text
|
||||||
|
else
|
||||||
|
NewShort:=ShortEdit.Text;
|
||||||
|
SaveButton.Enabled:=NewShort<>FOldVisualValues[fpdiShort];
|
||||||
|
// copy to the other edit
|
||||||
|
if Sender=DescrShortEdit then
|
||||||
|
ShortEdit.Text:=NewShort
|
||||||
|
else
|
||||||
|
DescrShortEdit.Text:=NewShort;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPDocEditor.ShortEditEditingDone(Sender: TObject);
|
procedure TFPDocEditor.ShortEditEditingDone(Sender: TObject);
|
||||||
|
var
|
||||||
|
NewShort: String;
|
||||||
begin
|
begin
|
||||||
if fpdefReading in FFlags then exit;
|
if fpdefReading in FFlags then exit;
|
||||||
if ShortEdit.Text<>FOldVisualValues[fpdiShort] then
|
//debugln(['TFPDocEditor.ShortEditEditingDone ',DbgSName(Sender)]);
|
||||||
|
if Sender=DescrShortEdit then
|
||||||
|
NewShort:=DescrShortEdit.Text
|
||||||
|
else
|
||||||
|
NewShort:=ShortEdit.Text;
|
||||||
|
if NewShort<>FOldVisualValues[fpdiShort] then
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
|
// copy to the other edit
|
||||||
|
if Sender=DescrShortEdit then
|
||||||
|
ShortEdit.Text:=NewShort
|
||||||
|
else
|
||||||
|
DescrShortEdit.Text:=NewShort;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPDocEditor.TopicControlEnter(Sender: TObject);
|
procedure TFPDocEditor.TopicControlEnter(Sender: TObject);
|
||||||
@ -835,6 +862,8 @@ begin
|
|||||||
FOldVisualValues[fpdiExample]:='';
|
FOldVisualValues[fpdiExample]:='';
|
||||||
end;
|
end;
|
||||||
ShortEdit.Text := FOldVisualValues[fpdiShort];
|
ShortEdit.Text := FOldVisualValues[fpdiShort];
|
||||||
|
DescrShortEdit.Text := ShortEdit.Text;
|
||||||
|
//debugln(['TFPDocEditor.LoadGUIValues "',ShortEdit.Text,'" "',FOldVisualValues[fpdiShort],'"']);
|
||||||
LinkEdit.Text := FOldVisualValues[fpdiElementLink];
|
LinkEdit.Text := FOldVisualValues[fpdiElementLink];
|
||||||
DescrMemo.Lines.Text := FOldVisualValues[fpdiDescription];
|
DescrMemo.Lines.Text := FOldVisualValues[fpdiDescription];
|
||||||
SeeAlsoMemo.Text := FOldVisualValues[fpdiSeeAlso];
|
SeeAlsoMemo.Text := FOldVisualValues[fpdiSeeAlso];
|
||||||
@ -842,6 +871,7 @@ begin
|
|||||||
ExampleEdit.Text := FOldVisualValues[fpdiExample];
|
ExampleEdit.Text := FOldVisualValues[fpdiExample];
|
||||||
|
|
||||||
ShortEdit.Enabled := EnabledState;
|
ShortEdit.Enabled := EnabledState;
|
||||||
|
DescrShortEdit.Enabled := ShortEdit.Enabled;
|
||||||
LinkEdit.Enabled := EnabledState;
|
LinkEdit.Enabled := EnabledState;
|
||||||
DescrMemo.Enabled := EnabledState;
|
DescrMemo.Enabled := EnabledState;
|
||||||
SeeAlsoMemo.Enabled := EnabledState;
|
SeeAlsoMemo.Enabled := EnabledState;
|
||||||
@ -1058,6 +1088,7 @@ begin
|
|||||||
try
|
try
|
||||||
// clear all element editors/viewers
|
// clear all element editors/viewers
|
||||||
ShortEdit.Clear;
|
ShortEdit.Clear;
|
||||||
|
DescrShortEdit.Clear;
|
||||||
LinkEdit.Clear;
|
LinkEdit.Clear;
|
||||||
DescrMemo.Clear;
|
DescrMemo.Clear;
|
||||||
SeeAlsoMemo.Clear;
|
SeeAlsoMemo.Clear;
|
||||||
@ -1124,6 +1155,7 @@ procedure TFPDocEditor.ClearEntry(DoSave: Boolean);
|
|||||||
begin
|
begin
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
ShortEdit.Text:='';
|
ShortEdit.Text:='';
|
||||||
|
DescrShortEdit.Text:=ShortEdit.Text;
|
||||||
DescrMemo.Text:='';
|
DescrMemo.Text:='';
|
||||||
SeeAlsoMemo.Text:='';
|
SeeAlsoMemo.Text:='';
|
||||||
ErrorsMemo.Text:='';
|
ErrorsMemo.Text:='';
|
||||||
|
Loading…
Reference in New Issue
Block a user