• R/O
  • HTTP
  • SSH
  • HTTPS

fermisurfer: Commit

fermisurfer Git


Commit MetaInfo

Revision1c37b026f68cdf027926d7879a4ecfe5951bf1a7 (tree)
Zeit2019-06-05 01:01:11
Autormitsuaki1987 <kawamitsuaki@gmai...>
Commitermitsuaki1987

Log Message

Menu -> control

Ändern Zusammenfassung

Diff

--- a/src/fermisurfer.cpp
+++ b/src/fermisurfer.cpp
@@ -159,6 +159,7 @@ GLfloat **clrnl;//!< Color of nodeline [::nb][::nnl*2*4]
159159 2D Fermi line
160160 */
161161 GLfloat secvec[3]; //!< @f$k@f$-vector to define section
162+GLfloat secvec_fr[3]; //!< @f$k@f$-vector to define section
162163 GLfloat secscale; //!< 0.0 (across @f$\Gamma@f$) or 1.0
163164 GLfloat axis2d[2][3]; //!< @f$k@f$-vector to define section
164165 int *n2d; //!< Number of line segment
@@ -172,6 +173,7 @@ GLfloat bzl2d_proj[26][3]; //!< Lines of 1st BZ [::nbzl2d (max:26)][3], projecte
172173 Equator
173174 */
174175 GLfloat eqvec[3]; //!< @f$k@f$-vector for equator
176+GLfloat eqvec_fr[3]; //!< @f$k@f$-vector for equator
175177 int *nequator; //!< The number of equator
176178 GLfloat ****kveq; //!< @f$k@f$-vector of equator [::nb][::nequator][2][3]
177179 GLfloat **kveq_rot; //!< @f$k@f$-vector of equator [::nb][::nequator*2*3]
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -68,90 +68,78 @@ void refresh_patch_segment() {
6868
6969 enum
7070 {
71- menu_bz_radio1,
72- menu_bz_radio2,
73- menu_background_radio1,
74- menu_background_radio2,
75- menu_lighting_radio1,
76- menu_lighting_radio2,
77- menu_lighting_radio3,
78- menu_mouse_radio1,
79- menu_mouse_radio2,
80- menu_mouse_radio3,
81- menu_stereo_radio1,
82- menu_stereo_radio2,
83- menu_stereo_radio3,
84- menu_tetra_radio1,
85- menu_tetra_radio2,
86- menu_tetra_radio3,
87- menu_tetra_radio4,
88- menu_tetra_radio5,
89- menu_tetra_radio6,
90- menu_tetra_radio7,
91- menu_tetra_radio8,
92- menu_tetra_radio9,
93- menu_tetra_radio10,
94- menu_tetra_radio11,
95- menu_tetra_radio12,
96- menu_tetra_radio13,
97- menu_tetra_radio14,
98- menu_tetra_radio15,
99- menu_tetra_radio16,
100- menu_view_radio1,
101- menu_view_radio2,
102- menu_view_radio3,
103- menu_nodeline_check,
104- menu_colorbar_check,
105- imenu_line,
106- imenu_shift,
107- colorscale_maxmin,
108- colorscale_radio1,
109- colorscale_radio2,
110- colorscale_radio3,
111- colorscale_radio4,
112- colorscale_radio5,
113- colorscale_radio6,
114- colorscale_radio7,
115- equator_check,
116- equator_modify,
117- menu_section_check,
118- menu_section_modify,
119- menu_section_gamma,
120- menu_view_scale,
121- menu_view_position,
122- menu_view_rotation,
123- imenu_interpol,
124- menu_band_check
71+ ibutton_reflesh,
72+ ibutton_compute,
73+ iradio_background,
74+ iradio_brillouinzone,
75+ iradio_lighting,
76+ iradio_mouse,
77+ iradio_stereo,
78+ iradio_tetra,
79+ iradio_colorscale,
80+ itext_colorscalemin,
81+ itext_colorscalemax,
82+ iradio_section,
83+ itext_sectionx,
84+ itext_sectiony,
85+ itext_sectionz,
86+ icheck_nodeline,
87+ icheck_colorbar,
88+ icheck_equator,
89+ itext_equatorx,
90+ itext_equatory,
91+ itext_equatorz,
92+ itext_line,
93+ itext_shift,
94+ itext_interpol,
95+ itext_scale,
96+ itext_positionx,
97+ itext_positiony,
98+ itext_rotx,
99+ itext_roty,
100+ itext_rotz,
101+ icheck_band
125102 };
126103
104+void MyFrame::button_refresh(
105+ wxCommandEvent& event//!<[in] Selected menu
106+) {
107+ Refresh(false);
108+}
109+
110+void MyFrame::button_compute(
111+ wxCommandEvent& event//!<[in] Selected menu
112+) {
113+ free_patch();
114+ compute_patch_segment();
115+ Refresh(false);
116+}
127117 /**
128118 @brief Change background color (::blackback)
129119 */
130-void MyFrame::menu_background(
120+void MyFrame::radio_background(
131121 wxCommandEvent& event //!<[in] Selected menu
132122 )
133123 {
134- if (event.GetId() == menu_background_radio1 && blackback != 1) {
124+ if (event.GetString().Cmp(wxT("Black")) == 0 && blackback != 1) {
135125 glClearColor(0.0, 0.0, 0.0, 0.0);
136126 blackback = 1;
137- if (color_scale == 2 || color_scale == 3) paint();
138- Refresh(false);
127+ // debug if (color_scale == 2 || color_scale == 3) paint();
139128 }
140- else if (event.GetId() == menu_background_radio2 && blackback != 0) {
129+ else if (event.GetString().Cmp(wxT("White")) == 0 && blackback != 0) {
141130 glClearColor(1.0, 1.0, 1.0, 0.0);
142131 blackback = 0;
143- if (color_scale == 2 || color_scale == 3) paint();
144- Refresh(false);
132+ // debug if (color_scale == 2 || color_scale == 3) paint();
145133 }
146134 }/* bgcolor change*/
147135 /**
148136 @brief Toggle the appearance of each band (::draw_band)
149137 */
150-void MyFrame::menu_band(
138+void MyFrame::check_band(
151139 wxCommandEvent& event //!<[in] Selected menu
152140 )
153141 {
154- int ib = event.GetId() - menu_band_check;
142+ int ib = wxAtoi(event.GetString());
155143 if (draw_band[ib] == 0) {
156144 draw_band[ib] = 1;
157145 }
@@ -163,16 +151,16 @@ void MyFrame::menu_band(
163151 /**
164152 @brief Change Brillouin zone (::fbz)
165153 */
166-void MyFrame::menu_brillouinzone(
154+void MyFrame::radio_brillouinzone(
167155 wxCommandEvent& event //!<[in] Selected menu
168156 )
169157 {
170- if (event.GetId() == menu_bz_radio1 && fbz != 1) {
158+ if (event.GetString().Cmp(wxT("First Brillouin zone")) == 0 && fbz != 1) {
171159 fbz = 1;
172160 refresh_patch_segment();
173161 Refresh(false);
174162 }
175- else if (event.GetId() == menu_bz_radio2 && fbz != -1) {
163+ else if (event.GetString().Cmp(wxT("Primitive Brillouin zone")) == 0 && fbz != -1) {
176164 fbz = -1;
177165 lsection = 0;
178166 refresh_patch_segment();
@@ -182,7 +170,7 @@ void MyFrame::menu_brillouinzone(
182170 /**
183171 @brief Toggle Colorbar (::lcolorbar)
184172 */
185-void MyFrame::menu_colorbar(
173+void MyFrame::check_colorbar(
186174 wxCommandEvent& event //!<[in] Selected menu
187175 )
188176 {
@@ -193,71 +181,74 @@ void MyFrame::menu_colorbar(
193181 /**
194182 @brief Change color scale mode (::color_scale)
195183 */
196-void MyFrame::menu_colorscale(
184+void MyFrame::radiovalue_colorscale(
197185 wxCommandEvent& event //!<[in] Selected menu
198186 )
199187 {
200188 int ierr, ii;
189+ double dminmax;
201190
202- if (event.GetId() == colorscale_maxmin) {
203- max_and_min();
204- if (color_scale == 1 || color_scale == 4
205- || color_scale == 6 || color_scale == 7) {
206- printf(" Set min. and max. value for scale : ");
207- ierr = scanf("%f%f", &patch_min[0], &patch_max[0]);
208- if (ierr == 0) printf("error ! reading min or max");
209- }
210- else if (color_scale == 2) {
211- printf(" Set max. value for scale: ");
212- ierr = scanf("%f", &patch_max[0]);
213- if (ierr == 0) printf("error ! reading max");
214- }
215- else if (color_scale == 3) {
216- for (ii = 0; ii < 3; ii++) {
217- printf(" Set min. and max. value for scale %d : ", ii);
218- ierr = scanf("%f%f", &patch_min[ii], &patch_max[ii]);
219- if (ierr == 0) printf("error ! reading min or max");
220- }
221- }
222- else {
223- printf(" No color scale in this case.\n");
224- }
191+ if (event.GetId() == itext_colorscalemin) {
192+ max_and_min();
193+ if (event.GetString().ToDouble(&dminmax))
194+ patch_min[0] = (GLfloat)dminmax;
225195 paint();
226196 Refresh(false);
227197 }
228- else if (event.GetId() - colorscale_radio1 + 1 != color_scale) {
229- color_scale = event.GetId() - colorscale_radio1 + 1;
230- max_and_min();
198+ else if (event.GetId() == itext_colorscalemax) {
199+ max_and_min();
200+ if (event.GetString().ToDouble(&dminmax))
201+ patch_max[0] = (GLfloat)dminmax;
231202 paint();
232203 Refresh(false);
233204 }
205+ else if (event.GetString().Cmp(wxT("Input (Real)")) == 0)
206+ color_scale = 1;
207+ else if (event.GetString().Cmp(wxT("Input (Complex)")) == 0)
208+ color_scale = 2;
209+ else if (event.GetString().Cmp(wxT("Input (Tri-number)")) == 0)
210+ color_scale = 3;
211+ else if (event.GetString().Cmp(wxT("Fermi Velocity")) == 0)
212+ color_scale = 4;
213+ else if (event.GetString().Cmp(wxT("Band Index")) == 0)
214+ color_scale = 5;
215+ else if (event.GetString().Cmp(wxT("Input (Real, Gray Scale)")) == 0)
216+ color_scale = 6;
217+ else if (event.GetString().Cmp(wxT("Fermi Velocity (Gray Scale)")) == 0)
218+ color_scale = 7;
234219 } /* menu_colorscale */
235220 /**
236221 @brief Modify and toggle appearance of equator (::lequator)
237222 */
238-void MyFrame::menu_equator(
223+void MyFrame::checkvalue_equator(
239224 wxCommandEvent& event //!<[in] Selected menu
240225 )
241226 {
242227 int ierr, ii, jj, ib;
243- GLfloat vec[3];
228+ double deqvec;
244229
245- if (event.GetId() == equator_check) {
230+ if (event.GetId() == icheck_equator) {
246231 if (lequator != 1) lequator = 1;
247232 else lequator = 0;
248233 Refresh(false);
249234 }/*if (event.GetId() == 1)*/
250235 else {
251-
252- printf(" New Miller index : ");
253- ierr = scanf("%f %f %f", &vec[0], &vec[1], &vec[2]);
236+ if (event.GetId() == itext_equatorx) {
237+ if (event.GetString().ToDouble(&deqvec)) eqvec_fr[0] = (GLfloat)deqvec;
238+ }
239+ else if (event.GetId() == itext_equatory) {
240+ if (event.GetString().ToDouble(&deqvec)) eqvec_fr[1] = (GLfloat)deqvec;
241+ }
242+ else if (event.GetId() == itext_equatorz) {
243+ if (event.GetString().ToDouble(&deqvec)) eqvec_fr[2] = (GLfloat)deqvec;
244+ }
254245 /*
255246 Fractional -> Cartecian
256247 */
257248 for (ii = 0; ii < 3; ii++) {
258249 eqvec[ii] = 0.0;
259250 for (jj = 0; jj < 3; jj++) {
260- eqvec[ii] += vec[jj] * bvec[jj][ii];
251+ eqvec[ii] += eqvec_fr[jj] * bvec[jj][ii];
261252 }/*for (jj = 0; jj < 3; jj++)*/
262253 }/*for (ii = 0; ii < 3; ii++)*/
263254 /*
@@ -291,45 +282,41 @@ void MyFrame::menu_equator(
291282 This routine modify interpolation ratio (::interpol)
292283 then compute Fermi surfaces, etc.
293284 */
294-void MyFrame::menu_interpol(
285+void MyFrame::textctrl_interpol(
295286 wxCommandEvent& event //!<[in] Selected menu
296287 )
297288 {
298289 int ierr;
290+ long int long_interpol;
299291
300- if (event.GetId() == imenu_interpol) {
301- printf(" Old interpolation ratio : %d\n", interpol);
302- printf(" New interpolation ratio : ");
303- //
304- ierr = scanf("%d", &interpol);
305- if (ierr != 1) printf("error ! reading interpol");
306- /**/
307- interpol_energy();
308- refresh_patch_segment();
309- /**/
310- Refresh(false);
311- }
292+ if (event.GetString().ToLong(&long_interpol))
293+ interpol = (int)long_interpol;
294+ /**/
295+ interpol_energy();
296+ refresh_patch_segment();
297+ /**/
298+ Refresh(false);
312299 }/*static void menu_interpol*/
313300 /**
314301 @brief Toggle Lighting (::lside)
315302 */
316-void MyFrame::menu_lighting(
303+void MyFrame::radio_lighting(
317304 wxCommandEvent& event //!<[in] Selected menu
318305 )
319306 {
320- if (event.GetId() == menu_lighting_radio1 && lside != 1) {
307+ if (event.GetString().Cmp(wxT("Both side")) == 0 && lside != 1) {
321308 lside = 1;
322309 side = 1.0;
323310 glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
324311 Refresh(false);
325312 }
326- if (event.GetId() == menu_lighting_radio2 && lside != 2) {
313+ if (event.GetString().Cmp(wxT("Unoccupied side")) == 0 && lside != 2) {
327314 lside = 2;
328315 side = 1.0;
329316 glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
330317 Refresh(false);
331318 }
332- if (event.GetId() == menu_lighting_radio3 && lside != 3) {
319+ if (event.GetString().Cmp(wxT("Occupied side")) == 0 && lside != 3) {
333320 lside = 3;
334321 side = -1.0;
335322 glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
@@ -339,33 +326,33 @@ void MyFrame::menu_lighting(
339326 /**
340327 @brief Line width (::lside)
341328 */
342-void MyFrame::menu_line(
329+void MyFrame::textctrl_line(
343330 wxCommandEvent& event //!<[in] Selected menu
344331 )
345332 {
346333 int ierr;
347- printf(" Current line width : %f\n", linewidth);
348- printf(" New line width : ");
349- ierr = scanf("%f", &linewidth);
334+ double dlinewidth;
350335
336+ ierr = scanf("%f", &linewidth);
337+ if (event.GetString().ToDouble(&dlinewidth)) linewidth = (GLfloat)dlinewidth;
351338 Refresh(false);
352339 } /* menu_line */
353340 /**
354341 @brief Change the function associated to the mouse movement(::lmouse)
355342 */
356-void MyFrame::menu_mouse(
343+void MyFrame::radio_mouse(
357344 wxCommandEvent& event //!<[in] Selected menu
358345 )
359346 {
360- if (event.GetId() == menu_mouse_radio1 && lmouse != 1) {
347+ if (event.GetString().Cmp(wxT("Rotate")) == 0 && lmouse != 1) {
361348 lmouse = 1;
362349 Refresh(false);
363350 }
364- if (event.GetId() == menu_mouse_radio2 && lmouse != 2) {
351+ if (event.GetString().Cmp(wxT("Scale")) == 0 && lmouse != 2) {
365352 lmouse = 2;
366353 Refresh(false);
367354 }
368- if (event.GetId() == menu_mouse_radio3 && lmouse != 3) {
355+ if (event.GetString().Cmp(wxT("Translate")) == 0 && lmouse != 3) {
369356 lmouse = 3;
370357 Refresh(false);
371358 }
@@ -373,7 +360,7 @@ void MyFrame::menu_mouse(
373360 /**
374361 @brief Toggle apearance of nodale-line
375362 */
376-void MyFrame::menu_nodeline(
363+void MyFrame::check_nodeline(
377364 wxCommandEvent& event //!<[in] Selected menu
378365 )
379366 {
@@ -384,36 +371,45 @@ void MyFrame::menu_nodeline(
384371 /**
385372 @brief Modify and toggle appearance of 2D Fermi lines (::lsection)
386373 */
387-void MyFrame::menu_section(
374+void MyFrame::radiovalue_section(
388375 wxCommandEvent& event //!<[in] Selected menu
389376 )
390377 {
391378 int ierr, ii, jj, ib;
392- GLfloat vec[3];
379+ double dsecvec;
393380
394- if (event.GetId() == menu_section_check) {
395- if (lsection != 1) {
381+ if (event.GetId() == iradio_section) {
382+ if (event.GetString().Cmp(wxT("None")) == 0) {
383+ lsection = 0;
384+ secscale = 1.0;
385+ }
386+ else if (event.GetString().Cmp(wxT("Off Gamma")) == 0) {
396387 lsection = 1;
397- Refresh(false);
388+ secscale = 1.0;
398389 }
399- else {
400- lsection = 0;
401- Refresh(false);
390+ else if (event.GetString().Cmp(wxT("On Gamma")) == 0) {
391+ lsection = 1;
392+ secscale = 0.0;
402393 }
403394 }/*if (event.GetId() == 1)*/
404395 else {
405- if (event.GetId() == menu_section_modify) secscale = 1.0;
406- else secscale = 0.0;
396+ if (event.GetId() == itext_equatorx) {
397+ if (event.GetString().ToDouble(&dsecvec)) secvec_fr[0] = (GLfloat)dsecvec;
398+ }
399+ else if (event.GetId() == itext_equatory) {
400+ if (event.GetString().ToDouble(&dsecvec)) secvec_fr[1] = (GLfloat)dsecvec;
401+ }
402+ else if (event.GetId() == itext_equatorz) {
403+ if (event.GetString().ToDouble(&dsecvec)) secvec_fr[2] = (GLfloat)dsecvec;
404+ }
407405
408- printf(" New Miller index : ");
409- ierr = scanf("%f %f %f", &vec[0], &vec[1], &vec[2]);
410406 /*
411407 Fractional -> Cartecian
412408 */
413409 for (ii = 0; ii < 3; ii++) {
414410 secvec[ii] = 0.0;
415411 for (jj = 0; jj < 3; jj++) {
416- secvec[ii] += vec[jj] * bvec[jj][ii];
412+ secvec[ii] += secvec_fr[jj] * bvec[jj][ii];
417413 }/*for (jj = 0; jj < 3; jj++)*/
418414 }/*for (ii = 0; ii < 3; ii++)*/
419415 /*
@@ -437,12 +433,13 @@ void MyFrame::menu_section(
437433 /**
438434 @brief Shift Fermi energy
439435 */
440-void MyFrame::menu_shift(
436+void MyFrame::textctrl_shift(
441437 wxCommandEvent& event //!<[in] Selected menu
442438 )
443439 {
444440 int ib, i0, i1, i2, ierr;
445441 GLfloat emin, emax;
442+ double dEF;
446443
447444 emin = 100000.0;
448445 emax = -100000.0;
@@ -460,8 +457,7 @@ void MyFrame::menu_shift(
460457 printf(" %f %f %f \n", emin, emax, EF);
461458 printf(" New Fermi energy : ");
462459 //
463- ierr = scanf("%f", &EF);
464- if (ierr != 1) printf("error ! reading ef");
460+ if (event.GetString().ToDouble(&dEF)) EF = (GLfloat)dEF;
465461 /**/
466462 refresh_patch_segment();
467463 /**/
@@ -470,18 +466,18 @@ void MyFrame::menu_shift(
470466 /**
471467 @brief Tern stereogram (::lstereo)
472468 */
473-void MyFrame::menu_stereo(
469+void MyFrame::radio_stereo(
474470 wxCommandEvent& event //!<[in] Selected menu
475471 ) {
476- if (event.GetId() == menu_stereo_radio1 && lstereo != 1) {
472+ if (event.GetString().Cmp(wxT("None")) == 0 && lstereo != 1) {
477473 lstereo = 1;
478474 Refresh(false);
479475 }
480- if (event.GetId() == menu_stereo_radio2 && lstereo != 2) {
476+ if (event.GetString().Cmp(wxT("Parallel")) == 0 && lstereo != 2) {
481477 lstereo = 2;
482478 Refresh(false);
483479 }
484- if (event.GetId() == menu_stereo_radio3 && lstereo != 3) {
480+ if (event.GetString().Cmp(wxT("Cross")) == 0 && lstereo != 3) {
485481 lstereo = 3;
486482 Refresh(false);
487483 }
@@ -489,17 +485,14 @@ void MyFrame::menu_stereo(
489485 /**
490486 @brief Change tetrahedron (::itet)
491487 */
492-void MyFrame::menu_tetra(
488+void MyFrame::radio_tetra(
493489 wxCommandEvent& event //!<[in] Selected menu
494490 )
495491 {
496- if (event.GetId() - menu_tetra_radio1 != itet) {
497- printf(" Tetra patern %d \n", event.GetId()- menu_tetra_radio1 + 1);
498- itet = event.GetId() - menu_tetra_radio1;
499- init_corner();
500- refresh_patch_segment();
501- Refresh(false);
502- }
492+ itet = wxAtoi(event.GetString());
493+ init_corner();
494+ refresh_patch_segment();
495+ Refresh(false);
503496 }/*menu_tetra*/
504497 /**
505498 @brief Setting of view
@@ -507,28 +500,27 @@ void MyFrame::menu_tetra(
507500 This modify scale (::scl) & tarnslation (::trans) &
508501 rotation (::thetax, ::thetay, ::thetaz, ::rot),
509502 */
510-void MyFrame::menu_view(
503+void MyFrame::textctrl_view(
511504 wxCommandEvent& event //!<[in] Selected menu
512505 )
513506 {
514507 int ierr;
508+ double dvalue;
515509
516- if (event.GetId() == menu_view_scale) {
517-
518- printf(" Current Scale : %f\n", scl);
519- printf(" New Scale : ");
520- ierr = scanf("%f", &scl);
510+ if (event.GetId() == itext_scale) {
511+ if (event.GetString().ToDouble(&dvalue)) scl = (GLfloat)dvalue;
521512
522513 }
523- else if (event.GetId() == menu_view_position) {
524-
525- printf(" Current Position(x y) : %f %f\n", trans[0], trans[1]);
526- printf(" New Position(x y) : ");
527- ierr = scanf("%f %f", &trans[0], &trans[1]);
514+ else if (event.GetId() == itext_positionx) {
515+ if (event.GetString().ToDouble(&dvalue)) trans[0] = (GLfloat)dvalue;
528516
529517 }
530- else if (event.GetId() == menu_view_rotation) {
531-
518+ else if (event.GetId() == itext_positiony) {
519+ if (event.GetString().ToDouble(&dvalue)) trans[1] = (GLfloat)dvalue;
520+ }
521+ else if (event.GetId() == itext_rotx||
522+ event.GetId() == itext_roty||
523+ event.GetId() == itext_rotz) {
532524 /**/
533525 thetay = asinf(rot[0][2]);
534526 if (cosf(thetay) != 0.0) {
@@ -547,7 +539,15 @@ void MyFrame::menu_view(
547539 thetaz = 180.0f / 3.14159265f * thetaz;
548540 printf(" Current Rotation (theta_x theta_y teta_z) in degree : %f %f %f\n", thetax, thetay, thetaz);
549541 printf(" New Rotation (theta_x theta_y teta_z) in degree : ");
550- ierr = scanf("%f %f %f", &thetax, &thetay, &thetaz);
542+ if (event.GetId() == itext_rotx) {
543+ if (event.GetString().ToDouble(&dvalue)) thetax = (GLfloat)dvalue;
544+ }
545+ else if (event.GetId() == itext_roty) {
546+ if (event.GetString().ToDouble(&dvalue)) thetay = (GLfloat)dvalue;
547+ }
548+ else if (event.GetId() == itext_rotz) {
549+ if (event.GetString().ToDouble(&dvalue)) thetaz = (GLfloat)dvalue;
550+ }
551551 thetax = 3.14159265f / 180.0f * thetax;
552552 thetay = 3.14159265f / 180.0f * thetay;
553553 thetaz = 3.14159265f / 180.0f * thetaz;
@@ -561,9 +561,7 @@ void MyFrame::menu_view(
561561 rot[2][0] = -cosf(thetax)* cosf(thetaz)* sinf(thetay) + sinf(thetax)* sinf(thetaz);
562562 rot[2][1] = cosf(thetaz)* sinf(thetax) + cosf(thetax)* sinf(thetay)* sinf(thetaz);
563563 rot[2][2] = cosf(thetax)* cosf(thetay);
564-
565564 }
566-
567565 Refresh(false);
568566 }
569567
@@ -577,128 +575,151 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos,
577575
578576 // debug SetIcon(wxICON(sample));
579577
580- wxMenu* imenu_bzmode = new wxMenu;
581- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_brillouinzone, this, menu_bz_radio1);
582- imenu_bzmode->AppendRadioItem(menu_bz_radio1, wxT("First Brillouin zone"));
583- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_brillouinzone, this, menu_bz_radio2);
584- imenu_bzmode->AppendRadioItem(menu_bz_radio2, wxT("Primitive Brillouin zone"));
578+ // Make a menubar
579+ wxMenu* fileMenu = new wxMenu;
580+ wxMenuBar* menuBar = new wxMenuBar;
581+ menuBar->Append(fileMenu, wxT("File"));
582+ SetMenuBar(menuBar);
585583
586- wxMenu* imenu_background = new wxMenu;
587- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_background, this, menu_background_radio1);
588- imenu_background->AppendRadioItem(menu_background_radio1, wxT("Black"));
589- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_background, this, menu_background_radio2);
590- imenu_background->AppendRadioItem(menu_background_radio2, wxT("White"));
584+ wxPanel* panel = new wxPanel(this);
585+ Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MyFrame::button_refresh, this, ibutton_reflesh);
586+ new wxButton(panel, ibutton_reflesh, wxT("Reflesh"), wxPoint(180, 30));
587+ Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MyFrame::button_compute, this, ibutton_compute);
588+ new wxButton(panel, ibutton_compute, wxT("Compute"), wxPoint(150, 30));
589+
590+ new wxStaticText(panel, wxID_ANY, wxT("Scale"),
591+ wxPoint(250, 60), wxDefaultSize, wxALIGN_RIGHT);
592+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_view, this, itext_scale);
593+ new wxTextCtrl(this, itext_scale, wxT(""), wxPoint(0, 250), wxSize(100, 50));
594+
595+ new wxStaticText(panel, wxID_ANY, wxT("Position"),
596+ wxPoint(250, 60), wxDefaultSize, wxALIGN_RIGHT);
597+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_view, this, itext_positionx);
598+ new wxTextCtrl(this, itext_positionx, wxT(""), wxPoint(0, 250), wxSize(100, 50));
599+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_view, this, itext_positiony);
600+ new wxTextCtrl(this, itext_positiony, wxT(""), wxPoint(0, 250), wxSize(100, 50));
601+
602+ new wxStaticText(panel, wxID_ANY, wxT("Rotation"),
603+ wxPoint(250, 60), wxDefaultSize, wxALIGN_RIGHT);
604+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_view, this, itext_rotx);
605+ new wxTextCtrl(this, itext_rotx, wxT(""), wxPoint(0, 250), wxSize(100, 50));
606+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_view, this, itext_roty);
607+ new wxTextCtrl(this, itext_roty, wxT(""), wxPoint(0, 250), wxSize(100, 50));
608+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_view, this, itext_rotz);
609+ new wxTextCtrl(this, itext_rotz, wxT(""), wxPoint(0, 250), wxSize(100, 50));
610+
611+ new wxStaticText(panel, wxID_ANY, wxT("Interpol ratio"),
612+ wxPoint(250, 60), wxDefaultSize, wxALIGN_RIGHT);
613+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_interpol, this, itext_interpol);
614+ new wxTextCtrl(this, itext_interpol, wxT(""), wxPoint(0, 250), wxSize(100, 50));
615+
616+ new wxStaticText(panel, wxID_ANY, wxT("Fermi energy"),
617+ wxPoint(250, 60), wxDefaultSize, wxALIGN_RIGHT);
618+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_shift, this, itext_shift);
619+ new wxTextCtrl(this, itext_shift, wxT(""), wxPoint(0, 250), wxSize(100, 50));
620+
621+ new wxStaticText(panel, wxID_ANY, wxT("Line width"),
622+ wxPoint(250, 60), wxDefaultSize, wxALIGN_RIGHT );
623+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::textctrl_line, this, itext_line);
624+ new wxTextCtrl(this, itext_line, wxT(""), wxPoint(0, 250), wxSize(100, 50));
591625
592626 nb = 10;// debug
593- wxMenu* imenu_band = new wxMenu;
594627 for (ib = 0; ib < nb; ib++) {
595- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_band, this, menu_band_check + ib);
596- imenu_band->AppendCheckItem(menu_band_check + ib, wxString::Format(wxT("Band %d"), ib));
597- imenu_band->Check(menu_band_check + ib, true);
598- }
599-
600- wxMenu* imenu_colorscale = new wxMenu;
601- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorscale, this, colorscale_maxmin);
602- imenu_colorscale->Append(colorscale_maxmin, wxT("Max/Min of Scale"));
603- imenu_colorscale->AppendSeparator();
604- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorscale, this, colorscale_radio1);
605- imenu_colorscale->AppendRadioItem(colorscale_radio1, wxT("Input (Real)"));
606- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorscale, this, colorscale_radio2);
607- imenu_colorscale->AppendRadioItem(colorscale_radio2, wxT("Input (Complex)"));
608- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorscale, this, colorscale_radio3);
609- imenu_colorscale->AppendRadioItem(colorscale_radio3, wxT("Input (Tri-number)"));
610- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorscale, this, colorscale_radio4);
611- imenu_colorscale->AppendRadioItem(colorscale_radio4, wxT("Fermi Velocity"));
612- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorscale, this, colorscale_radio5);
613- imenu_colorscale->AppendRadioItem(colorscale_radio5, wxT("Band Index"));
614- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorscale, this, colorscale_radio6);
615- imenu_colorscale->AppendRadioItem(colorscale_radio6, wxT("Input (Real, Gray Scale)"));
616- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorscale, this, colorscale_radio7);
617- imenu_colorscale->AppendRadioItem(colorscale_radio7, wxT("Fermi Velocity (Gray Scale)"));
618-
619- wxMenu* imenu_equator = new wxMenu;
620- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_equator, this, equator_check);
621- imenu_equator->AppendCheckItem(equator_check, wxT("Equator"));
622- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_equator, this, equator_modify);
623- imenu_equator->Append(equator_modify, wxT("Modify euqtor"));
624-
625- wxMenu* imenu_light = new wxMenu;
626- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_lighting, this, menu_lighting_radio1);
627- imenu_light->AppendRadioItem(menu_lighting_radio1, wxT("Both side"));
628- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_lighting, this, menu_lighting_radio2);
629- imenu_light->AppendRadioItem(menu_lighting_radio2, wxT("Unoccupied side"));
630- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_lighting, this, menu_lighting_radio3);
631- imenu_light->AppendRadioItem(menu_lighting_radio3, wxT("Occupied side"));
632-
633- wxMenu* imenu_mouse = new wxMenu;
634- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_mouse, this, menu_mouse_radio1);
635- imenu_mouse->AppendRadioItem(menu_mouse_radio1, wxT("Rotate"));
636- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_mouse, this, menu_mouse_radio2);
637- imenu_mouse->AppendRadioItem(menu_mouse_radio2, wxT("Scale"));
638- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_mouse, this, menu_mouse_radio3);
639- imenu_mouse->AppendRadioItem(menu_mouse_radio3, wxT("Translate"));
640-
641- wxMenu* imenu_section = new wxMenu;
642- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_section, this, menu_section_check);
643- imenu_section->AppendCheckItem(menu_section_check, wxT("Section"));
644- imenu_section->AppendSeparator();
645- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_section, this, menu_section_modify);
646- imenu_section->Append(menu_section_modify, wxT("Modify section"));
647- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_section, this, menu_section_gamma);
648- imenu_section->Append(menu_section_gamma, wxT("Modify section (across Gamma)"));
649-
650- wxMenu* imenu_stereo = new wxMenu;
651- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_stereo, this, menu_stereo_radio1);
652- imenu_stereo->AppendRadioItem(menu_stereo_radio1, wxT("None"));
653- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_stereo, this, menu_stereo_radio2);
654- imenu_stereo->AppendRadioItem(menu_stereo_radio2, wxT("Parallel"));
655- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_stereo, this, menu_stereo_radio3);
656- imenu_stereo->AppendRadioItem(menu_stereo_radio3, wxT("Cross"));
657-
658- wxMenu* imenu_tetra = new wxMenu;
659- for (itet = 0; itet < 16; itet++) {
660- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_tetra, this, menu_tetra_radio1 + itet);
661- imenu_tetra->AppendRadioItem(menu_tetra_radio1 + itet,
662- wxString::Format(wxT("tetra # %d"), itet));
628+ Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::check_band, this, icheck_band + ib);
629+ new wxCheckBox(panel, icheck_band + ib, wxString::Format(wxT("Band %d"), ib), wxPoint(20, 170));
630+ // debug imenu_band->Check(icheck_band + ib, true);
663631 }
664632
665- wxMenu* imenu_view = new wxMenu;
666- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_view, this, menu_view_scale);
667- imenu_view->Append(menu_view_scale, wxT("Scale"));
668- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_view, this, menu_view_position);
669- imenu_view->Append(menu_view_position, wxT("Position"));
670- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_view, this, menu_view_rotation);
671- imenu_view->Append(menu_view_rotation, wxT("Rotation"));
672-
673- // Make a menubar
674- wxMenu* fileMenu = new wxMenu;
675-
676- fileMenu->AppendSubMenu(imenu_background, wxT("Background color"));
677- fileMenu->AppendSubMenu(imenu_band, wxT("Band"));
678- fileMenu->AppendSubMenu(imenu_bzmode, wxT("Brillouin zone"));
679- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_colorbar, this, menu_colorbar_check);
680- fileMenu->AppendCheckItem(menu_colorbar_check, wxT("Color bar"));
681- fileMenu->Check(menu_colorbar_check, true);
682- fileMenu->AppendSubMenu(imenu_colorscale, wxT("Color scale mode"));
683- fileMenu->AppendSubMenu(imenu_equator, wxT("Equator"));
684- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_interpol, this, imenu_interpol);
685- fileMenu->Append(imenu_interpol, wxT("Interpol ratio"));
686- fileMenu->AppendSubMenu(imenu_light, wxT("Lighting"));
687- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_line, this, imenu_line);
688- fileMenu->Append(imenu_line, wxT("Line width"));
689- fileMenu->AppendSubMenu(imenu_mouse, wxT("Mouse Drag"));
690- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_nodeline, this, menu_nodeline_check);
691- fileMenu->AppendCheckItem(menu_nodeline_check, wxT("Nodal line"));
692- fileMenu->AppendSubMenu(imenu_section, wxT("Section"));
693- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::menu_shift, this, imenu_shift);
694- fileMenu->Append(imenu_shift, wxT("Shift Fermi energy"));
695- fileMenu->AppendSubMenu(imenu_stereo, wxT("Stereogram"));
696- fileMenu->AppendSubMenu(imenu_tetra, wxT("Tetrahedron"));
697- fileMenu->AppendSubMenu(imenu_view, wxT("View point"));
698-
699- wxMenuBar* menuBar = new wxMenuBar;
700- menuBar->Append(fileMenu, wxT("File"));
701- SetMenuBar(menuBar);
633+ Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &MyFrame::checkvalue_equator, this, icheck_equator);
634+ new wxCheckBox(panel, icheck_equator, wxT("Equator"), wxPoint(20, 170));
635+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::checkvalue_equator, this, itext_equatorx);
636+ new wxTextCtrl(this, itext_equatorx, wxT(""), wxPoint(0, 250), wxSize(100, 50));
637+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::checkvalue_equator, this, itext_equatory);
638+ new wxTextCtrl(this, itext_equatory, wxT(""), wxPoint(0, 250), wxSize(100, 50));
639+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::checkvalue_equator, this, itext_equatorz);
640+ new wxTextCtrl(this, itext_equatorz, wxT(""), wxPoint(0, 250), wxSize(100, 50));
641+
642+ Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &MyFrame::check_colorbar, this, icheck_colorbar);
643+ new wxCheckBox(panel, icheck_colorbar, wxT("Color bar"), wxPoint(20, 170));
644+ // debug fileMenu->Check(menu_colorbar_check, true);
645+
646+ Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &MyFrame::check_nodeline, this, icheck_nodeline);
647+ new wxCheckBox(panel, icheck_nodeline, wxT("Nodal line"), wxPoint(20, 170));
648+
649+ wxString choices_section[] = {
650+ wxT("None"), wxT("Off Gamma"), wxT("On Gamma") };
651+ Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &MyFrame::radiovalue_section, this, iradio_section);
652+ new wxRadioBox(panel, iradio_section, wxT("Section"),
653+ wxPoint(10, 10), wxDefaultSize,
654+ WXSIZEOF(choices_section), choices_section,
655+ 1, wxRA_SPECIFY_COLS);
656+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::radiovalue_section, this, itext_sectionx);
657+ new wxTextCtrl(this, itext_sectionx, wxT(""), wxPoint(0, 250), wxSize(100, 50));
658+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::radiovalue_section, this, itext_sectiony);
659+ new wxTextCtrl(this, itext_sectiony, wxT(""), wxPoint(0, 250), wxSize(100, 50));
660+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::radiovalue_section, this, itext_sectionz);
661+ new wxTextCtrl(this, itext_sectionz, wxT(""), wxPoint(0, 250), wxSize(100, 50));
662+
663+ new wxStaticText(panel, wxID_ANY, wxT("Min of Scale"),
664+ wxPoint(250, 60), wxDefaultSize, wxALIGN_RIGHT);
665+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::radiovalue_colorscale, this, itext_colorscalemin);
666+ new wxTextCtrl(this, itext_colorscalemin, wxT(""), wxPoint(0, 250), wxSize(100, 50));
667+ new wxStaticText(panel, wxID_ANY, wxT("Max of Scale"),
668+ wxPoint(250, 60), wxDefaultSize, wxALIGN_RIGHT);
669+ Bind(wxEVT_COMMAND_TEXT_UPDATED, &MyFrame::radiovalue_colorscale, this, itext_colorscalemax);
670+ new wxTextCtrl(this, itext_colorscalemax, wxT(""), wxPoint(0, 250), wxSize(100, 50));
671+ wxString choices_colorscale[] = { wxT("Input (Real)"), wxT("Input (Complex)"),
672+ wxT("Input (Tri-number)"), wxT("Fermi Velocity"), wxT("Band Index"),
673+ wxT("Input (Real, Gray Scale)"), wxT("Fermi Velocity (Gray Scale)") };
674+ Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &MyFrame::radiovalue_colorscale, this, iradio_colorscale);
675+ new wxRadioBox(panel, iradio_colorscale, wxT("Color scale mode"),
676+ wxPoint(10, 10), wxDefaultSize,
677+ WXSIZEOF(choices_colorscale), choices_colorscale,
678+ 1, wxRA_SPECIFY_COLS);
679+
680+ wxString choices_tetra[] = { wxT("1"), wxT("2"), wxT("3"), wxT("4"), wxT("5"), wxT("6"), wxT("7") ,
681+ wxT("8"), wxT("9"), wxT("10"), wxT("11"), wxT("12"), wxT("13"), wxT("14"),
682+ wxT("15"), wxT("16") };
683+ Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &MyFrame::radio_tetra, this, iradio_tetra);
684+ new wxRadioBox(panel, iradio_tetra, wxT("Tetrahedron"),
685+ wxPoint(10, 10), wxDefaultSize,
686+ WXSIZEOF(choices_tetra), choices_tetra,
687+ 1, wxRA_SPECIFY_COLS);
688+
689+ wxString choices_stereo[] = { wxT("None"), wxT("Parallel"), wxT("Cross") };
690+ Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &MyFrame::radio_stereo, this, iradio_stereo);
691+ new wxRadioBox(panel, iradio_stereo, wxT("Stereogram"),
692+ wxPoint(10, 10), wxDefaultSize,
693+ WXSIZEOF(choices_stereo), choices_stereo,
694+ 1, wxRA_SPECIFY_COLS);
695+
696+ wxString choices_mouse[] = { wxT("Rotate"), wxT("Scale"), wxT("Translate") };
697+ Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &MyFrame::radio_mouse, this, iradio_mouse);
698+ new wxRadioBox(panel, iradio_mouse, wxT("Mouse Drag"),
699+ wxPoint(10, 10), wxDefaultSize,
700+ WXSIZEOF(choices_mouse), choices_mouse,
701+ 1, wxRA_SPECIFY_COLS);
702+
703+ wxString choices_light[] = { wxT("Both side"), wxT("Unoccupied side"), wxT("Occupied side") };
704+ Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &MyFrame::radio_lighting, this, iradio_lighting);
705+ new wxRadioBox(panel, iradio_lighting, wxT("Lighting"),
706+ wxPoint(10, 10), wxDefaultSize,
707+ WXSIZEOF(choices_light), choices_light,
708+ 1, wxRA_SPECIFY_COLS);
709+
710+ wxString choices_bg[] = { wxT("Black"), wxT("White") };
711+ Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &MyFrame::radio_background, this, iradio_background);
712+ new wxRadioBox(panel, iradio_background, wxT("Background color"),
713+ wxPoint(10, 10), wxDefaultSize,
714+ WXSIZEOF(choices_bg), choices_bg,
715+ 1, wxRA_SPECIFY_COLS);
716+
717+ wxString choices_bz[] = { wxT("First Brillouin zone"), wxT("Primitive Brillouin zone") };
718+ Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &MyFrame::radio_brillouinzone, this, iradio_brillouinzone);
719+ new wxRadioBox(panel, iradio_brillouinzone, wxT("Brillouin zone"),
720+ wxPoint(10, 10), wxDefaultSize,
721+ WXSIZEOF(choices_bz), choices_bz,
722+ 1, wxRA_SPECIFY_COLS);
702723
703724 // Make a TestGLCanvas
704725
@@ -730,9 +751,6 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos,
730751 wxBoxSizer* outsizer = new wxBoxSizer(wxHORIZONTAL);
731752 outsizer->Add(insizer, 1, wxEXPAND, 1);
732753
733- wxPanel* panel = new wxPanel(this);
734- wxButton* select_two = new wxButton(panel, menu_nodeline_check, wxT("Select #&2"));
735-
736754 outsizer->Add(panel, 1, wxEXPAND, 1);
737755 SetSizer(outsizer);
738756 SetAutoLayout(true);
--- a/src/menu.hpp
+++ b/src/menu.hpp
@@ -43,21 +43,23 @@ public:
4343
4444 private:
4545 void OnExit(wxCommandEvent& event);
46- void menu_brillouinzone(wxCommandEvent& event);
47- void menu_background(wxCommandEvent& event);
48- void menu_band(wxCommandEvent& event);
49- void menu_colorbar(wxCommandEvent& event);
50- void menu_colorscale(wxCommandEvent& event);
51- void menu_equator(wxCommandEvent& event);
52- void menu_interpol(wxCommandEvent& event);
53- void menu_lighting(wxCommandEvent& event);
54- void menu_line(wxCommandEvent& event);
55- void menu_mouse(wxCommandEvent& event);
56- void menu_nodeline(wxCommandEvent& event);
57- void menu_section(wxCommandEvent& event);
58- void menu_shift(wxCommandEvent& event);
59- void menu_stereo(wxCommandEvent& event);
60- void menu_tetra(wxCommandEvent& event);
61- void menu_view(wxCommandEvent& event);
46+ void radio_brillouinzone(wxCommandEvent& event);
47+ void radio_background(wxCommandEvent& event);
48+ void check_band(wxCommandEvent& event);
49+ void check_colorbar(wxCommandEvent& event);
50+ void radiovalue_colorscale(wxCommandEvent& event);
51+ void checkvalue_equator(wxCommandEvent& event);
52+ void textctrl_interpol(wxCommandEvent& event);
53+ void radio_lighting(wxCommandEvent& event);
54+ void textctrl_line(wxCommandEvent& event);
55+ void radio_mouse(wxCommandEvent& event);
56+ void check_nodeline(wxCommandEvent& event);
57+ void radiovalue_section(wxCommandEvent& event);
58+ void textctrl_shift(wxCommandEvent& event);
59+ void radio_stereo(wxCommandEvent& event);
60+ void radio_tetra(wxCommandEvent& event);
61+ void textctrl_view(wxCommandEvent& event);
62+ void button_refresh(wxCommandEvent& event);
63+ void button_compute(wxCommandEvent& event);
6264 //wxDECLARE_EVENT_TABLE();
6365 };
--- a/src/read_file.cpp
+++ b/src/read_file.cpp
@@ -132,7 +132,11 @@ int read_file()
132132 for (i = 0; i < 3; ++i) {
133133 secvec[i] = bvec[2][i];
134134 eqvec[i] = bvec[2][i];
135+ eqvec_fr[i] = 0.0;
136+ secvec_fr[i] = 0.0;
135137 }
138+ eqvec_fr[2] = 1.0;
139+ secvec_fr[2] = 1.0;
136140 secscale = 0.0;
137141 /*
138142 Allocation of Kohn-Sham energies $ matrix elements
--- a/src/variable.hpp
+++ b/src/variable.hpp
@@ -106,6 +106,7 @@ extern GLfloat **clrnl;//!< Color of nodeline [::nb][::nnl*2*4]
106106 2D Fermi line
107107 */
108108 extern GLfloat secvec[3]; //!< @f$k@f$-vector to define section
109+extern GLfloat secvec_fr[3]; //!< @f$k@f$-vector to define section
109110 extern GLfloat secscale; //!< 0.0 (across @f$\Gamma@f$) or 1.0
110111 extern GLfloat axis2d[2][3]; //!< @f$k@f$-vector to define section
111112 extern int *n2d; //!< Number of line segment
@@ -119,6 +120,7 @@ extern GLfloat bzl2d_proj[26][3]; //!< Lines of 1st BZ [::nbzl2d (max:26)][3], p
119120 Equator
120121 */
121122 extern GLfloat eqvec[3]; //!< @f$k@f$-vector for equator
123+extern GLfloat eqvec_fr[3]; //!< @f$k@f$-vector for equator
122124 extern int *nequator; //!< The number of equator
123125 extern GLfloat ****kveq; //!< @f$k@f$-vector of equator [::nb][::nequator][2][3]
124126 extern GLfloat **kveq_rot; //!< @f$k@f$-vector of equator [::nb][::nequator*2*3]
Show on old repository browser