Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6049 → Rev 6050

/programs/cmm/Calypte/Calypte.c
118,7 → 118,6
int encoding;
dword properties_window;
 
#include "include\gui.h"
#include "include\properties.h"
 
struct filter
/programs/cmm/Calypte/include/gui.h
File deleted
/programs/cmm/Calypte/include/properties.h
85,8 → 85,8
break;
case evReDraw:
DefineAndDrawWindow(Form.left + 150,150,270,285+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE_PROPERTIES);
DefineAndDrawWindow(Form.left + 150,150,270,285+skin_height,0x34,system.color.work,WINDOW_TITLE_PROPERTIES);
GetProcessInfo(#settings_form, SelfInfo);
DrawFlatButton(settings_form.cwidth - 70 - 13, settings_form.cheight - 34, 70, 22, 10, 0xE4DFE1, BTN_CLOSE);
DrawCaptButton(settings_form.cwidth-70-13, settings_form.cheight-34, 70, 22, 10, 0x288FBD, 0xFFFfff, BTN_CLOSE);
}
}
/programs/cmm/eolite/Eolite.c
564,11 → 564,11
void DrawList()
{
word sorting_arrow_x;
DrawFlatButton(files.x, files.y-17, files.w - 141,16,31,system.color.work,T_FILE);
DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,system.color.work,T_TYPE);
DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,system.color.work,T_SIZE);
DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,system.color.work,"\x18");
DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16,0,system.color.work,"\x19");
DrawFlatButton(files.x, files.y-17, files.w - 141,16,31,T_FILE);
DrawFlatButton(files.x + files.w - 141, files.y-17,73,16,32,T_TYPE);
DrawFlatButton(files.x + files.w - 68, files.y-17,68,16,33,T_SIZE);
DrawFlatButton(files.x + files.w, files.y-17,16,16, 0,"\x18");
DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16,0,"\x19");
if (sort_num==1) sorting_arrow_x = files.w - 141 / 2 + files.x + 18;
if (sort_num==2) sorting_arrow_x = files.x + files.w - 90;
if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
/programs/cmm/eolite/include/about.h
42,13 → 42,14
case evReDraw:
DefineAndDrawWindow(Form.left+Form.width/2,Form.top+Form.height/2-114,440,200+GetSkinHeight(),0x34,system.color.work,0);
GetProcessInfo(#about_form, SelfInfo);
if (Form.status_window>2) break;
_PutImage(10, 15, 86, 86, #logo);
WriteTextB(110,15,0x81,0xBF40BF,ABOUT_TITLE);
if (about_form.status_window>2) break;
_PutImage(10, 23, 86, 86, #logo);
WriteTextB(112,16,0x82,0xD49CD2,ABOUT_TITLE);
WriteTextB(110,14,0x82,0xBF40BF,ABOUT_TITLE);
WriteTextLines(110,53,10010000b,0,DEVELOPERS_TEXT,21);
#ifdef LANG_RUS
DrawFlatButton(about_form.cwidth-310,about_form.cheight-38,180,26,11,0xE4DFE1,"ˆáâ®à¨ï ࠧࠡ®âª¨");
DrawFlatButton(about_form.cwidth-310,about_form.cheight-38,180,26,11,"ˆáâ®à¨ï ࠧࠡ®âª¨");
#endif
DrawFlatButton(about_form.cwidth-110,about_form.cheight-38, 90,26,10,0xE4DFE1,CLOSE_BUTTON_TEXT);
DrawFlatButton(about_form.cwidth-110,about_form.cheight-38, 90,26,10,CLOSE_BUTTON_TEXT);
}
}
/programs/cmm/eolite/include/gui.h
23,7 → 23,8
if (sc_slider_h > sc_h-sc_slider_y+56) || (files.first+files.visible>=files.count) sc_slider_y= Form.cheight - 19 - sc_slider_h; //äëÿ áîëüøîãî ñïèñêà
}
//slider
DrawFlatButton(sc_x,sc_slider_y,16,sc_slider_h,0,-1,"");
DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,system.color.work_graph);
DrawRectangle3D(sc_x+1,sc_slider_y+1,14,sc_slider_h-2,0xFEFEFE,col_padding);
if (!scroll_used) for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col_palette[13-i]);
if (scroll_used) for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col_palette[i]);
//area before slider
42,14 → 43,13
}
}
 
