Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9597 → Rev 9602

/programs/cmm/lib/gui/checkbox.h
33,7 → 33,7
 
DefineHiddenButton(x-1, y-1, strlen(text)*8 + SIZE + 17, SIZE+2, id+BT_NOFRAME);
UnsafeDefineButton(x, y, SIZE, SIZE, id, 0);
DrawRectangle(x, y, SIZE, SIZE, sc.work_graph);
DrawRectangle(x, y, SIZE, SIZE, sc.line);
if (disabled)
{
DrawRectangle(x+1, y+1, SIZE-2, SIZE-2, 0xffffff);
48,11 → 48,11
else if (checked == true)
{
if (!checkbox_flag) checkbox_flag = memopen("CHECKBOX", NULL, SHM_READ);
if (checkbox_flag) _PutImage(x+1, y+1, 13, 13, checkbox_flag);
if (checkbox_flag) PutImage(x+1, y+1, 13, 13, checkbox_flag);
else DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0x58C33C);
}
if (text) WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, text_col, text, sc.work);
DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,sc.work_dark,sc.work_light);
DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,sc.dark,sc.light);
}
 
:void checkbox::redraw()
/programs/cmm/lib/gui/more_less_box.h
49,7 → 49,7
check_values();
x=_x; y=_y;
 
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, sc.work_graph);
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, sc.line);
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff);
 
if (disabled)
56,7 → 56,7
{
DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff);
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc);
text_col = sc.work_graph;
text_col = sc.line;
}
else
{
69,7 → 69,7
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, sc.button, sc.button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, sc.button, sc.button_text, "-");
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, sc.work);
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,sc.work_dark,sc.work_light);
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,sc.dark,sc.light);
}
 
:void more_less_box::redraw()
/programs/cmm/lib/gui/sensor.h
23,8 → 23,8
 
:void sensor::draw_wrapper()
{
DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph);
DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work, sc.work_light);
DrawRectangle(x-1, y-1, w+1, h+1, sc.line);
DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work, sc.light);
}
 
:void sensor::draw_progress(dword progress_w)
32,7 → 32,7
char textp[16];
DrawBar(x, y, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200));
DrawBar(x, y+1, w-progress_w, h-2, PROGRESS_ACTIVE);
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, sc.work_graph, 200));
DrawBar(x, y+h-1, w-progress_w, 1, MixColors(PROGRESS_ACTIVE, sc.line, 200));
DrawBar(x+w-progress_w, y, progress_w, h, PROGRESS_BG);
 
