Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4041 → Rev 4042

/programs/cmm/eolite/Eolite.c
76,8 → 76,8
 
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
 
#define TITLE "Eolite File Manager v1.98.7"
#define ABOUT_TITLE "Eolite v1.98.7"
#define TITLE "Eolite File Manager v1.98.8"
#define ABOUT_TITLE "Eolite v1.98.8"
dword col_work = 0xE4DFE1;
dword col_border = 0x9098B0; //A0A0B8; //0x819FC5;
dword col_padding = 0xC8C9C9;
116,15 → 116,16
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
PathShow_data FileShow = {0, 56,215, 6, 100, 0, 0, 0x0, 0xFFFfff, #file_name, #temp, 0};
 
#include "include\copypaste.h"
#include "include\some_code.h"
#include "include\copy.h"
#include "include\other.h"
#include "include\sorting.h"
#include "include\icons_f.h"
#include "include\icons.h"
#include "include\ini.h"
#include "include\left_panel.h"
#include "include\history.h"
#include "include\file_menu.h"
#include "include\about_dialog.h"
#include "include\menu.h"
#include "include\about.h"
#include "include\open_with.h"
 
void main()
{
158,12 → 159,12
 
if (m.x > files.x) && (m.x < files.x + files.w) && (m.y > files.y) && (m.y < files.y+files.h) && (!can_select)
{
m_selected = m.y - 57 / files.line_h;
m_selected = m.y - files.y / files.line_h;
if (m.lkm) can_select = 1;
if (m.pkm)
{
can_show = 1;
if (m.y - 57 / files.line_h != files.current) can_select = 1;
if (m.y - files.y / files.line_h != files.current) can_select = 1;
}
}
 
171,9 → 172,9
if (!m.lkm) && (!m.pkm) && (can_select)
{
can_select = 0;
if (m.y>=57)
if (m.y>=files.y)
{
id = m.y - 57 / files.line_h;
id = m.y - files.y / files.line_h;
if (id!=m_selected)
{
can_show=0;
193,7 → 194,7
if (!m.pkm) && (!m.lkm) && (can_show)
{
can_show = 0;
if (m.y>=57)
if (m.y>=files.y)
{
SwitchToAnotherThread();
CreateThread(#FileMenu,#menu_stak);
209,7 → 210,7
break;
}
 
if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>40) && (m.y<57)
if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>40) && (m.y<files.y)
{
IF (m.lkm==1) DrawRectangle3D(onLeft(26,0),41,14,14,0xC7C7C7,0xFFFFFF);
WHILE (m.lkm==1) && (files.first>0)
241,11 → 242,11
if (scroll_used)
{
IF (scroll_size/2+57>m.y) || (m.y<0) || (m.y>4000) m.y=scroll_size/2+57; //anee eo?ni? iaa ieiii
IF (scroll_size/2+files.y>m.y) || (m.y<0) || (m.y>4000) m.y=scroll_size/2+files.y; //anee eo?ni? iaa ieiii
id=files.first;
j= scroll_size/2;
files.first = m.y -j -57 * files.count;
files.first /= onTop(22,57);
files.first = m.y -j -files.y * files.count;
files.first /= onTop(22,files.y);
IF (files.visible+files.first>files.count) files.first=files.count-files.visible;
IF (id!=files.first) List_ReDraw();
}
406,8 → 407,8
}
break;
case evReDraw:
draw_window();
if (action_buf) { menu_action(action_buf); action_buf=0;}
draw_window();
}
}
 
419,7 → 420,12
SelectFile(#copy_to+strrchr(#copy_to,'/'));
}
if (id==100) Open();
if (id==201) notify("Not compleated yet");
if (id==201)
{
pause(10);
SwitchToAnotherThread();
CreateThread(#OpenWith,#open_with_stak);
}
if (id==202) FnProcess(3); //F3
if (id==203) FnProcess(4); //F4
if (id==104) Copy(#file_path, NOCUT);
459,7 → 465,7
DrawFlatButton(files.x,40,onLeft(files.x,168),16,31,col_work,T_FILE);
DrawFlatButton(onLeft(168,0),40,73,16,32,col_work,T_TYPE);
DrawFlatButton(onLeft(95,0),40,68,16,33,col_work,T_SIZE);
DrawBar(onLeft(27,0),57,1,onTop(22,57),col_border); //line to the left from the scroll
DrawBar(onLeft(27,0),files.y,1,onTop(22,files.y),col_border); //line to the left from the scroll
DrawFlatButton(onLeft(27,0),40,16,16,0,col_work,"\x18");
DrawFlatButton(onLeft(27,0),onTop(22,0),16,16,0,col_work,"\x19");
Open_Dir(#path,ONLY_SHOW);
552,7 → 558,7
dword text_col=0,
name_len=0,
attr,
y=filenum*files.line_h+57;
y=filenum*files.line_h+files.y;
DrawBar(files.x,y,3,files.line_h,color);
DrawBar(files.x+19,y,files.w-19,files.line_h,color);
DrawBar(files.x+3,y+17,16,1,color);
904,4 → 910,5
 
char about_stak[512];
char menu_stak[512];
char open_with_stak[512];
char copy_stak[4096];
/programs/cmm/eolite/imgs/png/icons.raw.c--
0,0 → 1,0
0x00FCCEFC,0x005C627C,0x00CCCCD0,0x00FCFDFC,0x00848AA4,0x009498AF,0x00E4E2E4,0x00F4F4FA,0x009CA4B6,0x00ABAEBC,0x007C829C,0x00ECEDEE,0x00C4C2C9,0x00E4E5EC,0x00DBDCE4,0x00D4D3DA,0x00C4C6D4,0x00FCB694,0x00D7E2EF,0x00BCBECC,0x00FC9D73,0x005C7A9C,0x005C7AA4,0x00647EA4,0x008CA2BC,0x00E4EBF0,0x00CCD5D9,0x007896B8,0x00BCC2D4,0x00D4EAFC,0x00C4CBD1,0x00CCDBE4,0x006C86A7,0x00ECF2F3,0x00DCF0FC,0x00748EAC,0x00B5E2FC,0x00C4DEFC,0x00B9CDE4,0x007CAADA,0x00ABB2C4,0x006492CC,0x005484B8,0x005C89BC,0x009CADC4,0x006482A4,0x00A47868,0x00644A44,0x007C603C,0x006C4F26,0x00644E44,0x00FCFD9F,0x00BA9D40,0x00FCE274,0x00FCDE60,0x00C4A650,0x00ECD274,0x00A29880,0x00FCC354,0x00ECB847,0x00FCF2F5,0x00E4AA54,0x00DCA24C,0x009B6A55,0x00543A34,0x0074799A,0x006EBEE0,0x007CBAE4,0x00A4CAF4,0x00040204,0x00F43E4C,0x0044CE3C,0x00047CBC,0x00FCC24C,0x009C8E74,0x00FCBB3C,0x00C4B6A4,0x007B828A,0x00C48A34,0x0054463C,0x00AB5A04,0x00FCE8A1,0x00AC6A14,0x00F4EED4,0x00FBD65C,0x00FCCA34,0x00ECB624,0x0034120C,0x00D2A226,0x00AEC5DA,0x007C9DCC,0x00B4DEF4,0x00578FC4,0x0094BAE4,0x00ECFEFC,0x0084AAD4,0x002C72BD,0x00A4C6EA,0x00518AC2,0x00447EBC,0x002669B1,0x008BB5E0,0x00BCD2EC,0x001C62AC,0x006C9CC9,0x003C7AB4,0x0064718B,0x00C6CBE2,0x008496BC,0x00EC8D99,0x00D49694,0x00949392,0x00CC8387,0x00BC7A24,0x00BC6A1C,0x00E7C267,0x008C5A14,0x00D59A52,0x00B0722C,0x00F0DAB4,0x00B45A04,0x008C522C,0x00CC923F,0x009C5204,0x00945204,0x00CC9A14,0x00FCFBD3,0x00FCF6BC,0x00FCDE98,0x00FCEAC4,0x00FCDA84,0x00F4D67C,0x00F4D27C,0x00DCBA54,0x007CBE7C,0x001C8E1C,0x00A98D04,0x001C8204,0x0090D280,0x00147E04,0x002C9018,0x00BCFAAC,0x003CC234,0x00C49204,0x00488404,0x0054AE4C,0x00C8F7A4,0x0084F26C,0x005CE64C,0x0024AE1C,0x00F8E4B4,0x00B4D6A4,0x0049A939,0x00E4FED4,0x00A8F694,0x004CDA44,0x0044E63C,0x00149E0C,0x00848204,0x0097B951,0x005C9D2F,0x006FCB4C,0x008CE264,0x004C9A24,0x00749224,0x00ECCA7C,0x00DCBE74,0x00349E2C,0x005CAE3C,0x0084B64C,0x00D0EC90,0x0084C73F,0x009CDA64,0x0070B63C,0x00BCE274,0x00C4BA4C,0x00DCB23C,0x00C4E6F4,0x0094CDC6,0x003CA674,0x0051A389,0x0074BAAC,0x002C8E64,0x0064BEDC,0x003C8E94,0x001C6E5C,0x0084AEA4,0x002489B9,0x001C6A84,0x00145A6C,0x0064827C,0x00ACBEA4,0x000C4E5C,0x004CA6CC,0x0084BAB4,0x00B4CEA4,0x00A4CEAC,0x000796D9,0x001C96CC,0x002496CC,0x0054CAFC,0x0030A6D8,0x00BC2E34,0x00247AB4,0x00946684,0x005C568C,0x00447684,0x0034867C,0x00449664,0x00A4CA94,0x00F46264,0x008C6E34,0x00ACEE64,0x006CAE34,0x00A02624,0x00E42A3C,0x00DC1A2C,0x00846224,0x00B4B2B4,0x008C4644,0x007C6634,0x00509224,0x00BBBCC3,0x00ACABAC,0x003C7A24,0x00547A44,0x00E15671,0x005C8614,0x00C44244,0x00DC4A6C,0x0084BA1C,0x0004A6F4,0x00E4627C,0x00EC7E94,0x00A47A04,0x008C8C8C,0x00848387,0x007B7C7E,0x009C9D9E,0x00A4A3AC,0x00D4CEDC,0x00FCD94A,0x00C9FEA4,0x005C6684,0x00FCCE1C,0x00FCC514,0x00464F6A,0x00F4EDFB,0x00C4BEC7,0x00515870,0x0099C5F1,0x00E4DEEC,0x00FCA274,0x00343644,0x00FC0204,0x00FCCBCC,
/programs/cmm/eolite/include/file_menu.h
File deleted
\ No newline at end of file
/programs/cmm/eolite/include/some_code.h
File deleted
\ No newline at end of file
/programs/cmm/eolite/include/about_dialog.h
File deleted
\ No newline at end of file
/programs/cmm/eolite/include/icons_f.h
File deleted
/programs/cmm/eolite/include/copypaste.h
File deleted
/programs/cmm/eolite/include/about.h
0,0 → 1,71
//Leency 2008-2013
 
#define EDITOR_PATH "/sys/tinypad"
#define BROWSER_PATH "/sys/htmlv"
#define BROWSER_LINK "http://kolibri-n.org/index.php"
 
#ifdef LANG_RUS
?define INTRO_TEXT_1 "Ž Eolite"
?define INTRO_TEXT_2 " §à ¡®â稪¨:"
?define INTRO_TEXT_3 "®á¥â¨â¥"
?define INTRO_TEXT_4 "‡ ªàëâì"
#elif LANG_EST
?define INTRO_TEXT_1 "Programmis Eolite"
?define INTRO_TEXT_2 "Arendajad:"
?define INTRO_TEXT_3 "Külasta"
?define INTRO_TEXT_4 "Sulge"
#else
?define INTRO_TEXT_1 "About Eolite"
?define INTRO_TEXT_2 "Developers:"
?define INTRO_TEXT_3 "Visit"
?define INTRO_TEXT_4 "Close"
#endif
 
void about_dialog()
{
byte id;
IF (active_about) ExitProcess();
active_about=1;
loop() switch(WaitEvent())
{
case evButton:
id=GetButtonID();
IF (id==1) || (id==10)
{
active_about=0;
ExitProcess();
}
IF (id==23) RunProgram(BROWSER_PATH, BROWSER_LINK);
break;
case evKey:
IF (GetKey()==27)
{
active_about=0;
ExitProcess();
}
break;
case evReDraw:
DefineAndDrawWindow(600,150,181,232+GetSkinHeight(),0x34,col_work,INTRO_TEXT_1);
DrawBar(0,0,172,50,0x8494C4);
PutPaletteImage(#logo,85,85,43,7,8,#logo_pal);
WriteTextB(46,100,0x90,0xBF40BF,ABOUT_TITLE);
#ifdef LANG_RUS
WriteText(50,120,0x80,0,INTRO_TEXT_2);
#else
WriteText(55,120,0x80,0,INTRO_TEXT_2);
#endif
WriteText(39,130,0x80,0,"Leency & Veliant");
WriteText(45,140,0x80,0,"KolibriOS Team");
WriteText(61,150,0x80,0,"2008-2013");
#ifdef LANG_RUS
WriteText(19,170,0x80,0,INTRO_TEXT_3);
#else
WriteText(29,170,0x80,0,INTRO_TEXT_3);
#endif
DrawLink(71,170,0x80,23, "kolibri-n.org");
DrawFlatButton(85,190,70,22,10,0xE4DFE1, INTRO_TEXT_4);
DrawFilledBar(0, 216, 172, 12);
}
}
/programs/cmm/eolite/include/copy.h
0,0 → 1,61
//Leency 2008-2013
 
 
byte copy_from[4096], copy_to[4096], cut_active=0;
enum {NOCUT, CUT, COPY_PASTE_END};
#define WIN_W 300
#define WIN_H 50
 
 
void Copy(dword pcth, char cut)
{
strcpy(#copy_from, pcth);
cut_active = cut;
}
 
void copyf_Draw_Progress(dword filename) {
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_W,GetSkinHeight()+WIN_H-1,0x34,col_work,T_PASTE_WINDOW);
WriteText(5,8, 0x80, 0, T_PASTE_WINDOW_TEXT);
DrawBar(5, 26, WIN_W-10, 10, col_work);
WriteText(5,26, 0x80, 0, filename);
if (CheckEvent()==evButton)
{
notify(T_CANCEL_PASTE);
ExitProcess();
}
}
 
 
void Paste()
{
char copy_rezult;
if (!copy_from) ExitProcess();
strcpy(#copy_to, #path);
strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));
if (!strcmp(#copy_from,#copy_to))
{
strcpy(#copy_to, #path);
strcat(#copy_to, "new_");
strcat(#copy_to, #copy_from+strrchr(#copy_from,'/'));
}
if (strstr(#copy_to, #copy_from))
{
notify("Copy directory into itself is a bad idea...");
ExitProcess();
}
if (copy_rezult = copyf(#copy_from,#copy_to))
{
Write_Error(copy_rezult);
}
else if (cut_active)
{
strcpy(#file_path, #copy_from);
Del_File(true);
copy_from=NULL;
cut_active=false;
}
action_buf = COPY_PASTE_END;
ActivateWindow(GetProcessSlot(Form.ID));
ExitProcess();
}
/programs/cmm/eolite/include/icons.h
0,0 → 1,145
char *ext[]={
"..", 17,
"<DIR>",16,
"txt", 1, "doc", 1, "rtf", 1, "odt", 1, "log", 1, "docx",1,
"htm", 2, "html",2, "mht", 2,
"ini", 3, "js", 3, "conf",3, "inf", 3,
"xlt", 4, "xls", 4, "ods", 4, "xlsx",4,
"cmd", 5, "bat", 5, "py", 5, "sh", 5, "ksh", 5, "com", 5,
"kex", 6, "lua", 6,
"exe", 7, "msi", 7,
"sys", 8, "ocx", 8, "drv", 8, "so", 8,
"inc", 9,
"chr", 10, "mt", 10, "ttf", 10, "fon", 10,
"asm", 11,
"mp3", 12, "wav", 12, "mid", 12, "midi",12, "ogg", 12, "wma", 12, "flac",12,
"skn", 13,
"avi", 14, "flv", 14, "mpg", 14, "wmv", 14, "mov", 14, "mkv", 14, "mp4", 14, "vob", 14, "webm", 14,
"djvu",15, "pdf", 15, "fb2", 15,
"nes", 18, "smc", 18,
"gif", 19, "bmp", 19, "tga", 19, "pcx", 19, "png", 19, "pnm", 19, "jpg", 19, "xcf", 19, "ai", 19,
"jpeg",19, "raw", 19, "psd", 19, "wbmp",19, "tiff",19, "tif", 19,
"3ds", 20, "ico", 20, "cur", 20, "ani", 20, "vox", 20,
"img", 21, "ima", 21,
"dll", 22, "obj", 22, "dict",22,
"rar", 23, "zip", 23, "cab", 23, "tar", 23, "ajr", 23, "jar", 23, "7z", 23, "gz", 23,
"iso", 24, "cue", 24, "nrg", 24, "mdf", 24,
"grf", 25,
0,0};
 
 
#include "imgs\icons.txt"
 
void Put_icon(dword extension, yy, fairing_color)
{
int icon_n=0, i;
for (i=0; ext[i]!=0; i+=2;) if (!strcmp(extension, ext[i])) { icon_n = ext[i+1]; break; }
 
ficons_pal[0] = fairing_color;
PutPaletteImage(icon_n*16*15+#ficons,16,15,files.x+3,yy,8,#ficons_pal);
if (fairing_color!=0xFFFfff) IconFairing(icon_n, files.x+3, yy, fairing_color);
if (icon_n<>17) && (strlen(extension)<9) WriteText(-strlen(extension)*3+Form.cwidth-120,yy+4,0x80,0,extension);
}
 
 
void IconFairing(dword filenum, x,y, color)
{
switch(filenum)
{
case 0...1: //file
case 3: //íàñòðîéêè
RIGHT_PAINT:
DrawBar(205,y,4,1,color);
DrawBar(206,y+1,3,1,color);
DrawBar(207,y+2,2,1,color);
PutPixel(208,y+3,color);
return;
case 2: //html
DrawBar(195,y,1,7,color);
DrawBar(196,y,1,6,color);
DrawBar(195,y+10,1,5,color);
DrawBar(196,y+11,1,4,color);
GOTO RIGHT_PAINT;
case 9: //inc
DrawBar(208,y,1,3,color);
DrawBar(209,y,2,4,color);
DrawBar(210,y,1,15,color);
PutPixel(198,y+14,color);
DrawBar(199,y+13,1,2,color);
DrawBar(200,y+12,10,3,color);
PutPixel(205,y+11,color);
DrawBar(206,y+10,1,2,color);
DrawBar(207,y+9,1,3,color);
PutPixel(207,y+7,color);
DrawBar(208,y+6,2,7,color);
PutPixel(209,y+5,color);
return;
case 10: //font
DrawBar(196,y+1,1,13,color);
DrawBar(197,y+1,1,11,color);
DrawBar(198,y+1,1,10,color);
DrawBar(199,y+1,1,9,color);
DrawBar(200,y+1,1,7,color);
DrawBar(201,y+1,1,5,color);
DrawBar(202,y+1,1,4,color);
DrawBar(203,y+1,1,2,color);
DrawBar(209,y+1,1,13,color);
DrawBar(208,y+1,1,11,color);
PutPixel(204,y+6,color);
DrawBar(203,y+10,2,1,color);
DrawBar(202,y+11,2,3,color);
return;
case 12: //audio
PutPixel(x+2,y+9,color);
PutPixel(x+1,y+10,color);
PutPixel(x+10,y+8,color);
PutPixel(x+9,y+9,color);
 
PutPixel(x+6,y+13,color);
PutPixel(x+5,y+14,color);
PutPixel(x+14,y+12,color);
PutPixel(x+13,y+13,color);
return;
case 13: //skin
PutPixel(210,y,color);
return;
case 16...17: //folder
DrawBar(195,y,1,15,color);
DrawBar(203,y,8,2,color);
IF (filenum==17) PutPixel(206,y+1,0x1A7B17); //green arrow part
DrawBar(196,y+13,15,2,color);
PutPixel(196,y,color); //.òî÷êè
PutPixel(202,y,color);
PutPixel(210,y+2,color);
PutPixel(196,y+12,color);
PutPixel(210,y+12,color);
return;
case 18: //êàðòðèäæ
DrawBar(195,y+11,1,2,color);
DrawBar(210,y+11,1,2,color);
DrawBar(195,y+13,16,1,color);
return;
case 24: //îáðàç
DrawBar(195,y,6,1,color);
DrawBar(195,y+1,4,1,color);
DrawBar(195,y+2,3,1,color);
DrawBar(195,y+3,2,2,color);
DrawBar(195,y+5,1,5,color);
DrawBar(195,y+10,2,2,color);
DrawBar(195,y+12,3,1,color);
DrawBar(195,y+13,4,1,color);
DrawBar(195,y+14,6,1,color);
 
DrawBar(195+11,y,5,1,color);
DrawBar(195+13,y+1,3,1,color);
DrawBar(195+14,y+2,2,1,color);
DrawBar(195+15,y+3,1,2,color);
DrawBar(195+15,y+10,1,2,color);
DrawBar(195+14,y+12,2,1,color);
DrawBar(195+13,y+13,3,1,color);
DrawBar(195+11,y+14,5,1,color);
}
}
/programs/cmm/eolite/include/menu.h
0,0 → 1,119
//Leency 2008-2013
 
//pay attension: >200 this is only file actions, not supported by folders
#ifdef LANG_RUS
char *file_captions[] = {
"Žâªàëâì", "Enter",100,
"Žâªàëâì á ¯®¬®éìî...", "CrlEnt",201,
"Žâªàëâì ª ª ⥪áâ", "F3",202,
"Žâªàëâì ª ª HEX", "F4",203,
"Š®¯¨à®¢ âì", "Crl+C",104,
"‚ë१ âì", "Crl+X",105,
"‚áâ ¢¨âì", "Crl+V",106,
"¥à¥¨¬¥­®¢ âì", "F2",207,
"“¤ «¨âì", "Del",108,
"Ž¡­®¢¨âì ¯ ¯ªã", "F5",109,
0, 0, 0};
#elif LANG_EST
char *file_captions[] = {
"Ava", "Enter",100,
"Ava ...", "CrlEnt",201,
"Vaata tekstina", "F3",202,
"Vaata HEX", "F4",203,
"Kopeeri", "Crl+C",104,
"Lõika", "Crl+X",105,
"Aseta", "Crl+V",106,
"Nimeta ümber", "F2",207,
"Kustuta", "Del",108,
"Värskenda", "F5",109,
0, 0, 0};
#else
char *file_captions[] = {
"Open", "Enter",100,
"Open with...", "CrlEnt",201,
"View as text", "F3",202,
"View as HEX", "F4",203,
"Copy", "Crl+C",104,
"Cut", "Crl+X",105,
"Paste", "Crl+V",106,
"Rename", "F2",207,
"Delete", "Del",108,
"Refresh", "F5",109,
0, 0, 0};
#endif
 
 
void FileMenu()
{
mouse mm;
word slot, index, start_y;
llist menu;
proc_info MenuForm;
int texty, newi;
 
menu.ClearList();
menu.SetSizes(m.x+Form.left+5,m.y+Form.top+GetSkinHeight(),10,0,0,18);
for (index=0; file_captions[index]!=0; index+=3)
{
if (itdir) && (file_captions[index+2]>=200) continue;
if (strlen(file_captions[index])>menu.w) menu.w = strlen(file_captions[index]);
menu.count++;
}
menu.w = menu.w + 3 * 6 + 50;
menu.h = menu.count*menu.line_h;
texty = menu.line_h/2-4;
SetEventMask(100111b);
goto _MENU_DRAW;
loop() switch(WaitEvent())
{
case evMouse:
slot = GetProcessSlot(MenuForm.ID);
if (slot != GetActiveProcess()) ExitProcess();
mm.get();
newi = mm.y - 1 / menu.line_h;
if (mm.y<=0) || (mm.y>menu.h+5) || (mm.x<0) || (mm.x>menu.w) newi=-1;
if (menu.current<>newi)
{
menu.current=newi;
goto _ITEMS_DRAW;
}
break;
 
case evButton:
action_buf = GetButtonID();
ExitProcess();
break;
case evKey:
if (GetKey()==27) ExitProcess();
break;
case evReDraw: _MENU_DRAW:
DefineAndDrawWindow(menu.x, menu.y,menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF);
GetProcessInfo(#MenuForm, SelfInfo);
DrawRectangle(0,0,menu.w+1,menu.h+2,col_border);
DrawBar(1,1,menu.w,1,0xFFFfff);
DrawPopupShadow(1,1,menu.w,menu.h,0);
 
_ITEMS_DRAW:
for (index=0, start_y=0; file_captions[index*3]!=0; index++)
{
DefineButton(1,start_y+1,menu.w,menu.line_h-1,file_captions[index*3+2]+BT_HIDE+BT_NOFRAME,0xFFFFFF);
if ((itdir) && (file_captions[index*3+2]>=200)) continue;
DrawBar(1,start_y+2,1,menu.line_h,0xFFFfff);
if (start_y/menu.line_h==menu.current)
{
DrawBar(2,start_y+2,menu.w-1,menu.line_h,0xFFFfff);
}
else
{
DrawBar(2,start_y+2,menu.w-1,menu.line_h,col_work);
WriteText(8,start_y+texty+3,0x80,0xf2f2f2,file_captions[index*3]);
}
WriteText(7,start_y+texty+2,0x80,0x000000,file_captions[index*3]);
WriteText(-strlen(file_captions[index*3+1])*6-6+menu.w,start_y+texty+2,0x80,0x888888,file_captions[index*3+1]);
start_y+=menu.line_h;
}
}
}
/programs/cmm/eolite/include/open_with.h
0,0 → 1,43
//Leency 2013
 
void OpenWith()
{
?define OPEN_LIST_W 300
?define OPEN_LIST_H 300
mouse mm;
word key, slot, index, start_y;
llist app_list;
proc_info MenuForm;
int texty, newi;
 
app_list.ClearList();
app_list.SetSizes(files.w-OPEN_LIST_W/2+files.x+Form.left+4,files.h-OPEN_LIST_H/2+files.y+Form.top+GetSkinHeight(),OPEN_LIST_W,OPEN_LIST_H,150,18);
SetEventMask(100111b);
goto _APP_LIST_DRAW;
 
loop() switch(WaitEvent())
{
case evMouse:
slot = GetProcessSlot(MenuForm.ID);
if (slot != GetActiveProcess()) ExitProcess();
mm.get();
if (m.lkm) ExitProcess();
break;
case evKey:
key = GetKey();
if (key==27) ExitProcess();
break;
case evReDraw: _APP_LIST_DRAW:
DefineAndDrawWindow(app_list.x, app_list.y,app_list.w+3,app_list.h+6,0x01, 0, 0, 0x01fffFFF);
GetProcessInfo(#MenuForm, SelfInfo);
DrawPopup(0,0,app_list.w,app_list.h,0, col_work,col_border);
WriteText(10,10, 0x80, 0, "Select application to open file"w);
WriteText(10,23, 0x80, 0, #file_name);
WriteTextB(app_list.w/2-25,app_list.h/2, 0x90, 0, "S O O N");
 
_APP_LIST_ITEMS_DRAW:
break;
}
}
/programs/cmm/eolite/include/other.h
0,0 → 1,77
//Leency 2008-2013
 
 
dword onLeft(dword right,left) {EAX=Form.width-right-left;}
dword onTop(dword down,up) {EAX=Form.height-GetSkinHeight()-down-up;}
 
 
void ShowMessage(dword message, pause_duration)
{
int form_x=files.w-220/2+files.x;
int form_y=160;
DrawPopup(form_x,form_y,220,80,1,col_work,col_border);
WriteText(-strlen(message)*3+110+form_x,80/2-4+form_y,0x80,0,message);
pause(pause_duration);
if (pause_duration) List_ReDraw();
}
 
inline fastcall signed int _strrchr( ESI,BL)
{
int jj=0, last=strlen(ESI);
do{
jj++;
$lodsb
IF(AL==BL) last=jj;
} while(AL!=0);
return last;
}
 
 
dword col_palette[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB,
0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1};
 
inline fastcall void Scroll() { //Ïðîêðóòêà
dword on_y, i;
if (files.count<=0)
{
on_y = 57;
scroll_size = onTop(22,58);
}
else
{
on_y = files.first * onTop(22,57) / files.count +57;
scroll_size=onTop(22,57) * files.visible - files.visible / files.count;
if (scroll_size<20) scroll_size = 20; //óñòàíàâëèâàåì ìèíèìàëüíûé ðàçìåð ñêðîëëà
if (scroll_size>onTop(22,57)-on_y+56) || (files.first+files.visible>=files.count) on_y=onTop(23+scroll_size,0); //äëÿ áîëüøîãî ñïèñêà
}
DrawFlatButton(onLeft(27,0),on_y,16,scroll_size,0,-1,"");//ïîëçóíîê
if (!scroll_used) for (i=0; i<13; i++) DrawBar(onLeft(25-i,0), on_y+2, 1, scroll_size-3, col_palette[13-i]);
if (scroll_used) for (i=0; i<13; i++) DrawBar(onLeft(25-i,0), on_y+2, 1, scroll_size-3, col_palette[i]);
//ïîëå äî ïîëçóíêà
if (on_y>58) DrawBar(onLeft(26,0),57,15,1, 0xC7C9C9);
DrawBar(onLeft(26,0),58,1, on_y-58,0xC7C9C9);
DrawBar(onLeft(25,0),58,14,on_y-58,0xCED0D0);
//ïîëå ïîñëå ïîëçóíêà
if (onTop(22,57)-scroll_size+55>on_y) DrawBar(onLeft(26,0),on_y+scroll_size+1,15,1,0xC7C9C9);
DrawBar(onLeft(26,0),on_y+scroll_size+2,1,onTop(22,57)-scroll_size-on_y+55,0xC7C9C9);
DrawBar(onLeft(25,0),on_y+scroll_size+2,14,onTop(22,57)-scroll_size-on_y+55,0xCED0D0);
}
 
void DrawFlatButton(dword x,y,width,height,id,color,text)
{
int fill_h;
DrawRectangle(x,y,width,height,col_border);
DrawRectangle3D(x+1,y+1,width-2,height-2,0xFEFEFE,col_padding);
PutPixel(x+width-1, y+1, col_work);
if (color!=-1) DrawFilledBar(x+2, y+2, width-3, height-3);
IF (id<>0) DefineButton(x+1,y+1,width-2,height-2,id+BT_HIDE,0xEFEBEF);
WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text);
}
 
void DrawFilledBar(dword x, y, w, h)
{
int i, fill_h;
if (h <= 14) fill_h = h; else fill_h = 14;
for (i=0; i<fill_h; i++) DrawBar(x, y+i, w, 1, col_palette[14-i]);
DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);
}
/programs/cmm/eolite/txt/ReadMe_en.txt
8,8 → 8,9
 
 
==Authors==
Leency - programming and design.
Veliant - programming and support. Inactive now.
Leency
Veliant
Punk_Joker
lev
<Lrz>
Nable
/programs/cmm/eolite/txt/ReadMe_ru.txt
17,6 → 17,7
==Àâòîðû==
Leency - ðàçðàáîòêà, äèçàéí.
Veliant - ïðîãðàììèðîâàíèå, ïîääåðæêà.
Punk_Joker - êîä óäàëåíèÿ ïàïîê, ôèêñû.
<Lrz> - êîìïîíåíò EditBox è ëèáó ê íåìó.
lev - àëãîðèòì ðàáîòû ñ ìàññèâàìè ñòðîê.
Nable - íåêîòîðûå îïòèìèçàöèè è ïîääåðæêà.