Subversion Repositories Kolibri OS

Rev

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

Rev 5719 Rev 5723
Line 231... Line 231...
231
				{
231
				{
232
					if (files.MouseScroll(mouse.vert)) List_ReDraw();
232
					if (files.MouseScroll(mouse.vert)) List_ReDraw();
233
					break;
233
					break;
234
				}
234
				}
Line 235... Line 235...
235
 
235
 
236
				if (mouse.x>=Form.width-26) && (mouse.x<=Form.width-6) && (mouse.y>40) && (mouse.y
236
				if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y-17) && (mouse.y
237
				{
237
				{
238
					if (mouse.lkm==1) DrawRectangle3D(Form.cwidth - 17,41,14,14,0xC7C7C7,0xFFFFFF);
238
					if (mouse.lkm==1) DrawRectangle3D(files.x+files.w+1,files.y-16,14,14,0xC7C7C7,0xFFFFFF);
239
					WHILE (mouse.lkm==1) && (files.first>0)
239
					WHILE (mouse.lkm==1) && (files.first>0)
240
					{
240
					{
241
						pause(8);
241
						pause(8);
242
						files.first--;
242
						files.first--;
243
						List_ReDraw();
243
						List_ReDraw();
244
						mouse.get();
244
						mouse.get();
245
					}
245
					}
246
					DrawRectangle3D(Form.cwidth - 17,41,14,14,0xFFFFFF,0xC7C7C7);
246
					DrawRectangle3D(files.x+files.w+1,files.y-16,14,14,0xFFFFFF,0xC7C7C7);
Line 247... Line 247...
247
				}
247
				}
248
 
248
 
249
				if (mouse.x>=Form.width-26) && (mouse.x<=Form.width-6) && (mouse.y>onTop(22,0)+1) && (mouse.y
249
				if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+16) && (mouse.y>files.y+files.h-16) && (mouse.y
250
				{
250
				{
251
					if (mouse.lkm==1) DrawRectangle3D(Form.cwidth - 17,onTop(21,0),14,14,0xC7C7C7,0xFFFFFF);
251
					if (mouse.lkm==1) DrawRectangle3D(files.x+files.w+1,files.y+files.h-15,14,14,0xC7C7C7,0xFFFFFF);
252
					while (mouse.lkm==1) && (files.first
252
					while (mouse.lkm==1) && (files.first
253
					{
253
					{
254
						pause(8);
254
						pause(8);
255
						files.first++;
255
						files.first++;
256
						List_ReDraw();
256
						List_ReDraw();
257
						mouse.get();
257
						mouse.get();
258
					}
258
					}
Line 259... Line 259...
259
					DrawRectangle3D(Form.cwidth - 17,onTop(21,0),14,14,0xFFFFFF,0xC7C7C7);
259
					DrawRectangle3D(files.x+files.w+1,files.y+files.h-15,14,14,0xFFFFFF,0xC7C7C7);
260
				}
260
				}
261
 
261
 
Line 262... Line 262...
262
				//Scrooll
262
				//Scrooll
263
				if (!mouse.lkm) && (scroll_used) { scroll_used=false; Scroll(); }
263
				if (!mouse.lkm) && (scroll_used) { scroll_used=false; Scroll(); }
264
				if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+18) && (mouse.y>files.y) && (mouse.y
264
				if (mouse.x>=files.x+files.w) && (mouse.x<=files.x+files.w+18) && (mouse.y>files.y) && (mouse.y
265
				
265
				
266
				if (scroll_used)
-
 
267
				{
266
				if (scroll_used)
268
					if (sc_slider_h/2+files.y>mouse.y) || (mouse.y<0) || (mouse.y>4000) mouse.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii
267
				{
269
					id=files.first;
268
					if (sc_slider_h/2+files.y>mouse.y) || (mouse.y<0) || (mouse.y>4000) mouse.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii
270
					j= sc_slider_h/2;
269
					id = files.first;
271
					files.first = mouse.y -j -files.y * files.count;
270
					files.first = -sc_slider_h / 2 + mouse.y -j -files.y * files.count;
272
					files.first /= onTop(22,files.y);
271
					files.first /= Form.cheight - 18 - files.y;
Line 279... Line 278...
279
					if (mouse.x
278
					if (mouse.x
280
					{
279
					{
281
						if (active_panel!=1)
280
						if (active_panel!=1)
282
						{
281
						{
283
							active_panel = 1;
282
							active_panel = 1;
284
							active_current = inactive_current;
-
 
285
							inactive_current = files.current;
-
 
286
							active_first = inactive_first;
283
							goto __SET_VALS_AND_DRAW;
287
							inactive_first = files.first;
-
 
288
							strcpy(#active_path, #inactive_path);
-
 
289
							strcpy(#inactive_path, #path);
-
 
290
							draw_window();
-
 
291
						}
284
						}
292
					}
285
					}
293
					else
286
					else
294
					{
287
					{
295
						if (active_panel!=2)
288
						if (active_panel!=2)
296
						{
289
						{
297
							active_panel = 2;
290
							active_panel = 2;
-
 
291
							__SET_VALS_AND_DRAW:
298
							active_current = inactive_current;
292
							active_current = inactive_current;
299
							inactive_current = files.current;
293
							inactive_current = files.current;
300
							active_first = inactive_first;
294
							active_first = inactive_first;
301
							inactive_first = files.first;
295
							inactive_first = files.first;
302
							strcpy(#active_path, #inactive_path);
296
							strcpy(#active_path, #inactive_path);
303
							strcpy(#inactive_path, #path);
297
							strcpy(#inactive_path, #path);
304
							draw_window();
298
							DrawFilePanels();
305
						}
299
						}
306
					}
300
					}
307
				}
301
				}
308
				break;  
302
				break;  
309
	//Button pressed-----------------------------------------------------------------------------
303
	//Button pressed-----------------------------------------------------------------------------
Line 395... Line 389...
395
					{
389
					{
396
						case 059...068:
390
						case 059...068:
397
								key_scancode -= 59;
391
								key_scancode -= 59;
398
								if (key_scancode
392
								if (key_scancode
399
								{
393
								{
-
 
394
									if (!two_panels)
-
 
395
									{
400
									DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
396
										DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
401
									pause(7);
397
										pause(7);										
-
 
398
									}
402
									ClickOnDisk(key_scancode);
399
									ClickOnDisk(key_scancode);
403
								}
400
								}
404
								break;
401
								break;
405
						case 45:  //Ctrl+X
402
						case 45:  //Ctrl+X
406
								Copy(#file_path, CUT);
403
								Copy(#file_path, CUT);
Line 554... Line 551...
554
	PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal);
551
	PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal);
555
	//main rectangles
552
	//main rectangles
556
	DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph);
553
	DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42,system.color.work_graph);
557
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
554
	DrawRectangle(0,39,Form.cwidth-1,Form.cheight - 40,col_palette[4]); //bg
558
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);	
555
	for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]);
-
 
556
	active_current = files.current;
-
 
557
	active_first = files.first;
-
 
558
	strcpy(#active_path, #path);
-
 
559
	DrawFilePanels();
-
 
560
	if (del_active) Del_Form();
-
 
561
	if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
-
 
562
}
-
 
563
 
-
 
564
void DrawList() 
-
 
565
{
-
 
566
	DrawFlatButton(files.x,files.y -  17,  files.w - 141,16,31,system.color.work,T_FILE);
-
 
567
	DrawFlatButton(files.x + files.w - 141,  files.y-17,73,16,32,system.color.work,T_TYPE);
-
 
568
	DrawFlatButton(files.x + files.w -  68,  files.y-17,68,16,33,system.color.work,T_SIZE);
-
 
569
	DrawFlatButton(files.x + files.w,        files.y-17,16,16, 0,system.color.work,"\x18");
-
 
570
	DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16, 0,system.color.work,"\x19");
-
 
571
	DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph);
-
 
572
	if (two_panels) && (files.x<5) DrawBar(files.x+files.w+16,files.y,1,files.h,system.color.work_graph);
-
 
573
	Open_Dir(#path,WITH_REDRAW);
-
 
574
}
-
 
575
 
-
 
576
void DrawFilePanels()
-
 
577
{
559
	if (!two_panels)
578
	if (!two_panels)
560
	{
579
	{
561
		DrawLeftPanel();
580
		DrawDeviceAndActionsLeftPanel();
562
		files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h);
581
		files.SetSizes(192, 57, Form.cwidth - 210, Form.cheight - 59, files.line_h);
563
		DrawList();
582
		DrawList();
564
	}
583
	}
565
	else
584
	else
566
	{
585
	{
Line 589... Line 608...
589
			strcpy(#path, #active_path);
608
			strcpy(#path, #active_path);
590
			files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h);
609
			files.SetSizes(Form.cwidth/2, 57+22, Form.cwidth/2 -17, Form.cheight-59-22, files.line_h);
591
			DrawList();
610
			DrawList();
592
		}
611
		}
593
	}
612
	}
594
	if (del_active) Del_Form();
-
 
595
	if (new_element_active) NewElement_Form(new_element_active, #new_element_name);
-
 
596
}
-
 
597
 
-
 
598
void DrawList() 
-
 
599
{
-
 
600
	DrawFlatButton(files.x,files.y -  17,  files.w - 141,16,31,system.color.work,T_FILE);
-
 
601
	DrawFlatButton(files.x + files.w - 141,  files.y-17,73,16,32,system.color.work,T_TYPE);
-
 
602
	DrawFlatButton(files.x + files.w -  68,  files.y-17,68,16,33,system.color.work,T_SIZE);
-
 
603
	DrawFlatButton(files.x + files.w,        files.y-17,16,16, 0,system.color.work,"\x18");
-
 
604
	DrawFlatButton(files.x + files.w,files.y+files.h-16,16,16, 0,system.color.work,"\x19");
-
 
605
	DrawBar(files.x+files.w,files.y,1,files.h,system.color.work_graph);
-
 
606
	Open_Dir(#path,WITH_REDRAW);
-
 
607
}
613
}
Line 608... Line 614...
608
 
614
 
609
 
615
 
Line 1086... Line 1092...
1086
			if (!itdir) RunProgram("/sys/develop/heed", #file_path);
1092
			if (!itdir) RunProgram("/sys/develop/heed", #file_path);
1087
			break;
1093
			break;
1088
		case 5: //refresh cur dir & devs
1094
		case 5: //refresh cur dir & devs
1089
			if (two_panels)
1095
			if (two_panels)
1090
			{
1096
			{
1091
				draw_window();
1097
				DrawFilePanels();
1092
			}
1098
			}
1093
			else 
1099
			else 
1094
			{
1100
			{
1095
				Tip(56, T_DEVICES, 55, "-");
1101
				Tip(56, T_DEVICES, 55, "-");
1096
				Open_Dir(#path,WITH_REDRAW);
1102
				Open_Dir(#path,WITH_REDRAW);
1097
				pause(10);
1103
				pause(10);
1098
				LoadIniSettings();
1104
				LoadIniSettings();
1099
				GetSystemDiscs();
1105
				GetSystemDiscs();
1100
				Open_Dir(#path,WITH_REDRAW);
1106
				Open_Dir(#path,WITH_REDRAW);
1101
				DrawLeftPanel();				
1107
				DrawDeviceAndActionsLeftPanel();				
1102
			}
1108
			}
1103
			break;
1109
			break;
1104
		case 6:
1110
		case 6:
1105
			NewElement_Form(CREATE_FOLDER, T_NEW_FOLDER);
1111
			NewElement_Form(CREATE_FOLDER, T_NEW_FOLDER);
1106
			break;
1112
			break;