void DrawFlatButton(dword x,y,width,height,id,color,text)
void DrawFlatButton(dword x,y,width,height,id,text)
{
int fill_h;
DrawRectangle(x,y,width,height,system.color.work_graph);
DrawRectangle3D(x+1,y+1,width-2,height-2,0xFEFEFE,col_padding);
PutPixel(x+width-1, y+1, col_padding);
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);
DrawFilledBar(x+2, y+2, width-3, height-3);
if (id) DefineButton(x+1,y+1,width-2,height-2,id+BT_HIDE,0xEFEBEF);
if (height<18)
WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80,system.color.work_text,text);
else
74,6 → 74,6
int b1_x = dform_x + button_margin;
int b2_x = dform_x + button_margin + b1_len + button_margin;
DrawPopup(dform_x, 160, form_w, 90, 1, system.color.work, system.color.work_graph);
DrawFlatButton(b1_x, 210, b1_len, 24, 301, 0xFFB6B5, b1_text);
DrawFlatButton(b2_x, 210, b2_len, 24, 302, 0xC6DFC6, b2_text);
DrawFlatButton(b1_x, 210, b1_len, 24, 301, b1_text);
DrawFlatButton(b2_x, 210, b2_len, 24, 302, b2_text);
}
/programs/cmm/eolite/include/progress_dialog.h
27,7 → 27,7
else if (operation_flag==MOVE_FLAG) WriteText(45, 11, 0x80, system.color.work_text, T_MOVE_WINDOW_TEXT);
else WriteText(45, 11, 0x80, system.color.work_text, T_DELETE_WINDOW_TEXT);
DrawFlatButton(Dialog_Form.cwidth - 96, Dialog_Form.cheight - 32, 80, 22, 10, system.color.work_button, T_ABORT_WINDOW_BUTTON);
DrawFlatButton(Dialog_Form.cwidth - 96, Dialog_Form.cheight - 32, 80, 22, 10, T_ABORT_WINDOW_BUTTON);
DrawBar(8, 10, 32, 32, 0xFFFfff);
break;
}
/programs/cmm/eolite/include/properties.h
147,8 → 147,8
DrawPopup(30,80,200,90,1,system.color.work, system.color.work_graph);
WriteText(50, 100, 0x80, 0x000000, QUEST_1);
WriteText(80, 115, 0x80, 0x000000, QUEST_2);
DrawFlatButton(52,138,70,20,301,0xFFB6B5,T_YES);
DrawFlatButton(145,138,70,20,302,0xC6DFC6,T_NO);
DrawFlatButton(52,138,70,20,301,T_YES);
DrawFlatButton(145,138,70,20,302,T_NO);
}
 
void GetSizeDir(dword way)
321,8 → 321,8
{
DefineAndDrawWindow(Form.left + 150,150,270,285+GetSkinHeight(),0x34,system.color.work,WINDOW_TITLE_PROPERTIES);
GetProcessInfo(#settings_form, SelfInfo);
DrawFlatButton(settings_form.cwidth - 80 - 13, settings_form.cheight - 34, 80, 24, 10, 0xE4DFE1, BTN_CLOSE);
DrawFlatButton(settings_form.cwidth - 170 - 13, settings_form.cheight - 34, 80, 24, 11, 0xE4DFE1, BTN_APPLY);
DrawFlatButton(settings_form.cwidth - 80 - 13, settings_form.cheight - 34, 80, 24, 10, BTN_CLOSE);
DrawFlatButton(settings_form.cwidth - 170 - 13, settings_form.cheight - 34, 80, 24, 11, BTN_APPLY);
DrawBar(10, 10, 32, 32, 0xFFFfff);
WriteText(10, 50, 0x80, 0x000000, PR_T_DEST);
/programs/cmm/eolite/include/settings.h
66,8 → 66,8
case evReDraw:
DefineAndDrawWindow(Form.left + Form.width/2-10, Form.top + Form.height/2 - 75, 370, 243+GetSkinHeight(),0x34,system.color.work,TITLE_SETT);
DrawSettingsCheckBoxes();
DrawFlatButton(9, 166, strlen(SAVE_PATH_AS_DEFAULT)+3*8, 24, 6, 0xE4DFE1, SAVE_PATH_AS_DEFAULT);
DrawFlatButton(9, 200, strlen(EDIT_FILE_ASSOCIATIONS)+3*8, 24, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS);
DrawFlatButton(9, 166, strlen(SAVE_PATH_AS_DEFAULT)+3*8, 24, 6, SAVE_PATH_AS_DEFAULT);
DrawFlatButton(9, 200, strlen(EDIT_FILE_ASSOCIATIONS)+3*8, 24, 5, EDIT_FILE_ASSOCIATIONS);
}
}
}
/programs/cmm/eolite/include/translations.h
1,5 → 1,5
#define TITLE "Eolite File Manager v3.36"
#define ABOUT_TITLE "Eolite 3.36"
#define TITLE "Eolite File Manager v3.37"
#define ABOUT_TITLE "EOLITE 3.37"
 
