/programs/cmm/lib/keyboard.h |
---|
141,17 → 141,12 |
return AL; |
} |
inline fastcall GetKey() |
{ |
$mov eax,2 |
$int 0x40 |
} |
// ECX is a mode: 1 - scancodes, 0 - ascii |
inline fastcall SetKeyboardMode(ECX) |
{ |
$mov eax,66 |
$mov ebx,1 |
//$mov ecx,? |
$int 0x40 |
} |
/programs/cmm/lib/patterns/select_list.h |
---|
29,8 → 29,9 |
SelectList_DrawScroller(); |
} |
signed SelectList_ProcessMouse() |
void SelectList_ProcessMouse() |
{ |
int mouse_clicked; |
mouse.get(); |
scrollbar_v_mouse (#scroll1); |
if (select_list.first != scroll1.position) |
41,10 → 42,12 |
if (mouse.vert) && (select_list.MouseScroll(mouse.vert)) SelectList_Draw(); |
if (mouse.up) && (mouse.lkm) |
if (select_list.ProcessMouse(mouse.x, mouse.y)) { |
SelectList_LineChanged(); |
if (mouse.up)&&(mouse_clicked) |
{ |
if (mouse.lkm) && (select_list.ProcessMouse(mouse.x, mouse.y)) SelectList_LineChanged(); |
mouse_clicked=false; |
} |
else if (mouse.down)&&(mouse.lkm) && (select_list.MouseOver(mouse.x, mouse.y)) mouse_clicked=true; |
} |
void SelectList_DrawBorder() { |
/programs/cmm/lib/dll.h |
---|
234,9 → 234,7 |
$jmp import_loop01 |
@import_done01: |
#ifndef NO_DLL_INIT |
IF (need_init) dll_Init (DSDWORD[EDX+4]); |
#endif |
return 0; |
@exit01: |
return -1; |
/programs/cmm/misc/pipet.c |
---|
30,6 → 30,7 |
void main() |
{ |
bool pick_active = true; |
int btn; |
proc_info Form; |
@SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE); |
@SetWindowLayerBehaviour(-1, ZPOS_ALWAYS_TOP); |
47,16 → 48,16 |
break; |
case evButton: |
@GetButtonID(); |
if (EAX == BUTTON_CLOSE) ExitProcess(); |
if (EAX == BUTTON_COPY) EventCopyHex(); |
if (EAX == BUTTON_PICK) pick_active = true; |
btn = @GetButtonID(); |
if (btn == BUTTON_CLOSE) ExitProcess(); |
if (btn == BUTTON_COPY) EventCopyHex(); |
if (btn == BUTTON_PICK) pick_active = true; |
break; |
case evKey: |
@GetKeyScancode(); |
if (AL == SCAN_CODE_ESC) @ExitProcess(); |
if (AL == SCAN_CODE_KEY_C) EventCopyHex(); |
key_scancode = @GetKeyScancode(); |
if (key_scancode == SCAN_CODE_ESC) @ExitProcess(); |
if (key_scancode == SCAN_CODE_KEY_C) EventCopyHex(); |
break; |
case evReDraw: |
63,6 → 64,7 |
DefineUnDragableWindow(215, 100, FORM_W, FORM_H); |
GetProcessInfo(#Form, SelfInfo); |
draw_window(); |
break; |
} |
} |
/programs/cmm/misc/easyshot.c |
---|
90,8 → 90,8 |
strcpy(#save_path, "/tmp0/1"); |
EditBox_UpdateText(#edit_save, 0); |
@SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER); |
loop() switch(@WaitEvent()) |
SetEventMask(EVM_REDRAW+EVM_KEY+EVM_BUTTON+EVM_MOUSE+EVM_MOUSE_FILTER); |
loop() switch(WaitEvent()) |
{ |
case evMouse: |
edit_box_mouse stdcall (#edit_save); |
98,7 → 98,7 |
break; |
case evButton: |
id = @GetButtonID(); |
id = GetButtonID(); |
switch(id){ |
case CLOSE_BTN: ExitProcess(); |
case BTN_MAKE_SCREENSHOT: EventTakeScreenshot(); break; |
109,11 → 109,11 |
break; |
case evKey: |
GetKey(); |
GetKeys(); |
if (SCAN_CODE_ENTER == key_scancode) EventTakeScreenshot(); |
if (SCAN_CODE_ESC == key_scancode) ExitProcess(); |
EAX = key_editbox; |
edit_box_key stdcall (#edit_save); |
EAX >>= 16; |
if (SCAN_CODE_ENTER == AL) EventTakeScreenshot(); |
if (SCAN_CODE_ESC == AL) ExitProcess(); |
break; |
case evReDraw: |
/programs/cmm/menu/menu.c |
---|
104,7 → 104,7 |
{ |
proc_info Form; |
if (!param) RunProgram("/sys/network/WebView", "http://board.kolibrios.org/viewtopic.php?f=24&t=4233#p74599"); |
if (!param) die("'Menu component is for developers only' -I"); |
GetMenuItems(#param); |
GetMenuWidths(); |
120,7 → 120,7 |
GetWindowPosition(); |
@SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE); |
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE); |
loop() switch(WaitEvent()) |
{ |
case evMouse: |
135,6 → 135,7 |
break; |
case evKey: |
GetKeys(); |
ProcessKeys(); |
break; |
153,9 → 154,8 |
} |
} |
inline ProcessKeys() |
void ProcessKeys() |
{ |
key_scancode = @GetKeyScancode(); |
switch(key_scancode) |
{ |
case SCAN_CODE_ESC: |
/programs/cmm/barscfg/barscfg.c |
---|
95,7 → 95,7 |
void main() |
{ |
dword id; |
dword id, key; |
load_dll(libini, #lib_init,1); |
load_dll(boxlib, #box_lib_init,0); |
102,11 → 102,11 |
LoadCfg(); |
loop() switch(@WaitEvent()) |
loop() switch(WaitEvent()) |
{ |
case evButton: |
id = @GetButtonID(); |
if (1==id) @ExitProcess(); |
id=GetButtonID(); |
if (1==id) ExitProcess(); |
if (taskbar_on.checked) EventTaskbarProcessButton(id); |
if (docky_on.checked) EventDockyProcessButton(id); |
114,17 → 114,35 |
if (taskbar_on.click(id)) { |
IF (taskbar_on.checked == true) RunProgram("/sys/@taskbar", 0); |
ELSE KillProcessByName("@TASKBAR", SINGLE); |
EAX = taskbar_on.checked ^ 1; |
tbSoftenUp.disabled = EAX; |
tbSoftenDown.disabled = EAX; |
tbMinLeftButton.disabled = EAX; |
tbMinRightButton.disabled = EAX; |
tbRunApplButton.disabled = EAX; |
tbClnDeskButton.disabled = EAX; |
tbClock.disabled = EAX; |
tbCpuUsage.disabled = EAX; |
tbChangeLang.disabled = EAX; |
tbMenuButton.disabled = EAX; |
tbPanelHeight.disabled = EAX; |
tbSoftenHeight.disabled = EAX; |
tbButtonOffset.disabled = EAX; |
tbButtonOffset.disabled = EAX; |
DrawWindowContent(); |
} |
if (docky_on.click(id)) { |
IF (docky_on.checked == true) RunProgram("/sys/@docky", 0); |
ELSE KillProcessByName("@DOCKY", SINGLE); |
dkFsize.disabled = docky_on.checked ^ 1; |
dkAshow.disabled = docky_on.checked ^ 1; |
DrawWindowContent(); |
} |
break; |
case evKey: |
if (@GetKeyScancode() == SCAN_CODE_ESC) ExitProcess(); |
GetKeys(); |
if (key_scancode == SCAN_CODE_ESC) ExitProcess(); |
break; |
case evReDraw: |
141,28 → 159,6 |
_PutImage(22, y, PIMG_W, PIMG_H, n * PIMG_W * PIMG_H * 3 + #panels_img_data); |
} |
void SetDisabledMode() |
{ |
EAX = taskbar_on.checked ^ 1; |
tbSoftenUp.disabled = |
tbSoftenDown.disabled = |
tbMinLeftButton.disabled = |
tbMinRightButton.disabled = |
tbRunApplButton.disabled = |
tbClnDeskButton.disabled = |
tbClock.disabled = |
tbCpuUsage.disabled = |
tbChangeLang.disabled = |
tbMenuButton.disabled = |
tbPanelHeight.disabled = |
tbSoftenHeight.disabled = |
tbButtonOffset.disabled = |
tbButtonOffset.disabled = EAX; |
// |
dkFsize.disabled = |
dkAshow.disabled = docky_on.checked ^ 1; |
} |
void DrawWindowContent() |
{ |
#define PD 10 |
170,8 → 166,6 |
word win_center_x = Form.cwidth / 2 + 20; |
incn y; |
SetDisabledMode(); |
frame_y = 15; |
y.n = frame_y; |
DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0); |
/programs/cmm/kf_font_viewer/font_viewer.c |
---|
1,4 → 1,4 |
#define MEMSIZE 1024*30 |
#define MEMSIZE 0x2EE80 |
#include "../lib/kfont.h" |
#include "../lib/gui.h" |
7,6 → 7,7 |
#define WIN_W 490 |
#define WIN_H 315 |
#define BASE_TAB_BUTTON_ID 97 |
proc_info Form; |
_tabs tabs = { WIN_W-130, 0, NULL, BASE_TAB_BUTTON_ID }; |
17,10 → 18,8 |
void main() |
{ |
proc_info Form; |
char title[1024]; |
int btn; |
char title[4196]; |
if (!param) strcpy(#param, DEFAULT_FONT); |
kfont.init(#param); |
strcpy(#title, "Font preview: "); |
29,17 → 28,16 |
tabs.add("Phrase", #DrawPreviewPhrase); |
tabs.add("Chars", #DrawPreviewChars); |
loop() switch(@WaitEvent()) |
loop() switch(WaitEvent()) |
{ |
case evButton: |
btn = @GetButtonID(); |
if (btn==1) @ExitProcess(); |
btn = GetButtonID(); |
if (btn==1) ExitProcess(); |
bold.click(btn); |
smooth.click(btn); |
colored.click(btn); |
tabs.click(btn); |
GOTO _DRAW_WINDOW_CONTENT; |
goto _DRAW_WINDOW_CONTENT; |
case evReDraw: |
sc.get(); |
DefineAndDrawWindow(215,100,WIN_W+9,WIN_H+skin_height+5,0x74,0xFFFFFF,#title,0); |
50,24 → 48,27 |
kfont.bold = bold.checked; |
kfont.smooth = smooth.checked; |
DrawBar(0, 0, WIN_W, PANELH-1, sc.work); |
DrawBar(0, PANELH-1,WIN_W,1,sc.work_graph); |
if (!kfont.font) { |
DrawBar(preview.x, preview.y, preview.w, preview.h, 0xFFFfff); |
WriteText(10, 50, 0x82, 0xFF00FF, "Font is not loaded."); |
} else { |
DrawBar(0, 0, Form.cwidth, PANELH-1, sc.work); |
DrawBar(0, PANELH-1,Form.cwidth,1,sc.work_graph); |
bold.draw(10, 8); |
smooth.draw(83,8); |
colored.draw(170,8); |
tabs.draw(); |
tabs.draw_active_tab(); |
if (!kfont.font) |
{ |
DrawBar(preview.x, preview.y, preview.w, preview.h, 0xFFFfff); |
WriteText(10, 50, 0x82, 0xFF00FF, "Font is not loaded."); |
break; |
} |
} |
} |
dword pal[] = { 0x4E4153, 0x57417C, 0x89633B, 0x819156, 0x00CCCC, 0x2AD266, |
0xE000CC, 0x0498F9, 0xC3A9F5, 0xFFC200, 0xFF5836, 0xA086BA, 0 }; |
0xE000CC, 0x0498F9, 0xC3A9F5, 0xFFC200, 0xFF5836, 0xA086BA, |
0,0,0,0,0 }; |
void DrawPreviewPhrase() |
{ |
78,10 → 79,10 |
for (i=10, y=12; i<22; i++, y+=kfont.height+3;) //not flexible, need to calculate font count and max line length |
{ |
if (colored.checked) c = pal[i-10]; else c=0; |
strcpy(#line, " §¬¥à èà¨äâ /font size is "); |
strcpy(#line, " §¬¥à èà¨äâ /forn size is "); |
strcat(#line, itoa(i)); |
strcat(#line, " ¯¨ªá¥«¥©/px."); |
kfont.WriteIntoBuffer(14,y,WIN_W,WIN_H-PANELH, 0xFFFFFF, c, i, #line); |
kfont.WriteIntoBuffer(14,y,Form.cwidth,Form.cheight-PANELH, 0xFFFFFF, c, i, #line); |
} |
if (kfont.smooth) kfont.ApplySmooth(); |
kfont.ShowBuffer(preview.x, preview.y); |
90,12 → 91,13 |
void DrawPreviewChars() |
{ |
dword i, x=20, y=0; |
char line[2]=0; |
char line[2]; |
line[1]=NULL; |
kfont.raw_size = free(kfont.raw); |
for (i=0; i<255; i++) //not flexible, need to calculate font count and max line length |
{ |
line[0]=i; |
kfont.WriteIntoBuffer(x,y,WIN_W,WIN_H-PANELH, 0xFFFFFF, 0, 16, #line); |
kfont.WriteIntoBuffer(x,y,Form.cwidth,Form.cheight-PANELH, 0xFFFFFF, 0, 16, #line); |
x+= kfont.height+2; |
if (x>=preview.w-30) { |
x=20; |
/programs/cmm/app_plus/app_plus.c |
---|
79,21 → 79,21 |
CheckKosMounted(); |
o_dialog.type = 2; |
#define NO_DLL_INIT |
load_dll(Proc_lib, #OpenDialog_init,0); |
OpenDialog_init stdcall (#o_dialog); |
active_button_id = BTN_MANUAL_SEARCH; |
loop() switch(@WaitEvent()) |
loop() switch(WaitEvent()) |
{ |
case evButton: |
EventButton(GetButtonID()); |
break; |
case evKey: |
GetKeyScancode(); |
if (AL == SCAN_CODE_ENTER) { |
GetKeys(); |
if (key_scancode == SCAN_CODE_ENTER) { |
EventButton(active_button_id); |
} else if (AL == SCAN_CODE_TAB) { |
} |
else if (key_scancode == SCAN_CODE_TAB) { |
active_button_id = active_button_id-10^1 + 10; |
DrawButtons(); |
} |
107,10 → 107,11 |
void draw_window() |
{ |
incn y; |
y.n=0; |
sc.get(); |
DefineAndDrawWindow(screen.width-570/2, 100, 570, 300+skin_height, 0x34, sc.work, WINDOW_TITLE_TEXT,0); |
GetProcessInfo(#Form, SelfInfo); |
WriteTextB(CONX+2,y.set(20)+2,0x81,MixColors(sc.work, 0xB92234,220),CONTENT_HEADER_TEXT); |
WriteTextB(CONX+2,y.inc(20)+2,0x81,MixColors(sc.work, 0xB92234,220),CONTENT_HEADER_TEXT); |
WriteTextB(CONX,y.n,0x81,0xB92234,CONTENT_HEADER_TEXT); |
PutPaletteImage(#scr,144,171,Form.cwidth-180,y.n,8,#scr_pal); |
/programs/cmm/clipview/clipview.c |
---|
19,7 → 19,7 |
// // |
//===================================================// |
?define WINDOW_HEADER "Clipboard Viewer" |
?define WINDOW_HEADER "Clipboard Viewer v1.03" |
?define T_DELETE_LAST_SLOT "Delete last slot" |
?define T_DELETE_ALL_SLOTS "Delete all slots" |
?define T_RESET_BUFFER_LOCK "Reset the lock buffer" |
50,17 → 50,19 |
void main() |
{ |
int id; |
@SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
#define NO_DLL_INIT |
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
load_dll(boxlib, #box_lib_init,0); |
loop() switch(@WaitEventTimeout(10)) |
loop() |
{ |
WaitEventTimeout(10); |
switch(EAX & 0xFF) |
{ |
case evMouse: |
SelectList_ProcessMouse(); |
break; |
case evButton: |
@GetButtonID(); |
id = GetButtonID(); |
if (id==1) ExitProcess(); |
if (id==BT_DELETE_LAST_SLOT) EventDeleteLastSlot(); |
if (id==BT_DELETE_ALL_SLOTS) EventDeleteAllSlots(); |
70,9 → 72,8 |
break; |
case evKey: |
if (select_list.ProcessKey(@GetKeyScancode())) { |
ClipViewSelectListDraw(); |
} |
GetKeys(); |
if (select_list.ProcessKey(key_scancode)) ClipViewSelectListDraw(); |
break; |
case evReDraw: |
80,8 → 81,8 |
DefineAndDrawWindow(screen.width-700/2,80,700,454+skin_height,0x73,0xE4DFE1,WINDOW_HEADER,0); |
GetProcessInfo(#Form, SelfInfo); |
IF (Form.status_window>=2) break; |
IF (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); break; } |
IF (Form.width < 570) { MoveSize(OLD,OLD,570,OLD); break; } |
if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); break; } |
if (Form.width < 570) { MoveSize(OLD,OLD,570,OLD); break; } |
SelectList_Init( |
LIST_PADDING, |
LIST_PADDING+PANEL_TOP_H, |
97,6 → 98,7 |
break; |
} |
} |
} |
void DrawWindowContent() |
{ |
107,8 → 109,8 |
button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_DELETE_LAST_SLOT, T_DELETE_LAST_SLOT); |
button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_DELETE_ALL_SLOTS, T_DELETE_ALL_SLOTS); |
button_x += DrawStandartCaptButton(button_x, select_list.y + select_list.h + 8, BT_UNLOCK, T_RESET_BUFFER_LOCK); |
WriteText(select_list.x+12, select_list.y - 23, 0x90, sc.work_text, T_COLUMNS_TITLE); |
WriteText(select_list.x+select_list.w - 88-14, select_list.y - 23, 0x90, sc.work_text, T_COLUMN_VIEW); |
WriteText(select_list.x+12, select_list.y - 23, select_list.font_type, sc.work_text, T_COLUMNS_TITLE); |
WriteText(select_list.x+select_list.w - 88-14, select_list.y - 23, select_list.font_type, sc.work_text, T_COLUMN_VIEW); |
ClipViewSelectListDraw(); |
SelectList_DrawBorder(); |
} |
127,6 → 129,10 |
{ |
int yyy, length, slot_data_type_number; |
dword line_text[2048]; |
dword size_kb; |
dword text_color = 0; |
dword bgcol = 0xFFFfff; |
if (i%2) bgcol = 0xF1F1F1; |
slot_data = Clipboard__GetSlotData(select_list.first + i); |
cdata.size = ESDWORD[slot_data]; |
138,27 → 144,30 |
cdata.content = slot_data + cdata.content_offset; |
yyy = i*select_list.item_h+select_list.y; |
DrawBar(select_list.x+1, yyy, select_list.w-1, select_list.item_h, -i%2 * 0x0E0E0E + 0xF1F1f1); |
WriteText(select_list.x+12, yyy+select_list.text_y, 0x90, 0x000000, itoa(select_list.first + i)); |
EDX = ConvertSizeToKb(cdata.size); |
WriteText(select_list.x+44, yyy+select_list.text_y, 0x90, 0x000000, EDX); |
DrawBar(select_list.x+1, yyy, select_list.w-1, select_list.item_h, bgcol); |
WriteText(select_list.x+12, yyy+select_list.text_y, select_list.font_type, text_color, itoa(select_list.first + i)); |
size_kb = ConvertSizeToKb(cdata.size); |
WriteText(select_list.x+44, yyy+select_list.text_y, select_list.font_type, text_color, size_kb); |
slot_data_type_number = cdata.type; |
WriteText(select_list.x+140, yyy+select_list.text_y, 0x90, 0x000000, data_type[slot_data_type_number]); |
WriteText(select_list.x+select_list.w - 88, yyy+select_list.text_y, 0x90, 0x006597, T_VIEW_OPTIONS); |
WriteText(select_list.x+140, yyy+select_list.text_y, select_list.font_type, text_color, data_type[slot_data_type_number]); |
WriteText(select_list.x+select_list.w - 88, yyy+select_list.text_y, select_list.font_type, 0x006597, T_VIEW_OPTIONS); |
DefineButton(select_list.x+select_list.w - 95, yyy, 50, select_list.item_h, 100+i+BT_HIDE, NULL); |
DefineButton(select_list.x+select_list.w - 95 + 51, yyy, 40, select_list.item_h, 300+i+BT_HIDE, NULL); |
length = select_list.w-236 - 95 / select_list.font_w - 2; |
if (cdata.size - cdata.content_offset < length) length = cdata.size - cdata.content_offset; |
strlcpy(#line_text, cdata.content, length); |
memmov(#line_text, cdata.content, length); |
replace_char(#line_text, 0, 31, length); // 31 is a dot |
WriteText(select_list.x+236, yyy+select_list.text_y, 0x90, 0x000000, #line_text); |
WriteText(select_list.x+236, yyy+select_list.text_y, select_list.font_type, text_color, #line_text); |
} |
int SaveSlotContents(dword size, off) { |
if (! CreateFile(size, off, DEFAULT_SAVE_PATH)) { |
EAX = CreateFile(size, off, DEFAULT_SAVE_PATH); |
if (!EAX) |
{ |
return true; |
} else { |
} |
else { |
notify("'Can not create /tmp0/1/clipview.tmp\nPreview function is not available.' -E"); |
return false; |
} |
/programs/cmm/diff/diff_gui.h |
---|
35,11 → 35,12 |
BID_GO |
}; |
#ifndef COPYING |
#define T_FIRST "First file:" |
#define T_SECOND "Second file:" |
#define T_GO " Compare " |
#endif |
#define READY 0 |
int state=READY; |
51,13 → 52,13 |
void gui() |
{ |
#define NO_DLL_INIT |
word btn; |
load_dll(boxlib, #box_lib_init,0); |
load_dll(Proc_lib, #OpenDialog_init,0); |
OpenDialog_init stdcall (#o_dialog); |
@SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
loop() switch(@WaitEvent()) |
loop() switch(WaitEvent()) |
{ |
case evMouse: |
if (READY == state) { |
67,22 → 68,23 |
break; |
case evButton: |
@GetButtonID(); |
if (EAX == BID_EXIT_PRC) ExitProcess(); |
if (EAX == BID_SRC_OPEN) EventOpenDialogFirst(); |
if (EAX == BID_DST_OPEN) EventOpenDialogSecond(); |
if (EAX == BID_GO) EventGo(); |
btn = @GetButtonID(); |
if (btn == BID_EXIT_PRC) ExitProcess(); |
if (btn == BID_SRC_OPEN) EventOpenDialogFirst(); |
if (btn == BID_DST_OPEN) EventOpenDialogSecond(); |
if (btn == BID_GO) EventGo(); |
break; |
case evKey: |
@GetKey(); |
GetKeys(); |
if (key_scancode == SCAN_CODE_ESC) ExitProcess(); |
if (key_scancode == SCAN_CODE_TAB) EventTabClick(); |
if (key_scancode == SCAN_CODE_ENTER) EventGo(); |
if (key_scancode == SCAN_CODE_INS) EventInsert(); |
EAX = key_editbox; |
edit_box_key stdcall (#src_box); |
EAX = key_editbox; |
edit_box_key stdcall (#dst_box); |
EAX >>= 16; |
if (AL == SCAN_CODE_ESC) ExitProcess(); |
if (AL == SCAN_CODE_TAB) EventTabClick(); |
if (AL == SCAN_CODE_ENTER) EventGo(); |
if (AL == SCAN_CODE_INS) EventInsert(); |
break; |
case evReDraw: |
101,7 → 103,16 |
DrawFileBox(#dst_box, T_SECOND, BID_DST_OPEN); |
DrawStandartCaptButton(dst_box.left - 2, dst_box.top + 40, BID_GO, T_GO); |
} |
#ifdef COPYING |
if (COPYING==state) { |
pr.frame_color = sc.work_graph; |
DrawRectangle3D(PR_LEFT-1, PR_TOP-1, PR_W+1, PR_H+1, sc.work_dark, |
sc.work_light); |
DrawProgress(); |
DrawStandartCaptButton(-19*8+WIN_W/2-15, dst_box.top + 35, B_STOP, " Stop "); |
} |
#endif |
} |
void UpdateEditBoxes(dword f1, f2) |
{ |
117,6 → 128,7 |
// // |
//===================================================// |
#ifndef COPYING |
void EventGo() |
{ |
char run_param[4096]; |
123,6 → 135,7 |
wsprintf(#run_param, "\"%s\" \"%s\"", #src_path, #dst_path); |
RunProgram(I_Path, #run_param); |
} |
#endif |
void EventTabClick() |
{ |
145,6 → 158,9 |
void EventOpenDialogSecond() |
{ |
#ifdef COPYING |
o_dialog.type = 1; //0-file, 1-save, 2-select folder |
#endif |
OpenDialog_start stdcall (#o_dialog); |
if (o_dialog.status) { |
strcpy(#dst_path, #openfile_path); |
/programs/cmm/notes/notes.c |
---|
44,8 → 44,9 |
#include "engine.h" |
#include "ini.h" |
dword ed_mouse; |
edit_box notebox = {NULL,NULL,NULL,COL_BG_ACTIVE,0x94AECE,COL_BG_ACTIVE,0xffffff,0, |
MAX_LINE_CHARS-1,NULL,0,ed_always_focus+ed_focus}; |
MAX_LINE_CHARS-1,NULL,#ed_mouse,ed_always_focus+ed_focus}; |
dword lists[] = { 0xEAEAEA, 0xCDCDCD, 0xF0F0F0, 0xD8D8D8, 0 }; |
bool delete_active = false; |
60,6 → 61,7 |
void main() |
{ |
int btn; |
bool first_redraw=true; |
dword cur_line_offset; |
load_dll(boxlib, #box_lib_init,0); |
68,10 → 70,10 |
if (param) notes.OpenTxt(#param); else notes.OpenTxt("/sys/notes.txt"); |
@SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); |
LoadIniSettings(); |
loop() switch(@WaitEvent()) |
loop() switch(WaitEvent()) |
{ |
case evMouse: |
edit_box_mouse stdcall (#notebox); |
99,8 → 101,8 |
break; |
case evButton: |
@GetButtonID(); |
switch(EAX) |
btn = GetButtonID(); |
switch(btn) |
{ |
case CLOSE_BTN: |
EventExitApp(); |
109,7 → 111,7 |
EventDeleteCurrentNode(); |
break; |
default: |
EventCheckBoxClick(EAX-CHECKBOX_ID); |
EventCheckBoxClick(btn-CHECKBOX_ID); |
break; |
} |
break; |