/data/Tupfile.lua |
---|
571,6 → 571,7 |
{"APP_PLUS", PROGS .. "/cmm/app_plus/app_plus.com"}, |
{"EASYSHOT", PROGS .. "/cmm/easyshot/easyshot.com"}, |
{"MOUSECFG", PROGS .. "/cmm/mousecfg/mousecfg.com"}, |
{"NOTES", PROGS .. "/cmm/notes/notes.com"}, |
{"PANELS_CFG", PROGS .. "/cmm/panels_cfg/panels_cfg.com"}, |
{"SYSPANEL", PROGS .. "/cmm/software_widget/software_widget.com"}, |
{"SYSMON", PROGS .. "/cmm/sysmon/sysmon.com"}, |
/data/common/icons16.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/data/common/icons32.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/cmm/iconedit/colors_mas.h |
---|
53,6 → 53,7 |
{ |
unsigned rows, columns; |
dword mas[MAX_CELL_SIZE*MAX_CELL_SIZE]; |
dword mas_copy[MAX_CELL_SIZE*MAX_CELL_SIZE]; |
dword img; |
_pixel_state pixel_state; |
void create(); |
221,7 → 222,8 |
MOVE_DOWN, |
FLIP_VER, |
FLIP_HOR, |
ROTE |
ROTATE_LEFT, |
ROTATE_RIGHT |
}; |
void _image::move(int _direction) |
{ |
278,9 → 280,44 |
set_pixel(rows-r-1, c, first_element_data); |
} |
break; |
case ROTATE_LEFT: |
//slow but the code is simple |
//need to rewrite in case of big images support |
move(ROTATE_RIGHT); |
move(ROTATE_RIGHT); |
move(ROTATE_RIGHT); |
break; |
case ROTATE_RIGHT: |
if (columns!=rows) { |
notify("Sorry, rotate is implemented for square canvaces only!"); |
break; |
} |
for (r=0; r<MAX_CELL_SIZE*MAX_CELL_SIZE; r++) { |
mas_copy[r] = mas[r]; |
} |
for (c = 0; c < columns; c++) |
for (r = 0; r < rows; r++) { |
set_pixel(c, rows-r-1, mas_copy[columns*r + c]); |
} |
columns >< rows; |
break; |
} |
} |
/* |
1234 |
5678 |
90AB |
951 |
A |
B |
*/ |
/programs/cmm/iconedit/iconedit.c |
---|
41,7 → 41,7 |
#endif |
#define T_TITLE "Icon Editor 0.57b Alpha" |
#define T_TITLE "Icon Editor 0.58 Alpha" |
#define TOPBAR_H 24+8 |
#define LEFTBAR_W 16+5+5+3+3 |
162,7 → 162,7 |
{ |
word btn; |
libimg_image open_image; |
dword tmp_bg_col; |
dword bg_col; |
load_dll(libio, #libio_init, 1); |
load_dll(libimg, #libimg_init, 1); |
172,8 → 172,10 |
Libimg_LoadImage(#left_icons, "/sys/icons16.png"); |
system.color.get(); |
bg_col = system.color.work; |
if (GrayScaleImage(#bg_col,1,1)<65) bg_dark=true; else bg_dark=false; |
semi_white = MixColors(system.color.work, 0xFFFfff, 96); |
semi_white = MixColors(system.color.work, 0xFFFfff, bg_dark*90 + 96); |
Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffFFFfff, semi_white); |
Libimg_ReplaceColor(top_icons.image, top_icons.w, top_icons.h, 0xffCACBD6, MixColors(semi_white, 0, 220)); |
181,7 → 183,6 |
Libimg_ReplaceColor(left_icons.image, left_icons.w, left_icons.h, 0xffCACBD6, MixColors(system.color.work, 0, 200)); |
//fix line and rectandle color for dark skins |
if (GrayScaleImage(#system.color.work,1,1)<65) bg_dark=true; else bg_dark=false; |
if (bg_dark) Libimg_ReplaceColor(left_icons.image, left_icons.w, left_icons.h, 0xff545454, 0xffD3D3D4); |
EventSetActiveColor(1, color1); |
293,6 → 294,12 |
case BTN_FLIP_HOR: |
EventMove(FLIP_HOR); |
break; |
case BTN_ROTATE_LEFT: |
EventMove(ROTATE_LEFT); |
break; |
case BTN_ROTATE_RIGHT: |
EventMove(ROTATE_RIGHT); |
break; |
case BTN_TEST_ICON: |
EventTestIcon(); |
break; |
345,6 → 352,24 |
case SCAN_CODE_KEY_O: |
EventOpenIcon(); |
break; |
case SCAN_CODE_LEFT: |
EventMove(MOVE_LEFT); |
break; |
case SCAN_CODE_RIGHT: |
EventMove(MOVE_RIGHT); |
break; |
case SCAN_CODE_UP: |
EventMove(MOVE_UP); |
break; |
case SCAN_CODE_DOWN: |
EventMove(MOVE_DOWN); |
break; |
case SCAN_CODE_KEY_R: |
EventMove(BTN_ROTATE_RIGHT); |
break; |
case SCAN_CODE_KEY_L: |
EventMove(BTN_ROTATE_LEFT); |
break; |
} |
} |
434,7 → 459,7 |
DrawBar(0, TOPBAR_H-1, Form.cwidth, 1, system.color.work_graph); |
tx.n = 5-GAP; |
DrawTopPanelButton(BTN_NEW, tx.inc(GAP), 2); //not implemented |
DrawTopPanelButton(BTN_NEW, tx.inc(GAP), 2); |
DrawTopPanelButton(BTN_OPEN, tx.inc(GAP), 0); //not implemented |
DrawTopPanelButton(BTN_SAVE, tx.inc(GAP), 5); |
DrawTopPanelButton(BTN_MOVE_LEFT, tx.inc(GAP+BLOCK_SPACE), 30); |
444,12 → 469,12 |
DrawTopPanelButton(BTN_FLIP_HOR, tx.inc(GAP+BLOCK_SPACE), 34); |
DrawTopPanelButton(BTN_FLIP_VER, tx.inc(GAP), 35); |
DrawTopPanelButton(BTN_ROTATE_LEFT, tx.inc(GAP), 37); |
DrawTopPanelButton(BTN_ROTATE_RIGHT, tx.inc(GAP), 36); |
DrawTopPanelButton(BTN_TEST_ICON, tx.inc(GAP+BLOCK_SPACE), 12); |
DrawTopPanelButton(BTN_CROP, tx.inc(GAP+BLOCK_SPACE), 46); |
// DrawTopPanelButton(BTN_ROTATE_LEFT, tx.inc(GAP), 36); //not implemented |
// DrawTopPanelButton(BTN_ROTATE_RIGHT, tx.inc(GAP), 37); //not implemented |
DrawEditArea(); |
566,21 → 591,24 |
} |
} |
int DrawGradientMarker(dword marker_x, marker_color) |
{ |
if (marker_x > b_color_gradient.w - 1) marker_x = b_color_gradient.w - 1; |
DrawBar(b_color_gradient.x + marker_x-2, b_color_gradient.y-3, 5, 1, marker_color); |
DrawBar(b_color_gradient.x + marker_x-1, b_color_gradient.y-2, 3, 1, marker_color); |
PutPixel(b_color_gradient.x + marker_x, b_color_gradient.y-1, marker_color); |
return marker_x; |
} |
int old_marker_pos; |
void DrawCurrentColorGradient() |
{ |
int i; |
dword hitch_color=system.color.work; |
int hitch_x = b_color_gradient.x+lmax-1; |
if (lmax>b_color_gradient.w-2) hitch_x=b_color_gradient.x+b_color_gradient.w-3; |
for (i=0 ; i<b_color_gradient.w; i++) { |
DrawBar(b_color_gradient.x+i, b_color_gradient.y, 1, b_color_gradient.h, linear_gradient[i]); |
} |
//current color marker |
DrawBar( b_color_gradient.x-1, b_color_gradient.y-2, b_color_gradient.w+4, 2, system.color.work); |
if (bg_dark) hitch_color=0xFFFfff; else hitch_color=0; |
DrawBar(hitch_x, b_color_gradient.y-2, 3,2, hitch_color); |
DrawGradientMarker(old_marker_pos, system.color.work); |
old_marker_pos = DrawGradientMarker(lmax, 0xFFFfff * bg_dark); |
} |
void DrawColorPallets() |
639,9 → 667,16 |
void DrawPreview() |
{ |
int x = right_bar.x; |
int y = wrapper.y + wrapper.h - image.rows-2; |
DrawRectangle(x, y, image.columns+1, image.rows+1, system.color.work_graph); |
_PutImage(x+1,y+1, image.columns, image.rows, image.get_image()); |
int y = b_default_palette.y + b_default_palette.h + 6; |
int preview_h = Form.cheight - y; |
if (image.columns > right_bar.w) return; |
if (image.rows > preview_h) return; |
_PutImage(right_bar.w - image.columns / 2 + x - 3, |
preview_h - image.rows / 2 + y, |
image.columns, image.rows, image.get_image() |
); |
} |
dword GetPixelUnderMouse() |
/programs/cmm/iconedit/tools/screen_copy.h |
---|
27,10 → 27,20 |
DrawCanvas(); |
if (mouse.down) { |
ScreenCopy_onKeyEvent(SCAN_CODE_ENTER); |
} |
} |
void ScreenCopy_onKeyEvent(dword keycode) { |
if (SCAN_CODE_ENTER == keycode) { |
actionsHistory.saveCurrentState(); |
screen_copy = free(screen_copy); |
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER); |
actionsHistory.saveCurrentState(); |
setCurrentTool(previousTool); |
if (!CheckActiveProcess(Form.ID)) ActivateWindow(GetProcessSlot(Form.ID)); |
} |
if (SCAN_CODE_ESC == keycode) { |
ScreenCopy_onKeyEvent(SCAN_CODE_ENTER); |
actionsHistory.undoLastAction(); |
} |
} |
/programs/cmm/iconedit/tools/selection.h |
---|
203,7 → 203,16 |
selection.copy_to_buf(); |
} |
} |
/* |
//forbid to select a single pixel |
if (mouse.up) { |
if (! selection.end_x-selection.start_x) |
&& (! selection.end_y-selection.start_y) { |
selection.reset(); |
} |
} |
*/ |
} |
void SelectTool_onKeyEvent(dword keycode) { |
dword r, c; |
/programs/cmm/iconedit/tools.h |
---|
85,6 → 85,7 |
tools[TOOL_SCREEN_COPY].cursor = NULL; |
tools[TOOL_SCREEN_COPY].activate = #ScreenCopy_activate; |
tools[TOOL_SCREEN_COPY].onMouseEvent = #ScreenCopy_onMouseEvent; |
tools[TOOL_SCREEN_COPY].onKeyEvent = #ScreenCopy_onKeyEvent; |
} |
/programs/cmm/lib/gui.h |
---|
254,8 → 254,8 |
}; |
:bool block::hovered() { |
if ((mouse.x>x) && (mouse.y>y) |
&& (mouse.y<y+h) && (mouse.x<x+w)) |
if ((mouse.x>=x) && (mouse.y>=y) |
&& (mouse.y<=y+h) && (mouse.x<=x+w)) |
return true; |
return false; |
} |
/programs/cmm/notes/engine.h |
---|
116,6 → 116,7 |
COL_BOTTOM_LINE=0xE8EFF4, |
COL_BG, |
cur_text; |
int drawy; |
char line_text[4096]; |
if (line_n<0) return; |
x = 1; |
131,10 → 132,12 |
} |
else |
{ |
DefineButton(RED_LINE_X-CHBOX/2+x, item_h*line_n+5+y, CHBOX-1,CHBOX-1, CHECKBOX_ID+line_n+BT_HIDE, 0); //checkbox |
_PutImage(RED_LINE_X-CHBOX/2+x, item_h*line_n+5+y, CHBOX,CHBOX, lines[line_n].state*CHBOX*CHBOX*3+#checkbox); |
if (cur_text) WriteText(x+RED_LINE_X+6, item_h*line_n+7+y, 0x80, lines[line_n].state*0x777777, cur_text); |
if (lines[line_n].state == true) DrawBar(x+RED_LINE_X+6, item_h*line_n+11+y, strlen(cur_text)*6, 1, 0x444444); //strike |
drawy = item_h*line_n+5+y; |
DefineButton(RED_LINE_X-CHBOX/2+x, drawy, CHBOX-1,CHBOX-1, CHECKBOX_ID+line_n+BT_HIDE, 0); //checkbox |
_PutImage(RED_LINE_X-CHBOX/2+x,drawy, CHBOX,CHBOX, lines[line_n].state*CHBOX*CHBOX*3+#checkbox); |
if (cur_text) WriteText(x+RED_LINE_X+6, drawy+2, 0x80, lines[line_n].state*0x777777, cur_text); |
if (lines[line_n].state == true) DrawBar(x+RED_LINE_X+6, drawy+6, strlen(cur_text)*6, 1, 0x444444); //strike |
DrawBar(WIN_W,drawy,1,item_h,0xBBBBBB); //fast fix; proper fix is to restrict WriteText() char length |
} |
DrawBar(x, line_n*item_h+draw_h-1+y, w, 1, COL_BOTTOM_LINE); |
DrawBar(x+RED_LINE_X, line_n*item_h+y, 1, draw_h, COL_RED_LINE); |
/programs/cmm/notes/notes.c |
---|
1,4 → 1,4 |
// Notes v1.0 |
// Notes v1.1 |
#define MEMSIZE 0xDAE80 |
#include "..\lib\kolibri.h" |
47,6 → 47,7 |
dword lists[] = { 0xEAEAEA, 0xCDCDCD, 0xF0F0F0, 0xD8D8D8, 0 }; |
bool delete_active = false; |
bool window_dragable = true; |
block delBtn; |
//===================================================// |
62,6 → 63,8 |
dword cur_line_offset; |
load_dll(boxlib, #box_lib_init,0); |
if (GetCpuFrequency()/1000000>=1000) window_dragable=true; else window_dragable=false; |
if (param) notes.OpenTxt(#param); else notes.OpenTxt(abspath("notes.txt")); |
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
75,7 → 78,8 |
if (delete_active) && (delBtn.hovered()) break; |
if (mouse.lkm) && (mouse.y<TITLE_H) && (mouse.x<WIN_W-39) EventDragWindow(); |
if (mouse.lkm) && (mouse.y<TITLE_H) && (mouse.x<WIN_W-39) |
&& (window_dragable) EventDragWindow(); |
if (mouse.pkm) |
&& (notes.MouseOver(mouse.x, mouse.y)) { |
159,7 → 163,10 |
void draw_window() |
{ |
int i; |
if (window_dragable) |
DefineUnDragableWindow(100,100,WIN_W, WIN_H); |
else |
DefineDragableWindow(100,100,WIN_W, WIN_H); |
notes.SetSizes(RED_LINE_X+1, HEADER_HEIGHT, WIN_W-1, RED_LINE_X*LINES_COUNT, RED_LINE_X); |
DrawRectangle3D(0,0,WIN_W,TITLE_H-1,0xBB6535, 0xCD6F3B); |
DrawRectangle3D(1,1,WIN_W-2,TITLE_H-3,0xEFBFA4, 0xDD8452); |
196,7 → 203,7 |
void EventActivateLine(int line_n) |
{ |
if (line_n<0) || (line_n>notes.count) return; |
if (line_n<0) || (line_n>=notes.count) return; |
notes.cur_y = line_n; |
notebox.text = notes.DrawLine(notes.cur_y, notes.item_h); |
EventListRedraw(); |
/programs/other/t_edit/t_edit.ini |
---|
1,9 → 1,9 |
[Window] |
t=20 |
l=100 |
w=840 |
h=740 |
symbol_w=9 |
w=780 |
h=680 |
symbol_w=8 |
symbol_h=16 |
font_s=16 |
scroll_type=0 |
/programs/system/cpuid/trunk/knopka2.bmp |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/programs/system/cpuid/trunk/knopka.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/programs/system/cpuid/trunk/knopka2.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/programs/system/cpuid/trunk/intel.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |