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