Subversion Repositories Kolibri OS

Rev

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