Subversion Repositories Kolibri OS

Rev

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

Rev 6158 Rev 6191
Line 28... Line 28...
28
#include "imgs\icons.txt"
28
#include "imgs\icons.txt"
Line 29... Line 29...
29
 
29
 
30
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
30
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
Line 31... Line 31...
31
enum {CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement
31
enum {CREATE_FILE=1, CREATE_FOLDER, RENAME_ITEM }; //NewElement
Line 32... Line 32...
32
 
32
 
Line 33... Line 33...
33
dword col_padding, col_selec, col_lpanel;
33
dword col_padding, col_selec, col_lpanel, col_work, col_graph;
34
 
34
 
Line 189... Line 189...
189
							Dir_Up();
189
							Dir_Up();
190
							stats = 0;
190
							stats = 0;
191
						}
191
						}
192
					}
192
					}
193
				}	
193
				}	
194
				if (files.MouseOver(mouse.x, mouse.y))&&((mouse.down|mouse.dblclick|mouse.up))
194
				if (files.MouseOver(mouse.x, mouse.y))
195
				{
-
 
196
					//select/open file {
-
 
197
					if (mouse.key&MOUSE_LEFT)&&((mouse.down)||(mouse.dblclick))
-
 
198
					{
195
				{
-
 
196
					//open
199
						if (mouse.y>=files.y)//&&(mouse.click)
197
					if (mouse.key&MOUSE_LEFT)&&(mouse.dblclick) 
200
						{
198
					{
201
							id = mouse.y - files.y / files.item_h + files.first;
199
						if (mouse.y - files.y / files.item_h + files.first < files.count) 
202
							if (files.cur_y!=id)
-
 
203
							{
200
						{
204
								mouse.clearTime();
201
							files.ProcessMouse(mouse.x, mouse.y);
205
								if(!mouse.up)&&(id-files.first
-
 
206
									files.cur_y = id;
-
 
207
									List_ReDraw();
202
							List_ReDraw();
-
 
203
							Open(0);					
208
								}
204
						}
209
							}
205
					}
-
 
206
					//select file
210
							else IF(mouse.dblclick)Open(0);
207
					else if (mouse.key&MOUSE_LEFT)&&((mouse.down)
211
						}
208
					{
-
 
209
						if (files.ProcessMouse(mouse.x, mouse.y)) List_ReDraw();
212
					}
210
					}
213
					// } select/open file
-
 
214
					else
-
 
215
					//file menu {
211
					//file menu
216
					if (mouse.key&MOUSE_RIGHT)&&(mouse.up)
212
					else if (mouse.key&MOUSE_RIGHT)&&(mouse.up)
217
					{
213
					{
218
						menu_call_mouse = 1;
214
						menu_call_mouse = 1;
Line 219... Line 215...
219
						
215
						
220
						if (files.MouseOver(mouse.x, mouse.y))
216
						if (files.MouseOver(mouse.x, mouse.y))
Line 224... Line 220...
224
							menu_stak = malloc(4096);
220
							menu_stak = malloc(4096);
225
							CreateThread(#FileMenu,menu_stak+4092);	
221
							CreateThread(#FileMenu,menu_stak+4092);	
226
						}
222
						}
227
						break;
223
						break;
228
					}
224
					}
229
					// } file menu
-
 
230
				}
225
				}
Line 231... Line 226...
231
 
226
 
232
				if (mouse.vert)
227
				if (mouse.vert)
233
				{
228
				{
Line 536... Line 531...
536
	}
531
	}
537
}
532
}
Line 538... Line 533...
538
 
533
 
539
void draw_window()
534
void draw_window()
540
{
535
{
541
	DefineAndDrawWindow(WinX+rand_n,WinY+rand_n,WinW,WinH,0x73,system.color.work,TITLE,0);
536
	DefineAndDrawWindow(WinX+rand_n,WinY+rand_n,WinW,WinH,0x73,NULL,TITLE,0);
542
	GetProcessInfo(#Form, SelfInfo);
537
	GetProcessInfo(#Form, SelfInfo);
543
	if (Form.status_window>2) return;
538
	if (Form.status_window>2) return;
544
	if (Form.height < 350) { MoveSize(OLD,OLD,OLD,350); return; }
539
	if (Form.height < 350) { MoveSize(OLD,OLD,OLD,350); return; }
545
	if (Form.width  < 480) { MoveSize(OLD,OLD,480,OLD); return; }
540
	if (Form.width  < 480) { MoveSize(OLD,OLD,480,OLD); return; }
546
	GetProcessInfo(#Form, SelfInfo); //if win_size changed
541
	GetProcessInfo(#Form, SelfInfo); //if win_size changed
547
	PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal);
542
	PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal);
548
	DrawBar(127, 8, 1, 25, system.color.work_graph);
543
	DrawBar(127, 8, 1, 25, col_graph);
549
	for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,system.color.work);
544
	for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,NULL);
550
	for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,system.color.work);
545
	for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,NULL);
