Subversion Repositories Kolibri OS

Rev

Rev 6291 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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