aboutsummaryrefslogtreecommitdiff
path: root/src/installer/ui_instdir.fl
blob: 2f62e789e635186f6671f346ff19149787bcae82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# data file for the Fltk User Interface Designer (fluid)
version 1.0107 
header_name {.h} 
code_name {.cxx}
decl {using namespace std;} {public
} 

decl {\#include <string>} {public
} 

decl {\#include <iostream>} {public
} 

decl {\#include <FL/Fl_File_Chooser.H>} {public
} 

decl {\#include <FL/Fl_Native_File_Chooser.H>} {public
} 

class UI_Instdir {open
} {
  decl {char* currscreen;} {public
  }
  decl {char* instdir;} {public
  }
  Function {make_window(char* p_currscreen,char* p_instdir)} {open
  } {
    Fl_Window {} {
      label {HD24tools HD24VERSION - Setup Wizard} open selected
      xywh {1246 284 590 350} type Double color 7
      code0 {currscreen=p_currscreen;}
      code1 {instdir=p_instdir;} visible
    } {
      Fl_Box {} {
        image {welcome.png} xywh {0 -137 165 487}
      }
      Fl_Button {} {
        label {&Browse...}
        callback {Fl_Native_File_Chooser chooser;
chooser.title("Select installation directory");
chooser.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY||Fl_Native_File_Chooser::BROWSE_SAVE_DIRECTORY||Fl_Native_File_Chooser::NEW_FOLDER);
chooser.filter("");

string cdir="";
cdir+=currdir->value();

chooser.directory(cdir.c_str());
switch (chooser.show()) {
	case -1: break; //error
	case 1: break; //cancel
	default:
		if (chooser.filename()) {
			currdir->value(chooser.filename());			
		}

		break;
}}
        xywh {505 125 80 20} color 53 labelsize 12
      }
      Fl_Box {} {
        label {Choose installation directory}
        xywh {175 -3 320 33} labelfont 1 labelsize 16 align 20
      }
      Fl_Group {} {open
        xywh {-5 315 620 35} box BORDER_BOX color 53 selection_color 47
      } {
        Fl_Button button_next {
          label {&Next >}
          callback {currscreen="next\\0";
string newdir=currdir->value();
strncpy(&instdir[0],newdir.c_str(),128);
Fl_Window* winx=Fl::first_window();
winx->~Fl_Window();}
          xywh {415 320 85 25} color 53 labelsize 12
        }
        Fl_Button {} {
          label Cancel
          callback {currscreen="cancel\\0";
Fl_Window* winx=Fl::first_window();
winx->~Fl_Window();}
          xywh {505 320 85 25} color 53 labelsize 12
        }
        Fl_Button {} {
          label {< &Back}
          callback {currscreen="back\\0";
Fl_Window* winx=Fl::first_window();
winx->~Fl_Window();}
          xywh {330 320 85 25} color 53 labelsize 12
        }
      }
      Fl_Input currdir {
        xywh {175 125 325 20} labelsize 12 align 5 textsize 11
        code0 {currdir->value(p_instdir);}
      }
      Fl_Box {} {
        label {Setup will install HD24tools in the following folder. To 
install in a different folder, click Browse and select 
another folder. 

After that, click Next to start the installation.}
        xywh {175 38 370 81} labelsize 12 align 21
      }
    }
  }
}