void TableOptionsCB(FL_OBJECT *ob, long)
{
LyXTable
*table = 0; int
cell,
s,
num = 0;
LString
special,
str;
if (!current_view->available()
||
!(table = current_view->currentBuffer()->text->cursor.par->table))
{
MenuLayoutTable(0); return;
}
cell = current_view->currentBuffer()->text->
NumberOfCell(current_view->currentBuffer()->text->cursor.par,
current_view->currentBuffer()->text->cursor.pos); if (ActCell != cell) {
MenuLayoutTable(0);
fl_set_object_label(fd_form_table_options->text_warning,
_("Warning: Wrong Cursor position, updated window"));
fl_show_object(fd_form_table_options->text_warning); return;
} // No point in processing directives that you can't do anything with // anyhow, so exit now if the buffer is read-only. if (current_view->currentBuffer()->isReadonly()) {
MenuLayoutTable(0); return;
}
if (ob != fd_form_table_options->button_table_delete) {
fl_set_object_label(fd_form_table_options->text_warning,"");
Confirmed = false;
}
str = fl_get_input(fd_form_table_options->input_column_width); if (!str.empty() && !isValidLength(str)) {
fl_set_object_label(fd_form_table_options->text_warning,
_("Warning: Invalid Length (valid example: 10mm)"));
fl_show_object(fd_form_table_options->text_warning); return;
} if (((ob==fd_form_table_options->button_delete_row) && (table->rows<=1)) ||
((ob==fd_form_table_options->button_delete_column) && (table->columns<=1)))
ob = fd_form_table_options->button_table_delete; if (ob == fd_form_table_options->button_append_row)
num = LyXTable::APPEND_ROW; elseif (ob == fd_form_table_options->button_append_column)
num = LyXTable::APPEND_COLUMN; elseif (ob == fd_form_table_options->button_delete_row)
num = LyXTable::DELETE_ROW; elseif (ob == fd_form_table_options->button_delete_column)
num = LyXTable::DELETE_COLUMN; elseif (ob == fd_form_table_options->button_set_borders)
num = LyXTable::SET_ALL_LINES; elseif (ob == fd_form_table_options->button_unset_borders)
num = LyXTable::UNSET_ALL_LINES; elseif (ob == fd_form_table_options->radio_border_top)
num = LyXTable::TOGGLE_LINE_TOP; elseif (ob == fd_form_table_options->radio_border_bottom)
num = LyXTable::TOGGLE_LINE_BOTTOM; elseif (ob == fd_form_table_options->radio_border_left)
num = LyXTable::TOGGLE_LINE_LEFT; elseif (ob == fd_form_table_options->radio_border_right)
num = LyXTable::TOGGLE_LINE_RIGHT; elseif (ob == fd_form_table_options->radio_align_left)
num = LyXTable::ALIGN_LEFT; elseif (ob == fd_form_table_options->radio_align_right)
num = LyXTable::ALIGN_RIGHT; elseif (ob == fd_form_table_options->radio_align_center)
num = LyXTable::ALIGN_CENTER; elseif ((ob==fd_form_table_options->button_table_delete) && !Confirmed) {
fl_set_object_label(fd_form_table_options->text_warning,
_("Confirm: press Delete-Button again"));
Confirmed = true; return;
} elseif ((ob == fd_form_table_options->button_table_delete)
&& Confirmed) {
num = LyXTable::DELETE_TABLE;
Confirmed = false;
} elseif (ob == fd_form_table_options->radio_multicolumn)
num = LyXTable::MULTICOLUMN; elseif (ob == fd_form_table_options->radio_longtable) {
s=fl_get_button(fd_form_table_options->radio_longtable); if (s) {
num = LyXTable::SET_LONGTABLE;
fl_activate_object(fd_form_table_options->radio_lt_firsthead);
fl_activate_object(fd_form_table_options->radio_lt_head);
fl_activate_object(fd_form_table_options->radio_lt_foot);
fl_activate_object(fd_form_table_options->radio_lt_lastfoot);
fl_activate_object(fd_form_table_options->radio_lt_newpage);
fl_set_button(fd_form_table_options->radio_lt_firsthead,
table->RowOfLTFirstHead(cell));
fl_set_button(fd_form_table_options->radio_lt_head,
table->RowOfLTHead(cell));
fl_set_button(fd_form_table_options->radio_lt_foot,
table->RowOfLTFoot(cell));
fl_set_button(fd_form_table_options->radio_lt_lastfoot,
table->RowOfLTLastFoot(cell));
fl_set_button(fd_form_table_options->radio_lt_firsthead,
table->LTNewPage(cell));
} else {
num = LyXTable::UNSET_LONGTABLE;
fl_deactivate_object(fd_form_table_options->radio_lt_firsthead);
fl_deactivate_object(fd_form_table_options->radio_lt_head);
fl_deactivate_object(fd_form_table_options->radio_lt_foot);
fl_deactivate_object(fd_form_table_options->radio_lt_lastfoot);
fl_deactivate_object(fd_form_table_options->radio_lt_newpage);
fl_set_button(fd_form_table_options->radio_lt_firsthead,0);
fl_set_button(fd_form_table_options->radio_lt_firsthead,0);
fl_set_button(fd_form_table_options->radio_lt_firsthead,0);
fl_set_button(fd_form_table_options->radio_lt_firsthead,0);
fl_set_button(fd_form_table_options->radio_lt_firsthead,0);
fl_set_object_lcol(fd_form_table_options->radio_lt_firsthead,
FL_INACTIVE);
fl_set_object_lcol(fd_form_table_options->radio_lt_head,
FL_INACTIVE);
fl_set_object_lcol(fd_form_table_options->radio_lt_foot,
FL_INACTIVE);
fl_set_object_lcol(fd_form_table_options->radio_lt_lastfoot,
FL_INACTIVE);
fl_set_object_lcol(fd_form_table_options->radio_lt_newpage,
FL_INACTIVE);
}
} elseif (ob == fd_form_table_options->radio_rotate_table) {
s=fl_get_button(fd_form_table_options->radio_rotate_table); if (s)
num = LyXTable::SET_ROTATE_TABLE; else
num = LyXTable::UNSET_ROTATE_TABLE;
} elseif (ob == fd_form_table_options->radio_rotate_cell) {
s=fl_get_button(fd_form_table_options->radio_rotate_cell); if (s)
num = LyXTable::SET_ROTATE_CELL; else
num = LyXTable::UNSET_ROTATE_CELL;
} elseif (ob == fd_form_table_options->radio_linebreak_cell) {
num = LyXTable::SET_LINEBREAKS;
} elseif (ob == fd_form_table_options->radio_lt_firsthead) {
num = LyXTable::SET_LTFIRSTHEAD;
} elseif (ob == fd_form_table_options->radio_lt_head) {
num = LyXTable::SET_LTHEAD;
} elseif (ob == fd_form_table_options->radio_lt_foot) {
num = LyXTable::SET_LTFOOT;
} elseif (ob == fd_form_table_options->radio_lt_lastfoot) {
num = LyXTable::SET_LTLASTFOOT;
} elseif (ob == fd_form_table_options->radio_lt_newpage) {
num = LyXTable::SET_LTNEWPAGE;
} elseif (ob == fd_form_table_options->button_table_extra) {
OpenLayoutTableExtra(); return;
} elseif (ob == fd_form_table_extra->input_special_alignment) {
special=fl_get_input(fd_form_table_extra->input_special_alignment);
num = LyXTable::SET_SPECIAL_COLUMN;
} elseif (ob == fd_form_table_extra->input_special_multialign) {
special=fl_get_input(fd_form_table_extra->input_special_multialign);
num = LyXTable::SET_SPECIAL_MULTI;
} else return; if (current_view->available()){
current_view->getScreen()->HideCursor(); if (!current_view->currentBuffer()->text->selection){
BeforeChange();
current_view->currentBuffer()->update(-2);
} if ((num == LyXTable::SET_SPECIAL_COLUMN) ||
(num == LyXTable::SET_SPECIAL_MULTI))
current_view->currentBuffer()->text->TableFeatures(num,special); else
current_view->currentBuffer()->text->TableFeatures(num);
current_view->currentBuffer()->update(1);
} if (num == LyXTable::DELETE_TABLE)
fl_hide_form(fd_form_table_options->form_table_options); else
UpdateLayoutTable(true); return;
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.1Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.