forked from KolibriOS/kolibrios
sysfuncr.txt: translate 74.11 - 74.16
osupdate: add to ISO icons16.png: update icons of windows, kolibri, floppy cedit: update by akron1 git-svn-id: svn://kolibrios.org@9060 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7a4aed6e11
commit
4f8b740144
@ -677,6 +677,7 @@ tup.append_table(extra_files, {
|
|||||||
{"kolibrios/utils/appearance", PROGS .. "/cmm/appearance/appearance.com"},
|
{"kolibrios/utils/appearance", PROGS .. "/cmm/appearance/appearance.com"},
|
||||||
{"kolibrios/utils/dicty.kex", PROGS .. "/cmm/dicty/dicty.com"},
|
{"kolibrios/utils/dicty.kex", PROGS .. "/cmm/dicty/dicty.com"},
|
||||||
{"kolibrios/utils/notes", PROGS .. "/cmm/notes/notes.com"},
|
{"kolibrios/utils/notes", PROGS .. "/cmm/notes/notes.com"},
|
||||||
|
{"kolibrios/utils/osupdate", PROGS .. "/cmm/misc/osupdate"},
|
||||||
})
|
})
|
||||||
end -- tup.getconfig('NO_CMM') ~= 'full'
|
end -- tup.getconfig('NO_CMM') ~= 'full'
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@ -4616,81 +4616,88 @@ Architecture Software Developer's Manual, Volume 3, Appendix B);
|
|||||||
eax - SF_NETWORK_GET (74)
|
eax - SF_NETWORK_GET (74)
|
||||||
bl - SSF_LINK_STATUS (10)
|
bl - SSF_LINK_STATUS (10)
|
||||||
======================================================================
|
======================================================================
|
||||||
==== Function 74, Subfunction 11, Get TX error packets counter. ======
|
== Функция 74.11, Получить количество пакетов переданных с ошибкой. ==
|
||||||
======================================================================
|
======================================================================
|
||||||
Parameters:
|
Параметры:
|
||||||
* eax = 74 - function number
|
* eax = 74 - номер функции
|
||||||
* bl = 11 - subfunction number
|
* bl = 11 - номер подфункции
|
||||||
* bh = device number
|
* bh = номер устройства
|
||||||
Returned value:
|
Возвращаемое значение:
|
||||||
* eax = Number of erroneous packets received since device start, -1 on error
|
* eax = Количество ошибочных пакетов, переданных с момента запуска
|
||||||
|
устройства, -1 при ошибке
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
---------------------- Константы для регистров: ----------------------
|
||||||
eax - SF_NETWORK_GET (74)
|
eax - SF_NETWORK_GET (74)
|
||||||
bl - SSF_TX_PACKET_ERROR_COUNT (11)
|
bl - SSF_TX_PACKET_ERROR_COUNT (11)
|
||||||
======================================================================
|
======================================================================
|
||||||
=== Function 74, Subfunction 12, Get TX dropped packets counter. =====
|
=== Функция 74.12, Получить число пакетов отброшенных при отправке. ==
|
||||||
======================================================================
|
======================================================================
|
||||||
Parameters:
|
Параметры:
|
||||||
* eax = 74 - function number
|
* eax = 74 - номер функции
|
||||||
* bl = 12 - subfunction number
|
* bl = 12 - номер подфункции
|
||||||
* bh = device number
|
* bh = номер устройства
|
||||||
Returned value:
|
Возвращаемое значение:
|
||||||
* eax = Number of dropped packets since device start, -1 on error
|
* eax = число отброшенных пакетов с момента запуска устройства,
|
||||||
|
-1 при ошибке
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
---------------------- Константы для регистров: ----------------------
|
||||||
eax - SF_NETWORK_GET (74)
|
eax - SF_NETWORK_GET (74)
|
||||||
bl - SSF_TX_PACKET_DROP_COUNT (12)
|
bl - SSF_TX_PACKET_DROP_COUNT (12)
|
||||||
======================================================================
|
======================================================================
|
||||||
==== Function 74, Subfunction 13, Get TX missed packets counter. =====
|
=== Функция 74.13, Получить число пакетов утерянных при отправке. ====
|
||||||
======================================================================
|
======================================================================
|
||||||
Parameters:
|
Параметры:
|
||||||
* eax = 74 - function number
|
* eax = 74 - номер функции
|
||||||
* bl = 13 - subfunction number
|
* bl = 13 - номер подфункции
|
||||||
* bh = device number
|
* bh = номер устройства
|
||||||
Returned value:
|
Возвращаемое значение:
|
||||||
* eax = Number of missed packets since device start, -1 on error
|
* eax = число утерянных пакетов с момента запуска устройства,
|
||||||
|
-1 при ошибке
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
---------------------- Константы для регистров: ----------------------
|
||||||
eax - SF_NETWORK_GET (74)
|
eax - SF_NETWORK_GET (74)
|
||||||
bl - SSF_TX_PACKET_MISS_COUNT (13)
|
bl - SSF_TX_PACKET_MISS_COUNT (13)
|
||||||
======================================================================
|
|
||||||
==== Function 74, Subfunction 14, Get RX error packets counter. ======
|
|
||||||
======================================================================
|
|
||||||
Parameters:
|
|
||||||
* eax = 74 - function number
|
|
||||||
* bl = 14 - subfunction number
|
|
||||||
* bh = device number
|
|
||||||
Returned value:
|
|
||||||
* eax = Number of erroneous packets received since device start, -1 on error
|
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
======================================================================
|
||||||
|
==== Функция 74.14, Получить число пакетов полученных с ошибкой. =====
|
||||||
|
======================================================================
|
||||||
|
Параметры:
|
||||||
|
* eax = 74 - номер функции
|
||||||
|
* bl = 14 - номер подфункции
|
||||||
|
* bh = номер устройства
|
||||||
|
Возвращаемое значение:
|
||||||
|
* eax = число пакетов, полученных с ошибкой с момента запуска
|
||||||
|
устройства, -1 при ошибке
|
||||||
|
|
||||||
|
---------------------- Константы для регистров: ----------------------
|
||||||
eax - SF_NETWORK_GET (74)
|
eax - SF_NETWORK_GET (74)
|
||||||
bl - SSF_RX_PACKET_ERROR_COUNT (14)
|
bl - SSF_RX_PACKET_ERROR_COUNT (14)
|
||||||
======================================================================
|
======================================================================
|
||||||
=== Function 74, Subfunction 15, Get RX dropped packets counter. =====
|
== Функция 74.15, Получить число пакетов отброшенных при получении. ==
|
||||||
======================================================================
|
======================================================================
|
||||||
Parameters:
|
Параметры:
|
||||||
* eax = 74 - function number
|
* eax = 74 - номер функции
|
||||||
* bl = 15 - subfunction number
|
* bl = 15 - номер подфункции
|
||||||
* bh = device number
|
* bh = номер устройства
|
||||||
Returned value:
|
Возвращаемое значение:
|
||||||
* eax = Number of dropped packets since device start, -1 on error
|
* eax = число отброшенных пакетов с момента запуска устройства,
|
||||||
|
-1 при ошибке
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
---------------------- Константы для регистров: ----------------------
|
||||||
eax - SF_NETWORK_GET (74)
|
eax - SF_NETWORK_GET (74)
|
||||||
bl - SSF_RX_PACKET_DROP_COUNT (12)
|
bl - SSF_RX_PACKET_DROP_COUNT (12)
|
||||||
======================================================================
|
======================================================================
|
||||||
==== Function 74, Subfunction 16, Get RX missed packets counter. =====
|
=== Функция 74.16, Получить число пакетов утерянных при получении. ===
|
||||||
======================================================================
|
======================================================================
|
||||||
Parameters:
|
Параметры:
|
||||||
* eax = 74 - function number
|
* eax = 74 - номер функции
|
||||||
* bl = 16 - subfunction number
|
* bl = 16 - номер подфункции
|
||||||
* bh = device number
|
* bh = номер устройства
|
||||||
Returned value:
|
Возвращаемое значение:
|
||||||
* eax = Number of missed packets since device start, -1 on error
|
* eax = число утерянных пакетов с момента запуска устройства,
|
||||||
|
-1 при ошибке
|
||||||
|
|
||||||
---------------------- Constants for registers: ----------------------
|
---------------------- Константы для регистров: ----------------------
|
||||||
eax - SF_NETWORK_GET (74)
|
eax - SF_NETWORK_GET (74)
|
||||||
bl - SSF_RX_PACKET_MISS_COUNT (16)
|
bl - SSF_RX_PACKET_MISS_COUNT (16)
|
||||||
======================================================================
|
======================================================================
|
||||||
|
Binary file not shown.
@ -9,7 +9,7 @@
|
|||||||
ctrl+F показать панель поиска
|
ctrl+F показать панель поиска
|
||||||
Esc скрыть панель поиска
|
Esc скрыть панель поиска
|
||||||
F3 найти следующий
|
F3 найти следующий
|
||||||
Shift+F3 найти предыдущий
|
shift+F3 найти предыдущий
|
||||||
ctrl+Z отменить
|
ctrl+Z отменить
|
||||||
ctrl+Y вернуть
|
ctrl+Y вернуть
|
||||||
ctrl+G перейти на строку...
|
ctrl+G перейти на строку...
|
||||||
@ -18,9 +18,15 @@
|
|||||||
ctrl+Up переместить строку вверх
|
ctrl+Up переместить строку вверх
|
||||||
ctrl+Down переместить строку вниз
|
ctrl+Down переместить строку вниз
|
||||||
|
|
||||||
|
ctrl+F2 установить/снять метку
|
||||||
|
F2 перейти к метке ниже
|
||||||
|
shift+F2 перейти к метке выше
|
||||||
|
|
||||||
ctrl+S сохранить
|
ctrl+S сохранить
|
||||||
ctrl+O открыть
|
ctrl+O открыть
|
||||||
ctrl+N создать новый
|
ctrl+N создать новый
|
||||||
|
ctrl+W закрыть файл
|
||||||
|
ctrl+Tab переключиться на следующую вкладку
|
||||||
|
|
||||||
ctrl+F9 компилировать
|
ctrl+F9 компилировать
|
||||||
F9 выполнить
|
F9 выполнить
|
||||||
|
@ -28,7 +28,7 @@ IMPORT
|
|||||||
RW, Ini, box_lib, Icons, Tabs;
|
RW, Ini, box_lib, Icons, Tabs;
|
||||||
|
|
||||||
CONST
|
CONST
|
||||||
header = "CEdit (10-jul-2021)";
|
header = "CEdit (12-jul-2021)";
|
||||||
|
|
||||||
ShellFilter = "";
|
ShellFilter = "";
|
||||||
EditFilter = "SH|ASM|TXT|INC|OB07|C|CPP|H|PAS|PP|LUA|INI";
|
EditFilter = "SH|ASM|TXT|INC|OB07|C|CPP|H|PAS|PP|LUA|INI";
|
||||||
@ -428,7 +428,7 @@ BEGIN
|
|||||||
G.SetFont(canvas, font);
|
G.SetFont(canvas, font);
|
||||||
T.setCanvas(canvas);
|
T.setCanvas(canvas);
|
||||||
T.resize(canvas.width, canvas.height);
|
T.resize(canvas.width, canvas.height);
|
||||||
Scroll.resize(vScroll, vScroll.xSize, canvas.height - scrollWidth*2 + 1);
|
Scroll.resize(vScroll, vScroll.xSize, canvas.height - scrollWidth*2 + 2);
|
||||||
Scroll.resize(hScroll, canvas.width - scrollWidth*2, hScroll.ySize);
|
Scroll.resize(hScroll, canvas.width - scrollWidth*2, hScroll.ySize);
|
||||||
END resize;
|
END resize;
|
||||||
|
|
||||||
@ -437,6 +437,7 @@ PROCEDURE SearchPanel (left, top: INTEGER);
|
|||||||
VAR
|
VAR
|
||||||
y, right, bottom, color: INTEGER;
|
y, right, bottom, color: INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
|
DEC(top, Tabs.tabHeight);
|
||||||
right := left + EditBox_Width + SEARCH_PADDING*2;
|
right := left + EditBox_Width + SEARCH_PADDING*2;
|
||||||
bottom := top + 395 + btnHeight + SEARCH_PADDING;
|
bottom := top + 395 + btnHeight + SEARCH_PADDING;
|
||||||
color := K.borderColor;
|
color := K.borderColor;
|
||||||
@ -571,7 +572,7 @@ BEGIN
|
|||||||
|
|
||||||
toolbarIcons;
|
toolbarIcons;
|
||||||
|
|
||||||
K.CreateButton(btnUp, LEFT + canvas.width - 1, TOP, scrollWidth - 1, scrollWidth, K.btnColor, 0X);
|
K.CreateButton(btnUp, LEFT + canvas.width - 1, TOP - 1, scrollWidth - 1, scrollWidth, K.btnColor, 0X);
|
||||||
K.DrawText69(LEFT + canvas.width - 1 + (scrollWidth - 6) DIV 2, TOP + (scrollWidth - 9) DIV 2, K.btnTextColor, 18X);
|
K.DrawText69(LEFT + canvas.width - 1 + (scrollWidth - 6) DIV 2, TOP + (scrollWidth - 9) DIV 2, K.btnTextColor, 18X);
|
||||||
K.CreateButton(btnDown, LEFT + canvas.width - 1, TOP + canvas.height - scrollWidth - 1, scrollWidth - 1, scrollWidth, K.btnColor, 0X);
|
K.CreateButton(btnDown, LEFT + canvas.width - 1, TOP + canvas.height - scrollWidth - 1, scrollWidth - 1, scrollWidth, K.btnColor, 0X);
|
||||||
K.DrawText69(LEFT + canvas.width - 1 + (scrollWidth - 6) DIV 2, TOP + canvas.height - scrollWidth + (scrollWidth - 9) DIV 2, K.btnTextColor, 19X);
|
K.DrawText69(LEFT + canvas.width - 1 + (scrollWidth - 6) DIV 2, TOP + canvas.height - scrollWidth + (scrollWidth - 9) DIV 2, K.btnTextColor, 19X);
|
||||||
@ -581,7 +582,7 @@ BEGIN
|
|||||||
K.CreateButton(btnRight, LEFT + canvas.width - scrollWidth - 1, TOP + canvas.height - 1, scrollWidth, scrollWidth - 1, K.btnColor, 0X);
|
K.CreateButton(btnRight, LEFT + canvas.width - scrollWidth - 1, TOP + canvas.height - 1, scrollWidth, scrollWidth - 1, K.btnColor, 0X);
|
||||||
K.DrawText69(LEFT + canvas.width - scrollWidth - 1 + (scrollWidth - 6) DIV 2, TOP + canvas.height - 1 + (scrollWidth - 9) DIV 2 + 1, K.btnTextColor, 1AX);
|
K.DrawText69(LEFT + canvas.width - scrollWidth - 1 + (scrollWidth - 6) DIV 2, TOP + canvas.height - 1 + (scrollWidth - 9) DIV 2 + 1, K.btnTextColor, 1AX);
|
||||||
|
|
||||||
K.PutPixel(LEFT + canvas.width + scrollWidth - 2, TOP, K.winColor);
|
K.PutPixel(LEFT + canvas.width + scrollWidth - 2, TOP - 1, K.winColor);
|
||||||
K.PutPixel(LEFT, TOP + canvas.height + scrollWidth - 2, K.winColor);
|
K.PutPixel(LEFT, TOP + canvas.height + scrollWidth - 2, K.winColor);
|
||||||
|
|
||||||
DrawState(text, width, height);
|
DrawState(text, width, height);
|
||||||
@ -787,19 +788,19 @@ BEGIN
|
|||||||
END Confirm;
|
END Confirm;
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE closeFile (conf: BOOLEAN);
|
PROCEDURE closeFile (conf: BOOLEAN; n: INTEGER);
|
||||||
VAR
|
VAR
|
||||||
i: INTEGER;
|
i: INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
IF text.modified & conf THEN
|
IF text.modified & conf THEN
|
||||||
Confirm
|
Confirm
|
||||||
ELSE
|
ELSE
|
||||||
Tabs.delete(tabs, curText);
|
Tabs.delete(tabs, n);
|
||||||
FOR i := curText + 1 TO textsCount - 1 DO
|
FOR i := n + 1 TO textsCount - 1 DO
|
||||||
texts[i - 1] := texts[i]
|
texts[i - 1] := texts[i]
|
||||||
END;
|
END;
|
||||||
DEC(textsCount);
|
DEC(textsCount);
|
||||||
IF curText = textsCount THEN
|
IF (curText = textsCount) OR (n < curText) THEN
|
||||||
DEC(curText)
|
DEC(curText)
|
||||||
END;
|
END;
|
||||||
IF curText >= 0 THEN
|
IF curText >= 0 THEN
|
||||||
@ -1000,7 +1001,7 @@ BEGIN
|
|||||||
Confirm;
|
Confirm;
|
||||||
cont := FALSE
|
cont := FALSE
|
||||||
ELSE
|
ELSE
|
||||||
closeFile(FALSE);
|
closeFile(FALSE, curText);
|
||||||
repaint
|
repaint
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
@ -1057,7 +1058,7 @@ BEGIN
|
|||||||
saveAll;
|
saveAll;
|
||||||
repaint
|
repaint
|
||||||
|menuClose:
|
|menuClose:
|
||||||
closeFile(TRUE)
|
closeFile(TRUE, curText)
|
||||||
|menuFolder:
|
|menuFolder:
|
||||||
K.Run("/rd/1/File Managers/Eolite", text.fileName)
|
K.Run("/rd/1/File Managers/Eolite", text.fileName)
|
||||||
|menuExit:
|
|menuExit:
|
||||||
@ -1145,6 +1146,7 @@ BEGIN
|
|||||||
getKBState;
|
getKBState;
|
||||||
IF (T.CTRL IN shift) THEN
|
IF (T.CTRL IN shift) THEN
|
||||||
CASE key DIV 65536 OF
|
CASE key DIV 65536 OF
|
||||||
|
|17: menuItem := menuClose
|
||||||
|21: menuItem := menuRedo
|
|21: menuItem := menuRedo
|
||||||
|30: menuItem := menuSelectAll
|
|30: menuItem := menuSelectAll
|
||||||
|33: menuItem := menuSearch
|
|33: menuItem := menuSearch
|
||||||
@ -1207,7 +1209,7 @@ BEGIN
|
|||||||
Menu.AddMenuItem(menu, menuSaveAll, "save all");
|
Menu.AddMenuItem(menu, menuSaveAll, "save all");
|
||||||
Menu.AddMenuItem(menu, menuFolder, "folder");
|
Menu.AddMenuItem(menu, menuFolder, "folder");
|
||||||
Menu.delimiter(menu);
|
Menu.delimiter(menu);
|
||||||
Menu.AddMenuItem(menu, menuClose, "close");
|
Menu.AddMenuItem(menu, menuClose, "close ctrl-W");
|
||||||
Menu.delimiter(menu);
|
Menu.delimiter(menu);
|
||||||
Menu.AddMenuItem(menu, menuExit, "exit");
|
Menu.AddMenuItem(menu, menuExit, "exit");
|
||||||
RETURN Menu.create(menu, MenuItemClick, MenuKeyDown)
|
RETURN Menu.create(menu, MenuItemClick, MenuKeyDown)
|
||||||
@ -1422,7 +1424,7 @@ VAR
|
|||||||
err: INTEGER;
|
err: INTEGER;
|
||||||
fileName, filePath: RW.tFileName;
|
fileName, filePath: RW.tFileName;
|
||||||
cliWidth, cliHeight: INTEGER;
|
cliWidth, cliHeight: INTEGER;
|
||||||
resized: BOOLEAN;
|
resized, middle: BOOLEAN;
|
||||||
firstClickX, firstClickY, time: INTEGER;
|
firstClickX, firstClickY, time: INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
K.GetSystemColors;
|
K.GetSystemColors;
|
||||||
@ -1480,7 +1482,7 @@ BEGIN
|
|||||||
OD := OpenDlg.Create(draw_window, OpenDlg.topen, filePath, "");
|
OD := OpenDlg.Create(draw_window, OpenDlg.topen, filePath, "");
|
||||||
insert(0, text);
|
insert(0, text);
|
||||||
|
|
||||||
vScroll := Scroll.create(scrollWidth, canvas.height - scrollWidth*2 + 1);
|
vScroll := Scroll.create(scrollWidth, canvas.height - scrollWidth*2 + 2);
|
||||||
hScroll := Scroll.create(canvas.width - scrollWidth*2, scrollWidth);
|
hScroll := Scroll.create(canvas.width - scrollWidth*2, scrollWidth);
|
||||||
T.resize(canvas.width, canvas.height);
|
T.resize(canvas.width, canvas.height);
|
||||||
T.SetPos(text, 0, 0);
|
T.SetPos(text, 0, 0);
|
||||||
@ -1526,7 +1528,7 @@ BEGIN
|
|||||||
IF key DIV 65536 = 28 THEN (* Enter *)
|
IF key DIV 65536 = 28 THEN (* Enter *)
|
||||||
save(text);
|
save(text);
|
||||||
IF ~text.modified THEN
|
IF ~text.modified THEN
|
||||||
closeFile(FALSE)
|
closeFile(FALSE, curText)
|
||||||
END;
|
END;
|
||||||
repaint
|
repaint
|
||||||
END;
|
END;
|
||||||
@ -1541,6 +1543,13 @@ BEGIN
|
|||||||
notFound := ~T.findNext(text, box_lib.check_box_get_value(BKW))
|
notFound := ~T.findNext(text, box_lib.check_box_get_value(BKW))
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
ELSIF key DIV 65536 = 60 THEN (* F2 *)
|
||||||
|
key := -1;
|
||||||
|
IF T.CTRL IN shift THEN
|
||||||
|
T.toggleLabel(text)
|
||||||
|
ELSE
|
||||||
|
T.gotoLabel(text, ~(T.SHIFT IN shift))
|
||||||
|
END
|
||||||
ELSIF key DIV 65536 = 67 THEN (* F9 *)
|
ELSIF key DIV 65536 = 67 THEN (* F9 *)
|
||||||
key := -1;
|
key := -1;
|
||||||
IF T.CTRL IN shift THEN
|
IF T.CTRL IN shift THEN
|
||||||
@ -1555,6 +1564,12 @@ BEGIN
|
|||||||
END
|
END
|
||||||
ELSIF (key DIV 65536 = 55) & (key DIV 256 MOD 256 = 52) THEN
|
ELSIF (key DIV 65536 = 55) & (key DIV 256 MOD 256 = 52) THEN
|
||||||
key := -1 (* PrtScn *)
|
key := -1 (* PrtScn *)
|
||||||
|
ELSIF (T.CTRL IN shift) & (key DIV 65536 = 15) THEN (* ctrl+Tab *)
|
||||||
|
key := -1;
|
||||||
|
curText := (curText + 1) MOD textsCount;
|
||||||
|
Tabs.switch(tabs, curText);
|
||||||
|
Switch(texts[curText]);
|
||||||
|
draw_window
|
||||||
ELSIF (T.CTRL IN shift) & (key DIV 65536 = 33) THEN
|
ELSIF (T.CTRL IN shift) & (key DIV 65536 = 33) THEN
|
||||||
key := -1;
|
key := -1;
|
||||||
IF ~search THEN
|
IF ~search THEN
|
||||||
@ -1562,7 +1577,7 @@ BEGIN
|
|||||||
END;
|
END;
|
||||||
EditBox_SetFocus(FindEdit, TRUE);
|
EditBox_SetFocus(FindEdit, TRUE);
|
||||||
EditBox_SetFocus(ReplaceEdit, FALSE);
|
EditBox_SetFocus(ReplaceEdit, FALSE);
|
||||||
EditBox_SetFocus(GotoEdit, FALSE);
|
EditBox_SetFocus(GotoEdit, FALSE)
|
||||||
ELSIF (T.CTRL IN shift) & (key DIV 65536 = 34) THEN
|
ELSIF (T.CTRL IN shift) & (key DIV 65536 = 34) THEN
|
||||||
key := -1;
|
key := -1;
|
||||||
IF ~search THEN
|
IF ~search THEN
|
||||||
@ -1604,6 +1619,8 @@ BEGIN
|
|||||||
ELSE
|
ELSE
|
||||||
IF (T.CTRL IN shift) THEN
|
IF (T.CTRL IN shift) THEN
|
||||||
CASE key DIV 65536 OF
|
CASE key DIV 65536 OF
|
||||||
|
|17: closeFile(TRUE, curText);
|
||||||
|
key := -2
|
||||||
|21: T.redo(text);
|
|21: T.redo(text);
|
||||||
key := -1
|
key := -1
|
||||||
|22: key := ORD("U")
|
|22: key := ORD("U")
|
||||||
@ -1629,20 +1646,38 @@ BEGIN
|
|||||||
key := -1
|
key := -1
|
||||||
END
|
END
|
||||||
END;
|
END;
|
||||||
IF key # -1 THEN
|
IF key >= 0 THEN
|
||||||
T.key(text, key, shift)
|
T.key(text, key, shift)
|
||||||
END
|
END
|
||||||
END;
|
END;
|
||||||
|
IF key # -2 THEN
|
||||||
repaint
|
repaint
|
||||||
|
END
|
||||||
|3:
|
|3:
|
||||||
btn := K.ButtonCode();
|
btn := K.ButtonCode(middle);
|
||||||
CASE btn OF
|
IF (Tabs.btnID <= btn) & (btn <= Tabs.btnID + maxTexts - 1) THEN
|
||||||
|Tabs.btnID .. Tabs.btnID + maxTexts - 1:
|
|
||||||
DEC(btn, Tabs.btnID);
|
DEC(btn, Tabs.btnID);
|
||||||
|
IF middle THEN
|
||||||
|
IF texts[btn].modified THEN
|
||||||
|
curText := btn;
|
||||||
|
Tabs.switch(tabs, btn);
|
||||||
|
Switch(texts[btn]);
|
||||||
|
draw_window;
|
||||||
|
END;
|
||||||
|
closeFile(TRUE, btn)
|
||||||
|
ELSE
|
||||||
curText := btn;
|
curText := btn;
|
||||||
Tabs.switch(tabs, btn);
|
Tabs.switch(tabs, btn);
|
||||||
Switch(texts[btn]);
|
Switch(texts[btn]);
|
||||||
draw_window
|
draw_window
|
||||||
|
END;
|
||||||
|
btn := 0
|
||||||
|
ELSE
|
||||||
|
IF middle THEN
|
||||||
|
btn := 0
|
||||||
|
END
|
||||||
|
END;
|
||||||
|
CASE btn OF
|
||||||
|Tabs.btnID - 1: Tabs.scroll(tabs, -1); switch := TRUE; repaint
|
|Tabs.btnID - 1: Tabs.scroll(tabs, -1); switch := TRUE; repaint
|
||||||
|Tabs.btnID - 2: Tabs.scroll(tabs, +1); switch := TRUE; repaint
|
|Tabs.btnID - 2: Tabs.scroll(tabs, +1); switch := TRUE; repaint
|
||||||
|
|
||||||
@ -1663,12 +1698,12 @@ BEGIN
|
|||||||
|btnTools:
|
|btnTools:
|
||||||
ShowMenu(menuTools)
|
ShowMenu(menuTools)
|
||||||
|btnNo:
|
|btnNo:
|
||||||
closeFile(FALSE);
|
closeFile(FALSE, curText);
|
||||||
repaint
|
repaint
|
||||||
|btnYes:
|
|btnYes:
|
||||||
save(text);
|
save(text);
|
||||||
IF ~text.modified THEN
|
IF ~text.modified THEN
|
||||||
closeFile(FALSE)
|
closeFile(FALSE, curText)
|
||||||
END;
|
END;
|
||||||
repaint
|
repaint
|
||||||
|btnClose:
|
|btnClose:
|
||||||
|
@ -30,7 +30,7 @@ VAR
|
|||||||
|
|
||||||
winColor*, textColor*, btnColor*, btnTextColor*,
|
winColor*, textColor*, btnColor*, btnTextColor*,
|
||||||
toolbarColor*, scrollColor*, scrollBkColor*,
|
toolbarColor*, scrollColor*, scrollBkColor*,
|
||||||
borderColor*, shadowColor*,
|
borderColor*, shadowColor*, (*darkColor*, lightColor*,*)
|
||||||
caseColor*, disCaseColor*: INTEGER;
|
caseColor*, disCaseColor*: INTEGER;
|
||||||
|
|
||||||
|
|
||||||
@ -202,13 +202,17 @@ BEGIN
|
|||||||
END Pause;
|
END Pause;
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE ButtonCode* (): INTEGER;
|
PROCEDURE ButtonCode* (VAR middle: BOOLEAN): INTEGER;
|
||||||
VAR
|
VAR
|
||||||
res: INTEGER;
|
res: INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
|
middle := FALSE;
|
||||||
res := KOSAPI.sysfunc1(17);
|
res := KOSAPI.sysfunc1(17);
|
||||||
IF res MOD 256 = 0 THEN
|
IF res MOD 256 = 0 THEN
|
||||||
res := LSR(res, 8)
|
res := LSR(res, 8)
|
||||||
|
ELSIF res MOD 256 = 4 THEN
|
||||||
|
res := LSR(res, 8);
|
||||||
|
middle := TRUE
|
||||||
ELSE
|
ELSE
|
||||||
res := 0
|
res := 0
|
||||||
END
|
END
|
||||||
@ -343,6 +347,8 @@ BEGIN
|
|||||||
ASSERT(LEN(buf) >= 10);
|
ASSERT(LEN(buf) >= 10);
|
||||||
KOSAPI.sysfunc4(48, 3, SYSTEM.ADR(buf[0]), 40);
|
KOSAPI.sysfunc4(48, 3, SYSTEM.ADR(buf[0]), 40);
|
||||||
|
|
||||||
|
(* darkColor := buf[2];
|
||||||
|
lightColor := buf[3];*)
|
||||||
winColor := buf[5];
|
winColor := buf[5];
|
||||||
textColor := buf[8];
|
textColor := buf[8];
|
||||||
btnColor := buf[6];
|
btnColor := buf[6];
|
||||||
|
@ -31,7 +31,7 @@ TYPE
|
|||||||
tLine* = POINTER TO RECORD (List.tItem)
|
tLine* = POINTER TO RECORD (List.tItem)
|
||||||
ptr: INTEGER;
|
ptr: INTEGER;
|
||||||
length*: INTEGER;
|
length*: INTEGER;
|
||||||
modified*, saved*, temp: BOOLEAN;
|
modified*, saved*, temp, label*: BOOLEAN;
|
||||||
cin*, cout*, pos*: INTEGER
|
cin*, cout*, pos*: INTEGER
|
||||||
END;
|
END;
|
||||||
|
|
||||||
@ -113,6 +113,7 @@ VAR
|
|||||||
line: tLine;
|
line: tLine;
|
||||||
BEGIN
|
BEGIN
|
||||||
NEW(line);
|
NEW(line);
|
||||||
|
line.label := FALSE;
|
||||||
ASSERT(line # NIL);
|
ASSERT(line # NIL);
|
||||||
(* IF ~temp THEN
|
(* IF ~temp THEN
|
||||||
_typedPtr(line)
|
_typedPtr(line)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
(*
|
(*
|
||||||
Copyright 2021 Anton Krotov
|
Copyright 2021 Anton Krotov
|
||||||
|
|
||||||
This file is part of CEdit.
|
This file is part of CEdit.
|
||||||
@ -26,6 +26,7 @@ CONST
|
|||||||
btnID* = 100;
|
btnID* = 100;
|
||||||
tabHeight* = 22;
|
tabHeight* = 22;
|
||||||
curTabHeight = 26;
|
curTabHeight = 26;
|
||||||
|
scrWidth = 10;
|
||||||
|
|
||||||
|
|
||||||
TYPE
|
TYPE
|
||||||
@ -48,21 +49,29 @@ TYPE
|
|||||||
|
|
||||||
PROCEDURE drawTab (t: tTabs; id, x, y, width, height: INTEGER; s: ARRAY OF CHAR);
|
PROCEDURE drawTab (t: tTabs; id, x, y, width, height: INTEGER; s: ARRAY OF CHAR);
|
||||||
VAR
|
VAR
|
||||||
x2, y2: INTEGER;
|
x2, y2, color: INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
IF id = t.current THEN
|
IF id = t.current THEN
|
||||||
INC(height, curTabHeight - tabHeight);
|
INC(height, curTabHeight - tabHeight);
|
||||||
DEC(y, curTabHeight - tabHeight)
|
DEC(y, curTabHeight - tabHeight);
|
||||||
|
(*color := K.lightColor
|
||||||
|
ELSE
|
||||||
|
color := K.darkColor*)
|
||||||
END;
|
END;
|
||||||
|
color := K.winColor;
|
||||||
|
DEC(x); INC(width);
|
||||||
x2 := x + width - 1;
|
x2 := x + width - 1;
|
||||||
y2 := y + height - 1;
|
y2 := y + height - 1;
|
||||||
K.DrawRect(x, y, width, height, K.winColor);
|
|
||||||
|
K.DrawRect(x, y, width, height,color);
|
||||||
K.DrawLine(x, y, x2, y, K.borderColor);
|
K.DrawLine(x, y, x2, y, K.borderColor);
|
||||||
K.DrawLine(x2, y, x2, y2, K.borderColor);
|
K.DrawLine(x2, y, x2, y2, K.borderColor);
|
||||||
K.DrawLine(x2, y2, x, y2, K.borderColor);
|
IF id # t.current THEN
|
||||||
|
K.DrawLine(x2 - 1, y2, x, y2, K.borderColor);
|
||||||
|
END;
|
||||||
K.DrawLine(x, y2, x, y, K.borderColor);
|
K.DrawLine(x, y2, x, y, K.borderColor);
|
||||||
K.DrawText866bk(x + K.fontWidth, y + (height - K.fontHeight) DIV 2, K.textColor, K.winColor, s);
|
K.DrawText866bk(x + K.fontWidth, y + (height - K.fontHeight) DIV 2, K.textColor, color, s);
|
||||||
K.CreateButton(id + ORD({30}) + btnID, x, y - 1, width, height - 1, K.winColor, "");
|
K.CreateButton(id + ORD({30}) + btnID, x, y - 1, width, height - 1, color, "");
|
||||||
END drawTab;
|
END drawTab;
|
||||||
|
|
||||||
|
|
||||||
@ -89,21 +98,22 @@ END Width;
|
|||||||
|
|
||||||
|
|
||||||
PROCEDURE draw* (t: tTabs);
|
PROCEDURE draw* (t: tTabs);
|
||||||
CONST
|
|
||||||
scrWidth = 10;
|
|
||||||
VAR
|
VAR
|
||||||
x, y, xmax, n, width: INTEGER;
|
x, y, xmax, n, width: INTEGER;
|
||||||
item: List.tItem;
|
item: List.tItem;
|
||||||
|
scroll: BOOLEAN;
|
||||||
BEGIN
|
BEGIN
|
||||||
y := t.y;
|
y := t.y;
|
||||||
x := t.x;
|
x := t.x;
|
||||||
K.DrawRect(x, y - (curTabHeight - tabHeight), t.width + 2*scrWidth, t.height + (curTabHeight - tabHeight), K.winColor);
|
K.DrawRect(x, y - (curTabHeight - tabHeight), t.width + 2*scrWidth, t.height + (curTabHeight - tabHeight) - 1, K.winColor);
|
||||||
IF Width(t, 0, t.strings.count - 1) > t.width THEN
|
IF Width(t, 0, t.strings.count - 1) > t.width THEN
|
||||||
INC(x, 2*scrWidth);
|
INC(x, 2*scrWidth);
|
||||||
K.CreateButton(btnID - 1, t.x, t.y, scrWidth, t.height - 1, K.btnColor, "<");
|
K.CreateButton(btnID - 1, t.x, t.y, scrWidth, t.height - 1, K.btnColor, "<");
|
||||||
K.CreateButton(btnID - 2, t.x + scrWidth, t.y, scrWidth, t.height - 1, K.btnColor, ">")
|
K.CreateButton(btnID - 2, t.x + scrWidth, t.y, scrWidth, t.height - 1, K.btnColor, ">");
|
||||||
|
scroll := TRUE
|
||||||
ELSE
|
ELSE
|
||||||
t.first := 0
|
t.first := 0;
|
||||||
|
scroll := FALSE
|
||||||
END;
|
END;
|
||||||
xmax := x + t.width - 1;
|
xmax := x + t.width - 1;
|
||||||
|
|
||||||
@ -120,13 +130,14 @@ BEGIN
|
|||||||
t.first := n
|
t.first := n
|
||||||
END;
|
END;
|
||||||
|
|
||||||
K.DrawRect(x, y, t.width, t.height, K.winColor);
|
K.DrawRect(x, y, t.width, t.height - 1, K.winColor);
|
||||||
|
K.DrawLine(x, y + tabHeight - 1, x + t.width - 1 + 2*scrWidth*(1 - ORD(scroll)), y + tabHeight - 1, K.borderColor);
|
||||||
item := List.getItem(t.strings, t.first);
|
item := List.getItem(t.strings, t.first);
|
||||||
n := t.first;
|
n := t.first;
|
||||||
WHILE (item # NIL) & (x <= xmax) DO
|
WHILE (item # NIL) & (x <= xmax) DO
|
||||||
width := tabWidth(item(tItem));
|
width := tabWidth(item(tItem));
|
||||||
IF x + width - 1 <= xmax THEN
|
IF x + width - 1 <= xmax THEN
|
||||||
drawTab(t, n, x, y, width, t.height, item(tItem).val)
|
drawTab(t, n, x + 1, y, width, t.height, item(tItem).val)
|
||||||
END;
|
END;
|
||||||
INC(n);
|
INC(n);
|
||||||
INC(x, width);
|
INC(x, width);
|
||||||
@ -195,7 +206,7 @@ PROCEDURE setArea* (t: tTabs; x, y, width, height: INTEGER);
|
|||||||
BEGIN
|
BEGIN
|
||||||
t.x := x;
|
t.x := x;
|
||||||
t.y := y;
|
t.y := y;
|
||||||
t.width := width;
|
t.width := width - 2*scrWidth;
|
||||||
t.height := height
|
t.height := height
|
||||||
END setArea;
|
END setArea;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ CONST
|
|||||||
|
|
||||||
mark_width = 2;
|
mark_width = 2;
|
||||||
pad_left = mark_width + 3;
|
pad_left = mark_width + 3;
|
||||||
pad_top = 1;
|
pad_top = 0;
|
||||||
inter = 2;
|
inter = 2;
|
||||||
|
|
||||||
|
|
||||||
@ -1422,6 +1422,36 @@ BEGIN
|
|||||||
END goto;
|
END goto;
|
||||||
|
|
||||||
|
|
||||||
|
PROCEDURE toggleLabel* (text: tText);
|
||||||
|
BEGIN
|
||||||
|
text.curLine.label := ~text.curLine.label
|
||||||
|
END toggleLabel;
|
||||||
|
|
||||||
|
|
||||||
|
PROCEDURE gotoLabel* (text: tText; frw: BOOLEAN);
|
||||||
|
VAR
|
||||||
|
line: tLine;
|
||||||
|
n: INTEGER;
|
||||||
|
BEGIN
|
||||||
|
n := text.cursor.Y;
|
||||||
|
line := text.curLine;
|
||||||
|
IF frw THEN
|
||||||
|
REPEAT
|
||||||
|
line := line.next(tLine);
|
||||||
|
INC(n)
|
||||||
|
UNTIL (line = NIL) OR line.label
|
||||||
|
ELSE
|
||||||
|
REPEAT
|
||||||
|
line := line.prev(tLine);
|
||||||
|
DEC(n)
|
||||||
|
UNTIL (line = NIL) OR line.label
|
||||||
|
END;
|
||||||
|
IF line # NIL THEN
|
||||||
|
IF goto(text, n + 1) THEN END
|
||||||
|
END
|
||||||
|
END gotoLabel;
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE changeCase (text: tText; upper: BOOLEAN);
|
PROCEDURE changeCase (text: tText; upper: BOOLEAN);
|
||||||
VAR
|
VAR
|
||||||
i: INTEGER;
|
i: INTEGER;
|
||||||
@ -1826,13 +1856,13 @@ BEGIN
|
|||||||
|
|
||||||
G.SetColor(canvas, colors.back);
|
G.SetColor(canvas, colors.back);
|
||||||
G.clear(canvas);
|
G.clear(canvas);
|
||||||
|
wNum := charWidth;
|
||||||
IF text.numbers THEN
|
IF text.numbers THEN
|
||||||
numWidth := U.lg10(text.count) + 2;
|
numWidth := U.lg10(text.count) + 2;
|
||||||
wNum := charWidth;
|
|
||||||
xNum := numWidth*wNum - wNum DIV 2;
|
xNum := numWidth*wNum - wNum DIV 2;
|
||||||
setPadding(numWidth*wNum + pad_left, padding.top);
|
setPadding(numWidth*wNum + pad_left, padding.top);
|
||||||
ELSE
|
ELSE
|
||||||
setPadding(pad_left, padding.top)
|
setPadding(pad_left + wNum*2, padding.top)
|
||||||
END;
|
END;
|
||||||
getSelect(text, selBeg, selEnd);
|
getSelect(text, selBeg, selEnd);
|
||||||
y := padding.top + inter DIV 2;
|
y := padding.top + inter DIV 2;
|
||||||
@ -1868,26 +1898,34 @@ BEGIN
|
|||||||
INC(n);
|
INC(n);
|
||||||
INC(cnt)
|
INC(cnt)
|
||||||
END;
|
END;
|
||||||
IF text.numbers THEN
|
|
||||||
G.SetColor(canvas, colors.numback);
|
G.SetColor(canvas, colors.numback);
|
||||||
G.FillRect(canvas, 0, 0, padding.left - pad_left (*+ 1*), size.Y - 1);
|
G.FillRect(canvas, 0, 0, padding.left - pad_left (*+ 1*), size.Y - 1);
|
||||||
|
line := firstLine;
|
||||||
SetColor(colors.numtext, colors.numback);
|
SetColor(colors.numtext, colors.numback);
|
||||||
y := padding.top + inter DIV 2;
|
y := padding.top + inter DIV 2;
|
||||||
n := MIN(text.scroll.Y + textsize.Y + 1, text.count);
|
n := MIN(text.scroll.Y + textsize.Y + 1, text.count);
|
||||||
FOR i := text.scroll.Y + 1 TO n DO
|
FOR i := text.scroll.Y + 1 TO n DO
|
||||||
IF (i MOD 10 = 0) OR (i - 1 = text.cursor.Y) THEN
|
IF text.numbers THEN
|
||||||
|
IF (i MOD 10 = 0) OR (i - 1 = text.cursor.Y) OR line.label THEN
|
||||||
U.int2str(i, s);
|
U.int2str(i, s);
|
||||||
G.TextOut2(canvas, (numWidth - U.lg10(i) - 1)*wNum - wNum DIV 2, y, s, LENGTH(s));
|
G.TextOut2(canvas, (numWidth - U.lg10(i) - 1)*wNum - wNum DIV 2, y, s, LENGTH(s))
|
||||||
ELSIF i MOD 5 = 0 THEN
|
ELSIF i MOD 5 = 0 THEN
|
||||||
G.SetColor(canvas, colors.numtext);
|
G.SetColor(canvas, colors.numtext);
|
||||||
G.HLine(canvas, y - inter DIV 2 + charHeight DIV 2, xNum - wNum, xNum)
|
G.HLine(canvas, y - inter DIV 2 + charHeight DIV 2, xNum - wNum, xNum)
|
||||||
ELSE
|
ELSE
|
||||||
G.SetColor(canvas, colors.numtext);
|
G.SetColor(canvas, colors.numtext);
|
||||||
G.HLine(canvas, y - inter DIV 2 + charHeight DIV 2, xNum - wNum DIV 2, xNum)
|
G.HLine(canvas, y - inter DIV 2 + charHeight DIV 2, xNum - wNum DIV 2, xNum)
|
||||||
END;
|
|
||||||
INC(y, charHeight)
|
|
||||||
END
|
END
|
||||||
END;
|
END;
|
||||||
|
IF line.label THEN
|
||||||
|
FOR x := wNum DIV 2 TO (padding.left - pad_left) - wNum DIV 2 DO
|
||||||
|
G.notVLine(canvas, x, y, y + charHeight - inter);
|
||||||
|
G.xorVLine(canvas, x, y, y + charHeight - inter)
|
||||||
|
END
|
||||||
|
END;
|
||||||
|
NextLine(line);
|
||||||
|
INC(y, charHeight)
|
||||||
|
END;
|
||||||
|
|
||||||
IF text.searchText # "" THEN
|
IF text.searchText # "" THEN
|
||||||
cnt := 0;
|
cnt := 0;
|
||||||
@ -1942,7 +1980,9 @@ BEGIN
|
|||||||
cursor(text)
|
cursor(text)
|
||||||
END;
|
END;
|
||||||
G.SetColor(canvas, K.borderColor);
|
G.SetColor(canvas, K.borderColor);
|
||||||
G.Rect(canvas, 0, 0, size.X - 1, size.Y - 1);
|
G.HLine(canvas, size.Y - 1, 0, size.X - 1);
|
||||||
|
G.VLine(canvas, 0, 0, size.Y - 1);
|
||||||
|
G.VLine(canvas, size.X - 1, 0, size.Y - 1)
|
||||||
END draw;
|
END draw;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user