551
	DrawBar(246,0,Form.cwidth - 297,12, system.color.work); //upper editbox
546
	DrawBar(246,0, Form.cwidth - 297,12, col_work); //upper editbox
552
	DrawBar(246,29,Form.cwidth - 297,5,system.color.work);  //under editbox
547
	DrawBar(246,29,Form.cwidth - 297,5,  col_work); //lower editbox
553
	DrawRectangle(246,12,Form.cwidth - 303,16,system.color.work_graph);
548
	DrawRectangle(246,12,Form.cwidth - 303,16,col_graph);
554
	DefineButton(Form.cwidth - 32,6,27,28,51+BT_HIDE+BT_NOFRAME,0); //about
549
	DefineButton(Form.cwidth - 32,6,27,28,51+BT_HIDE+BT_NOFRAME,0); //about
555
	PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal);
550
	PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal);
556
	//main rectangles
551
	//main rectangles
557
	DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph);
552
	DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,col_graph);
558
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
553
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
559
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
554
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
560
	llist_copy(#files_active, #files);
555
	llist_copy(#files_active, #files);
561
	strcpy(#active_path, #path);
556
	strcpy(#active_path, #path);
Line 573... Line 568...
573
	DrawFlatButton(files.x + files.w,       files.y-17,16,16, 0,"\x18");
568
	DrawFlatButton(files.x + files.w,       files.y-17,16,16, 0,"\x18");
574
	DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16,0,"\x19");
569
	DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16,0,"\x19");
575
	if (sort_num==1) sorting_arrow_x = files.w - 141 / 2 + files.x + 18;
570
	if (sort_num==1) sorting_arrow_x = files.w - 141 / 2 + files.x + 18;
576
	if (sort_num==2) sorting_arrow_x = files.x + files.w - 90;
571
	if (sort_num==2) sorting_arrow_x = files.x + files.w - 90;
577
	if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
572
	if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
578
	WriteText(sorting_arrow_x,files.y-12,0x80,system.color.work_graph,"\x19");
573
	WriteText(sorting_arrow_x,files.y-12,0x80,col_graph,"\x19");
579
	DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph);
574
	DrawBar(files.x+files.w,files.y,1,files.h,col_graph);
580
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph);	
575
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,col_graph);	
581
}
576
}
Line 582... Line 577...
582
 
577
 
583
void DrawFilePanels()
578
void DrawFilePanels()
584
{
579
{
Line 1110... Line 1105...
1110
	if (new_element_active==3) DrawEolitePopup(T_RENAME, T_CANCEL);
1105
	if (new_element_active==3) DrawEolitePopup(T_RENAME, T_CANCEL);
1111
	else DrawEolitePopup(T_CREATE, T_CANCEL);
1106
	else DrawEolitePopup(T_CREATE, T_CANCEL);
1112
	new_file_ed.left = dform_x+24;
1107
	new_file_ed.left = dform_x+24;
1113
	edit_box_draw  stdcall (#new_file_ed);
1108
	edit_box_draw  stdcall (#new_file_ed);
1114
	DrawRectangle(new_file_ed.left-1, new_file_ed.top-1, new_file_ed.width+2, 16, 0xFFFfff);
1109
	DrawRectangle(new_file_ed.left-1, new_file_ed.top-1, new_file_ed.width+2, 16, 0xFFFfff);
1115
	DrawRectangle(new_file_ed.left-2, new_file_ed.top-2, new_file_ed.width+4, 18, system.color.work_graph);
1110
	DrawRectangle(new_file_ed.left-2, new_file_ed.top-2, new_file_ed.width+4, 18, col_graph);
1116
}
1111
}
Line 1117... Line 1112...
1117
 
1112
 
1118
void FnProcess(byte N)
1113
void FnProcess(byte N)
1119
{
1114
{