mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fixed small problem in InsetText and start for a better tabular layout
(longtable options and better putting the width fields with v.alignment) This is not finished yet! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3252 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b8ec942f92
commit
caf1ad7d8d
@ -1,3 +1,8 @@
|
||||
2001-12-19 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* tabular.[Ch]: better support for longtabular options (not finished
|
||||
yet!)
|
||||
|
||||
2001-12-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* text.C (paintLastRow): use the label font instead of the font of
|
||||
|
@ -1,3 +1,8 @@
|
||||
2001-12-19 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* FormTabular.C (update): change a bit the tabular layout and added
|
||||
better longtable options handling.
|
||||
|
||||
2001-12-15 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* FormToc.C: using std::endl
|
||||
|
@ -118,13 +118,13 @@ void FormTabular::build()
|
||||
FL_RETURN_END);
|
||||
|
||||
fl_addto_tabfolder(dialog_->tabFolder, _("Tabular"),
|
||||
tabular_options_->form);
|
||||
tabular_options_->form);
|
||||
fl_addto_tabfolder(dialog_->tabFolder, _("Column/Row"),
|
||||
column_options_->form);
|
||||
column_options_->form);
|
||||
fl_addto_tabfolder(dialog_->tabFolder, _("Cell"),
|
||||
cell_options_->form);
|
||||
cell_options_->form);
|
||||
fl_addto_tabfolder(dialog_->tabFolder, _("LongTable"),
|
||||
longtable_options_->form);
|
||||
longtable_options_->form);
|
||||
|
||||
// We should set these input filters on width fields to make them accept
|
||||
// only unsigned numbers.
|
||||
@ -173,8 +173,8 @@ void FormTabular::update()
|
||||
sprintf(buf, "%d", column);
|
||||
fl_set_input(dialog_->input_tabular_column, buf);
|
||||
fl_deactivate_object(dialog_->input_tabular_column);
|
||||
int row = tabular->row_of_cell(cell) + 1;
|
||||
sprintf(buf, "%d", row);
|
||||
int row = tabular->row_of_cell(cell);
|
||||
sprintf(buf, "%d", row + 1);
|
||||
fl_set_input(dialog_->input_tabular_row, buf);
|
||||
fl_deactivate_object(dialog_->input_tabular_row);
|
||||
if (tabular->IsMultiColumn(cell)) {
|
||||
@ -351,33 +351,104 @@ void FormTabular::update()
|
||||
tabular->IsLongTabular());
|
||||
|
||||
bool const enable = tabular->IsLongTabular();
|
||||
|
||||
setEnabled(longtable_options_->radio_lt_firsthead, enable);
|
||||
setEnabled(longtable_options_->radio_lt_head, enable);
|
||||
setEnabled(longtable_options_->radio_lt_foot, enable);
|
||||
setEnabled(longtable_options_->radio_lt_lastfoot, enable);
|
||||
setEnabled(longtable_options_->radio_lt_newpage, enable);
|
||||
setEnabled(longtable_options_->check_1head_2border_above, enable);
|
||||
setEnabled(longtable_options_->check_1head_2border_below, enable);
|
||||
setEnabled(longtable_options_->check_1head_empty, enable);
|
||||
setEnabled(longtable_options_->radio_lt_head, enable);
|
||||
setEnabled(longtable_options_->check_head_2border_above, enable);
|
||||
setEnabled(longtable_options_->check_head_2border_below, enable);
|
||||
setEnabled(longtable_options_->radio_lt_foot, enable);
|
||||
setEnabled(longtable_options_->check_foot_2border_above, enable);
|
||||
setEnabled(longtable_options_->check_foot_2border_below, enable);
|
||||
setEnabled(longtable_options_->radio_lt_lastfoot, enable);
|
||||
setEnabled(longtable_options_->check_lastfoot_2border_above, enable);
|
||||
setEnabled(longtable_options_->check_lastfoot_2border_below, enable);
|
||||
setEnabled(longtable_options_->check_lastfoot_empty, enable);
|
||||
setEnabled(longtable_options_->radio_lt_newpage, enable);
|
||||
|
||||
if (enable) {
|
||||
LyXTabular::ltType dummyltt;
|
||||
LyXTabular::ltType ltt;
|
||||
fl_set_button(longtable_options_->radio_lt_firsthead,
|
||||
tabular->GetRowOfLTFirstHead(row - 1, dummyltt));
|
||||
tabular->GetRowOfLTFirstHead(row, ltt));
|
||||
if (ltt.row && !ltt.empty) {
|
||||
fl_set_button(longtable_options_->check_1head_2border_above,
|
||||
ltt.topDL);
|
||||
fl_set_button(longtable_options_->check_1head_2border_above,
|
||||
ltt.topDL);
|
||||
} else {
|
||||
setEnabled(longtable_options_->check_1head_2border_above, 0);
|
||||
setEnabled(longtable_options_->check_1head_2border_below, 0);
|
||||
fl_set_button(longtable_options_->check_1head_2border_above,0);
|
||||
fl_set_button(longtable_options_->check_1head_2border_above,0);
|
||||
fl_set_button(longtable_options_->check_1head_empty,ltt.empty);
|
||||
if (ltt.empty)
|
||||
setEnabled(longtable_options_->radio_lt_firsthead, 0);
|
||||
}
|
||||
fl_set_button(longtable_options_->radio_lt_head,
|
||||
tabular->GetRowOfLTHead(row - 1, dummyltt));
|
||||
tabular->GetRowOfLTHead(row, ltt));
|
||||
if (ltt.row) {
|
||||
fl_set_button(longtable_options_->check_head_2border_above,
|
||||
ltt.topDL);
|
||||
fl_set_button(longtable_options_->check_head_2border_above,
|
||||
ltt.topDL);
|
||||
} else {
|
||||
setEnabled(longtable_options_->check_head_2border_above, 0);
|
||||
setEnabled(longtable_options_->check_head_2border_below, 0);
|
||||
fl_set_button(longtable_options_->check_head_2border_above,0);
|
||||
fl_set_button(longtable_options_->check_head_2border_above,0);
|
||||
}
|
||||
fl_set_button(longtable_options_->radio_lt_foot,
|
||||
tabular->GetRowOfLTFoot(row - 1, dummyltt));
|
||||
tabular->GetRowOfLTFoot(row, ltt));
|
||||
if (ltt.row) {
|
||||
fl_set_button(longtable_options_->check_foot_2border_above,
|
||||
ltt.topDL);
|
||||
fl_set_button(longtable_options_->check_foot_2border_above,
|
||||
ltt.topDL);
|
||||
} else {
|
||||
setEnabled(longtable_options_->check_foot_2border_above, 0);
|
||||
setEnabled(longtable_options_->check_foot_2border_below, 0);
|
||||
fl_set_button(longtable_options_->check_foot_2border_above,0);
|
||||
fl_set_button(longtable_options_->check_foot_2border_above,0);
|
||||
}
|
||||
fl_set_button(longtable_options_->radio_lt_lastfoot,
|
||||
tabular->GetRowOfLTLastFoot(row - 1, dummyltt));
|
||||
tabular->GetRowOfLTLastFoot(row, ltt));
|
||||
if (ltt.row && !ltt.empty) {
|
||||
fl_set_button(longtable_options_->check_lastfoot_2border_above,
|
||||
ltt.topDL);
|
||||
fl_set_button(longtable_options_->check_lastfoot_2border_above,
|
||||
ltt.topDL);
|
||||
} else {
|
||||
setEnabled(longtable_options_->check_lastfoot_2border_above,0);
|
||||
setEnabled(longtable_options_->check_lastfoot_2border_below,0);
|
||||
fl_set_button(longtable_options_->check_lastfoot_2border_above, 0);
|
||||
fl_set_button(longtable_options_->check_lastfoot_2border_above, 0);
|
||||
fl_set_button(longtable_options_->check_lastfoot_empty, ltt.empty);
|
||||
if (ltt.empty)
|
||||
setEnabled(longtable_options_->radio_lt_lastfoot, 0);
|
||||
}
|
||||
fl_set_button(longtable_options_->radio_lt_newpage,
|
||||
tabular->GetLTNewPage(cell));
|
||||
tabular->GetLTNewPage(row));
|
||||
} else {
|
||||
fl_set_button(longtable_options_->radio_lt_firsthead, 0);
|
||||
fl_set_button(longtable_options_->check_1head_2border_above, 0);
|
||||
fl_set_button(longtable_options_->check_1head_2border_above, 0);
|
||||
fl_set_button(longtable_options_->check_1head_empty, 0);
|
||||
fl_set_button(longtable_options_->radio_lt_head, 0);
|
||||
fl_set_button(longtable_options_->check_head_2border_above, 0);
|
||||
fl_set_button(longtable_options_->check_head_2border_above, 0);
|
||||
fl_set_button(longtable_options_->radio_lt_foot, 0);
|
||||
fl_set_button(longtable_options_->check_foot_2border_above, 0);
|
||||
fl_set_button(longtable_options_->check_foot_2border_above, 0);
|
||||
fl_set_button(longtable_options_->radio_lt_lastfoot, 0);
|
||||
fl_set_button(longtable_options_->check_lastfoot_2border_above, 0);
|
||||
fl_set_button(longtable_options_->check_lastfoot_2border_above, 0);
|
||||
fl_set_button(longtable_options_->check_lastfoot_empty, 0);
|
||||
fl_set_button(longtable_options_->radio_lt_newpage, 0);
|
||||
}
|
||||
fl_set_button(tabular_options_->radio_rotate_tabular,
|
||||
tabular->GetRotateTabular());
|
||||
tabular->GetRotateTabular());
|
||||
}
|
||||
|
||||
|
||||
@ -386,13 +457,11 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
if (!inset_)
|
||||
return false;
|
||||
|
||||
LyXTabular * tabular = inset_->tabular.get();
|
||||
int s;
|
||||
LyXTabular::Feature num = LyXTabular::LAST_ACTION;
|
||||
string special;;
|
||||
|
||||
int cell = inset_->getActCell();
|
||||
int row = tabular->row_of_cell(cell);
|
||||
|
||||
if (actCell_ != cell) {
|
||||
update();
|
||||
@ -407,7 +476,9 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
update();
|
||||
return false;
|
||||
}
|
||||
if (ob == column_options_->input_column_width) {
|
||||
if ((ob == column_options_->input_column_width) ||
|
||||
(ob == column_options_->choice_value_column_width))
|
||||
{
|
||||
string const str =
|
||||
getLengthFromWidgets(column_options_->input_column_width,
|
||||
column_options_->choice_value_column_width);
|
||||
@ -415,7 +486,9 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
update(); // update for alignment
|
||||
return true;
|
||||
}
|
||||
if (ob == cell_options_->input_mcolumn_width) {
|
||||
if ((ob == cell_options_->input_mcolumn_width) ||
|
||||
(ob == cell_options_->choice_value_mcolumn_width))
|
||||
{
|
||||
string const str =
|
||||
getLengthFromWidgets(cell_options_->input_mcolumn_width,
|
||||
cell_options_->choice_value_mcolumn_width);
|
||||
@ -459,71 +532,41 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
else if (ob == cell_options_->radio_multicolumn)
|
||||
num = LyXTabular::MULTICOLUMN;
|
||||
else if (ob == tabular_options_->radio_longtable) {
|
||||
bool const enable =
|
||||
fl_get_button(tabular_options_->radio_longtable);
|
||||
|
||||
setEnabled(longtable_options_->radio_lt_firsthead, enable);
|
||||
setEnabled(longtable_options_->radio_lt_head, enable);
|
||||
setEnabled(longtable_options_->radio_lt_foot, enable);
|
||||
setEnabled(longtable_options_->radio_lt_lastfoot, enable);
|
||||
setEnabled(longtable_options_->radio_lt_newpage, enable);
|
||||
|
||||
if (enable) {
|
||||
if (fl_get_button(tabular_options_->radio_longtable))
|
||||
num = LyXTabular::SET_LONGTABULAR;
|
||||
LyXTabular::ltType dummyltt;
|
||||
fl_set_button(longtable_options_->radio_lt_firsthead,
|
||||
tabular->GetRowOfLTFirstHead(row, dummyltt));
|
||||
fl_set_button(longtable_options_->radio_lt_head,
|
||||
tabular->GetRowOfLTHead(row, dummyltt));
|
||||
fl_set_button(longtable_options_->radio_lt_foot,
|
||||
tabular->GetRowOfLTFoot(row, dummyltt));
|
||||
fl_set_button(longtable_options_->radio_lt_lastfoot,
|
||||
tabular->GetRowOfLTLastFoot(row, dummyltt));
|
||||
fl_set_button(longtable_options_->radio_lt_firsthead,
|
||||
tabular->GetLTNewPage(cell));
|
||||
} else {
|
||||
num = LyXTabular::UNSET_LONGTABULAR;
|
||||
fl_set_button(longtable_options_->radio_lt_firsthead, 0);
|
||||
fl_set_button(longtable_options_->radio_lt_head, 0);
|
||||
fl_set_button(longtable_options_->radio_lt_foot, 0);
|
||||
fl_set_button(longtable_options_->radio_lt_lastfoot, 0);
|
||||
fl_set_button(longtable_options_->radio_lt_newpage, 0);
|
||||
}
|
||||
else
|
||||
num = LyXTabular::UNSET_LONGTABULAR;
|
||||
} else if (ob == tabular_options_->radio_rotate_tabular) {
|
||||
s = fl_get_button(tabular_options_->radio_rotate_tabular);
|
||||
if (s)
|
||||
num = LyXTabular::SET_ROTATE_TABULAR;
|
||||
else
|
||||
num = LyXTabular::UNSET_ROTATE_TABULAR;
|
||||
s = fl_get_button(tabular_options_->radio_rotate_tabular);
|
||||
if (s)
|
||||
num = LyXTabular::SET_ROTATE_TABULAR;
|
||||
else
|
||||
num = LyXTabular::UNSET_ROTATE_TABULAR;
|
||||
} else if (ob == cell_options_->radio_rotate_cell) {
|
||||
s = fl_get_button(cell_options_->radio_rotate_cell);
|
||||
if (s)
|
||||
num = LyXTabular::SET_ROTATE_CELL;
|
||||
else
|
||||
num = LyXTabular::UNSET_ROTATE_CELL;
|
||||
s = fl_get_button(cell_options_->radio_rotate_cell);
|
||||
if (s)
|
||||
num = LyXTabular::SET_ROTATE_CELL;
|
||||
else
|
||||
num = LyXTabular::UNSET_ROTATE_CELL;
|
||||
} else if (ob == cell_options_->radio_useminipage) {
|
||||
num = LyXTabular::SET_USEBOX;
|
||||
special = "2";
|
||||
} else if (ob == longtable_options_->radio_lt_firsthead) {
|
||||
if (fl_get_button(ob))
|
||||
num = LyXTabular::SET_LTFIRSTHEAD;
|
||||
else
|
||||
num = LyXTabular::UNSET_LTFIRSTHEAD;
|
||||
} else if (ob == longtable_options_->radio_lt_head) {
|
||||
if (fl_get_button(ob))
|
||||
num = LyXTabular::SET_LTHEAD;
|
||||
else
|
||||
num = LyXTabular::UNSET_LTHEAD;
|
||||
} else if (ob == longtable_options_->radio_lt_foot) {
|
||||
if (fl_get_button(ob))
|
||||
num = LyXTabular::SET_LTFOOT;
|
||||
else
|
||||
num = LyXTabular::UNSET_LTFOOT;
|
||||
} else if (ob == longtable_options_->radio_lt_lastfoot) {
|
||||
if (fl_get_button(ob))
|
||||
num = LyXTabular::SET_LTLASTFOOT;
|
||||
else
|
||||
num = LyXTabular::UNSET_LTLASTFOOT;
|
||||
num = LyXTabular::SET_USEBOX;
|
||||
special = "2";
|
||||
} else if ((ob == longtable_options_->radio_lt_firsthead) ||
|
||||
(ob == longtable_options_->check_1head_2border_above) ||
|
||||
(ob == longtable_options_->check_1head_2border_below) ||
|
||||
(ob == longtable_options_->check_1head_empty) ||
|
||||
(ob == longtable_options_->radio_lt_head) ||
|
||||
(ob == longtable_options_->check_head_2border_above) ||
|
||||
(ob == longtable_options_->check_head_2border_below) ||
|
||||
(ob == longtable_options_->radio_lt_foot) ||
|
||||
(ob == longtable_options_->check_foot_2border_above) ||
|
||||
(ob == longtable_options_->check_foot_2border_below) ||
|
||||
(ob == longtable_options_->radio_lt_lastfoot) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_above) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_below) ||
|
||||
(ob == longtable_options_->check_lastfoot_empty))
|
||||
{
|
||||
num = static_cast<LyXTabular::Feature>(checkLongtableOptions(ob, special));
|
||||
} else if (ob == longtable_options_->radio_lt_newpage) {
|
||||
num = LyXTabular::SET_LTNEWPAGE;
|
||||
} else if (ob == column_options_->input_special_alignment) {
|
||||
@ -560,3 +603,53 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int FormTabular::checkLongtableOptions(FL_OBJECT * ob, string & special)
|
||||
{
|
||||
bool flag = fl_get_button(ob);
|
||||
if ((ob == longtable_options_->check_1head_2border_above) ||
|
||||
(ob == longtable_options_->check_head_2border_above) ||
|
||||
(ob == longtable_options_->check_foot_2border_above) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_above))
|
||||
{
|
||||
special = "dl_above";
|
||||
} else if ((ob == longtable_options_->check_1head_2border_below) ||
|
||||
(ob == longtable_options_->check_head_2border_below) ||
|
||||
(ob == longtable_options_->check_foot_2border_below) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_below))
|
||||
{
|
||||
special = "dl_below";
|
||||
} else if ((ob == longtable_options_->check_1head_empty) ||
|
||||
(ob == longtable_options_->check_lastfoot_empty))
|
||||
{
|
||||
special = "empty";
|
||||
} else {
|
||||
special = "";
|
||||
}
|
||||
if ((ob == longtable_options_->radio_lt_firsthead) ||
|
||||
(ob == longtable_options_->check_1head_2border_above) ||
|
||||
(ob == longtable_options_->check_1head_2border_below) ||
|
||||
(ob == longtable_options_->check_1head_empty))
|
||||
{
|
||||
return (flag ? LyXTabular::SET_LTFIRSTHEAD :
|
||||
LyXTabular::UNSET_LTFIRSTHEAD);
|
||||
} else if ((ob == longtable_options_->radio_lt_head) ||
|
||||
(ob == longtable_options_->check_head_2border_above) ||
|
||||
(ob == longtable_options_->check_head_2border_below))
|
||||
{
|
||||
return (flag ? LyXTabular::SET_LTHEAD : LyXTabular::UNSET_LTHEAD);
|
||||
} else if ((ob == longtable_options_->radio_lt_foot) ||
|
||||
(ob == longtable_options_->check_foot_2border_above) ||
|
||||
(ob == longtable_options_->check_foot_2border_below))
|
||||
{
|
||||
return (flag ? LyXTabular::SET_LTFOOT : LyXTabular::UNSET_LTFOOT);
|
||||
} else if ((ob == longtable_options_->radio_lt_lastfoot) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_above) ||
|
||||
(ob == longtable_options_->check_lastfoot_2border_below) ||
|
||||
(ob == longtable_options_->check_lastfoot_empty))
|
||||
{
|
||||
return (flag ? LyXTabular::SET_LTLASTFOOT :
|
||||
LyXTabular::UNSET_LTLASTFOOT);
|
||||
}
|
||||
return LyXTabular::LAST_ACTION;
|
||||
}
|
||||
|
@ -59,6 +59,8 @@ private:
|
||||
virtual bool input(FL_OBJECT *, long);
|
||||
/// Pointer to the actual instantiation of the xforms form
|
||||
virtual FL_FORM * form() const;
|
||||
///
|
||||
virtual int checkLongtableOptions(FL_OBJECT *, string &);
|
||||
|
||||
/// Fdesign generated methods
|
||||
FD_form_tabular * build_tabular();
|
||||
|
@ -146,6 +146,27 @@ FD_form_column_options * FormTabular::build_column_options()
|
||||
fdui->form = fl_bgn_form(FL_NO_BOX, 505, 225);
|
||||
fdui->form->u_vdata = this;
|
||||
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 225, "");
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 325, 20, 170, 195, _("Fixed Width"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 20, 170, 105, _("Borders"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 200, 20, 115, 105, _("H. Alignment"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 140, 295, 75, _("Special column"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
{
|
||||
char const * const dummy = N_(" |#W");
|
||||
fdui->input_column_width = obj = fl_add_input(FL_NORMAL_INPUT, 335, 55, 75, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Top|#t");
|
||||
fdui->radio_border_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 45, 25, 25, idex(_(dummy)));
|
||||
@ -180,78 +201,66 @@ FD_form_column_options * FormTabular::build_column_options()
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Left|#e");
|
||||
fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 30, 110, 25, idex(_(dummy)));
|
||||
fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 35, 105, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Right|#i");
|
||||
fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 80, 115, 25, idex(_(dummy)));
|
||||
fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 85, 105, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Center|#c");
|
||||
fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 55, 115, 25, idex(_(dummy)));
|
||||
fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 60, 105, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Top|#p");
|
||||
fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 30, 125, 25, idex(_(dummy)));
|
||||
fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 330, 135, 155, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Center|#n");
|
||||
fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 55, 125, 25, idex(_(dummy)));
|
||||
fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 330, 160, 155, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Bottom|#o");
|
||||
fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 80, 120, 25, idex(_(dummy)));
|
||||
fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 330, 185, 155, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 20, 170, 105, _("Borders"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 200, 20, 130, 105, _("H. Alignment"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 340, 20, 130, 105, _("V. Alignment"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
{
|
||||
char const * const dummy = N_("Width|#W");
|
||||
fdui->input_column_width = obj = fl_add_input(FL_NORMAL_INPUT, 275, 170, 95, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Alignment|#A");
|
||||
fdui->input_special_alignment = obj = fl_add_input(FL_NORMAL_INPUT, 40, 170, 215, 30, idex(_(dummy)));
|
||||
char const * const dummy = N_("LaTeX Argument|#A");
|
||||
fdui->input_special_alignment = obj = fl_add_input(FL_NORMAL_INPUT, 30, 180, 275, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 135, 450, 80, _("Special column"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
fdui->choice_value_column_width = obj = fl_add_choice(FL_NORMAL_CHOICE, 375, 170, 75, 30, "");
|
||||
{
|
||||
char const * const dummy = N_(" |#L");
|
||||
fdui->choice_value_column_width = obj = fl_add_choice(FL_NORMAL_CHOICE, 415, 55, 75, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 335, 110, 155, 25, _("V. Alignment"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
@ -275,9 +284,24 @@ FD_form_cell_options * FormTabular::build_cell_options()
|
||||
fdui->form = fl_bgn_form(FL_NO_BOX, 505, 225);
|
||||
fdui->form->u_vdata = this;
|
||||
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 225, "");
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 135, 140, 80, _("Special Cell"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 160, 135, 175, 80, _("Special Multicolumn"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 345, 20, 150, 195, _("Fixed Width"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 190, 20, 145, 100, _("H. Alignment"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 20, 170, 100, _("Borders"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
{
|
||||
char const * const dummy = N_("Top|#t");
|
||||
fdui->radio_border_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 45, 25, 25, idex(_(dummy)));
|
||||
fdui->radio_border_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 75, 45, 25, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -285,7 +309,7 @@ FD_form_cell_options * FormTabular::build_cell_options()
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Bottom|#b");
|
||||
fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 75, 25, 25, idex(_(dummy)));
|
||||
fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 75, 75, 25, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -293,7 +317,7 @@ FD_form_cell_options * FormTabular::build_cell_options()
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Left|#l");
|
||||
fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 65, 60, 25, 25, idex(_(dummy)));
|
||||
fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 55, 60, 25, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -301,7 +325,7 @@ FD_form_cell_options * FormTabular::build_cell_options()
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Right|#r");
|
||||
fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 105, 60, 25, 25, idex(_(dummy)));
|
||||
fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 95, 60, 25, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
@ -309,94 +333,92 @@ FD_form_cell_options * FormTabular::build_cell_options()
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Left|#e");
|
||||
fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 30, 110, 25, idex(_(dummy)));
|
||||
fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 35, 110, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Right|#i");
|
||||
fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 80, 115, 25, idex(_(dummy)));
|
||||
fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 85, 115, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Center|#c");
|
||||
fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 55, 115, 25, idex(_(dummy)));
|
||||
fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 205, 60, 115, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Top|#p");
|
||||
fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 30, 125, 25, idex(_(dummy)));
|
||||
fdui->radio_valign_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 350, 135, 125, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Center|#n");
|
||||
fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 55, 125, 25, idex(_(dummy)));
|
||||
fdui->radio_valign_center = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 350, 160, 125, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Bottom|#o");
|
||||
fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 345, 80, 120, 25, idex(_(dummy)));
|
||||
fdui->radio_valign_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 350, 185, 125, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 20, 170, 105, _("Borders"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 200, 20, 130, 105, _("H. Alignment"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 340, 20, 130, 105, _("V. Alignment"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
{
|
||||
char const * const dummy = N_("Width|#W");
|
||||
fdui->input_mcolumn_width = obj = fl_add_input(FL_NORMAL_INPUT, 280, 180, 95, 30, idex(_(dummy)));
|
||||
char const * const dummy = N_(" |#W");
|
||||
fdui->input_mcolumn_width = obj = fl_add_input(FL_NORMAL_INPUT, 350, 50, 75, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Alignment|#A");
|
||||
fdui->input_special_multialign = obj = fl_add_input(FL_NORMAL_INPUT, 280, 145, 175, 30, idex(_(dummy)));
|
||||
char const * const dummy = N_("LaTeX Argument|#A");
|
||||
fdui->input_special_multialign = obj = fl_add_input(FL_NORMAL_INPUT, 165, 180, 165, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Multicolumn|#M");
|
||||
fdui->radio_multicolumn = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 140, 130, 25, idex(_(dummy)));
|
||||
fdui->radio_multicolumn = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 140, 130, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Use Minipage|#s");
|
||||
fdui->radio_useminipage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 165, 130, 25, idex(_(dummy)));
|
||||
fdui->radio_useminipage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 165, 130, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Rotate 90°|#9");
|
||||
fdui->radio_rotate_cell = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 190, 130, 25, idex(_(dummy)));
|
||||
fdui->radio_rotate_cell = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 190, 130, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 135, 150, 80, _("Special Cell"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 180, 135, 290, 80, _("Special Multicolumn"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
fdui->choice_value_mcolumn_width = obj = fl_add_choice(FL_NORMAL_CHOICE, 380, 180, 75, 30, "");
|
||||
{
|
||||
char const * const dummy = N_(" |#L");
|
||||
fdui->choice_value_mcolumn_width = obj = fl_add_choice(FL_NORMAL_CHOICE, 430, 50, 60, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 350, 110, 135, 25, _("V. Alignment"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
@ -417,47 +439,71 @@ FD_form_longtable_options * FormTabular::build_longtable_options()
|
||||
FL_OBJECT *obj;
|
||||
FD_form_longtable_options *fdui = new FD_form_longtable_options;
|
||||
|
||||
fdui->form = fl_bgn_form(FL_NO_BOX, 505, 227);
|
||||
fdui->form = fl_bgn_form(FL_NO_BOX, 505, 225);
|
||||
fdui->form->u_vdata = this;
|
||||
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 227, "");
|
||||
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 225, "");
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 15, 485, 30, "");
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 150, 485, 35, "");
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 115, 485, 35, "");
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 80, 485, 35, "");
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 45, 485, 35, "");
|
||||
fdui->radio_lt_firsthead = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 135, 85, 60, 25, _("On"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->radio_lt_head = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 135, 50, 60, 25, _("On"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->radio_lt_foot = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 135, 120, 60, 25, _("On"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->radio_lt_lastfoot = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 135, 155, 60, 25, _("On"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("1st Head|#1");
|
||||
fdui->radio_lt_firsthead = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 55, 90, 25, idex(_(dummy)));
|
||||
char const * const dummy = N_("Page break on the current row|#B");
|
||||
fdui->radio_lt_newpage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 190, 245, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Head|#H");
|
||||
fdui->radio_lt_head = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 30, 90, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fdui->check_head_2border_above = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 205, 50, 85, 25, _("Double"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Foot|#F");
|
||||
fdui->radio_lt_foot = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 195, 30, 90, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fdui->check_head_2border_below = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 50, 75, 25, _("Double"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Last Foot|#L");
|
||||
fdui->radio_lt_lastfoot = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 195, 55, 90, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("New Page|#N");
|
||||
fdui->radio_lt_newpage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 355, 25, 90, 25, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 20, 150, 75, _("Header"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 15, 50, 120, 25, _("Header"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 185, 20, 150, 75, _("Footer"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 15, 85, 120, 25, _("First Header"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 345, 20, 150, 75, _("Special"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 15, 120, 120, 25, _("Footer"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 15, 155, 120, 25, _("Last Footer"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
fdui->check_1head_2border_above = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 205, 85, 85, 25, _("Double"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->check_foot_2border_above = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 205, 120, 85, 25, _("Double"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->check_lastfoot_2border_above = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 205, 155, 85, 25, _("Double"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->check_1head_2border_below = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 85, 75, 25, _("Double"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->check_foot_2border_below = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 120, 75, 25, _("Double"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->check_lastfoot_2border_below = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 155, 75, 25, _("Double"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->check_1head_empty = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 390, 85, 75, 25, _("Is Empty"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fdui->check_lastfoot_empty = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 390, 155, 75, 25, _("Is Empty"));
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 205, 20, 85, 20, _("Border Above"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 300, 20, 85, 20, _("Border Below"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 390, 20, 85, 20, _("Contents"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 135, 20, 60, 20, _("Status"));
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
fl_end_form();
|
||||
|
||||
|
@ -44,6 +44,7 @@ struct FD_form_column_options {
|
||||
~FD_form_column_options();
|
||||
|
||||
FL_FORM *form;
|
||||
FL_OBJECT *input_column_width;
|
||||
FL_OBJECT *radio_border_top;
|
||||
FL_OBJECT *radio_border_bottom;
|
||||
FL_OBJECT *radio_border_left;
|
||||
@ -54,7 +55,6 @@ struct FD_form_column_options {
|
||||
FL_OBJECT *radio_valign_top;
|
||||
FL_OBJECT *radio_valign_center;
|
||||
FL_OBJECT *radio_valign_bottom;
|
||||
FL_OBJECT *input_column_width;
|
||||
FL_OBJECT *input_special_alignment;
|
||||
FL_OBJECT *choice_value_column_width;
|
||||
};
|
||||
@ -88,6 +88,16 @@ struct FD_form_longtable_options {
|
||||
FL_OBJECT *radio_lt_foot;
|
||||
FL_OBJECT *radio_lt_lastfoot;
|
||||
FL_OBJECT *radio_lt_newpage;
|
||||
FL_OBJECT *check_head_2border_above;
|
||||
FL_OBJECT *check_head_2border_below;
|
||||
FL_OBJECT *check_1head_2border_above;
|
||||
FL_OBJECT *check_foot_2border_above;
|
||||
FL_OBJECT *check_lastfoot_2border_above;
|
||||
FL_OBJECT *check_1head_2border_below;
|
||||
FL_OBJECT *check_foot_2border_below;
|
||||
FL_OBJECT *check_lastfoot_2border_below;
|
||||
FL_OBJECT *check_1head_empty;
|
||||
FL_OBJECT *check_lastfoot_empty;
|
||||
};
|
||||
|
||||
#endif /* FD_form_tabular_h_ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,13 @@
|
||||
2001-12-19 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* insettabular.C (tabularFeatures): fix the row setting of ltt as
|
||||
this has to be always row + 1 as 0 means not selected!
|
||||
(checkLongtableSpecial): added
|
||||
(tabularFeatures): better longtable options support
|
||||
|
||||
* insettext.C (resizeLyXText): reinit the text always also on a
|
||||
empty insettext!
|
||||
|
||||
2001-12-18 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* insettext.C (updateInsetInInset): look if we have to autocollapse
|
||||
|
@ -411,7 +411,7 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
|
||||
|
||||
|
||||
void InsetTabular::drawCellLines(Painter & pain, int x, int baseline,
|
||||
int row, int cell) const
|
||||
int row, int cell) const
|
||||
{
|
||||
int x2 = x + tabular->GetWidthOfColumn(cell);
|
||||
bool on_off;
|
||||
@ -1669,6 +1669,24 @@ bool InsetTabular::tabularFeatures(BufferView * bv, string const & what)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void checkLongtableSpecial(LyXTabular::ltType & ltt,
|
||||
string const & special,
|
||||
int const row, bool const flag)
|
||||
{
|
||||
if (special == "dl_above") {
|
||||
ltt.topDL = flag;
|
||||
} else if (special == "dl_below") {
|
||||
ltt.bottomDL = flag;
|
||||
} else if (special == "empty") {
|
||||
ltt.empty = flag;
|
||||
} else {
|
||||
if (flag)
|
||||
ltt.row = row;
|
||||
else
|
||||
ltt.row = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void InsetTabular::tabularFeatures(BufferView * bv,
|
||||
LyXTabular::Feature feature,
|
||||
@ -1720,10 +1738,10 @@ void InsetTabular::tabularFeatures(BufferView * bv,
|
||||
bv->text->cursor.par(),
|
||||
bv->text->cursor.par()->next());
|
||||
|
||||
LyXTabular::ltType ltt;
|
||||
int row = ltt.row = tabular->row_of_cell(actcell);
|
||||
int row = tabular->row_of_cell(actcell);
|
||||
int column = tabular->column_of_cell(actcell);
|
||||
bool flag = true;
|
||||
LyXTabular::ltType ltt;
|
||||
|
||||
switch (feature) {
|
||||
case LyXTabular::SET_PWIDTH:
|
||||
@ -1734,9 +1752,10 @@ void InsetTabular::tabularFeatures(BufferView * bv,
|
||||
bool const update = (tmplen != vallen);
|
||||
tabular->SetColumnPWidth(actcell, vallen);
|
||||
if (update) {
|
||||
int cell;
|
||||
for (int i = 0; i < tabular->rows(); ++i) {
|
||||
tabular->GetCellInset(tabular->GetCellNumber(i, column))->
|
||||
resizeLyXText(bv);
|
||||
cell = tabular->GetCellNumber(i,column);
|
||||
tabular->GetCellInset(cell)->resizeLyXText(bv);
|
||||
}
|
||||
updateLocal(bv, INIT, true);
|
||||
}
|
||||
@ -1972,29 +1991,37 @@ void InsetTabular::tabularFeatures(BufferView * bv,
|
||||
break;
|
||||
}
|
||||
case LyXTabular::UNSET_LTFIRSTHEAD:
|
||||
ltt.row = 0;
|
||||
flag = false;
|
||||
case LyXTabular::SET_LTFIRSTHEAD:
|
||||
(void)tabular->GetRowOfLTFirstHead(row, ltt);
|
||||
checkLongtableSpecial(ltt, value, row + 1, flag);
|
||||
tabular->SetLTHead(ltt, true);
|
||||
break;
|
||||
case LyXTabular::UNSET_LTHEAD:
|
||||
ltt.row = 0;
|
||||
flag = false;
|
||||
case LyXTabular::SET_LTHEAD:
|
||||
(void)tabular->GetRowOfLTHead(row, ltt);
|
||||
checkLongtableSpecial(ltt, value, row + 1, flag);
|
||||
tabular->SetLTHead(ltt, false);
|
||||
break;
|
||||
case LyXTabular::UNSET_LTFOOT:
|
||||
ltt.row = 0;
|
||||
flag = false;
|
||||
case LyXTabular::SET_LTFOOT:
|
||||
(void)tabular->GetRowOfLTFoot(row, ltt);
|
||||
checkLongtableSpecial(ltt, value, row + 1, flag);
|
||||
tabular->SetLTFoot(ltt, false);
|
||||
break;
|
||||
case LyXTabular::UNSET_LTLASTFOOT:
|
||||
ltt.row = 0;
|
||||
flag = false;
|
||||
case LyXTabular::SET_LTLASTFOOT:
|
||||
(void)tabular->GetRowOfLTLastFoot(row, ltt);
|
||||
checkLongtableSpecial(ltt, value, row + 1, flag);
|
||||
tabular->SetLTFoot(ltt, true);
|
||||
break;
|
||||
case LyXTabular::SET_LTNEWPAGE:
|
||||
{
|
||||
bool what = !tabular->GetLTNewPage(actcell);
|
||||
tabular->SetLTNewPage(actcell, what);
|
||||
bool what = !tabular->GetLTNewPage(row);
|
||||
tabular->SetLTNewPage(row, what);
|
||||
break;
|
||||
}
|
||||
// dummy stuff just to avoid warnings
|
||||
@ -2339,31 +2366,31 @@ func_status::value_type InsetTabular::getStatus(string const & what) const
|
||||
status |= func_status::ToggleOff;
|
||||
break;
|
||||
case LyXTabular::SET_LTFIRSTHEAD:
|
||||
if (tabular->GetRowOfLTHead(actcell, dummyltt))
|
||||
if (tabular->GetRowOfLTHead(sel_row_start, dummyltt))
|
||||
status |= func_status::ToggleOn;
|
||||
else
|
||||
status |= func_status::ToggleOff;
|
||||
break;
|
||||
case LyXTabular::SET_LTHEAD:
|
||||
if (tabular->GetRowOfLTHead(actcell, dummyltt))
|
||||
if (tabular->GetRowOfLTHead(sel_row_start, dummyltt))
|
||||
status |= func_status::ToggleOn;
|
||||
else
|
||||
status |= func_status::ToggleOff;
|
||||
break;
|
||||
case LyXTabular::SET_LTFOOT:
|
||||
if (tabular->GetRowOfLTFoot(actcell, dummyltt))
|
||||
if (tabular->GetRowOfLTFoot(sel_row_start, dummyltt))
|
||||
status |= func_status::ToggleOn;
|
||||
else
|
||||
status |= func_status::ToggleOff;
|
||||
break;
|
||||
case LyXTabular::SET_LTLASTFOOT:
|
||||
if (tabular->GetRowOfLTFoot(actcell, dummyltt))
|
||||
if (tabular->GetRowOfLTFoot(sel_row_start, dummyltt))
|
||||
status |= func_status::ToggleOn;
|
||||
else
|
||||
status |= func_status::ToggleOff;
|
||||
break;
|
||||
case LyXTabular::SET_LTNEWPAGE:
|
||||
if (tabular->GetLTNewPage(actcell))
|
||||
if (tabular->GetLTNewPage(sel_row_start))
|
||||
status |= func_status::ToggleOn;
|
||||
else
|
||||
status |= func_status::ToggleOff;
|
||||
|
@ -2187,8 +2187,14 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
|
||||
}
|
||||
do_resize = 0;
|
||||
// lyxerr << "InsetText::resizeLyXText\n";
|
||||
if (!par->next() && !par->size()) // no data, resize not neccessary!
|
||||
if (!par->next() && !par->size()) { // no data, resize not neccessary!
|
||||
// we have to do this as a fixed width may have changed!
|
||||
LyXText * t = getLyXText(bv);
|
||||
saveLyXTextState(t);
|
||||
t->init(bv, true);
|
||||
restoreLyXTextState(bv, t);
|
||||
return;
|
||||
}
|
||||
// one endless line, resize normally not necessary
|
||||
if (!force && getMaxWidth(bv, this) < 0)
|
||||
return;
|
||||
|
@ -98,6 +98,7 @@ LyXTabular::lttype::lttype()
|
||||
row = 0;
|
||||
topDL = false;
|
||||
bottomDL = false;
|
||||
empty = false;
|
||||
}
|
||||
|
||||
|
||||
@ -1915,15 +1916,15 @@ bool LyXTabular::GetRowOfLTLastFoot(int row, ltType & fd) const
|
||||
}
|
||||
|
||||
|
||||
void LyXTabular::SetLTNewPage(int cell, bool what)
|
||||
void LyXTabular::SetLTNewPage(int row, bool what)
|
||||
{
|
||||
row_info[row_of_cell(cell)].newpage = what;
|
||||
row_info[row].newpage = what;
|
||||
}
|
||||
|
||||
|
||||
bool LyXTabular::GetLTNewPage(int cell) const
|
||||
bool LyXTabular::GetLTNewPage(int row) const
|
||||
{
|
||||
return row_info[row_of_cell(cell)].newpage;
|
||||
return row_info[row].newpage;
|
||||
}
|
||||
|
||||
|
||||
|
@ -167,6 +167,9 @@ public:
|
||||
bool topDL;
|
||||
// double borders on bottom
|
||||
bool bottomDL;
|
||||
// used for FirstHeader & LastFooter and if this is true
|
||||
// row HAS to be 0!
|
||||
bool empty;
|
||||
};
|
||||
///
|
||||
typedef struct lttype ltType;
|
||||
@ -377,9 +380,9 @@ public:
|
||||
///
|
||||
bool GetRowOfLTLastFoot(int row, ltType &) const;
|
||||
///
|
||||
void SetLTNewPage(int cell, bool what);
|
||||
void SetLTNewPage(int row, bool what);
|
||||
///
|
||||
bool GetLTNewPage(int cell) const;
|
||||
bool GetLTNewPage(int row) const;
|
||||
///
|
||||
InsetText * GetCellInset(int cell) const;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user