]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/form_ref.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / form_ref.C
1 // File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
2 #include <config.h>
3 #include "xforms_helpers.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 "form_ref.h"
11 #include "FormRef.h"
12
13 FD_form_ref::~FD_form_ref()
14 {
15   if ( form->visible ) fl_hide_form( form );
16   fl_free_form( form );
17 }
18
19
20 FD_form_ref * FormRef::build_ref()
21 {
22   FL_OBJECT *obj;
23   FD_form_ref *fdui = new FD_form_ref;
24
25   fdui->form = fl_bgn_form(FL_NO_BOX, 530, 380);
26   fdui->form->u_vdata = this;
27   obj = fl_add_box(FL_UP_BOX, 0, 0, 530, 380, "");
28   {
29     char const * const dummy = N_("Buffer|#B");
30     fdui->choice_buffer = obj = fl_add_choice(FL_NORMAL_CHOICE, 105, 10, 350, 30, idex(_(dummy)));
31     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
32   }
33     fl_set_object_boxtype(obj, FL_FRAME_BOX);
34     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
35     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
36   fdui->browser_refs = obj = fl_add_browser(FL_HOLD_BROWSER, 10, 50, 270, 240, "");
37     fl_set_object_lalign(obj, FL_ALIGN_TOP);
38     fl_set_object_gravity(obj, FL_NorthWest, FL_South);
39     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
40   {
41     char const * const dummy = N_("Update|#U");
42     fdui->button_update = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 300, 100, 30, idex(_(dummy)));
43     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
44   }
45     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
46     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
47   {
48     char const * const dummy = N_("Sort|#S");
49     fdui->check_sort = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 130, 300, 30, 30, idex(_(dummy)));
50     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
51   }
52     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
53     fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
54     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
55   {
56     char const * const dummy = N_("Name:|#N");
57     fdui->input_name = obj = fl_add_input(FL_NORMAL_INPUT, 370, 50, 150, 40, idex(_(dummy)));
58     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
59   }
60     fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast);
61   fdui->input_ref = obj = fl_add_input(FL_NORMAL_INPUT, 370, 100, 150, 40, _("Ref:"));
62     fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast);
63   {
64     char const * const dummy = N_("Reference type|#R");
65     fdui->choice_type = obj = fl_add_choice(FL_NORMAL_CHOICE, 370, 170, 150, 40, idex(_(dummy)));
66     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
67   }
68     fl_set_object_boxtype(obj, FL_FRAME_BOX);
69     fl_set_object_lalign(obj, FL_ALIGN_TOP);
70     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
71     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
72   {
73     char const * const dummy = N_("Goto reference|#G");
74     fdui->button_go = obj = fl_add_button(FL_NORMAL_BUTTON, 370, 220, 150, 40, idex(_(dummy)));
75     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
76   }
77     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
78     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
79   {
80     char const * const dummy = N_("Restore|#R");
81     fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 340, 100, 30, idex(_(dummy)));
82     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
83   }
84     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
85     fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
86   fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 230, 340, 90, 30, _("OK"));
87     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
88     fl_set_object_callback(obj, C_FormBaseOKCB, 0);
89   {
90     char const * const dummy = N_("Cancel|^[");
91     fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 430, 340, 90, 30, idex(_(dummy)));
92     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
93   }
94     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
95     fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
96   {
97     char const * const dummy = N_("Apply|#A");
98     fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 330, 340, 90, 30, idex(_(dummy)));
99     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
100   }
101     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
102     fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
103   fl_end_form();
104
105   fdui->form->fdui = fdui;
106
107   return fdui;
108 }
109 /*---------------------------------------*/
110