You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.8KB

  1. // generated by Fast Light User Interface Designer (fluid) version 1.0300
  2. #include "CubeViewUI.h"
  3. void CubeViewUI::cb_vrot_i(Fl_Roller* o, void*) {
  4. cube->v_angle(((Fl_Roller *)o)->value());
  5. cube->redraw();
  6. }
  7. void CubeViewUI::cb_vrot(Fl_Roller* o, void* v) {
  8. ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_vrot_i(o,v);
  9. }
  10. void CubeViewUI::cb_ypan_i(Fl_Slider* o, void*) {
  11. cube->pany(((Fl_Slider *)o)->value());
  12. cube->redraw();
  13. }
  14. void CubeViewUI::cb_ypan(Fl_Slider* o, void* v) {
  15. ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_ypan_i(o,v);
  16. }
  17. void CubeViewUI::cb_xpan_i(Fl_Slider* o, void*) {
  18. cube->panx(((Fl_Slider *)o)->value());
  19. cube->redraw();
  20. }
  21. void CubeViewUI::cb_xpan(Fl_Slider* o, void* v) {
  22. ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_xpan_i(o,v);
  23. }
  24. void CubeViewUI::cb_hrot_i(Fl_Roller* o, void*) {
  25. cube->h_angle(((Fl_Roller *)o)->value());
  26. cube->redraw();
  27. }
  28. void CubeViewUI::cb_hrot(Fl_Roller* o, void* v) {
  29. ((CubeViewUI*)(o->parent()->parent()->parent()->user_data()))->cb_hrot_i(o,v);
  30. }
  31. void CubeViewUI::cb_zoom_i(Fl_Value_Slider* o, void*) {
  32. cube->size=((Fl_Value_Slider *)o)->value();
  33. cube->redraw();
  34. }
  35. void CubeViewUI::cb_zoom(Fl_Value_Slider* o, void* v) {
  36. ((CubeViewUI*)(o->parent()->parent()->user_data()))->cb_zoom_i(o,v);
  37. }
  38. CubeViewUI::CubeViewUI() {
  39. { mainWindow = new Fl_Double_Window(415, 405, "CubeView");
  40. mainWindow->box(FL_UP_BOX);
  41. mainWindow->labelsize(12);
  42. mainWindow->user_data((void*)(this));
  43. { Fl_Group* o = new Fl_Group(5, 3, 374, 399);
  44. { VChange = new Fl_Group(5, 100, 37, 192);
  45. { vrot = new Fl_Roller(5, 100, 17, 186, "V Rot");
  46. vrot->labeltype(FL_NO_LABEL);
  47. vrot->labelsize(12);
  48. vrot->minimum(-180);
  49. vrot->maximum(180);
  50. vrot->step(1);
  51. vrot->callback((Fl_Callback*)cb_vrot);
  52. vrot->align(Fl_Align(FL_ALIGN_WRAP));
  53. } // Fl_Roller* vrot
  54. { ypan = new Fl_Slider(25, 100, 17, 186, "V Pan");
  55. ypan->type(4);
  56. ypan->selection_color(FL_DARK_BLUE);
  57. ypan->labeltype(FL_NO_LABEL);
  58. ypan->labelsize(12);
  59. ypan->minimum(-25);
  60. ypan->maximum(25);
  61. ypan->step(0.1);
  62. ypan->callback((Fl_Callback*)cb_ypan);
  63. ypan->align(Fl_Align(FL_ALIGN_CENTER));
  64. } // Fl_Slider* ypan
  65. VChange->end();
  66. } // Fl_Group* VChange
  67. { HChange = new Fl_Group(120, 362, 190, 40);
  68. { xpan = new Fl_Slider(122, 364, 186, 17, "H Pan");
  69. xpan->type(5);
  70. xpan->selection_color(FL_DARK_BLUE);
  71. xpan->labeltype(FL_NO_LABEL);
  72. xpan->labelsize(12);
  73. xpan->minimum(25);
  74. xpan->maximum(-25);
  75. xpan->step(0.1);
  76. xpan->callback((Fl_Callback*)cb_xpan);
  77. xpan->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
  78. } // Fl_Slider* xpan
  79. { hrot = new Fl_Roller(122, 383, 186, 17, "H Rotation");
  80. hrot->type(1);
  81. hrot->labeltype(FL_NO_LABEL);
  82. hrot->labelsize(12);
  83. hrot->minimum(-180);
  84. hrot->maximum(180);
  85. hrot->step(1);
  86. hrot->callback((Fl_Callback*)cb_hrot);
  87. hrot->align(Fl_Align(FL_ALIGN_RIGHT));
  88. } // Fl_Roller* hrot
  89. HChange->end();
  90. } // Fl_Group* HChange
  91. { MainView = new Fl_Group(46, 27, 333, 333);
  92. { cframe = new Fl_Box(46, 27, 333, 333);
  93. cframe->box(FL_DOWN_FRAME);
  94. cframe->color((Fl_Color)4);
  95. cframe->selection_color((Fl_Color)69);
  96. } // Fl_Box* cframe
  97. { cube = new CubeView(48, 29, 329, 329, "This is the cube_view");
  98. cube->box(FL_NO_BOX);
  99. cube->color(FL_BACKGROUND_COLOR);
  100. cube->selection_color(FL_BACKGROUND_COLOR);
  101. cube->labeltype(FL_NORMAL_LABEL);
  102. cube->labelfont(0);
  103. cube->labelsize(14);
  104. cube->labelcolor(FL_FOREGROUND_COLOR);
  105. cube->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
  106. cube->when(FL_WHEN_RELEASE);
  107. Fl_Group::current()->resizable(cube);
  108. } // CubeView* cube
  109. MainView->end();
  110. Fl_Group::current()->resizable(MainView);
  111. } // Fl_Group* MainView
  112. { zoom = new Fl_Value_Slider(106, 3, 227, 19, "Zoom");
  113. zoom->type(5);
  114. zoom->selection_color(FL_DARK_BLUE);
  115. zoom->labelfont(1);
  116. zoom->labelsize(12);
  117. zoom->minimum(1);
  118. zoom->maximum(50);
  119. zoom->step(0.1);
  120. zoom->value(10);
  121. zoom->textfont(1);
  122. zoom->callback((Fl_Callback*)cb_zoom);
  123. zoom->align(Fl_Align(FL_ALIGN_LEFT));
  124. } // Fl_Value_Slider* zoom
  125. o->end();
  126. } // Fl_Group* o
  127. mainWindow->end();
  128. mainWindow->resizable(mainWindow);
  129. } // Fl_Double_Window* mainWindow
  130. }
  131. void CubeViewUI::show(int argc, char **argv) {
  132. mainWindow->show(argc, argv);
  133. }