#ifdef LANG_RUS
?define T_FILE "” ©«"
/programs/cmm/examples/example.c
File deleted
\ No newline at end of file
/programs/cmm/examples/compile.bat
1,14 → 1,20
c-- example.c
c-- window.c
c-- collections.c
c-- menu.c
c-- mixcolors.c
 
@del @@example
@del @@collections
@del @@menu
@echo off
@del _window
@del _collections
@del _menu
@del _mixcolors
 
@rename example.com @@example
@rename collections.com @@collections
@rename menu.com @@menu
@rename window.com _window
@rename collections.com _collections
@rename menu.com _menu
@rename mixcolors.com _mixcolors
 
@del warning.txt
@echo on
 
@pause
/programs/cmm/examples/window.c
0,0 → 1,42
#define MEMSIZE 4096*10
 
#include "../lib/io.h"
#include "../lib/gui.h"
 
void main()
{
word id;
dword file;
io.dir.load(0,DIR_ONLYREAL);
loop() switch(WaitEvent())
{
case evButton:
id=GetButtonID();
if (id==1) ExitProcess();
break;
case evKey:
GetKeys();
if (key_scancode == SCAN_CODE_ESC ) ExitProcess();
break;
case evReDraw:
draw_window();
break;
}
}
void draw_window()
{
proc_info Form;
int i;
DefineAndDrawWindow(215,100,350,300,0x34,0xFFFFFF,"Window header");
GetProcessInfo(#Form, SelfInfo);
for (i=0; i<io.dir.count; i++)
{
WriteText(5,i*8+3,0x80,0xFF00FF,io.dir.position(i));
}
DrawCaptButton(100, 10, 100, 22, 22, 0xCCCccc, 0x000000, "Button");
WriteText(100,50,0x80,0,"Textline small");
WriteText(100,70,0x90,0,"Textline big");
DrawBar(100, 110, 100, 100, 0x66AF86);
}
/programs/cmm/lib/kolibri.h
96,6 → 96,7
#define KEY_LWIN 01000000000b
#define KEY_RWIN 10000000000b
 
dword calc(EAX) { return EAX; }
 
inline fastcall word GetKey() //+Gluk fix
{
/programs/cmm/lib/patterns/rgb.h
4,7 → 4,7
byte r,g,b;
void DwordToRgb();
dword RgbToDword();
} rgb;
};
 
void _rgb::DwordToRgb(dword _dword)
{
20,3 → 20,20
_g = g << 8;
return _b + _g + r;
}
 
dword MixColors(dword _base, _overlying, byte a)
{
_rgb rgb1, rgb2, rgb;
byte n_a;
 
rgb1.DwordToRgb(_base);
rgb2.DwordToRgb(_overlying);
 
n_a = 255 - a;
 
rgb.b = calc(rgb1.b*a/255) + calc(rgb2.b*n_a/255);
rgb.g = calc(rgb1.g*a/255) + calc(rgb2.g*n_a/255);
rgb.r = calc(rgb1.r*a/255) + calc(rgb2.r*n_a/255);
 
return rgb.RgbToDword();
}