strcpy(#textp, itoa(w-progress_w*100/w));
/programs/cmm/lib/gui/tabs.h
28,8 → 28,8
int i, xx=x;
 
if (w) {
DrawBar(x+1,y+0+TAB_HEIGHT,w,1, sc.work_graph);
DrawBar(x+1,y+1+TAB_HEIGHT,w,1, sc.work_light);
DrawBar(x+1,y+0+TAB_HEIGHT,w,1, sc.line);
DrawBar(x+1,y+1+TAB_HEIGHT,w,1, sc.light);
}
 
for (i=0; i<count; i++) {
/programs/cmm/lib/gui.h
147,8 → 147,8
if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff;
edit_box_draw stdcall (edit_box_pointer);
DrawRectangle3D(x-1, y-1, w+1, h+1, 0xE7E7E7, bg);
DrawRectangle(x-2, y-2, w+3, h+3, sc.work_graph);
DrawRectangle3D(x-3, y-3, w+5, h+5, sc.work_dark, sc.work_light);
DrawRectangle(x-2, y-2, w+3, h+3, sc.line);
DrawRectangle3D(x-3, y-3, w+5, h+5, sc.dark, sc.light);
}
 
#define DOT_W 37
164,8 → 164,8
if (ESI.edit_box.flags & 100000000000b) bg = 0xCACACA; else bg = 0xFFFfff;
edit_box_draw stdcall (edit_box_pointer);
DrawRectangle3D(x-1, y-1, w+1, box_h+1, 0xE7E7E7, bg);
DrawRectangle(x-2, y-2, w+3, box_h+3, sc.work_graph);
DrawRectangle3D(x-3, y-3, w+DOT_W+5, box_h+5, sc.work_dark, sc.work_light);
DrawRectangle(x-2, y-2, w+3, box_h+3, sc.line);
DrawRectangle3D(x-3, y-3, w+DOT_W+5, box_h+5, sc.dark, sc.light);
 
WriteText(x-2, y-19, 0x90, sc.work_text, title);
DrawCaptButton(x+w+1, y-2, DOT_W, box_h+3, btn, sc.button, sc.button_text, "...");
214,7 → 214,7
GetProcessInfo(#wForm, SelfInfo);
CopyScreen(shadow_buf, 5*skinned+x+wForm.left, GetSkinHeight()*skinned+y+wForm.top, w, h);
ShadowImage(shadow_buf, w, h, strength);
_PutImage(x,y,w,h,shadow_buf);
PutImage(x,y,w,h,shadow_buf);
mem_Free(shadow_buf);
}
 
229,9 → 229,9
 
:void Draw3DPopup(dword x,y,w,h)
{
DrawRectangle3D(x,y,w,h, sc.work_dark, sc.work_graph);
DrawBar(x+1,y+1,w-1,1,sc.work_light);
DrawBar(x+1,y+2,1,h-2,sc.work_light);
DrawRectangle3D(x,y,w,h, sc.dark, sc.line);
DrawBar(x+1,y+1,w-1,1,sc.light);
DrawBar(x+1,y+2,1,h-2,sc.light);
DrawPopupShadow(x,y,w,h-1,0);
}
 
/programs/cmm/lib/kolibri.h
439,12 → 439,7
 
:void WriteTextB(dword x,y,byte fontType, dword color, str_offset)
{
EAX = 4;
EBX = x<<16+y;
ECX = fontType<<24+color;
EDX = str_offset;
ESI = 0;
$int 0x40;
WriteText(x,y,fontType, color, str_offset);
$add ebx, 1<<16
$int 0x40
}
523,7 → 518,7
$int 64
}
 
