Subversion Repositories Kolibri OS

Rev

Rev 8868 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6289 leency 1
 
2
void DrawPathBar()
3
{
4
	if (efm) {
8854 leency 5
		return;
6
		PathShow.start_x = 10;
8872 leency 7
		PathShow.start_y = Form.cheight - status_bar_h;
8
	} else {
9
		PathShow.start_x = 250;
10
		PathShow.start_y = 17;
11
		if (show_breadcrumb.checked) {
12
			DrawBreadCrumbs();
13
			return;
14
		}
15
	}
8854 leency 16
17
 
6291 leency 18
	DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line);
7634 leency 19
	DrawRectangle(PathShow.start_x-4,PathShow.start_y-7,PathShow.area_size_x+4,20,sc.work_graph);
7806 leency 20
	DefineHiddenButton(PathShow.start_x-4+1,PathShow.start_y-7+1,PathShow.area_size_x+4-2,20-2,PATH_BTN);
7422 leency 21
	DrawBar(PathShow.start_x-4, PathShow.start_y+14, PathShow.area_size_x+5+18, 1, sc.work_light);
7806 leency 22
7462 leency 23
 
24
25
 
7634 leency 26
	PathShow.font_color = col.list_gb_text;
27
	PathShow_prepare stdcall(#PathShow);
6289 leency 28
	PathShow_draw stdcall(#PathShow);
29
}
30
31
 
32
 collection_int breadCrumb=0;
7972 leency 33
 char PathShow_path[4096];
6289 leency 34
 block btn;
7227 leency 35
 int i;
6289 leency 36
 unsigned text_line;
8868 leency 37
 {
6289 leency 38
	strcat(#PathShow_path, #path);
39
	for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID);
40
	breadCrumb.drop();
41
	for (i=0; PathShow_path[i]; i++)
42
	{
43
		if (PathShow_path[i]=='/') {
44
			PathShow_path[i] = NULL;
45
			breadCrumb.add(i+1);
46
		}
47
	}
48
	breadCrumb.add(i+1);
6782 leency 49
	btn.set_size(246,10,NULL,20);
6739 leency 50
	//area_w = Form.cwidth - btn.x - 20;
8868 leency 51
	for (i=0; i
6289 leency 52
	{
53
		text_line = breadCrumb.get(i) + #PathShow_path;
54
		btn.w = strlen(text_line)*8+10;
55
		DrawBreadcrumbButton(btn.x, btn.y, btn.w, btn.h, i+BREADCRUMB_ID, text_line);
56
		btn.x += btn.w;
57
	}
58
	//DrawFavButton(btn.x);
6291 leency 59
	//btn.x+=20;
60
	btn.x++;
61
	DrawBar(btn.x,btn.y-1,Form.cwidth-btn.x-25,btn.h+3,sc.work);
7806 leency 62
}
6289 leency 63
64
 
65
 
66
{
67
	int i, slashpos = #path;
68
	for (i=0; i!=clickid+2; i++) {
69
		slashpos=strchr(slashpos,'/')+1;
70
	}
71
	ESBYTE[slashpos-1] = NULL;
6782 leency 72
	Open_Dir(#path,WITH_REDRAW);
6289 leency 73
}
74
75
 
76
 
77
{
78
	int i;
79
	DrawRectangle(x,y,w,h,sc.work_graph);
7806 leency 80
	for (i=0; (i
7634 leency 81
	DrawRectangle3D(x+1,y+1,w-2,h-2,sc.work_light, sc.work_dark);
7806 leency 82
	DefineHiddenButton(x+1,y+1,w-2,h-2,id);
7422 leency 83
	WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,sc.work_text,text);
7806 leency 84
	DrawBar(x, y+h+1, w+1, 1, sc.work_light);
85
}
6289 leency 86