You've already forked lazarus-ccr
added richmemo sample
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@825 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
392
components/richmemo/samples/testsimple/project1.lpi
Normal file
392
components/richmemo/samples/testsimple/project1.lpi
Normal file
@ -0,0 +1,392 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<Version Value="7"/>
|
||||||
|
<General>
|
||||||
|
<MainUnit Value="0"/>
|
||||||
|
<TargetFileExt Value=""/>
|
||||||
|
<UseXPManifest Value="True"/>
|
||||||
|
<ActiveEditorIndexAtStart Value="0"/>
|
||||||
|
</General>
|
||||||
|
<VersionInfo>
|
||||||
|
<ProjectVersion Value=""/>
|
||||||
|
</VersionInfo>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
<IgnoreBinaries Value="False"/>
|
||||||
|
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||||
|
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<local>
|
||||||
|
<FormatVersion Value="1"/>
|
||||||
|
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||||
|
</local>
|
||||||
|
</RunParams>
|
||||||
|
<RequiredPackages Count="2">
|
||||||
|
<Item1>
|
||||||
|
<PackageName Value="richmemopackage"/>
|
||||||
|
<MinVersion Minor="8" Valid="True"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<PackageName Value="LCL"/>
|
||||||
|
</Item2>
|
||||||
|
</RequiredPackages>
|
||||||
|
<Units Count="26">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="project1"/>
|
||||||
|
<UsageCount Value="30"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="Unit1.pas"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="Unit1"/>
|
||||||
|
<CursorPos X="24" Y="64"/>
|
||||||
|
<TopLine Value="60"/>
|
||||||
|
<EditorIndex Value="0"/>
|
||||||
|
<UsageCount Value="30"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit1>
|
||||||
|
<Unit2>
|
||||||
|
<Filename Value="../RichMemo/carbon/carbonrichmemo.pas"/>
|
||||||
|
<UnitName Value="CarbonRichMemo"/>
|
||||||
|
<CursorPos X="31" Y="137"/>
|
||||||
|
<TopLine Value="114"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<UsageCount Value="15"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit2>
|
||||||
|
<Unit3>
|
||||||
|
<Filename Value="../RichMemo/win32/win32richmemo.pas"/>
|
||||||
|
<UnitName Value="Win32RichMemo"/>
|
||||||
|
<CursorPos X="1" Y="32"/>
|
||||||
|
<TopLine Value="15"/>
|
||||||
|
<UsageCount Value="9"/>
|
||||||
|
</Unit3>
|
||||||
|
<Unit4>
|
||||||
|
<Filename Value="../RichMemo/richmemofactory.pas"/>
|
||||||
|
<UnitName Value="RichMemoFactory"/>
|
||||||
|
<CursorPos X="20" Y="22"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<UsageCount Value="9"/>
|
||||||
|
</Unit4>
|
||||||
|
<Unit5>
|
||||||
|
<Filename Value="../RichMemo/wsrichmemo.pas"/>
|
||||||
|
<UnitName Value="WSRichMemo"/>
|
||||||
|
<CursorPos X="32" Y="18"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<UsageCount Value="9"/>
|
||||||
|
</Unit5>
|
||||||
|
<Unit6>
|
||||||
|
<Filename Value="../lazarus/lcl/widgetset/wsstdctrls.pp"/>
|
||||||
|
<UnitName Value="WSStdCtrls"/>
|
||||||
|
<CursorPos X="32" Y="140"/>
|
||||||
|
<TopLine Value="126"/>
|
||||||
|
<UsageCount Value="9"/>
|
||||||
|
</Unit6>
|
||||||
|
<Unit7>
|
||||||
|
<Filename Value="../lazarus/lcl/widgetset/wscontrols.pp"/>
|
||||||
|
<UnitName Value="WSControls"/>
|
||||||
|
<CursorPos X="33" Y="115"/>
|
||||||
|
<TopLine Value="100"/>
|
||||||
|
<UsageCount Value="9"/>
|
||||||
|
</Unit7>
|
||||||
|
<Unit8>
|
||||||
|
<Filename Value="../lazarus/lcl/lcltype.pp"/>
|
||||||
|
<UnitName Value="LCLType"/>
|
||||||
|
<CursorPos X="3" Y="2330"/>
|
||||||
|
<TopLine Value="2316"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit8>
|
||||||
|
<Unit9>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonedits.pp"/>
|
||||||
|
<UnitName Value="CarbonEdits"/>
|
||||||
|
<CursorPos X="3" Y="140"/>
|
||||||
|
<TopLine Value="124"/>
|
||||||
|
<EditorIndex Value="6"/>
|
||||||
|
<UsageCount Value="15"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit9>
|
||||||
|
<Unit10>
|
||||||
|
<Filename Value="../lazarus/lcl/widgetset/wscomctrls.pp"/>
|
||||||
|
<UnitName Value="WSComCtrls"/>
|
||||||
|
<CursorPos X="1" Y="144"/>
|
||||||
|
<TopLine Value="144"/>
|
||||||
|
<UsageCount Value="9"/>
|
||||||
|
</Unit10>
|
||||||
|
<Unit11>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonwsstdctrls.pp"/>
|
||||||
|
<UnitName Value="CarbonWSStdCtrls"/>
|
||||||
|
<CursorPos X="20" Y="39"/>
|
||||||
|
<TopLine Value="30"/>
|
||||||
|
<UsageCount Value="13"/>
|
||||||
|
</Unit11>
|
||||||
|
<Unit12>
|
||||||
|
<Filename Value="../fpc/packages/univint/src/MacOSAll.pas"/>
|
||||||
|
<UnitName Value="MacOSAll"/>
|
||||||
|
<CursorPos X="3" Y="35065"/>
|
||||||
|
<TopLine Value="35051"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<UsageCount Value="14"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit12>
|
||||||
|
<Unit13>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbongdiobjects.pp"/>
|
||||||
|
<UnitName Value="CarbonGDIObjects"/>
|
||||||
|
<CursorPos X="3" Y="1109"/>
|
||||||
|
<TopLine Value="1100"/>
|
||||||
|
<UsageCount Value="14"/>
|
||||||
|
<Bookmarks Count="1">
|
||||||
|
<Item0 X="25" Y="150" ID="1"/>
|
||||||
|
</Bookmarks>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit13>
|
||||||
|
<Unit14>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<UnitName Value="CarbonProc"/>
|
||||||
|
<CursorPos X="13" Y="554"/>
|
||||||
|
<TopLine Value="538"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<UsageCount Value="13"/>
|
||||||
|
<Bookmarks Count="2">
|
||||||
|
<Item0 X="25" Y="151" ID="1"/>
|
||||||
|
<Item1 X="3" Y="536" ID="2"/>
|
||||||
|
</Bookmarks>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit14>
|
||||||
|
<Unit15>
|
||||||
|
<Filename Value="../lazarus/lcl/controls.pp"/>
|
||||||
|
<UnitName Value="Controls"/>
|
||||||
|
<CursorPos X="3" Y="2457"/>
|
||||||
|
<TopLine Value="2448"/>
|
||||||
|
<UsageCount Value="12"/>
|
||||||
|
</Unit15>
|
||||||
|
<Unit16>
|
||||||
|
<Filename Value="../fpc/rtl/objpas/sysutils/sysutilh.inc"/>
|
||||||
|
<CursorPos X="17" Y="34"/>
|
||||||
|
<TopLine Value="2"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit16>
|
||||||
|
<Unit17>
|
||||||
|
<Filename Value="../fpc/rtl/bsd/system.pp"/>
|
||||||
|
<UnitName Value="System"/>
|
||||||
|
<CursorPos X="64" Y="52"/>
|
||||||
|
<TopLine Value="29"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit17>
|
||||||
|
<Unit18>
|
||||||
|
<Filename Value="../fpc/rtl/amiga/sysosh.inc"/>
|
||||||
|
<CursorPos X="22" Y="18"/>
|
||||||
|
<TopLine Value="7"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit18>
|
||||||
|
<Unit19>
|
||||||
|
<Filename Value="../RichMemo/richmemo.pas"/>
|
||||||
|
<UnitName Value="RichMemo"/>
|
||||||
|
<CursorPos X="15" Y="39"/>
|
||||||
|
<TopLine Value="23"/>
|
||||||
|
<EditorIndex Value="5"/>
|
||||||
|
<UsageCount Value="14"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit19>
|
||||||
|
<Unit20>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonprivate.pp"/>
|
||||||
|
<UnitName Value="CarbonPrivate"/>
|
||||||
|
<CursorPos X="17" Y="649"/>
|
||||||
|
<TopLine Value="640"/>
|
||||||
|
<UsageCount Value="13"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit20>
|
||||||
|
<Unit21>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonprivatecontrol.inc"/>
|
||||||
|
<CursorPos X="42" Y="499"/>
|
||||||
|
<TopLine Value="495"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
</Unit21>
|
||||||
|
<Unit22>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbondef.pp"/>
|
||||||
|
<UnitName Value="CarbonDef"/>
|
||||||
|
<CursorPos X="17" Y="649"/>
|
||||||
|
<TopLine Value="640"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
</Unit22>
|
||||||
|
<Unit23>
|
||||||
|
<Filename Value="../lazarus/lcl/graphics.pp"/>
|
||||||
|
<UnitName Value="Graphics"/>
|
||||||
|
<CursorPos X="3" Y="59"/>
|
||||||
|
<TopLine Value="45"/>
|
||||||
|
<EditorIndex Value="4"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit23>
|
||||||
|
<Unit24>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbondbgconsts.pp"/>
|
||||||
|
<UnitName Value="CarbonDbgConsts"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit24>
|
||||||
|
<Unit25>
|
||||||
|
<Filename Value="Unit1.lrs"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit25>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
|
<Position1>
|
||||||
|
<Filename Value="../fpc/packages/univint/src/MacOSAll.pas"/>
|
||||||
|
<Caret Line="145626" Column="10" TopLine="145612"/>
|
||||||
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="../fpc/packages/univint/src/MacOSAll.pas"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="533" Column="10" TopLine="527"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="75" Column="28" TopLine="61"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="529" Column="30" TopLine="515"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="533" Column="28" TopLine="515"/>
|
||||||
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="../RichMemo/carbon/carbonrichmemo.pas"/>
|
||||||
|
<Caret Line="85" Column="1" TopLine="67"/>
|
||||||
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="../RichMemo/carbon/carbonrichmemo.pas"/>
|
||||||
|
<Caret Line="210" Column="57" TopLine="196"/>
|
||||||
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="549" Column="28" TopLine="544"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position12>
|
||||||
|
<Position13>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="90" Column="10" TopLine="76"/>
|
||||||
|
</Position13>
|
||||||
|
<Position14>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position14>
|
||||||
|
<Position15>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="53" Column="25" TopLine="39"/>
|
||||||
|
</Position15>
|
||||||
|
<Position16>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="212" Column="10" TopLine="198"/>
|
||||||
|
</Position16>
|
||||||
|
<Position17>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="1261" Column="1" TopLine="1233"/>
|
||||||
|
</Position17>
|
||||||
|
<Position18>
|
||||||
|
<Filename Value="../lazarus/lcl/interfaces/carbon/carbonproc.pp"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position18>
|
||||||
|
<Position19>
|
||||||
|
<Filename Value="../RichMemo/carbon/carbonrichmemo.pas"/>
|
||||||
|
<Caret Line="210" Column="47" TopLine="196"/>
|
||||||
|
</Position19>
|
||||||
|
<Position20>
|
||||||
|
<Filename Value="../RichMemo/carbon/carbonrichmemo.pas"/>
|
||||||
|
<Caret Line="207" Column="30" TopLine="185"/>
|
||||||
|
</Position20>
|
||||||
|
<Position21>
|
||||||
|
<Filename Value="../RichMemo/carbon/carbonrichmemo.pas"/>
|
||||||
|
<Caret Line="188" Column="25" TopLine="180"/>
|
||||||
|
</Position21>
|
||||||
|
<Position22>
|
||||||
|
<Filename Value="../RichMemo/carbon/carbonrichmemo.pas"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position22>
|
||||||
|
<Position23>
|
||||||
|
<Filename Value="../RichMemo/carbon/carbonrichmemo.pas"/>
|
||||||
|
<Caret Line="89" Column="1" TopLine="76"/>
|
||||||
|
</Position23>
|
||||||
|
<Position24>
|
||||||
|
<Filename Value="Unit1.pas"/>
|
||||||
|
<Caret Line="10" Column="26" TopLine="1"/>
|
||||||
|
</Position24>
|
||||||
|
<Position25>
|
||||||
|
<Filename Value="Unit1.pas"/>
|
||||||
|
<Caret Line="15" Column="36" TopLine="1"/>
|
||||||
|
</Position25>
|
||||||
|
<Position26>
|
||||||
|
<Filename Value="Unit1.pas"/>
|
||||||
|
<Caret Line="51" Column="53" TopLine="35"/>
|
||||||
|
</Position26>
|
||||||
|
<Position27>
|
||||||
|
<Filename Value="Unit1.pas"/>
|
||||||
|
<Caret Line="42" Column="32" TopLine="38"/>
|
||||||
|
</Position27>
|
||||||
|
<Position28>
|
||||||
|
<Filename Value="Unit1.pas"/>
|
||||||
|
<Caret Line="19" Column="22" TopLine="19"/>
|
||||||
|
</Position28>
|
||||||
|
<Position29>
|
||||||
|
<Filename Value="Unit1.pas"/>
|
||||||
|
<Caret Line="24" Column="46" TopLine="24"/>
|
||||||
|
</Position29>
|
||||||
|
<Position30>
|
||||||
|
<Filename Value="Unit1.pas"/>
|
||||||
|
<Caret Line="43" Column="1" TopLine="31"/>
|
||||||
|
</Position30>
|
||||||
|
</JumpHistory>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="8"/>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="$(ProjOutDir)/"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Options>
|
||||||
|
<Win32>
|
||||||
|
<GraphicApplication Value="True"/>
|
||||||
|
</Win32>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
|
<Other>
|
||||||
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
|
</Other>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions Count="3">
|
||||||
|
<Item1>
|
||||||
|
<Name Value="EAbort"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item3>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
19
components/richmemo/samples/testsimple/project1.lpr
Normal file
19
components/richmemo/samples/testsimple/project1.lpr
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
program project1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||||
|
cthreads,
|
||||||
|
{$ENDIF}{$ENDIF}
|
||||||
|
Interfaces, // this includes the LCL widgetset
|
||||||
|
Forms, Unit1, richmemopackage;
|
||||||
|
|
||||||
|
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
|
||||||
|
|
||||||
|
begin
|
||||||
|
Application.Initialize;
|
||||||
|
Application.CreateForm(TForm1, Form1);
|
||||||
|
Application.Run;
|
||||||
|
end.
|
||||||
|
|
5222
components/richmemo/samples/testsimple/project1.lrs
Normal file
5222
components/richmemo/samples/testsimple/project1.lrs
Normal file
File diff suppressed because it is too large
Load Diff
142
components/richmemo/samples/testsimple/unit1.lfm
Normal file
142
components/richmemo/samples/testsimple/unit1.lfm
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
object Form1: TForm1
|
||||||
|
Left = 332
|
||||||
|
Height = 592
|
||||||
|
Top = 117
|
||||||
|
Width = 752
|
||||||
|
Align = alNone
|
||||||
|
AllowDropFiles = False
|
||||||
|
AutoScroll = True
|
||||||
|
AutoSize = False
|
||||||
|
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||||
|
BorderStyle = bsSizeable
|
||||||
|
BorderWidth = 0
|
||||||
|
Caption = 'Form1'
|
||||||
|
ClientHeight = 592
|
||||||
|
ClientWidth = 752
|
||||||
|
DefaultMonitor = dmActiveForm
|
||||||
|
DockSite = False
|
||||||
|
DragKind = dkDrag
|
||||||
|
DragMode = dmManual
|
||||||
|
Enabled = True
|
||||||
|
FormStyle = fsNormal
|
||||||
|
ParentBiDiMode = True
|
||||||
|
ParentFont = False
|
||||||
|
Position = poDesigned
|
||||||
|
ShowInTaskBar = stDefault
|
||||||
|
UseDockManager = False
|
||||||
|
LCLVersion = '0.9.27'
|
||||||
|
WindowState = wsNormal
|
||||||
|
object RichMemo1: TRichMemo
|
||||||
|
Left = 24
|
||||||
|
Height = 518
|
||||||
|
Top = 24
|
||||||
|
Width = 704
|
||||||
|
Align = alNone
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderStyle = bsSingle
|
||||||
|
Color = clWindow
|
||||||
|
DragCursor = crDrag
|
||||||
|
DragKind = dkDrag
|
||||||
|
DragMode = dmManual
|
||||||
|
Enabled = True
|
||||||
|
HideSelection = False
|
||||||
|
Lines.Strings = (
|
||||||
|
'RichMemo1'
|
||||||
|
)
|
||||||
|
MaxLength = 0
|
||||||
|
ParentBidiMode = True
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = True
|
||||||
|
ParentShowHint = True
|
||||||
|
ReadOnly = False
|
||||||
|
ScrollBars = ssBoth
|
||||||
|
TabOrder = 0
|
||||||
|
TabStop = True
|
||||||
|
Visible = True
|
||||||
|
WantReturns = True
|
||||||
|
WantTabs = False
|
||||||
|
WordWrap = False
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 24
|
||||||
|
Height = 25
|
||||||
|
Top = 548
|
||||||
|
Width = 152
|
||||||
|
Align = alNone
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
AutoSize = False
|
||||||
|
Cancel = False
|
||||||
|
Caption = 'Make Bold and Red'
|
||||||
|
Color = clBtnFace
|
||||||
|
Default = False
|
||||||
|
DragCursor = crDrag
|
||||||
|
DragKind = dkDrag
|
||||||
|
DragMode = dmManual
|
||||||
|
Enabled = True
|
||||||
|
ParentBidiMode = True
|
||||||
|
ModalResult = 0
|
||||||
|
OnClick = Button1Click
|
||||||
|
ParentFont = True
|
||||||
|
ParentShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
|
TabStop = True
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
object Button2: TButton
|
||||||
|
Left = 184
|
||||||
|
Height = 25
|
||||||
|
Top = 548
|
||||||
|
Width = 136
|
||||||
|
Align = alNone
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
AutoSize = False
|
||||||
|
Cancel = False
|
||||||
|
Caption = 'Get Attribs'
|
||||||
|
Color = clBtnFace
|
||||||
|
Default = False
|
||||||
|
DragCursor = crDrag
|
||||||
|
DragKind = dkDrag
|
||||||
|
DragMode = dmManual
|
||||||
|
Enabled = True
|
||||||
|
ParentBidiMode = True
|
||||||
|
ModalResult = 0
|
||||||
|
OnClick = Button2Click
|
||||||
|
ParentFont = True
|
||||||
|
ParentShowHint = True
|
||||||
|
TabOrder = 2
|
||||||
|
TabStop = True
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
object Button3: TButton
|
||||||
|
Left = 328
|
||||||
|
Height = 25
|
||||||
|
Top = 548
|
||||||
|
Width = 168
|
||||||
|
Align = alNone
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
AutoSize = False
|
||||||
|
Cancel = False
|
||||||
|
Caption = 'Select Font'
|
||||||
|
Color = clBtnFace
|
||||||
|
Default = False
|
||||||
|
DragCursor = crDrag
|
||||||
|
DragKind = dkDrag
|
||||||
|
DragMode = dmManual
|
||||||
|
Enabled = True
|
||||||
|
ParentBidiMode = True
|
||||||
|
ModalResult = 0
|
||||||
|
OnClick = Button3Click
|
||||||
|
ParentFont = True
|
||||||
|
ParentShowHint = True
|
||||||
|
TabOrder = 3
|
||||||
|
TabStop = True
|
||||||
|
Visible = True
|
||||||
|
end
|
||||||
|
object FontDialog1: TFontDialog
|
||||||
|
MinFontSize = 0
|
||||||
|
MaxFontSize = 0
|
||||||
|
left = 376
|
||||||
|
top = 256
|
||||||
|
end
|
||||||
|
end
|
42
components/richmemo/samples/testsimple/unit1.lrs
Normal file
42
components/richmemo/samples/testsimple/unit1.lrs
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
|
LazarusResources.Add('TForm1','FORMDATA',[
|
||||||
|
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'L'#1#6'Height'#3'P'#2#3'Top'#2'u'#5'Width'
|
||||||
|
+#3#240#2#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9#8'AutoSi'
|
||||||
|
+'ze'#8#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#10'biMaximize'#0#11
|
||||||
|
+'BorderStyle'#7#10'bsSizeable'#11'BorderWidth'#2#0#7'Caption'#6#5'Form1'#12
|
||||||
|
+'ClientHeight'#3'P'#2#11'ClientWidth'#3#240#2#14'DefaultMonitor'#7#12'dmActi'
|
||||||
|
+'veForm'#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'E'
|
||||||
|
+'nabled'#9#9'FormStyle'#7#8'fsNormal'#14'ParentBiDiMode'#9#10'ParentFont'#8#8
|
||||||
|
+'Position'#7#10'poDesigned'#13'ShowInTaskBar'#7#9'stDefault'#14'UseDockManag'
|
||||||
|
+'er'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNormal'#0#9'TRichMem'
|
||||||
|
+'o'#9'RichMemo1'#4'Left'#2#24#6'Height'#3#6#2#3'Top'#2#24#5'Width'#3#192#2#5
|
||||||
|
+'Align'#7#6'alNone'#9'Alignment'#7#13'taLeftJustify'#7'Anchors'#11#5'akTop'#6
|
||||||
|
+'akLeft'#7'akRight'#8'akBottom'#0#11'BorderStyle'#7#8'bsSingle'#5'Color'#7#8
|
||||||
|
+'clWindow'#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8
|
||||||
|
+'dmManual'#7'Enabled'#9#13'HideSelection'#8#13'Lines.Strings'#1#6#9'RichMemo'
|
||||||
|
+'1'#0#9'MaxLength'#2#0#14'ParentBidiMode'#9#11'ParentColor'#8#10'ParentFont'
|
||||||
|
+#9#14'ParentShowHint'#9#8'ReadOnly'#8#10'ScrollBars'#7#6'ssBoth'#8'TabOrder'
|
||||||
|
+#2#0#7'TabStop'#9#7'Visible'#9#11'WantReturns'#9#8'WantTabs'#8#8'WordWrap'#8
|
||||||
|
+#0#0#7'TButton'#7'Button1'#4'Left'#2#24#6'Height'#2#25#3'Top'#3'$'#2#5'Width'
|
||||||
|
+#3#152#0#5'Align'#7#6'alNone'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSi'
|
||||||
|
+'ze'#8#6'Cancel'#8#7'Caption'#6#17'Make Bold and Red'#5'Color'#7#9'clBtnFace'
|
||||||
|
+#7'Default'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'
|
||||||
|
+#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'ModalResult'#2#0#7'OnCli'
|
||||||
|
+'ck'#7#12'Button1Click'#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrder'#2#1
|
||||||
|
+#7'TabStop'#9#7'Visible'#9#0#0#7'TButton'#7'Button2'#4'Left'#3#184#0#6'Heigh'
|
||||||
|
+'t'#2#25#3'Top'#3'$'#2#5'Width'#3#136#0#5'Align'#7#6'alNone'#7'Anchors'#11#6
|
||||||
|
+'akLeft'#8'akBottom'#0#8'AutoSize'#8#6'Cancel'#8#7'Caption'#6#11'Get Attribs'
|
||||||
|
+#5'Color'#7#9'clBtnFace'#7'Default'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'
|
||||||
|
+#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11
|
||||||
|
+'ModalResult'#2#0#7'OnClick'#7#12'Button2Click'#10'ParentFont'#9#14'ParentSh'
|
||||||
|
+'owHint'#9#8'TabOrder'#2#2#7'TabStop'#9#7'Visible'#9#0#0#7'TButton'#7'Button'
|
||||||
|
+'3'#4'Left'#3'H'#1#6'Height'#2#25#3'Top'#3'$'#2#5'Width'#3#168#0#5'Align'#7#6
|
||||||
|
+'alNone'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#8#6'Cancel'#8#7'C'
|
||||||
|
+'aption'#6#11'Select Font'#5'Color'#7#9'clBtnFace'#7'Default'#8#10'DragCurso'
|
||||||
|
+'r'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'
|
||||||
|
+#9#14'ParentBidiMode'#9#11'ModalResult'#2#0#7'OnClick'#7#12'Button3Click'#10
|
||||||
|
+'ParentFont'#9#14'ParentShowHint'#9#8'TabOrder'#2#3#7'TabStop'#9#7'Visible'#9
|
||||||
|
+#0#0#11'TFontDialog'#11'FontDialog1'#11'MinFontSize'#2#0#11'MaxFontSize'#2#0
|
||||||
|
+#4'left'#3'x'#1#3'top'#3#0#1#0#0#0
|
||||||
|
]);
|
71
components/richmemo/samples/testsimple/unit1.pas
Normal file
71
components/richmemo/samples/testsimple/unit1.pas
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
unit Unit1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||||
|
StdCtrls,
|
||||||
|
RichMemoTypes, RichMemo;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
TForm1 = class(TForm)
|
||||||
|
Button1: TButton;
|
||||||
|
Button2: TButton;
|
||||||
|
Button3: TButton;
|
||||||
|
FontDialog1: TFontDialog;
|
||||||
|
RichMemo1: TRichMemo;
|
||||||
|
procedure Button1Click(Sender: TObject);
|
||||||
|
procedure Button2Click(Sender: TObject);
|
||||||
|
procedure Button3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ private declarations }
|
||||||
|
public
|
||||||
|
{ public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Form1: TForm1;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{ TForm1 }
|
||||||
|
|
||||||
|
procedure TForm1.Button1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Caption := Format('sel start %d, sel length %d', [RichMemo1.SelStart, RichMemo1.SelLength]);
|
||||||
|
RichMemo1.SetTextAttributes(
|
||||||
|
RichMemo1.SelStart, RichMemo1.SelLength,
|
||||||
|
[tsm_Color, tsm_Styles], GetFontParams(clRed, [fsBold]) );
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.Button2Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
prm : TFontParams;
|
||||||
|
begin
|
||||||
|
if RichMemo1.GetTextAttributes( RichMemo1.SelStart, prm) then begin
|
||||||
|
RichMemo1.Lines.Add('name '+ prm.Name);
|
||||||
|
RichMemo1.Lines.Add('size '+ IntToStr(prm.Size));
|
||||||
|
RichMemo1.Lines.Add('color '+ IntToHex(Integer(prm.Color), 8));
|
||||||
|
RichMemo1.Lines.Add('style '+ IntToHex(Integer(prm.Style), 8));
|
||||||
|
end else
|
||||||
|
RichMemo1.Lines.Add('failed');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.Button3Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if Fontdialog1.Execute then begin
|
||||||
|
RichMemo1.SetTextAttributes(
|
||||||
|
RichMemo1.SelStart, RichMemo1.SelLength, FontDialog1.Font);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
{$I Unit1.lrs}
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
Reference in New Issue
Block a user