mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-18 09:19:45 +02:00
SynEdit: added experimental WordWrap / does not work with folding
git-svn-id: trunk@63293 -
This commit is contained in:
parent
ad49c7a7db
commit
47a4815c09
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -4963,6 +4963,8 @@ components/synedit/synedittextsystemcharwidth.pas svneol=native#text/pascal
|
||||
components/synedit/synedittexttabexpander.pas svneol=native#text/plain
|
||||
components/synedit/synedittexttrimmer.pas svneol=native#text/plain
|
||||
components/synedit/synedittypes.pp svneol=native#text/pascal
|
||||
components/synedit/syneditviewedlinemap.pp svneol=native#text/pascal
|
||||
components/synedit/syneditwrappedview.pp svneol=native#text/pascal
|
||||
components/synedit/synexporthtml.pas svneol=native#text/pascal
|
||||
components/synedit/syngutter.pp svneol=native#text/plain
|
||||
components/synedit/syngutterbase.pp svneol=native#text/plain
|
||||
@ -5030,6 +5032,7 @@ components/synedit/test/testsynselection.pas svneol=native#text/pascal
|
||||
components/synedit/test/testsynsharededits.pas svneol=native#text/pascal
|
||||
components/synedit/test/testsyntextarea.pas svneol=native#text/pascal
|
||||
components/synedit/test/testtrimspace.pas svneol=native#text/pascal
|
||||
components/synedit/test/testwordwrap.pas svneol=native#text/pascal
|
||||
components/synunihighlighter/CHANGES.txt svneol=native#text/plain
|
||||
components/synunihighlighter/CREDITS.txt svneol=native#text/plain
|
||||
components/synunihighlighter/README.txt svneol=native#text/plain
|
||||
|
@ -31,7 +31,8 @@ uses
|
||||
LazSynTextArea, SynTextDrawer, SynEditMarkupGutterMark, SynHighlighterBat,
|
||||
SynHighlighterIni, SynEditMarkupSpecialChar, SynEditTextDoubleWidthChars,
|
||||
SynEditTextSystemCharWidth, SynEditMarkupIfDef, SynPluginMultiCaret,
|
||||
synhighlighterpike, SynEditMarkupFoldColoring, LazarusPackageIntf;
|
||||
synhighlighterpike, SynEditMarkupFoldColoring, SynEditViewedLineMap,
|
||||
SynEditWrappedView, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<Package Version="5">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="SynEdit"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
@ -27,7 +27,7 @@ Originally based on the Synedit project at http://sourceforge.net/projects/syned
|
||||
"/>
|
||||
<License Value="MPL-1.1 or GPL-2 at the users choice
|
||||
|
||||
SynEdit and all it's units are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
||||
SynEdit and all it's units are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
||||
|
||||
@ -35,7 +35,7 @@ Alternatively, the contents of these files may be used under the terms of the GN
|
||||
If you wish to allow use of your version of these files only under the terms of the GPL and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL.
|
||||
"/>
|
||||
<Version Major="1"/>
|
||||
<Files Count="83">
|
||||
<Files Count="85">
|
||||
<Item1>
|
||||
<Filename Value="synbeautifier.pas"/>
|
||||
<UnitName Value="SynBeautifier"/>
|
||||
@ -377,6 +377,14 @@ If you wish to allow use of your version of these files only under the terms of
|
||||
<Filename Value="syneditmarkupfoldcoloring.pas"/>
|
||||
<UnitName Value="SynEditMarkupFoldColoring"/>
|
||||
</Item83>
|
||||
<Item84>
|
||||
<Filename Value="syneditviewedlinemap.pp"/>
|
||||
<UnitName Value="syneditviewedlinemap"/>
|
||||
</Item84>
|
||||
<Item85>
|
||||
<Filename Value="syneditwrappedview.pp"/>
|
||||
<UnitName Value="SynEditWrappedView"/>
|
||||
</Item85>
|
||||
</Files>
|
||||
<LazDoc Paths="docs\xml"/>
|
||||
<i18n>
|
||||
|
1551
components/synedit/syneditviewedlinemap.pp
Normal file
1551
components/synedit/syneditviewedlinemap.pp
Normal file
File diff suppressed because it is too large
Load Diff
1741
components/synedit/syneditwrappedview.pp
Normal file
1741
components/synedit/syneditwrappedview.pp
Normal file
File diff suppressed because it is too large
Load Diff
@ -22,30 +22,30 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default">
|
||||
<Modes>
|
||||
<Mode Name="default">
|
||||
<local>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</Mode0>
|
||||
</Mode>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="5">
|
||||
<Item1>
|
||||
<RequiredPackages>
|
||||
<Item>
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="CodeTools"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="FPCUnitTestRunner"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item5>
|
||||
</Item>
|
||||
</RequiredPackages>
|
||||
<Units>
|
||||
<Unit>
|
||||
@ -162,6 +162,11 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="TestSynMultiCaret"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="testwordwrap.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="TestWordWrap"/>
|
||||
</Unit>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
@ -195,16 +200,16 @@
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Exceptions>
|
||||
<Item>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Item>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
||||
|
@ -9,7 +9,7 @@ uses
|
||||
TestHighlightPas, TestHighlightXml, TestHighlightMulti, TestMarkupwordGroup,
|
||||
TestMarkupHighAll, TestFoldedView, TestSynSharedEdits, TestHighlighterLfm,
|
||||
TestNestedFoldsList, TestMarkupIfDef, testPaintColorMerging,
|
||||
TestMarkupFoldColoring;
|
||||
TestMarkupFoldColoring, TestWordWrap;
|
||||
|
||||
{$IFDEF WINDOWS}{ $R SynTest.rc}{$ENDIF}
|
||||
|
||||
|
@ -81,6 +81,7 @@ type
|
||||
protected
|
||||
procedure ReCreateEdit;
|
||||
procedure SetSynEditHeight(Lines: Integer; PartLinePixel: Integer = 3);
|
||||
procedure SetSynEditWidth(Chars: Integer; PartCharPixel: Integer = 2);
|
||||
procedure SetLines(Lines: Array of String);
|
||||
(* Setting selection, with one X/Y pair having negative values, will set caret to other X/Y pair and clear selection *)
|
||||
// Locical Caret
|
||||
@ -619,6 +620,13 @@ begin
|
||||
(FSynEdit.Height - FSynEdit.ClientHeight);
|
||||
end;
|
||||
|
||||
procedure TTestBase.SetSynEditWidth(Chars: Integer; PartCharPixel: Integer);
|
||||
begin
|
||||
FSynEdit.Width := FSynEdit.CharWidth * Chars + PartCharPixel +
|
||||
(FSynEdit.Width - (FSynEdit.TextArea.Right - FSynEdit.TextArea.Left));
|
||||
AssertEquals('SetSynEditWidth', Chars, SynEdit.CharsInWindow);
|
||||
end;
|
||||
|
||||
procedure TTestBase.SetLines(Lines: array of String);
|
||||
begin
|
||||
SynEdit.Text := LinesToText(Lines);
|
||||
|
1759
components/synedit/test/testwordwrap.pas
Normal file
1759
components/synedit/test/testwordwrap.pas
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user