forked from KolibriOS/kolibrios
CEDIT: some small changes
git-svn-id: svn://kolibrios.org@9175 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e85879654e
commit
50936c312e
@ -99,6 +99,7 @@ pas=$CodeEdit
|
|||||||
pp=$CodeEdit
|
pp=$CodeEdit
|
||||||
lua=$CodeEdit
|
lua=$CodeEdit
|
||||||
ob07=$CodeEdit
|
ob07=$CodeEdit
|
||||||
|
json=$CodeEdit
|
||||||
|
|
||||||
asm=$TinyPad
|
asm=$TinyPad
|
||||||
inc=$TinyPad
|
inc=$TinyPad
|
||||||
|
Binary file not shown.
@ -1,35 +0,0 @@
|
|||||||
Горячие клавиши:
|
|
||||||
|
|
||||||
ctrl+A выделить всё
|
|
||||||
ctrl+C копировать
|
|
||||||
ctrl+V вставить
|
|
||||||
ctrl+X вырезать
|
|
||||||
ctrl+L преобразовать буквы A..Z слева от курсора в a..z
|
|
||||||
ctrl+U преобразовать буквы a..z слева от курсора в A..Z
|
|
||||||
ctrl+F показать панель поиска
|
|
||||||
Esc закрыть панель поиска
|
|
||||||
F3 найти следующий
|
|
||||||
shift+F3 найти предыдущий
|
|
||||||
ctrl+Z отменить
|
|
||||||
ctrl+Y вернуть
|
|
||||||
ctrl+G перейти на строку...
|
|
||||||
ctrl+Del удалить строку
|
|
||||||
ctrl+D дублировать строку
|
|
||||||
ctrl+Up переместить строку вверх
|
|
||||||
ctrl+Down переместить строку вниз
|
|
||||||
|
|
||||||
ctrl+F2 установить/снять метку
|
|
||||||
F2 перейти к метке ниже
|
|
||||||
shift+F2 перейти к метке выше
|
|
||||||
|
|
||||||
ctrl+S сохранить
|
|
||||||
ctrl+O открыть
|
|
||||||
ctrl+N создать новый
|
|
||||||
ctrl+W закрыть файл
|
|
||||||
ctrl+Tab переключиться на следующую вкладку
|
|
||||||
|
|
||||||
ctrl+F9 компилировать
|
|
||||||
F9 выполнить
|
|
||||||
|
|
||||||
перемещение по тексту:
|
|
||||||
(ctrl+)Home, (ctrl+)End, (ctrl+)PageUp, (ctrl+)PageDown
|
|
@ -28,7 +28,7 @@ IMPORT
|
|||||||
RW, Ini, box_lib, Icons, Tabs, Timer;
|
RW, Ini, box_lib, Icons, Tabs, Timer;
|
||||||
|
|
||||||
CONST
|
CONST
|
||||||
header = "CEdit (02-sep-2021)";
|
header = "CEdit (03-sep-2021)";
|
||||||
|
|
||||||
ShellFilter = "";
|
ShellFilter = "";
|
||||||
EditFilter = "SH|ASM|TXT|INC|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON";
|
EditFilter = "SH|ASM|TXT|INC|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON";
|
||||||
@ -185,7 +185,7 @@ VAR
|
|||||||
winWidth, winHeight: INTEGER;
|
winWidth, winHeight: INTEGER;
|
||||||
AppPath, runScript, buildScript, debugScript: RW.tFileName;
|
AppPath, runScript, buildScript, debugScript: RW.tFileName;
|
||||||
OD: OpenDlg.Dialog;
|
OD: OpenDlg.Dialog;
|
||||||
confirm, notFound, search, searchOpened, modified: BOOLEAN;
|
confirm, notFound, menuFindClicked, search, searchOpened, modified: BOOLEAN;
|
||||||
|
|
||||||
switch, closing: BOOLEAN;
|
switch, closing: BOOLEAN;
|
||||||
leftButton: BOOLEAN;
|
leftButton: BOOLEAN;
|
||||||
@ -206,6 +206,8 @@ VAR
|
|||||||
menuView, menuSyntax, menuProgram, menuTools,
|
menuView, menuSyntax, menuProgram, menuTools,
|
||||||
subCurLine, subIndent, subCase, subBookmark: Menu.tMenu;
|
subCurLine, subIndent, subCase, subBookmark: Menu.tMenu;
|
||||||
|
|
||||||
|
menuActive: BOOLEAN;
|
||||||
|
|
||||||
icons: INTEGER;
|
icons: INTEGER;
|
||||||
grayIcons: INTEGER;
|
grayIcons: INTEGER;
|
||||||
|
|
||||||
@ -308,7 +310,11 @@ PROCEDURE NotFound;
|
|||||||
BEGIN
|
BEGIN
|
||||||
IF notFound THEN
|
IF notFound THEN
|
||||||
Message("not found");
|
Message("not found");
|
||||||
notFound := FALSE;
|
IF menuFindClicked THEN
|
||||||
|
menuFindClicked := FALSE
|
||||||
|
ELSE
|
||||||
|
notFound := FALSE
|
||||||
|
END;
|
||||||
SetFocus(FindEdit, TRUE)
|
SetFocus(FindEdit, TRUE)
|
||||||
END
|
END
|
||||||
END NotFound;
|
END NotFound;
|
||||||
@ -329,31 +335,40 @@ BEGIN
|
|||||||
END Replaced;
|
END Replaced;
|
||||||
|
|
||||||
|
|
||||||
|
PROCEDURE drawIcon (icons, idx, x: INTEGER);
|
||||||
|
BEGIN
|
||||||
|
Icons.draw(icons, idx, x + iconPad, btnTop + iconPad)
|
||||||
|
END drawIcon;
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE toolbarIcons;
|
PROCEDURE toolbarIcons;
|
||||||
VAR
|
VAR
|
||||||
x, color: INTEGER;
|
x, color, ico: INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
x := searchLeft + (toolBtnSize + 5)*2;
|
x := searchLeft + (toolBtnSize + 5)*2;
|
||||||
IF text.modified THEN
|
IF text.modified THEN
|
||||||
Icons.draw(icons, 5, x + iconPad, btnTop + iconPad)
|
ico := icons
|
||||||
ELSE
|
ELSE
|
||||||
Icons.draw(grayIcons, 5, x + iconPad, btnTop + iconPad)
|
ico := grayIcons
|
||||||
END;
|
END;
|
||||||
|
drawIcon(ico, 5, x);
|
||||||
|
|
||||||
IF text.edition # NIL THEN
|
IF text.edition # NIL THEN
|
||||||
x := searchLeft + (toolBtnSize + 5)*4 + toolbarDelim*2;
|
x := searchLeft + (toolBtnSize + 5)*4 + toolbarDelim*2;
|
||||||
IF ChangeLog.isFirstGuard(text.edition) THEN
|
IF ChangeLog.isFirstGuard(text.edition) THEN
|
||||||
Icons.draw(grayIcons, 37, x + iconPad, btnTop + iconPad)
|
ico := grayIcons
|
||||||
ELSE
|
ELSE
|
||||||
Icons.draw(icons, 37, x + iconPad, btnTop + iconPad)
|
ico := icons
|
||||||
END;
|
END;
|
||||||
|
drawIcon(ico, 37, x);
|
||||||
|
|
||||||
x := searchLeft + (toolBtnSize + 5)*5 + toolbarDelim*2;
|
x := searchLeft + (toolBtnSize + 5)*5 + toolbarDelim*2;
|
||||||
IF ChangeLog.isLastGuard(text.edition) THEN
|
IF ChangeLog.isLastGuard(text.edition) THEN
|
||||||
Icons.draw(grayIcons, 36, x + iconPad, btnTop + iconPad)
|
ico := grayIcons
|
||||||
ELSE
|
ELSE
|
||||||
Icons.draw(icons, 36, x + iconPad, btnTop + iconPad)
|
ico := icons
|
||||||
END
|
END;
|
||||||
|
drawIcon(ico, 36, x)
|
||||||
END;
|
END;
|
||||||
|
|
||||||
IF T.selected(text) THEN
|
IF T.selected(text) THEN
|
||||||
@ -371,16 +386,19 @@ BEGIN
|
|||||||
|
|
||||||
x := searchLeft + (toolBtnSize + 5)*8 + toolbarDelim*4;
|
x := searchLeft + (toolBtnSize + 5)*8 + toolbarDelim*4;
|
||||||
IF buildScript # "" THEN
|
IF buildScript # "" THEN
|
||||||
Icons.draw(icons, 54, x + iconPad, btnTop + iconPad)
|
ico := icons
|
||||||
ELSE
|
ELSE
|
||||||
Icons.draw(grayIcons, 54, x + iconPad, btnTop + iconPad)
|
ico := grayIcons
|
||||||
END;
|
END;
|
||||||
|
drawIcon(ico, 54, x);
|
||||||
|
|
||||||
INC(x, toolBtnSize + 5);
|
INC(x, toolBtnSize + 5);
|
||||||
IF runScript # "" THEN
|
IF runScript # "" THEN
|
||||||
Icons.draw(icons, 53, x + iconPad, btnTop + iconPad)
|
ico := icons
|
||||||
ELSE
|
ELSE
|
||||||
Icons.draw(grayIcons, 53, x + iconPad, btnTop + iconPad)
|
ico := grayIcons
|
||||||
END
|
END;
|
||||||
|
drawIcon(ico, 53, x)
|
||||||
END toolbarIcons;
|
END toolbarIcons;
|
||||||
|
|
||||||
|
|
||||||
@ -596,18 +614,18 @@ BEGIN
|
|||||||
x := searchLeft;
|
x := searchLeft;
|
||||||
|
|
||||||
drawToolbarBtn(btnNew, x);
|
drawToolbarBtn(btnNew, x);
|
||||||
Icons.draw(icons, 2, x + iconPad, btnTop + iconPad);
|
drawIcon(icons, 2, x);
|
||||||
INC(x, toolBtnSize + 5);
|
INC(x, toolBtnSize + 5);
|
||||||
|
|
||||||
drawToolbarBtn(btnOpen, x);
|
drawToolbarBtn(btnOpen, x);
|
||||||
Icons.draw(icons, 0, x + iconPad, btnTop + iconPad);
|
drawIcon(icons, 0, x);
|
||||||
INC(x, toolBtnSize + 5);
|
INC(x, toolBtnSize + 5);
|
||||||
|
|
||||||
drawToolbarBtn(btnSave, x);
|
drawToolbarBtn(btnSave, x);
|
||||||
INC(x, toolBtnSize + 5 + toolbarDelim);
|
INC(x, toolBtnSize + 5 + toolbarDelim);
|
||||||
|
|
||||||
drawToolbarBtn(btnSearch, x);
|
drawToolbarBtn(btnSearch, x);
|
||||||
Icons.draw(icons, 49, x + iconPad, btnTop + iconPad);
|
drawIcon(icons, 49, x);
|
||||||
INC(x, toolBtnSize + 5 + toolbarDelim);
|
INC(x, toolBtnSize + 5 + toolbarDelim);
|
||||||
|
|
||||||
drawToolbarBtn(btnUndo, x);
|
drawToolbarBtn(btnUndo, x);
|
||||||
@ -1226,8 +1244,9 @@ BEGIN
|
|||||||
IF Menu.opened(menu) THEN
|
IF Menu.opened(menu) THEN
|
||||||
Menu.close(menu)
|
Menu.close(menu)
|
||||||
END;
|
END;
|
||||||
Menu.open(menu, x, y)
|
Menu.open(menu, x, y);
|
||||||
END;
|
menuActive := TRUE
|
||||||
|
END
|
||||||
END ShowMenu;
|
END ShowMenu;
|
||||||
|
|
||||||
|
|
||||||
@ -1255,7 +1274,13 @@ BEGIN
|
|||||||
ELSIF vScroll.Inc THEN
|
ELSIF vScroll.Inc THEN
|
||||||
T.scroll(text, 0, 1)
|
T.scroll(text, 0, 1)
|
||||||
END;
|
END;
|
||||||
repaint;
|
|
||||||
|
IF menuActive THEN
|
||||||
|
draw_window;
|
||||||
|
menuActive := FALSE
|
||||||
|
ELSE
|
||||||
|
repaint
|
||||||
|
END;
|
||||||
|
|
||||||
IF (0 IN K.MouseState()) THEN
|
IF (0 IN K.MouseState()) THEN
|
||||||
WHILE (0 IN K.MouseState()) & (delay > 0) DO
|
WHILE (0 IN K.MouseState()) & (delay > 0) DO
|
||||||
@ -1316,9 +1341,11 @@ BEGIN
|
|||||||
ShowSearchPanel;
|
ShowSearchPanel;
|
||||||
SetFocus(FindEdit, TRUE)
|
SetFocus(FindEdit, TRUE)
|
||||||
|menuFindNext:
|
|menuFindNext:
|
||||||
notFound := ~T.findNext(text, box_lib.check_box_get_value(BKW))
|
notFound := ~T.findNext(text, box_lib.check_box_get_value(BKW));
|
||||||
|
menuFindClicked := TRUE
|
||||||
|menuFindPrev:
|
|menuFindPrev:
|
||||||
notFound := ~T.findNext(text, ~box_lib.check_box_get_value(BKW))
|
notFound := ~T.findNext(text, ~box_lib.check_box_get_value(BKW));
|
||||||
|
menuFindClicked := TRUE
|
||||||
|menuGoto:
|
|menuGoto:
|
||||||
ShowSearchPanel;
|
ShowSearchPanel;
|
||||||
SetFocus(GotoEdit, TRUE)
|
SetFocus(GotoEdit, TRUE)
|
||||||
@ -2112,6 +2139,8 @@ BEGIN
|
|||||||
T.SetPos(text, 0, 0);
|
T.SetPos(text, 0, 0);
|
||||||
confirm := FALSE;
|
confirm := FALSE;
|
||||||
notFound := FALSE;
|
notFound := FALSE;
|
||||||
|
menuFindClicked := FALSE;
|
||||||
|
menuActive := FALSE;
|
||||||
search := FALSE;
|
search := FALSE;
|
||||||
searchOpened := FALSE;
|
searchOpened := FALSE;
|
||||||
createSearchForm;
|
createSearchForm;
|
||||||
|
@ -30,7 +30,7 @@ VAR
|
|||||||
|
|
||||||
winColor*, textColor*, btnColor*, btnTextColor*,
|
winColor*, textColor*, btnColor*, btnTextColor*,
|
||||||
toolbarColor*, scrollColor*, scrollBkColor*,
|
toolbarColor*, scrollColor*, scrollBkColor*,
|
||||||
borderColor*, shadowColor*, (*darkColor*, lightColor*,*)
|
borderColor*, shadowColor*, darkColor*, lightColor*,
|
||||||
caseColor*, disCaseColor*: INTEGER;
|
caseColor*, disCaseColor*: INTEGER;
|
||||||
|
|
||||||
|
|
||||||
@ -339,16 +339,11 @@ PROCEDURE GetSystemColors*;
|
|||||||
VAR
|
VAR
|
||||||
buf: ARRAY 10 OF INTEGER;
|
buf: ARRAY 10 OF INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
toolbarColor := 0DFDFDFH;
|
|
||||||
shadowColor := 0808080H;
|
|
||||||
caseColor := 00000FFH;
|
|
||||||
disCaseColor := 0808080H;
|
|
||||||
|
|
||||||
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];
|
darkColor := buf[2];
|
||||||
lightColor := buf[3];*)
|
lightColor := buf[3];
|
||||||
winColor := buf[5];
|
winColor := buf[5];
|
||||||
textColor := buf[8];
|
textColor := buf[8];
|
||||||
btnColor := buf[6];
|
btnColor := buf[6];
|
||||||
@ -356,6 +351,11 @@ BEGIN
|
|||||||
scrollColor := btnColor;
|
scrollColor := btnColor;
|
||||||
scrollBkColor := winColor;
|
scrollBkColor := winColor;
|
||||||
borderColor := buf[9];
|
borderColor := buf[9];
|
||||||
|
|
||||||
|
toolbarColor := 0DFDFDFH;
|
||||||
|
shadowColor := 0808080H;
|
||||||
|
caseColor := 00000FFH;
|
||||||
|
disCaseColor := 0808080H;
|
||||||
END GetSystemColors;
|
END GetSystemColors;
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +76,10 @@ VAR
|
|||||||
resetTimer: tProc;
|
resetTimer: tProc;
|
||||||
_open: PROCEDURE (m: tMenu; x, y: INTEGER);
|
_open: PROCEDURE (m: tMenu; x, y: INTEGER);
|
||||||
redraw*: BOOLEAN;
|
redraw*: BOOLEAN;
|
||||||
|
(*
|
||||||
|
backColor, foreColor, selBackColor, selForeColor,
|
||||||
|
disBackColor, disForeColor, disSelBackColor, disSelForeColor: INTEGER;
|
||||||
|
*)
|
||||||
|
|
||||||
PROCEDURE isSender* (tid: INTEGER): BOOLEAN;
|
PROCEDURE isSender* (tid: INTEGER): BOOLEAN;
|
||||||
VAR
|
VAR
|
||||||
@ -107,6 +110,17 @@ VAR
|
|||||||
canvas: G.tCanvas;
|
canvas: G.tCanvas;
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
(*
|
||||||
|
backColor := K.winColor;
|
||||||
|
foreColor := K.textColor;
|
||||||
|
selBackColor := K.btnColor;
|
||||||
|
selForeColor := K.btnTextColor;
|
||||||
|
|
||||||
|
disBackColor := backColor;
|
||||||
|
disForeColor := K.darkColor;
|
||||||
|
disSelBackColor := K.lightColor;
|
||||||
|
disSelForeColor := disForeColor;
|
||||||
|
*)
|
||||||
canvas := m.canvas;
|
canvas := m.canvas;
|
||||||
G.SetColor(canvas, backColor);
|
G.SetColor(canvas, backColor);
|
||||||
G.clear(canvas);
|
G.clear(canvas);
|
||||||
|
@ -53,11 +53,10 @@ 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
|
color := K.lightColor
|
||||||
ELSE
|
ELSE
|
||||||
color := K.darkColor*)
|
color := K.winColor
|
||||||
END;
|
END;
|
||||||
color := K.winColor;
|
|
||||||
DEC(x); INC(width);
|
DEC(x); INC(width);
|
||||||
x2 := x + width - 1;
|
x2 := x + width - 1;
|
||||||
y2 := y + height - 1;
|
y2 := y + height - 1;
|
||||||
|
@ -1123,8 +1123,8 @@ BEGIN
|
|||||||
IF text.cursor.X > 0 THEN
|
IF text.cursor.X > 0 THEN
|
||||||
i := text.cursor.X;
|
i := text.cursor.X;
|
||||||
n := leadingSpaces(curLine);
|
n := leadingSpaces(curLine);
|
||||||
IF n < i THEN
|
|
||||||
modify(text);
|
modify(text);
|
||||||
|
IF n < i THEN
|
||||||
move(text, -1);
|
move(text, -1);
|
||||||
delete(text)
|
delete(text)
|
||||||
ELSE
|
ELSE
|
||||||
|
Loading…
Reference in New Issue
Block a user