:void _PutImage(dword x,y, w,h, data_offset)
:void PutImage(dword x,y, w,h, data_offset)
{
EAX = 7;
EBX = data_offset;
584,12 → 579,12
 
:void DefineDragableWindow(dword _x, _y, _w, _h)
{
DefineAndDrawWindow(_x, _y, _w, _h, 0x41,0x000000,NULL,0b);
DefineAndDrawWindow(_x, _y, _w, _h, 0x41,0x000000,EDI,0b);
}
 
:void DefineUnDragableWindow(dword _x, _y, _w, _h)
{
DefineAndDrawWindow(_x, _y, _w, _h, 0x01, 0, 0, 0x01fffFFF);
DefineAndDrawWindow(_x, _y, _w, _h, 0x01, 0, EDI, 0x01fffFFF);
}
 
:void EventDragWindow()
617,7 → 612,7
 
:void DefineHiddenButton(dword _x, _y, _w, _h, _id)
{
DefineButton(_x, _y, _w, _h, _id + BT_HIDE, 0);
DefineButton(_x, _y, _w, _h, _id + BT_HIDE, ESI);
}
 
inline fastcall void DeleteButton( EDX)
637,8 → 632,7
:dword X_EventRedrawWindow,Y_EventRedrawWindow;
:void _EventRedrawWindow()
{
DefineAndDrawWindow(X_EventRedrawWindow,Y_EventRedrawWindow,1,1,0x34,0xFFFFFF,NULL,0);
//pause(10);
DefineAndDrawWindow(X_EventRedrawWindow,Y_EventRedrawWindow,1,1,0x34,0xFFFFFF,EDI,0);
ExitProcess();
}
:char REDRAW_BUFF_EVENT_[4096];
/programs/cmm/lib/obj/box_lib.h
217,8 → 217,8
:void DrawFrame(dword x,y,w,h,text)
{
frame123.font_color = sc.work_text;
frame123.ext_col = sc.work_graph;
frame123.int_col = sc.work_light;
frame123.ext_col = sc.line;
frame123.int_col = sc.light;
frame123.font_backgr_color = sc.work;
 
frame123.start_x = x;
/programs/cmm/lib/patterns/select_list.h
55,8 → 55,8
void SelectList_DrawBorder() {
DrawRectangle3D(select_list.x-2, select_list.y-2,
select_list.w+3+scroll1.size_x, select_list.h+3,
sc.work_dark, sc.work_light);
DrawRectangle(select_list.x-1, select_list.y-1, select_list.w+1+scroll1.size_x, select_list.h+1, sc.work_graph);
sc.dark, sc.light);
DrawRectangle(select_list.x-1, select_list.y-1, select_list.w+1+scroll1.size_x, select_list.h+1, sc.line);
}
 
void SelectList_DrawScroller()
63,7 → 63,7
{
scroll1.bckg_col = MixColors(sc.work, 0xBBBbbb, 80);
scroll1.frnt_col = MixColors(sc.work,0xFFFfff,120);
scroll1.line_col = sc.work_graph;
scroll1.line_col = sc.line;
 
scroll1.max_area = select_list.count;
scroll1.cur_area = select_list.visible;
/programs/cmm/lib/patterns/toolbar_button.h
14,21 → 14,21
#define TSZE 25
static dword lightest, i16_mem, old_work_light;
dword i16_size;
if (!lightest) || (old_work_light != sc.work_light) {
old_work_light = sc.work_light;
lightest = MixColors(sc.work_light, 0xFFFfff, skin_is_dark()*155 + 20);
if (!lightest) || (old_work_light != sc.light) {
old_work_light = sc.light;
lightest = MixColors(sc.light, 0xFFFfff, skin_is_dark()*155 + 20);
if (ESI = memopen("ICONS18", NULL, SHM_READ)) {
i16_size = EDX;
i16_mem = malloc(i16_size);
memmov(i16_mem, ESI, i16_size);
replace_2cols(i16_mem, i16_size, 0xffFFFfff, sc.work_light, 0xffCACBD6, sc.work_dark);
replace_2cols(i16_mem, i16_size, 0xffFFFfff, sc.light, 0xffCACBD6, sc.dark);
}
}
DrawWideRectangle(_x+1, _y+1, TSZE, TSZE, 5, sc.work_light);
DrawWideRectangle(_x+1, _y+1, TSZE, TSZE, 5, sc.light);
DefineHiddenButton(_x, _y, TSZE+1, TSZE+1, _button_id);
if (_icon_n==-1) {
DrawBar(_x+6, _y+5, 16, 16, sc.work_light);
DrawBar(_x+6, _y+7, 15, 3, sc.work_graph);
DrawBar(_x+6, _y+5, 16, 16, sc.light);
DrawBar(_x+6, _y+7, 15, 3, sc.line);
$add ecx,5*65536
$int 64
$add ecx,5*65536
39,9 → 39,9
}
 
if (!pressed) {
DrawOvalBorder(_x, _y, TSZE, TSZE, lightest, sc.work_graph, sc.work_light, sc.work);
DrawOvalBorder(_x, _y, TSZE, TSZE, lightest, sc.line, sc.light, sc.work);
} else {
DrawOvalBorder(_x, _y, TSZE, TSZE, sc.work_graph, sc.work_light, sc.work_dark, sc.work);
DrawOvalBorder(_x, _y, TSZE, TSZE, sc.line, sc.light, sc.dark, sc.work);
PutShadow(_x+1, _y+1, TSZE, TSZE, true, 2);
}
 
/programs/cmm/lib/system.h
5,14 → 5,14
dword
nonset1,
taskbar_color,
work_dark,
work_light,
dark,
light,
window_title,
work,
button,
button_text,
work_text,
work_graph;
line;
void get();
} sc;