Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7944 → Rev 7945

/programs/cmm/quark/data.h
13,7 → 13,7
 
char copied_chars[] = "‘ª®¯¨à®¢ ­® ᨢ®«®¢: %i";
 
char about[] = "Quark Text v0.7
char about[] = "Quark Text v0.72
€¢â®à: Š¨à¨«« ‹¨¯ â®¢ aka Leency
‘ ©â: http://aspero.pro
 
52,7 → 52,7
 
char copied_chars[] = "Copied %i chars";
 
char about[] = "Quark Text v0.7
char about[] = "Quark Text v0.72
Author: Kiril Lipatov aka Leency
Website: http://aspero.pro
 
129,7 → 129,7
Form.left = ini.GetInt("WinX", 150);
Form.top = ini.GetInt("WinY", 50);
Form.width = ini.GetInt("WinW", 640);
Form.height = ini.GetInt("WinH", 560);
Form.height = ini.GetInt("WinH", 563);
}
 
void SaveIniSettings()
/programs/cmm/quark/quark.c
55,6 → 55,8
int curcol_scheme;
int font_size;
 
bool enable_edit = false;
 
#include "data.h"
 
#include "search.h"
255,8 → 257,9
if (list.ProcessKey(key_scancode)) {
if (key_modifier & KEY_LSHIFT) || (key_modifier & KEY_RSHIFT) selection.set_end();
DrawPage();
return;
}
//EventInsertCharIntoText();
if(enable_edit) EventInsertCharIntoText();
}
 
