|
Разработка текстового редактора
Ianeieuei eao iacaa
enneaaiaaoaee caiaoeee, ?oi i?ia?aiienou a oa?aiea ii?aaaeaiiiai a?aiaie ieooo e
ioea?eaa?o i?eaeeceoaeuii iaeiaeiaue ii iauaio eia, iacaaeneii io eniieucoaiiai
ycuea i?ia?aiie?iaaiey. Iauai ?aaiou i?eia?ii oio ?a, ii ?acoeuoaou ?aciua.
Iaienaiea 100 no?ie ia N o?aaoao noieuei ?a cao?ao, neieuei e 100 no?ie eiaa ia
annaiaea?a, ii aicii?iinoe eiaa ia N ai?acai oe?a. Iiiya yoi, enneaaiaaoaee
ia?aee ?ac?aaaouaaou ycuee aunieiai o?iaiy, eioi?ua oaaee?eaaee au iioaioeae
ioaaeuiiai i?ia?aiienoa, nie?auay oai naiui no?iee e noieiinou ?ac?aaioee
i?iaeoia. A 70-o aiaao n?aae nicaaoaeae ycueia i?ia?aiie?iaaiey i?eia?aea
iiioey?iinou eiioaioey iauaeoa. Iauaeo yaeyaony niaieoiiinou? eiaa e aaiiuo,
nicaaiiie aey aini?iecaaaaiey naienoa oece?aneeo iauaeoia eee aano?aeoiuo
iiiyoee. Iauaeoii-i?eaioe?iaaiiia i?ia?aiie?iaaiea – yoi iaoiaieiaey, eioi?ay
eiioaio?e?oaony aieuoa ia naycyo ia?ao iauaeoaie, ?ai ia aaoaeyo ?aaeecaoee.
Aaiiua nayce iau?ii ?acaeaa?ony ii i?eioeio aa?aauaa, i?e yoii iiaua oeiu
iauaeoia ia?aco?ony o?a ec nouanoao?ueo. Nie?uoea ?aaeecaoee iauaeoa aaaao e
oiio, ?oi iieuciaaoaey aieuoa aieioao naycu n inoaeuiuie iauaeoaie, ?ai
iiaaaaiea iauaeoa. Aaiiia ioee?ea i?aiu aa?ii, iineieueo iii icia?aao
i?eioeieaeuiue ioeac io "eiia?aoeaiuo" ycueia (oaeeo eae N), a eioi?uo ooieoee e
auciau ooieoee ninoaaey?o iniiao aayoaeuiinoe. A N++ iaeioi?ua iauaeou
yaey?ony ?anou? naiiai ycuea. Ii a oaeii caaa?a nicaaiey iiauo iauaeoia ei?eony
ia iieuciaaoaey. A C++Builder eiaaony iii?anoai oeiia iauaeoia, ii ?aaeuiia
eniieuciaaiea ycuea o?aaoao nicaaiey iiauo oeiia. Yooaeoeaiinou III i?iyaeyaony
oieuei i?e nicaaiee e i?eiaiaiee a?oii naycaiiuo ia?ao niaie iauaeoia. Oaeea
a?oiiu iacuaa?o ea?a?oeyie eeannia. ?acaeoea yoeo ea?a?oee eeannia yaeyaony
iniiaie aayoaeuiinoe a III. C++Builder yaeyaony iauaeoii-i?eaioe?iaaiiui
ycueii i?ia?aiie?iaaiey e ia i?eia?a nicaaiey oaenoiaiai ?aaaeoi?a y oi?o
i?iaaiiino?e?iaaou an? iiuu e auno?ioo aecoaeuiiai, iauaeoii-i?eaioe?iaaiiiai
i?ia?aiie?iaaiey. ?anniao?eaaaiay i?ia?aiia eiaao aicii?iinou ?aaaeoe?iaaiey
oaenoiauo oaeeia oeia TXT e RTF, a oae?a ei iiaiaiua. I?ia?aiia i?aanoaaeyao
niaie EXE oaee; i?ia?aiia oiaao ioe?uaaou e nio?aiyou oaenoiaua oaeeu,
?aaaeoe?iaaou eo, eciaiyou o?eoo e ?acia? oaenoa, eiaao iiene e caiaio oaenoa.
Iienaiea ooieoee e eeaaeo aoaao i?eaaaaii ie?a. Auiieiyaiue oaee iacuaaaony WORD.EXE. Iinea aai caionea ia ye?aia
iiyaeyaony ieii, iieacaiiia ia ?enoiie 1. 1 Ieii i?ia?aiiu, aicieea?uaa iinea
caionea ?aaioa n aieoiaioaie ?oiau nio?aieou iiaue oaee, auaa?eoa a iai? Oaee eiiaiao Nio?aieou eae e
aaaaeoa eiy a iiea Eiy oaeea. ?oiau nio?aieou nouanoao?uee
aieoiaio iia a?oaei eiaiai, auaa?eoa eiiaiao Nio?aieou eae e aaaaeoa iiaia eiy a
iiea Eiy oaeea. Ieii ioe?uoey oaeea. A ioe?uaoainy ieia
(?en 1.2), a iiea ni nieneii Iaiea auaa?eoa aene, niaa??auee aieoiaio, eioi?ue
neaaoao ioe?uou. Anee au ia
aeaeoa io?iue aieoiaio, iii?iaoeoa aua?aou a?oaie oei aieoiaioia a iiea ni
nieneii Oei oaeeia. Iano?ieea ieia MAGWord Anee neaaa
io yoie eiiaiau a iai? noieo iaoea, eeiaeea iaoiaeony ia ye?aia. Anee neaaa io yoie eiiaiau a iai? noieo iaoea, iaiaeu
eino?oiaioia iaoiaeony ia ye?aia. Iaiaeu oi?iaoe?iaaiey niaa??eo
eiiiee, onei?y?uea oi?iaoe?iaaiea oaenoa, iai?eia?, eciaiy?uea ia?a?oaiea oaenoa
eee noeeu aacaoa. ?oiau iooi?iaoe?iaaou oaeno, auaaeeoa aai, a caoai ia?ieoa
niioaaonoao?uo? eiiieo ia iaiaee oi?iaoe?iaaiey. Oaaeaiea oaenoa ?oiau
ia?aianoeou oaeno a a?oao? ?anou aieoiaioa, auaa?eoa a iai? I?aaea eiiaiao
Au?acaou. ?oiau niyou auaaeaiea, uaeeieoa e?aia ianoi a aieoiaioa.
?oiau
auaaeeou aey oaaeaiey aanu oaeno a aieoiaioa ia?ieoa Ctrl+A. A
iai? I?aaea auaa?eoa eiiaiao Iiene. A iiyaeaoainy ieia (?enoiie 1.3) onoaiiaeou
ia?aiao?u iienea. Aey iienea e caiaiu oaenoa auaa?eoa a iai? I?aaea
eiiaiao Caiaieou. A iiea Ia?acao aaaaeoa ia?acao oaenoa aey iienea e caiaiu.
?oiau caiaieou ana
aoi?aaiey eneiiiai oaenoa, ia?ieoa eiiieo Caiaieou ana. Uaeeieoa ianoi a aieoiaioa, n eioi?iai neaaoao ia?aou ia?ee?iaaiiue nienie.
A iai? Oi?iao auaa?eoa eiiaiao Ia?ea?, a caoai ia?eiaeoa aaia oaenoa. I?e
ea?aii ia?aoee eeaaeoe ENTER ia neaao?uae no?iea aoaao iiyaeyouny iiaue ia?ea?.
Eciaiaiea o?eooa, ia?a?oaiey e ?acia?a neiaieia A iai? I?aaea auaa?eoa eiiaiao O?eoo. Ioe?iaony
aeaeiaiaia ieii iieacaiiia ia ?enoiea 1.4. Ieii auai?a o?eooa ?oiau caaaou o?eoo aey
ioi?ieaiey iiaiai oaenoa, eciaieoa aai ai ia?aea aaiaa oaenoa. Oi?iaoe?iaaiea aacaoa Ia iaiaee eino?oiaioia uaeeieoa ii iaiie ec eiiiie
au?aaieaaiey oaenoa e caaaeoa ia?aiao?u ionooia n iiiiuu?
eeiaeee. ?oiau niaieou i?eioa?, ia?ieoa eiiieo Ia?aou. Ioe?iaony aeaeiaiaia ieii
iieacaiiia ia ?enoiea 1.5. Auaa?eoa eiy i?eioa?a a iiea ni nieneii Eiy. Aeaeiaiaia ieii ia?aoe aieoiaioa C++ aaao aicii?iinou
caiene cia?aiee iniiaiuo oeiia: neiaieuiuo eiinoaio, oaeuo eiinoaio e eiinoaio n
ieaaa?uae oi?eie. E?iia oiai, iieu (0) ii?ao eniieuciaaouny eae eiinoaioa e?aiai
oeacaoaeuiiai oeia, e neiaieuiua no?iee yaey?ony eiinoaioaie oeia char[]. Ii?ii
oae?a caaaaaou neiaiee?aneea eiinoaiou. Neiaiee?aneay eiinoaioa - yoi eiy,
cia?aiea eioi?iai ia ii?ao auou eciaiaii a aai iaeanoe aeaeiinoe. A C++ eiaaony
o?e aeaa neiaiee?aneeo eiinoaio: (1) e?aiio cia?aie? e?aiai oeia ii?ii aaou eiy
e eniieuciaaou aai eae eiinoaioo, aiaaaea e aai iienaie? ee??aaia neiai const;
(2) iii?anoai oaeuo eiinoaio ii?ao auou ii?aaaeaii eae ia?a?eneaiea; e (3) e?aia
eiy aaeoi?a eee ooieoee yaeyaony eiinoaioie. Oaeua
eiinoaiou i?aanoa?o a ?aou?ao iaee?uyo: aanyoe?iua, ainuia?e?iua,
oanoiaaoaoa?e?iua e neiaieuiua eiinoaiou. Aanyoe?iua eniieuco?ony ?aua anaai e
auaeyayo oae, eae ii?ii auei au i?eaaou: Aanyoe?iay eiinoaioa eiaao oei int, i?e oneiaee, ?oi
iia aeacaao a int, a i?ioeaiii neo?aa aa oei long. Eiiieeyoi? aie?ai
i?aaoi?a?aaou i eiinoaioao, eioi?ua neeoeii aeeiiu aey i?aanoaaeaiey a iaoeia.
Eiinoaioa, eioi?ay ia?eiaaony ioeai ca eioi?ui eaao x (0x), yaeyaony
oanoiaaoaoa?e?iui ?eneii (n iniiaaieai 16), a eiinoaioa, eioi?ay ia?eiaaony
ioeai ca eioi?ui eaao oeo?a, yaeyaony ainuia?e?iui ?eneii (n iniiaaieai 8). Aio
i?eia?u ainuia?e?iuo eiinoaio: eo aanyoe?iua
yeaeaaeaiou - yoi 0, 2, 63, 83. A oanoiaaoaoa?e?iie caiene yoe eiinoaiou
auaeyayo oae: Aoeau a, b, c, d, e e f, eee eo
yeaeaaeaiou a aa?oiai ?aaeno?a, eniieuco?ony aey i?aanoaaeaiey ?enae 10, 11. 12,
13, 14 e 15, niioaaonoaaiii. Ainuia?e?iay e oanoiaaoaoa?e?iay caiene iaeaieaa
iieaciu aey caiene iaai?a aeoia; i?eiaiaiea yoeo caienae aey au?a?aiey iau?iuo
?enae ii?ao i?eaanoe e iai?eaaiiinoyi. Iai?eia?, ia iaoeia, aaa int
i?aanoaaeyaony eae aaie?iia aiiieieoaeuiia oanoiaaoaoa?e?iia oaeia, 0xffff
yaeyaony io?eoaoaeuiui aanyoe?iui ?eneii -1; anee au aey i?aanoaaeaiey oaeiai
eniieuciaaeinu aieuoaa ?enei aeoia, oi iii auei au ?eneii 65535. Eiinoaiou n ieaaa?uae oi?eie eia?o oei double. Eae e a
i?aauaouai neo?aa, eiiieeyoi? aie?ai i?aaoi?a?aaou i eiinoaioao n ieaaa?uae
oi?eie, eioi?ua neeoeii aaeeee, ?oiau eo ii?ii auei i?aanoaaeou. Aio iaeioi?ua
eiinoaiou n ieaaa?uae oi?eie: Caiaouoa, ?oi a na?aaeia eiinoaiou n ieaaa?uae oi?eie ia ii?ao
ano?a?aouny i?iaae. Iai?eia?, 65.43 e-21 yaeyaony ia eiinoaioie n ieaaa?uae
oi?eie, a ?aou?uiy ioaaeuiuie eaene?aneeie neiaieaie (eaenaiaie): Anee au oioeoa eiaou eiinoaioo n
ieaaa?uae oi?eie oeia float, au ii?aoa ii?aaaeeou aa oae: Oioy a C++ e iao ioaaeuiiai neiaieuiiai
oeia aaiiuo, oi?iaa, neiaie ii?ao o?aieouny a oaeii oeia, a iai aey neiaieia
eiaaony niaoeaeuiay e oaiaiay caienu. Neiaieuiay eiinoaioa - yoi neiaie,
caee??aiiue a iaeia?iua eaau?ee; iai?eia?, 'a' eee '0'. Oaeea neiaieuiua
eiinoaiou a aaenoaeoaeuiinoe yaey?ony neiaiee?aneeie eiinoaioaie aey oaeiai
cia?aiey neiaieia a iaai?a neiaieia oie iaoeiu, ia eioi?ie aoaao auiieiyouny
i?ia?aiia (eioi?ue ia iaycaoaeuii niaiaaaao n iaai?ii neiaieia, i?eiaiyaiii ia
oii eiiiu?oa?a, aaa i?ia?aiia eiiieee?oaony). Iiyoiio, anee au auiieiyaoanu ia
iaoeia, eniieuco?uae iaai? neiaieia ASCII, oi cia?aieai '0' aoaao 48, ii anee
aaoa iaoeia eniieucoao EBCDIC, oi iii aoaao 240. Oiio?aaeaiea neiaieuiuo
eiinoaio aianoi aanyoe?iie caiene aaeaao i?ia?aiio aieaa ia?aiineiie. Ianeieuei
neiaieia oae?a eia?o noaiaa?oiua eiaia, a eioi?uo ia?aoiay einay \ eniieucoaony
eae escape-neiaie: aica?ao iacaa '\n' '\v' ia?aoiay
einay (ia?aoiue neyo) '\"' null, ionoie neiaie, oaeia cia?aiea 0
Aii?aee eo aiaoiaio aeao ea?aia yaeyaony iaiei neiaieii.
Ii?ii oae?a i?aanoaaeyou neiaie iaii-, aao- eee o?aocia?iui ainuia?e?iui ?eneii
(neiaie \, ca eioi?ui eaoo ainuia?e?iua oeo?u), eee iaii-, aao- eee o?aocia?iui
oanoiaaoaoa?e?iui ?eneii (\x, ca eioi?ui eaoo oanoiaaoaoa?e?iua oeo?u).
Iai?eia?: Yoi iicaieyao i?aanoaaeyou ea?aue neiaie ec iaoeiiiai
iaai?a neiaieia, e a ?anoiinoe anoaaeyou oaeea neiaieu a neiaieuiua no?iee (ni.
neaao?uee ?acaae). I?eiaiaiea ?eneiaie caiene aey neiaieia aaeaao i?ia?aiio
iaia?aiineiie ia?ao iaoeiaie n ?acee?iuie iaai?aie neiaieia. No?ieiaay eiinoaioa - yoi iineaaiaaoaeuiinou neiaieia, caee??aiiay a aaieiua
eaau?ee: Ea?aay no?ieiaay eiinoaioa niaa??eo ia iaei
neiaie aieuoa, ?ai ea?aony; ana iie caeai?eaa?ony ionoui neiaieii '\0' ni
cia?aieai 0. Iai?eia?: No?iea eiaao oei "aaeoi? ec
niioaaonoao?uaai ?enea neiaieia", iiyoiio "asdf" eiaao oei char[5]. Ionoay
no?iea caienuaaaony "" (e eiaao oei char[1]). Caiaouoa, ?oi aey ea?aie no?iee s
strlen(s)==sizeof(s)-1, iineieueo strlen() ia o?eouaaao caaa?oa?uee 0.
Niaeaoaiea i i?aanoaaeaiee iaa?aoe?aneeo neiaieia n ia?aoiie einie ii?ii
eniieuciaaou oae?a e aioo?e no?iee. Yoi aaao aicii?iinou i?aanoaaeyou a no?iea
aaieiua eaau?ee e escape-neiaie \. Naiui iau?iui neiaieii yoiai ?iaa yaeyaony,
aaconeiaii, neiaie iiaie no?iee '\n'. Iai?eia?: aaa 7 - cia?aiea ASKII neiaiea bel (caiiie). A no?iea
iaaicii?ii eiaou "ianoiyuo?" iiao? no?ieo: Iaiaei a no?iea ii?ao noiyou ia?aoiay einay, n?aco
iinea eioi?ie eaao iiaay no?iea; e oi, e a?oaia aoaao i?ieaii?e?iaaii. Iai?eia?:
Iiaay no?iea, ia?aa eioi?ie eaao escape (ia?aoiay einay), ia i?eaiaeo e
iiyaeaie? a no?iea iiaie no?iee, yoi i?inoi aiaiai?aiiinou i caiene. A no?iea
ii?ii eiaou ionoie neiaie, ii aieuoeinoai i?ia?aii ia aoaao i?aaiieaaaou, ?oi
anou neiaieu iinea iaai. Iai?eia?, no?iea "asdf\000hjkl" aoaao ?anniao?eaaouny
noaiaa?oiuie ooieoeyie, a?iaa strcpy() e strlen(), eae "asdf". Anoaaeyy
?eneaiio? eiinoaioo a no?ieo n iiiiuu? ainuia?e?iie eee oanoiaaoaoa?e?iie caiene
aeaai?acoiii anaaaa eniieuciaaou ?enei ec o?ao oeo?. ?eoaou caienu ainoaoi?ii
o?oaii e aac iaiaoiaeiinoe aaniieieouny i oii, yaeyaony ee neiaie iinea
eiinoaiou oeo?ie eee iao. ?acaa?eoa yoe i?eia?u: char v2[] = "a\xfah\129"; // 'a' '\xfa' 'h' '\12'
'9' Eiaeoa a aeao, ?oi
aaocia?iie oanoiaaoaoa?e?iie caiene ia iaoeiao n 9-aeoiaui aaeoii aoaao
iaainoaoi?ii. Iieu (0) ii?ii oiio?aaeyou eae eiinoaioo e?aiai
oaeiai, ieaaa?uaai eee oeacaoaeuiiai oeia. Ieeaeie iauaeo ia ?aciauaaony ii
aa?ano 0. Oei ioey ii?aaaeyaony eiioaenoii. Iau?ii (ii ia iaycaoaeuii) ii
i?aanoaaeyaony iaai?ii aeoia ana-ioee niioaaonoao?uae aeeiu. Ee??aaia neiai const ii?ao aiaaaeyouny e iienaie? iauaeoa, ?oiau naaeaou yoio
iauaeo eiinoaioie, a ia ia?aiaiiie. Iai?eia?: Iineieueo eiinoaioa ie?aai iaeucy
i?enaieou, iia aie?ia auou eieoeaeece?iaaia. Iienaiea ?aai-ieaoau eae const
aa?aioe?oao, ?oi aai cia?aiea ia eciaieony a iaeanoe aeaeiinoe: Caiaouoa, ?oi const eciaiyao oei, oi anou
ia?aie?eaaao niinia eniieuciaaiey iauaeoa, aianoi oiai, ?oiau caaaaaou niinia
?aciauaiey eiinoaiou. Iiyoiio iai?eia? aiieia ?acoiii, a eiiaaa e iieacii,
iienuaaou ooieoe? eae aica?aua?uo? const: Ooieoe? a?iaa yoie ii?ii auei au eniieuciaaou aey
oiai, ?oiau aaaaou eiio-ieaoau ?eoaou no?ieo, eioi?ay ia ii?ao auou caoa?oa eee
ia?aienaia (yoei eai-oi). N a?oaie noi?iiu, eiiieeyoi? ii?ao ianeieueeie iooyie
ainiieuciaaouny oai, ?oi iauaeo yaeyaony eiinoaioie (eiia?ii, a caaeneiinoe io
oiai, ianeieuei ii niia?aceoaeai). Naiia i?aaeaiia - yoi oi, ?oi aey eiinoaiou
ia o?aaoaony auaaeyou iaiyou, iineieueo eiiieeyoi? ciaao aa cia?aiea. E?iia
oiai, eieoeaeecaoi? eiinoaiou ?anoi (ii ia anaaaa) yaeyaony eiinoaioiui
au?a?aieai, oi anou ii ii?ao auou au?eneai ia noaaee eiiieeyoee. Iaiaei aey
aaeoi?a eiinoaio iau?ii i?eoiaeony auaaeyou iaiyou, iineieueo eiiieeyoi? a iauai
neo?aa ia ii?ao au?eneeou, ia eaeea yeaiaiou aaeoi?a naaeaiu nnueee a
au?a?aieyo. Iaiaei ia iiiaeo iaoeiao aa?a a yoii neo?aa ii?ao ainoeaaouny
iiauoaiea yooaeoeaiinoe iooai ?aciauaiey aaeoi?ia eiinoaio a iaiyou, ainooiio?
oieuei aey ?oaiey. Eniieuciaaiea oeacaoaey aiaeaeaao aaa iauaeoa: nai oeacaoaeu
e oeacuaaaiue iauaeo. Niaa?aiea iienaiey oeacaoaey "i?aoeenii" const aaeaao
iauaeo, ii ia nai oeacaoaeu, eiinoaioie. Iai?eia?: ?oiau iienaou nai oeacaoaeu, a ia oeacuaaaiue iauaeo, eae eiinoaioiue,
eniieucoaony iia?aoey const*. Iai?eia?: ?oiau
naaeaou eiinoaioaie iaa iauaeoa, eo iaa io?ii iienaou const. Iai?eia?: cpc = "ghjk"; // ioeaea Iauaeo, yaey?ueeny eiinoaioie i?e ainooia
e iaio ?a?ac iaei oeacaoaeu, ii?ao auou ia?aiaiiie, eiaaa ainooi inouanoaeyaony
a?oaeie iooyie. Yoi a ?anoiinoe iieacii aey ia?aiao?ia ooieoee. Iin?aanoaii
iienaiey ia?aiao?a oeacaoaey eae const ooieoee cai?auaaony eciaiyou iauaeo, ia
eioi?ue ii oeacuaaao. Iai?eia?: Oeacaoae? ia eiinoaioo ii?ii i?enaaeaaou aa?an ia?aiaiiie,
iineieueo ieeaeiai a?aaa io yoiai auou ia ii?ao. Iaiaei iaeucy i?enaieou aa?an
eiinoaiou oeacaoae?, ia eioi?ue ia auei iaei?aii ia?aie?aiea, iineieueo yoi
iicaieeei au eciaieou cia?aiea iauaeoa. Iai?eia?: int* p3 =
&c; // ioeaea Ia?a?eneaiey enum { ASM, AUTO, BREAK }; ii?aaaeyao o?e oaeuo
eiinoaiou, iacuaaaiu ia?a?eneeoaeyie, e i?enaaeaaao ei cia?aiey. Iineieueo
cia?aiey ia?a?eneeoaeae ii oiie?aie? i?enaaeaa?ony ia?eiay n 0 a ii?yaea
aic?anoaiey, yoi yeaeaaeaioii caiene: enum
keyword { ASM, AUTO, BREAK }; Eiy ia?a?eneaiey noaiiaeony neiiieiii int, a
ia iiaui oeiii. Iienaiea ia?aiaiiie keyword, a ia i?inoi int, ii?ao aaou eae
i?ia?aiienoo, oae e eiiieeyoi?o iianeaceo i oii, ?oi eniieuciaaiea
i?aaiaia?aiiia. Iai?eia?: break; iiao?aaao eiiieeyoi? auaaou i?aaoi?a?aaiea, iineieueo oieuei aaa cia?aiey
keyword ec o?ao eniieuco?ony. Ii?ii oae?a caaaaaou cia?aiey ia?a?eneeoaeae yaii.
Iai?eia?: least_significant=1 // iaeiaiaa cia?eiue #include
"AlexWord.h" #pragma resource "*.dfm" void __fastcall
TForm1::RichEdit1SelectionChange(TObject *Sender) FirstInd->Left = int(RichEdit1->Paragraph-
>FirstIndent*RulerAdj)-4+GutterWid; RichEdit1->Paragraph-
>FirstIndent)*RulerAdj)-4+GutterWid; (RichEdit1->Paragraph-
>RightIndent+GutterWid)*RulerAdj); else
ToolButton17->Down=true; else ToolButton15-
>Down=true; else ToolButton3-
>Down=true; if (RichEdit1->Paragraph->Alignment ==
taLeftJustify) CenterAlign-
>Down=true; RightAlign->Down=true; ToolButton14->Down=true; TTextAttributes *__fastcall TForm1::CurrText(void) FFileName =
LoadStr(sUntitled); void __fastcall TForm1::FileOpen1Execute(TObject
*Sender) FFileName = OpenDialog-
>FileName; RichEdit1->ReadOnly = OpenDialog-
>Options.Contains(ofReadOnly); void __fastcall TForm1::FileSave1Execute(TObject
*Sender) Form1->Caption = SaveDialog->FileName;
} void __fastcall
TForm1::FileSaveAs1Execute(TObject *Sender) { if (MessageDlg(str, mtConfirmation,
TMsgDlgButtons() << mbYes << mbNo << FFileName = SaveDialog->FileName; if (
RichEdit1->Modified ) { { case ID_YES :
FileSave1Execute(this); Close(); void __fastcall TForm1::UndoClick(TObject
*Sender) void __fastcall TForm1::PrintClick(TObject
*Sender) void __fastcall TForm1::Print_SetupClick(TObject
*Sender) FindDialog1->FindText = RichEdit1-
>SelText; int FoundAt, StartPos, ToEnd; StartPos = 0; FoundAt = RichEdit1->FindText(FindDialog1->FindText,
StartPos, ToEnd, TSearchTypes()<< stMatchCase);
RichEdit1->SelLength = FindDialog1->FindText.Length(); if (RichEdit1-
>SelLength == 0) FindDialog1Find(Sender); ReplaceDialog1Replace(Sender); void __fastcall TForm1::N5Click(TObject
*Sender) void __fastcall TForm1::FontDialog1Apply(TObject
*Sender, HWND Wnd) ((TEdit
*)ActiveControl)->Font->Assign(FontDialog1->Font); ((TRichEdit *)ActiveControl)-
>SelAttributes->Assign(FontDialog1->Font); ToolButton8->Visible=false; void __fastcall TForm1::CenterAlignClick(TObject
*Sender) void
__fastcall TForm1::LeftAlignClick(TObject *Sender) void __fastcall
TForm1::RightAlignClick(TObject *Sender) { int iCtr = 1;
Ruler->Caption = (AnsiString)sTmp; OpenDialog->InitialDir =
ExtractFilePath(ParamStr(0)); for (int i = 0; i < Screen->Fonts-
>Count; i++) void __fastcall
TForm1::ToolButton14Click(TObject *Sender) RichEdit1->Paragraph-
>Numbering = TNumberingStyle(nsNone); void __fastcall
TForm1::ComboBox1Change(TObject *Sender) ChasrsetObject =
(TCharsetObject*)ComboBox1->Items->Objects[ComboBox1->ItemIndex]; void __fastcall TForm1::ToolButton15Click(TObject
*Sender) CurrText()->Style = CurrText()->Style << fsBold; void __fastcall TForm1::ToolButton17Click(TObject
*Sender) CurrText()->Style = CurrText()->Style << fsItalic; void __fastcall TForm1::Edit2Change(TObject *Sender) CurrText()->Size = atoi(Edit2->Text.c_str()); if (CurrText()->Style ==CurrText()->Style >>
fsUnderline) CurrText()->Style = CurrText()->Style >>
fsUnderline; TMouseButton Button, TShiftState Shift, int X, int Y)
oTmpLabel->Left = oTmpLabel->Left+X-FDragOfs;
TMouseButton Button, TShiftState Shift, int X, int Y) RichEdit1->Paragraph->FirstIndent = int((FirstInd-
>Left+FDragOfs-GutterWid) / RulerAdj); void __fastcall TForm1::LeftIndMouseUp(TObject
*Sender, RichEdit1->Paragraph->LeftIndent =
int((LeftInd->Left+FDragOfs-GutterWid)/ void
__fastcall TForm1::FirstIndMouseMove(TObject *Sender,
oTmpLabel->Left = oTmpLabel->Left+X-FDragOfs; TMouseButton Button,
TShiftState Shift, int X, int Y) int((Ruler->ClientWidth-RightInd-
>Left+FDragOfs-2) / void __fastcall
TForm1::RulerResize(TObject *Sender) void __fastcall
TForm1::FormPaint(TObject *Sender) SendMessage(RichEdit1-
>Handle, EM_SETRECT, 0, long(&Rct));; void __fastcall
TForm1::FormActivate(TObject
*Sender) void __fastcall TForm1::FormCloseQuery(TObject *Sender,
bool &CanClose) void __fastcall TForm1::NRulerClick(TObject
*Sender) else {Ruler->Visible=false; NRuler-
>Checked=false; Panel1-
>Visible=true; void __fastcall
TForm1::NBarClick(TObject *Sender) else { StatusBar-
>Visible=false;
| |