1 // $Id: EditView.cxx 900 2009-08-13 20:00:45Z larry $
2 //
3 // module EditView.cxx - part of DRAWxtl V5.5
4 // Coded using the FLTK 1.1.6 widget set
5 //
6 // Larry W. Finger, Martin Kroeker and Brian Toby
7 //
8 // initial version generated by Fast Light User Interface Designer (fluid) version 1.0104
9 //
10 // routines contained within this file:
11 //
12 // EditScreen::EditScreen - constructor
13 // EditScreen::show - routine to display the screen
14
15 #include "EditView.h"
16
EditScreen()17 EditScreen::EditScreen ()
18 {
19 static int one = 1;
20
21 static int zero = 0;
22
23 int y, y1;
24
25 {
26 Fl_Window *o = editWindow =
27 new Fl_Window (0, 0, 480, 440, "DRAWxtl V5.5 Parameter Edit");
28 o->selection_color ((Fl_Color) 128);
29 o->callback ((Fl_Callback *) Edit_Parmeters_Close_cb);
30 o->labelfont (1);
31 o->labelsize (49);
32 o->labelcolor ((Fl_Color) 1);
33 o->user_data ((void *) (this));
34 o->align (FL_ALIGN_TOP | FL_ALIGN_INSIDE);
35 o->when (FL_WHEN_CHANGED);
36 y = 50;
37 {
38 Fl_Text_Display *o =
39 new Fl_Text_Display (180, y, 120, 0, "DRAWxtl V5.5 Parameter Edit");
40 o->selection_color ((Fl_Color) 1);
41 o->labelsize (26);
42 o->textcolor (1);
43 }
44 y1 = y += 30;
45 {
46 Draw_Fl_Input *o = Magnification =
47 new Draw_Fl_Input (30, y, 70, 25, "Magnification");
48 o->align (FL_ALIGN_RIGHT);
49 o->when (FL_WHEN_CHANGED);
50 }
51 y += 30;
52 {
53 Draw_Fl_Input *o = List =
54 new Draw_Fl_Input (30, y, 70, 25, "Max.Bond Distance");
55 o->align (FL_ALIGN_RIGHT);
56 o->when (FL_WHEN_CHANGED);
57 }
58 y += 30;
59 {
60 Draw_Fl_Input *o = DepthCue = new Draw_Fl_Input (30, y, 70, 25, "Depth Cue");
61
62 o->align (FL_ALIGN_RIGHT);
63 o->when (FL_WHEN_CHANGED);
64 }
65 y += 30;
66 {
67 Flu_Combo_List *o = Background_Color =
68 new Flu_Combo_List (30, y, 100, 25, "Backgr. Color");
69 o->align (FL_ALIGN_RIGHT);
70 }
71 y += 30;
72 {
73 Draw_Fl_Input *o = Mol_Comp_Dist =
74 new Draw_Fl_Input (30, y, 70, 25, "Mol. Compl. Dist.");
75 o->align (FL_ALIGN_RIGHT);
76 }
77 {
78 Draw_Fl_Input *o = Cell_Edge_Width =
79 new Draw_Fl_Input (240, y1, 70, 25, "Unit-Cell Edge Width");
80 o->align (FL_ALIGN_RIGHT);
81 }
82 y1 += 40;
83 {
84 Fl_Text_Display *o =
85 new Fl_Text_Display (195, y1, 270, 0, "0 for NO Unit-cell box");
86 o->labelfont (1);
87 }
88 y1 += 0;
89 {
90 Flu_Combo_List *o = Cell_Edge_Color =
91 new Flu_Combo_List (240, y1, 120, 25, "Edge Color");
92 o->align (FL_ALIGN_RIGHT);
93 }
94 y1 += 30;
95 {
96 Draw_Fl_Input *o = Poly_Limit =
97 new Draw_Fl_Input (240, y1, 70, 25, "Polyhedral Tolerance");
98 o->align (FL_ALIGN_RIGHT);
99 }
100 y1 += 30;
101 {
102 Draw_Fl_Input *o = Phong_Refl =
103 new Draw_Fl_Input (240, y1, 70, 25, "Phong Reflectivity (0 - 1)");
104 o->align (FL_ALIGN_RIGHT);
105 }
106 y1 += 30;
107 {
108 Draw_Fl_Input *o = Phong_Size =
109 new Draw_Fl_Input (240, y1, 70, 25, "Phong Size (10-150)");
110 o->align (FL_ALIGN_RIGHT);
111 }
112 y1 += 30;
113 {
114 Draw_Fl_Input *o = Ambient_Finish =
115 new Draw_Fl_Input (240, y1, 70, 25, "Ambient Finish");
116 o->align (FL_ALIGN_RIGHT);
117 }
118 y1 += 30;
119 {
120 Draw_Fl_Input *o = Diffuse_Finish =
121 new Draw_Fl_Input (240, y1, 70, 25, "Diffuse Finish");
122 o->align (FL_ALIGN_RIGHT);
123 }
124 y1 += 30;
125 {
126 Draw_Fl_Input *o = Specular_Finish =
127 new Draw_Fl_Input (240, y1, 70, 25, "Specular Finish");
128 o->align (FL_ALIGN_RIGHT);
129 }
130 y1 += 30;
131 {
132 Draw_Fl_Input *o = Finish_Roughness =
133 new Draw_Fl_Input (240, y1, 70, 25, "Surface Roughness");
134 o->align (FL_ALIGN_RIGHT);
135 }
136
137 y += 25;
138 {
139 MolCompButton =
140 new Fl_Check_Button (30, y, 185, 25, "Use Molecular Completion");
141 }
142 y += 25;
143 NoShadow = new Fl_Check_Button (30, y, 195, 25, "Set for No Shadows in POV");
144 y += 25;
145 NoLabels = new Fl_Check_Button (30, y, 165, 25, "Set for No Cell Labels");
146 y += 25;
147 Label_Scale = new Draw_Fl_Input (30, y, 70, 25, "Label Scaling");
148 Label_Scale->align (FL_ALIGN_RIGHT);
149 y += 25;
150 {
151 ClearOmit = new Fl_Check_Button (30, y, 145, 25, "Clear 'Omit' Lists");
152 }
153 y += 25;
154 {
155 ClearLastOmit = new Fl_Button (30, y, 180, 30, "Remove Last Omit Item");
156 ClearLastOmit->callback ((Fl_Callback *) Clear_Last_Omit_cb);
157 }
158 y1 += 60;
159 {
160 Fl_Button *o = Edit_Prm_Close = new Fl_Button (50, y1, 80, 30, "Close");
161
162 o->callback ((Fl_Callback *) Edit_Parmeters_Close_cb);
163 o->tooltip ("Close this window and discard all changes.");
164 }
165 {
166 Fl_Button *o = Edit_Prm_Apply = new Fl_Button (150, y1, 80, 30, "Apply");
167
168 o->tooltip
169 ("Apply current contents of top box to drawing, but leave this window open.");
170 o->callback ((Fl_Callback *) Edit_Parmeters_Save_cb, &zero);
171 }
172 {
173 Fl_Button *o = Edit_Prm_Save = new Fl_Button (250, y1, 80, 30, "Save");
174
175 o->tooltip
176 ("Apply current contents of top box to drawing, then close this window.");
177 o->callback ((Fl_Callback *) Edit_Parmeters_Save_cb, &one);
178 }
179 {
180 Fl_Button *o = Edit_View_Help = new Fl_Button (350, y1, 80, 30, "Help");
181
182 o->callback ((Fl_Callback *) Input_Help_cb);
183 }
184 }
185 }
186
187 void
show(void)188 EditScreen::show (void)
189 {
190 editWindow->show ();
191 }
192