icons16.png: update folder and sys icons
cedit: new version by akron1 eolite: fix scroll git-svn-id: svn://kolibrios.org@8762 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d63e24c6da
commit
a443da65df
Binary file not shown.
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.5 KiB |
@ -7,6 +7,7 @@ ShowDeviceName=1
|
||||
RealFileNamesCase=1
|
||||
InfoAfterCopy=0
|
||||
ShowStatusBar=1
|
||||
LineHeight=20
|
||||
|
||||
[Kiv]
|
||||
Next=PgDn
|
||||
|
@ -284,7 +284,7 @@ void Sort_by_Name(int a, b) // for the first call: a = 0, b = sizeof(mas) - 1
|
||||
|
||||
void SelectList_DrawLine(dword i)
|
||||
{
|
||||
int yyy, list_last;
|
||||
int yyy;
|
||||
|
||||
cur = select_list.first + i;
|
||||
strcpy(#temp_filename, io.dir.position(files_mas[cur]));
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
// 70.5 - get volume info and label
|
||||
|
||||
#define TITLE "Eolite File Manager 4.5"
|
||||
#define ABOUT_TITLE "EOLITE 4.5"
|
||||
#define TITLE "Eolite File Manager 4.51"
|
||||
#define ABOUT_TITLE "EOLITE 4.51"
|
||||
|
||||
#ifndef AUTOBUILD
|
||||
#include "lang.h--"
|
||||
@ -276,7 +276,7 @@ void main()
|
||||
if (getElementSelectedFlag(files.cur_y) == false) selected_count = 0; //on redraw selection would be flashed, see [L001]
|
||||
EventShowListMenu();
|
||||
}
|
||||
break;
|
||||
//break;
|
||||
}
|
||||
|
||||
if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y-17) && (mouse.y<files.y)
|
||||
@ -740,7 +740,7 @@ void Line_ReDraw(dword bgcol, filenum){
|
||||
file_name_off,
|
||||
file_size=0,
|
||||
y=filenum*files.item_h+files.y,
|
||||
icon_y = files.item_h-icon_size/2+1+y;
|
||||
icon_y = files.item_h-icon_size/2+y;
|
||||
BDVK file;
|
||||
char full_path[4096];
|
||||
char label_file_name[4096];
|
||||
|
@ -42,8 +42,7 @@ void about_dialog()
|
||||
about_x = -strlen(ABOUT_TITLE)*18+about_form.cwidth/2;
|
||||
WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE);
|
||||
WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE);
|
||||
DrawRectangle3D(0,154,about_form.cwidth,1,sc.work_dark,sc.work_light);
|
||||
WriteTextLines(7,163,0x90,sc.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n2008 - 2020",20);
|
||||
WriteTextLines(73,163,0x90,sc.work_text," By Leency\nand KolibriOS Team\n 2008-2021",20);
|
||||
#ifdef LANG_RUS
|
||||
DrawStandartCaptButton(60,about_form.cheight-38,11,"ˆáâ®à¨ï à §à ¡®âª¨");
|
||||
#endif
|
||||
|
@ -166,7 +166,7 @@ void LoadIniSettings()
|
||||
Form.left = ini.GetInt("WinX", 200);
|
||||
Form.top = ini.GetInt("WinY", 50);
|
||||
Form.width = ini.GetInt("WinW", 550);
|
||||
Form.height = ini.GetInt("WinH", 506);
|
||||
Form.height = ini.GetInt("WinH", 503);
|
||||
ini.GetString("DefaultPath", #path, 4096, "/rd/1");
|
||||
ini.GetString("DefaultPath", #path_start, 4096, "/rd/1");
|
||||
path_start_ed.size = path_start_ed.pos = strlen(#path_start);
|
||||
|
Binary file not shown.
@ -48,7 +48,7 @@ KW3 =
|
||||
|
||||
[lang_C]
|
||||
KW1 = auto,break,case,char,const,continue,default,do,double,else,enum,extern,float,for,goto,if,int,long,register,return,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile,while
|
||||
KW2 = #define,#error,#include,#elif,#if,#line,#else,#ifdef,#pragma,#endif,#ifndef,#undef
|
||||
KW2 = define,error,include,elif,if,line,else,ifdef,pragma,endif,ifndef,undef
|
||||
KW3 =
|
||||
|
||||
[lang_Lua]
|
||||
|
@ -20,17 +20,17 @@
|
||||
MODULE CEdit;
|
||||
|
||||
IMPORT
|
||||
SYSTEM, OpenDlg, K := KolibriOS,
|
||||
OpenDlg, K := KolibriOS,
|
||||
U := Utils, Lines, Menu, List,
|
||||
G := Graph, T := Text, E := Encodings,
|
||||
CB := Clipboard, Languages,
|
||||
ChangeLog, Scroll,
|
||||
RW, Ini, box_lib, LibImg;
|
||||
RW, Ini, box_lib, Icons;
|
||||
|
||||
CONST
|
||||
header = "CEdit (24-may-2021)";
|
||||
header = "CEdit (03-jun-2021)";
|
||||
|
||||
ShellFilter = "";(* "SH|"; *)
|
||||
ShellFilter = "";
|
||||
EditFilter = "SH|ASM|TXT|INC|OB07|C|CPP|H|PAS|PP|LUA|INI";
|
||||
|
||||
fontWidth = K.fontWidth;
|
||||
@ -73,7 +73,6 @@ CONST
|
||||
|
||||
MainMenuHeight = fontHeight + 7;
|
||||
|
||||
btnColor = 0CCCCCCH;
|
||||
btnHeight = 25;
|
||||
btnWidth = 75;
|
||||
btnTop = MainMenuHeight + 3;
|
||||
@ -84,9 +83,7 @@ CONST
|
||||
RIGHT = scrollWidth - 2;
|
||||
BOTTOM = scrollWidth + 25;
|
||||
|
||||
winColor = K.winColor; minWinWidth = 635; minWinHeight = 542;
|
||||
|
||||
toolbarColor = 0DFDFDFH;
|
||||
minWinWidth = 635; minWinHeight = 542;
|
||||
|
||||
SEARCH_PADDING = 10;
|
||||
searchLeft = 10;
|
||||
@ -121,7 +118,6 @@ CONST
|
||||
menuExit = 15;
|
||||
|
||||
menuNumbers = 20;
|
||||
(*menuSettings = 21;*)
|
||||
menuColors = 1000;
|
||||
menuMaxColors = menuColors + Ini.MAX_SECTIONS - 1;
|
||||
|
||||
@ -148,6 +144,7 @@ CONST
|
||||
menuPipet = 70;
|
||||
menuSysFunc = 71;
|
||||
|
||||
|
||||
VAR
|
||||
canvas: G.tCanvas;
|
||||
font: G.tFont;
|
||||
@ -190,7 +187,7 @@ BEGIN
|
||||
U.int2str(col, s2);
|
||||
U.append(s1, ": ");
|
||||
U.append(s1, s2);
|
||||
K.DrawText(LEFT, y, 0, s1)
|
||||
K.DrawText(LEFT, y, K.textColor, s1)
|
||||
END WritePos;
|
||||
|
||||
|
||||
@ -206,11 +203,6 @@ BEGIN
|
||||
ELSE
|
||||
edit.flags := ORD(BITS(edit.flags) - {1})
|
||||
END;
|
||||
(* IF value THEN
|
||||
edit.color := 0FFFFFFH
|
||||
ELSE
|
||||
edit.color := 0D0D0D0H
|
||||
END;*)
|
||||
IF search THEN
|
||||
box_lib.edit_box_draw(edit)
|
||||
END
|
||||
@ -241,9 +233,9 @@ BEGIN
|
||||
right := left + width - 1;
|
||||
x := minWidth DIV 2 + left;
|
||||
y := (height - fontHeight) DIV 2 + top;
|
||||
K.DrawRect(left, top, width, height, winColor);
|
||||
K.DrawRect(left, top, width, height, K.winColor);
|
||||
Rect(left, top, right, bottom, borderColor);
|
||||
K.DrawText(x, y, 0, s);
|
||||
K.DrawText(x, y, K.textColor, s);
|
||||
END Message;
|
||||
|
||||
|
||||
@ -276,15 +268,6 @@ BEGIN
|
||||
END Replaced;
|
||||
|
||||
|
||||
PROCEDURE icons16 (icons, n, x, y: INTEGER);
|
||||
VAR
|
||||
sizeX, sizeY, data: INTEGER;
|
||||
BEGIN
|
||||
LibImg.GetInf(icons, sizeX, sizeY, data);
|
||||
K.DrawImage(data + 16*16*3*n, 16, 16, x, y)
|
||||
END icons16;
|
||||
|
||||
|
||||
PROCEDURE toolbarIcons;
|
||||
CONST
|
||||
iconPad = (toolBtnSize - 16) DIV 2;
|
||||
@ -293,56 +276,51 @@ VAR
|
||||
BEGIN
|
||||
x := searchLeft + (toolBtnSize + 5)*2;
|
||||
IF text.modified THEN
|
||||
icons16(icons, 5, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(icons, 5, x + iconPad, btnTop + iconPad)
|
||||
ELSE
|
||||
icons16(grayIcons, 5, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(grayIcons, 5, x + iconPad, btnTop + iconPad)
|
||||
END;
|
||||
|
||||
IF text.edition # NIL THEN
|
||||
x := searchLeft + (toolBtnSize + 5)*4 + toolbarDelim*2;
|
||||
IF ChangeLog.isFirstGuard(text.edition) THEN
|
||||
icons16(grayIcons, 37, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(grayIcons, 37, x + iconPad, btnTop + iconPad)
|
||||
ELSE
|
||||
icons16(icons, 37, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(icons, 37, x + iconPad, btnTop + iconPad)
|
||||
END;
|
||||
|
||||
x := searchLeft + (toolBtnSize + 5)*5 + toolbarDelim*2;
|
||||
IF ChangeLog.isLastGuard(text.edition) THEN
|
||||
icons16(grayIcons, 36, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(grayIcons, 36, x + iconPad, btnTop + iconPad)
|
||||
ELSE
|
||||
icons16(icons, 36, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(icons, 36, x + iconPad, btnTop + iconPad)
|
||||
END
|
||||
(* ELSE
|
||||
x := searchLeft + (toolBtnSize + 5)*4;
|
||||
icons16(grayIcons, 37, x + iconPad, btnTop + iconPad);
|
||||
x := searchLeft + (toolBtnSize + 5)*5;
|
||||
icons16(grayIcons, 36, x + iconPad, btnTop + iconPad)*)
|
||||
END;
|
||||
|
||||
IF T.selected(text) THEN
|
||||
color := 00000FFH
|
||||
color := K.caseColor
|
||||
ELSE
|
||||
color := 0808080H
|
||||
color := K.disCaseColor
|
||||
END;
|
||||
|
||||
x := searchLeft + (toolBtnSize + 5)*6 + toolbarDelim*3;
|
||||
K.DrawRect(x, btnTop, toolBtnSize, toolBtnSize, toolbarColor);
|
||||
K.DrawRect(x, btnTop, toolBtnSize, toolBtnSize, K.toolbarColor);
|
||||
K.DrawText69(x + (toolBtnSize - 12) DIV 2, btnTop + (toolBtnSize - 9) DIV 2 + 2, color, "AB");
|
||||
INC(x, toolBtnSize + 5);
|
||||
K.DrawRect(x, btnTop, toolBtnSize, toolBtnSize, toolbarColor);
|
||||
K.DrawRect(x, btnTop, toolBtnSize, toolBtnSize, K.toolbarColor);
|
||||
K.DrawText69(x + (toolBtnSize - 12) DIV 2, btnTop + (toolBtnSize - 9) DIV 2 + 2, color, "ab");
|
||||
|
||||
x := searchLeft + (toolBtnSize + 5)*8 + toolbarDelim*4;
|
||||
IF buildScript # "" THEN
|
||||
icons16(icons, 54, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(icons, 54, x + iconPad, btnTop + iconPad)
|
||||
ELSE
|
||||
icons16(grayIcons, 54, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(grayIcons, 54, x + iconPad, btnTop + iconPad)
|
||||
END;
|
||||
INC(x, toolBtnSize + 5);
|
||||
IF runScript # "" THEN
|
||||
icons16(icons, 53, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(icons, 53, x + iconPad, btnTop + iconPad)
|
||||
ELSE
|
||||
icons16(grayIcons, 53, x + iconPad, btnTop + iconPad)
|
||||
Icons.draw(grayIcons, 53, x + iconPad, btnTop + iconPad)
|
||||
END
|
||||
END toolbarIcons;
|
||||
|
||||
@ -350,9 +328,9 @@ END toolbarIcons;
|
||||
PROCEDURE WriteModified (x, y: INTEGER);
|
||||
BEGIN
|
||||
modified := text.modified;
|
||||
K.DrawRect(x, TOP + canvas.height + scrollWidth - 1, 9*fontWidth, BOTTOM - scrollWidth + 1, winColor);
|
||||
K.DrawRect(x, TOP + canvas.height + scrollWidth - 1, 9*fontWidth, BOTTOM - scrollWidth + 1, K.winColor);
|
||||
IF modified THEN
|
||||
K.DrawText866(x, y, 0, "modified")
|
||||
K.DrawText866(x, y, K.textColor, "modified")
|
||||
END
|
||||
END WriteModified;
|
||||
|
||||
@ -370,7 +348,7 @@ BEGIN
|
||||
T.draw(text);
|
||||
K.ClientSize(width, height);
|
||||
y := height - (BOTTOM - scrollWidth) + (BOTTOM - scrollWidth - 16) DIV 2;
|
||||
K.DrawRect(LEFT, TOP + canvas.height + scrollWidth - 1, 16*fontWidth, BOTTOM - scrollWidth + 1, winColor);
|
||||
K.DrawRect(LEFT, TOP + canvas.height + scrollWidth - 1, 16*fontWidth, BOTTOM - scrollWidth + 1, K.winColor);
|
||||
WritePos(y);
|
||||
|
||||
IF modified # text.modified THEN
|
||||
@ -421,7 +399,7 @@ VAR
|
||||
BEGIN
|
||||
right := left + EditBox_Width + SEARCH_PADDING*2;
|
||||
bottom := top + 395 + btnHeight + SEARCH_PADDING;
|
||||
color := T.colors.border;
|
||||
color := K.borderColor;
|
||||
Rect(left, top, right, bottom, color);
|
||||
K.CreateButton(btnCloseFind, right - 20, top, 20, 20, 0EF999FH, "");
|
||||
K.DrawLine(right - 14, top + 5, right - 5, top + 14, 0FFFFFFH);
|
||||
@ -433,11 +411,11 @@ BEGIN
|
||||
|
||||
INC(top, 15);
|
||||
INC(left, SEARCH_PADDING);
|
||||
K.DrawText866(left, top, 0, "find");
|
||||
K.DrawText866(left, top + 55, 0, "replace with");
|
||||
K.DrawText866(left, top, K.textColor, "find");
|
||||
K.DrawText866(left, top + 55, K.textColor, "replace with");
|
||||
K.CreateButton(btnFindEdit + ORD({30}), left, top + 20, EditBox_Width, fontHeight + 5, 0, "");
|
||||
K.CreateButton(btnReplaceEdit + ORD({30}), left, top + 75, EditBox_Width, fontHeight + 5, 0, "");
|
||||
K.DrawText866(left, top + 330, 0, "go to line");
|
||||
K.DrawText866(left, top + 330, K.textColor, "go to line");
|
||||
K.CreateButton(btnGotoEdit + ORD({30}), left, top + 350, EditBox_Width, fontHeight + 5, 0, "");
|
||||
BKW.top_s := BKW.top_s MOD 65536 + (top + 110) * 65536;
|
||||
CS.top_s := CS.top_s MOD 65536 + (top + 140) * 65536;
|
||||
@ -454,66 +432,19 @@ BEGIN
|
||||
box_lib.edit_box_draw(FindEdit);
|
||||
box_lib.edit_box_draw(ReplaceEdit);
|
||||
box_lib.edit_box_draw(GotoEdit);
|
||||
box_lib.check_box_draw2(BKW); K.DrawText866(left + 20, top + 110, 0, "backward");
|
||||
box_lib.check_box_draw2(CS); K.DrawText866(left + 20, top + 140, 0, "match case");
|
||||
box_lib.check_box_draw2(WH); K.DrawText866(left + 20, top + 170, 0, "whole word");
|
||||
box_lib.check_box_draw2(BKW); K.DrawText866(left + 20, top + 110, K.textColor, "backward");
|
||||
box_lib.check_box_draw2(CS); K.DrawText866(left + 20, top + 140, K.textColor, "match case");
|
||||
box_lib.check_box_draw2(WH); K.DrawText866(left + 20, top + 170, K.textColor, "whole word");
|
||||
y := top + 200;
|
||||
K.CreateButton(btnFindNext, left, y, btnWidth, btnHeight, btnColor, "next"); INC(y, btnHeight + 10);
|
||||
K.CreateButton(btnReplace, left, y, btnWidth, btnHeight, btnColor, "replace"); INC(y, btnHeight + 10);
|
||||
K.CreateButton(btnReplaceAll, left, y, btnWidth + 5*fontWidth - 2, btnHeight, btnColor, "replace all");
|
||||
K.CreateButton(btnGoto, left, top + 380, btnWidth, btnHeight, btnColor, "go");
|
||||
K.CreateButton(btnFindNext, left, y, btnWidth, btnHeight, K.btnColor, "next"); INC(y, btnHeight + 10);
|
||||
K.CreateButton(btnReplace, left, y, btnWidth, btnHeight, K.btnColor, "replace"); INC(y, btnHeight + 10);
|
||||
K.CreateButton(btnReplaceAll, left, y, btnWidth + 5*fontWidth - 2, btnHeight, K.btnColor, "replace all");
|
||||
K.CreateButton(btnGoto, left, top + 380, btnWidth, btnHeight, K.btnColor, "go");
|
||||
END SearchPanel;
|
||||
|
||||
|
||||
PROCEDURE gray (icons: INTEGER);
|
||||
VAR
|
||||
sizeX, sizeY, data, x, y: INTEGER;
|
||||
b, g, r, gr: BYTE;
|
||||
BEGIN
|
||||
LibImg.GetInf(icons, sizeX, sizeY, data);
|
||||
FOR y := 0 TO sizeY - 1 DO
|
||||
FOR x := 0 TO sizeX - 1 DO
|
||||
SYSTEM.GET8(data, b);
|
||||
SYSTEM.GET8(data + 1, g);
|
||||
SYSTEM.GET8(data + 2, r);
|
||||
gr := (r + g + b) DIV 3;
|
||||
SYSTEM.PUT8(data, gr);
|
||||
SYSTEM.PUT8(data + 1, gr);
|
||||
SYSTEM.PUT8(data + 2, gr);
|
||||
INC(data, 3);
|
||||
END
|
||||
END
|
||||
END gray;
|
||||
|
||||
|
||||
PROCEDURE iconsBackColor (icons: INTEGER);
|
||||
VAR
|
||||
sizeX, sizeY, data, x, y: INTEGER;
|
||||
b, g, r: BYTE;
|
||||
BEGIN
|
||||
LibImg.GetInf(icons, sizeX, sizeY, data);
|
||||
FOR y := 0 TO sizeY - 1 DO
|
||||
FOR x := 0 TO sizeX - 1 DO
|
||||
SYSTEM.GET8(data, b);
|
||||
SYSTEM.GET8(data + 1, g);
|
||||
SYSTEM.GET8(data + 2, r);
|
||||
IF b + g + r = 765 THEN
|
||||
b := toolbarColor MOD 256;
|
||||
g := toolbarColor DIV 256 MOD 256;
|
||||
r := toolbarColor DIV 65536 MOD 256
|
||||
END;
|
||||
SYSTEM.PUT8(data, b);
|
||||
SYSTEM.PUT8(data + 1, g);
|
||||
SYSTEM.PUT8(data + 2, r);
|
||||
INC(data, 3);
|
||||
END
|
||||
END
|
||||
END iconsBackColor;
|
||||
|
||||
|
||||
PROCEDURE draw_window;
|
||||
CONST
|
||||
selMenuColor = 0CCE8FFH;
|
||||
iconPad = (toolBtnSize - 16) DIV 2;
|
||||
VAR
|
||||
width, height, x, y: INTEGER;
|
||||
@ -521,10 +452,10 @@ VAR
|
||||
|
||||
PROCEDURE drawToolbarBtn (id, x: INTEGER);
|
||||
BEGIN
|
||||
K.DrawRect(x, btnTop, toolBtnSize, toolBtnSize, toolbarColor);
|
||||
K.DrawLine(x, btnTop + toolBtnSize, x + toolBtnSize, btnTop + toolBtnSize, 0808080H);
|
||||
K.DrawLine(x + toolBtnSize, btnTop, x + toolBtnSize, btnTop + toolBtnSize, 0808080H);
|
||||
K.CreateButton(id + ORD({30}), x, btnTop, toolBtnSize, toolBtnSize, btnColor, "");
|
||||
K.DrawRect(x, btnTop, toolBtnSize, toolBtnSize, K.toolbarColor);
|
||||
K.DrawLine(x, btnTop + toolBtnSize, x + toolBtnSize, btnTop + toolBtnSize, K.shadowColor);
|
||||
K.DrawLine(x + toolBtnSize, btnTop, x + toolBtnSize, btnTop + toolBtnSize, K.shadowColor);
|
||||
K.CreateButton(id + ORD({30}), x, btnTop, toolBtnSize, toolBtnSize, K.btnColor, "");
|
||||
END drawToolbarBtn;
|
||||
|
||||
|
||||
@ -533,26 +464,27 @@ VAR
|
||||
menuColor, n: INTEGER;
|
||||
BEGIN
|
||||
IF menu.tid # 0 THEN
|
||||
menuColor := selMenuColor
|
||||
menuColor := K.selMenuColor
|
||||
ELSE
|
||||
menuColor := winColor
|
||||
menuColor := K.winColor
|
||||
END;
|
||||
n := LENGTH(caption);
|
||||
K.DrawRect(x, 0, n*fontWidth + 2, MainMenuHeight, menuColor);
|
||||
K.CreateButton(btn + ORD({30}), x, 0, n*fontWidth + 2, MainMenuHeight, btnColor, caption);
|
||||
K.CreateButton(btn + ORD({30}), x, 0, n*fontWidth + 2, MainMenuHeight, K.btnColor, "");
|
||||
K.DrawText(x + 1, (MainMenuHeight - fontHeight) DIV 2 + 1, K.textColor, caption)
|
||||
END drawMainMenu;
|
||||
|
||||
|
||||
BEGIN
|
||||
K.BeginDraw;
|
||||
K.CreateWindow(50 + K.GetTickCount() MOD 128, 50 + K.GetTickCount() MOD 128, winWidth, winHeight, winColor, 73H, 0, 0, header);
|
||||
K.CreateWindow(50 + K.GetTickCount() MOD 128, 50 + K.GetTickCount() MOD 128, winWidth, winHeight, K.winColor, 73H, 0, 0, header);
|
||||
IF (text # NIL) & ~K.RolledUp() THEN
|
||||
confirm := FALSE;
|
||||
K.ClientSize(width, height);
|
||||
|
||||
K.DrawRect(0, 0, width, TOP, winColor);
|
||||
K.DrawRect(0, 0, LEFT, height, winColor);
|
||||
K.DrawRect(LEFT + canvas.width - 1, TOP + canvas.height - 1, scrollWidth, scrollWidth, winColor);
|
||||
K.DrawRect(0, 0, width, TOP, K.winColor);
|
||||
K.DrawRect(0, 0, LEFT, height, K.winColor);
|
||||
K.DrawRect(LEFT + canvas.width - 1, TOP + canvas.height - 1, scrollWidth, scrollWidth, K.winColor);
|
||||
|
||||
drawMainMenu(menuFile, menuFileX, btnFile, "file");
|
||||
drawMainMenu(menuEdit, menuEditX, btnEdit, "edit");
|
||||
@ -565,18 +497,18 @@ BEGIN
|
||||
x := searchLeft;
|
||||
|
||||
drawToolbarBtn(btnNew, x);
|
||||
icons16(icons, 2, x + iconPad, btnTop + iconPad);
|
||||
Icons.draw(icons, 2, x + iconPad, btnTop + iconPad);
|
||||
INC(x, toolBtnSize + 5);
|
||||
|
||||
drawToolbarBtn(btnOpen, x);
|
||||
icons16(icons, 0, x + iconPad, btnTop + iconPad);
|
||||
Icons.draw(icons, 0, x + iconPad, btnTop + iconPad);
|
||||
INC(x, toolBtnSize + 5);
|
||||
|
||||
drawToolbarBtn(btnSave, x);
|
||||
INC(x, toolBtnSize + 5 + toolbarDelim);
|
||||
|
||||
drawToolbarBtn(btnSearch, x);
|
||||
icons16(icons, 49, x + iconPad, btnTop + iconPad);
|
||||
Icons.draw(icons, 49, x + iconPad, btnTop + iconPad);
|
||||
INC(x, toolBtnSize + 5 + toolbarDelim);
|
||||
|
||||
drawToolbarBtn(btnUndo, x);
|
||||
@ -586,45 +518,46 @@ BEGIN
|
||||
INC(x, toolBtnSize + 5 + toolbarDelim);
|
||||
|
||||
drawToolbarBtn(btnUpper, x);
|
||||
K.DrawText69(x + (toolBtnSize - 12) DIV 2, btnTop + (toolBtnSize - 9) DIV 2 + 2, 0, "AB");
|
||||
INC(x, toolBtnSize + 5);
|
||||
|
||||
drawToolbarBtn(btnLower, x);
|
||||
K.DrawText69(x + (toolBtnSize - 12) DIV 2, btnTop + (toolBtnSize - 9) DIV 2 + 2, 0, "ab");
|
||||
INC(x, toolBtnSize + 5 + toolbarDelim);
|
||||
|
||||
drawToolbarBtn(btnBuild, x);
|
||||
icons16(icons, 54, x + iconPad, btnTop + iconPad);
|
||||
Icons.draw(icons, 54, x + iconPad, btnTop + iconPad);
|
||||
INC(x, toolBtnSize + 5);
|
||||
|
||||
drawToolbarBtn(btnRun, x);
|
||||
icons16(icons, 53, x + iconPad, btnTop + iconPad);
|
||||
Icons.draw(icons, 53, x + iconPad, btnTop + iconPad);
|
||||
INC(x, toolBtnSize + 5);
|
||||
|
||||
K.CreateButton(btnUp, LEFT + canvas.width - 1, TOP, scrollWidth - 1, scrollWidth, btnColor, 0X);
|
||||
K.DrawText69(LEFT + canvas.width - 1 + (scrollWidth - 6) DIV 2, TOP + (scrollWidth - 9) DIV 2, 0, 18X);
|
||||
K.CreateButton(btnDown, LEFT + canvas.width - 1, TOP + canvas.height - scrollWidth - 1, scrollWidth - 1, scrollWidth, btnColor, 0X);
|
||||
K.DrawText69(LEFT + canvas.width - 1 + (scrollWidth - 6) DIV 2, TOP + canvas.height - scrollWidth + (scrollWidth - 9) DIV 2, 0, 19X);
|
||||
K.CreateButton(btnUp, LEFT + canvas.width - 1, TOP, 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.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.CreateButton(btnLeft, LEFT, TOP + canvas.height - 1, scrollWidth, scrollWidth - 1, btnColor, 0X);
|
||||
K.DrawText69(LEFT + (scrollWidth - 6) DIV 2, TOP + canvas.height - 1 + (scrollWidth - 9) DIV 2 + 1, 0, 1BX);
|
||||
K.CreateButton(btnRight, LEFT + canvas.width - scrollWidth - 1, TOP + canvas.height - 1, scrollWidth, scrollWidth - 1, btnColor, 0X);
|
||||
K.DrawText69(LEFT + canvas.width - scrollWidth - 1 + (scrollWidth - 6) DIV 2, TOP + canvas.height - 1 + (scrollWidth - 9) DIV 2 + 1, 0, 1AX);
|
||||
K.CreateButton(btnLeft, LEFT, TOP + canvas.height - 1, scrollWidth, scrollWidth - 1, K.btnColor, 0X);
|
||||
K.DrawText69(LEFT + (scrollWidth - 6) DIV 2, TOP + canvas.height - 1 + (scrollWidth - 9) DIV 2 + 1, K.btnTextColor, 1BX);
|
||||
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.PutPixel(LEFT + canvas.width + scrollWidth - 2, TOP, K.winColor);
|
||||
K.PutPixel(LEFT, TOP + canvas.height + scrollWidth - 2, K.winColor);
|
||||
|
||||
y := (btnHeight - fontHeight) DIV 2 + btnTop;
|
||||
CASE text.enc OF
|
||||
|E.UTF8: K.DrawText866(width - 6*fontWidth, y, 0, "UTF-8")
|
||||
|E.UTF8BOM: K.DrawText866(width - 10*fontWidth, y, 0, "UTF-8-BOM")
|
||||
|E.CP866: K.DrawText866(width - 6*fontWidth, y, 0, "CP866")
|
||||
|E.W1251: K.DrawText866(width - 13*fontWidth, y, 0, "Windows-1251")
|
||||
|E.UTF8: K.DrawText866(width - 6*fontWidth, y, K.textColor, "UTF-8")
|
||||
|E.UTF8BOM: K.DrawText866(width - 10*fontWidth, y, K.textColor, "UTF-8-BOM")
|
||||
|E.CP866: K.DrawText866(width - 6*fontWidth, y, K.textColor, "CP866")
|
||||
|E.W1251: K.DrawText866(width - 13*fontWidth, y, K.textColor, "Windows-1251")
|
||||
END;
|
||||
IF search THEN
|
||||
SearchPanel(searchLeft, TOP)
|
||||
END;
|
||||
|
||||
y := height - (BOTTOM - scrollWidth) + (BOTTOM - scrollWidth - 16) DIV 2;
|
||||
K.DrawRect(LEFT + 16*fontWidth, TOP + canvas.height + scrollWidth - 1, width - LEFT - 25*fontWidth, BOTTOM - scrollWidth + 1, winColor);
|
||||
K.DrawText866(LEFT + 16*fontWidth, y, 0, text.fileName);
|
||||
K.DrawRect(LEFT + 16*fontWidth, TOP + canvas.height + scrollWidth - 1, width - LEFT - 25*fontWidth, BOTTOM - scrollWidth + 1, K.winColor);
|
||||
K.DrawText866(LEFT + 16*fontWidth, y, K.textColor, text.fileName);
|
||||
WriteModified(width - 9*fontWidth, y);
|
||||
repaint
|
||||
END;
|
||||
@ -763,11 +696,11 @@ BEGIN
|
||||
top := (canvas.height - height) DIV 2 + TOP;
|
||||
right := left + width - 1;
|
||||
bottom := top + height - 1;
|
||||
K.DrawRect(left, top, width, height, winColor);
|
||||
K.DrawRect(left, top, width, height, K.winColor);
|
||||
Rect(left, top, right, bottom, lineColor);
|
||||
K.DrawText866(left + (width - 10*fontWidth) DIV 2, top + 10, 0, "save file?");
|
||||
K.CreateButton(btnYes, left + 10, top + 35, btnWidth, btnHeight, btnColor, "yes");
|
||||
K.CreateButton(btnNo, left + 20 + btnWidth, top + 35, btnWidth, btnHeight, btnColor, "no");
|
||||
K.DrawText866(left + (width - 10*fontWidth) DIV 2, top + 10, K.textColor, "save file?");
|
||||
K.CreateButton(btnYes, left + 10, top + 35, btnWidth, btnHeight, K.btnColor, "yes");
|
||||
K.CreateButton(btnNo, left + 20 + btnWidth, top + 35, btnWidth, btnHeight, K.btnColor, "no");
|
||||
END Confirm;
|
||||
|
||||
|
||||
@ -1119,9 +1052,8 @@ VAR
|
||||
idx: INTEGER;
|
||||
BEGIN
|
||||
menu := List.create(NIL);
|
||||
Menu.AddMenuItem(menu, menuNumbers, "line numbers");
|
||||
Menu.AddMenuItem(menu, menuNumbers, "line numbers");
|
||||
Menu.delimiter(menu);
|
||||
(*Menu.AddMenuItem(menu, menuSettings, "settings");*)
|
||||
|
||||
colors := Ini.sections.first(Ini.tSection);
|
||||
idx := menuColors;
|
||||
@ -1239,7 +1171,6 @@ BEGIN
|
||||
Menu.setCheck(menu, menuWin1251, ORD(text.enc = E.W1251)*2);
|
||||
INC(x, menuEncodingX)
|
||||
ELSIF menu = menuView THEN
|
||||
(*Menu.setEnabled(menu, menuSettings, FALSE);*)
|
||||
Menu.setCheck(menu, menuNumbers, ORD(text.numbers));
|
||||
FOR i := 0 TO Ini.sections.count - 1 DO
|
||||
Menu.setCheck(menu, menuColors + i, ORD(Ini.curSectionNum = i)*2)
|
||||
@ -1280,20 +1211,16 @@ VAR
|
||||
scroll: INTEGER;
|
||||
err: INTEGER;
|
||||
fileName, filePath: RW.tFileName;
|
||||
cliWidth, cliHeight: INTEGER;
|
||||
resized: BOOLEAN;
|
||||
firstClickX, firstClickY, time: INTEGER;
|
||||
BEGIN
|
||||
K.GetSystemColors;
|
||||
Icons.get(icons, grayIcons);
|
||||
modified := FALSE;
|
||||
mainTID := K.ThreadID();
|
||||
K.SetIPC(IPC);
|
||||
U.ptr2str(K.GetName(), AppPath);
|
||||
(* U.getPath(AppPath, fileName);
|
||||
U.append8(fileName, "/Icons16.png");*)
|
||||
icons := LibImg.LoadFromFile("/rd/1/Icons16.png", 16, y);
|
||||
grayIcons := LibImg.LoadFromFile("/rd/1/Icons16.png", 16, y);
|
||||
gray(grayIcons);
|
||||
iconsBackColor(icons);
|
||||
iconsBackColor(grayIcons);
|
||||
Ini.load(AppPath);
|
||||
K.SetEventsMask({0, 1, 2, 5, 6, 31});
|
||||
LeftButtonUp;
|
||||
@ -1301,6 +1228,8 @@ BEGIN
|
||||
shift := {};
|
||||
winWidth := minWinWidth;
|
||||
winHeight := minWinHeight;
|
||||
cliWidth := winWidth;
|
||||
cliHeight := winHeight;
|
||||
LEFT := 10;
|
||||
canvas := G.CreateCanvas(winWidth - (LEFT + RIGHT + 10), winHeight - (TOP + BOTTOM + 4) - K.SkinHeight());
|
||||
font := G.CreateFont(1, "", {});
|
||||
@ -1330,8 +1259,8 @@ BEGIN
|
||||
END;
|
||||
OD := OpenDlg.Create(draw_window, OpenDlg.topen, filePath, "");
|
||||
|
||||
vScroll := Scroll.create(scrollWidth, canvas.height - scrollWidth*2 + 1, 0A0A0A0H, winColor);
|
||||
hScroll := Scroll.create(canvas.width - scrollWidth*2, scrollWidth, 0A0A0A0H, winColor);
|
||||
vScroll := Scroll.create(scrollWidth, canvas.height - scrollWidth*2 + 1);
|
||||
hScroll := Scroll.create(canvas.width - scrollWidth*2, scrollWidth);
|
||||
T.resize(canvas.width, canvas.height);
|
||||
T.SetPos(text, 0, 0);
|
||||
confirm := FALSE;
|
||||
@ -1351,9 +1280,13 @@ BEGIN
|
||||
WHILE TRUE DO
|
||||
CASE K.WaitForEvent() OF
|
||||
|1:
|
||||
K.GetSystemColors;
|
||||
Icons.get(icons, grayIcons);
|
||||
IF ~K.RolledUp() THEN
|
||||
K.WinSize(width, height);
|
||||
IF (width # winWidth) OR (height # winHeight) THEN
|
||||
K.ClientSize(width, height);
|
||||
IF (width # cliWidth) OR (height # cliHeight) THEN
|
||||
cliWidth := width;
|
||||
cliHeight := height;
|
||||
resize;
|
||||
resized := TRUE
|
||||
END;
|
||||
|
@ -21,7 +21,7 @@ MODULE Ini;
|
||||
|
||||
IMPORT
|
||||
|
||||
KOSAPI, SYSTEM, RW, Text, Utils, File, List, Languages;
|
||||
KOSAPI, SYSTEM, RW, Text, Utils, File, List, Languages, KolibriOS;
|
||||
|
||||
|
||||
CONST
|
||||
@ -141,7 +141,7 @@ BEGIN
|
||||
key3 := getColor("key3", 0008080H);
|
||||
|
||||
Text.setColors(text, back, seltext, selback, modified, saved, curline, numtext, numback,
|
||||
comment, string, num, delim, key1, key2, key3, 808080H);
|
||||
comment, string, num, delim, key1, key2, key3);
|
||||
END selectSection;
|
||||
|
||||
|
||||
|
@ -23,10 +23,30 @@ IMPORT
|
||||
KOSAPI, SYSTEM;
|
||||
|
||||
CONST
|
||||
(*
|
||||
winColor* = 0EEEEEEH;
|
||||
textColor* = 0000000H;
|
||||
btnColor* = 0CCCCCCH;
|
||||
btnTextColor* = 0000000H;
|
||||
toolbarColor* = 0DFDFDFH;
|
||||
scrollColor* = 0A0A0A0H;
|
||||
scrollBkColor* = winColor;
|
||||
borderColor* = 0808080H;
|
||||
selMenuColor* = 0CCE8FFH;
|
||||
shadowColor* = 0808080H;
|
||||
caseColor* = 00000FFH;
|
||||
disCaseColor* = 0808080H;
|
||||
*)
|
||||
fontWidth* = 8;
|
||||
fontHeight* = 16;
|
||||
|
||||
VAR
|
||||
|
||||
winColor*, textColor*, btnColor*, btnTextColor*,
|
||||
toolbarColor*, scrollColor*, scrollBkColor*,
|
||||
borderColor*, selMenuColor*, shadowColor*,
|
||||
caseColor*, disCaseColor*: INTEGER;
|
||||
|
||||
|
||||
PROCEDURE GetCommandLine* (): INTEGER;
|
||||
RETURN KOSAPI.GetCommandLine()
|
||||
@ -154,7 +174,7 @@ BEGIN
|
||||
KOSAPI.sysfunc5(8, LSL(Left, 16) + Width, LSL(Top, 16) + Height, id, Color);
|
||||
x := Left + (Width - fontWidth * LENGTH(Caption)) DIV 2;
|
||||
y := Top + (Height - fontHeight) DIV 2 + 1;
|
||||
DrawText(x, y, 0, Caption)
|
||||
DrawText(x, y, btnTextColor, Caption)
|
||||
END CreateButton;
|
||||
|
||||
|
||||
@ -298,4 +318,41 @@ BEGIN
|
||||
END SendIPC;
|
||||
|
||||
|
||||
PROCEDURE PutPixel* (x, y, color: INTEGER);
|
||||
BEGIN
|
||||
KOSAPI.sysfunc4(1, x, y, color)
|
||||
END PutPixel;
|
||||
|
||||
|
||||
PROCEDURE GetSystemColors*;
|
||||
VAR
|
||||
buf: ARRAY 10 OF INTEGER;
|
||||
BEGIN
|
||||
(* winColor := 0EEEEEEH;
|
||||
textColor := 0000000H;
|
||||
btnColor := 0CCCCCCH;
|
||||
btnTextColor := 0000000H;
|
||||
scrollColor := 0A0A0A0H;
|
||||
scrollBkColor := winColor;
|
||||
borderColor := 0808080H;
|
||||
*)
|
||||
selMenuColor := 0CCE8FFH;
|
||||
toolbarColor := 0DFDFDFH;
|
||||
shadowColor := 0808080H;
|
||||
caseColor := 00000FFH;
|
||||
disCaseColor := 0808080H;
|
||||
|
||||
ASSERT(LEN(buf) >= 10);
|
||||
KOSAPI.sysfunc4(48, 3, SYSTEM.ADR(buf[0]), 40);
|
||||
|
||||
winColor := buf[5];
|
||||
textColor := buf[8];
|
||||
btnColor := buf[6];
|
||||
btnTextColor := buf[7];
|
||||
scrollColor := btnColor;
|
||||
scrollBkColor := winColor;
|
||||
borderColor := buf[9];
|
||||
END GetSystemColors;
|
||||
|
||||
|
||||
END KolibriOS.
|
@ -319,7 +319,7 @@ BEGIN
|
||||
END comments;
|
||||
|
||||
|
||||
PROCEDURE EnterKW (s: ARRAY OF CHAR; VAR KW: tKeyWords);
|
||||
PROCEDURE EnterKW (s: ARRAY OF CHAR; VAR KW: tKeyWords; CPrep: BOOLEAN);
|
||||
CONST
|
||||
SPACE = 20X; CR = 0DX; LF = 0AX; TAB = 9X; COMMA = ",";
|
||||
VAR
|
||||
@ -333,7 +333,8 @@ BEGIN
|
||||
k := KW.cnt;
|
||||
i := 0;
|
||||
REPEAT
|
||||
j := 0;
|
||||
KW.words[k, 0] := "#";
|
||||
j := ORD(CPrep);
|
||||
WHILE (s[i] # 0X) & ~delim(s[i]) DO
|
||||
KW.words[k, j] := WCHR(ORD(s[i]));
|
||||
INC(i);
|
||||
@ -360,8 +361,8 @@ BEGIN
|
||||
KW[i].cnt := 0;
|
||||
key[2] := CHR(ORD("1") + i);
|
||||
getStr(lang, key, s);
|
||||
EnterKW(s, KW[i])
|
||||
END;
|
||||
EnterKW(s, KW[i], (lang = "lang_C") & (i = 1))
|
||||
END
|
||||
END loadKW;
|
||||
|
||||
|
||||
|
@ -48,7 +48,6 @@ TYPE
|
||||
END;
|
||||
|
||||
tMenu* = POINTER TO RECORD
|
||||
(*stack: POINTER TO RECORD stk: ARRAY 250000 OF INTEGER END;*)
|
||||
tid*: INTEGER;
|
||||
winX, winY, width*, height*: INTEGER;
|
||||
selItem, cliItem: INTEGER;
|
||||
@ -163,7 +162,7 @@ VAR
|
||||
item: List.tItem;
|
||||
BEGIN
|
||||
item := List.getItem(m.items, i);
|
||||
IF item(tItem).enabled THEN
|
||||
IF (item # NIL) & item(tItem).enabled THEN
|
||||
m.click(m, item(tItem).id);
|
||||
exit(m)
|
||||
END
|
||||
@ -304,10 +303,6 @@ BEGIN
|
||||
IF m.tid = 0 THEN
|
||||
m.winX := x;
|
||||
m.winY := y;
|
||||
(* DISPOSE(m.stack);
|
||||
NEW(m.stack);
|
||||
SYSTEM.PUT(SYSTEM.ADR(m.stack.stk[LEN(m.stack.stk) - 1]), m);
|
||||
lastTID := K.CreateThread(SYSTEM.ADR(window), m.stack.stk);*)
|
||||
SYSTEM.PUT(SYSTEM.ADR(stack[LEN(stack) - 1]), m);
|
||||
lastTID := K.CreateThread(SYSTEM.ADR(window), stack);
|
||||
m.tid := lastTID
|
||||
@ -319,7 +314,6 @@ PROCEDURE close* (m: tMenu);
|
||||
BEGIN
|
||||
IF m.tid # 0 THEN
|
||||
K.ExitID(m.tid);
|
||||
(*DISPOSE(m.stack);*)
|
||||
m.tid := 0
|
||||
END
|
||||
END close;
|
||||
@ -346,7 +340,6 @@ BEGIN
|
||||
m.height := items.count*fontHeight - 2;
|
||||
m.font := G.CreateFont(1, "", {});
|
||||
m.canvas := G.CreateCanvas(m.width + 1, m.height + 1);
|
||||
(*m.stack := NIL;*)
|
||||
G.SetFont(m.canvas, m.font);
|
||||
RETURN m
|
||||
END create;
|
||||
|
@ -26,6 +26,7 @@ IMPORT
|
||||
RW, Search,
|
||||
E := Encodings,
|
||||
CB := Clipboard,
|
||||
K := KolibriOS,
|
||||
ChangeLog,
|
||||
Lang := Languages;
|
||||
|
||||
@ -91,7 +92,7 @@ VAR
|
||||
ShowCursor: PROCEDURE;
|
||||
|
||||
colors*: RECORD
|
||||
text, back, seltext, selback, modified, saved, curline, numtext, numback, border*: INTEGER;
|
||||
text, back, seltext, selback, modified, saved, curline, numtext, numback: INTEGER;
|
||||
comment, string, num, delim, key1, key2, key3: INTEGER
|
||||
END;
|
||||
canvas: G.tCanvas;
|
||||
@ -766,7 +767,7 @@ BEGIN
|
||||
ELSIF lang = Lang.langIni THEN
|
||||
|
||||
IF depth = 0 THEN
|
||||
IF c = ";" THEN
|
||||
IF (c = ";") OR (c = "#") THEN
|
||||
PrintLex(text, line, i, n, y, colors.comment, backColor);
|
||||
i := n
|
||||
ELSIF c = '"' THEN
|
||||
@ -1851,7 +1852,7 @@ BEGIN
|
||||
IF drawCursor THEN
|
||||
cursor(text)
|
||||
END;
|
||||
G.SetColor(canvas, colors.border);
|
||||
G.SetColor(canvas, K.borderColor);
|
||||
G.Rect(canvas, 0, 0, size.X - 1, size.Y - 1);
|
||||
END draw;
|
||||
|
||||
@ -1890,7 +1891,7 @@ END create;
|
||||
|
||||
|
||||
PROCEDURE setColors* (text, back, seltext, selback, modified, saved, curline, numtext, numback,
|
||||
comment, string, num, delim, key1, key2, key3, border: INTEGER);
|
||||
comment, string, num, delim, key1, key2, key3: INTEGER);
|
||||
BEGIN
|
||||
colors.text := text;
|
||||
colors.back := back;
|
||||
@ -1908,7 +1909,6 @@ BEGIN
|
||||
colors.key1 := key1;
|
||||
colors.key2 := key2;
|
||||
colors.key3 := key3;
|
||||
colors.border := border;
|
||||
END setColors;
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
MODULE Scroll;
|
||||
|
||||
IMPORT G := Graph;
|
||||
IMPORT G := Graph, K := KolibriOS;
|
||||
|
||||
TYPE
|
||||
|
||||
@ -27,7 +27,6 @@ TYPE
|
||||
vertical, mouse: BOOLEAN;
|
||||
canvas: G.tCanvas;
|
||||
xSize*, ySize*, pos, mousePos: INTEGER;
|
||||
color, bkColor: INTEGER;
|
||||
value*, maxVal*: INTEGER
|
||||
END;
|
||||
|
||||
@ -50,21 +49,25 @@ BEGIN
|
||||
pos := 0
|
||||
END;
|
||||
canvas := scroll.canvas;
|
||||
G.SetColor(canvas, scroll.bkColor);
|
||||
G.SetColor(canvas, K.scrollBkColor);
|
||||
G.clear(canvas);
|
||||
G.SetColor(canvas, 0808080H);
|
||||
G.SetColor(canvas, K.borderColor);
|
||||
G.Rect(canvas, 0, 0, scroll.xSize - 1, scroll.ySize - 1);
|
||||
G.SetColor(canvas, scroll.color);
|
||||
G.SetColor(canvas, K.scrollColor);
|
||||
DEC(b, 2);
|
||||
IF scroll.vertical THEN
|
||||
G.FillRect(canvas, 1, pos + 1, b, pos + b);
|
||||
G.SetColor(canvas, 0404040H);
|
||||
G.SetColor(canvas, K.borderColor);
|
||||
G.Rect(canvas, 0, pos, b + 2, pos + b + 1);
|
||||
G.SetColor(canvas, K.btnTextColor);
|
||||
G.HLine(canvas, pos + 1 + b DIV 2, 4, b - 4);
|
||||
G.HLine(canvas, pos + 1 + b DIV 2 - 3, 6, b - 6);
|
||||
G.HLine(canvas, pos + 1 + b DIV 2 + 3, 6, b - 6);
|
||||
ELSE
|
||||
G.FillRect(canvas, pos + 1, 1, pos + b, b);
|
||||
G.SetColor(canvas, 0404040H);
|
||||
G.SetColor(canvas, K.borderColor);
|
||||
G.Rect(canvas, pos, 0, pos + b + 1, b + 2);
|
||||
G.SetColor(canvas, K.btnTextColor);
|
||||
G.VLine(canvas, pos + b DIV 2, 4, b - 4);
|
||||
G.VLine(canvas, pos + b DIV 2 - 3, 6, b - 6);
|
||||
G.VLine(canvas, pos + b DIV 2 + 3, 6, b - 6);
|
||||
@ -74,7 +77,7 @@ BEGIN
|
||||
END draw;
|
||||
|
||||
|
||||
PROCEDURE create* (xSize, ySize: INTEGER; color, bkColor: INTEGER): tScroll;
|
||||
PROCEDURE create* (xSize, ySize: INTEGER): tScroll;
|
||||
VAR
|
||||
scroll: tScroll;
|
||||
BEGIN
|
||||
@ -85,8 +88,6 @@ BEGIN
|
||||
scroll.maxVal := 30;
|
||||
scroll.value := 0;
|
||||
scroll.mouse := FALSE;
|
||||
scroll.bkColor := bkColor;
|
||||
scroll.color := color;
|
||||
scroll.canvas := G.CreateCanvas(xSize, ySize)
|
||||
RETURN scroll
|
||||
END create;
|
||||
|
@ -22,7 +22,7 @@
|
||||
;******************************************************************************
|
||||
BTN_HEIGHT = 26
|
||||
BTN_WIDTH = 178
|
||||
TXT_Y = (BTN_HEIGHT)/2-6
|
||||
TXT_Y = (BTN_HEIGHT)/2-7
|
||||
FONT_TYPE = 0x90000000
|
||||
|
||||
PANEL_HEIGHT = 20
|
||||
|
Loading…
Reference in New Issue
Block a user