Rev 8901 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6289 | leency | 1 | |
8901 | leency | 2 | // // |
3 | // PATH // |
||
4 | // // |
||
5 | //===================================================// |
||
6 | |||
7 | |||
8 | PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x000000, 0xFFFFCC, #path, #work_area_pointer, 0}; |
||
9 | void DrawPathBar() |
||
6289 | leency | 10 | { |
11 | if (efm) { |
||
8854 | leency | 12 | DrawPathBarKfm(); |
8901 | leency | 13 | return; |
8854 | leency | 14 | } |
15 | |||
16 | |||
8901 | leency | 17 | DrawBreadCrumbs(); |
18 | return; |
||
19 | } |
||
20 | |||
21 | |||
22 | PathShow.start_y = 17; |
||
23 | PathShow.area_size_x = Form.cwidth-300; |
||
6291 | leency | 24 | DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line); |
7634 | leency | 25 | DrawRectangle(PathShow.start_x-4,PathShow.start_y-7,PathShow.area_size_x+4,20,sc.work_graph); |
7806 | leency | 26 | DefineHiddenButton(PathShow.start_x-4+1,PathShow.start_y-7+1,PathShow.area_size_x+4-2,20-2,PATH_BTN); |
7422 | leency | 27 | DrawBar(PathShow.start_x-4, PathShow.start_y+14, PathShow.area_size_x+5+18, 1, sc.work_light); |
7806 | leency | 28 | |
7462 | leency | 29 | |
30 | |||
31 | |||
7634 | leency | 32 | PathShow_prepare stdcall(#PathShow); |
6289 | leency | 33 | PathShow_draw stdcall(#PathShow); |
34 | } |
||
35 | |||
36 | |||
8901 | leency | 37 | { |
38 | dword bgc; |
||
39 | int i=0; |
||
40 | if (!Form.cwidth) return; |
||
41 | |||
42 | |||
43 | bgc = col.odd_line; |
||
44 | PathShow.font_color = col.list_gb_text; |
||
45 | } else { |
||
46 | bgc = 0xFFFFCC; |
||
47 | PathShow.font_color = 0x222222; |
||
48 | } |
||
49 | if (active_panel==0) PathShow.text_pointer = #path; else PathShow.text_pointer = #inactive_path; |
||
8946 | leency | 50 | PathShow.start_x = 4; |
8901 | leency | 51 | PathShow.area_size_x = Form.cwidth/2-8; |
52 | PathShow.start_y = Form.cheight - status_bar_h+2; |
||
53 | |||
54 | |||
55 | DrawBar(PathShow.start_x-2,PathShow.start_y-3,PathShow.area_size_x+5,14,bgc); |
||
56 | DrawRectangle(PathShow.start_x-3,PathShow.start_y-4,PathShow.area_size_x+6,15,sc.work_graph); |
||
57 | PathShow_prepare stdcall(#PathShow); |
||
58 | PathShow_draw stdcall(#PathShow); |
||
59 | i++; |
||
60 | if (i<2) { |
||
61 | if (active_panel==0) PathShow.text_pointer = #inactive_path; else PathShow.text_pointer = #path; |
||
8946 | leency | 62 | PathShow.start_x = Form.cwidth/2 + 2; |
8901 | leency | 63 | PathShow.area_size_x = Form.cwidth - PathShow.start_x - 5; |
64 | goto _DRAW_BAR; |
||
65 | } |
||
66 | |||
67 | |||
68 | DrawBar(Form.cwidth-1,PathShow.start_y-2,1,15,sc.work); |
||
69 | DrawBar(1,PathShow.start_y+12,Form.cwidth-2,1,sc.work_light); |
||
70 | } |
||
71 | |||
72 | |||
73 | { |
||
74 | |||
75 | |||
76 | |||
77 | |||
78 | |||
79 | // // |
||
80 | // BREADCRUMBS // |
||
81 | // // |
||
82 | //===================================================// |
||
83 | |||
84 | |||
6289 | leency | 85 | collection_int breadCrumb=0; |
7972 | leency | 86 | char PathShow_path[4096]; |
6289 | leency | 87 | block btn; |
7227 | leency | 88 | int i; |
6289 | leency | 89 | unsigned text_line; |
8868 | leency | 90 | { |
6289 | leency | 91 | strcat(#PathShow_path, #path); |
92 | for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID); |
||
93 | breadCrumb.drop(); |
||
94 | for (i=0; (PathShow_path[i]) && (i |
||
8901 | leency | 95 | { |
6289 | leency | 96 | if (PathShow_path[i]=='/') { |
97 | PathShow_path[i] = NULL; |
||
98 | breadCrumb.add(i+1); |
||
99 | } |
||
100 | } |
||
101 | breadCrumb.add(i+1); |
||
6782 | leency | 102 | btn.set_size(246,10,NULL,20); |
6739 | leency | 103 | //area_w = Form.cwidth - btn.x - 20; |
8868 | leency | 104 | for (i=0; i |
6289 | leency | 105 | { |
106 | text_line = breadCrumb.get(i) + #PathShow_path; |
||
107 | btn.w = strlen(text_line)*8+10; |
||
108 | DrawBreadcrumbButton(btn.x, btn.y, btn.w, btn.h, i+BREADCRUMB_ID, text_line); |
||
109 | btn.x += btn.w; |
||
110 | } |
||
111 | //DrawFavButton(btn.x); |
||
6291 | leency | 112 | //btn.x+=20; |
113 | btn.x++; |
||
114 | DrawBar(btn.x,btn.y-1,Form.cwidth-btn.x-25,btn.h+3,sc.work); |
||
7806 | leency | 115 | } |
6289 | leency | 116 | |
117 | |||
118 | |||
119 | { |
||
120 | int i, slashpos = #path; |
||
121 | for (i=0; i!=clickid+2; i++) { |
||
122 | slashpos=strchr(slashpos,'/')+1; |
||
123 | } |
||
124 | ESBYTE[slashpos-1] = NULL; |
||
6782 | leency | 125 | Open_Dir(#path,WITH_REDRAW); |
6289 | leency | 126 | } |
127 | |||
128 | |||
129 | |||
130 | { |
||
131 | int i; |
||
132 | DrawRectangle(x,y,w,h,sc.work_graph); |
||
7806 | leency | 133 | for (i=0; (i |
7634 | leency | 134 | DrawRectangle3D(x+1,y+1,w-2,h-2,sc.work_light, sc.work_dark); |
7806 | leency | 135 | DefineHiddenButton(x+1,y+1,w-2,h-2,id); |
7422 | leency | 136 | WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,sc.work_text,text); |
7806 | leency | 137 | DrawBar(x, y+h+1, w+1, 1, sc.work_light); |
138 | }20);>50;>2)> |
||
6289 | leency | 139 |