home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lyx-0.13.2.tar.gz / lyx-0.13.2.tar / lyx-0.13.2 / src / math_forms.C < prev    next >
C/C++ Source or Header  |  1998-04-23  |  11KB  |  242 lines

  1. // File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
  2. #include <config.h>
  3. #include "lyx_gui_misc.h"
  4. #include "gettext.h"
  5.  
  6. /* Form definition file generated with fdesign. */
  7.  
  8. #include FORMS_H_LOCATION
  9. #include <stdlib.h>
  10. #include "math_panel.h"
  11.  
  12. FD_panel *create_form_panel(void)
  13. {
  14.   FL_OBJECT *obj;
  15.   FD_panel *fdui = (FD_panel *) fl_calloc(1, sizeof(*fdui));
  16.  
  17.   fdui->panel = fl_bgn_form(FL_NO_BOX, 290, 172);
  18.   obj = fl_add_box(FL_UP_BOX,0,0,290,172,"");
  19.   obj = fl_add_button(FL_RETURN_BUTTON,80,14,80,30,_("Close "));
  20.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  21.     fl_set_object_callback(obj,button_cb,100);
  22.   fdui->func_browse = obj = fl_add_browser(FL_SELECT_BROWSER,180,40,94,110,_("Functions"));
  23.     fl_set_object_lalign(obj,FL_ALIGN_TOP);
  24.     fl_set_object_callback(obj,button_cb,MM_FUNC);
  25. #if FL_REVISION > 85
  26.     fl_set_browser_hscrollbar(obj, FL_OFF);
  27. #endif
  28.   fdui->greek = obj = fl_add_button(FL_NORMAL_BUTTON,10,90,50,30,_("Greek"));
  29.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  30.     fl_set_object_lstyle(obj,15);
  31.     fl_set_object_callback(obj,button_cb,MM_GREEK);
  32.   fdui->arrow = obj = fl_add_button(FL_NORMAL_BUTTON,10,120,50,30,_("¡ █"));
  33.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  34.     fl_set_object_lstyle(obj,15);
  35.     fl_set_object_callback(obj,button_cb,MM_ARROW);
  36.   fdui->boperator = obj = fl_add_button(FL_NORMAL_BUTTON,60,90,50,30,_("▒ ┤"));
  37.     fl_set_object_lsize(obj,0);
  38.     fl_set_object_lstyle(obj,15);
  39.     fl_set_object_callback(obj,button_cb,MM_BOP);
  40.   fdui->brelats = obj = fl_add_button(FL_NORMAL_BUTTON,110,90,50,30,_("ú @"));
  41.     fl_set_object_lsize(obj,0);
  42.     fl_set_object_lstyle(obj,15);
  43.     fl_set_object_callback(obj,button_cb,MM_BRELATS);
  44.   fdui->varsize = obj = fl_add_button(FL_NORMAL_BUTTON,60,120,50,30,_("S  ≥"));
  45.     fl_set_object_lsize(obj,0);
  46.     fl_set_object_lstyle(obj,15);
  47.     fl_set_object_callback(obj,button_cb,MM_VARSIZE);
  48.   fdui->misc = obj = fl_add_button(FL_NORMAL_BUTTON,110,120,50,30,_("Misc"));
  49.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  50.     fl_set_object_lstyle(obj,FL_TIMESITALIC_STYLE);
  51.     fl_set_object_callback(obj,button_cb,MM_MISC);
  52.   fdui->equation = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,130,50,30,30,"");
  53.     fl_set_object_color(obj,FL_MCOL,FL_BLUE);
  54.     fl_set_object_callback(obj,button_cb,MM_EQU);
  55.   fdui->sqrt = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,10,15,30,30,"");
  56.     fl_set_object_color(obj,FL_MCOL,FL_BLUE);
  57.     fl_set_object_callback(obj,button_cb,MM_SQRT);
  58.   fdui->frac = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,40,15,30,30,"");
  59.     fl_set_object_color(obj,FL_MCOL,FL_BLUE);
  60.     fl_set_object_lcolor(obj,FL_COL1);
  61.     fl_set_object_callback(obj,button_cb,MM_FRAC);
  62.   fdui->delim = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,10,50,30,30,"");
  63.     fl_set_object_color(obj,FL_MCOL,FL_BLUE);
  64.     fl_set_object_callback(obj,button_cb,MM_DELIM);
  65.   fdui->matrix = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,100,50,30,30,"");
  66.     fl_set_object_color(obj,FL_MCOL,FL_BLUE);
  67.     fl_set_object_callback(obj,button_cb,MM_MATRIX);
  68.   fdui->deco = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,40,50,30,30,"");
  69.     fl_set_object_color(obj,FL_MCOL,FL_BLUE);
  70.     fl_set_object_callback(obj,button_cb,MM_DECO);
  71.   fdui->space = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,70,50,30,30,"");
  72.     fl_set_object_color(obj,FL_MCOL,FL_BLUE);
  73.     fl_set_object_callback(obj,button_cb,MM_SPACE);
  74.   fl_end_form();
  75.  
  76.   fdui->panel->fdui = fdui;
  77.  
  78.   return fdui;
  79. }
  80. /*---------------------------------------*/
  81.  
  82. FD_delim *create_form_delim(void)
  83. {
  84.   FL_OBJECT *obj;
  85.   FD_delim *fdui = (FD_delim *) fl_calloc(1, sizeof(*fdui));
  86.  
  87.   fdui->delim = fl_bgn_form(FL_NO_BOX, 250, 260);
  88.   obj = fl_add_box(FL_UP_BOX,0,0,250,260,"");
  89.   fdui->menu = obj = fl_add_bmtable(FL_PUSH_BUTTON,40,70,170,140,"");
  90.     fl_set_object_lcolor(obj,FL_BLUE);
  91.     fl_set_object_callback(obj,delim_cb,2);
  92.  
  93.   fdui->lado = fl_bgn_group();
  94.   fdui->right = obj = fl_add_checkbutton(FL_RADIO_BUTTON,40,40,80,30,idex(_("Right|#R")));fl_set_button_shortcut(obj,scex(_("Right|#R")),1);
  95.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  96.     fl_set_object_callback(obj,delim_cb,4);
  97.   fdui->left = obj = fl_add_checkbutton(FL_RADIO_BUTTON,40,10,80,30,idex(_("Left|#L")));fl_set_button_shortcut(obj,scex(_("Left|#L")),1);
  98.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  99.     fl_set_object_callback(obj,delim_cb,3);
  100.   fl_end_group();
  101.  
  102.   obj = fl_add_button(FL_NORMAL_BUTTON,170,220,70,30,idex(_("Cancel|^[")));fl_set_button_shortcut(obj,scex(_("Cancel|^[")),1);
  103.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  104.     fl_set_object_callback(obj,delim_cb,MM_CLOSE);
  105.   fdui->pix = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,130,20,50,40,"");
  106.     fl_set_object_color(obj,FL_COL1,FL_COL1);
  107.     fl_set_object_callback(obj,delim_cb,MM_APPLY);
  108.   obj = fl_add_button(FL_NORMAL_BUTTON,90,220,70,30,idex(_("Apply|#A")));fl_set_button_shortcut(obj,scex(_("Apply|#A")),1);
  109.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  110.     fl_set_object_callback(obj,delim_cb,MM_APPLY);
  111.   obj = fl_add_button(FL_RETURN_BUTTON,10,220,70,30,_("OK"));
  112.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  113.     fl_set_object_callback(obj,delim_cb,MM_OK);
  114.   fl_end_form();
  115.  
  116.   fdui->delim->fdui = fdui;
  117.  
  118.   return fdui;
  119. }
  120. /*---------------------------------------*/
  121.  
  122. FD_matrix *create_form_matrix(void)
  123. {
  124.   FL_OBJECT *obj;
  125.   FD_matrix *fdui = (FD_matrix *) fl_calloc(1, sizeof(*fdui));
  126.  
  127.   fdui->matrix = fl_bgn_form(FL_NO_BOX, 280, 170);
  128.   obj = fl_add_box(FL_UP_BOX,0,0,280,170,"");
  129.   obj = fl_add_button(FL_RETURN_BUTTON,10,130,80,30,_("OK  "));
  130.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  131.     fl_set_object_callback(obj,matrix_cb,MM_OK);
  132.   obj = fl_add_button(FL_NORMAL_BUTTON,190,130,80,30,idex(_("Cancel|^[")));fl_set_button_shortcut(obj,scex(_("Cancel|^[")),1);
  133.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  134.     fl_set_object_callback(obj,matrix_cb,MM_CLOSE);
  135.   fdui->rows = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,10,30,160,30,_("Rows"));
  136.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  137.     fl_set_object_lalign(obj,FL_ALIGN_TOP);
  138.     fl_set_object_callback(obj,matrix_cb,-1);
  139.     fl_set_slider_precision(obj, 0);
  140.     fl_set_slider_bounds(obj, 1, 20);
  141.      fl_set_slider_return(obj, FL_RETURN_END_CHANGED);
  142.   fdui->columns = obj = fl_add_valslider(FL_HOR_NICE_SLIDER,10,90,160,30,_("Columns "));
  143.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  144.     fl_set_object_lalign(obj,FL_ALIGN_TOP);
  145.     fl_set_object_callback(obj,matrix_cb,2);
  146.     fl_set_slider_precision(obj, 0);
  147.     fl_set_slider_bounds(obj, 1, 20);
  148.      fl_set_slider_return(obj, FL_RETURN_END_CHANGED);
  149.   fdui->valign = obj = fl_add_choice(FL_NORMAL_CHOICE,180,30,90,30,idex(_("Vertical align|#V")));fl_set_button_shortcut(obj,scex(_("Vertical align|#V")),1);
  150.     fl_set_object_boxtype(obj,FL_FRAME_BOX);
  151.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  152.     fl_set_object_lalign(obj,FL_ALIGN_TOP);
  153.     fl_set_object_callback(obj,matrix_cb,-1);
  154.   fdui->halign = obj = fl_add_input(FL_NORMAL_INPUT,180,90,90,30,idex(_("Horizontal align|#H")));fl_set_button_shortcut(obj,scex(_("Horizontal align|#H")),1);
  155.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  156.     fl_set_object_lalign(obj,FL_ALIGN_TOP);
  157.     fl_set_object_callback(obj,matrix_cb,2);
  158.   obj = fl_add_button(FL_NORMAL_BUTTON,100,130,80,30,idex(_("Apply|#A")));fl_set_button_shortcut(obj,scex(_("Apply|#A")),1);
  159.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  160.     fl_set_object_callback(obj,matrix_cb,MM_APPLY);
  161.   fl_end_form();
  162.  
  163.   fdui->matrix->fdui = fdui;
  164.  
  165.   return fdui;
  166. }
  167. /*---------------------------------------*/
  168.  
  169. FD_deco *create_form_deco(void)
  170. {
  171.   FL_OBJECT *obj;
  172.   FD_deco *fdui = (FD_deco *) fl_calloc(1, sizeof(*fdui));
  173.  
  174.   fdui->deco = fl_bgn_form(FL_NO_BOX, 160, 150);
  175.   obj = fl_add_box(FL_UP_BOX,0,0,160,150,"");
  176.   fdui->menu = obj = fl_add_bmtable(FL_PUSH_BUTTON,10,10,140,90,"");
  177.     fl_set_object_lcolor(obj,FL_BLUE);
  178.     fl_set_object_callback(obj,deco_cb,MM_APPLY);
  179.   obj = fl_add_button(FL_RETURN_BUTTON,30,110,100,30,_("Close"));
  180.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  181.     fl_set_object_callback(obj,deco_cb,MM_CLOSE);
  182.   fl_end_form();
  183.  
  184.   fdui->deco->fdui = fdui;
  185.  
  186.   return fdui;
  187. }
  188. /*---------------------------------------*/
  189.  
  190. FD_space *create_form_space(void)
  191. {
  192.   FL_OBJECT *obj;
  193.   FD_space *fdui = (FD_space *) fl_calloc(1, sizeof(*fdui));
  194.  
  195.   fdui->space = fl_bgn_form(FL_NO_BOX, 280, 150);
  196.   obj = fl_add_box(FL_UP_BOX,0,0,280,150,"");
  197.   obj = fl_add_button(FL_RETURN_BUTTON,10,110,80,30,_("OK "));
  198.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  199.     fl_set_object_callback(obj,space_cb,MM_OK);
  200.   obj = fl_add_button(FL_NORMAL_BUTTON,190,110,80,30,idex(_("Cancel|^[")));fl_set_button_shortcut(obj,scex(_("Cancel|^[")),1);
  201.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  202.     fl_set_object_callback(obj,space_cb,MM_CLOSE);
  203.   obj = fl_add_button(FL_NORMAL_BUTTON,100,110,80,30,idex(_("Apply|#A")));fl_set_button_shortcut(obj,scex(_("Apply|#A")),1);
  204.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  205.     fl_set_object_callback(obj,space_cb,MM_APPLY);
  206.  
  207.   fdui->spaces = fl_bgn_group();
  208.   obj = fl_add_checkbutton(FL_RADIO_BUTTON,20,10,120,30,idex(_("Thin|#T")));fl_set_button_shortcut(obj,scex(_("Thin|#T")),1);
  209.     fl_set_object_color(obj,FL_MCOL,FL_YELLOW);
  210.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  211.     fl_set_object_callback(obj,space_cb,1);
  212.   obj = fl_add_checkbutton(FL_RADIO_BUTTON,20,40,120,30,idex(_("Medium|#M")));fl_set_button_shortcut(obj,scex(_("Medium|#M")),1);
  213.     fl_set_object_color(obj,FL_MCOL,FL_YELLOW);
  214.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  215.     fl_set_object_callback(obj,space_cb,2);
  216.   obj = fl_add_checkbutton(FL_RADIO_BUTTON,20,70,120,30,idex(_("Thick|#H")));fl_set_button_shortcut(obj,scex(_("Thick|#H")),1);
  217.     fl_set_object_color(obj,FL_MCOL,FL_YELLOW);
  218.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  219.     fl_set_object_callback(obj,space_cb,3);
  220.   obj = fl_add_checkbutton(FL_RADIO_BUTTON,140,10,120,30,idex(_("Negative|#N")));fl_set_button_shortcut(obj,scex(_("Negative|#N")),1);
  221.     fl_set_object_color(obj,FL_MCOL,FL_YELLOW);
  222.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  223.     fl_set_object_callback(obj,space_cb,0);
  224.   obj = fl_add_checkbutton(FL_RADIO_BUTTON,140,40,120,30,idex(_("Quadratin|#Q")));fl_set_button_shortcut(obj,scex(_("Quadratin|#Q")),1);
  225.     fl_set_object_color(obj,FL_MCOL,FL_YELLOW);
  226.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  227.     fl_set_object_callback(obj,space_cb,4);
  228.   obj = fl_add_checkbutton(FL_RADIO_BUTTON,140,70,120,30,idex(_("2Quadratin|#2")));fl_set_button_shortcut(obj,scex(_("2Quadratin|#2")),1);
  229.     fl_set_object_color(obj,FL_MCOL,FL_YELLOW);
  230.     fl_set_object_lsize(obj,FL_NORMAL_SIZE);
  231.     fl_set_object_callback(obj,space_cb,5);
  232.   fl_end_group();
  233.  
  234.   fl_end_form();
  235.  
  236.   fdui->space->fdui = fdui;
  237.  
  238.   return fdui;
  239. }
  240. /*---------------------------------------*/
  241.  
  242.