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