You've already forked lazarus-ccr
* finished getstylerange win32 implementation (yet, too slow)
* fixed getstylerange test git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@851 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
<MainUnit Value="0"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
<ActiveEditorIndexAtStart Value="2"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -32,14 +32,16 @@
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="44">
|
||||
<Units Count="45">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="32" Y="12"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="56"/>
|
||||
<CursorPos X="12" Y="6"/>
|
||||
<TopLine Value="3"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="61"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
@ -47,10 +49,10 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<CursorPos X="1" Y="98"/>
|
||||
<TopLine Value="94"/>
|
||||
<CursorPos X="21" Y="116"/>
|
||||
<TopLine Value="103"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="56"/>
|
||||
<UsageCount Value="61"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
@ -135,7 +137,7 @@
|
||||
<UnitName Value="CarbonGDIObjects"/>
|
||||
<CursorPos X="3" Y="1109"/>
|
||||
<TopLine Value="1100"/>
|
||||
<UsageCount Value="28"/>
|
||||
<UsageCount Value="30"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="25" Y="150" ID="1"/>
|
||||
</Bookmarks>
|
||||
@ -190,7 +192,7 @@
|
||||
<UnitName Value="CarbonPrivate"/>
|
||||
<CursorPos X="17" Y="649"/>
|
||||
<TopLine Value="640"/>
|
||||
<UsageCount Value="27"/>
|
||||
<UsageCount Value="29"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
@ -238,17 +240,17 @@
|
||||
<UnitName Value="RichMemo"/>
|
||||
<CursorPos X="3" Y="249"/>
|
||||
<TopLine Value="247"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="24"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="26"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="../../wsrichmemo.pas"/>
|
||||
<UnitName Value="WSRichMemo"/>
|
||||
<CursorPos X="1" Y="36"/>
|
||||
<TopLine Value="11"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="24"/>
|
||||
<TopLine Value="18"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="26"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
@ -292,7 +294,7 @@
|
||||
<UnitName Value="CarbonPaste"/>
|
||||
<CursorPos X="43" Y="9"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="40"/>
|
||||
<UsageCount Value="45"/>
|
||||
</Unit34>
|
||||
<Unit35>
|
||||
<Filename Value="../../../fpc/rtl/objpas/sysutils/sysutilh.inc"/>
|
||||
@ -317,19 +319,19 @@
|
||||
<Unit38>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<UnitName Value="Win32RichMemo"/>
|
||||
<CursorPos X="21" Y="190"/>
|
||||
<TopLine Value="185"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="14"/>
|
||||
<CursorPos X="63" Y="179"/>
|
||||
<TopLine Value="177"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="16"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit38>
|
||||
<Unit39>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<UnitName Value="Win32RichMemoProc"/>
|
||||
<CursorPos X="23" Y="230"/>
|
||||
<TopLine Value="215"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="14"/>
|
||||
<CursorPos X="33" Y="214"/>
|
||||
<TopLine Value="191"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="16"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="1" Y="102" ID="2"/>
|
||||
</Bookmarks>
|
||||
@ -338,10 +340,10 @@
|
||||
<Unit40>
|
||||
<Filename Value="../../../../../fpc/packages/winunits-base/src/richedit.pp"/>
|
||||
<UnitName Value="richedit"/>
|
||||
<CursorPos X="1" Y="372"/>
|
||||
<TopLine Value="359"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="10"/>
|
||||
<CursorPos X="1" Y="41"/>
|
||||
<TopLine Value="26"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="98" Y="366" ID="3"/>
|
||||
</Bookmarks>
|
||||
@ -351,147 +353,149 @@
|
||||
<Filename Value="../../../../../fpc/rtl/win/wininc/base.inc"/>
|
||||
<CursorPos X="6" Y="211"/>
|
||||
<TopLine Value="197"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="10"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit41>
|
||||
<Unit42>
|
||||
<Filename Value="../../../../../fpc/rtl/objpas/classes/classesh.inc"/>
|
||||
<CursorPos X="1" Y="791"/>
|
||||
<TopLine Value="782"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit42>
|
||||
<Unit43>
|
||||
<Filename Value="../../../../../fpc/rtl/objpas/classes/streams.inc"/>
|
||||
<CursorPos X="3" Y="465"/>
|
||||
<TopLine Value="462"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit43>
|
||||
<Unit44>
|
||||
<Filename Value="../../../../../fpc/rtl/win/wininc/ascdef.inc"/>
|
||||
<CursorPos X="120" Y="182"/>
|
||||
<TopLine Value="167"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit44>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="189" Column="11" TopLine="164"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="238" Column="59" TopLine="220"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="30" Column="20" TopLine="15"/>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="193" Column="36" TopLine="186"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="29" Column="33" TopLine="15"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="102" Column="23" TopLine="94"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="197" Column="5" TopLine="167"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="99" Column="3" TopLine="94"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="30" Column="58" TopLine="15"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="105" Column="21" TopLine="96"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="200" Column="17" TopLine="187"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="40" Column="35" TopLine="33"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../../../../fpc/packages/winunits-base/src/richedit.pp"/>
|
||||
<Caret Line="366" Column="98" TopLine="356"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="42" Column="3" TopLine="33"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../../../../fpc/packages/winunits-base/src/richedit.pp"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="139" Column="1" TopLine="138"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="194" Column="36" TopLine="187"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="39" Column="1" TopLine="33"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="203" Column="15" TopLine="187"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="112" Column="1" TopLine="112"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="246" Column="32" TopLine="218"/>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="164" Column="2" TopLine="153"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="237" Column="1" TopLine="210"/>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="20" Column="1" TopLine="9"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="206" Column="23" TopLine="191"/>
|
||||
<Caret Line="26" Column="139" TopLine="17"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="207" Column="21" TopLine="192"/>
|
||||
<Caret Line="151" Column="3" TopLine="143"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="214" Column="72" TopLine="203"/>
|
||||
<Caret Line="26" Column="55" TopLine="11"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="31" Column="58" TopLine="30"/>
|
||||
<Caret Line="168" Column="3" TopLine="166"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="196" Column="19" TopLine="182"/>
|
||||
<Caret Line="179" Column="14" TopLine="166"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="218" Column="31" TopLine="203"/>
|
||||
<Caret Line="184" Column="71" TopLine="164"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="242" Column="31" TopLine="217"/>
|
||||
<Caret Line="178" Column="27" TopLine="157"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="238" Column="59" TopLine="220"/>
|
||||
<Caret Line="177" Column="26" TopLine="167"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="193" Column="36" TopLine="186"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="178" Column="12" TopLine="167"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="53" Column="26" TopLine="77"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="211" Column="37" TopLine="188"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="102" Column="23" TopLine="94"/>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="188" Column="72" TopLine="178"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="99" Column="3" TopLine="94"/>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="185" Column="75" TopLine="173"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="105" Column="21" TopLine="96"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="12" Column="32" TopLine="1"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="40" Column="35" TopLine="33"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="17" Column="1" TopLine="3"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="42" Column="3" TopLine="33"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="18" Column="1" TopLine="3"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="139" Column="1" TopLine="138"/>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<Caret Line="16" Column="30" TopLine="3"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="39" Column="1" TopLine="33"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="222" Column="12" TopLine="208"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="112" Column="1" TopLine="112"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="219" Column="45" TopLine="209"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
|
@ -10,8 +10,8 @@ object Form1: TForm1
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '0.9.27'
|
||||
object RichMemo1: TRichMemo
|
||||
Left = 16
|
||||
Height = 366
|
||||
Left = 15
|
||||
Height = 358
|
||||
Top = 16
|
||||
Width = 619
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
@ -34,6 +34,7 @@ object Form1: TForm1
|
||||
Caption = 'Make Bold and Red'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 1
|
||||
TabStop = False
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 192
|
||||
@ -44,6 +45,7 @@ object Form1: TForm1
|
||||
Caption = 'Get Attribs'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 2
|
||||
TabStop = False
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 304
|
||||
@ -54,6 +56,7 @@ object Form1: TForm1
|
||||
Caption = 'Select Font'
|
||||
OnClick = Button3Click
|
||||
TabOrder = 3
|
||||
TabStop = False
|
||||
end
|
||||
object Button4: TButton
|
||||
Left = 528
|
||||
@ -64,6 +67,7 @@ object Form1: TForm1
|
||||
Caption = 'Save RTF'
|
||||
OnClick = Button4Click
|
||||
TabOrder = 4
|
||||
TabStop = False
|
||||
end
|
||||
object Button5: TButton
|
||||
Left = 440
|
||||
@ -74,6 +78,7 @@ object Form1: TForm1
|
||||
Caption = 'Load RTF'
|
||||
OnClick = Button5Click
|
||||
TabOrder = 5
|
||||
TabStop = False
|
||||
end
|
||||
object Button6: TButton
|
||||
Left = 24
|
||||
@ -84,24 +89,25 @@ object Form1: TForm1
|
||||
Caption = 'Next Style Range'
|
||||
OnClick = Button6Click
|
||||
TabOrder = 6
|
||||
TabStop = False
|
||||
end
|
||||
object FontDialog1: TFontDialog
|
||||
MinFontSize = 0
|
||||
MaxFontSize = 0
|
||||
left = 352
|
||||
top = 552
|
||||
top = 429
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
DefaultExt = '.rtf'
|
||||
Filter = 'RichText file (*.rtf)|*.rtf'
|
||||
Options = [ofOverwritePrompt, ofEnableSizing, ofViewDetail]
|
||||
left = 280
|
||||
top = 552
|
||||
top = 429
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
DefaultExt = '.rtf'
|
||||
Filter = 'RichText file (*.rtf)|*.rtf'
|
||||
left = 208
|
||||
top = 552
|
||||
top = 429
|
||||
end
|
||||
end
|
||||
|
@ -4,31 +4,32 @@ LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#196#0#6'Height'#3#201#1#3'Top'#3#181#0#5
|
||||
+'Width'#3'z'#2#13'ActiveControl'#7#9'RichMemo1'#7'Caption'#6#5'Form1'#12'Cli'
|
||||
+'entHeight'#3#201#1#11'ClientWidth'#3'z'#2#8'OnCreate'#7#10'FormCreate'#10'L'
|
||||
+'CLVersion'#6#6'0.9.27'#0#9'TRichMemo'#9'RichMemo1'#4'Left'#2#16#6'Height'#3
|
||||
+'n'#1#3'Top'#2#16#5'Width'#3'k'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
|
||||
+'CLVersion'#6#6'0.9.27'#0#9'TRichMemo'#9'RichMemo1'#4'Left'#2#15#6'Height'#3
|
||||
+'f'#1#3'Top'#2#16#5'Width'#3'k'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
|
||||
+#8'akBottom'#0#11'Font.Height'#2#243#9'Font.Name'#6#6'Tahoma'#13'HideSelecti'
|
||||
+'on'#8#13'Lines.Strings'#1#6#9'RichMemo1'#0#10'ParentFont'#8#10'ScrollBars'#7
|
||||
+#10'ssVertical'#8'TabOrder'#2#0#0#0#7'TButton'#7'Button1'#4'Left'#2#24#6'Hei'
|
||||
+'ght'#2#25#3'Top'#3'~'#1#5'Width'#3#160#0#7'Anchors'#11#6'akLeft'#8'akBottom'
|
||||
+#0#7'Caption'#6#17'Make Bold and Red'#7'OnClick'#7#12'Button1Click'#8'TabOrd'
|
||||
+'er'#2#1#0#0#7'TButton'#7'Button2'#4'Left'#3#192#0#6'Height'#2#25#3'Top'#3'~'
|
||||
+#1#5'Width'#2'a'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#11'Get A'
|
||||
+'ttribs'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#2#0#0#7'TButton'#7'Butt'
|
||||
+'on3'#4'Left'#3'0'#1#6'Height'#2#25#3'Top'#3'~'#1#5'Width'#2'`'#7'Anchors'#11
|
||||
+#6'akLeft'#8'akBottom'#0#7'Caption'#6#11'Select Font'#7'OnClick'#7#12'Button'
|
||||
+'3Click'#8'TabOrder'#2#3#0#0#7'TButton'#7'Button4'#4'Left'#3#16#2#6'Height'#2
|
||||
+#25#3'Top'#3'~'#1#5'Width'#2'K'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Capt'
|
||||
+'ion'#6#8'Save RTF'#7'OnClick'#7#12'Button4Click'#8'TabOrder'#2#4#0#0#7'TBut'
|
||||
+'ton'#7'Button5'#4'Left'#3#184#1#6'Height'#2#25#3'Top'#3'~'#1#5'Width'#2'K'#7
|
||||
+'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#8'Load RTF'#7'OnClick'#7#12
|
||||
+'Button5Click'#8'TabOrder'#2#5#0#0#7'TButton'#7'Button6'#4'Left'#2#24#6'Heig'
|
||||
+'ht'#2#25#3'Top'#3#159#1#5'Width'#3#160#0#7'Anchors'#11#6'akLeft'#8'akBottom'
|
||||
+#0#7'Caption'#6#16'Next Style Range'#7'OnClick'#7#12'Button6Click'#8'TabOrde'
|
||||
+'r'#2#6#0#0#11'TFontDialog'#11'FontDialog1'#11'MinFontSize'#2#0#11'MaxFontSi'
|
||||
+'ze'#2#0#4'left'#3'`'#1#3'top'#3'('#2#0#0#11'TSaveDialog'#11'SaveDialog1'#10
|
||||
+'DefaultExt'#6#4'.rtf'#6'Filter'#6#27'RichText file (*.rtf)|*.rtf'#7'Options'
|
||||
+#11#17'ofOverwritePrompt'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#24
|
||||
+#1#3'top'#3'('#2#0#0#11'TOpenDialog'#11'OpenDialog1'#10'DefaultExt'#6#4'.rtf'
|
||||
+#6'Filter'#6#27'RichText file (*.rtf)|*.rtf'#4'left'#3#208#0#3'top'#3'('#2#0
|
||||
+#0#0
|
||||
+'er'#2#1#7'TabStop'#8#0#0#7'TButton'#7'Button2'#4'Left'#3#192#0#6'Height'#2
|
||||
+#25#3'Top'#3'~'#1#5'Width'#2'a'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Capt'
|
||||
+'ion'#6#11'Get Attribs'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#2#7'TabS'
|
||||
+'top'#8#0#0#7'TButton'#7'Button3'#4'Left'#3'0'#1#6'Height'#2#25#3'Top'#3'~'#1
|
||||
+#5'Width'#2'`'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#11'Select '
|
||||
+'Font'#7'OnClick'#7#12'Button3Click'#8'TabOrder'#2#3#7'TabStop'#8#0#0#7'TBut'
|
||||
+'ton'#7'Button4'#4'Left'#3#16#2#6'Height'#2#25#3'Top'#3'~'#1#5'Width'#2'K'#7
|
||||
+'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#8'Save RTF'#7'OnClick'#7#12
|
||||
+'Button4Click'#8'TabOrder'#2#4#7'TabStop'#8#0#0#7'TButton'#7'Button5'#4'Left'
|
||||
+#3#184#1#6'Height'#2#25#3'Top'#3'~'#1#5'Width'#2'K'#7'Anchors'#11#6'akLeft'#8
|
||||
+'akBottom'#0#7'Caption'#6#8'Load RTF'#7'OnClick'#7#12'Button5Click'#8'TabOrd'
|
||||
+'er'#2#5#7'TabStop'#8#0#0#7'TButton'#7'Button6'#4'Left'#2#24#6'Height'#2#25#3
|
||||
+'Top'#3#159#1#5'Width'#3#160#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Capti'
|
||||
+'on'#6#16'Next Style Range'#7'OnClick'#7#12'Button6Click'#8'TabOrder'#2#6#7
|
||||
+'TabStop'#8#0#0#11'TFontDialog'#11'FontDialog1'#11'MinFontSize'#2#0#11'MaxFo'
|
||||
+'ntSize'#2#0#4'left'#3'`'#1#3'top'#3#173#1#0#0#11'TSaveDialog'#11'SaveDialog'
|
||||
+'1'#10'DefaultExt'#6#4'.rtf'#6'Filter'#6#27'RichText file (*.rtf)|*.rtf'#7'O'
|
||||
+'ptions'#11#17'ofOverwritePrompt'#14'ofEnableSizing'#12'ofViewDetail'#0#4'le'
|
||||
+'ft'#3#24#1#3'top'#3#173#1#0#0#11'TOpenDialog'#11'OpenDialog1'#10'DefaultExt'
|
||||
+#6#4'.rtf'#6'Filter'#6#27'RichText file (*.rtf)|*.rtf'#4'left'#3#208#0#3'top'
|
||||
+#3#173#1#0#0#0
|
||||
]);
|
||||
|
@ -113,7 +113,7 @@ var
|
||||
begin
|
||||
RichMemo1.GetStyleRange( RichMemo1.SelStart, ofs, len );
|
||||
if (ofs = RichMEmo1.SelStart) and (len = RichMemo1.SelLength) then begin
|
||||
ofs := ofs + len + 1;
|
||||
ofs := ofs + len;
|
||||
RichMemo1.GetStyleRange( ofs, ofs, len );
|
||||
end;
|
||||
RichMemo1.SelStart := ofs;
|
||||
|
@ -172,8 +172,8 @@ var
|
||||
mask : LongWord;
|
||||
textlen : TGETTEXTEX;
|
||||
sel : TCHARRANGE;
|
||||
rngend : Integer;
|
||||
d : Integer;
|
||||
last : Integer;
|
||||
const
|
||||
CP_UNICODE = 1200;
|
||||
ALL_MASK = CFM_BOLD or CFM_ITALIC or CFM_STRIKEOUT or CFM_UNDERLINE or
|
||||
@ -185,6 +185,8 @@ begin
|
||||
textlen.flags := GTL_DEFAULT or GTL_NUMCHARS;
|
||||
textlen.codepage := CP_UNICODE;
|
||||
len := SendMessage(RichEditWnd, EM_GETTEXTLENGTHEX, WPARAM(@textlen), 0);
|
||||
writeln('TextStart = ', TextStart);
|
||||
writeln('TextLength = ', len);
|
||||
|
||||
sel.cpMin := TextStart;
|
||||
sel.cpMax := len;
|
||||
@ -192,13 +194,31 @@ begin
|
||||
|
||||
FillChar(fmt, sizeof(fmt), 0);
|
||||
fmt.cbSize := sizeof(fmt);
|
||||
SendMessage(RichEditWnd, EM_GETCHARFORMAT, SCF_SELECTION, PtrInt(@fmt));
|
||||
|
||||
//todo: BOOST PERFORMANCE!!!
|
||||
sel.cpMax := TextStart;
|
||||
repeat
|
||||
inc(sel.cpMax);
|
||||
SendMessage(RichEditWnd, EM_EXSETSEL, 0, LPARAM(@sel));
|
||||
SendMessage(RichEditWnd, EM_GETCHARFORMAT, SCF_SELECTION, PtrInt(@fmt));
|
||||
until (sel.cpMax > len) or ((fmt.dwMask and ALL_MASK) <> ALL_MASK);
|
||||
|
||||
last := sel.cpMax;
|
||||
sel.cpMin := TextStart;
|
||||
sel.cpMax := TextStart+1;
|
||||
repeat
|
||||
dec(sel.cpMin);
|
||||
SendMessage(RichEditWnd, EM_EXSETSEL, 0, LPARAM(@sel));
|
||||
SendMessage(RichEditWnd, EM_GETCHARFORMAT, SCF_SELECTION, PtrInt(@fmt));
|
||||
until ((fmt.dwMask and ALL_MASK) <> ALL_MASK) or (sel.cpMin < 0);
|
||||
inc(sel.cpMin);
|
||||
|
||||
{ SendMessage(RichEditWnd, EM_GETCHARFORMAT, SCF_SELECTION, PtrInt(@fmt));
|
||||
|
||||
|
||||
if fmt.dwMask and ALL_MASK <> ALL_MASK then begin
|
||||
rngend := len;
|
||||
d := rngend - sel.cpMin;
|
||||
sel.cpMax := sel.cpMin + d div 2;
|
||||
d := (len - sel.cpMin) div 2;
|
||||
sel.cpMax := sel.cpMin + d;
|
||||
while d > 1 do begin
|
||||
SendMessage(RichEditWnd, EM_EXSETSEL, 0, LPARAM(@sel));
|
||||
SendMessage(RichEditWnd, EM_GETCHARFORMAT, SCF_SELECTION, PtrInt(@fmt));
|
||||
@ -208,10 +228,26 @@ begin
|
||||
else
|
||||
sel.cpMax := sel.cpMax - d;
|
||||
end;
|
||||
end;
|
||||
|
||||
if (fmt.dwMask and ALL_MASK) = ALL_MASK then begin
|
||||
repeat
|
||||
inc(sel.cpMax);
|
||||
SendMessage(RichEditWnd, EM_EXSETSEL, 0, LPARAM(@sel));
|
||||
SendMessage(RichEditWnd, EM_GETCHARFORMAT, SCF_SELECTION, PtrInt(@fmt));
|
||||
writeln(sel.cpMax, ' ', (fmt.dwMask and ALL_MASK) <> ALL_MASK);
|
||||
until (sel.cpMax = len) or ((fmt.dwMask and ALL_MASK) <> ALL_MASK);
|
||||
end else begin
|
||||
repeat
|
||||
dec(sel.cpMax);
|
||||
SendMessage(RichEditWnd, EM_EXSETSEL, 0, LPARAM(@sel));
|
||||
SendMessage(RichEditWnd, EM_GETCHARFORMAT, SCF_SELECTION, PtrInt(@fmt));
|
||||
until (sel.cpMax <= sel.cpMin) or ((fmt.dwMask and ALL_MASK) = ALL_MASK);
|
||||
end;
|
||||
end;}
|
||||
|
||||
RangeStart := sel.cpMin;
|
||||
RangeLen := sel.cpMax - sel.cpMin;
|
||||
RangeLen := last - sel.cpMin - 1;
|
||||
writeln('Range Start = ', RangeStart, ' Len = ', RangeLen);
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user