Rev 5661 | Rev 5676 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5661 | Rev 5674 | ||
---|---|---|---|
Line 139... | Line 139... | ||
139 | dword eolite_ini_path; |
139 | dword eolite_ini_path; |
Line 140... | Line 140... | ||
140 | 140 | ||
Line 141... | Line 141... | ||
141 | dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak; |
141 | dword menu_stak,about_stak,properties_stak,settings_stak,copy_stak; |
142 | - | ||
143 | proc_info Form; |
142 | |
144 | system_colors sc; |
143 | proc_info Form; |
145 | int mouse_dd, scroll_used, sc_slider_h, sorting_arrow_x, kolibrios_drive; |
144 | int mouse_dd, scroll_used, sc_slider_h, sorting_arrow_x, kolibrios_drive; |
146 | dword buf; |
145 | dword buf; |
147 | dword file_mas[6898]; |
146 | dword file_mas[6898]; |
Line 601... | Line 600... | ||
601 | } |
600 | } |
Line 602... | Line 601... | ||
602 | 601 | ||
603 | 602 | ||
604 | void draw_window() |
603 | void draw_window() |
605 | { |
604 | { |
606 | DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,sc.work,TITLE,0); |
605 | DefineAndDrawWindow(GetScreenWidth()-550/4+rand_n,rand_n+30,550,500,0x73,system.color.work,TITLE,0); |
607 | GetProcessInfo(#Form, SelfInfo); |
606 | GetProcessInfo(#Form, SelfInfo); |
608 | if (Form.status_window>2) return; |
607 | if (Form.status_window>2) return; |
609 | files.SetSizes(192, 57, Form.cwidth - 210, onTop(57,6), disc_num*16+195,files.line_h); |
608 | files.SetSizes(192, 57, Form.cwidth - 210, onTop(57,6), disc_num*16+195,files.line_h); |
610 | if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h); |
609 | if (Form.height < files.min_h) MoveSize(OLD,OLD,OLD,files.min_h); |
Line 611... | Line 610... | ||
611 | if (Form.width<480) MoveSize(OLD,OLD,480,OLD); |
610 | if (Form.width<480) MoveSize(OLD,OLD,480,OLD); |
612 | GetProcessInfo(#Form, SelfInfo); //if win_size changed |
611 | GetProcessInfo(#Form, SelfInfo); //if win_size changed |
613 | 612 | ||
614 | PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal); |
613 | PutPaletteImage(#toolbar,246,34,0,0,8,#toolbar_pal); |
615 | DrawBar(127, 8, 1, 25, sc.work_graph); |
614 | DrawBar(127, 8, 1, 25, system.color.work_graph); |
616 | for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,sc.work); |
615 | for (j=0; j<3; j++) DefineButton(toolbar_buttons_x[j]+2,5+2,31-5,29-5,21+j+BT_HIDE,system.color.work); |
617 | for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,sc.work); |
616 | for (j=3; j<6; j++) DefineButton(toolbar_buttons_x[j],5,31,29,21+j+BT_HIDE,system.color.work); |
618 | DrawBar(246,0,Form.cwidth - 297,12, sc.work); //upper editbox |
617 | DrawBar(246,0,Form.cwidth - 297,12, system.color.work); //upper editbox |
619 | DrawBar(246,29,Form.cwidth - 297,5,sc.work); //under editbox |
618 | DrawBar(246,29,Form.cwidth - 297,5,system.color.work); //under editbox |
620 | DrawRectangle(246,12,Form.cwidth - 303,16,sc.work_graph); |
619 | DrawRectangle(246,12,Form.cwidth - 303,16,system.color.work_graph); |
621 | DefineButton(Form.cwidth - 32,6,27,28,51+BT_HIDE+BT_NOFRAME,0); //about |
620 | DefineButton(Form.cwidth - 32,6,27,28,51+BT_HIDE+BT_NOFRAME,0); //about |
622 | PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal); |
621 | PutPaletteImage(#goto_about,56,34,Form.width-65,0,8,#goto_about_pal); |
623 | //main rectangles |
622 | //main rectangles |
624 | DrawRectangle(1,40,Form.cwidth-3,onTop(46,0),sc.work_graph); |
623 | DrawRectangle(1,40,Form.cwidth-3,onTop(46,0),system.color.work_graph); |
625 | DrawRectangle(0,39,Form.cwidth-1,onTop(44,0),col_palette[4]); //bg |
624 | DrawRectangle(0,39,Form.cwidth-1,onTop(44,0),col_palette[4]); //bg |
626 | for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); |
625 | for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col_palette[8-i]); |
627 | DrawLeftPanel(); |
626 | DrawLeftPanel(); |
628 | //ListBox |
627 | //ListBox |
629 | DrawFlatButton(files.x,40,Form.cwidth - files.x - 159,16,31,sc.work,T_FILE); |
628 | DrawFlatButton(files.x,40,Form.cwidth - files.x - 159,16,31,system.color.work,T_FILE); |
630 | DrawFlatButton(Form.cwidth - 159,40,73,16,32,sc.work,T_TYPE); |
629 | DrawFlatButton(Form.cwidth - 159,40,73,16,32,system.color.work,T_TYPE); |
631 | DrawFlatButton(Form.cwidth - 86,40,68,16,33,sc.work,T_SIZE); |
630 | DrawFlatButton(Form.cwidth - 86,40,68,16,33,system.color.work,T_SIZE); |
632 | DrawBar(files.x+files.w,files.y,1,onTop(22,files.y),sc.work_graph); //line to the left from the scroll |
631 | DrawBar(files.x+files.w,files.y,1,onTop(22,files.y),system.color.work_graph); //line to the left from the scroll |
633 | DrawFlatButton(files.x+files.w,40,16,16,0,sc.work,"\x18"); |
632 | DrawFlatButton(files.x+files.w,40,16,16,0,system.color.work,"\x18"); |
634 | DrawFlatButton(files.x+files.w,onTop(22,0),16,16,0,sc.work,"\x19"); |
633 | DrawFlatButton(files.x+files.w,onTop(22,0),16,16,0,system.color.work,"\x19"); |
635 | Open_Dir(#path,ONLY_SHOW); |
634 | Open_Dir(#path,ONLY_SHOW); |
Line 713... | Line 712... | ||
713 | { files.first=files.count-files.visible; files.current=files.visible-1; } |
712 | { files.first=files.count-files.visible; files.current=files.visible-1; } |
714 | for (j=0; j |
713 | for (j=0; j |
715 | //in the bottom |
714 | //in the bottom |
716 | paint_y = j * files.line_h + files.y; |
715 | paint_y = j * files.line_h + files.y; |
717 | DrawBar(files.x,paint_y,files.w,onTop(paint_y,6),0xFFFFFF); |
716 | DrawBar(files.x,paint_y,files.w,onTop(paint_y,6),0xFFFFFF); |
718 | DrawBar(Form.cwidth-159,paint_y,1,onTop(paint_y,6),sc.work); |
717 | DrawBar(Form.cwidth-159,paint_y,1,onTop(paint_y,6),system.color.work); |
719 | DrawBar(Form.cwidth-86,paint_y,1,onTop(paint_y,6),sc.work); |
718 | DrawBar(Form.cwidth-86,paint_y,1,onTop(paint_y,6),system.color.work); |
720 | Scroll(); |
719 | Scroll(); |
721 | } |
720 | } |
Line 722... | Line 721... | ||
722 | 721 | ||
Line 769... | Line 768... | ||
769 | FileShow.text_pointer = file_name_off; |
768 | FileShow.text_pointer = file_name_off; |
770 | FileShow.start_y = files.text_y+y; |
769 | FileShow.start_y = files.text_y+y; |
771 | PathShow_prepare stdcall(#FileShow); |
770 | PathShow_prepare stdcall(#FileShow); |
772 | PathShow_draw stdcall(#FileShow); |
771 | PathShow_draw stdcall(#FileShow); |
773 | } |
772 | } |
774 | DrawBar(Form.cwidth-159,y,1,files.line_h,sc.work); //gray line 1 |
773 | DrawBar(Form.cwidth-159,y,1,files.line_h,system.color.work); //gray line 1 |
775 | DrawBar(Form.cwidth-86,y,1,files.line_h,sc.work); //gray line 2 |
774 | DrawBar(Form.cwidth-86,y,1,files.line_h,system.color.work); //gray line 2 |
776 | } |
775 | } |
Line 777... | Line 776... | ||
777 | 776 | ||
778 | 777 | ||
Line 803... | Line 802... | ||
803 | files.visible = files.h / files.line_h; |
802 | files.visible = files.h / files.line_h; |
804 | if (files.count < files.visible) files.visible = files.count; |
803 | if (files.count < files.visible) files.visible = files.count; |
805 | if (sort_num==1) sorting_arrow_x = Form.width+60/2; |
804 | if (sort_num==1) sorting_arrow_x = Form.width+60/2; |
806 | if (sort_num==2) sorting_arrow_x = Form.width-115; |
805 | if (sort_num==2) sorting_arrow_x = Form.width-115; |
807 | if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w; |
806 | if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w; |
808 | WriteText(sorting_arrow_x,45,0x80,sc.work_graph,"\x19"); |
807 | WriteText(sorting_arrow_x,45,0x80,system.color.work_graph,"\x19"); |
809 | if (redraw!=ONLY_SHOW) Sorting(); |
808 | if (redraw!=ONLY_SHOW) Sorting(); |
810 | if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw(); |
809 | if (redraw!=ONLY_OPEN)&&(!_not_draw) List_ReDraw(); |
811 | DrawSystemDiscs(); |
810 | DrawSystemDiscs(); |
812 | } |
811 | } |
813 | if (files.count==-1) && (redraw!=ONLY_OPEN) {files.visible=files.count=0; if(!_not_draw)List_ReDraw();} |
812 | if (files.count==-1) && (redraw!=ONLY_OPEN) {files.visible=files.count=0; if(!_not_draw)List_ReDraw();} |
Line 861... | Line 860... | ||
861 | if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0); |
860 | if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0); |
862 | } |
861 | } |
863 | else |
862 | else |
864 | { |
863 | { |
865 | if (!files.count) return; |
864 | if (!files.count) return; |
866 | DrawPopup(dform_x,160,220,85,1,sc.work,sc.work_graph); |
865 | DrawPopup(dform_x,160,220,85,1,system.color.work,system.color.work_graph); |
867 | WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,sc.work_text,T_DELETE_FILE); |
866 | WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,system.color.work_text,T_DELETE_FILE); |
868 | for (i=0; i |
867 | for (i=0; i |
869 | { |
868 | { |
870 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
869 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
871 | if (ESBYTE[selected_offset2]) cont++; |
870 | if (ESBYTE[selected_offset2]) cont++; |
872 | } |
871 | } |
873 | if (cont) |
872 | if (cont) |
874 | { |
873 | { |
875 | sprintf(#f_count,"%s%d%s",DEL_MORE_FILES_1,cont,DEL_MORE_FILES_2); |
874 | sprintf(#f_count,"%s%d%s",DEL_MORE_FILES_1,cont,DEL_MORE_FILES_2); |
876 | WriteText(-strlen(#f_count)*3+110+dform_x,190,0x80,sc.work_text,#f_count); |
875 | WriteText(-strlen(#f_count)*3+110+dform_x,190,0x80,system.color.work_text,#f_count); |
877 | } |
876 | } |
878 | else |
877 | else |
879 | { |
878 | { |
880 | if (strlen(#file_name)<28) |
879 | if (strlen(#file_name)<28) |
881 | { |
880 | { |
882 | WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,sc.work_text,"?"); |
881 | WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,system.color.work_text,"?"); |
883 | WriteText(-strlen(#file_name)*3+110+dform_x,190,0x80,sc.work_text,#file_name); |
882 | WriteText(-strlen(#file_name)*3+110+dform_x,190,0x80,system.color.work_text,#file_name); |
884 | } |
883 | } |
885 | else |
884 | else |
886 | { |
885 | { |
887 | WriteText(164+dform_x,190,0x80,0,"...?"); |
886 | WriteText(164+dform_x,190,0x80,0,"...?"); |
888 | ESI = 24; |
887 | ESI = 24; |
Line 1113... | Line 1112... | ||
1113 | { |
1112 | { |
1114 | new_element_active = crt; |
1113 | new_element_active = crt; |
1115 | strcpy(#new_element_name, strng); |
1114 | strcpy(#new_element_name, strng); |
1116 | new_file_ed.size = new_file_ed.pos = strlen(strng); |
1115 | new_file_ed.size = new_file_ed.pos = strlen(strng); |
1117 | } |
1116 | } |
1118 | DrawPopup(dform_x,160,220,85,1,sc.work,sc.work_graph); |
1117 | DrawPopup(dform_x,160,220,85,1,system.color.work,system.color.work_graph); |
1119 | new_file_ed.left = dform_x+24; |
1118 | new_file_ed.left = dform_x+24; |
1120 | edit_box_draw stdcall (#new_file_ed); |
1119 | edit_box_draw stdcall (#new_file_ed); |
1121 | DrawRectangle(new_file_ed.left-1, new_file_ed.top-1, new_file_ed.width+2, 16, 0xFFFfff); |
1120 | DrawRectangle(new_file_ed.left-1, new_file_ed.top-1, new_file_ed.width+2, 16, 0xFFFfff); |
1122 | DrawRectangle(new_file_ed.left-2, new_file_ed.top-2, new_file_ed.width+4, 18, sc.work_graph); |
1121 | DrawRectangle(new_file_ed.left-2, new_file_ed.top-2, new_file_ed.width+4, 18, system.color.work_graph); |
1123 | if (new_element_active==3) DrawFlatButton(dform_x+22,208,85,22,301,0xFFB6B5,T_RENAME); |
1122 | if (new_element_active==3) DrawFlatButton(dform_x+22,208,85,22,301,0xFFB6B5,T_RENAME); |
1124 | else DrawFlatButton(dform_x+27,208,70,22,301,0xFFB6B5,T_CREATE); |
1123 | else DrawFlatButton(dform_x+27,208,70,22,301,0xFFB6B5,T_CREATE); |
1125 | DrawFlatButton(dform_x+120,208,70,22,302,0xC6DFC6,T_CANCEL); |
1124 | DrawFlatButton(dform_x+120,208,70,22,302,0xC6DFC6,T_CANCEL); |
1126 | } |
1125 | } |