<html> <head> <title>Îãëàâëåíèå</title> <meta http-equiv="content-type" content="text/html; charset=WINDOWS-1251"> <style> body { font-size: 15px; font-family: "Bookman Old Style"; color: black; text-align: justify; } h1 { color: green; font-size: 23px; } h2 { color: green; font-size: 21px; } h3 { color: green; font-size: 19px; } h4 { color: #803f00; font-size: 17px; } i { color: #0099cc; } b { color: #0099cc; } p { text-indent: 1em; margin-top: 3px; margin-bottom: 2px; margin-left: 0px; margin-right: 0px; } ol, ul, dl{ margin-top: 3px; margin-bottom: 2px; } pre { padding: 2px; padding-left: 20px; margin-top: 5px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; font-family: "Courier New"; font-size: 15px; color: #004000; background-color: #ffd0ff; } table { font-size: 15px; } </style> </head> <body> <h1>TextEditor âåðñèÿ îò 19.04.2012</h1> <h2>Î ïðîãðàììå</h2> <p>Ïðîãðàììà äëÿ ðàáîòû ñ òåêñòîâûìè ôàéëàìè. Ëèöåíçèÿ ñâîáîäíàÿ.</p> <p><img src="t_edit.png"></p> <p>Âíåøíèé âèä ïðîãðàììû, ñ îòêðûòûì òåêñòîâûì ôàéëîì.</p> <p>Îáñóæäåíèå ïðîãðàììû çäåñü: <a href="http://board.kolibrios.org/viewtopic.php?f=9&t=1222">http://board.kolibrios.org/viewtopic.php?f=9&t=1222</a></p> <h2>Âîçìîæíîñòè</h2> <ul> <li>Îòêðûòèå (Ctrl+O)/Ñîõðàíåíèå ôàéëà.</li> <li>Ðåäàêòèðîâàíèå: Ïîâòîð/Îòìåíà äåéñòâèÿ (Ctrl+Z), Âûðåçàòü/Êîïèðîâàòü (Ctrl+C)/Âñòàâèòü (Ctrl+V), Ïîèñê (Ctrl+F, F3).</li> <li>Âûäåëåíèå öâåòîì ñëîâ, çàäàííûõ â ôàéëå ñèíòàêñèñà. Âûâîä ñïðàâêè ïî íèì, åñëè îíà åñòü (íàæàòèåì F1 êîãäà êóðñîð íà ñëîâå).</li> </ul> <p>Ïîñëå ñîçäàíèÿ ïðîãðàììû TextEditor â Kolibri ñòàëî 2 ïðîãðàììû äëÿ ðàáîòû ñ òåêñòîì, ó êàæäîé èç íèõ åñòü ñâîè ñèëüíûå è ñëàáûå ñòîðîíû. Ïðîâåäó (íå ïîëíîå) ñðàâíåíèå ïðîãðàìì TinyPad è TextEditor:</p> <table border=1> <tr><th>Äåéñòâèÿ</th><th>TinyPad</th><th>TextEditor</th></tr> <tr><td>Ðàáîòà ñ íåñêîëüêèìè äîêóìåíòàìè</td> <td>åñòü</td><td>íåò (âîçìîæíî ñêîðî áóäåò)</td></tr> <tr><td>Ïîääåðæêà êîäèðîâîê KOI8M, OEM</td> <td>åñòü</td><td>íåò</td></tr> <tr><td>Ïîäñâåòêà ñèíòàêñèñà</td> <td>ïîäñâåòêà çàðàíåå çàøèòà â ïðîãðàììó</td><td>ïîäñâåòêà áåðåòñÿ èç ôàéëîâ, êîòîðûå ìîæåò óêàçàòü ïîëüçîâàòåëü. Òàêæå åñòü âîçìîæíîñòü ïîëó÷àòü ñïðàâêó ïî ïîäñâå÷èâàåìûì ñëîâàì (åñëè îíà åñòü â ôàéëàõ ïîäñâåòêè, íàâåñòè êóðñîð íà ñëîâî è íàæàòü F1).</td></tr> <tr><td>Ìíîãîêðàòíàÿ îòìåíà/ïîâòîð äåéñòâèé</td> <td>íåò</td><td>åñòü</td></tr> </table> <h2>Íåêîòîðûå íåäîðàáîòêè</h2> <ul> <li>Ïðè ñîõðàíåíèè ïðîãðàììà íå ñïðàøèâàåò î çàìåíå ñóùåñòâ. ôàéëà.</li> <li>Ñðàáàòûâàëè êíîïêè ïîä ìåíþ, ïîòîìó ÿ èõ ñäâèíóë âëåâî.</li> </ul> <h2>Î ðàáîòå ïðîãðàììû</h2> <p>Ðàçäåë äëÿ ïðîãðàììèñòîâ (è èíòåðåñóþùèõñÿ ëþäåé), â êîòîðîì ðàñêàçàíû íåêîòîðûå èäåè, íà êîòîðûõ ïîñòðîåíà äàííàÿ ïðîãðàììà.</p> <p>Äëÿ ðàáîòû ñ òåêñòîì ïðîãðàììà èñïîëüçóåò ñòðóêòóðû:</p> <pre>struct symbol c db ? ; +0 ñèìâîë col db ? ; +1 öâåò perv dd ? ; +2 next dd ? ; +6 óêàçàòåëè tc dd ? ; +10 âðåì. ñîçäàíèÿ td dd ? ; +14 âðåì. óäàëåíèÿ ends</pre> <p>Êàæäàÿ èç òàêèõ ñòðóêòóð ñîõðàíÿåò îäèí ñèìâîë â ïåðåìåííîé 'c'. Ïåðåìåííûå 'perv' è 'next' õðàíÿò èíäåêñû ïåðâîãî è ñëåäóþùåãî ñèìâîëîâ. Áëàãîäàðÿ ÷åìó òåêñò ñîçäàåòñÿ â âèäå öåïî÷êè ñèìâîëîâ (äâóíàïðàâëåííûé ñïèñîê).</p> <p><b>'tc'</b> - âðåìÿ ñîçäàíèÿ ñèìâîëà, ïðè îòìåíå äåéñòâèÿ òåêñòîâûé ðåäàêòîð "çíàåò" êàêèå ñèìâîëû îòîáðàæàòü, à êàêèå íåò (õîòÿ âñå ñèìâîëû "âèñÿò" â ïàìÿòè).</p> <p><b>'td'</b> - âðåìÿ óäàëåíèÿ ñèìâîëà, çàïîëíÿåòñÿ ïðè óäàëåíèè, ïðè îòìåíå äåéñòâèÿ óäàëåíèÿ ñèìâîëîâ, òåêñò ìîæåò áûòü âîññòàíîâëåí.</p> <p><b>'col'</b> - èñïîëüçóåòñÿ äëÿ öâåòîâîé ðàçìåòêè.</p> <h3>Ôóíêöèè</h3> <p>Èíôîðìàöèþ ïî ôóíêöèÿì ñìîòðèòå â äîêóìåíòàöèè ïî ýëåìåíòó t_edit â áèáëèîòåêå box_lib.obj.</p> <h3>Ôîðìàò ôàéëà ïîäñâåòêè *.syn</h3> <table> <tr><th>Ýëåìåíò</th><th>Ðàçìåð (áàéò)</th></tr> <tr><td>Êîëè÷åñòâî öâåòîâ òåêñòà</td> <td><pre>4</pre></td></tr> <tr><td>Êîëè÷åñòâî ïîäñâå÷èâàåìûõ ñëîâ</td> <td><pre>4</pre></td></tr> <tr><td>Öâåòà èíòåðôåéñà</td> <td><pre>4*6</pre></td></tr> <tr><td>Öâåòà äëÿ òåêñòà</td> <td><pre>4*(êîë. öâ. òåêñòà)</pre></td></tr> <tr><td>Ñòðóêòóðû ñî ñâîéñòâàìè è îïèñàíèÿìè ñëîâ</td> <td><pre>sizeof(TexColViv)*(êîë. ñëîâ)</pre></td></tr> <tr><td>Ðàçäåëèòåëüíûé ñèìâîë, îçíà÷àþùèé íà÷àëî îïèñàíèé ñëîâ (âñåãäà ðàâåí 0)</td> <td><pre>1 áàéò</pre></td></tr> <tr><td>Îïèñàíèÿ ñëîâ (ñòðîêè òåêñòà ñ 0-ìè â êîíöå)</td> <td><pre>(äëèííà ñïðàâî÷íîãî òåêñòà + 1)</pre></td></tr> </table> <h4>Ìàêðîñ äëÿ çàäàíèÿ êëþ÷åâîãî ñëîâà</h4> <p>Ôàéëû ñèíòàêñèñà ìîæíî êîìïèëèðîâàòü ÷åðåç fasm.</p> <pre>macro wo txt,f1,p1,p2,p3{ @@: db txt rb @b+40-$ dd f1+0 db p1 dw p2+0 db p3 }</pre> <h4>Çàìå÷àíèÿ.</h4> <ul> <li>Âñå ñëîâà äîëæíû áûòü ðàñïîëîæåíû â ïîðÿäêå ñëåäîâàíèÿ èõ ASCII êîäîâ. Âîçìîæíî â áóäóùèõ âåðñèÿõ ôîðìàò ôàéëîâ ïîäñâåòêè áóäåò èçìåíåí.</li> </ul> <hr> <h2>Àâòîð</h2> <p>Èãîðü À. (IgorA) - ðàçðàáîòêà ïðîãðàììû.</p> <h2>Ñïàñèáî</h2> <ul> <li>Åâòèõîâ Ìàêñèì (Maxxxx32) - ýëåìåíò EditBox.</li> <li>Àëåêñåé Òåïëîâ (Lrz) - ýëåìåíò EditBox, ìàêðîñ load_library.</li> <li>Mario79 - ýëåìåíòû: ñêðîëëèíãè, ìåíþ, OpenDial.</li> <li>Diamond - çà ïðîãðàììó KlbrInWin, è ïîìîùü ïðè íàïèñàíèè ïðîãðàììû.</li> <li>Insolor - çà òåñòèðîâàíèå ïðîãðàììû íà îøèáêè.</li> <li>Leency è äðóãèì, êòî ïîìîãàë íà ôîðóìå ñîâåòàìè.</li> </ul> </body> </html>