Subversion Repositories Kolibri OS

Rev

Rev 7444 | Rev 7629 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7444 Rev 7532
Line 37... Line 37...
37
#define WIN_H RED_LINE_X*LINES_COUNT+HEADER_HEIGHT+4
37
#define WIN_H RED_LINE_X*LINES_COUNT+HEADER_HEIGHT+4
Line 38... Line 38...
38
 
38
 
39
#define DELETE_BTN 4;
39
#define DELETE_BTN 4;
Line -... Line 40...
-
 
40
#define DELETE_W sizeof(DELETE_TEXT)+2*6
-
 
41
 
40
#define DELETE_W sizeof(DELETE_TEXT)+2*6
42
proc_info Form;
-
 
43
 
Line 41... Line 44...
41
 
44
#include "engine.h"
42
#include "engine.h"
45
#include "ini.h"
43
 
46
 
44
dword ed_mouse;
47
dword ed_mouse;
Line 66... Line 69...
66
	if (GetCpuFrequency()/1000000>=1000) window_dragable=true; else window_dragable=false;
69
	if (GetCpuFrequency()/1000000>=1000) window_dragable=true; else window_dragable=false;
Line 67... Line 70...
67
	
70
	
Line 68... Line 71...
68
	if (param) notes.OpenTxt(#param); else notes.OpenTxt(abspath("notes.txt"));
71
	if (param) notes.OpenTxt(#param); else notes.OpenTxt(abspath("notes.txt"));
-
 
72
 
Line 69... Line 73...
69
 
73
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
70
	SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
74
	LoadIniSettings();
71
 
75
 
72
	loop() switch(WaitEvent())
76
	loop() switch(WaitEvent())
Line 162... Line 166...
162
 
166
 
163
void draw_window()
167
void draw_window()
164
{
168
{
165
	int i;
169
	int i;
166
	if (window_dragable) 
170
	if (window_dragable) 
167
		DefineUnDragableWindow(100,100,WIN_W, WIN_H);
171
		DefineUnDragableWindow(Form.left,Form.top,WIN_W, WIN_H);
168
	else 
172
	else 
-
 
173
		DefineDragableWindow(Form.left,Form.top,WIN_W, WIN_H);
169
		DefineDragableWindow(100,100,WIN_W, WIN_H);
174
	GetProcessInfo(#Form, SelfInfo);
170
	notes.SetSizes(RED_LINE_X+1, HEADER_HEIGHT, WIN_W-1, RED_LINE_X*LINES_COUNT, RED_LINE_X);
175
	notes.SetSizes(RED_LINE_X+1, HEADER_HEIGHT, WIN_W-1, RED_LINE_X*LINES_COUNT, RED_LINE_X);
171
	DrawRectangle3D(0,0,WIN_W,TITLE_H-1,0xBB6535, 0xCD6F3B);
176
	DrawRectangle3D(0,0,WIN_W,TITLE_H-1,0xBB6535, 0xCD6F3B);
172
	DrawRectangle3D(1,1,WIN_W-2,TITLE_H-3,0xEFBFA4, 0xDD8452);
177
	DrawRectangle3D(1,1,WIN_W-2,TITLE_H-3,0xEFBFA4, 0xDD8452);
173
	DrawBar(2,2,WIN_W-3,TITLE_H-4,0xE08C5E);
178
	DrawBar(2,2,WIN_W-3,TITLE_H-4,0xE08C5E);
Line 211... Line 216...
211
}
216
}
Line 212... Line 217...
212
 
217
 
213
void EventExitApp()
218
void EventExitApp()
214
{
219
{
-
 
220
	notes.SaveTxt();
215
	notes.SaveTxt();
221
	SaveIniSettings();
216
	ExitProcess();
222
	ExitProcess();
Line 217... Line 223...
217
}
223
}
218
 
224