void HandleMouseEvent()
314,7 → 317,7
{
int new_y = search.find_next(list.first);
if (new_y) {
list.first = new_y / list.item_h;
list.first = new_y;
list.CheckDoesValuesOkey();
DrawPage();
}
576,6 → 579,13
DrawStatusBar(#copy_status_text);
}
 
void EventEnableEdit()
{
enable_edit ^= 1;
if (enable_edit) notify("'Edit mode is enabled.\nNow you can only replace text, not insert, nor delete.'I");
draw_window();
}
 
//===================================================//
// //
// DRAWS AND OTHER FUNCS //
638,19 → 648,21
DrawBar(0, 0, Form.cwidth, TOOLBAR_H - 1, sc.work);
DrawBar(0, TOOLBAR_H - 1, Form.cwidth, 1, sc.work_graph);
//AddTopBarButton(#EventNewFile, ECTRL+SCAN_CODE_KEY_N, 2, x.set(8), false);
AddTopBarButton(#EventOpenDialog, ECTRL+SCAN_CODE_KEY_O, 0, x.set(8), false);
//AddTopBarButton(#EventSave, ECTRL+SCAN_CODE_KEY_S, 5, x.inc(SMALL_GAP), false);
x.set(-SMALL_GAP+8);
if(enable_edit) AddTopBarButton(#EventNewFile, ECTRL+SCAN_CODE_KEY_N, 2, x.inc(SMALL_GAP), false);
AddTopBarButton(#EventOpenDialog, ECTRL+SCAN_CODE_KEY_O, 0, x.inc(SMALL_GAP), false);
if(enable_edit) && (param[0]) AddTopBarButton(#EventSave, ECTRL+SCAN_CODE_KEY_S, 5, x.inc(SMALL_GAP), false);
AddTopBarButton(#EventShowFileInfo, ECTRL+SCAN_CODE_KEY_I, 10, x.inc(SMALL_GAP), false);
AddTopBarButton(#EventMagnifyMinus, ECTRL+SCAN_CODE_MINUS, 33, x.inc(BIG_GAP), false);
AddTopBarButton(#EventMagnifyPlus, ECTRL+SCAN_CODE_PLUS, 32, x.inc(SMALL_GAP), false);
AddTopBarButton(#EventClickSearch, ECTRL+SCAN_CODE_KEY_F, 49, x.inc(BIG_GAP), serha); search_mx = EAX;
x.set(Form.cwidth-4);
//AddTopBarButton(#EventShowInfo, NULL, -1, x.inc(-SMALL_GAP), false); burger_mx = EAX;
AddTopBarButton(#EventShowThemesList, NULL, 40, x.inc(-SMALL_GAP), thema); theme_mx = EAX;
AddTopBarButton(#EventEnableEdit, NULL, 38, x.inc(-SMALL_GAP), enable_edit);
//if(enable_edit) AddTopBarButton(#EventShowInfo, NULL, -1, x.inc(-SMALL_GAP), false); burger_mx = EAX;
AddTopBarButton(#EventShowThemesList, NULL, 40, x.inc(-BIG_GAP), thema); theme_mx = EAX;
AddTopBarButton(#EventShowReopenMenu, ECTRL+SCAN_CODE_KEY_E, 16, x.inc(-SMALL_GAP), reopa); reopenin_mx = EAX;
//AddTopBarButton(#EventOpenSysfuncs, NULL, 18, x.inc(-SMALL_GAP), false);
//AddTopBarButton(#EventOpenPipet, NULL, 39, x.inc(-SMALL_GAP), false);
if(enable_edit) AddTopBarButton(#EventOpenSysfuncs, NULL, 18, x.inc(-SMALL_GAP), false);
if(enable_edit) AddTopBarButton(#EventOpenPipet, NULL, 39, x.inc(-SMALL_GAP), false);
}
 
void DrawStatusBar(dword _in_text)
719,6 → 731,6
list.item_w = list.font_w;
list.horisontal_selelection = true;
list.SetSizes(0, TOOLBAR_H, Form.cwidth-scroll.size_x-1,
Form.cheight - TOOLBAR_H - search.height() - STATUSBAR_H /*- TAB_H*/,
Form.cheight - TOOLBAR_H - calc(search.visible * SEARCH_H) - STATUSBAR_H /*- TAB_H*/,
math.round(list.font_h * 1.4));
}
/programs/cmm/quark/search.h
9,8 → 9,6
void show();
void hide();
bool draw();
void draw_found();
int height();
bool edit_key();
bool edit_mouse();
void clear();
37,11 → 35,6
draw_window();
}
 
int SEARCH::height()
{
return visible * SEARCH_H;
}
 
bool SEARCH::edit_key()
{
if (visible) && (search_box.flags & ed_focus) {
61,16 → 54,9
return false;
}
 
void SEARCH::draw_found()
bool SEARCH::draw(dword _btn_find, _btn_hide, _y)
{
char matches[30];
sprintf(#matches, T_MATCHES, found_count);
WriteTextWithBg(search_box.left+search_box.width+14+110,
search_box.top+3, 0xD0, sc.work_text, #matches, sc.work);
}
 
bool SEARCH::draw(dword _btn_find, _btn_hide, _y)
{
if (!visible) return false;
DrawBar(0, _y, Form.cwidth, 1, sc.work_graph);
DrawBar(0, _y+1, Form.cwidth, SEARCH_H-1, sc.work);
85,7 → 71,9
DrawCaptButton(search_box.left+search_box.width+14, search_box.top-1, 90,
TOOLBAR_ICON_HEIGHT+1, _btn_find, sc.work_light, sc.work_text, T_FIND_NEXT);
 
draw_found();
sprintf(#matches, T_MATCHES, found_count);
WriteTextWithBg(search_box.left+search_box.width+14+110,
search_box.top+3, 0xD0, sc.work_text, #matches, sc.work);
 
DefineHiddenButton(Form.cwidth-26, search_box.top-1, TOOLBAR_ICON_HEIGHT+1,
TOOLBAR_ICON_HEIGHT+1, _btn_hide);
106,12 → 94,11
if (!search_text[0]) return false;
 
strcpy(#found_text, #search_text);
//highlight(0xFF0000, _bg_color);
found_count = strnum(io.buffer_data, #found_text);
draw_found();
found_count = strinum(io.buffer_data, #found_text);
draw_window();
 
for (i=_cur_pos+1; i<list.count; i++) {
if (strstri(lines.get(i),#search_text)!=-1) return atoi(lines.get(i));
if (strstri(lines.get(i),#search_text)) return i;
}
return false;
}