/programs/develop/cedit/CEDIT |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/develop/cedit/CEDIT.INI |
---|
1,5 → 1,6 |
[settings] |
tab=4 |
line_spacing=2 |
blink=70 |
line_numbers=1 |
auto_indents=1 |
/programs/develop/cedit/SRC/CEdit.ob07 |
---|
28,7 → 28,7 |
RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar; |
CONST |
HEADER = "CEdit (07-may-2023)"; |
HEADER = "CEdit (01-oct-2023)"; |
ShellFilter = ""; |
EditFilter = "sh|inc|txt|asm|ob07|c|cpp|h|pas|pp|lua|ini|json"; |
101,6 → 101,8 |
menuFontSmall = 20; |
menuFontMedium = menuFontSmall + 1; |
menuFontLarge = menuFontMedium + 1; |
menuIncLS = menuFontLarge + 1; |
menuDecLS = menuIncLS + 1; |
menuColors = 1000; |
menuMaxColors = menuColors + Ini.MAX_SECTIONS - 1; |
169,7 → 171,7 |
SHIFT = Menu.SHIFT; |
CTRL = Menu.CTRL; |
ClippingArea = 32 + T.LineSpacing; |
ClippingArea = 32 + T.MaxLineSpacing; |
VAR |
1073,6 → 1075,8 |
Menu.option(menu, menuFontSmall, font = G.fonts[0]); |
Menu.option(menu, menuFontMedium, font = G.fonts[1]); |
Menu.option(menu, menuFontLarge, font = G.fonts[2]); |
Menu.setEnabled(menu, menuIncLS, T.LineSpacing < T.MaxLineSpacing); |
Menu.setEnabled(menu, menuDecLS, T.LineSpacing > 0); |
FOR i := 0 TO Ini.sections.count - 1 DO |
Menu.option(menu, menuColors + i, Ini.curSectionNum = i) |
END |
1258,6 → 1262,9 |
font := G.fonts[Menu.MenuItem - menuFontSmall]; |
Ini.setInt("settings", "font", Menu.MenuItem - menuFontSmall); |
resize |
|menuIncLS, menuDecLS: |
T.setLineSpacing(canvas, T.LineSpacing + ORD(Menu.MenuItem = menuIncLS)*2 - 1); |
Ini.setInt("settings", "line_spacing", T.LineSpacing) |
|menuText: |
T.setLang(text, Languages.langText) |
|menuC: |
1470,6 → 1477,9 |
Menu.AddMenuItem(menu, menuFontMedium, "medium"); |
Menu.AddMenuItem(menu, menuFontLarge, "large"); |
Menu.delimiter(menu); |
Menu.AddMenuItem(menu, menuIncLS, "line spacing ++"); |
Menu.AddMenuItem(menu, menuDecLS, "line spacing --"); |
Menu.delimiter(menu); |
colors := Ini.sections.first(Ini.tSection); |
idx := menuColors; |
2152,7 → 2162,7 |
Tabs.setArea(tabs, LEFT, TOP - Tabs.tabHeight, canvas.width, Tabs.tabHeight); |
font := G.fonts[Ini.font]; |
G.SetFont(canvas, font); |
T.init(resetTimer, Ini.lineNumbers, Ini.autoIndents, Ini.autoBrackets, Ini.trimSpace); |
T.init(resetTimer, Ini.lineNumbers, Ini.autoIndents, Ini.autoBrackets, Ini.trimSpace, Ini.lineSpacing); |
Ini.selectSection(Ini.theme); |
T.setCanvas(canvas); |
/programs/develop/cedit/SRC/Ini.ob07 |
---|
53,7 → 53,7 |
curSection*: tASCIISectionName; |
curSectionNum*: INTEGER; |
blink*, font*, theme*: INTEGER; |
blink*, font*, theme*, lineSpacing*: INTEGER; |
buildScript*, runScript*, debugScript*: RW.tFileName; |
lineNumbers*, autoIndents*, autoBrackets*, trimSpace*: BOOLEAN; |
171,6 → 171,10 |
IF (font < 0) OR (font > 2) THEN |
font := 1 |
END; |
lineSpacing := get_int(IniFileName, "settings", "line_spacing", 2); |
IF (lineSpacing < 0) OR (lineSpacing > Text.MaxLineSpacing) THEN |
lineSpacing := 2 |
END; |
theme := get_int(IniFileName, "settings", "theme", 0); |
IF (theme < 0) OR (theme >= sections.count) THEN |
theme := 0 |
/programs/develop/cedit/SRC/Text.ob07 |
---|
40,7 → 40,7 |
mark_width = 2; |
pad_left = mark_width + 3; |
pad_top = 1; |
LineSpacing* = 2; |
MaxLineSpacing* = 8; |
TYPE |
98,7 → 98,7 |
drawCursor: BOOLEAN; |
padding: RECORD left, top: INTEGER END; |
size, textsize: tPoint; |
charWidth, charHeight: INTEGER; |
charWidth, charHeight, LineSpacing*: INTEGER; |
autoIndents*, lineNumbers*, autoBrackets*, trimSpace*: BOOLEAN; |
2164,9 → 2164,9 |
IF search(text, str, Lang.isCS(text.lang), TRUE) THEN END; |
text.wordSel := FALSE |
END; |
IF (text.lang = Lang.langFasm) & ~selected(text) THEN |
(*IF (text.lang = Lang.langFasm) & ~selected(text) THEN |
fasm_anon(text) |
END |
END*) |
END wordSel; |
3005,8 → 3005,18 |
END empty; |
PROCEDURE init* (pShowCursor: tProcedure; _lineNumbers, _autoIndents, _autoBrackets, _trimSpace: BOOLEAN); |
PROCEDURE setLineSpacing* (canvas: G.tCanvas; value: INTEGER); |
BEGIN |
IF (0 <= value) & (value <= MaxLineSpacing) THEN |
LineSpacing := value; |
setCanvas(canvas) |
END |
END setLineSpacing; |
PROCEDURE init* (pShowCursor: tProcedure; |
_lineNumbers, _autoIndents, _autoBrackets, _trimSpace: BOOLEAN; _lineSpacing: INTEGER); |
BEGIN |
ShowCursor := pShowCursor; |
pdelete := delete; |
drawCursor := TRUE; |
3016,6 → 3026,7 |
trimSpace := _trimSpace; |
padding.left := pad_left; |
padding.top := pad_top; |
LineSpacing := _lineSpacing |
END init; |