]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormTabular.C
bbe35664ee180d9dcf5e5f57672083171e48d38e
[features.git] / src / frontends / xforms / FormTabular.C
1 /* FormTabular.C
2  * FormTabular Interface Class Implementation
3  */
4
5 #include <config.h>
6 #include "lyx_gui_misc.h"
7 #include "gettext.h"
8 #include FORMS_H_LOCATION
9
10 #include "FormTabular.h"
11 #include "form_tabular.h"
12 #include "xform_macros.h"
13 #include "input_validators.h"
14 #include "LyXView.h"
15 #include "lyxfunc.h"
16 #include "Dialogs.h"
17 #include "lyxrc.h"
18 #include "debug.h"
19 #include "insets/insettabular.h"
20 #include "buffer.h"
21
22
23 #ifdef SIGC_CXX_NAMESPACES
24 using SigC::slot;
25 #endif
26
27 C_RETURNCB(FormTabular,  WMHideCB)
28 C_GENERICCB(FormTabular, CloseCB)
29 C_GENERICCB(FormTabular, InputCB)
30 C_GENERICCB(FormTabular, OKCB)
31 C_GENERICCB(FormTabular, ApplyCB)
32 C_GENERICCB(FormTabular, CancelCB)
33
34
35 FormTabular::FormTabular(LyXView * lv, Dialogs * d)
36         : dialog_(0), tabular_options_(0), column_options_(0),
37           cell_options_(0), longtable_options_(0), create_tabular_(0),
38           lv_(lv), d_(d), u_(0), h_(0), inset_(0), actCell_(-1) 
39 {
40     // let the dialog be shown
41     // This is a permanent connection so we won't bother
42     // storing a copy because we won't be disconnecting.
43     d->showTabular.connect(slot(this, &FormTabular::showInset));
44     d->updateTabular.connect(slot(this, &FormTabular::updateInset));
45     d->hideTabular.connect(slot(this, &FormTabular::hideInset));
46     d->showTabularCreate.connect(slot(this, &FormTabular::show_create));
47 }
48
49
50 FormTabular::~FormTabular()
51 {
52     free();
53 }
54
55
56 void FormTabular::build()
57 {
58     dialog_ = build_tabular();
59     tabular_options_ = build_tabular_options();
60     column_options_ = build_column_options();
61     cell_options_ = build_cell_options();
62     longtable_options_ = build_longtable_options();
63     create_tabular_ = build_create_tabular();
64
65     fl_set_input_return(column_options_->input_column_width,
66                         FL_RETURN_END);
67     fl_set_input_return(column_options_->input_special_alignment,
68                         FL_RETURN_CHANGED);
69     fl_set_input_return(cell_options_->input_mcolumn_width,
70                         FL_RETURN_CHANGED);
71     fl_set_input_return(cell_options_->input_special_multialign,
72                         FL_RETURN_CHANGED);
73
74     fl_addto_tabfolder(dialog_->tabFolder, _("Tabular"),
75                        tabular_options_->form_tabular_options);
76     fl_addto_tabfolder(dialog_->tabFolder, _("Column/Row"),
77                        column_options_->form_column_options);
78     fl_addto_tabfolder(dialog_->tabFolder, _("Cell"),
79                        cell_options_->form_cell_options);
80     fl_addto_tabfolder(dialog_->tabFolder, _("LongTable"),
81                        longtable_options_->form_longtable_options);
82     
83     fl_set_form_atclose(dialog_->form_tabular,
84                         C_FormTabularWMHideCB, 0);
85
86     fl_set_slider_bounds(create_tabular_->slider_rows, 1, 50);
87     fl_set_slider_bounds(create_tabular_->slider_columns, 1, 50);
88     fl_set_slider_value(create_tabular_->slider_rows, 5);
89     fl_set_slider_value(create_tabular_->slider_columns, 5);
90     fl_set_slider_precision(create_tabular_->slider_rows, 0);
91     fl_set_slider_precision(create_tabular_->slider_columns, 0);
92     fl_set_form_atclose(create_tabular_->form_create_tabular, 
93                         C_FormTabularWMHideCB, 0);
94 }
95
96
97 void FormTabular::show()
98 {
99     if (!dialog_) {
100         build();
101     }
102     update();  // make sure its up-to-date
103
104     if (dialog_->form_tabular->visible) {
105         fl_raise_form(dialog_->form_tabular);
106     } else {
107         fl_show_form(dialog_->form_tabular,
108                      FL_PLACE_MOUSE | FL_FREE_SIZE,
109                      FL_TRANSIENT,
110                      _("Tabular Layout"));
111 //      u_ = d_->updateBufferDependent.connect(slot(this,
112 //                                                  &FormTabular::update));
113         h_ = d_->hideBufferDependent.connect(slot(this,
114                                                   &FormTabular::hide));
115     }
116 }
117
118 void FormTabular::showInset(InsetTabular * ti)
119 {
120     inset_ = ti;
121     if (ti) {
122         show();
123     }
124 }
125
126 void FormTabular::hide()
127 {
128     if (dialog_ && dialog_->form_tabular && dialog_->form_tabular->visible) {
129         fl_hide_form(dialog_->form_tabular);
130         u_.disconnect();
131         h_.disconnect();
132         inset_ = 0;
133     }
134 }
135
136
137 void FormTabular::hideInset(InsetTabular * ti)
138 {
139     if (inset_ == ti) {
140         inset_ = 0;
141         hide();
142     }
143 }
144
145
146 void FormTabular::update()
147 {
148     if (dialog_) {
149         local_update(true);
150     }
151 }
152
153 void FormTabular::updateInset(InsetTabular * ti)
154 {
155     inset_ = ti;
156     if (ti && dialog_ && dialog_->form_tabular->visible) {
157         update();
158     }
159 }
160
161
162 void FormTabular::free()
163 {
164     // we don't need to delete u and h here because
165     // hide() does that after disconnecting.
166     if (dialog_) {
167         if (dialog_->form_tabular
168             && dialog_->form_tabular->visible) {
169             hide();
170         }
171         fl_free_form(dialog_->form_tabular);
172         delete dialog_;
173         dialog_ = 0;
174
175         fl_free_form(tabular_options_->form_tabular_options);
176         delete tabular_options_;
177         tabular_options_ = 0;
178
179         fl_free_form(column_options_->form_column_options);
180         delete column_options_;
181         column_options_ = 0;
182
183         fl_free_form(cell_options_->form_cell_options);
184         delete cell_options_;
185         cell_options_ = 0;
186
187         fl_free_form(longtable_options_->form_longtable_options);
188         delete longtable_options_;
189         longtable_options_ = 0;
190
191         hide_create();
192         fl_free_form(create_tabular_->form_create_tabular);
193         delete create_tabular_;
194         create_tabular_ = 0;
195     }
196 }
197
198
199 int FormTabular::WMHideCB(FL_FORM * form, void *)
200 {
201     // Ensure that the signals (u and h) are disconnected even if the
202     // window manager is used to close the dialog.
203     FormTabular * pre = static_cast<FormTabular*>(form->u_vdata);
204     pre->hide();
205     return FL_CANCEL;
206 }
207
208
209 void FormTabular::CloseCB(FL_OBJECT * ob, long)
210 {
211     FormTabular * pre = static_cast<FormTabular*>(ob->form->u_vdata);
212     pre->hide();
213 }
214
215
216 void FormTabular::InputCB(FL_OBJECT * ob, long l)
217 {
218     FormTabular * pre = static_cast<FormTabular*>(ob->form->u_vdata);
219     pre->SetTabularOptions(ob, l);
220 }
221
222
223 bool FormTabular::local_update(bool flag)
224 {
225     if (!inset_ || !inset_->tabular)
226         return false;
227
228     LyXTabular
229         * tabular = inset_->tabular;
230     int
231         align,
232         cell,
233         column,row;
234     char
235         buf[12];
236     string
237         pwidth, special;
238
239     actCell_ = cell = inset_->GetActCell();
240     column = tabular->column_of_cell(cell)+1;
241     fl_set_object_label(dialog_->text_warning,"");
242     fl_activate_object(column_options_->input_special_alignment);
243     fl_activate_object(cell_options_->input_special_multialign);
244     fl_activate_object(column_options_->input_column_width);
245     sprintf(buf,"%d",column);
246     fl_set_input(dialog_->input_tabular_column, buf);
247     fl_deactivate_object(dialog_->input_tabular_column);
248     row = tabular->row_of_cell(cell)+1;
249     sprintf(buf,"%d",row);
250     fl_set_input(dialog_->input_tabular_row, buf);
251     fl_deactivate_object(dialog_->input_tabular_row);
252     if (tabular->IsMultiColumn(cell))
253         fl_set_button(cell_options_->radio_multicolumn, 1);
254     else
255         fl_set_button(cell_options_->radio_multicolumn, 0);
256     if (tabular->GetRotateCell(cell))
257         fl_set_button(cell_options_->radio_rotate_cell, 1);
258     else
259         fl_set_button(cell_options_->radio_rotate_cell, 0);
260     if (tabular->TopLine(cell))
261         fl_set_button(column_options_->radio_border_top, 1);
262     else
263         fl_set_button(column_options_->radio_border_top, 0);
264     if (tabular->BottomLine(cell))
265         fl_set_button(column_options_->radio_border_bottom, 1);
266     else
267         fl_set_button(column_options_->radio_border_bottom, 0);
268     if (tabular->LeftLine(cell))
269         fl_set_button(column_options_->radio_border_left, 1);
270     else
271         fl_set_button(column_options_->radio_border_left, 0);
272     if (tabular->RightLine(cell))
273         fl_set_button(column_options_->radio_border_right, 1);
274     else
275         fl_set_button(column_options_->radio_border_right, 0);
276     align = tabular->GetAlignment(cell);
277     fl_set_button(column_options_->radio_align_left, 0);
278     fl_set_button(column_options_->radio_align_right, 0);
279     fl_set_button(column_options_->radio_align_center, 0);
280     special = tabular->GetAlignSpecial(cell,LyXTabular::SET_SPECIAL_COLUMN);
281     if (flag)
282         fl_set_input(column_options_->input_special_alignment,
283                      special.c_str());
284     if (lv_->buffer()->isReadonly()) 
285         fl_deactivate_object(column_options_->input_special_alignment);
286     special = tabular->GetAlignSpecial(cell,LyXTabular::SET_SPECIAL_MULTI);
287     if (flag)
288         fl_set_input(cell_options_->input_special_multialign, special.c_str());
289     if (lv_->buffer()->isReadonly()) 
290         fl_deactivate_object(cell_options_->input_special_multialign);
291     pwidth = tabular->GetPWidth(cell);
292     if (flag)
293         fl_set_input(column_options_->input_column_width,pwidth.c_str());
294     if (lv_->buffer()->isReadonly()) {
295         fl_deactivate_object(column_options_->input_column_width);
296     } else {
297         fl_activate_object(column_options_->input_column_width);
298     }
299     if (!pwidth.empty()) {
300         fl_activate_object(cell_options_->radio_linebreak_cell);
301         fl_set_object_lcol(cell_options_->radio_linebreak_cell, FL_BLACK);
302         fl_set_button(cell_options_->radio_linebreak_cell,
303                       tabular->GetLinebreaks(cell));
304     } else {
305         fl_deactivate_object(cell_options_->radio_linebreak_cell);
306         fl_set_object_lcol(cell_options_->radio_linebreak_cell, FL_INACTIVE);
307         fl_set_button(cell_options_->radio_linebreak_cell,0);
308     }
309     if ((!pwidth.empty() && !tabular->IsMultiColumn(cell)) ||
310         (align == LYX_ALIGN_LEFT))
311         fl_set_button(column_options_->radio_align_left, 1);
312     else if (align == LYX_ALIGN_RIGHT)
313         fl_set_button(column_options_->radio_align_right, 1);
314     else
315         fl_set_button(column_options_->radio_align_center, 1);
316     if (!pwidth.empty() && !tabular->IsMultiColumn(cell)) {
317         fl_deactivate_object(column_options_->radio_align_left);
318         fl_deactivate_object(column_options_->radio_align_right);
319         fl_deactivate_object(column_options_->radio_align_center);
320         fl_set_object_lcol(column_options_->radio_align_left, FL_INACTIVE);
321         fl_set_object_lcol(column_options_->radio_align_right, FL_INACTIVE);
322         fl_set_object_lcol(column_options_->radio_align_center, FL_INACTIVE);
323     } else {
324         fl_activate_object(column_options_->radio_align_left);
325         fl_activate_object(column_options_->radio_align_right);
326         fl_activate_object(column_options_->radio_align_center);
327         fl_set_object_lcol(column_options_->radio_align_left, FL_BLACK);
328         fl_set_object_lcol(column_options_->radio_align_right, FL_BLACK);
329         fl_set_object_lcol(column_options_->radio_align_center, FL_BLACK);
330     }
331     fl_set_button(tabular_options_->radio_longtable,
332                   tabular->IsLongTabular());
333     if (tabular->IsLongTabular()) {
334         fl_activate_object(longtable_options_->radio_lt_firsthead);
335         fl_activate_object(longtable_options_->radio_lt_head);
336         fl_activate_object(longtable_options_->radio_lt_foot);
337         fl_activate_object(longtable_options_->radio_lt_lastfoot);
338         fl_activate_object(longtable_options_->radio_lt_newpage);
339         fl_set_object_lcol(longtable_options_->radio_lt_firsthead, FL_BLACK);
340         fl_set_object_lcol(longtable_options_->radio_lt_head, FL_BLACK);
341         fl_set_object_lcol(longtable_options_->radio_lt_foot, FL_BLACK);
342         fl_set_object_lcol(longtable_options_->radio_lt_lastfoot, FL_BLACK);
343         fl_set_object_lcol(longtable_options_->radio_lt_newpage, FL_BLACK);
344         fl_set_button(longtable_options_->radio_lt_firsthead,
345                       tabular->GetRowOfLTFirstHead(cell));
346         fl_set_button(longtable_options_->radio_lt_head,
347                       tabular->GetRowOfLTHead(cell));
348         fl_set_button(longtable_options_->radio_lt_foot,
349                       tabular->GetRowOfLTFoot(cell));
350         fl_set_button(longtable_options_->radio_lt_lastfoot,
351                       tabular->GetRowOfLTLastFoot(cell));
352         fl_set_button(longtable_options_->radio_lt_newpage,
353                       tabular->GetLTNewPage(cell));
354     } else {
355         fl_deactivate_object(longtable_options_->radio_lt_firsthead);
356         fl_deactivate_object(longtable_options_->radio_lt_head);
357         fl_deactivate_object(longtable_options_->radio_lt_foot);
358         fl_deactivate_object(longtable_options_->radio_lt_lastfoot);
359         fl_deactivate_object(longtable_options_->radio_lt_newpage);
360         fl_set_button(longtable_options_->radio_lt_firsthead,0);
361         fl_set_button(longtable_options_->radio_lt_head,0);
362         fl_set_button(longtable_options_->radio_lt_foot,0);
363         fl_set_button(longtable_options_->radio_lt_lastfoot,0);
364         fl_set_button(longtable_options_->radio_lt_newpage,0);
365         fl_set_object_lcol(longtable_options_->radio_lt_firsthead,FL_INACTIVE);
366         fl_set_object_lcol(longtable_options_->radio_lt_head, FL_INACTIVE);
367         fl_set_object_lcol(longtable_options_->radio_lt_foot, FL_INACTIVE);
368         fl_set_object_lcol(longtable_options_->radio_lt_lastfoot, FL_INACTIVE);
369         fl_set_object_lcol(longtable_options_->radio_lt_newpage, FL_INACTIVE);
370     }
371     fl_set_button(tabular_options_->radio_rotate_tabular,
372                   tabular->GetRotateTabular());
373     return true;
374 }
375
376 void FormTabular::SetTabularOptions(FL_OBJECT * ob, long)
377 {
378     if (!inset_)
379         return;
380
381     LyXTabular
382         * tabular = inset_->tabular;
383     int
384         cell,
385         s,
386         num = 0;
387     string
388         special,
389         str;
390
391     cell = inset_->GetActCell();
392     if (actCell_ != cell) {
393         local_update(false);
394         fl_set_object_label(dialog_->text_warning,
395                      _("Warning: Wrong Cursor position, updated window"));
396         fl_show_object(dialog_->text_warning);
397         return;
398     }
399     // No point in processing directives that you can't do anything with
400     // anyhow, so exit now if the buffer is read-only.
401     if (lv_->buffer()->isReadonly()) {
402       local_update(false);
403       return;
404     }
405     if (ob == column_options_->input_column_width) {
406         string
407             str;
408         str = fl_get_input(ob);
409         if (!str.empty() && !isValidLength(str)) {
410             fl_set_object_label(dialog_->text_warning,
411                  _("Warning: Invalid Length (valid example: 10mm)"));
412             fl_show_object(dialog_->text_warning);
413             return;
414         }
415         inset_->TabularFeatures(lv_->view(), LyXTabular::SET_PWIDTH,str);
416         local_update(false); // update for alignment
417         return;
418     }
419     str = fl_get_input(column_options_->input_column_width);
420     if (!str.empty() && !isValidLength(str)) {
421         fl_set_object_label(
422             dialog_->text_warning,
423             _("Warning: Invalid Length (valid example: 10mm)"));
424         fl_show_object(dialog_->text_warning);
425         return;
426     }
427     if (ob == tabular_options_->button_append_row)
428         num = LyXTabular::APPEND_ROW;
429     else if (ob == tabular_options_->button_append_column)
430         num = LyXTabular::APPEND_COLUMN;
431     else if (ob == tabular_options_->button_delete_row)
432         num = LyXTabular::DELETE_ROW;
433     else if (ob == tabular_options_->button_delete_column)
434         num = LyXTabular::DELETE_COLUMN;
435     else if (ob == tabular_options_->button_set_borders)
436         num = LyXTabular::SET_ALL_LINES;
437     else if (ob == tabular_options_->button_unset_borders)
438         num = LyXTabular::UNSET_ALL_LINES;
439     else if (ob == column_options_->radio_border_top)
440         num = LyXTabular::TOGGLE_LINE_TOP;
441     else if (ob == column_options_->radio_border_bottom)
442         num = LyXTabular::TOGGLE_LINE_BOTTOM;
443     else if (ob == column_options_->radio_border_left)
444         num = LyXTabular::TOGGLE_LINE_LEFT;
445     else if (ob == column_options_->radio_border_right)
446         num = LyXTabular::TOGGLE_LINE_RIGHT;
447     else if (ob == column_options_->radio_align_left)
448         num = LyXTabular::ALIGN_LEFT;
449     else if (ob == column_options_->radio_align_right)
450         num = LyXTabular::ALIGN_RIGHT;
451     else if (ob == column_options_->radio_align_center)
452         num = LyXTabular::ALIGN_CENTER;
453     else if (ob == cell_options_->radio_multicolumn)
454         num = LyXTabular::MULTICOLUMN;
455     else if (ob == tabular_options_->radio_longtable) {
456         s=fl_get_button(tabular_options_->radio_longtable);
457         if (s) {
458             num = LyXTabular::SET_LONGTABULAR;
459             fl_activate_object(longtable_options_->radio_lt_firsthead);
460             fl_activate_object(longtable_options_->radio_lt_head);
461             fl_activate_object(longtable_options_->radio_lt_foot);
462             fl_activate_object(longtable_options_->radio_lt_lastfoot);
463             fl_activate_object(longtable_options_->radio_lt_newpage);
464             fl_set_button(longtable_options_->radio_lt_firsthead,
465                           tabular->GetRowOfLTFirstHead(cell));
466             fl_set_button(longtable_options_->radio_lt_head,
467                           tabular->GetRowOfLTHead(cell));
468             fl_set_button(longtable_options_->radio_lt_foot,
469                           tabular->GetRowOfLTFoot(cell));
470             fl_set_button(longtable_options_->radio_lt_lastfoot,
471                           tabular->GetRowOfLTLastFoot(cell));
472             fl_set_button(longtable_options_->radio_lt_firsthead,
473                           tabular->GetLTNewPage(cell));
474         } else {
475             num = LyXTabular::UNSET_LONGTABULAR;
476             fl_deactivate_object(longtable_options_->radio_lt_firsthead);
477             fl_deactivate_object(longtable_options_->radio_lt_head);
478             fl_deactivate_object(longtable_options_->radio_lt_foot);
479             fl_deactivate_object(longtable_options_->radio_lt_lastfoot);
480             fl_deactivate_object(longtable_options_->radio_lt_newpage);
481             fl_set_button(longtable_options_->radio_lt_firsthead,0);
482             fl_set_button(longtable_options_->radio_lt_head,0);
483             fl_set_button(longtable_options_->radio_lt_foot,0);
484             fl_set_button(longtable_options_->radio_lt_lastfoot,0);
485             fl_set_button(longtable_options_->radio_lt_newpage,0);
486             fl_set_object_lcol(longtable_options_->radio_lt_firsthead,
487                                FL_INACTIVE);
488             fl_set_object_lcol(longtable_options_->radio_lt_head, FL_INACTIVE);
489             fl_set_object_lcol(longtable_options_->radio_lt_foot, FL_INACTIVE);
490             fl_set_object_lcol(longtable_options_->radio_lt_lastfoot,
491                                FL_INACTIVE);
492             fl_set_object_lcol(longtable_options_->radio_lt_newpage,
493                                FL_INACTIVE);
494         }
495     } else if (ob == tabular_options_->radio_rotate_tabular) {
496         s=fl_get_button(tabular_options_->radio_rotate_tabular);
497         if (s)
498             num = LyXTabular::SET_ROTATE_TABULAR;
499         else
500             num = LyXTabular::UNSET_ROTATE_TABULAR;
501     } else if (ob == cell_options_->radio_rotate_cell) {
502         s=fl_get_button(cell_options_->radio_rotate_cell);
503         if (s)
504             num = LyXTabular::SET_ROTATE_CELL;
505         else
506             num = LyXTabular::UNSET_ROTATE_CELL;
507     } else if (ob == cell_options_->radio_linebreak_cell) {
508         num = LyXTabular::SET_LINEBREAKS;
509     } else if (ob == longtable_options_->radio_lt_firsthead) {
510         num = LyXTabular::SET_LTFIRSTHEAD;
511     } else if (ob == longtable_options_->radio_lt_head) {
512         num = LyXTabular::SET_LTHEAD;
513     } else if (ob == longtable_options_->radio_lt_foot) {
514         num = LyXTabular::SET_LTFOOT;
515     } else if (ob == longtable_options_->radio_lt_lastfoot) {
516         num = LyXTabular::SET_LTLASTFOOT;
517     } else if (ob == longtable_options_->radio_lt_newpage) {
518         num = LyXTabular::SET_LTNEWPAGE;
519     } else if (ob == column_options_->input_special_alignment) {
520         special = fl_get_input(column_options_->input_special_alignment);
521         num = LyXTabular::SET_SPECIAL_COLUMN;
522     } else if (ob == cell_options_->input_special_multialign) {
523         special = fl_get_input(cell_options_->input_special_multialign);
524         num = LyXTabular::SET_SPECIAL_MULTI;
525     } else
526         return;
527     
528     inset_->TabularFeatures(lv_->view(), num, special);
529     local_update(false);
530 }
531
532 // +-----------------------------------------------------------------------+
533 // |          Functions/Dialogs for creating tabular insets                |
534 // +-----------------------------------------------------------------------+
535
536 void FormTabular::show_create()
537 {
538     if (!dialog_) {
539         build();
540     }
541     if (create_tabular_->form_create_tabular->visible) {
542         fl_raise_form(create_tabular_->form_create_tabular);
543     } else {
544         fl_show_form(create_tabular_->form_create_tabular,
545                      FL_PLACE_MOUSE | FL_FREE_SIZE,
546                      FL_FULLBORDER, _("Insert Tabular"));
547     }
548 }
549
550
551 void FormTabular::hide_create()
552 {
553     if (create_tabular_->form_create_tabular &&
554         create_tabular_->form_create_tabular->visible)
555         fl_hide_form(create_tabular_->form_create_tabular);
556 }
557
558
559 void FormTabular::apply_create()
560 {
561     int
562         xsize,ysize;
563
564 //    comm->setMinibuffer(_("Inserting tabular inset..."));
565     ysize = int(fl_get_slider_value(create_tabular_->slider_columns) + 0.5);
566     xsize = int(fl_get_slider_value(create_tabular_->slider_rows) + 0.5);
567     InsetTabular * in = new InsetTabular(lv_->buffer(),xsize,ysize);
568     if (!lv_->view()->open_new_inset(in)) {
569         delete in;
570     }
571 //    comm->setMinibuffer(_("Tabular mode"));
572 }
573
574
575 void FormTabular::OKCB(FL_OBJECT * ob, long)
576 {
577     FormTabular * pre = (FormTabular*)ob->form->u_vdata;
578     pre->apply_create();
579     pre->hide_create();
580 }
581
582
583 void FormTabular::ApplyCB(FL_OBJECT * ob, long)
584 {
585     FormTabular * pre = (FormTabular*)ob->form->u_vdata;
586     pre->apply_create();
587 }
588
589
590 void FormTabular::CancelCB(FL_OBJECT * ob, long)
591 {
592     FormTabular * pre = (FormTabular*)ob->form->u_vdata;
593     pre->hide_create();
594 }
595
596