Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | 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-306;
5
	DrawBar(PathShow.start_x-3, PathShow.start_y-4, PathShow.area_size_x+2, 15, 0xFFFfff);
6
	PathShow_prepare stdcall(#PathShow);
7
	PathShow_draw stdcall(#PathShow);
8
}
9
10
 
11
 collection_int breadCrumb;
12
 char PathShow_path[4096];
13
 obj btn;
14
 int i;
15
 unsigned text_line, area_w;
16
 {
17
	strcat(#PathShow_path, #path);
18
	for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID);
19
	breadCrumb.drop();
20
	for (i=0; PathShow_path[i]; i++)
21
	{
22
		if (PathShow_path[i]=='/') {
23
			PathShow_path[i] = NULL;
24
			breadCrumb.add(i+1);
25
		}
26
	}
27
	btn.size(246,10,NULL,20);
28
	area_w = Form.cwidth - btn.x - 20;
29
	for (i=0; i
30
	{
31
		text_line = breadCrumb.get(i) + #PathShow_path;
32
		btn.w = strlen(text_line)*8+10;
33
		DrawBreadcrumbButton(btn.x, btn.y, btn.w, btn.h, i+BREADCRUMB_ID, text_line);
34
		btn.x += btn.w;
35
	}
36
	DrawBar(btn.x+1,btn.y-1,Form.cwidth-btn.x-5,btn.h+3,col_work);
37
}
38
39
 
40
 
41
{
42
	int i, slashpos = #path;
43
	for (i=0; i!=clickid+2; i++) {
44
		slashpos=strchr(slashpos,'/')+1;
45
	}
46
	ESBYTE[slashpos] = NULL;
47
	Open_Dir(#path,WITH_REDRAW);
48
}
49
50
 
51
 
52
	0xF2EBEF,0xF2EBEF,
53
	0xF0EAEC,0xEFE9EB,0xEDE6E9,0xEAE6E8,0xE9E4E6,0xE5E0E3,0xE3DDDE,0xE0DBDB,
54
	0xDFDADA,0xDBD9DA,0xD2D0D2,0xC2C6C6};
55
void DrawBreadcrumbButton(dword x,y,w,h,id,text)
56
{
57
	int i;
58
	DrawRectangle(x,y,w,h,col_graph);
59
	for (i=0; i
60
	DefineButton(x+1,y+1,w-2,h-2,id+BT_HIDE,0xEFEBEF);
61
	WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,0x444444,text);
62
	DrawBar(x, y+h+1, w+1, 1, MixColors(col_work,0xFFFfff,120));
63
}
64