частичное решение поставленных вопросов
Add(MainForm,11774986,203,357)
{
Width=735
Height=583
link(onCreate,8782571:doSendMessage,[])
}
Add(InlineCode,6686563,371,273)
{
WorkPoints=#11:doFormatSel|
DataPoints=#7:PHandle|8:FontSize|5:Color|8:FontName|5:Style|0:|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|0:|12: PHandle,|10: Color,|10: Style,|13: FontName,|24: FontSize: THI_Event;|4: |58: procedure doFormatSel(var _Data: TData; Index: word); |5: end;|0:|14:implementation|0:|34:procedure THiAsmClass.doFormatSel;|3:var|21: sControl: PControl;|10: p: byte;|12: s: string;|13: i: integer;|0:|5:begin|48: sControl := PControl(ToIntegerEvent(PHandle));|38: if not Assigned(sControl) then exit;|0:|26: sControl.SelStart := 0;|35: sControl.SelLength := $FFFFFFFF;|0:|64: if (sControl.SelLength <> 0) then {no valid selection -> quit}|7: begin|82: sControl.RE_CharFmtArea := raSelection; {apply attribute(s) only to selection}|58: sControl.RE_FmtFontColor := ReadInteger(_Data, Color);|0:|35: p := ReadInteger(_Data, Style);|39: sControl.RE_FmtBold := p and 1 > 0;|41: sControl.RE_FmtItalic := p and 2 > 0;|44: sControl.RE_FmtUnderline := p and 4 > 0;|37: s := ReadString(_Data, FontName);|20: if s <> '' then|35: sControl.RE_FmtFontName := s;|43: i := ReadInteger(_Data, FontSize) * 20;|20: if i <> 0 then |36: sControl.RE_FmtFontSize := i; |6: end;|26: sControl.SelStart := 0;|4:end;|0:|4:end.|
link(PHandle,7698085:PHandle,[(377,264)(314,264)])
link(FontSize,13693362:FontSize,[])
link(Color,13693362:FontColor,[])
link(FontName,13693362:FontName,[])
link(Style,13693362:FontStyle,[])
}
Add(DoData,14434637,315,273)
{
link(onEventData,6686563:doFormatSel,[])
}
Add(DropFile,147384,49,189)
{
link(onDropFile,13611108:doEvent1,[])
}
Add(SendMessage,8782571,301,371)
{
@Color=22015
LParam=-1
Point(Message)
link(Handle,7698085:Handle,[])
link(Message,7655255:Value,[])
}
Add(Memory,7655255,322,322)
{
@Color=22015
Default=Integer(1077)
}
Add(Hub,13611108,112,189)
{
OutCount=5
link(onEvent1,7698085:doClear,[])
link(onEvent2,15640603:doBeginUpdate,[(151,202)(151,237)])
link(onEvent3,7698085:doLoad,[])
link(onEvent4,8914281:doPart,[(144,216)(144,279)])
link(onEvent5,15640603:doEndUpdate,[(137,223)(137,244)])
}
Add(FilePartElm,8914281,154,273)
{
Mode=4
link(onPart,7258017:doModify,[])
}
Add(Case,15311257,252,273)
{
Value=String(rtf)
link(onNextCase,14434637:doData,[])
}
Add(StrCase,7258017,203,273)
{
link(onModify,15311257:doCase,[])
}
Add(RichEdit,7698085,280,182)
{
Width=719
Height=545
Align=5
Font=[MS Sans Serif,10,0,0,204]
Name="rich"
ScrollBars=2
CanDragOle=1
Point(Handle)
Point(doFont)
Point(doUndo)
Point(PHandle)
}
Add(FontManager,13693362,378,203)
{
ControlManager="rich"
}
Add(RedrawManager,15640603,203,224)
{
ControlManager="rich"
Point(doBeginUpdate)
Point(doEndUpdate)
}