+2000-09-26 Lars Gullik Bjønnes <larsbj@lyx.org>
+
+ * src/support/unlink.C src/support/remove.C src/support/mkdir.C:
+ new files use the everwhere possible.
+
+ * several files:
+ * src/form1.C src/form1.h src/layout_forms.C src/layout_forms.h
+ src/log_form.C src/lyx.C:
+ regenerated
+
+ * src/buffer.C (runLaTeX): remove func
+
+ * src/PaperLayout.C: removed file
+ * src/ParagraphExtra.C: likewise
+ * src/bullet_forms.C: likewise
+ * src/bullet_forms.h: likewise
+ * src/bullet_forms_cb.C: likewise
+
+ * src/Makefile.am (lyx_SOURCES): remove PaperLayout.C,
+ ParagraphExtra.C, bullet_forms.C, bullet_forms.h and
+ bullet_forms_cb.C
+
+ * several files: remove all traces of the old fd_form_paragraph,
+ and functions belonging to that.
+
+ * several files: remove all traces of the old fd_form_document,
+ and functions belonging to that.
+
+ * several files: constify local variables were possible.
+
+ * several files: remove all code that was dead when NEW_EXPORT was
+ defined
+
+ * several files: removed string::c_str in as many places as
+ possible.
+
+ * forms/makefile (SRCS,OBJS,COBJS): removed bullet_forms.[fd,c,C]
+ (e): be a bit more outspoken when patching
+ (updatesrc): only move files if changed.
+
+ * forms/layout_forms.h.patch: regenerated
+
+ * forms/layout_forms.fd: remove form_document and form_paragraph
+ and form_quotes and form_paper and form_table_options and
+ form_paragraph_extra
+
+ * forms/form1.fd: remove form_table
+
+ * forms/fdfix.sh: remove sed rules for fl_set_object_lcolor and
+ the fdui->... rewrite. Update some comments to xforms 0.88
+
+ * forms/bullet_forms.C.patch: removed file
+ * forms/bullet_forms.fd: likewise
+ * forms/bullet_forms.h.patch: likewise
+
+ * development/Code_rules/Rules: added a section on switch
+ statements. Updated some comment to xforms 0.88.
+
2000-09-26 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/buffer.C (readFile): make sure that the whole version number
-NOT-
T add(...);
+- Avoid using the default cases in switch statements unless you have
+ too. Use the correct type for the switch expression and let the
+ compiler ensure that all cases are exhausted.
+
+ enum Foo {
+ foo,
+ bar
+ };
+ Foo f = ...;
+ switch (f) {
+ case foo: ...; break;
+ case bar: ...; break;
+ default: ...; break; // not needed and would shadow a wrong use of Foo
+ }
Exceptions
----------
* Using external GUI constructors (XForms fdesign)
- Fdesign generated files should not be changed at all. The only changes
- needed are gettext, compability with 0.81 or when you have made your own
+ needed are gettext, compability with 0.88 or when you have made your own
xforms objects and have just a dummy in the .fd file in place of your
own. In case you have to change the generated files for any of the
reasons above, you should provide a patch against the clean generated
+++ /dev/null
---- bullet_forms.c.orig Thu Aug 10 00:38:18 2000
-+++ bullet_forms.c Thu Aug 10 00:38:18 2000
-@@ -3,6 +3,8 @@
- #include "forms.h"
- #include <stdlib.h>
- #include "bullet_forms.h"
-+#include "bmtable.h"
-+#include "support/filetools.h"
-
- FD_form_bullet *create_form_form_bullet(void)
- {
-@@ -10,10 +12,21 @@
- FD_form_bullet *fdui = (FD_form_bullet *) fl_calloc(1, sizeof(*fdui));
-
- fdui->form_bullet = fl_bgn_form(FL_NO_BOX, 370, 390);
-+ fl_set_border_width(-1);
- obj = fl_add_box(FL_UP_BOX,0,0,370,390,"");
-- fdui->replace_this_with_a_BMTable = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON,90,105,260,180,"");
-- fl_set_object_boxtype(obj,FL_NO_BOX);
-- fl_set_pixmapbutton_file(obj, "psnfss2.xpm");
-+
-+ // make the border thick again to improve the bmtable looks
-+ fl_set_border_width(-3);
-+
-+ fdui->bmtable_bullet_panel = obj = fl_add_bmtable(1, 90, 105, 265, 180, "");
-+ fl_set_object_callback(obj, BulletBMTableCB, 0);
-+ fl_set_object_lcol(obj, FL_BLUE);
-+ fl_set_object_boxtype(obj, FL_UP_BOX);
-+ fl_set_bmtable_pixmap_file(obj, 6, 6,
-+ LibFileSearch("images",
-+ "standard", "xpm").c_str());
-+
-+ fl_set_border_width(-1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME,95,20,255,70,"");
- obj = fl_add_frame(FL_ENGRAVED_FRAME,0,340,370,50,"");
- fdui->choice_bullet_size = obj = fl_add_choice(FL_NORMAL_CHOICE,15,45,65,30,"Size|#z");
-@@ -33,6 +46,8 @@
- fdui->input_bullet_latex = obj = fl_add_input(FL_NORMAL_INPUT,80,300,275,30,"LaTeX|#L");
- fl_set_object_lsize(obj,FL_NORMAL_SIZE);
- fl_set_object_lstyle(obj,FL_FIXED_STYLE);
-+ fl_set_input_return(obj, FL_RETURN_CHANGED);
-+ fl_set_input_maxchars(obj, 80);
- fl_set_object_callback(obj,InputBulletLaTeXCB,0);
-
- fdui->radio_bullet_depth = fl_bgn_group();
+++ /dev/null
-Magic: 13000
-
-Internal Form Definition File
- (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-
-=============== FORM ===============
-Name: form_bullet
-Width: 370
-Height: 390
-Number of Objects: 24
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 370 390
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 90 105 260 180
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: replace_this_with_a_BMTable
-callback:
-argument:
- file: psnfss2.xpm
- fullpath: 1
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 95 20 255 70
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 0 340 370 50
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 15 45 65 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Size|#z
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: choice_bullet_size
-callback: ChoiceBulletSizeCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 25 350 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_ok
-callback: BulletOKCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 135 350 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_apply
-callback: BulletApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 245 350 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_cancel
-callback: BulletCancelCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 80 300 275 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_FIXED_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: LaTeX|#L
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_bullet_latex
-callback: InputBulletLaTeXCB
-argument: 0
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_depth
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 105 35 55 40
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_LARGE_SIZE
-lcol: FL_BLACK
-label: 1|#1
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_depth_1
-callback: BulletDepthCB
-argument: 0
- value: 1
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 165 35 55 40
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_LARGE_SIZE
-lcol: FL_BLACK
-label: 2|#2
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_depth_2
-callback: BulletDepthCB
-argument: 1
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 225 35 55 40
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_LARGE_SIZE
-lcol: FL_BLACK
-label: 3|#3
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_depth_3
-callback: BulletDepthCB
-argument: 2
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 285 35 55 40
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_LARGE_SIZE
-lcol: FL_BLACK
-label: 4|#4
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_depth_4
-callback: BulletDepthCB
-argument: 3
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 105 10 85 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Bullet Depth
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_panel
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 15 105 65 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Standard|#S
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_panel_standard
-callback: BulletPanelCB
-argument: 0
- value: 1
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 15 135 65 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Maths|#M
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_panel_maths
-callback: BulletPanelCB
-argument: 1
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 15 195 65 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Ding 2|#i
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_panel_ding2
-callback: BulletPanelCB
-argument: 3
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 15 225 65 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Ding 3|#n
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_panel_ding3
-callback: BulletPanelCB
-argument: 4
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 15 255 65 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Ding 4|#g
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_panel_ding4
-callback: BulletPanelCB
-argument: 5
-
---------------------
-class: FL_BUTTON
-type: RADIO_BUTTON
-box: 15 165 65 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Ding 1|#D
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NoGravity FL_NoGravity
-name: radio_bullet_panel_ding1
-callback: BulletPanelCB
-argument: 2
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
-==============================
-create_the_forms
+++ /dev/null
---- bullet_forms.h Thu Dec 4 12:33:14 1997
-+++ ../src/bullet_forms.h Thu Dec 4 12:34:48 1997
-@@ -11,5 +11,11 @@
- extern void InputBulletLaTeXCB(FL_OBJECT *, long);
- extern void BulletDepthCB(FL_OBJECT *, long);
- extern void BulletPanelCB(FL_OBJECT *, long);
-+extern void BulletBMTableCB(FL_OBJECT *, long);
-+
-+
-+/**** Additional routines ****/
-
-+extern void bulletForm();
-+extern bool updateBulletForm();
-
-@@ -20,7 +39,7 @@
- void *vdata;
- char *cdata;
- long ldata;
-- FL_OBJECT *replace_this_with_a_BMTable;
-+ FL_OBJECT *bmtable_bullet_panel;
- FL_OBJECT *choice_bullet_size;
- FL_OBJECT *button_ok;
- FL_OBJECT *button_apply;
patch -s $1 < "$2.patch"
fi
-echo "// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext" > $2
+echo "// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext" > $2
echo "#include <config.h>" >> $2
echo "#include \"lyx_gui_misc.h\"" >> $2
echo "#include \"gettext.h\"" >> $2
# For all lines containing "fl_add" and a string containing |, add the
# shortcut command after the end of this line
#
-# -e 's/fl_set_object_lcolor/fl_set_object_lcol/'
-#
-# For all lines replace "fl_set_object_lcolor" with "fl_set_object_lcol"
-# This will be removed when we don't support 0.81
-#
-# -e 's/fdui->.*->fdui = fdui/\/\/&/'
-#
-# For all lines replace "fdui->...->fdui" with "//fdui->...->fdui"
-# This will be removed when we don't support 0.81
-#
# -e 's/\(\(FD_[^ ]*\) \*fdui.*\)sizeof(\*fdui)/\1sizeof(\2)/'
#
# Some picky/broken compilers (eg AIX's xlC) don't like evaluating
# Someone got busy and put spaces in after commas but didn't allow for the
# autogeneration of the files so their pretty formatting got lost. Not anymore.
# The second rule cleans up one special case where a comma appears at the end
-# of a string while ensuring "...", "..." isn't affected.
+# of a string while ensuring "...", "..." isn't affected. Update: this seems
+# to have not been fixed in fdesign 0.56 (xforms 0.89), we should probably
+# report it once more. (Lgb)
#
# -e 's/stdlib.h/cstdlib/'
#
-e '/shortcut/ s/".*[|].*"/scex(_(&))/' \
-e '/fl_add/ s/".*[|].*"/idex(_(&))/' \
-e '/fl_add/ s/idex(\(.*\)").*$/&fl_set_button_shortcut(obj,scex(\1")),1);/' \
--e 's/fl_set_object_lcolor/fl_set_object_lcol/' \
--e 's/fdui->.*->fdui = fdui/\/\/&/' \
-e 's/\(\(FD_[^ ]*\) \*fdui.*\)sizeof(\*fdui)/\1sizeof(\2)/' \
-e 's/,\([^ ]\)/, \1/g' \
-e 's/\("[^"][^"]*,\) \("\)/\1\2/g' \
Internal Form Definition File
(do not change)
-Number of forms: 5
+Number of forms: 4
Unit of measure: FL_COORD_PIXEL
=============== FORM ===============
--------------------
class: FL_BEGIN_GROUP
type: 0
-box: 0 0 0 0
+box: 0 10 10 0
boxtype: FL_NO_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_CENTER
--------------------
class: FL_BEGIN_GROUP
type: 0
-box: 0 0 0 0
+box: 0 10 10 0
boxtype: FL_NO_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_CENTER
--------------------
class: FL_BEGIN_GROUP
type: 0
-box: 0 0 0 0
+box: 0 10 10 0
boxtype: FL_NO_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_CENTER
--------------------
class: FL_BEGIN_GROUP
type: 0
-box: 0 0 0 0
+box: 0 10 10 0
boxtype: FL_NO_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_CENTER
callback:
argument:
-=============== FORM ===============
-Name: form_table
-Width: 310
-Height: 130
-Number of Objects: 6
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 310 130
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 10 90 90 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_ok
-callback: TableOKCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 110 90 90 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_apply
-callback: TableApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 210 90 90 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_cancel
-callback: TableCancelCB
-argument: 0
-
---------------------
-class: FL_VALSLIDER
-type: HOR_SLIDER
-box: 80 50 220 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Columns
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NoGravity FL_NoGravity
-name: slider_columns
-callback:
-argument:
-
---------------------
-class: FL_VALSLIDER
-type: HOR_SLIDER
-box: 80 10 220 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Rows
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NoGravity FL_NoGravity
-name: slider_rows
-callback:
-argument:
-
=============== FORM ===============
Name: form_search
Width: 440
Internal Form Definition File
(do not change)
-Number of forms: 9
+Number of forms: 2
Unit of measure: FL_COORD_PIXEL
SnapGrid: 5
=============== FORM ===============
-Name: form_document
-Width: 580
-Height: 430
-Number of Objects: 39
+Name: form_character
+Width: 300
+Height: 415
+Number of Objects: 16
--------------------
class: FL_BOX
type: UP_BOX
-box: 0 0 580 430
+box: 0 0 300 415
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
--------------------
class: FL_FRAME
type: ENGRAVED_FRAME
-box: 290 110 120 70
+box: 10 325 280 45
boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
+colors: FL_BLACK FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
+size: FL_DEFAULT_SIZE
lcol: FL_BLACK
label:
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 300 100 100 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Separation
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
name:
callback:
argument:
--------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
+class: FL_FRAME
+type: ENGRAVED_FRAME
+box: 10 265 280 45
boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
+colors: FL_BLACK FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
size: FL_DEFAULT_SIZE
lcol: FL_BLACK
label:
shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: group_radio_separation
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 290 120 110 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Indent|#I
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: radio_indent
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 290 150 110 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Skip|#K
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: radio_skip
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name:
callback:
argument:
--------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
+class: FL_FRAME
+type: ENGRAVED_FRAME
+box: 10 10 280 240
boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
+colors: FL_BLACK FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
size: FL_DEFAULT_SIZE
lcol: FL_BLACK
label:
shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
name:
callback:
argument:
--------------------
class: FL_CHOICE
type: NORMAL_CHOICE
-box: 120 20 160 30
+box: 94 15 191 30
boxtype: FL_FRAME_BOX
colors: FL_COL1 FL_BLACK
alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Class:|#C
+label: Family:|#F
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_class
-callback: ChoiceClassCB
-argument: 0
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_family
+callback:
+argument:
--------------------
class: FL_CHOICE
type: NORMAL_CHOICE
-box: 120 60 160 30
+box: 94 55 191 30
boxtype: FL_FRAME_BOX
colors: FL_COL1 FL_BLACK
alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Pagestyle:|#P
+label: Series:|#S
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_pagestyle
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_series
callback:
argument:
--------------------
class: FL_CHOICE
type: NORMAL_CHOICE
-box: 120 110 160 30
+box: 94 95 191 30
boxtype: FL_FRAME_BOX
colors: FL_COL1 FL_BLACK
alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Fonts:|#F
+label: Shape:|#H
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_fonts
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_shape
callback:
argument:
--------------------
class: FL_CHOICE
type: NORMAL_CHOICE
-box: 120 150 160 30
+box: 95 275 191 30
boxtype: FL_FRAME_BOX
colors: FL_COL1 FL_BLACK
alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Font Size:|#O
+label: Size:|#Z
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_fontsize
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_size
callback:
argument:
--------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 470 390 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 95 335 190 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Cancel|^[
+label: Misc:|#M
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_cancel
-callback: DocumentCancelCB
-argument: 0
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_bar
+callback:
+argument:
--------------------
class: FL_BUTTON
type: NORMAL_BUTTON
-box: 360 390 100 30
+box: 60 375 80 30
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: button_apply
-callback: DocumentApplyCB
+callback: CharacterApplyCB
argument: 0
--------------------
class: FL_BUTTON
type: RETURN_BUTTON
-box: 250 390 100 30
+box: 175 375 80 30
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: OK
+label: Close
shortcut: ^M
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
-name: button_ok
-callback: DocumentOKCB
+name: button_close
+callback: CharacterCloseCB
argument: 0
--------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 450 195 120 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 95 135 191 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Float Placement:|#L
+label: Color:|#C
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: input_float_placement
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_color
callback:
argument:
--------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 120 230 190 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
+class: FL_CHECKBUTTON
+type: PUSH_BUTTON
+box: 30 215 255 25
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
+size: FL_DEFAULT_SIZE
lcol: FL_BLACK
-label: PS Driver:|#S
+label: Toggle on all these|#T
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_postscript_driver
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: check_toggle_all
callback:
argument:
--------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 120 270 190 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 20 255 210 20
+boxtype: FL_FLAT_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
+style: FL_BOLD_STYLE
+size: FL_DEFAULT_SIZE
lcol: FL_BLACK
-label: Encoding:|#D
+label: These are never toggled
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_inputenc
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name:
callback:
argument:
--------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 290 20 122 70
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 20 315 215 20
+boxtype: FL_FLAT_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
+style: FL_BOLD_STYLE
+size: FL_DEFAULT_SIZE
lcol: FL_BLACK
-label:
+label: These are always toggled
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
name:
callback:
argument:
--------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 432 20 136 70
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
+class: FL_CHOICE
+type: DROPLIST_CHOICE
+box: 95 175 190 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label:
+label: Language:
shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_language
callback:
argument:
+=============== FORM ===============
+Name: form_preamble
+Width: 380
+Height: 420
+Number of Objects: 5
+
--------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
+class: FL_BOX
+type: UP_BOX
+box: 0 0 380 420
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
size: FL_DEFAULT_SIZE
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
-name: group_radio_sides
+name:
callback:
argument:
--------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 290 30 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 50 380 100 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: One|#n
+label: OK|#O
shortcut:
resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: radio_sides_one
-callback:
-argument:
+gravity: FL_SouthEast FL_SouthEast
+name: button_ok
+callback: PreambleOKCB
+argument: 0
--------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 290 60 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 160 380 100 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Two|#T
+label: Apply|#A
shortcut:
resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: radio_sides_two
-callback:
-argument:
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 300 10 60 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Sides
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 440 10 80 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Columns
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: group_radio_columns
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 432 30 110 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: One|#e
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: radio_columns_one
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 432 60 110 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Two|#w
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: radio_columns_two
-callback:
-argument:
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 450 235 120 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Extra Options:|#X
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: input_extra
-callback:
-argument:
-
---------------------
-class: FL_BOX
-type: FRAME_BOX
-box: 120 190 190 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Language:
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_language
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 220 310 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: input_default_skip
-callback: DocumentDefskipCB
-argument: 0
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 120 310 90 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Default Skip:|#u
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_default_skip
-callback: DocumentDefskipCB
-argument: 0
-
---------------------
-class: FL_COUNTER
-type: SIMPLE_COUNTER
-box: 490 275 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_BLUE
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Section number depth
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: slider_secnumdepth
-callback:
-argument:
-
---------------------
-class: FL_COUNTER
-type: SIMPLE_COUNTER
-box: 490 315 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_BLUE
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Table of contents depth
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: slider_tocdepth
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 120 350 120 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Spacing|#g
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: choice_spacing
-callback: DocumentSpacingCB
+gravity: FL_SouthEast FL_SouthEast
+name: button_apply
+callback: PreambleApplyCB
argument: 0
--------------------
class: FL_BUTTON
type: NORMAL_BUTTON
-box: 430 110 130 30
+box: 270 380 100 30
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Bullet Shapes|#B
+label: Cancel|^[
shortcut:
resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: button_bullets
-callback: DocumentBulletsCB
+gravity: FL_SouthEast FL_SouthEast
+name: button_cancel
+callback: PreambleCancelCB
argument: 0
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 430 145 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Use AMS Math|#M
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: check_use_amsmath
-callback:
-argument:
-
--------------------
class: FL_INPUT
-type: FLOAT_INPUT
-box: 250 350 95 30
+type: MULTILINE_INPUT
+box: 10 10 360 360
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_LEFT
style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_NorthWest FL_NoGravity
-name: input_spacing
-callback: DocumentSpacingCB
-argument: 0
-
-=============== FORM ===============
-Name: form_character
-Width: 300
-Height: 415
-Number of Objects: 16
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 300 415
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
+size: FL_NORMAL_SIZE
lcol: FL_BLACK
label:
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NorthWest FL_SouthEast
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 325 280 45
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name:
+name: input_preamble
callback:
argument:
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 265 280 45
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 10 280 240
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 94 15 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Family:|#F
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_family
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 94 55 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Series:|#S
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_series
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 94 95 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Shape:|#H
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_shape
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 95 275 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Size:|#Z
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_size
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 95 335 190 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Misc:|#M
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_bar
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 60 375 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_apply
-callback: CharacterApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 175 375 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Close
-shortcut: ^M
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_close
-callback: CharacterCloseCB
-argument: 0
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 95 135 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Color:|#C
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_color
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 30 215 255 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Toggle on all these|#T
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: check_toggle_all
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 255 210 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: These are never toggled
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 315 215 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: These are always toggled
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: DROPLIST_CHOICE
-box: 95 175 190 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Language:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_language
-callback:
-argument:
-
-=============== FORM ===============
-Name: form_paragraph
-Width: 490
-Height: 290
-Number of Objects: 33
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 490 290
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 127 250 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_ok
-callback: ParagraphOKCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 244 250 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_apply
-callback: ParagraphApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 360 250 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_cancel
-callback: ParagraphCancelCB
-argument: 0
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 360 110 120 50
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 110 340 90
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 360 20 120 70
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 210 20 140 70
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 20 190 70
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 100 210 360 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Label Width:|#d
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_West FL_East
-name: input_labelwidth
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 370 100 60 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Indent
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 230 30 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Above|#b
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: check_lines_top
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 230 60 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Below|#E
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: check_lines_bottom
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 360 30 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Above|#o
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: check_pagebreaks_top
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 360 60 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Below|#l
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: check_pagebreaks_bottom
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 360 120 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: No Indent|#I
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: check_noindent
-callback:
-argument:
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: group_radio_alignment
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 10 30 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Right|#R
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_align_right
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 10 60 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Left|#f
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_align_left
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 100 30 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Block|#c
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_align_block
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 100 60 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Center|#n
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_align_center
-callback:
-argument:
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 180 120 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_space_above
-callback: ParagraphVSpaceCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 180 160 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_space_below
-callback: ParagraphVSpaceCB
-argument: 0
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 70 120 100 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Above:|#v
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: choice_space_above
-callback: ParagraphVSpaceCB
-argument: 0
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 70 160 100 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Below:|#w
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: choice_space_below
-callback: ParagraphVSpaceCB
-argument: 0
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 370 10 100 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Pagebreaks
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 230 10 50 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Lines
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 10 80 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Alignment
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 100 130 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Vertical Spaces
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 10 250 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: ExtraOpt|#X
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_pextra
-callback: ParagraphExtraOpen
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 270 120 40 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Keep|#K
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: check_space_above
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 270 160 40 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Keep|#p
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: check_space_below
-callback:
-argument:
-
-=============== FORM ===============
-Name: form_preamble
-Width: 380
-Height: 420
-Number of Objects: 5
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 380 420
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 50 380 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK|#O
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_ok
-callback: PreambleOKCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 160 380 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_apply
-callback: PreambleApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 270 380 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_cancel
-callback: PreambleCancelCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: MULTILINE_INPUT
-box: 10 10 360 360
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_SouthEast
-name: input_preamble
-callback:
-argument:
-
-=============== FORM ===============
-Name: form_quotes
-Width: 340
-Height: 130
-Number of Objects: 10
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 340 130
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 10 90 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback: QuotesOKCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 120 90 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback: QuotesApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 230 90 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback: QuotesCancelCB
-argument: 0
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 90 10 160 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Type:|#T
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: choice_quotes_language
-callback:
-argument:
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: group_radio_quotes_number
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 90 50 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Single|#S
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_single
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 170 50 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Double|#D
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_double
-callback:
-argument:
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 290 230 10 10
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Text
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
-=============== FORM ===============
-Name: form_paper
-Width: 440
-Height: 430
-Number of Objects: 31
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 440 430
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 230 100 200 100
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 290 20 140 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Special:|#S
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: choice_paperpackage
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 230 220 200 130
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 180 190 170
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 170 70 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Margins
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 240 210 160 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Foot/Head Margins
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 320 390 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_cancel
-callback: PaperCancelCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 210 390 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_apply
-callback: PaperApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 100 390 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_ok
-callback: PaperOKCB
-argument: 0
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 440 360 10 10
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 440 350 10 10
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 100 190 70
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 90 95 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Orientation
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: greoup_radio_orientation
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 20 105 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Portrait|#o
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_portrait
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 20 135 120 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Landscape|#L
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_landscape
-callback:
-argument:
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 70 20 160 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Papersize:|#P
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: choice_papersize2
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 240 90 150 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Custom Papersize
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 20 55 170 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Use Geometry Package|#U
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: push_use_geometry
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 330 115 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Width:|#W
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_custom_width
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 330 155 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Height:|#H
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_custom_height
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 100 190 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Top:|#T
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_top_margin
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 100 230 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Bottom:|#B
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_bottom_margin
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 100 270 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Left:|#e
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_left_margin
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 100 310 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Right:|#R
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_right_margin
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 330 230 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Headheight:|#i
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_head_height
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 330 270 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Headsep:|#d
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_head_sep
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 330 310 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Footskip:|#F
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_foot_skip
-callback: PaperMarginsCB
-argument: 0
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 360 420 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: text_warning
-callback:
-argument:
-
-=============== FORM ===============
-Name: form_table_options
-Width: 540
-Height: 310
-Number of Objects: 41
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 540 310
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 300 120 110 60
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 300 20 110 90
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 275 330 30
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: text_warning
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 430 270 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Close
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_close
-callback: TableOptCloseCB
-argument: 0
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 20 20 145 105
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 30 10 70 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Borders
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 75 45 25 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Top|#T
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_border_top
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 75 75 25 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_BOTTOM_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Bottom|#B
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_border_bottom
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 55 60 25 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Left|#L
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_border_left
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 95 60 25 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_RIGHT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Right|#R
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_border_right
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 175 20 105 105
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 180 10 90 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Alignment
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 300 10 100 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Special Cell
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 300 30 95 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Multicolumn|#M
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_multicolumn
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 10 170 120 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Append Column|#A
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_append_column
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 140 170 120 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Delete Column|#O
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_delete_column
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 10 200 120 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Append Row|#p
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_append_row
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 140 200 120 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Delete Row|#w
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_delete_row
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 10 240 250 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Delete Table|#D
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_table_delete
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 290 240 60 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Column
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_table_column
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 360 240 60 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Row
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_table_row
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 10 140 120 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Set Borders|#S
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_set_borders
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 140 140 120 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Unset Borders|#U
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_unset_borders
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 300 130 90 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Longtable
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_longtable
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 330 190 95 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Width
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_column_width
-callback: SetPWidthCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 300 155 90 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Rotate 90°|#9
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_rotate_table
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 300 55 95 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Linebreaks|#N
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_linebreak_cell
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 300 110 100 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Spec. Table
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 420 20 100 160
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 425 10 85 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Longtable
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 420 30 90 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: First Head
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_lt_firsthead
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 420 60 90 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Head
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_lt_head
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 420 90 90 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Foot
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_lt_foot
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 420 120 90 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Last Foot
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_lt_lastfoot
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 420 150 90 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: New Page
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_lt_newpage
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 300 80 95 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Rotate 90°
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_rotate_cell
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 430 235 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Extra|#X
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_table_extra
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 175 30 80 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Left|#e
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_align_left
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 175 55 80 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Right|#i
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_align_right
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 175 80 80 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Center|#C
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_align_center
-callback: TableOptionsCB
-argument: 0
-
-=============== FORM ===============
-Name: form_paragraph_extra
-Width: 460
-Height: 250
-Number of Objects: 25
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 460 250
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 20 170 100
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 350 20 100 100
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 190 20 150 100
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 10 120 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Extra Options
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 240 30 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Length|#L
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_pextra_width
-callback: CheckPExtraOptCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 130 210 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_ok
-callback: ParagraphExtraOKCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 240 210 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_apply
-callback: ParagraphExtraApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 350 210 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_cancel
-callback: ParagraphExtraCancelCB
-argument: 0
-
---------------------
-class: FL_INPUT
-type: INT_INPUT
-box: 240 70 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: or %|#o
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_pextra_widthp
-callback: CheckPExtraOptCB
-argument: 0
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 200 10 60 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Width
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 350 10 90 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Alignment
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: group_alignment
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 360 30 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Top|#T
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_pextra_top
-callback: CheckPExtraOptCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 360 60 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Middle|#d
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_pextra_middle
-callback: CheckPExtraOptCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 360 90 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Bottom|#B
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_pextra_bottom
-callback: CheckPExtraOptCB
-argument: 0
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 10 170 330 30
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: text_warning
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 10 130 300 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: HFill between Minipage paragraphs|#H
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_pextra_hfill
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 10 160 260 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Start new Minipage|#S
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_pextra_startmp
-callback:
-argument:
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: group_extraopt
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 10 30 160 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Indented Paragraph|#I
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_pextra_indent
-callback: CheckPExtraOptCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 10 60 160 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Minipage|#M
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_pextra_minipage
-callback: CheckPExtraOptCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 10 90 160 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Floatflt|#F
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_pextra_floatflt
-callback: CheckPExtraOptCB
-argument: 0
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
-=============== FORM ===============
-Name: form_table_extra
-Width: 330
-Height: 200
-Number of Objects: 8
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 330 200
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 15 95 305 60
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 85 205 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Special Multicolumn Alignment
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 15 20 305 60
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 25 35 280 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NoGravity
-name: input_special_alignment
-callback: TableOptionsCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 220 160 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Close
-shortcut: ^M
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name:
-callback: TableSpeCloseCB
-argument: 0
-
---------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 20 10 170 20
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
-style: FL_BOLD_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Special Column Alignment
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NoGravity
-name:
-callback:
-argument:
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 25 110 280 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NoGravity
-name: input_special_multialign
-callback: TableOptionsCB
-argument: 0
-
==============================
create_the_forms
---- layout_forms.h.orig Sat Jun 10 01:48:56 2000
-+++ layout_forms.h Sat Jun 10 02:10:12 2000
-@@ -3,6 +3,8 @@
- #ifndef FD_form_document_h_
- #define FD_form_document_h_
-
-+extern "C" {
-+
- /** Callbacks, globals and object handlers **/
- extern void ChoiceClassCB(FL_OBJECT *, long);
- extern void DocumentCancelCB(FL_OBJECT *, long);
-@@ -46,6 +48,29 @@
- extern void TableOptionsCB(FL_OBJECT *, long);
- extern void TableSpeCloseCB(FL_OBJECT *, long);
-
-+}
-+
-+/* Additional Functions/Methods */
-+
-+#include "bufferparams.h"
-+
-+extern bool UpdateLayoutDocument(BufferParams *params = NULL);
-+extern bool UpdateLayoutPreamble();
-+extern bool UpdateLayoutPaper();
-+extern bool UpdateLayoutQuotes();
-+extern bool UpdateLayoutParagraph();
-+extern bool UpdateParagraphExtra();
-+extern bool UpdateLayoutTable(int);
-+
-+extern void MenuLayoutCharacter();
-+extern void MenuLayoutDocument();
-+extern void MenuLayoutPreamble();
-+extern void MenuLayoutPaper();
-+extern void MenuLayoutQuotes();
-+extern void MenuLayoutParagraph();
-+extern void MenuLayoutTable(int);
-+
-+extern "C" {
-
- /**** Forms and Objects ****/
- typedef struct {
-@@ -255,5 +280,7 @@
- } FD_form_table_extra;
-
- extern FD_form_table_extra * create_form_form_table_extra(void);
-+
-+}
-
- #endif /* FD_form_document_h_ */
+1c1
+< /** Header file generated with fdesign on Tue Sep 26 15:14:15 2000.**/
+---
+> /** Header file generated with fdesign **/
+7,8c7,8
+< extern void CharacterApplyCB(FL_OBJECT *, long);
+< extern void CharacterCloseCB(FL_OBJECT *, long);
+---
+> extern "C" void CharacterApplyCB(FL_OBJECT *, long);
+> extern "C" void CharacterCloseCB(FL_OBJECT *, long);
+10,12c10,12
+< extern void PreambleOKCB(FL_OBJECT *, long);
+< extern void PreambleApplyCB(FL_OBJECT *, long);
+< extern void PreambleCancelCB(FL_OBJECT *, long);
+---
+> extern "C" void PreambleOKCB(FL_OBJECT *, long);
+> extern "C" void PreambleApplyCB(FL_OBJECT *, long);
+> extern "C" void PreambleCancelCB(FL_OBJECT *, long);
+13a14,16
+> /* Some extra funcs */
+>
+> extern bool UpdateLayoutPreamble();
# Various commands
FDESIGN = fdesign
-SRCS = bullet_forms.fd credits_form.fd form1.fd \
+SRCS = credits_form.fd form1.fd \
log_form.fd layout_forms.fd lyx.fd lyx_sendfax.fd math_forms.fd \
print_form.fd sp_form.fd
-OBJS = bullet_forms.c credits_form.c form1.c \
+OBJS = credits_form.c form1.c \
log_form.c layout_forms.c lyx.c lyx_sendfax.c math_forms.c \
print_form.c sp_form.c
-COBJS = bullet_forms.C credits_form.C form1.C \
+COBJS = credits_form.C form1.C \
log_form.C layout_forms.C lyx.C lyx_sendfax.C math_forms.C \
print_form.C sp_form.C
for hfil in *.h ; do \
if [ -f "$$hfil.patch" ] ; then \
(echo "Patching $$hfil with $$hfil.patch" ; \
- patch -s $$hfil < $$hfil.patch) \
+ patch --verbose $$hfil < $$hfil.patch) \
fi; \
sed < $$hfil > $$hfil.tmp \
-e 's/\(extern\) \(void.*FL_OBJECT\)/\1 "C" \2/' \
@echo "get junk code and errors at compile time.">&2
for fil in *.C *.h ; do \
if [ $$fil = "math_forms.C" -o $$fil = "math_forms.h" ]; then \
- cp $$fil ../src/mathed ; \
+ cmp -s $$fil ../src/mathed/$$fil || cp $$fil ../src/mathed ; \
else \
- cp $$fil ../src ; \
+ cmp -s $$fil ../src/$$fil || cp $$fil ../src ; \
fi \
done
src/BufferView2.C
src/bufferview_funcs.C
src/BufferView_pimpl.C
-src/bullet_forms.C
-src/bullet_forms_cb.C
src/Chktex.C
src/ColorHandler.C
src/combox.C
src/mathed/math_panel.C
src/MenuBackend.C
src/minibuffer.C
-src/PaperLayout.C
src/paragraph.C
-src/ParagraphExtra.C
src/print_form.C
src/spellchecker.C
src/sp_form.C
/* clear the selection (if there is any) */
toggleSelection(false);
- text->ReplaceSelectionWithString(this, replacestring.c_str());
+ text->ReplaceSelectionWithString(this, replacestring);
- text->SetSelectionOverString(this, replacestring.c_str());
+ text->SetSelectionOverString(this, replacestring);
// Go back so that replacement string is also spellchecked
for (string::size_type i = 0; i < replacestring.length() + 1; ++i) {
- text->CursorLeftIntern(this);
+ text->CursorLeft(this);
}
update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
#include <config.h>
#include <fstream>
-#include <cstdlib> // atoi
#ifdef __GNUG__
#pragma implementation
token = split(token, warno, ':');
token = split(token, warning, ':');
- int lineno = atoi(line.c_str());
+ int lineno = lyx::atoi(line);
warno = _("ChkTeX warning id #") + warno;
terr.insertError(lineno, warno, warning);
++retval;
if (deplist.find(f) == deplist.end()) {
if (upd) {
one = two;
- two = lyx::sum(f.c_str());
+ two = lyx::sum(f);
}
deplist[f] = make_pair(one, two);
}
for(DepList::iterator itr = deplist.begin();
itr != deplist.end();
++itr) {
- unsigned long one = (*itr).second.second;
- unsigned long two = lyx::sum((*itr).first.c_str());
+ unsigned long const one = (*itr).second.second;
+ unsigned long const two = lyx::sum((*itr).first);
(*itr).second = make_pair(one, two);
if (lyxerr.debugging(Debug::DEPEND)) {
lyxerr << "Update dep: " << (*itr).first << " "
for (DepList::const_iterator cit = deplist.begin();
cit != deplist.end();
++cit) {
- if (suffixIs((*cit).first, ext.c_str())) {
+ if (suffixIs((*cit).first, ext)) {
if ((*cit).second.first != (*cit).second.second)
return true;
}
DepList tmp;
for (DepList::const_iterator cit = deplist.begin();
cit != deplist.end(); ++cit) {
- if (!suffixIs((*cit).first, suf.c_str()))
+ if (!suffixIs((*cit).first, suf))
tmp[(*cit).first] = (*cit).second;
}
deplist.swap(tmp);
{
ofstream ofs(f.c_str());
for (DepList::const_iterator cit = deplist.begin();
- cit != deplist.end();
- ++cit) {
+ cit != deplist.end(); ++cit) {
if (lyxerr.debugging(Debug::DEPEND)) {
lyxerr << "Write dep: "
<< (*cit).first << " "
#include <config.h>
#include <cmath> // fabs()
-#include <cstdlib> // atoi()
#include FORMS_H_LOCATION
// We have matches. Run them through
for(int i = 0; i < matches; ++i) {
string name(list[i]);
- sizes[i] = atoi(token(name, '-', 7).c_str());
+ sizes[i] = lyx::atoi(token(name, '-', 7));
strings[i] = name;
if (sizes[i] == 0) {
if (scaleindex == -1) {
#include <config.h>
#include <cmath> // fabs()
-#include <cstdlib> // atoi()
#ifdef __GNUG__
#pragma implementation "FontLoader.h"
// What files do we have to delete?
// This will at least make latex do all the runs
- ::unlink(depfile.c_str());
+ lyx::unlink(depfile);
// but the reason for the error might be in a generated file...
// bibtex file
string bbl = ChangeExtension(ofname, ".bbl");
- ::unlink(bbl.c_str());
+ lyx::unlink(bbl);
// makeindex file
string ind = ChangeExtension(ofname, ".ind");
- ::unlink(ind.c_str());
+ lyx::unlink(ind);
// Also remove the aux file
string aux = ChangeExtension(ofname, ".aux");
- ::unlink(aux.c_str());
+ lyx::unlink(aux);
}
// only to get access to NEW_INSETS
#include "lyxparagraph.h"
#endif
-#if 1
-// only to get access to NEW_EXPORT
-#include "exporter.h"
-#endif
-
using std::ostream;
using std::endl;
#endif
{ LFUN_IMPORT, "buffer-import",
N_("Import document"), NoBuffer },
- { LFUN_BUFFERBULLETSSELECT, "buffer-itemize-bullets-select",
- "", Noop },
{ LFUN_BUFFER_PRINT, "buffer-print-xtl", N_("Print"),
ReadOnly },
{ LFUN_PRINTER_PARAMS_GET, "printer-params-get",
N_("Switch to an open document"), ReadOnly },
{ LFUN_READ_ONLY_TOGGLE, "buffer-toggle-read-only",
N_("Toggle read-only"), ReadOnly },
-#ifdef NEW_EXPORT
{ LFUN_UPDATE, "buffer-update", N_("Update"), ReadOnly },
{ LFUN_PREVIEW, "buffer-view", N_("View") , ReadOnly },
-#else
- { LFUN_RUNLATEX, "buffer-typeset", N_("Update DVI"),
- ReadOnly },
- { LFUN_RUNDVIPS, "buffer-typeset-ps",
- N_("Update PostScript"), ReadOnly },
- { LFUN_PREVIEW, "buffer-view", N_("View DVI") , ReadOnly },
- { LFUN_PREVIEWPS, "buffer-view-ps",
- N_("View PostScript") , ReadOnly },
-#endif
{ LFUN_MENUWRITE, "buffer-write", N_("Save"), ReadOnly },
{ LFUN_MENUWRITEAS, "buffer-write-as", N_("Save As"),
ReadOnly },
{ LFUN_LAYOUT_DOCUMENT, "layout-document", "", ReadOnly },
{ LFUN_LAYOUTNO, "layout-number", "", Noop }, // internal only
{ LFUN_LAYOUT_PARAGRAPH, "layout-paragraph", "", ReadOnly },
- { LFUN_LAYOUT_PAPER, "layout-paper", "", ReadOnly },
{ LFUN_LAYOUT_PASTE, "layout-paste",
N_("Paste paragraph environment type"), Noop },
{ LFUN_LAYOUT_PREAMBLE, "layout-preamble", "", ReadOnly },
- { LFUN_LAYOUT_QUOTES, "layout-quotes", "", ReadOnly },
{ LFUN_LAYOUT_SAVE_DEFAULT, "layout-save-default", "",
ReadOnly },
- { LFUN_LAYOUT_TABLE, "layout-table",
- N_("Open the table layout"), Noop },
{ LFUN_LAYOUT_TABULAR, "layout-tabular",
N_("Open the tabular layout"), Noop },
{ LFUN_HOME, "line-begin",
lyxerr << "Lyx Error: Unrecognized pseudo-action\n";
return LFUN_UNKNOWN_ACTION;
}
-
}
#include "lyx_gui_misc.h"
#include "support/syscall.h"
#include "gettext.h"
-//#include "lyx_cb.h"
#include "bufferview_funcs.h"
#include "exporter.h"
if (command.empty())
return;
Buffer * buffer = current_view->buffer();
-#ifndef NEW_EXPORT
- if (fl_get_button(fd_form_sendto->radio_ftype_dvi) ||
- fl_get_button(fd_form_sendto->radio_ftype_ps)) {
- ProhibitInput(current_view);
- // Generate dvi file and check if there are errors in the .lyx file
- if (MakeLaTeXOutput(buffer) > 0) {
- AllowInput(current_view);
- return;
- }
- AllowInput(current_view);
- }
-#endif
string ftypeext;
if (fl_get_button(fd_form_sendto->radio_ftype_lyx))
ftypeext = ".lyx";
else if (fl_get_button(fd_form_sendto->radio_ftype_ascii))
ftypeext = ".txt";
else {
-#ifdef NEW_EXPORT
ftypeext = ".ps";
if (!Exporter::Export(buffer, "ps", true))
return;
-#else
- ftypeext = ".ps_tmp";
- if (!CreatePostscript(buffer, true)) {
- return;
- }
-#endif
}
- string fname = OnlyFilename(ChangeExtension(buffer->getLatexName(),
- ftypeext));
+ string const fname = OnlyFilename(ChangeExtension(buffer->getLatexName(),
+ ftypeext));
if (!contains(command, "$$FName"))
command = "( " + command + " ) <$$FName";
command = subst(command, "$$FName", fname);
using std::endl;
-extern FD_form_document * fd_form_document;
-
extern void AutoSave(BufferView *);
extern void QuitLyX();
LyXTextClass::size_type current_layout = 0;
// Set the textclass choice
invalidateLayoutChoice();
updateLayoutChoice();
- UpdateDocumentClassChoice();
updateMenubar();
// Start autosave timer
}
-void LyXView::UpdateDocumentClassChoice()
-{
- // Update the document class display in the document form
- if (fd_form_document) {
- fl_clear_choice(fd_form_document->choice_class);
- for (LyXTextClassList::const_iterator cit = textclasslist.begin();
- cit != textclasslist.end(); ++cit) {
- fl_addto_choice(fd_form_document->choice_class,
- (*cit).description().c_str());
- }
- }
-}
-
-
#if 0
// This is necessary, since FL_FREE-Objects doesn't get all keypress events
// as FL_KEYBOARD events :-( Matthias 280596
BufferView * bufferview;
///
void invalidateLayoutChoice();
- ///
- void UpdateDocumentClassChoice();
public:
-#if FL_REVISION < 89
+#if 0
///
static int KeyPressMask_raw_callback(FL_FORM *, void * xev);
#endif
Painter.h \
PainterBase.C \
PainterBase.h \
- PaperLayout.C \
- ParagraphExtra.C \
PrinterParams.h \
Sectioning.h \
Sectioning.C \
bufferparams.h \
bufferview_funcs.C \
bufferview_funcs.h \
- bullet_forms.C \
- bullet_forms.h \
- bullet_forms_cb.C \
chset.C \
chset.h \
combox.C \
// fallback to md_item
case md_item: {
lex.next();
- char * tmp = strdup(lex.GetString().c_str());
+ char * tmp = ::strdup(lex.GetString().c_str());
string name = _(tmp);
free(tmp);
lex.next();
case md_submenu: {
lex.next();
- char * tmp = strdup(lex.GetString().c_str());
+ char * tmp = ::strdup(lex.GetString().c_str());
string mlabel = _(tmp);
free(tmp);
lex.next();
+++ /dev/null
-#include <config.h>
-
-#include <cstdlib>
-
-#include FORMS_H_LOCATION
-#include "layout_forms.h"
-#include "lyx_main.h"
-#include "lyxrc.h"
-#include "LString.h"
-#include "support/filetools.h"
-#include "buffer.h"
-#include "minibuffer.h"
-#include "vspace.h"
-#include "lyx_gui_misc.h"
-#include "BufferView.h"
-#include "gettext.h"
-#include "LyXView.h"
-
-extern FD_form_paper * fd_form_paper;
-extern BufferView * current_view;
-
-
-inline
-void DeactivatePaperButtons ()
-{
- fl_deactivate_object (fd_form_paper->button_ok);
- fl_deactivate_object (fd_form_paper->button_apply);
- fl_set_object_lcol (fd_form_paper->button_ok, FL_INACTIVE);
- fl_set_object_lcol (fd_form_paper->button_apply, FL_INACTIVE);
-}
-
-
-inline
-void ActivatePaperButtons ()
-{
- fl_activate_object (fd_form_paper->button_ok);
- fl_activate_object (fd_form_paper->button_apply);
- fl_set_object_lcol (fd_form_paper->button_ok, FL_BLACK);
- fl_set_object_lcol (fd_form_paper->button_apply, FL_BLACK);
-}
-
-
-inline
-void DisablePaperLayout()
-{
- DeactivatePaperButtons();
- fl_deactivate_object (fd_form_paper->choice_paperpackage);
- fl_deactivate_object (fd_form_paper->greoup_radio_orientation);
- fl_deactivate_object (fd_form_paper->radio_portrait);
- fl_deactivate_object (fd_form_paper->radio_landscape);
- fl_deactivate_object (fd_form_paper->choice_papersize2);
- fl_deactivate_object (fd_form_paper->push_use_geometry);
- fl_deactivate_object (fd_form_paper->input_custom_width);
- fl_deactivate_object (fd_form_paper->input_custom_height);
- fl_deactivate_object (fd_form_paper->input_top_margin);
- fl_deactivate_object (fd_form_paper->input_bottom_margin);
- fl_deactivate_object (fd_form_paper->input_left_margin);
- fl_deactivate_object (fd_form_paper->input_right_margin);
- fl_deactivate_object (fd_form_paper->input_head_height);
- fl_deactivate_object (fd_form_paper->input_head_sep);
- fl_deactivate_object (fd_form_paper->input_foot_skip);
- fl_deactivate_object (fd_form_paper->text_warning);
-}
-
-
-inline
-void EnablePaperLayout()
-{
- ActivatePaperButtons();
- fl_activate_object (fd_form_paper->choice_paperpackage);
- fl_activate_object (fd_form_paper->greoup_radio_orientation);
- fl_activate_object (fd_form_paper->radio_portrait);
- fl_activate_object (fd_form_paper->radio_landscape);
- fl_activate_object (fd_form_paper->choice_papersize2);
- fl_activate_object (fd_form_paper->push_use_geometry);
- fl_activate_object (fd_form_paper->input_custom_width);
- fl_activate_object (fd_form_paper->input_custom_height);
- fl_activate_object (fd_form_paper->input_top_margin);
- fl_activate_object (fd_form_paper->input_bottom_margin);
- fl_activate_object (fd_form_paper->input_left_margin);
- fl_activate_object (fd_form_paper->input_right_margin);
- fl_activate_object (fd_form_paper->input_head_height);
- fl_activate_object (fd_form_paper->input_head_sep);
- fl_activate_object (fd_form_paper->input_foot_skip);
- fl_activate_object (fd_form_paper->text_warning);
-}
-
-
-static
-void checkMarginValues()
-{
- int allEmpty;
-
- fl_hide_object(fd_form_paper->text_warning);
- ActivatePaperButtons();
-
- allEmpty = (!strlen(fl_get_input(fd_form_paper->input_top_margin)) &&
- !strlen(fl_get_input(fd_form_paper->input_bottom_margin)) &&
- !strlen(fl_get_input(fd_form_paper->input_left_margin)) &&
- !strlen(fl_get_input(fd_form_paper->input_right_margin)) &&
- !strlen(fl_get_input(fd_form_paper->input_head_height)) &&
- !strlen(fl_get_input(fd_form_paper->input_head_sep)) &&
- !strlen(fl_get_input(fd_form_paper->input_foot_skip)) &&
- !strlen(fl_get_input(fd_form_paper->input_custom_width)) &&
- !strlen(fl_get_input(fd_form_paper->input_custom_height)));
- if (!allEmpty) {
- fl_set_button(fd_form_paper->push_use_geometry, 1);
- }
-}
-
-
-bool UpdateLayoutPaper()
-{
- bool update = true;
- if (!current_view->available())
- update = false;
-
- if (update) {
- BufferParams * params = ¤t_view->buffer()->params;
-
- fl_set_choice(fd_form_paper->choice_papersize2,
- params->papersize2 + 1);
- fl_set_choice(fd_form_paper->choice_paperpackage,
- params->paperpackage + 1);
- fl_set_button(fd_form_paper->push_use_geometry,
- params->use_geometry);
- fl_set_button(fd_form_paper->radio_portrait, 0);
- fl_set_button(fd_form_paper->radio_landscape, 0);
- if (params->orientation == BufferParams::ORIENTATION_LANDSCAPE)
- fl_set_button(fd_form_paper->radio_landscape, 1);
- else
- fl_set_button(fd_form_paper->radio_portrait, 1);
-
- fl_set_input(fd_form_paper->input_custom_width,
- params->paperwidth.c_str());
- fl_set_input(fd_form_paper->input_custom_height,
- params->paperheight.c_str());
- fl_set_input(fd_form_paper->input_left_margin,
- params->leftmargin.c_str());
- fl_set_input(fd_form_paper->input_top_margin,
- params->topmargin.c_str());
- fl_set_input(fd_form_paper->input_right_margin,
- params->rightmargin.c_str());
- fl_set_input(fd_form_paper->input_bottom_margin,
- params->bottommargin.c_str());
- fl_set_input(fd_form_paper->input_head_height,
- params->headheight.c_str());
- fl_set_input(fd_form_paper->input_head_sep,
- params->headsep.c_str());
- fl_set_input(fd_form_paper->input_foot_skip,
- params->footskip.c_str());
- fl_set_focus_object(fd_form_paper->form_paper,
- fd_form_paper->choice_papersize2);
- fl_hide_object(fd_form_paper->text_warning);
- if (current_view->buffer()->isReadonly()) {
- DisablePaperLayout();
- fl_set_object_label(fd_form_paper->text_warning,
- _("Document is read-only."
- " No changes to layout"
- " permitted."));
- fl_show_object(fd_form_paper->text_warning);
- } else {
- EnablePaperLayout();
- }
- } else if (fd_form_paper->form_paper->visible) {
- fl_hide_form(fd_form_paper->form_paper);
- }
- return update;
-}
-
-
-void MenuLayoutPaper()
-{
- if (UpdateLayoutPaper()) {
- if (fd_form_paper->form_paper->visible) {
- fl_raise_form(fd_form_paper->form_paper);
- } else {
- fl_show_form(fd_form_paper->form_paper,
- FL_PLACE_MOUSE, FL_FULLBORDER,
- _("Paper Layout"));
- }
- }
-}
-
-
-void PaperApplyCB(FL_OBJECT *, long)
-{
- if (!current_view->available())
- return;
-
- BufferParams * params = ¤t_view->buffer()->params;
-
- FD_form_paper const * fd = fd_form_paper;
-
- params->papersize2 = fl_get_choice(fd->choice_papersize2)-1;
- params->paperpackage = fl_get_choice(fd->choice_paperpackage)-1;
- params->use_geometry = fl_get_button(fd_form_paper->push_use_geometry);
- if (fl_get_button(fd_form_paper->radio_landscape))
- params->orientation = BufferParams::ORIENTATION_LANDSCAPE;
- else
- params->orientation = BufferParams::ORIENTATION_PORTRAIT;
- params->paperwidth = fl_get_input(fd->input_custom_width);
- params->paperheight = fl_get_input(fd->input_custom_height);
- params->leftmargin = fl_get_input(fd->input_left_margin);
- params->topmargin = fl_get_input(fd->input_top_margin);
- params->rightmargin = fl_get_input(fd->input_right_margin);
- params->bottommargin = fl_get_input(fd->input_bottom_margin);
- params->headheight = fl_get_input(fd->input_head_height);
- params->headsep = fl_get_input(fd->input_head_sep);
- params->footskip = fl_get_input(fd->input_foot_skip);
- current_view->buffer()->setPaperStuff();
- current_view->owner()->getMiniBuffer()->Set(_("Paper layout set"));
- current_view->buffer()->markDirty();
-
- return;
-}
-
-
-void PaperCancelCB(FL_OBJECT *, long)
-{
- fl_hide_form(fd_form_paper->form_paper);
-}
-
-
-void PaperOKCB(FL_OBJECT * ob, long data)
-{
- PaperCancelCB(ob, data);
- PaperApplyCB(ob, data);
-}
-
-
-void PaperMarginsCB(FL_OBJECT * ob, long)
-{
- FD_form_paper const * fd = fd_form_paper;
- string str;
- char val;
-
- checkMarginValues();
- if (ob == fd->choice_papersize2) {
- val = fl_get_choice(fd->choice_papersize2)-1;
- if (val == BufferParams::VM_PAPER_DEFAULT) {
- fl_set_button(fd->push_use_geometry, 0);
- checkMarginValues();
- } else {
- if (val != BufferParams::VM_PAPER_USLETTER
- && val != BufferParams::VM_PAPER_USLEGAL
- && val != BufferParams::VM_PAPER_USEXECUTIVE
- && val != BufferParams::VM_PAPER_A4
- && val != BufferParams::VM_PAPER_A5
- && val != BufferParams::VM_PAPER_B5) {
- fl_set_button(fd->push_use_geometry, 1);
- }
- fl_set_choice(fd->choice_paperpackage, BufferParams::PACKAGE_NONE + 1);
- }
- } else if (ob == fd->choice_paperpackage) {
- val = fl_get_choice(fd->choice_paperpackage)-1;
- if (val != BufferParams::PACKAGE_NONE) {
- fl_set_choice(fd->choice_papersize2,
- BufferParams::VM_PAPER_DEFAULT + 1);
- fl_set_button(fd->push_use_geometry, 0);
- }
- } else if (ob == fd->input_custom_width
- || ob == fd->input_custom_height
- || ob == fd->input_left_margin
- || ob == fd->input_right_margin
- || ob == fd->input_top_margin
- || ob == fd->input_bottom_margin
- || ob == fd->input_head_height
- || ob == fd->input_head_sep
- || ob == fd->input_foot_skip) {
- str = fl_get_input(ob);
- if (!str.empty() && !isValidLength(str)) {
- fl_set_object_label(fd_form_paper->text_warning,
- _("Warning: Invalid Length"
- " (valid example: 10mm)"));
- fl_show_object(fd_form_paper->text_warning);
- DeactivatePaperButtons();
- } else if (!str.empty())
- fl_set_button(fd->push_use_geometry, 1);
- }
- return;
-}
+++ /dev/null
-#include <config.h>
-
-#include <cstdlib>
-#include FORMS_H_LOCATION
-
-#include "layout_forms.h"
-#include "LString.h"
-#include "minibuffer.h"
-#include "vspace.h"
-#include "buffer.h"
-#include "BufferView.h"
-#include "lyxparagraph.h"
-#include "gettext.h"
-#include "lyxtext.h"
-#include "LyXView.h"
-
-extern FD_form_paragraph_extra * fd_form_paragraph_extra;
-extern BufferView * current_view;
-static bool CheckInputWidth();
-
-inline
-void DeactivateParagraphExtraButtons ()
-{
- fl_deactivate_object(fd_form_paragraph_extra->button_ok);
- fl_deactivate_object(fd_form_paragraph_extra->button_apply);
- fl_set_object_lcol(fd_form_paragraph_extra->button_ok, FL_INACTIVE);
- fl_set_object_lcol(fd_form_paragraph_extra->button_apply, FL_INACTIVE);
-}
-
-inline
-void ActivateParagraphExtraButtons ()
-{
- fl_activate_object(fd_form_paragraph_extra->button_ok);
- fl_activate_object(fd_form_paragraph_extra->button_apply);
- fl_set_object_lcol(fd_form_paragraph_extra->button_ok, FL_BLACK);
- fl_set_object_lcol(fd_form_paragraph_extra->button_apply, FL_BLACK);
-}
-
-inline
-void DisableParagraphExtra ()
-{
- DeactivateParagraphExtraButtons();
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_deactivate_object(fd_form_paragraph_extra->group_alignment);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- fl_deactivate_object(fd_form_paragraph_extra->text_warning);
- fl_deactivate_object(fd_form_paragraph_extra->group_extraopt);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_indent);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_minipage);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_floatflt);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_hfill);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_startmp);
-}
-
-inline
-void EnableParagraphExtra ()
-{
- ActivateParagraphExtraButtons();
- fl_activate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_activate_object(fd_form_paragraph_extra->group_alignment);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- fl_activate_object(fd_form_paragraph_extra->text_warning);
- fl_activate_object(fd_form_paragraph_extra->group_extraopt);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_indent);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_minipage);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_floatflt);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_hfill);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_startmp);
-}
-
-
-bool UpdateParagraphExtra()
-{
- bool update = false;
- if (current_view->available()) {
- update = true;
- LyXParagraph * par = current_view->text->cursor.par();
-
- EnableParagraphExtra();
-
- fl_activate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_set_input(fd_form_paragraph_extra->input_pextra_width,
- par->pextra_width.c_str());
- fl_set_input(fd_form_paragraph_extra->input_pextra_widthp,
- par->pextra_widthp.c_str());
- switch(par->pextra_alignment) {
- case LyXParagraph::MINIPAGE_ALIGN_TOP:
- fl_set_button(fd_form_paragraph_extra->radio_pextra_top, 1);
- break;
- case LyXParagraph::MINIPAGE_ALIGN_MIDDLE:
- fl_set_button(fd_form_paragraph_extra->radio_pextra_middle, 1);
- break;
- case LyXParagraph::MINIPAGE_ALIGN_BOTTOM:
- fl_set_button(fd_form_paragraph_extra->radio_pextra_bottom, 1);
- break;
- }
- fl_set_button(fd_form_paragraph_extra->radio_pextra_hfill,
- par->pextra_hfill);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_startmp,
- par->pextra_start_minipage);
- CheckInputWidth();
- if (par->pextra_type == LyXParagraph::PEXTRA_INDENT) {
- fl_set_button(fd_form_paragraph_extra->radio_pextra_indent, 1);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_minipage, 0);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_floatflt, 0);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- } else if (par->pextra_type == LyXParagraph::PEXTRA_MINIPAGE) {
- fl_set_button(fd_form_paragraph_extra->radio_pextra_indent, 0);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_minipage, 1);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_floatflt, 0);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- } else if (par->pextra_type == LyXParagraph::PEXTRA_FLOATFLT) {
- fl_set_button(fd_form_paragraph_extra->radio_pextra_indent, 0);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_minipage, 0);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_floatflt, 1);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- } else {
- fl_set_button(fd_form_paragraph_extra->radio_pextra_indent, 0);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_minipage, 0);
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- }
- if (par->pextra_type == LyXParagraph::PEXTRA_NONE)
- ActivateParagraphExtraButtons();
- }
- fl_hide_object(fd_form_paragraph_extra->text_warning);
-
- if (current_view->buffer()->isReadonly()) {
- DisableParagraphExtra();
- fl_set_object_label(fd_form_paragraph_extra->text_warning,
- _("Document is read-only. "
- "No changes to layout permitted."));
- fl_show_object(fd_form_paragraph_extra->text_warning);
- }
- if (!update && fd_form_paragraph_extra->form_paragraph_extra->visible) {
- fl_hide_form(fd_form_paragraph_extra->form_paragraph_extra);
- }
- return update;
-}
-
-
-void ParagraphExtraOpen(FL_OBJECT *, long)
-{
- if (UpdateParagraphExtra()) {
- if (fd_form_paragraph_extra->form_paragraph_extra->visible) {
- fl_raise_form(fd_form_paragraph_extra->form_paragraph_extra);
- } else {
- fl_show_form(fd_form_paragraph_extra->form_paragraph_extra,
- FL_PLACE_MOUSE, FL_FULLBORDER,
- _("ParagraphExtra Layout"));
- }
- }
-}
-
-
-void ParagraphExtraApplyCB(FL_OBJECT *, long)
-{
- if (current_view->available()) {
- FD_form_paragraph_extra const * fd = fd_form_paragraph_extra;
- char const * width = fl_get_input(fd->input_pextra_width);
- char const * widthp = fl_get_input(fd->input_pextra_widthp);
- LyXText * text = current_view->text;
- int type = LyXParagraph::PEXTRA_NONE;
- LyXParagraph::MINIPAGE_ALIGNMENT alignment =
- LyXParagraph::MINIPAGE_ALIGN_TOP;
- bool
- hfill = false,
- start_minipage = false;
-
- if (fl_get_button(fd_form_paragraph_extra->radio_pextra_indent)) {
- type = LyXParagraph::PEXTRA_INDENT;
- } else if (fl_get_button(fd_form_paragraph_extra->radio_pextra_minipage)) {
- type = LyXParagraph::PEXTRA_MINIPAGE;
- hfill = fl_get_button(fd_form_paragraph_extra->radio_pextra_hfill);
- start_minipage =
- fl_get_button(fd_form_paragraph_extra->radio_pextra_startmp);
- if (fl_get_button(fd_form_paragraph_extra->radio_pextra_top))
- alignment = LyXParagraph::MINIPAGE_ALIGN_TOP;
- else if (fl_get_button(fd_form_paragraph_extra->radio_pextra_middle))
- alignment = LyXParagraph::MINIPAGE_ALIGN_MIDDLE;
- else if (fl_get_button(fd_form_paragraph_extra->radio_pextra_bottom))
- alignment = LyXParagraph::MINIPAGE_ALIGN_BOTTOM;
- } else if (fl_get_button(fd_form_paragraph_extra->radio_pextra_floatflt)) {
- type = LyXParagraph::PEXTRA_FLOATFLT;
- }
- text->SetParagraphExtraOpt(current_view, type, width, widthp, alignment, hfill,
- start_minipage);
- current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
- current_view->owner()->getMiniBuffer()->
- Set(_("ParagraphExtra layout set"));
- }
- return;
-}
-
-
-void ParagraphExtraCancelCB(FL_OBJECT *, long)
-{
- fl_hide_form(fd_form_paragraph_extra->form_paragraph_extra);
-}
-
-
-void ParagraphExtraOKCB(FL_OBJECT * ob, long data)
-{
- ParagraphExtraCancelCB(ob, data);
- ParagraphExtraApplyCB(ob, data);
-}
-
-
-void CheckPExtraOptCB(FL_OBJECT * ob, long)
-{
- ActivateParagraphExtraButtons();
- CheckInputWidth();
- if (ob == fd_form_paragraph_extra->radio_pextra_indent) {
- int n = fl_get_button(fd_form_paragraph_extra->radio_pextra_indent);
- if (n) {
- fl_set_button(fd_form_paragraph_extra->radio_pextra_minipage, 0);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_floatflt, 0);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- } else {
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_widthp);
- ActivateParagraphExtraButtons();
- }
- } else if (ob == fd_form_paragraph_extra->radio_pextra_minipage) {
- int n = fl_get_button(fd_form_paragraph_extra->radio_pextra_minipage);
- if (n) {
- fl_set_button(fd_form_paragraph_extra->radio_pextra_indent, 0);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_floatflt, 0);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- } else {
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- ActivateParagraphExtraButtons();
- }
- } else if (ob == fd_form_paragraph_extra->radio_pextra_floatflt) {
- int n = fl_get_button(fd_form_paragraph_extra->radio_pextra_floatflt);
- if (n) {
- fl_set_button(fd_form_paragraph_extra->radio_pextra_indent, 0);
- fl_set_button(fd_form_paragraph_extra->radio_pextra_minipage, 0);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_activate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- } else {
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_top);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_middle);
- fl_deactivate_object(fd_form_paragraph_extra->radio_pextra_bottom);
- ActivateParagraphExtraButtons();
- }
- }
- return;
-}
-
-
-static
-bool CheckInputWidth()
-{
- string s1 = fl_get_input(fd_form_paragraph_extra->input_pextra_width);
- string s2 = fl_get_input(fd_form_paragraph_extra->input_pextra_widthp);
- if (s1.empty() && s2.empty()) {
- fl_activate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_widthp);
- fl_hide_object(fd_form_paragraph_extra->text_warning);
- DeactivateParagraphExtraButtons();
- return false;
- }
- if (!s1.empty()) { // LyXLength parameter
- fl_activate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_widthp);
- if (!isValidLength(s1)) {
- DeactivateParagraphExtraButtons();
- fl_set_object_label(fd_form_paragraph_extra->text_warning,
- _("Warning: Invalid Length (valid example: 10mm)"));
- fl_show_object(fd_form_paragraph_extra->text_warning);
- return false;
- }
- } else { // !s2.empty() % parameter
- fl_deactivate_object(fd_form_paragraph_extra->input_pextra_width);
- fl_activate_object(fd_form_paragraph_extra->input_pextra_widthp);
- if ((atoi(s2.c_str()) < 0 ) || (atoi(s2.c_str()) > 100)) {
- DeactivateParagraphExtraButtons();
- fl_set_object_label(fd_form_paragraph_extra->text_warning,
- _("Warning: Invalid percent value (0-100)"));
- fl_show_object(fd_form_paragraph_extra->text_warning);
- return false;
- }
- }
- fl_hide_object(fd_form_paragraph_extra->text_warning);
- return true;
-}
#ifdef ENABLE_ASSERTIONS
#include "support/LAssert.h"
+extern bool containsOnly(string const &, char const *);
#endif
+
/**
This struct contains (or should contain) all the parameters required for
printing a buffer. Some work still needs to be done on this struct and
*/
struct PrinterParams {
///
- enum Target{
+ enum Target {
///
PRINTER,
///
void testInvariant() const
{
#ifdef ENABLE_ASSERTIONS
- extern bool containsOnly(string const &, char const *);
if (!from_page.empty()) {
// Assert(from_page == number or empty)
Assert(containsOnly(from_page, "1234567890"));
};
#endif
-
-
-
// all these externs should eventually be removed.
extern BufferList bufferlist;
-#ifndef NEW_EXPORT
-extern void MenuExport(Buffer *, string const &);
-#endif
extern LyXAction lyxaction;
}
-bool Buffer::saveParamsAsDefaults()
+bool Buffer::saveParamsAsDefaults() // const
{
- string fname = AddName(AddPath(user_lyxdir, "templates/"),
+ string const fname = AddName(AddPath(user_lyxdir, "templates/"),
"defaults.lyx");
Buffer defaults = Buffer(fname);
// Returns false if "\the_end" is not read for formats >= 2.13. (Asger)
bool Buffer::readLyXformat2(LyXLex & lex, LyXParagraph * par)
{
- string tmptok;
int pos = 0;
char depth = 0; // signed or unsigned?
#ifndef NEW_INSETS
pretoken = lex.GetString();
}
- // Profiling show this should give a lot: (Asger)
- string const token = pretoken;
-
- if (token.empty())
- continue;
- the_end_read = parseSingleLyXformat2Token(lex, par, return_par,
- token, pos, depth,
- font
+ if (pretoken.empty()) continue;
+
+ the_end_read =
+ parseSingleLyXformat2Token(lex, par, return_par,
+ pretoken, pos, depth,
+ font
#ifndef NEW_INSETS
- , footnoteflag,
- footnotekind
+ , footnoteflag,
+ footnotekind
#endif
- );
+ );
}
if (!return_par)
}
pos = 0;
lex.EatLine();
- string layoutname = lex.GetString();
+ string const layoutname = lex.GetString();
pair<bool, LyXTextClass::LayoutList::size_type> pp
= textclasslist.NumberOfLayout(params.textclass,
layoutname);
// This is the compability reader, unfinished but tested.
// (Lgb)
lex.next();
- string tmptok = lex.GetString();
+ string const tmptok = lex.GetString();
//lyxerr << "old float: " << tmptok << endl;
Inset * inset = 0;
// This _is_ a hack! (Lgb)
while(true) {
lex.next();
- string tmp = lex.GetString();
+ string const tmp = lex.GetString();
if (tmp == "\\end_deeper") {
lyxerr << "\\end_deeper caught!" << endl;
if (!depth) {
params.pagestyle = strip(lex.GetString());
} else if (token == "\\bullet") {
lex.nextToken();
- int index = lex.GetInteger();
+ int const index = lex.GetInteger();
lex.nextToken();
int temp_int = lex.GetInteger();
params.user_defined_bullets[index].setFont(temp_int);
params.user_defined_bullets[index].setSize(temp_int);
params.temp_bullets[index].setSize(temp_int);
lex.nextToken();
- string temp_str = lex.GetString();
+ string const temp_str = lex.GetString();
if (temp_str != "\\end_bullet") {
// this element isn't really necessary for
// parsing but is easier for humans
}
} else if (token == "\\bulletLaTeX") {
lex.nextToken();
- int index = lex.GetInteger();
+ int const index = lex.GetInteger();
lex.next();
- string temp_str = lex.GetString(), sum_str;
+ string temp_str = lex.GetString();
+ string sum_str;
while (temp_str != "\\end_bullet") {
// this loop structure is needed when user
// enters an empty string since the first
params.tocdepth = lex.GetInteger();
} else if (token == "\\spacing") {
lex.next();
- string tmp = strip(lex.GetString());
+ string const tmp = strip(lex.GetString());
Spacing::Space tmp_space = Spacing::Default;
float tmp_val = 0.0;
if (tmp == "single") {
}
} else if (token == "\\paragraph_spacing") {
lex.next();
- string tmp = strip(lex.GetString());
+ string const tmp = strip(lex.GetString());
if (tmp == "single") {
par->spacing.set(Spacing::Single);
} else if (tmp == "onehalf") {
font.setLyXSize(lex.GetString());
} else if (token == "\\latex") {
lex.next();
- string tok = lex.GetString();
+ string const tok = lex.GetString();
// This is dirty, but gone with LyX3. (Asger)
if (tok == "no_latex")
font.setLatex(LyXFont::OFF);
"`$$Token'");
} else if (token == "\\lang") {
lex.next();
- string tok = lex.GetString();
+ string const tok = lex.GetString();
Languages::iterator lit = languages.find(tok);
if (lit != languages.end()) {
font.setLanguage(&(*lit).second);
font.setEmph(font.setLyXMisc(lex.GetString()));
} else if (token == "\\bar") {
lex.next();
- string tok = lex.GetString();
+ string const tok = lex.GetString();
// This is dirty, but gone with LyX3. (Asger)
if (tok == "under")
font.setUnderbar(LyXFont::ON);
}
lex.next();
- string tmptok = lex.GetString();
+ string const tmptok = lex.GetString();
last_inset_read = tmptok;
// test the different insets
if (tmptok == "Quotes") {
++pos;
} else if (tmptok == "Float") {
lex.next();
- string tmptok = lex.GetString();
+ string const tmptok = lex.GetString();
Inset * inset = new InsetFloat(tmptok);
inset->Read(this, lex);
par->InsertInset(pos, inset, font);
{
if (lex.IsOK()) {
lex.next();
- string token(lex.GetString());
+ string const token(lex.GetString());
if (token == "\\lyxformat") { // the first token _must_ be...
lex.EatLine();
format = lex.GetFloat();
} else {
// Saving failed, so backup is not backup
if (lyxrc.make_backup) {
- ::rename(s.c_str(), fileName().c_str());
+ lyx::rename(s, fileName());
}
return false;
}
void Buffer::writeFileAscii(string const & fname, int linelen)
{
- LyXFont font1, font2;
Inset * inset;
- char c, footnoteflag = 0, depth = 0;
+ char c;
+ char footnoteflag = 0;
+ char depth = 0;
string tmp;
LyXParagraph::size_type i;
int j;
return;
}
- string fname1 = TmpFileName();
+ string const fname1 = TmpFileName();
LyXParagraph * par = paragraph;
while (par) {
int noparbreak = 0;
} else if (tmp == "Enumerate") {
ltype = 2;
ltype_depth = depth+1;
- } else if (strstr(tmp.c_str(), "ection")) {
+ } else if (contains(tmp, "ection")) {
ltype = 3;
ltype_depth = depth+1;
- } else if (strstr(tmp.c_str(), "aragraph")) {
+ } else if (contains(tmp, "aragraph")) {
ltype = 4;
ltype_depth = depth+1;
} else if (tmp == "Description") {
#endif
}
- font1 = LyXFont(LyXFont::ALL_INHERIT, params.language_info);
+ LyXFont font1 =
+ LyXFont(LyXFont::ALL_INHERIT, params.language_info);
actcell = 0;
for (i = 0, actpos = 1; i < par->size(); ++i, ++actpos) {
if (!i && !footnoteflag && !noparbreak){
currlinelen += (ltype_depth-depth)*2;
}
}
- font2 = par->GetFontSettings(params, i);
+ LyXFont font2 = par->GetFontSettings(params, i);
if (font1.latex() != font2.latex()) {
if (font2.latex() == LyXFont::OFF)
islatex = 0;
}
if (params.inputenc == "auto") {
- string doc_encoding =
+ string const doc_encoding =
params.language_info->encoding()->LatexName();
// Create a list with all the input encodings used
Inset * inset = par->GetInset(0);
Inset::Code lyx_code = inset->LyxCode();
if (lyx_code == Inset::TOC_CODE){
- string temp = "toc";
+ string const temp = "toc";
sgmlOpenTag(ofs, depth, temp);
par = par->next;
}
// environment tag closing
- for( ; depth > par->depth; --depth) {
+ for (; depth > par->depth; --depth) {
sgmlCloseTag(ofs, depth, environment_stack[depth]);
environment_stack[depth].erase();
}
// write opening SGML tags
- switch(style.latextype) {
+ switch (style.latextype) {
case LATEX_PARAGRAPH:
if(depth == par->depth
&& !environment_stack[depth].empty()) {
case LATEX_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT:
- if(depth == par->depth
+ if (depth == par->depth
&& environment_stack[depth] != style.latexname()
&& !environment_stack[depth].empty()) {
}
if (environment_stack[depth] != style.latexname()) {
if(depth == 0) {
- string temp = "p";
+ string const temp = "p";
sgmlOpenTag(ofs, depth, temp);
}
environment_stack[depth] = style.latexname();
void Buffer::linuxDocHandleFootnote(ostream & os, LyXParagraph * & par,
int const depth)
{
- string tag = "footnote";
+ string const tag = "footnote";
while (par && par->footnoteflag != LyXParagraph::NO_FOOTNOTE) {
sgmlOpenTag(os, depth + 1, tag);
SOME_ENUM present = FOOTNOTE_LIKE;
while (par && par->footnoteflag != LyXParagraph::NO_FOOTNOTE) {
- if(last == present) {
- if(inner_span) {
- if(!tmp_par.empty()) {
+ if (last == present) {
+ if (inner_span) {
+ if (!tmp_par.empty()) {
os << tmp_par;
tmp_par.erase();
sgmlCloseTag(os, depth + 1, inner_tag);
}
} else {
os << tmp_par;
- if(!inner_tag.empty()) sgmlCloseTag(os, depth + 1,
+ if (!inner_tag.empty()) sgmlCloseTag(os, depth + 1,
inner_tag);
- if(!extra_par.empty()) os << extra_par;
- if(!tag.empty()) sgmlCloseTag(os, depth, tag);
+ if (!extra_par.empty()) os << extra_par;
+ if (!tag.empty()) sgmlCloseTag(os, depth, tag);
extra_par.erase();
switch (par->footnotekind) {
void Buffer::SimpleLinuxDocOnePar(ostream & os, LyXParagraph * par,
int desc_on, int const /*depth*/)
{
- LyXFont font1, font2;
+ LyXFont font1;
char c;
Inset * inset;
LyXParagraph::size_type main_body;
font1 = style.font;
}
- font2 = par->getFont(params, i);
+ LyXFont const font2 = par->getFont(params, i);
if (font1.family() != font2.family()) {
switch(family_type) {
tmps = style.latexparam();
c_params = split(tmps, c_depth,'|');
- cmd_depth= atoi(c_depth.c_str());
+ cmd_depth= lyx::atoi(c_depth);
if(command_flag) {
if(cmd_depth<command_base) {
}
-int Buffer::runLaTeX()
-{
-#ifndef NEW_EXPORT
-
- if (!users->text) return 0;
-
- ProhibitInput(users);
-
- // get LaTeX-Filename
- string name = getLatexName();
-
- string path = OnlyPath(filename);
-
- string org_path = path;
- if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
- path = tmppath;
- }
-
- Path p(path); // path to LaTeX file
- users->owner()->getMiniBuffer()->Set(_("Running LaTeX..."));
-
- // Remove all error insets
- bool a = users->removeAutoInsets();
-
- // Always generate the LaTeX file
- makeLaTeXFile(name, org_path, false);
-
- // do the LaTex run(s)
- TeXErrors terr;
- string latex_command = lyxrc.pdf_mode ?
- lyxrc.pdflatex_command : lyxrc.latex_command;
- LaTeX latex(latex_command, name, filepath);
- int res = latex.run(terr,
- users->owner()->getMiniBuffer()); // running latex
-
- // check return value from latex.run().
- if ((res & LaTeX::NO_LOGFILE)) {
- WriteAlert(_("LaTeX did not work!"),
- _("Missing log file:"), name);
- } else if ((res & LaTeX::ERRORS)) {
- users->owner()->getMiniBuffer()->Set(_("Done"));
- // Insert all errors as errors boxes
- users->insertErrors(terr);
-
- // Dvi should also be kept dirty if the latex run
- // ends up with errors. However it should be possible
- // to view a dirty dvi too.
- } else {
- //no errors or any other things to think about so:
- users->owner()->getMiniBuffer()->Set(_("Done"));
- }
-
- // if we removed error insets before we ran LaTeX or if we inserted
- // error insets after we ran LaTeX this must be run:
- if (a || (res & LaTeX::ERRORS)){
- users->redraw();
- users->fitCursor();
- //users->updateScrollbar();
- }
- AllowInput(users);
-
- return latex.getNumErrors();
-#else
- return 0;
-#endif
-}
-
-
int Buffer::runLiterate()
{
if (!users->text) return 0;
lyxrc.literate_command, lyxrc.literate_error_filter,
lyxrc.build_command, lyxrc.build_error_filter);
TeXErrors terr;
- int res = literate.build(terr, users->owner()->getMiniBuffer());
+ int const res = literate.build(terr, users->owner()->getMiniBuffer());
// check return value from literate.build().
if ((res & Literate::NO_LOGFILE)) {
ProhibitInput(users);
// get LaTeX-Filename
- string name = getLatexName();
+ string const name = getLatexName();
string path = OnlyPath(filename);
- string org_path = path;
+ string const org_path = path;
if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
path = tmppath;
}
users->owner()->getMiniBuffer()->Set(_("Running chktex..."));
// Remove all error insets
- bool removedErrorInsets = users->removeAutoInsets();
+ bool const removedErrorInsets = users->removeAutoInsets();
// Generate the LaTeX file if neccessary
makeLaTeXFile(name, org_path, false);
// so they are tested here
for (int i = 0; i < 4; ++i) {
if (params.user_defined_bullets[i] != ITEMIZE_DEFAULTS[i]) {
- int font = params.user_defined_bullets[i].getFont();
+ int const font = params.user_defined_bullets[i].getFont();
if (font == 0) {
- int c = params
+ int const c = params
.user_defined_bullets[i]
.getCharacter();
if (c == 16
|| c == 31) {
features.latexsym = true;
}
- }
- if (font == 1) {
+ } else if (font == 1) {
features.amssymb = true;
- }
- else if ((font >= 2 && font <= 5)) {
+ } else if ((font >= 2 && font <= 5)) {
features.pifont = true;
}
}
void Buffer::setPaperStuff()
{
params.papersize = BufferParams::PAPER_DEFAULT;
- char c1 = params.paperpackage;
+ char const c1 = params.paperpackage;
if (c1 == BufferParams::PACKAGE_NONE) {
- char c2 = params.papersize2;
+ char const c2 = params.papersize2;
if (c2 == BufferParams::VM_PAPER_USLETTER)
params.papersize = BufferParams::PAPER_USLETTER;
else if (c2 == BufferParams::VM_PAPER_USLEGAL)
vector<string> label_list;
for (inset_iterator it = inset_iterator_begin();
it != inset_iterator_end(); ++it) {
- vector<string> l = (*it)->getLabelList();
+ vector<string> const l = (*it)->getLabelList();
label_list.insert(label_list.end(), l.begin(), l.end());
}
return label_list;
}
} else if (!par->IsDummy()) {
#endif
- char labeltype = textclasslist.Style(params.textclass,
- par->GetLayout()).labeltype;
+ char const labeltype =
+ textclasslist.Style(params.textclass,
+ par->GetLayout()).labeltype;
if (labeltype >= LABEL_COUNTER_CHAPTER
&& labeltype <= LABEL_COUNTER_CHAPTER + params.tocdepth) {
static_cast<InsetBibtex*>(*it)->getKeys();
keys.insert(keys.end(), tmp.begin(), tmp.end());
} else if ((*it)->LyxCode() == Inset::INCLUDE_CODE) {
- vector<pair<string,string> > tmp =
+ vector<pair<string,string> > const tmp =
static_cast<InsetInclude*>(*it)->getKeys();
keys.insert(keys.end(), tmp.begin(), tmp.end());
}
dep_clean->master = name;
dep_clean->next = 0;
} else {
- DEPCLEAN* item = dep_clean;
+ DEPCLEAN * item = dep_clean;
while (item && item->master != name)
item = item->next;
if (item) {
bool Buffer::Dispatch(string const & command)
{
// Split command string into command and argument
- string cmd, line = frontStrip(command);
- string arg = strip(frontStrip(split(line, cmd, ' ')));
+ string cmd;
+ string line = frontStrip(command);
+ string const arg = strip(frontStrip(split(line, cmd, ' ')));
- return Dispatch(lyxaction.LookupFunc(cmd.c_str()), arg);
+ return Dispatch(lyxaction.LookupFunc(cmd), arg);
}
bool dispatched = true;
switch (action) {
case LFUN_EXPORT:
-#ifdef NEW_EXPORT
Exporter::Export(this, argument, false);
-#else
- MenuExport(this, argument);
-#endif
break;
default:
{
/// then remove all LyXText in text-insets
LyXParagraph * par = paragraph;
- for(;par;par = par->next) {
+ for(; par; par = par->next) {
par->resizeInsetsLyXText(bv);
}
}
bool Buffer::isMultiLingual()
{
-
LyXParagraph * par = paragraph;
while (par) {
if (par->isMultiLingual(params))
Buffer::inset_iterator::inset_iterator(LyXParagraph * paragraph,
LyXParagraph::size_type pos)
- : par(paragraph) {
+ : par(paragraph)
+{
it = par->InsetIterator(pos);
if (it == par->inset_iterator_end()) {
par = par->next;
}
-void Buffer::inset_iterator::SetParagraph() {
+void Buffer::inset_iterator::SetParagraph()
+{
while (par) {
it = par->inset_iterator_begin();
if (it != par->inset_iterator_end())
void latexParagraphs(std::ostream & os, LyXParagraph * par,
LyXParagraph * endpar, TexRow & texrow) const;
- ///
- int runLaTeX();
-
///
int runLiterate();
else
fname = MakeDisplayPath(buf->fileName(), 50);
bool reask = true;
- while(reask) {
+ while (reask) {
switch(AskConfirmation(_("Changes in document:"),
fname,
_("Save document?"))){
use_emergency = true;
} else {
// Here, we should delete the emergency save
- ::unlink(e.c_str());
+ lyx::unlink(e);
}
}
}
b->markDirty();
} else {
// Here, we should delete the autosave
- ::unlink(a.c_str());
+ lyx::unlink(a);
}
}
}
Buffer * BufferList::loadLyXFile(string const & filename, bool tolastfiles)
{
// make sure our path is absolute
- string s = MakeAbsPath(filename);
+ string const s = MakeAbsPath(filename);
// file already open?
if (exists(s)) {
else {
os << "\\bulletLaTeX " << i
<< "\n\t"
- << user_defined_bullets[i].getText().c_str()
+ << user_defined_bullets[i].getText()
<< "\n\\end_bullet\n";
}
}
#include "lyx_cb.h"
#include "layout_forms.h"
-extern FD_form_paragraph * fd_form_paragraph;
extern FD_form_character * fd_form_character;
#ifndef NEW_INSETS
/* set the cursor to the watch for all forms and the canvas */
XDefineCursor(fl_display, bv->owner()->getForm()->window,
cursor);
- if (fd_form_paragraph->form_paragraph->visible)
- XDefineCursor(fl_display,
- fd_form_paragraph->form_paragraph->window,
- cursor);
+
if (fd_form_character->form_character->visible)
XDefineCursor(fl_display,
fd_form_character->form_character->window,
/* reset the cursor from the watch for all forms and the canvas */
XUndefineCursor(fl_display, bv->owner()->getForm()->window);
- if (fd_form_paragraph->form_paragraph->visible)
- XUndefineCursor(fl_display,
- fd_form_paragraph->form_paragraph->window);
+
if (fd_form_character->form_character->visible)
XUndefineCursor(fl_display,
fd_form_character->form_character->window);
+++ /dev/null
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
-#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-
-/* Form definition file generated with fdesign. */
-
-#include FORMS_H_LOCATION
-#include <cstdlib>
-#include "bullet_forms.h"
-#include "bmtable.h"
-#include "support/filetools.h"
-
-FD_form_bullet *create_form_form_bullet(void)
-{
- FL_OBJECT *obj;
- FD_form_bullet *fdui = (FD_form_bullet *) fl_calloc(1, sizeof(FD_form_bullet));
-
- fdui->form_bullet = fl_bgn_form(FL_NO_BOX, 370, 390);
- fl_set_border_width(-1);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 370, 390, "");
-
- // make the border thick again to improve the bmtable looks
- fl_set_border_width(-3);
-
- fdui->bmtable_bullet_panel = obj = fl_add_bmtable(1, 90, 105, 265, 180, "");
- fl_set_object_callback(obj, BulletBMTableCB, 0);
- fl_set_object_lcol(obj, FL_BLUE);
- fl_set_object_boxtype(obj, FL_UP_BOX);
- fl_set_bmtable_pixmap_file(obj, 6, 6,
- LibFileSearch("images",
- "standard", "xpm").c_str());
-
- fl_set_border_width(-1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 95, 20, 255, 70, "");
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 0, 340, 370, 50, "");
- fdui->choice_bullet_size = obj = fl_add_choice(FL_NORMAL_CHOICE, 15, 45, 65, 30, idex(_("Size|#z")));fl_set_button_shortcut(obj, scex(_("Size|#z")), 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);
- fl_set_object_callback(obj, ChoiceBulletSizeCB, 0);
- fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 25, 350, 100, 30, _("OK"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, BulletOKCB, 0);
- fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 135, 350, 100, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, BulletApplyCB, 0);
- fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 245, 350, 100, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, BulletCancelCB, 0);
- fdui->input_bullet_latex = obj = fl_add_input(FL_NORMAL_INPUT, 80, 300, 275, 30, idex(_("LaTeX|#L")));fl_set_button_shortcut(obj, scex(_("LaTeX|#L")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lstyle(obj, FL_FIXED_STYLE);
- fl_set_input_return(obj, FL_RETURN_CHANGED);
- fl_set_input_maxchars(obj, 80);
- fl_set_object_callback(obj, InputBulletLaTeXCB, 0);
-
- fdui->radio_bullet_depth = fl_bgn_group();
- fdui->radio_bullet_depth_1 = obj = fl_add_button(FL_RADIO_BUTTON, 105, 35, 55, 40, idex(_("1|#1")));fl_set_button_shortcut(obj, scex(_("1|#1")), 1);
- fl_set_object_lsize(obj, FL_LARGE_SIZE);
- fl_set_object_callback(obj, BulletDepthCB, 0);
- fl_set_button(obj, 1);
- fdui->radio_bullet_depth_2 = obj = fl_add_button(FL_RADIO_BUTTON, 165, 35, 55, 40, idex(_("2|#2")));fl_set_button_shortcut(obj, scex(_("2|#2")), 1);
- fl_set_object_lsize(obj, FL_LARGE_SIZE);
- fl_set_object_callback(obj, BulletDepthCB, 1);
- fdui->radio_bullet_depth_3 = obj = fl_add_button(FL_RADIO_BUTTON, 225, 35, 55, 40, idex(_("3|#3")));fl_set_button_shortcut(obj, scex(_("3|#3")), 1);
- fl_set_object_lsize(obj, FL_LARGE_SIZE);
- fl_set_object_callback(obj, BulletDepthCB, 2);
- fdui->radio_bullet_depth_4 = obj = fl_add_button(FL_RADIO_BUTTON, 285, 35, 55, 40, idex(_("4|#4")));fl_set_button_shortcut(obj, scex(_("4|#4")), 1);
- fl_set_object_lsize(obj, FL_LARGE_SIZE);
- fl_set_object_callback(obj, BulletDepthCB, 3);
- fl_end_group();
-
- obj = fl_add_text(FL_NORMAL_TEXT, 105, 10, 85, 20, _("Bullet Depth"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
-
- fdui->radio_bullet_panel = fl_bgn_group();
- fdui->radio_bullet_panel_standard = obj = fl_add_button(FL_RADIO_BUTTON, 15, 105, 65, 30, idex(_("Standard|#S")));fl_set_button_shortcut(obj, scex(_("Standard|#S")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, BulletPanelCB, 0);
- fl_set_button(obj, 1);
- fdui->radio_bullet_panel_maths = obj = fl_add_button(FL_RADIO_BUTTON, 15, 135, 65, 30, idex(_("Maths|#M")));fl_set_button_shortcut(obj, scex(_("Maths|#M")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, BulletPanelCB, 1);
- fdui->radio_bullet_panel_ding2 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 195, 65, 30, idex(_("Ding 2|#i")));fl_set_button_shortcut(obj, scex(_("Ding 2|#i")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, BulletPanelCB, 3);
- fdui->radio_bullet_panel_ding3 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 225, 65, 30, idex(_("Ding 3|#n")));fl_set_button_shortcut(obj, scex(_("Ding 3|#n")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, BulletPanelCB, 4);
- fdui->radio_bullet_panel_ding4 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 255, 65, 30, idex(_("Ding 4|#g")));fl_set_button_shortcut(obj, scex(_("Ding 4|#g")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, BulletPanelCB, 5);
- fdui->radio_bullet_panel_ding1 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 165, 65, 30, idex(_("Ding 1|#D")));fl_set_button_shortcut(obj, scex(_("Ding 1|#D")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, BulletPanelCB, 2);
- fl_end_group();
-
- fl_end_form();
-
- //fdui->form_bullet->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
+++ /dev/null
-/** Header file generated with fdesign **/
-
-#ifndef FD_form_bullet_h_
-#define FD_form_bullet_h_
-
-/** Callbacks, globals and object handlers **/
-extern "C" void ChoiceBulletSizeCB(FL_OBJECT *, long);
-extern "C" void BulletOKCB(FL_OBJECT *, long);
-extern "C" void BulletApplyCB(FL_OBJECT *, long);
-extern "C" void BulletCancelCB(FL_OBJECT *, long);
-extern "C" void InputBulletLaTeXCB(FL_OBJECT *, long);
-extern "C" void BulletDepthCB(FL_OBJECT *, long);
-extern "C" void BulletPanelCB(FL_OBJECT *, long);
-extern "C" void BulletBMTableCB(FL_OBJECT *, long);
-
-
-/**** Additional routines ****/
-
-extern void bulletForm();
-extern bool updateBulletForm();
-
-/**** Forms and Objects ****/
-typedef struct {
- FL_FORM *form_bullet;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *bmtable_bullet_panel;
- FL_OBJECT *choice_bullet_size;
- FL_OBJECT *button_ok;
- FL_OBJECT *button_apply;
- FL_OBJECT *button_cancel;
- FL_OBJECT *input_bullet_latex;
- FL_OBJECT *radio_bullet_depth;
- FL_OBJECT *radio_bullet_depth_1;
- FL_OBJECT *radio_bullet_depth_2;
- FL_OBJECT *radio_bullet_depth_3;
- FL_OBJECT *radio_bullet_depth_4;
- FL_OBJECT *radio_bullet_panel;
- FL_OBJECT *radio_bullet_panel_standard;
- FL_OBJECT *radio_bullet_panel_maths;
- FL_OBJECT *radio_bullet_panel_ding2;
- FL_OBJECT *radio_bullet_panel_ding3;
- FL_OBJECT *radio_bullet_panel_ding4;
- FL_OBJECT *radio_bullet_panel_ding1;
-} FD_form_bullet;
-
-extern FD_form_bullet * create_form_form_bullet(void);
-
-#endif /* FD_form_bullet_h_ */
+++ /dev/null
-/* Bullet form callbacks */
-#include <config.h>
-#include <cstdlib>
-#include FORMS_H_LOCATION
-#include XPM_H_LOCATION
-#include "bullet_forms.h"
-#include "bmtable.h"
-#include "buffer.h"
-#include "bufferparams.h"
-#include "support/filetools.h"
-#include "gettext.h"
-#include "lyx_gui_misc.h" // CancelCloseBoxCB + WriteAlert
-
-extern BufferView * current_view;
-FD_form_bullet * fd_form_bullet;
-
-static int current_bullet_panel;
-static int current_bullet_depth;
-
-/** Creates or raises the bullet popup and sets appropriate form values
- */
-void bulletForm()
-{
- if (!fd_form_bullet) {
- if ((XpmVersion < 4
- || (XpmVersion == 4 && XpmRevision < 7))) {
- WriteAlert(_("Sorry, your libXpm is too old."),
- _("This feature requires xpm-4.7 (a.k.a 3.4g) or newer."),
- "");
- return;
- }
- fd_form_bullet = create_form_form_bullet();
- fl_addto_choice(fd_form_bullet->choice_bullet_size,
- _(" default | tiny | script | footnote | small |"
- " normal | large | Large | LARGE | huge | Huge"));
- fl_set_choice(fd_form_bullet->choice_bullet_size, 1);
- fl_set_form_atclose(fd_form_bullet->form_bullet,
- CancelCloseBoxCB, 0);
- }
-
- if (updateBulletForm()) {
- // Show form
- if (fd_form_bullet->form_bullet->visible) {
- fl_raise_form(fd_form_bullet->form_bullet);
- }
- else {
- fl_show_form(fd_form_bullet->form_bullet,
- FL_PLACE_MOUSE, FL_FULLBORDER,
- _("Itemize Bullet Selection"));
- }
- }
-}
-
-bool updateBulletForm()
-{
- bool update = true;
- if (!fd_form_bullet) {
- return false;
- }
- if (!current_view->available()) {
- update = false;
- } else if (current_view->buffer()->isReadonly()
- || current_view->buffer()->isLinuxDoc()) {
- fl_deactivate_object (fd_form_bullet->button_ok);
- fl_deactivate_object (fd_form_bullet->button_apply);
- fl_set_object_lcol (fd_form_bullet->button_ok, FL_INACTIVE);
- fl_set_object_lcol (fd_form_bullet->button_apply, FL_INACTIVE);
- fl_deactivate_object (fd_form_bullet->bmtable_bullet_panel);
- fl_deactivate_object (fd_form_bullet->choice_bullet_size);
- fl_deactivate_object (fd_form_bullet->input_bullet_latex);
- update = false;
- } else {
- fl_activate_object (fd_form_bullet->button_ok);
- fl_activate_object (fd_form_bullet->button_apply);
- fl_set_object_lcol (fd_form_bullet->button_ok, FL_BLACK);
- fl_set_object_lcol (fd_form_bullet->button_apply, FL_BLACK);
- fl_activate_object (fd_form_bullet->bmtable_bullet_panel);
- fl_activate_object (fd_form_bullet->choice_bullet_size);
- fl_activate_object (fd_form_bullet->input_bullet_latex);
- }
-
- if (update) {
- // any settings that need doing each time
- fl_set_button(fd_form_bullet->radio_bullet_depth_1, 1);
- fl_set_input(fd_form_bullet->input_bullet_latex,
- current_view->buffer()
- ->params.user_defined_bullets[0].getText().c_str());
- fl_set_choice(fd_form_bullet->choice_bullet_size,
- current_view->buffer()
- ->params.user_defined_bullets[0].getSize() + 2);
- } else {
- if (fd_form_bullet->form_bullet->visible) {
- fl_hide_form(fd_form_bullet->form_bullet);
- }
- }
- return update;
-}
-
-/*---------------------------------------*/
-/* callbacks for form form_bullet */
-
-void BulletOKCB(FL_OBJECT *ob, long data)
-{
- BulletApplyCB(ob, data);
- BulletCancelCB(ob, data);
-}
-
-
-void BulletApplyCB(FL_OBJECT * /*ob*/, long /*data*/ )
-{
- // update the bullet settings
- BufferParams & param = current_view->buffer()->params;
-
- // a little bit of loop unrolling
- param.user_defined_bullets[0] = param.temp_bullets[0];
- param.user_defined_bullets[1] = param.temp_bullets[1];
- param.user_defined_bullets[2] = param.temp_bullets[2];
- param.user_defined_bullets[3] = param.temp_bullets[3];
- current_view->buffer()->markDirty();
-}
-
-
-void BulletCancelCB(FL_OBJECT * /*ob*/, long /*data*/ )
-{
- fl_hide_form(fd_form_bullet->form_bullet);
- // this avoids confusion when reopening
- BufferParams & param = current_view->buffer()->params;
- param.temp_bullets[0] = param.user_defined_bullets[0];
- param.temp_bullets[1] = param.user_defined_bullets[1];
- param.temp_bullets[2] = param.user_defined_bullets[2];
- param.temp_bullets[3] = param.user_defined_bullets[3];
-}
-
-
-void InputBulletLaTeXCB(FL_OBJECT *, long)
-{
- // fill-in code for callback
- BufferParams & param = current_view->buffer()->params;
-
- param.temp_bullets[current_bullet_depth].setText(
- fl_get_input(fd_form_bullet->input_bullet_latex));
-}
-
-
-void ChoiceBulletSizeCB(FL_OBJECT * ob, long /*data*/ )
-{
- BufferParams & param = current_view->buffer()->params;
-
- // convert from 1-6 range to -1-4
- param.temp_bullets[current_bullet_depth].setSize(fl_get_choice(ob) - 2);
- fl_set_input(fd_form_bullet->input_bullet_latex,
- param.temp_bullets[current_bullet_depth].getText().c_str());
-}
-
-
-void BulletDepthCB(FL_OBJECT * ob, long data)
-{
- /* Should I do the following: */
- /* 1. change to the panel that the current bullet belongs in */
- /* 2. show that bullet as selected */
- /* 3. change the size setting to the size of the bullet in Q.*/
- /* 4. display the latex equivalent in the latex box */
- /* */
- /* I'm inclined to just go with 3 and 4 at the moment and */
- /* maybe try to support the others later */
- BufferParams & param = current_view->buffer()->params;
-
- switch (fl_get_button_numb(ob)) {
- case 3:
- // right mouse button resets to default
- param.temp_bullets[data] = ITEMIZE_DEFAULTS[data];
- default:
- current_bullet_depth = data;
- fl_set_input(fd_form_bullet->input_bullet_latex,
- param.temp_bullets[data].getText().c_str());
- fl_set_choice(fd_form_bullet->choice_bullet_size,
- param.temp_bullets[data].getSize() + 2);
- }
-}
-
-
-void BulletPanelCB(FL_OBJECT * /*ob*/, long data)
-{
- /* Here we have to change the background pixmap to that selected */
- /* by the user. (eg. standard.xpm, psnfss1.xpm etc...) */
-
- if (data != current_bullet_panel) {
- fl_freeze_form(fd_form_bullet->form_bullet);
- current_bullet_panel = data;
-
- /* free the current pixmap */
- fl_free_bmtable_pixmap(fd_form_bullet->bmtable_bullet_panel);
- string new_panel;
- switch (data) {
- /* display the new one */
- case 0 :
- new_panel = "standard";
- break;
- case 1 :
- new_panel = "amssymb";
- break;
- case 2 :
- new_panel = "psnfss1";
- break;
- case 3 :
- new_panel = "psnfss2";
- break;
- case 4 :
- new_panel = "psnfss3";
- break;
- case 5 :
- new_panel = "psnfss4";
- break;
- default :
- /* something very wrong happened */
- // play it safe for now but should be an exception
- current_bullet_panel = 0; // standard panel
- new_panel = "standard";
- break;
- }
- fl_set_bmtable_pixmap_file(fd_form_bullet->bmtable_bullet_panel,
- 6, 6,
- LibFileSearch("images", new_panel,
- "xpm").c_str());
- fl_redraw_object(fd_form_bullet->bmtable_bullet_panel);
- fl_unfreeze_form(fd_form_bullet->form_bullet);
- }
-}
-
-
-void BulletBMTableCB(FL_OBJECT *ob, long /*data*/ )
-{
- /* handle the user input by setting the current bullet depth's pixmap */
- /* to that extracted from the current chosen position of the BMTable */
- /* Don't forget to free the button's old pixmap first. */
-
- BufferParams & param = current_view->buffer()->params;
- int bmtable_button = fl_get_bmtable(ob);
-
- /* try to keep the button held down till another is pushed */
- /* fl_set_bmtable(ob, 1, bmtable_button); */
- param.temp_bullets[current_bullet_depth].setFont(current_bullet_panel);
- param.temp_bullets[current_bullet_depth].setCharacter(bmtable_button);
- fl_set_input(fd_form_bullet->input_bullet_latex,
- param.temp_bullets[current_bullet_depth].getText().c_str());
-}
#include "support/filetools.h"
#include "support/LRegex.h"
#include "support/LSubstring.h"
+#include "support/lyxlib.h"
#include "debug.h"
using std::ifstream;
// open definition file
lyxerr[Debug::KBMAP]
<< "Reading character set file " << fname << ".cdef" << endl;
- string filename = LibFileSearch("kbd", fname.c_str(), "cdef");
+ string filename = LibFileSearch("kbd", fname, "cdef");
ifstream ifs(filename.c_str());
if (!ifs) {
lyxerr << "Unable to open character set file" << endl;
while(getline(ifs, line)) {
if (reg.exact_match(line)) {
LRegex::SubMatches const & sub = reg.exec(line);
- n = atoi(line.substr(sub[1].first,
- sub[1].second).c_str());
+ n = lyx::atoi(line.substr(sub[1].first,
+ sub[1].second));
str = LSubstring(line, sub[2].first, sub[2].second);
if (lyxerr.debugging(Debug::KBMAP))
lyxerr << "Chardef: " << n
#include <iosfwd>
-//#define NEW_EXPORT 1
-
/** These are all the lyxfunctions (as enums).
Please add new functions at the end of the enum, right
before LFUN_LASTACTION.
LFUN_MENUWRITEAS,
LFUN_MENUPRINT,
LFUN_MENUSENDTO,
-#ifndef NEW_EXPORT
- LFUN_RUNLATEX,
-#endif
LFUN_BUILDPROG, // 10
LFUN_TOCVIEW,
LFUN_PREVIEW,
-#ifndef NEW_EXPORT
- LFUN_PREVIEWPS,
-#endif
LFUN_CLOSEBUFFER,
LFUN_BUFFER_PRINT, // ARRae 20000313
LFUN_PRINTER_PARAMS_GET, // ARRae 20000313
LFUN_LAYOUT_CHARACTER,
LFUN_LAYOUT_PARAGRAPH,
LFUN_LAYOUT_DOCUMENT,
- LFUN_LAYOUT_PAPER,
- LFUN_LAYOUT_TABLE,
- LFUN_LAYOUT_QUOTES,
LFUN_LAYOUT_PREAMBLE,
LFUN_LAYOUT_SAVE_DEFAULT,
LFUN_DROP_LAYOUTS_CHOICE, // 140
LFUN_BACKSPACE_SKIP, // 170
LFUN_DELETE_SKIP,
LFUN_MENUNEWTMPLT, // Asger 1997-02-02
-#ifndef NEW_EXPORT
- LFUN_RUNDVIPS, // Asger 1997-02-02
-#endif
LFUN_MENURELOAD, // Asger 1997-02-02
LFUN_FAX, // Asger 1997-02-10
LFUN_RECONFIGURE, // Asger 1997-02-14
LFUN_LDOTS, // Asger 970929
LFUN_END_OF_SENTENCE, // Asger 970929
LFUN_RUNCHKTEX, // Asger 971030
- LFUN_BUFFERBULLETSSELECT, // ARRae 971018
LFUN_TOGGLECURSORFOLLOW, // ARRae 971202
LFUN_HTMLURL, // CFO-G 971121
LFUN_URL, // CFO-G 971121
string to_format = GetExtension(to_file);
if (from_format == to_format)
if (from_file != to_file)
- return lyx::rename(from_file.c_str(), to_file.c_str());
+ return lyx::rename(from_file, to_file);
else
return true;
"$$BaseName", from_base);
string to = subst((*it).result_dir,
"$$BaseName", to_base);
- return lyx::rename(from.c_str(), to.c_str());
+ return lyx::rename(from, to);
}
} else if (outfile != to_file)
if ((*it).from == "tex" &&
( (*it).to == "dvi" || (*it).to == "pdf") )
- return lyx::copy(outfile.c_str(), to_file.c_str());
+ return lyx::copy(outfile, to_file);
else
- return lyx::rename(outfile.c_str(), to_file.c_str());
+ return lyx::rename(outfile, to_file);
return true;
}
void Counters::newCounter(string const & newc)
{
// First check if newc already exist
- CounterList::const_iterator cit = counterList.find(newc);
+ CounterList::iterator cit = counterList.find(newc);
// if alrady exist give warning and return
if (cit != counterList.end()) {
lyxerr << "The new counter already exist." << endl;
void Counters::newCounter(string const & newc, string const & oldc)
{
// First check if newc already exist
- CounterList::const_iterator cit = counterList.find(newc);
+ CounterList::iterator cit = counterList.find(newc);
// if already existant give warning and return
if (cit != counterList.end()) {
lyxerr << "The new counter already exist." << endl;
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
fl_end_form();
- //fdui->form_credits->fdui = fdui;
+ fdui->form_credits->fdui = fdui;
return fdui;
}
static
string const BufferExtension(Buffer const * buffer);
};
-
-#define NEW_EXPORT 1
-
#endif
#ifdef BROKEN_HEADERS
extern "C" int gettimeofday(struct timeval *, struct timezone *);
-#define remove(a) unlink(a)
#endif
#ifdef __GNUG__
void LyXFileDlg::Reread()
{
// Opens directory
- DIR * pDirectory = opendir(pszDirectory.c_str());
+ DIR * pDirectory = ::opendir(pszDirectory.c_str());
if (!pDirectory) {
WriteFSAlert(_("Warning! Couldn't open directory."),
pszDirectory);
pszDirectory = GetCWD();
- pDirectory = opendir(pszDirectory.c_str());
+ pDirectory = ::opendir(pszDirectory.c_str());
}
// Clear the present namelist
int lyxfont::signedWidth(string const & s, LyXFont const & f)
{
if (s.empty()) return 0;
- if (s.c_str()[0] == '-')
- return -width(s.c_str() + 1, s.length() - 1, f);
+ if (s[0] == '-')
+ return -width(s.substr(1, s.length() - 1), f);
else
- return width(s.c_str(), s.length(), f);
+ return width(s, f);
}
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
fdui->AcceptChset = obj = fl_add_button(FL_NORMAL_BUTTON, 210, 280, 170, 30, idex(_("Set Charset|#C")));fl_set_button_shortcut(obj, scex(_("Set Charset|#C")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fdui->ChsetErr = obj = fl_add_text(FL_NORMAL_TEXT, 210, 310, 170, 30, _("Charset not found!"));
- fl_set_object_lcol(obj, FL_RED);
+ fl_set_object_lcolor(obj, FL_RED);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
fl_set_object_lstyle(obj, FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
fdui->KeymapErr = obj = fl_add_text(FL_NORMAL_TEXT, 290, 60, 100, 90, _("Error:\n\nKeymap\nnot found"));
- fl_set_object_lcol(obj, FL_RED);
+ fl_set_object_lcolor(obj, FL_RED);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
fl_set_object_lstyle(obj, FL_BOLD_STYLE+FL_EMBOSSED_STYLE);
fl_set_object_lalign(obj, FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
fl_end_form();
- //fdui->KeyMap->fdui = fdui;
+ fdui->KeyMap->fdui = fdui;
return fdui;
}
fl_set_object_callback(obj, GraphicsCB, 70);
fl_end_form();
- //fdui->Figure->fdui = fdui;
+ fdui->Figure->fdui = fdui;
return fdui;
}
fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
fl_end_form();
- //fdui->FileDlg->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
-FD_form_table *create_form_form_table(void)
-{
- FL_OBJECT *obj;
- FD_form_table *fdui = (FD_form_table *) fl_calloc(1, sizeof(FD_form_table));
-
- fdui->form_table = fl_bgn_form(FL_NO_BOX, 310, 130);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 310, 130, "");
- fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 90, 90, 30, _("OK"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOKCB, 0);
- fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 90, 90, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableApplyCB, 0);
- fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 210, 90, 90, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableCancelCB, 0);
- fdui->slider_columns = obj = fl_add_valslider(FL_HOR_SLIDER, 80, 50, 220, 30, _("Columns"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->slider_rows = obj = fl_add_valslider(FL_HOR_SLIDER, 80, 10, 220, 30, _("Rows"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fl_end_form();
-
- //fdui->form_table->fdui = fdui;
+ fdui->FileDlg->fdui = fdui;
return fdui;
}
fl_set_object_callback(obj, SearchReplaceAllCB, 0);
fl_end_form();
- //fdui->form_search->fdui = fdui;
+ fdui->form_search->fdui = fdui;
return fdui;
}
extern "C" void GraphicsCB(FL_OBJECT *, long);
-extern "C" void TableOKCB(FL_OBJECT *, long);
-extern "C" void TableApplyCB(FL_OBJECT *, long);
-extern "C" void TableCancelCB(FL_OBJECT *, long);
-
extern "C" void SearchForwardCB(FL_OBJECT *, long);
extern "C" void SearchBackwardCB(FL_OBJECT *, long);
extern "C" void SearchReplaceCB(FL_OBJECT *, long);
} FD_FileDlg;
extern FD_FileDlg * create_form_FileDlg(void);
-typedef struct {
- FL_FORM *form_table;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *button_ok;
- FL_OBJECT *button_apply;
- FL_OBJECT *button_cancel;
- FL_OBJECT *slider_columns;
- FL_OBJECT *slider_rows;
-} FD_form_table;
-
-extern FD_form_table * create_form_form_table(void);
typedef struct {
FL_FORM *form_search;
void *vdata;
using std::endl;
extern LyXRC lyxrc;
-#ifndef NEW_EXPORT
-extern bool RunScript(Buffer * buffer, bool wait, string const & command,
- string const & orgname = string(), bool need_shell=true);
-#endif
#ifdef CXX_WORKING_NAMESPACES
namespace Liason
bool printBuffer(Buffer * buffer, PrinterParams const & pp)
{
-#ifndef NEW_EXPORT
- bool result(false);
-#endif
string command(lyxrc.print_command + ' ');
if (pp.target == PrinterParams::PRINTER
command += Converter::dvips_options(buffer) + ' ';
-#ifdef NEW_EXPORT
if (!Exporter::Export(buffer, "dvi", true))
return false;
break;
}
return res == 0;
-#else
- // Push directory path if necessary.
- // PS file should go where the source file is unless it's a
- // read-only directory in which case we write it to tmpdir.
- // All temporary files go in tmpdir (like spool files).
- string path = OnlyPath(buffer->fileName());
- if ((pp.target != PrinterParams::FILE
- && lyxrc.use_tempdir)
- || (IsDirWriteable(path) < 1)) {
- path = buffer->tmppath;
- }
- Path p(path);
-
- // there are three cases here:
- // 1. we print to a file
- // 2. we print direct to a printer
- // 3. we print using a spool command (print to file first)
- switch (pp.target) {
- case PrinterParams::PRINTER:
- if (!lyxrc.print_spool_command.empty()) {
- // case 3
- command += lyxrc.print_to_file
- + QuoteName(pp.file_name);
- string command2 = lyxrc.print_spool_command
- + ' ';
- if (!pp.printer_name.empty()) {
- command2 += lyxrc.print_spool_printerprefix
- + pp.printer_name;
- }
- // First run dvips.
- // If successful, then spool command
- if (result = RunScript(buffer, true, command)) {
- result = RunScript(buffer, false,
- command2,
- QuoteName(pp.file_name));
- }
- } else {
- // case 2
- result = RunScript(buffer, false, command);
- }
- break;
-
- case PrinterParams::FILE:
- // case 1
- command += lyxrc.print_to_file
- + QuoteName(MakeAbsPath(pp.file_name, path));
- result = RunScript(buffer, false, command);
- break;
- }
- return result;
-#endif
}
void setMinibuffer(LyXView * lv, char const * msg)
fl_end_form();
// "default" is not part of the languages array any more.
combo_language->addto("default");
- for(Languages::const_iterator cit = languages.begin();
+ for(Languages::iterator cit = languages.begin();
cit != languages.end(); ++cit) {
combo_language->addto((*cit).second.lang().c_str());
}
/** This class provides an XForms implementation of the FormError Dialog.
*/
-class FormError : public FormBase, public noncopyable {
+class FormError : public FormBase {
public:
/// Constructor
FormError(LyXView *, Dialogs *);
int string_width(string const & str)
{
return fl_get_string_widthTAB(FL_NORMAL_STYLE, MENU_LABEL_SIZE,
- str.c_str(), str.length());
+ str.c_str(), str.length());
}
//Defined later, used in set().
// What are we supposed to do with that??
int Toolbar::get_toolbar_func(string const & func)
{
- int action = lyxaction.LookupFunc(func.c_str());
+ int action = lyxaction.LookupFunc(func);
if (action == -1) {
if (func == "separator"){
action = TOOL_SEPARATOR;
*/
void edit();
/// add a new button to the toolbar.
- void add(int , bool doclean = true);
+ void add(int, bool doclean = true);
/// invokes the n'th icon in the toolbar
void push(int);
/// activates the toolbar
###*======================================================*/
###
###
-### Makefile by Lars Gullik Bjønnes (larsbj@ifi.uio.no)
+### Makefile by Lars Gullik Bjønnes (larsbj@lyx.org)
### Modified by Allan Rae <rae@lyx.org>
### Rewritten by Angus Leeming.
+### Only update files that really have changed. (Lgb 20000924))
SHELL = /bin/sh
.SUFFIXES: .fd .c
test: clean $(OBJS)
updatesrc: test
- mv *.C *.h ..
+ for fil in *.C *.h ; do \
+ cmp -s $$fil ../$$fil || mv $$fil .. \
+ done
.fd.C:
${SHELL} ./fdfix.sh $<
GraphicsCacheItem *
GraphicsCache::addFile(string const & filename)
{
- CacheType::const_iterator it = cache.find(filename);
+ CacheType::iterator it = cache.find(filename);
if (it != cache.end()) {
return new GraphicsCacheItem( *((*it).second) );
#include <map>
-#include <unistd.h> // unlink
-
#include FORMS_H_LOCATION
#ifdef __GNUG__
}
// remove the xpm file now.
- ::unlink(xpmfile.c_str());
+ lyx::unlink(xpmfile);
// and remove the reference to the filename.
xpmfile = string();
}
public:
/// Map from the LyX name of the template to the template structure
typedef std::map<string, ExternalTemplate> Templates;
-
+
static ExternalTemplateManager & get();
Templates & getTemplates();
Templates const & getTemplates() const;
if (lyxerr.debugging())
lyxerr << "Killing gs " << pid << endl;
lyx::kill(pid, sig);
- unlink(make_tmp(pid).c_str());
+ lyx::unlink(make_tmp(pid));
}
// now chdir into dir with .eps file, to be on the safe
// side
- ::chdir(OnlyPath(p->data->fname).c_str());
+ lyx::chdir(OnlyPath(p->data->fname));
// make temp file name
string tmpf = make_tmp(getpid());
if (lyxerr.debugging()) {
lyxerr.debug() << "Cmd: "
<< lyxrc.ps_command
<< " -sDEVICE=x11 "
- << tmpf.c_str() << ' '
+ << tmpf << ' '
<< p->data->fname << endl;
_exit(0); // no gs?
}
p->broken = false;
} else {
// remove temporary files
- unlink(make_tmp(p->gspid).c_str());
+ lyx::unlink(make_tmp(p->gspid));
p->gspid = -1;
p->broken = true;
}
buf = MakeAbsPath(p, buf2);
buf = OnlyPath(buf);
} else {
- buf = OnlyPath(owner->fileName().c_str());
+ buf = OnlyPath(owner->fileName());
}
// Does user clipart directory exist?
bool InsetBibtex::addDatabase(string const & db)
{
string contents(getContents());
- if (!contains(contents, db.c_str())) {
+ if (!contains(contents, db)) {
if (!contents.empty())
contents += ",";
setContents(contents + db);
bool InsetBibtex::delDatabase(string const & db)
{
- if (contains(getContents(), db.c_str())) {
+ if (contains(getContents(), db)) {
string bd = db;
int n = tokenPos(getContents(), ',', bd);
if (n > 0) {
// Weird code, would someone care to explain this?(Lgb)
string tmp(", ");
tmp += bd;
- setContents(subst(getContents(), tmp.c_str(), ", "));
+ setContents(subst(getContents(), tmp, ", "));
} else if (n == 0)
setContents(split(getContents(), bd, ','));
else
int InsetCollapsable::ascent_collapsed(Painter & pain, LyXFont const &) const
{
int width = 0, ascent = 0, descent = 0;
- pain.buttonText(0, 0, label.c_str(), labelfont, false,
+ pain.buttonText(0, 0, label, labelfont, false,
width, ascent, descent);
return ascent;
}
int InsetCollapsable::descent_collapsed(Painter & pain, LyXFont const &) const
{
int width = 0, ascent = 0, descent = 0;
- pain.buttonText(0, 0, label.c_str(), labelfont, false,
+ pain.buttonText(0, 0, label, labelfont, false,
width, ascent, descent);
return descent;
}
int InsetCollapsable::width_collapsed(Painter & pain, LyXFont const &) const
{
int width, ascent, descent;
- pain.buttonText(TEXT_TO_INSET_OFFSET, 0, label.c_str(), labelfont, false,
+ pain.buttonText(TEXT_TO_INSET_OFFSET, 0, label, labelfont, false,
width, ascent, descent);
return width + (2*TEXT_TO_INSET_OFFSET);
}
{
int width = 0;
pain.buttonText(int(x) + TEXT_TO_INSET_OFFSET,
- baseline, label.c_str(), labelfont, true, width);
+ baseline, label, labelfont, true, width);
x += width + TEXT_TO_INSET_OFFSET;
}
InsetExternal::~InsetExternal()
{
- remove(tempname.c_str());
+ lyx::unlink(tempname);
}
buf = MakeAbsPath(p, buf2);
buf = OnlyPath(buf);
} else {
- buf = OnlyPath(holder->view->buffer()->fileName().c_str());
+ buf = OnlyPath(holder->view->buffer()->fileName());
}
fileDlg.SetButton(0, _("Document"), buf);
// Handle the $$Contents(filename) syntax
if (contains(result, "$$Contents(\"")) {
- int pos = result.find("$$Contents(\"");
- int end = result.find("\")", pos);
- string file = result.substr(pos + 12, end - (pos + 12));
+ int const pos = result.find("$$Contents(\"");
+ int const end = result.find("\")", pos);
+ string const file = result.substr(pos + 12, end - (pos + 12));
string contents;
if (buffer) {
// Make sure we are in the directory of the buffer
- string buf = MakeAbsPath(buffer->fileName());
- string path = OnlyPath(buf);
+ string const buf = MakeAbsPath(buffer->fileName());
+ string const path = OnlyPath(buf);
Path p(path);
contents = GetFileContents(file);
} else {
ExternalTemplate const InsetExternal::getTemplate(string const & name) const
{
- ExternalTemplateManager::Templates::const_iterator i =
+ ExternalTemplateManager::Templates::iterator i =
ExternalTemplateManager::get().getTemplates().find(name);
// Make sure that the template exists in the map
if (i == ExternalTemplateManager::get().getTemplates().end()) {
font.setColor(LColor::footnote);
setLabelFont(font);
setAutoCollapse(false);
-// setInsetName("Float");
floatType = type;
- setInsetName(type.c_str());
+ setInsetName(type);
//floatPlacement = "H";
}
{
// Should browsing too be disabled in RO-mode?
LyXFileDlg fileDlg;
- string mpath = OnlyPath(inset->getMasterFilename());
+ string const mpath = OnlyPath(inset->getMasterFilename());
string ext;
if (fl_get_button(form->flag2)) // Use Input Button
fileDlg.SetButton(0, _("Documents"), lyxrc.document_path);
// Use by default the master's path
- string filename = fileDlg.Select(_("Select Child Document"),
- mpath, ext,
- inset->getContents());
+ string const filename =
+ fileDlg.Select(_("Select Child Document"),
+ mpath, ext,
+ inset->getContents());
XFlush(fl_get_display());
// check selected filename
if (!filename.empty()) {
- string filename2 = MakeRelPath(filename,
- mpath);
+ string const filename2 = MakeRelPath(filename,
+ mpath);
if (prefixIs(filename2, ".."))
fl_set_input(form->input,
filename.c_str());
static inline
string unique_id() {
- static unsigned int seed=1000;
+ static unsigned int seed = 1000;
std::ostringstream ost;
ost << "file" << ++seed;
// the readonly flag can/will be wrong, not anymore I think.
FileInfo finfo(getFileName());
- bool ro = !finfo.writable();
- return ( bufferlist.readFile(getFileName(), ro) != 0 );
+ bool const ro = !finfo.writable();
+ return bufferlist.readFile(getFileName(), ro) != 0;
}
int InsetInclude::Latex(Buffer const *, ostream & os,
bool /*fragile*/, bool /*fs*/) const
{
+ string incfile(getContents());
+
// Do nothing if no file name has been specified
- if (getContents().empty())
+ if (incfile.empty())
return 0;
- // Use += to force a copy of contents (JMarc)
- // How does that force anything? (Lgb)
- string incfile(getContents());
-
if (loadIfNeeded()) {
Buffer * tmp = bufferlist.getBuffer(getFileName());
int InsetInclude::Linuxdoc(Buffer const *, ostream & os) const
{
+ string incfile(getContents());
+
// Do nothing if no file name has been specified
- if (getContents().empty())
+ if (incfile.empty())
return 0;
- string incfile(getContents());
-
if (loadIfNeeded()) {
Buffer * tmp = bufferlist.getBuffer(getFileName());
int InsetInclude::DocBook(Buffer const *, ostream & os) const
{
+ string incfile(getContents());
+
// Do nothing if no file name has been specified
- if (getContents().empty())
+ if (incfile.empty())
return 0;
- string incfile(getContents());
-
if (loadIfNeeded()) {
Buffer * tmp = bufferlist.getBuffer(getFileName());
vector<string> const InsetInclude::getLabelList() const
{
- vector<string> l;
- string parentname;
+ vector<string> l;
- if (loadIfNeeded()) {
- Buffer * tmp = bufferlist.getBuffer(getFileName());
- tmp->setParentName("");
- l = tmp->getLabelList();
- tmp->setParentName(getMasterFilename());
- }
+ if (loadIfNeeded()) {
+ Buffer * tmp = bufferlist.getBuffer(getFileName());
+ tmp->setParentName("");
+ l = tmp->getLabelList();
+ tmp->setParentName(getMasterFilename());
+ }
- return l;
+ return l;
}
vector<pair<string,string> > keys;
if (loadIfNeeded()) {
- Buffer *tmp = bufferlist.getBuffer(getFileName());
+ Buffer * tmp = bufferlist.getBuffer(getFileName());
tmp->setParentName("");
- keys = tmp->getBibkeyList();
+ keys = tmp->getBibkeyList();
tmp->setParentName(getMasterFilename());
}
int nx;
float cx;
- UpdatableInset::draw(bv,font,baseline,x,cleared);
+ UpdatableInset::draw(bv, font, baseline, x, cleared);
if (!cleared && ((need_update == INIT) || (need_update == FULL) ||
(top_x != int(x)) || (top_baseline != baseline))) {
int h = ascent(bv, font) + descent(bv, font);
- int tx = display()||!owner()? 0:top_x;
- int w = tx? width(bv, font):pain.paperWidth();
+ int tx = display() || !owner() ? 0 : top_x;
+ int w = tx ? width(bv, font) : pain.paperWidth();
int ty = baseline - ascent(bv, font);
if (ty < 0)
bool dodraw;
x += ADD_TO_TABULAR_WIDTH;
if (cleared || (need_update == FULL) || (need_update == CELL)) {
- for(i=0;i<tabular->rows();++i) {
+ for(i = 0; i < tabular->rows(); ++i) {
nx = int(x);
- dodraw = ((baseline+tabular->GetDescentOfRow(i)) > 0) &&
- (baseline-tabular->GetAscentOfRow(i)) < pain.paperHeight();
- for(j=0;j<tabular->columns();++j) {
- if (tabular->IsPartOfMultiColumn(i,j))
+ dodraw = ((baseline + tabular->GetDescentOfRow(i)) > 0) &&
+ (baseline - tabular->GetAscentOfRow(i)) < pain.paperHeight();
+ for(j = 0; j < tabular->columns(); ++j) {
+ if (tabular->IsPartOfMultiColumn(i, j))
continue;
cx = nx + tabular->GetBeginningOfTextInCell(cell);
if (hasSelection())
if (need_update == CELL) {
// clear before the inset
pain.fillRectangle(
- nx+1,
- baseline - tabular->GetAscentOfRow(i)+1,
- cx - nx - 1,
+ nx + 1,
+ baseline - tabular->GetAscentOfRow(i) + 1,
+ int(cx - nx - 1),
tabular->GetAscentOfRow(i) +
tabular->GetDescentOfRow(i) - 1);
// clear behind the inset
pain.fillRectangle(
- cx + the_locking_inset->width(bv,font) + 1,
- baseline - tabular->GetAscentOfRow(i)+1,
+ int(cx + the_locking_inset->width(bv,font) + 1),
+ baseline - tabular->GetAscentOfRow(i) + 1,
tabular->GetWidthOfColumn(cell) -
tabular->GetBeginningOfTextInCell(cell) -
the_locking_inset->width(bv,font) - 1,
++cell;
}
baseline += tabular->GetDescentOfRow(i) +
- tabular->GetAscentOfRow(i+1)+
- tabular->GetAdditionalHeight(cell+1);
+ tabular->GetAscentOfRow(i + 1) +
+ tabular->GetAdditionalHeight(cell + 1);
}
}
x -= ADD_TO_TABULAR_WIDTH;
on_off = !tabular->TopLine(cell);
pain.line(x, baseline - tabular->GetAscentOfRow(row),
x2, baseline - tabular->GetAscentOfRow(row),
- on_off ? LColor::tabularonoffline:LColor::tabularline,
- on_off ? Painter::line_onoffdash:Painter::line_solid);
+ on_off ? LColor::tabularonoffline : LColor::tabularline,
+ on_off ? Painter::line_onoffdash : Painter::line_solid);
}
on_off = !tabular->BottomLine(cell);
pain.line(x,baseline + tabular->GetDescentOfRow(row),
x2, baseline + tabular->GetDescentOfRow(row),
- on_off ? LColor::tabularonoffline:LColor::tabularline,
- on_off ? Painter::line_onoffdash:Painter::line_solid);
+ on_off ? LColor::tabularonoffline : LColor::tabularline,
+ on_off ? Painter::line_onoffdash : Painter::line_solid);
if (!tabular->LeftAlreadyDrawed(cell)) {
on_off = !tabular->LeftLine(cell);
pain.line(x, baseline - tabular->GetAscentOfRow(row),
x, baseline + tabular->GetDescentOfRow(row),
- on_off ? LColor::tabularonoffline:LColor::tabularline,
- on_off ? Painter::line_onoffdash:Painter::line_solid);
+ on_off ? LColor::tabularonoffline : LColor::tabularline,
+ on_off ? Painter::line_onoffdash : Painter::line_solid);
}
on_off = !tabular->RightLine(cell);
pain.line(x2 - tabular->GetAdditionalWidth(cell),
baseline - tabular->GetAscentOfRow(row),
x2 - tabular->GetAdditionalWidth(cell),
baseline + tabular->GetDescentOfRow(row),
- on_off ? LColor::tabularonoffline:LColor::tabularline,
- on_off ? Painter::line_onoffdash:Painter::line_solid);
+ on_off ? LColor::tabularonoffline : LColor::tabularline,
+ on_off ? Painter::line_onoffdash : Painter::line_solid);
}
locked = false;
if (scroll() || hasSelection()) {
if (scroll()) {
- scroll(bv, (float)0.0);
+ scroll(bv, 0.0F);
} else {
sel_pos_start = sel_pos_end = 0;
sel_cell_start = sel_cell_end = 0;
bool mark_dirty) const
{
need_update = what;
+ // Dirty Cast! (Lgb)
bv->updateInset(const_cast<InsetTabular *>(this), mark_dirty);
if (locked && (what != NONE))
resetPos(bv);
return true;
}
if (the_locking_inset->UnlockInsetInInset(bv, inset, lr)) {
- if ((inset->LyxCode() == TABULAR_CODE) &&
+ if (inset->LyxCode() == TABULAR_CODE &&
!the_locking_inset->GetFirstLockingInsetOfType(TABULAR_CODE))
{
dialogs_ = bv->owner()->getDialogs();
- dialogs_->updateTabular(const_cast<InsetTabular *>(this));
+ dialogs_->updateTabular(this);
oldcell = actcell;
}
return true;
}
no_selection = false;
- int ocell = actcell;
- int orow = actrow;
+ int const ocell = actcell;
+ int const orow = actrow;
HideInsetCursor(bv);
setPos(bv, x, y);
sel_pos_start = sel_pos_end = cursor.pos();
sel_cell_start = sel_cell_end = actcell;
- bool inset_hit = InsetHit(bv, x, y);
+ bool const inset_hit = InsetHit(bv, x, y);
if ((ocell == actcell) && the_locking_inset && inset_hit) {
- the_locking_inset->InsetButtonPress(bv, x-inset_x, y-inset_y, button);
+ the_locking_inset->InsetButtonPress(bv,
+ x - inset_x, y - inset_y, button);
return;
} else if (the_locking_inset) {
the_locking_inset->InsetUnlock(bv);
the_locking_inset = 0;
if (inset_hit && bv->the_locking_inset) {
if (ActivateCellInset(bv, x, y, button))
- the_locking_inset->InsetButtonPress(bv, x-inset_x,
- y-inset_y, button);
+ the_locking_inset->InsetButtonPress(bv, x - inset_x,
+ y - inset_y, button);
return;
}
ShowInsetCursor(bv);
}
if (!no_selection) {
HideInsetCursor(bv);
- int old_pos = sel_pos_end;
- int old_cell = actcell;
+ int const old_pos = sel_pos_end;
+ int const old_cell = actcell;
setPos(bv, x, y);
sel_pos_end = cursor.pos();
break;
case LFUN_DOWNSEL:
{
- int ocell = actcell;
+ int const ocell = actcell;
moveDown(bv);
sel_pos_end = cursor.pos();
if ((ocell == sel_cell_end) ||
}
break;
case LFUN_DOWN:
- result= moveDown(bv);
+ result = moveDown(bv);
sel_pos_start = sel_pos_end = cursor.pos();
sel_cell_start = sel_cell_end = actcell;
if (hs)
break;
case LFUN_UPSEL:
{
- int ocell = actcell;
+ int const ocell = actcell;
moveUp(bv);
sel_pos_end = cursor.pos();
if ((ocell == sel_cell_end) ||
}
break;
case LFUN_UP:
- result= moveUp(bv);
+ result = moveUp(bv);
sel_pos_start = sel_pos_end = cursor.pos();
sel_cell_start = sel_cell_end = actcell;
if (hs)
if (hs)
UpdateLocal(bv, SELECTION, false);
break;
+#if 0
case LFUN_LAYOUT_TABLE:
{
dialogs_ = bv->owner()->getDialogs();
dialogs_->showTabular(this);
}
break;
+#else
+#warning Jürgen, have a look. Is this correct? (Lgb)
+ case LFUN_LAYOUT_TABULAR:
+ {
+ dialogs_ = bv->owner()->getDialogs();
+ dialogs_->showTabular(this);
+ }
+ break;
+#endif
case LFUN_TABULAR_FEATURE:
if (!TabularFeatures(bv, arg))
result = UNDISPATCHED;
LyXFont font; // = the_locking_inset->GetFont(par, cursor.pos);
- int asc = lyxfont::maxAscent(font);
- int desc = lyxfont::maxDescent(font);
+ int const asc = lyxfont::maxAscent(font);
+ int const desc = lyxfont::maxDescent(font);
if (cursor_visible)
bv->hideLockedInsetCursor();
if (!cursor_visible) {
LyXFont font; // = GetFont(par, cursor.pos);
- int asc = lyxfont::maxAscent(font);
- int desc = lyxfont::maxDescent(font);
+ int const asc = lyxfont::maxAscent(font);
+ int const desc = lyxfont::maxDescent(font);
bv->fitLockedInsetCursor(cursor.x(), cursor.y(), asc, desc);
bv->showLockedInsetCursor(cursor.x(), cursor.y(), asc, desc);
cursor_visible = true;
tabular->GetAdditionalWidth(actcell - 1));
cursor.pos(0);
resetPos(bv);
- if ((lx - (tabular->GetWidthOfColumn(actcell)/2)) < x) {
+ if ((lx - (tabular->GetWidthOfColumn(actcell) / 2)) < x) {
cursor.x(lx + top_x - 2);
cursor.pos(1);
} else {
int InsetTabular::getCellXPos(int cell) const
{
- int c;
+ int c = cell;
- for(c=cell;!tabular->IsFirstCellInRow(c);--c)
+ for(; !tabular->IsFirstCellInRow(c); --c)
;
int lx = tabular->GetWidthOfColumn(cell);
for(; (c < cell); ++c) {
int cell = 0;
actrow = 0;
cursor.y(0);
- for(; (cell<actcell) && !tabular->IsLastRow(cell); ++cell) {
+ for(; (cell < actcell) && !tabular->IsLastRow(cell); ++cell) {
if (tabular->IsLastCellInRow(cell)) {
cursor.y(cursor.y() + tabular->GetDescentOfRow(actrow) +
tabular->GetAscentOfRow(actrow + 1) +
++actrow;
}
}
- static int offset = ADD_TO_TABULAR_WIDTH + 2;
+ static int const offset = ADD_TO_TABULAR_WIDTH + 2;
cursor.x(getCellXPos(actcell) + offset);
if (((cursor.x() - offset) > 20) &&
((cursor.x()-offset+tabular->GetWidthOfColumn(actcell)) >
UpdatableInset::RESULT InsetTabular::moveUp(BufferView * bv)
{
- int ocell = actcell;
+ int const ocell = actcell;
actcell = tabular->GetCellAbove(actcell);
if (actcell == ocell) // we moved out of the inset
return FINISHED;
UpdatableInset::RESULT InsetTabular::moveDown(BufferView * bv)
{
- int ocell = actcell;
+ int const ocell = actcell;
actcell = tabular->GetCellBelow(actcell);
if (actcell == ocell) // we moved out of the inset
return FINISHED;
}
-bool InsetTabular::TabularFeatures(BufferView * bv, string what)
+bool InsetTabular::TabularFeatures(BufferView * bv, string const & what)
{
int action = LyXTabular::LAST_ACTION;
- string val;
- int i;
-
- for(i=0; tabularFeatures[i].action != LyXTabular::LAST_ACTION; ++i) {
- if (!strncmp(tabularFeatures[i].feature.c_str(), what.c_str(),
- tabularFeatures[i].feature.length())) {
+
+ int i = 0;
+ for(; tabularFeatures[i].action != LyXTabular::LAST_ACTION; ++i) {
+ string const tmp = tabularFeatures[i].feature;
+
+ if (tmp == what.substr(0, tmp.length())) {
+ //if (!strncmp(tabularFeatures[i].feature.c_str(), what.c_str(),
+ //tabularFeatures[i].feature.length())) {
action = tabularFeatures[i].action;
break;
}
if (action == LyXTabular::LAST_ACTION)
return false;
- val = frontStrip(what.substr(tabularFeatures[i].feature.length()));
+ string const val =
+ frontStrip(what.substr(tabularFeatures[i].feature.length()));
TabularFeatures(bv, action, val);
return true;
}
-void InsetTabular::TabularFeatures(BufferView * bv, int feature, string value)
+void InsetTabular::TabularFeatures(BufferView * bv, int feature,
+ string const & value)
{
int
i, j,
break;
}
if (hasSelection()) {
- int tmp;
sel_col_start = tabular->column_of_cell(sel_cell_start);
sel_col_end = tabular->column_of_cell(sel_cell_end);
if (sel_col_start > sel_col_end) {
sel_row_start = tabular->row_of_cell(sel_cell_start);
sel_row_end = tabular->row_of_cell(sel_cell_end);
if (sel_row_start > sel_row_end) {
- tmp = sel_row_start;
- sel_row_start = sel_row_end;
- sel_row_end = tmp;
+ //int tmp = sel_row_start;
+ //sel_row_start = sel_row_end;
+ //sel_row_end = tmp;
+ swap(sel_row_start, sel_row_end);
}
} else {
sel_col_start = sel_col_end = tabular->column_of_cell(actcell);
switch (feature) {
case LyXTabular::SET_PWIDTH:
{
- bool update = (tabular->GetColumnPWidth(actcell) != value);
+ bool const update = (tabular->GetColumnPWidth(actcell) != value);
tabular->SetColumnPWidth(actcell,value);
if (update) {
for (int i=0; i < tabular->rows(); ++i) {
break;
case LyXTabular::SET_MPWIDTH:
{
- bool update = (tabular->GetPWidth(actcell) != value);
+ bool const update = (tabular->GetPWidth(actcell) != value);
tabular->SetMColumnPWidth(actcell,value);
if (update) {
for (int i=0; i < tabular->rows(); ++i) {
}
// we have a selection so this means we just add all this
// cells to form a multicolumn cell
- int
- s_start, s_end;
+ int s_start;
+ int s_end;
if (sel_cell_start > sel_cell_end) {
s_start = sel_cell_end;
tabular->SetRotateCell(tabular->GetCellNumber(i,j),true);
break;
case LyXTabular::UNSET_ROTATE_CELL:
- for(i=sel_row_start; i<=sel_row_end; ++i)
- for(j=sel_col_start; j<=sel_col_end; ++j)
- tabular->SetRotateCell(tabular->GetCellNumber(i,j),false);
+ for(i = sel_row_start; i <= sel_row_end; ++i)
+ for(j = sel_col_start; j <= sel_col_end; ++j)
+ tabular->SetRotateCell(tabular->GetCellNumber(i, j), false);
break;
case LyXTabular::SET_USEBOX:
{
- LyXTabular::BoxType val = static_cast<LyXTabular::BoxType>
- (strToInt(value));
+ LyXTabular::BoxType val = LyXTabular::BoxType(strToInt(value));
if (val == tabular->GetUsebox(actcell))
val = LyXTabular::BOX_NONE;
- for(i=sel_row_start; i<=sel_row_end; ++i)
- for(j=sel_col_start; j<=sel_col_end; ++j)
- tabular->SetUsebox(tabular->GetCellNumber(i,j),val);
+ for(i = sel_row_start; i <= sel_row_end; ++i)
+ for(j = sel_col_start; j <= sel_col_end; ++j)
+ tabular->SetUsebox(tabular->GetCellNumber(i, j), val);
break;
}
case LyXTabular::SET_LTFIRSTHEAD:
- tabular->SetLTHead(actcell,true);
+ tabular->SetLTHead(actcell, true);
break;
case LyXTabular::SET_LTHEAD:
- tabular->SetLTHead(actcell,false);
+ tabular->SetLTHead(actcell, false);
break;
case LyXTabular::SET_LTFOOT:
- tabular->SetLTFoot(actcell,false);
+ tabular->SetLTFoot(actcell, false);
break;
case LyXTabular::SET_LTLASTFOOT:
- tabular->SetLTFoot(actcell,true);
+ tabular->SetLTFoot(actcell, true);
break;
case LyXTabular::SET_LTNEWPAGE:
what = !tabular->GetLTNewPage(actcell);
- tabular->SetLTNewPage(actcell,what);
+ tabular->SetLTNewPage(actcell, what);
break;
}
}
// in pixels if we have a pwidth for this cell.
int InsetTabular::GetMaxWidthOfCell(Painter &, int cell) const
{
- string s = tabular->GetPWidth(cell);
+ string const s = tabular->GetPWidth(cell);
if (s.empty())
return -1;
- return VSpace(s).inPixels( 0, 0);
+ return VSpace(s).inPixels(0, 0);
}
int InsetTabular::getMaxWidth(Painter & pain,
UpdatableInset const * inset) const
{
- int cell;
- int n = tabular->GetNumberOfCells();
- for(cell=0; cell < n; ++cell) {
+ int const n = tabular->GetNumberOfCells();
+ int cell = 0;
+ for(; cell < n; ++cell) {
if (tabular->GetCellInset(cell) == inset)
break;
}
need_update = FULL;
}
+
LyXText * InsetTabular::getLyXText(BufferView * bv) const
{
if (the_locking_inset)
// 2 ... toggled on
// 3 ... toggled off
//
-LyXFunc::func_status InsetTabular::getStatus(string what) const
+LyXFunc::func_status InsetTabular::getStatus(string const & what) const
{
int action = LyXTabular::LAST_ACTION;
- string argument;
- int i;
LyXFunc::func_status status = LyXFunc::OK;
- for(i=0; tabularFeatures[i].action != LyXTabular::LAST_ACTION; ++i) {
- if (!strncmp(tabularFeatures[i].feature.c_str(), what.c_str(),
- tabularFeatures[i].feature.length())) {
+ int i = 0;
+ for(; tabularFeatures[i].action != LyXTabular::LAST_ACTION; ++i) {
+ string const tmp = tabularFeatures[i].feature;
+ if (tmp == what.substr(0, tmp.length())) {
+ //if (!strncmp(tabularFeatures[i].feature.c_str(), what.c_str(),
+ // tabularFeatures[i].feature.length())) {
action = tabularFeatures[i].action;
break;
}
if (action == LyXTabular::LAST_ACTION)
return LyXFunc::Unknown;
- argument = frontStrip(what.substr(tabularFeatures[i].feature.length()));
+ string const argument = frontStrip(what.substr(tabularFeatures[i].feature.length()));
int sel_row_start, sel_row_end;
int dummy;
bool flag = true;
if (hasSelection()) {
- int tmp;
sel_row_start = tabular->row_of_cell(sel_cell_start);
sel_row_end = tabular->row_of_cell(sel_cell_end);
if (sel_row_start > sel_row_end) {
- tmp = sel_row_start;
- sel_row_start = sel_row_end;
- sel_row_end = tmp;
+ //int tmp = sel_row_start;
+ //sel_row_start = sel_row_end;
+ //sel_row_end = tmp;
+ swap(sel_row_start, sel_row_end);
}
} else {
sel_row_start = sel_row_end = tabular->row_of_cell(actcell);
sel_row_start = tabular->row_of_cell(sel_cell_start);
sel_row_end = tabular->row_of_cell(sel_cell_end);
if (sel_row_start > sel_row_end) {
- int tmp;
- tmp = sel_row_start;
- sel_row_start = sel_row_end;
- sel_row_end = tmp;
+ //int tmp tmp = sel_row_start;
+ //sel_row_start = sel_row_end;
+ //sel_row_end = tmp;
+ swap(sel_row_start, sel_row_end);
}
int rows = sel_row_end - sel_row_start + 1;
paste_tabular = new LyXTabular(this, rows, columns);
if (sel_cell_start > sel_cell_end) {
- int tmp = sel_cell_start;
- sel_cell_start = sel_cell_end;
- sel_cell_end = tmp;
+ //int tmp = sel_cell_start;
+ //sel_cell_start = sel_cell_end;
+ //sel_cell_end = tmp;
+ swap(sel_cell_start, sel_cell_end);
}
- for(int i=sel_cell_start, j=0; i <= sel_cell_end; ++i, ++j) {
+ for(int i = sel_cell_start, j = 0; i <= sel_cell_end; ++i, ++j) {
while(paste_tabular->row_of_cell(j) <
(tabular->row_of_cell(i)-sel_row_start)) {
++j;
sel_row_start = tabular->row_of_cell(sel_cell_start);
sel_row_end = tabular->row_of_cell(sel_cell_end);
if (sel_row_start > sel_row_end) {
- int tmp;
- tmp = sel_row_start;
- sel_row_start = sel_row_end;
- sel_row_end = tmp;
+ //int tmp = sel_row_start;
+ //sel_row_start = sel_row_end;
+ //sel_row_end = tmp;
+ swap(sel_row_start, sel_row_end);
}
if (sel_cell_start > sel_cell_end) {
- int tmp = sel_cell_start;
- sel_cell_start = sel_cell_end;
- sel_cell_end = tmp;
+ //int tmp = sel_cell_start;
+ //sel_cell_start = sel_cell_end;
+ //sel_cell_end = tmp;
+ swap(sel_cell_start, sel_cell_end);
}
- int i, j;
- for(i=sel_row_start; i <= sel_row_end; ++i) {
- for(j=sel_col_start; j <= sel_col_end; ++j) {
+ for(int i = sel_row_start; i <= sel_row_end; ++i) {
+ for(int j = sel_col_start; j <= sel_col_end; ++j) {
tabular->GetCellInset(tabular->GetCellNumber(i, j))->clear();
}
}
///
void ToggleInsetCursor(BufferView *);
///
- bool TabularFeatures(BufferView * bv, string what);
+ bool TabularFeatures(BufferView * bv, string const & what);
///
- void TabularFeatures(BufferView * bv, int feature, string val = string());
+ void TabularFeatures(BufferView * bv, int feature,
+ string const & val = string());
///
- int GetActCell() { return actcell; }
+ int GetActCell() const { return actcell; }
///
void SetFont(BufferView *, LyXFont const &, bool toggleall = false);
///
Buffer * BufferOwner() const { return buffer; }
///
LyXText * getLyXText(BufferView *) const;
+ ///
void resizeLyXText(BufferView *) const;
+ ///
void OpenLayoutDialog(BufferView *) const;
- LyXFunc::func_status getStatus(string argument) const;
+ ///
+ LyXFunc::func_status getStatus(string const & argument) const;
//
// Public structures and variables
private:
///
bool calculate_dimensions_of_cells(BufferView *, LyXFont const &,
- bool =false) const;
+ bool = false) const;
///
void DrawCellLines(Painter &, int x, int baseline,
int row, int cell) const;
///
void RemoveTabularRow();
///
- bool hasSelection() const {return ((sel_pos_start != sel_pos_end) ||
+ bool hasSelection() const { return ((sel_pos_start != sel_pos_end) ||
(sel_cell_start != sel_cell_end));}
///
bool ActivateCellInset(BufferView *, int x = 0, int y = 0, int button = 0,
};
///
- enum { TEXT_TO_INSET_OFFSET = 2 };
+ enum {
+ ///
+ TEXT_TO_INSET_OFFSET = 2
+ };
+ ///
enum EDITABLE {
- NOT_EDITABLE = 0,
- IS_EDITABLE,
- HIGHLY_EDITABLE
+ ///
+ NOT_EDITABLE = 0,
+ ///
+ IS_EDITABLE,
+ ///
+ HIGHLY_EDITABLE
};
///
///
virtual bool InsertInsetAllowed(Inset *) const { return false; }
///
- virtual void setInsetName(const char * s) { name = s; }
+ void setInsetName(string const & s) { name = s; }
///
- virtual string getInsetName() const { return name; }
+ string const getInsetName() const { return name; }
///
- virtual void setOwner(Inset * inset) { owner_ = inset; }
+ void setOwner(Inset * inset) { owner_ = inset; }
///
- virtual Inset * owner() const { return owner_; }
+ Inset * owner() const { return owner_; }
///
int x() const { return top_x; }
///
int y() const { return top_baseline; }
+ //
+ // because we could have fake text insets and have to call this
+ // inside them without cast!!!
///
- /// because we could have fake text insets and have to call this
- /// inside them without cast!!!
virtual LyXText * getLyXText(BufferView *) const;
- virtual void deleteLyXText(BufferView *, bool =true) const {}
+ ///
+ virtual void deleteLyXText(BufferView *, bool = true) const {}
+ ///
virtual void resizeLyXText(BufferView *) const {}
- // returns the actuall scroll-value
- int scroll() const { return scx; }
+ /// returns the actuall scroll-value
+ int scroll() const { return scx; }
protected:
///
{
if(s.empty()) return 1;
- int i = 0;
+ string::size_type i = 0;
unsigned int mod = 0, nmod = 0;
while (i < s.length()) {
if(s[i] && (s[i]) <= ' ') ++i;
}
} else {
string tbuf;
- int j = i;
+ string::size_type j = i;
for(; j < s.length() && s[j] > ' '; ++j)
tbuf += s[j]; // (!!!check bounds :-)
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
#include <cstdlib>
#include "layout_forms.h"
-FD_form_document *create_form_form_document(void)
-{
- FL_OBJECT *obj;
- FD_form_document *fdui = (FD_form_document *) fl_calloc(1, sizeof(FD_form_document));
-
- fdui->form_document = fl_bgn_form(FL_NO_BOX, 580, 430);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 580, 430, "");
- fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 290, 110, 120, 70, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- obj = fl_add_text(FL_NORMAL_TEXT, 300, 100, 100, 20, _("Separation"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
-
- fdui->group_radio_separation = fl_bgn_group();
- fdui->radio_indent = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 290, 120, 110, 30, idex(_("Indent|#I")));fl_set_button_shortcut(obj, scex(_("Indent|#I")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->radio_skip = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 290, 150, 110, 30, idex(_("Skip|#K")));fl_set_button_shortcut(obj, scex(_("Skip|#K")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_end_group();
-
- fdui->choice_class = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 20, 160, 30, idex(_("Class:|#C")));fl_set_button_shortcut(obj, scex(_("Class:|#C")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, ChoiceClassCB, 0);
- fdui->choice_pagestyle = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 60, 160, 30, idex(_("Pagestyle:|#P")));fl_set_button_shortcut(obj, scex(_("Pagestyle:|#P")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->choice_fonts = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 110, 160, 30, idex(_("Fonts:|#F")));fl_set_button_shortcut(obj, scex(_("Fonts:|#F")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->choice_fontsize = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 150, 160, 30, idex(_("Font Size:|#O")));fl_set_button_shortcut(obj, scex(_("Font Size:|#O")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 470, 390, 100, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, DocumentCancelCB, 0);
- fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 360, 390, 100, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, DocumentApplyCB, 0);
- fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 250, 390, 100, 30, _("OK"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, DocumentOKCB, 0);
- fdui->input_float_placement = obj = fl_add_input(FL_NORMAL_INPUT, 450, 195, 120, 30, idex(_("Float Placement:|#L")));fl_set_button_shortcut(obj, scex(_("Float Placement:|#L")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->choice_postscript_driver = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 230, 190, 30, idex(_("PS Driver:|#S")));fl_set_button_shortcut(obj, scex(_("PS Driver:|#S")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->choice_inputenc = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 270, 190, 30, idex(_("Encoding:|#D")));fl_set_button_shortcut(obj, scex(_("Encoding:|#D")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 290, 20, 122, 70, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 432, 20, 136, 70, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
-
- fdui->group_radio_sides = fl_bgn_group();
- fdui->radio_sides_one = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 290, 30, 120, 30, idex(_("One|#n")));fl_set_button_shortcut(obj, scex(_("One|#n")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->radio_sides_two = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 290, 60, 120, 30, idex(_("Two|#T")));fl_set_button_shortcut(obj, scex(_("Two|#T")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_end_group();
-
- obj = fl_add_text(FL_NORMAL_TEXT, 300, 10, 60, 20, _("Sides"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- obj = fl_add_text(FL_NORMAL_TEXT, 440, 10, 80, 20, _("Columns"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
-
- fdui->group_radio_columns = fl_bgn_group();
- fdui->radio_columns_one = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 432, 30, 110, 30, idex(_("One|#e")));fl_set_button_shortcut(obj, scex(_("One|#e")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->radio_columns_two = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 432, 60, 110, 30, idex(_("Two|#w")));fl_set_button_shortcut(obj, scex(_("Two|#w")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_end_group();
-
- fdui->input_extra = obj = fl_add_input(FL_NORMAL_INPUT, 450, 235, 120, 30, idex(_("Extra Options:|#X")));fl_set_button_shortcut(obj, scex(_("Extra Options:|#X")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->choice_language = obj = fl_add_box(FL_FRAME_BOX, 120, 190, 190, 30, _("Language:"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->input_default_skip = obj = fl_add_input(FL_NORMAL_INPUT, 220, 310, 90, 30, "");
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, DocumentDefskipCB, 0);
- fdui->choice_default_skip = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 310, 90, 30, idex(_("Default Skip:|#u")));fl_set_button_shortcut(obj, scex(_("Default Skip:|#u")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, DocumentDefskipCB, 0);
- fdui->slider_secnumdepth = obj = fl_add_counter(FL_SIMPLE_COUNTER, 490, 275, 80, 30, _("Section number depth"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->slider_tocdepth = obj = fl_add_counter(FL_SIMPLE_COUNTER, 490, 315, 80, 30, _("Table of contents depth"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->choice_spacing = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 350, 120, 30, idex(_("Spacing|#g")));fl_set_button_shortcut(obj, scex(_("Spacing|#g")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, DocumentSpacingCB, 0);
- fdui->button_bullets = obj = fl_add_button(FL_NORMAL_BUTTON, 430, 110, 130, 30, idex(_("Bullet Shapes|#B")));fl_set_button_shortcut(obj, scex(_("Bullet Shapes|#B")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, DocumentBulletsCB, 0);
- fdui->check_use_amsmath = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 430, 145, 120, 30, idex(_("Use AMS Math|#M")));fl_set_button_shortcut(obj, scex(_("Use AMS Math|#M")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fdui->input_spacing = obj = fl_add_input(FL_FLOAT_INPUT, 250, 350, 95, 30, "");
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, DocumentSpacingCB, 0);
- fl_end_form();
-
- //fdui->form_document->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
FD_form_character *create_form_form_character(void)
{
FL_OBJECT *obj;
fl_set_object_resize(obj, FL_RESIZE_X);
fl_end_form();
- //fdui->form_character->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
-FD_form_paragraph *create_form_form_paragraph(void)
-{
- FL_OBJECT *obj;
- FD_form_paragraph *fdui = (FD_form_paragraph *) fl_calloc(1, sizeof(FD_form_paragraph));
-
- fdui->form_paragraph = fl_bgn_form(FL_NO_BOX, 490, 290);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 490, 290, "");
- fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 127, 250, 100, 30, _("OK"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, ParagraphOKCB, 0);
- fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 244, 250, 100, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, ParagraphApplyCB, 0);
- fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 360, 250, 100, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, ParagraphCancelCB, 0);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 360, 110, 120, 50, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 110, 340, 90, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 360, 20, 120, 70, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 210, 20, 140, 70, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 20, 190, 70, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fdui->input_labelwidth = obj = fl_add_input(FL_NORMAL_INPUT, 100, 210, 360, 30, idex(_("Label Width:|#d")));fl_set_button_shortcut(obj, scex(_("Label Width:|#d")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_West, FL_East);
- fl_set_object_resize(obj, FL_RESIZE_X);
- obj = fl_add_text(FL_NORMAL_TEXT, 370, 100, 60, 20, _("Indent"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->check_lines_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 230, 30, 120, 30, idex(_("Above|#b")));fl_set_button_shortcut(obj, scex(_("Above|#b")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->check_lines_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 230, 60, 120, 30, idex(_("Below|#E")));fl_set_button_shortcut(obj, scex(_("Below|#E")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->check_pagebreaks_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 360, 30, 120, 30, idex(_("Above|#o")));fl_set_button_shortcut(obj, scex(_("Above|#o")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->check_pagebreaks_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 360, 60, 120, 30, idex(_("Below|#l")));fl_set_button_shortcut(obj, scex(_("Below|#l")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->check_noindent = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 360, 120, 120, 30, idex(_("No Indent|#I")));fl_set_button_shortcut(obj, scex(_("No Indent|#I")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-
- fdui->group_radio_alignment = fl_bgn_group();
- fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 30, 80, 30, idex(_("Right|#R")));fl_set_button_shortcut(obj, scex(_("Right|#R")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 60, 80, 30, idex(_("Left|#f")));fl_set_button_shortcut(obj, scex(_("Left|#f")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->radio_align_block = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 100, 30, 80, 30, idex(_("Block|#c")));fl_set_button_shortcut(obj, scex(_("Block|#c")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 100, 60, 80, 30, idex(_("Center|#n")));fl_set_button_shortcut(obj, scex(_("Center|#n")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_end_group();
-
- fdui->input_space_above = obj = fl_add_input(FL_NORMAL_INPUT, 180, 120, 90, 30, "");
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, ParagraphVSpaceCB, 0);
- fdui->input_space_below = obj = fl_add_input(FL_NORMAL_INPUT, 180, 160, 90, 30, "");
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, ParagraphVSpaceCB, 0);
- fdui->choice_space_above = obj = fl_add_choice(FL_NORMAL_CHOICE, 70, 120, 100, 30, idex(_("Above:|#v")));fl_set_button_shortcut(obj, scex(_("Above:|#v")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, ParagraphVSpaceCB, 0);
- fdui->choice_space_below = obj = fl_add_choice(FL_NORMAL_CHOICE, 70, 160, 100, 30, idex(_("Below:|#w")));fl_set_button_shortcut(obj, scex(_("Below:|#w")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, ParagraphVSpaceCB, 0);
- obj = fl_add_text(FL_NORMAL_TEXT, 370, 10, 100, 20, _("Pagebreaks"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- 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, 230, 10, 50, 20, _("Lines"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- 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, 20, 10, 80, 20, _("Alignment"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- 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, 20, 100, 130, 20, _("Vertical Spaces"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->button_pextra = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 250, 100, 30, idex(_("ExtraOpt|#X")));fl_set_button_shortcut(obj, scex(_("ExtraOpt|#X")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, ParagraphExtraOpen, 0);
- fdui->check_space_above = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 270, 120, 40, 30, idex(_("Keep|#K")));fl_set_button_shortcut(obj, scex(_("Keep|#K")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->check_space_below = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 270, 160, 40, 30, idex(_("Keep|#p")));fl_set_button_shortcut(obj, scex(_("Keep|#p")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_end_form();
-
- //fdui->form_paragraph->fdui = fdui;
+ fdui->form_character->fdui = fdui;
return fdui;
}
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
fl_end_form();
- //fdui->form_preamble->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
-FD_form_quotes *create_form_form_quotes(void)
-{
- FL_OBJECT *obj;
- FD_form_quotes *fdui = (FD_form_quotes *) fl_calloc(1, sizeof(FD_form_quotes));
-
- fdui->form_quotes = fl_bgn_form(FL_NO_BOX, 340, 130);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 340, 130, "");
- obj = fl_add_button(FL_RETURN_BUTTON, 10, 90, 100, 30, _("OK"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, QuotesOKCB, 0);
- obj = fl_add_button(FL_NORMAL_BUTTON, 120, 90, 100, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, QuotesApplyCB, 0);
- obj = fl_add_button(FL_NORMAL_BUTTON, 230, 90, 100, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, QuotesCancelCB, 0);
- fdui->choice_quotes_language = obj = fl_add_choice(FL_NORMAL_CHOICE, 90, 10, 160, 30, idex(_("Type:|#T")));fl_set_button_shortcut(obj, scex(_("Type:|#T")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-
- fdui->group_radio_quotes_number = fl_bgn_group();
- fdui->radio_single = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 90, 50, 80, 30, idex(_("Single|#S")));fl_set_button_shortcut(obj, scex(_("Single|#S")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->radio_double = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 170, 50, 80, 30, idex(_("Double|#D")));fl_set_button_shortcut(obj, scex(_("Double|#D")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_end_group();
-
- obj = fl_add_text(FL_NORMAL_TEXT, 290, 230, 10, 10, _("Text"));
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_end_form();
-
- //fdui->form_quotes->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
-FD_form_paper *create_form_form_paper(void)
-{
- FL_OBJECT *obj;
- FD_form_paper *fdui = (FD_form_paper *) fl_calloc(1, sizeof(FD_form_paper));
-
- fdui->form_paper = fl_bgn_form(FL_NO_BOX, 440, 430);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 440, 430, "");
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 230, 100, 200, 100, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- fdui->choice_paperpackage = obj = fl_add_choice(FL_NORMAL_CHOICE, 290, 20, 140, 30, idex(_("Special:|#S")));fl_set_button_shortcut(obj, scex(_("Special:|#S")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 230, 220, 200, 130, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 180, 190, 170, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- obj = fl_add_text(FL_NORMAL_TEXT, 20, 170, 70, 20, _("Margins"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- 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, 240, 210, 160, 20, _("Foot/Head Margins"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 320, 390, 100, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperCancelCB, 0);
- fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 210, 390, 100, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperApplyCB, 0);
- fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 100, 390, 100, 30, _("OK"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperOKCB, 0);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 440, 360, 10, 10, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 440, 350, 10, 10, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 100, 190, 70, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- obj = fl_add_text(FL_NORMAL_TEXT, 20, 90, 95, 20, _("Orientation"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
-
- fdui->greoup_radio_orientation = fl_bgn_group();
- fdui->radio_portrait = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 105, 120, 30, idex(_("Portrait|#o")));fl_set_button_shortcut(obj, scex(_("Portrait|#o")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->radio_landscape = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 135, 120, 30, idex(_("Landscape|#L")));fl_set_button_shortcut(obj, scex(_("Landscape|#L")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_end_group();
-
- fdui->choice_papersize2 = obj = fl_add_choice(FL_NORMAL_CHOICE, 70, 20, 160, 30, idex(_("Papersize:|#P")));fl_set_button_shortcut(obj, scex(_("Papersize:|#P")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- obj = fl_add_text(FL_NORMAL_TEXT, 240, 90, 150, 20, _("Custom Papersize"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->push_use_geometry = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 55, 170, 30, idex(_("Use Geometry Package|#U")));fl_set_button_shortcut(obj, scex(_("Use Geometry Package|#U")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->input_custom_width = obj = fl_add_input(FL_NORMAL_INPUT, 330, 115, 90, 30, idex(_("Width:|#W")));fl_set_button_shortcut(obj, scex(_("Width:|#W")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->input_custom_height = obj = fl_add_input(FL_NORMAL_INPUT, 330, 155, 90, 30, idex(_("Height:|#H")));fl_set_button_shortcut(obj, scex(_("Height:|#H")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->input_top_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 190, 90, 30, idex(_("Top:|#T")));fl_set_button_shortcut(obj, scex(_("Top:|#T")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->input_bottom_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 230, 90, 30, idex(_("Bottom:|#B")));fl_set_button_shortcut(obj, scex(_("Bottom:|#B")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->input_left_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 270, 90, 30, idex(_("Left:|#e")));fl_set_button_shortcut(obj, scex(_("Left:|#e")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->input_right_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 310, 90, 30, idex(_("Right:|#R")));fl_set_button_shortcut(obj, scex(_("Right:|#R")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->input_head_height = obj = fl_add_input(FL_NORMAL_INPUT, 330, 230, 90, 30, idex(_("Headheight:|#i")));fl_set_button_shortcut(obj, scex(_("Headheight:|#i")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->input_head_sep = obj = fl_add_input(FL_NORMAL_INPUT, 330, 270, 90, 30, idex(_("Headsep:|#d")));fl_set_button_shortcut(obj, scex(_("Headsep:|#d")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->input_foot_skip = obj = fl_add_input(FL_NORMAL_INPUT, 330, 310, 90, 30, idex(_("Footskip:|#F")));fl_set_button_shortcut(obj, scex(_("Footskip:|#F")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, PaperMarginsCB, 0);
- fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 10, 360, 420, 20, "");
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_end_form();
-
- //fdui->form_paper->fdui = fdui;
+ fdui->form_preamble->fdui = fdui;
return fdui;
}
/*---------------------------------------*/
-#if 0
-FD_form_table_options *create_form_form_table_options(void)
-{
- FL_OBJECT *obj;
- FD_form_table_options *fdui = (FD_form_table_options *) fl_calloc(1, sizeof(FD_form_table_options));
- fdui->form_table_options = fl_bgn_form(FL_NO_BOX, 540, 310);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 540, 310, "");
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 300, 120, 110, 60, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 300, 20, 110, 90, "");
- fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 20, 275, 330, 30, "");
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 430, 270, 100, 30, _("Close"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptCloseCB, 0);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 20, 20, 145, 105, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- obj = fl_add_text(FL_NORMAL_TEXT, 30, 10, 70, 20, _("Borders"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->radio_border_top = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 75, 45, 25, 25, idex(_("Top|#T")));fl_set_button_shortcut(obj, scex(_("Top|#T")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_border_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 75, 75, 25, 25, idex(_("Bottom|#B")));fl_set_button_shortcut(obj, scex(_("Bottom|#B")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_BOTTOM_LEFT);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_border_left = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 55, 60, 25, 25, idex(_("Left|#L")));fl_set_button_shortcut(obj, scex(_("Left|#L")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_border_right = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 95, 60, 25, 25, idex(_("Right|#R")));fl_set_button_shortcut(obj, scex(_("Right|#R")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 175, 20, 105, 105, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_text(FL_NORMAL_TEXT, 180, 10, 90, 20, _("Alignment"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- 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, 10, 100, 20, _("Special Cell"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->radio_multicolumn = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 30, 95, 25, idex(_("Multicolumn|#M")));fl_set_button_shortcut(obj, scex(_("Multicolumn|#M")), 1);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->button_append_column = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 170, 120, 30, idex(_("Append Column|#A")));fl_set_button_shortcut(obj, scex(_("Append Column|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->button_delete_column = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 170, 120, 30, idex(_("Delete Column|#O")));fl_set_button_shortcut(obj, scex(_("Delete Column|#O")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->button_append_row = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 200, 120, 30, idex(_("Append Row|#p")));fl_set_button_shortcut(obj, scex(_("Append Row|#p")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->button_delete_row = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 200, 120, 30, idex(_("Delete Row|#w")));fl_set_button_shortcut(obj, scex(_("Delete Row|#w")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->button_table_delete = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 240, 250, 30, idex(_("Delete Table|#D")));fl_set_button_shortcut(obj, scex(_("Delete Table|#D")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->input_table_column = obj = fl_add_input(FL_NORMAL_INPUT, 290, 240, 60, 30, _("Column"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- fdui->input_table_row = obj = fl_add_input(FL_NORMAL_INPUT, 360, 240, 60, 30, _("Row"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- fdui->button_set_borders = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 140, 120, 30, idex(_("Set Borders|#S")));fl_set_button_shortcut(obj, scex(_("Set Borders|#S")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->button_unset_borders = obj = fl_add_button(FL_NORMAL_BUTTON, 140, 140, 120, 30, idex(_("Unset Borders|#U")));fl_set_button_shortcut(obj, scex(_("Unset Borders|#U")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_longtable = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 130, 90, 25, _("Longtable"));
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->input_column_width = obj = fl_add_input(FL_NORMAL_INPUT, 330, 190, 95, 30, _("Width"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, SetPWidthCB, 0);
- fdui->radio_rotate_table = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 155, 90, 25, idex(_("Rotate 90°|#9")));fl_set_button_shortcut(obj, scex(_("Rotate 90°|#9")), 1);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_linebreak_cell = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 55, 95, 25, idex(_("Linebreaks|#N")));fl_set_button_shortcut(obj, scex(_("Linebreaks|#N")), 1);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- obj = fl_add_text(FL_NORMAL_TEXT, 300, 110, 100, 20, _("Spec. Table"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 420, 20, 100, 160, "");
- obj = fl_add_text(FL_NORMAL_TEXT, 425, 10, 85, 20, _("Longtable"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->radio_lt_firsthead = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 420, 30, 90, 25, _("First Head"));
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_lt_head = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 420, 60, 90, 25, _("Head"));
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_lt_foot = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 420, 90, 90, 25, _("Foot"));
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_lt_lastfoot = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 420, 120, 90, 25, _("Last Foot"));
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_lt_newpage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 420, 150, 90, 25, _("New Page"));
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_rotate_cell = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 300, 80, 95, 25, _("Rotate 90°"));
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->button_table_extra = obj = fl_add_button(FL_NORMAL_BUTTON, 430, 235, 100, 30, idex(_("Extra|#X")));fl_set_button_shortcut(obj, scex(_("Extra|#X")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_align_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 175, 30, 80, 25, idex(_("Left|#e")));fl_set_button_shortcut(obj, scex(_("Left|#e")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_align_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 175, 55, 80, 25, idex(_("Right|#i")));fl_set_button_shortcut(obj, scex(_("Right|#i")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fdui->radio_align_center = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 175, 80, 80, 25, idex(_("Center|#C")));fl_set_button_shortcut(obj, scex(_("Center|#C")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fl_end_form();
-
- //fdui->form_table_options->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-#endif
-
-FD_form_paragraph_extra *create_form_form_paragraph_extra(void)
-{
- FL_OBJECT *obj;
- FD_form_paragraph_extra *fdui = (FD_form_paragraph_extra *) fl_calloc(1, sizeof(FD_form_paragraph_extra));
-
- fdui->form_paragraph_extra = fl_bgn_form(FL_NO_BOX, 460, 250);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 460, 250, "");
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 20, 170, 100, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 350, 20, 100, 100, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 190, 20, 150, 100, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- obj = fl_add_text(FL_NORMAL_TEXT, 20, 10, 120, 20, _("Extra Options"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->input_pextra_width = obj = fl_add_input(FL_NORMAL_INPUT, 240, 30, 90, 30, idex(_("Length|#L")));fl_set_button_shortcut(obj, scex(_("Length|#L")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, CheckPExtraOptCB, 0);
- fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 130, 210, 100, 30, _("OK"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, ParagraphExtraOKCB, 0);
- fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 240, 210, 100, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, ParagraphExtraApplyCB, 0);
- fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 210, 100, 30, idex(_("Cancel|^[")));fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, ParagraphExtraCancelCB, 0);
- // xgettext:no-c-format
- fdui->input_pextra_widthp = obj = fl_add_input(FL_INT_INPUT, 240, 70, 90, 30, idex(_("or %|#o")));fl_set_button_shortcut(obj, scex(_("or %|#o")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, CheckPExtraOptCB, 0);
- obj = fl_add_text(FL_NORMAL_TEXT, 200, 10, 60, 20, _("Width"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- 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, 350, 10, 90, 20, _("Alignment"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
-
- fdui->group_alignment = fl_bgn_group();
- fdui->radio_pextra_top = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 360, 30, 80, 30, idex(_("Top|#T")));fl_set_button_shortcut(obj, scex(_("Top|#T")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, CheckPExtraOptCB, 0);
- fdui->radio_pextra_middle = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 360, 60, 80, 30, idex(_("Middle|#d")));fl_set_button_shortcut(obj, scex(_("Middle|#d")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, CheckPExtraOptCB, 0);
- fdui->radio_pextra_bottom = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 360, 90, 80, 30, idex(_("Bottom|#B")));fl_set_button_shortcut(obj, scex(_("Bottom|#B")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, CheckPExtraOptCB, 0);
- fl_end_group();
-
- fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 10, 170, 330, 30, "");
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fdui->radio_pextra_hfill = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 130, 300, 30, idex(_("HFill between Minipage paragraphs|#H")));fl_set_button_shortcut(obj, scex(_("HFill between Minipage paragraphs|#H")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fdui->radio_pextra_startmp = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 160, 260, 30, idex(_("Start new Minipage|#S")));fl_set_button_shortcut(obj, scex(_("Start new Minipage|#S")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-
- fdui->group_extraopt = fl_bgn_group();
- fdui->radio_pextra_indent = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 30, 160, 30, idex(_("Indented Paragraph|#I")));fl_set_button_shortcut(obj, scex(_("Indented Paragraph|#I")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, CheckPExtraOptCB, 0);
- fdui->radio_pextra_minipage = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 60, 160, 30, idex(_("Minipage|#M")));fl_set_button_shortcut(obj, scex(_("Minipage|#M")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, CheckPExtraOptCB, 0);
- fdui->radio_pextra_floatflt = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 10, 90, 160, 30, idex(_("Floatflt|#F")));fl_set_button_shortcut(obj, scex(_("Floatflt|#F")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, CheckPExtraOptCB, 0);
- fl_end_group();
-
- fl_end_form();
-
- //fdui->form_paragraph_extra->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-#if 0
-FD_form_table_extra *create_form_form_table_extra(void)
-{
- FL_OBJECT *obj;
- FD_form_table_extra *fdui = (FD_form_table_extra *) fl_calloc(1, sizeof(FD_form_table_extra));
-
- fdui->form_table_extra = fl_bgn_form(FL_NO_BOX, 330, 200);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 330, 200, "");
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 15, 95, 305, 60, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_X);
- obj = fl_add_text(FL_NORMAL_TEXT, 20, 85, 205, 20, _("Special Multicolumn Alignment"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_X);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 15, 20, 305, 60, "");
- fl_set_object_color(obj, FL_COL1, FL_COL1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->input_special_alignment = obj = fl_add_input(FL_NORMAL_INPUT, 25, 35, 280, 30, "");
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- obj = fl_add_button(FL_RETURN_BUTTON, 220, 160, 100, 30, _("Close"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, TableSpeCloseCB, 0);
- obj = fl_add_text(FL_NORMAL_TEXT, 20, 10, 170, 20, _("Special Column Alignment"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->input_special_multialign = obj = fl_add_input(FL_NORMAL_INPUT, 25, 110, 280, 30, "");
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fl_set_object_callback(obj, TableOptionsCB, 0);
- fl_end_form();
-
- //fdui->form_table_extra->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-#endif
/** Header file generated with fdesign **/
-#ifndef FD_form_document_h_
-#define FD_form_document_h_
-
-extern "C" {
+#ifndef FD_form_character_h_
+#define FD_form_character_h_
/** Callbacks, globals and object handlers **/
-extern "C" void ChoiceClassCB(FL_OBJECT *, long);
-extern "C" void DocumentCancelCB(FL_OBJECT *, long);
-extern "C" void DocumentApplyCB(FL_OBJECT *, long);
-extern "C" void DocumentOKCB(FL_OBJECT *, long);
-extern "C" void DocumentDefskipCB(FL_OBJECT *, long);
-extern "C" void DocumentSpacingCB(FL_OBJECT *, long);
-extern "C" void DocumentBulletsCB(FL_OBJECT *, long);
-
extern "C" void CharacterApplyCB(FL_OBJECT *, long);
extern "C" void CharacterCloseCB(FL_OBJECT *, long);
-extern "C" void ParagraphOKCB(FL_OBJECT *, long);
-extern "C" void ParagraphApplyCB(FL_OBJECT *, long);
-extern "C" void ParagraphCancelCB(FL_OBJECT *, long);
-extern "C" void ParagraphVSpaceCB(FL_OBJECT *, long);
-extern "C" void ParagraphExtraOpen(FL_OBJECT *, long);
-
extern "C" void PreambleOKCB(FL_OBJECT *, long);
extern "C" void PreambleApplyCB(FL_OBJECT *, long);
extern "C" void PreambleCancelCB(FL_OBJECT *, long);
-extern "C" void QuotesOKCB(FL_OBJECT *, long);
-extern "C" void QuotesApplyCB(FL_OBJECT *, long);
-extern "C" void QuotesCancelCB(FL_OBJECT *, long);
-
-extern "C" void PaperMarginsCB(FL_OBJECT *, long);
-extern "C" void PaperCancelCB(FL_OBJECT *, long);
-extern "C" void PaperApplyCB(FL_OBJECT *, long);
-extern "C" void PaperOKCB(FL_OBJECT *, long);
-
-#if 0
-extern "C" void TableOptCloseCB(FL_OBJECT *, long);
-extern "C" void TableOptionsCB(FL_OBJECT *, long);
-extern "C" void SetPWidthCB(FL_OBJECT *, long);
-#endif
-
-extern "C" void CheckPExtraOptCB(FL_OBJECT *, long);
-extern "C" void ParagraphExtraOKCB(FL_OBJECT *, long);
-extern "C" void ParagraphExtraApplyCB(FL_OBJECT *, long);
-extern "C" void ParagraphExtraCancelCB(FL_OBJECT *, long);
-
-#if 0
-extern "C" void TableOptionsCB(FL_OBJECT *, long);
-extern "C" void TableSpeCloseCB(FL_OBJECT *, long);
-#endif
-
-}
+/* Some extra funcs */
-/* Additional Functions/Methods */
-
-#include "bufferparams.h"
-
-extern bool UpdateLayoutDocument(BufferParams *params = NULL);
extern bool UpdateLayoutPreamble();
-extern bool UpdateLayoutPaper();
-extern bool UpdateLayoutQuotes();
-extern bool UpdateLayoutParagraph();
-extern bool UpdateParagraphExtra();
-#if 0
-extern bool UpdateLayoutTable(int);
-#endif
-
-extern void MenuLayoutCharacter();
-extern void MenuLayoutDocument();
-extern void MenuLayoutPreamble();
-extern void MenuLayoutPaper();
-extern void MenuLayoutQuotes();
-extern void MenuLayoutParagraph();
-#if 0
-extern void MenuLayoutTable(int);
-#endif
-
-extern "C" {
/**** Forms and Objects ****/
-typedef struct {
- FL_FORM *form_document;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *group_radio_separation;
- FL_OBJECT *radio_indent;
- FL_OBJECT *radio_skip;
- FL_OBJECT *choice_class;
- FL_OBJECT *choice_pagestyle;
- FL_OBJECT *choice_fonts;
- FL_OBJECT *choice_fontsize;
- FL_OBJECT *button_cancel;
- FL_OBJECT *button_apply;
- FL_OBJECT *button_ok;
- FL_OBJECT *input_float_placement;
- FL_OBJECT *choice_postscript_driver;
- FL_OBJECT *choice_inputenc;
- FL_OBJECT *group_radio_sides;
- FL_OBJECT *radio_sides_one;
- FL_OBJECT *radio_sides_two;
- FL_OBJECT *group_radio_columns;
- FL_OBJECT *radio_columns_one;
- FL_OBJECT *radio_columns_two;
- FL_OBJECT *input_extra;
- FL_OBJECT *choice_language;
- FL_OBJECT *input_default_skip;
- FL_OBJECT *choice_default_skip;
- FL_OBJECT *slider_secnumdepth;
- FL_OBJECT *slider_tocdepth;
- FL_OBJECT *choice_spacing;
- FL_OBJECT *button_bullets;
- FL_OBJECT *check_use_amsmath;
- FL_OBJECT *input_spacing;
-} FD_form_document;
-
-extern FD_form_document * create_form_form_document(void);
typedef struct {
FL_FORM *form_character;
void *vdata;
} FD_form_character;
extern FD_form_character * create_form_form_character(void);
-typedef struct {
- FL_FORM *form_paragraph;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *button_ok;
- FL_OBJECT *button_apply;
- FL_OBJECT *button_cancel;
- FL_OBJECT *input_labelwidth;
- FL_OBJECT *check_lines_top;
- FL_OBJECT *check_lines_bottom;
- FL_OBJECT *check_pagebreaks_top;
- FL_OBJECT *check_pagebreaks_bottom;
- FL_OBJECT *check_noindent;
- FL_OBJECT *group_radio_alignment;
- FL_OBJECT *radio_align_right;
- FL_OBJECT *radio_align_left;
- FL_OBJECT *radio_align_block;
- FL_OBJECT *radio_align_center;
- FL_OBJECT *input_space_above;
- FL_OBJECT *input_space_below;
- FL_OBJECT *choice_space_above;
- FL_OBJECT *choice_space_below;
- FL_OBJECT *button_pextra;
- FL_OBJECT *check_space_above;
- FL_OBJECT *check_space_below;
-} FD_form_paragraph;
-
-extern FD_form_paragraph * create_form_form_paragraph(void);
typedef struct {
FL_FORM *form_preamble;
void *vdata;
} FD_form_preamble;
extern FD_form_preamble * create_form_form_preamble(void);
-typedef struct {
- FL_FORM *form_quotes;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *choice_quotes_language;
- FL_OBJECT *group_radio_quotes_number;
- FL_OBJECT *radio_single;
- FL_OBJECT *radio_double;
-} FD_form_quotes;
-
-extern FD_form_quotes * create_form_form_quotes(void);
-typedef struct {
- FL_FORM *form_paper;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *choice_paperpackage;
- FL_OBJECT *button_cancel;
- FL_OBJECT *button_apply;
- FL_OBJECT *button_ok;
- FL_OBJECT *greoup_radio_orientation;
- FL_OBJECT *radio_portrait;
- FL_OBJECT *radio_landscape;
- FL_OBJECT *choice_papersize2;
- FL_OBJECT *push_use_geometry;
- FL_OBJECT *input_custom_width;
- FL_OBJECT *input_custom_height;
- FL_OBJECT *input_top_margin;
- FL_OBJECT *input_bottom_margin;
- FL_OBJECT *input_left_margin;
- FL_OBJECT *input_right_margin;
- FL_OBJECT *input_head_height;
- FL_OBJECT *input_head_sep;
- FL_OBJECT *input_foot_skip;
- FL_OBJECT *text_warning;
-} FD_form_paper;
-
-extern FD_form_paper * create_form_form_paper(void);
-typedef struct {
- FL_FORM *form_table_options;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *text_warning;
- FL_OBJECT *button_close;
- FL_OBJECT *radio_border_top;
- FL_OBJECT *radio_border_bottom;
- FL_OBJECT *radio_border_left;
- FL_OBJECT *radio_border_right;
- FL_OBJECT *radio_multicolumn;
- FL_OBJECT *button_append_column;
- FL_OBJECT *button_delete_column;
- FL_OBJECT *button_append_row;
- FL_OBJECT *button_delete_row;
- FL_OBJECT *button_table_delete;
- FL_OBJECT *input_table_column;
- FL_OBJECT *input_table_row;
- FL_OBJECT *button_set_borders;
- FL_OBJECT *button_unset_borders;
- FL_OBJECT *radio_longtable;
- FL_OBJECT *input_column_width;
- FL_OBJECT *radio_rotate_table;
- FL_OBJECT *radio_linebreak_cell;
- FL_OBJECT *radio_lt_firsthead;
- FL_OBJECT *radio_lt_head;
- FL_OBJECT *radio_lt_foot;
- FL_OBJECT *radio_lt_lastfoot;
- FL_OBJECT *radio_lt_newpage;
- FL_OBJECT *radio_rotate_cell;
- FL_OBJECT *button_table_extra;
- FL_OBJECT *radio_align_left;
- FL_OBJECT *radio_align_right;
- FL_OBJECT *radio_align_center;
-} FD_form_table_options;
-
-extern FD_form_table_options * create_form_form_table_options(void);
-typedef struct {
- FL_FORM *form_paragraph_extra;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *input_pextra_width;
- FL_OBJECT *button_ok;
- FL_OBJECT *button_apply;
- FL_OBJECT *button_cancel;
- FL_OBJECT *input_pextra_widthp;
- FL_OBJECT *group_alignment;
- FL_OBJECT *radio_pextra_top;
- FL_OBJECT *radio_pextra_middle;
- FL_OBJECT *radio_pextra_bottom;
- FL_OBJECT *text_warning;
- FL_OBJECT *radio_pextra_hfill;
- FL_OBJECT *radio_pextra_startmp;
- FL_OBJECT *group_extraopt;
- FL_OBJECT *radio_pextra_indent;
- FL_OBJECT *radio_pextra_minipage;
- FL_OBJECT *radio_pextra_floatflt;
-} FD_form_paragraph_extra;
-
-extern FD_form_paragraph_extra * create_form_form_paragraph_extra(void);
-typedef struct {
- FL_FORM *form_table_extra;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *input_special_alignment;
- FL_OBJECT *input_special_multialign;
-} FD_form_table_extra;
-
-extern FD_form_table_extra * create_form_form_table_extra(void);
-
-}
-#endif /* FD_form_document_h_ */
+#endif /* FD_form_character_h_ */
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
fl_set_object_callback(obj, LatexLogUpdate, 0);
fl_end_form();
- //fdui->LaTeXLog->fdui = fdui;
+ fdui->LaTeXLog->fdui = fdui;
return fdui;
}
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
fl_set_object_callback(obj, TimerCB, 0);
fl_end_form();
- //fdui->form_title->fdui = fdui;
+ fdui->form_title->fdui = fdui;
return fdui;
}
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
fl_end_form();
- //fdui->form_figure->fdui = fdui;
+ fdui->form_figure->fdui = fdui;
return fdui;
}
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
fl_end_form();
- //fdui->form_external->fdui = fdui;
+ fdui->form_external->fdui = fdui;
return fdui;
}
#include FORMS_H_LOCATION
#include "lyx.h"
#include "layout_forms.h"
-#include "bullet_forms.h"
#include "form1.h"
#include "lyx_main.h"
#include "lyx_cb.h"
extern BufferList bufferlist;
extern void show_symbols_form();
extern FD_form_title * fd_form_title;
-extern FD_form_paragraph * fd_form_paragraph;
extern FD_form_character * fd_form_character;
-extern FD_form_document * fd_form_document;
-extern FD_form_quotes * fd_form_quotes;
extern FD_form_preamble * fd_form_preamble;
-extern FD_form_table * fd_form_table;
extern FD_form_figure * fd_form_figure;
-extern FD_form_bullet * fd_form_bullet;
extern BufferView * current_view; // called too many times in this file...
return true;
}
-#ifndef NEW_EXPORT
-int MenuRunLaTeX(Buffer * buffer)
-{
- int ret = 0;
-
- if (buffer->isLinuxDoc())
- ret = RunLinuxDoc(buffer->getUser(), 1, buffer->fileName());
- else if (buffer->isLiterate())
- ret = buffer->runLiterate();
- else if (buffer->isDocBook())
- ret = RunDocBook(1, buffer->fileName());
- else
- ret = buffer->runLaTeX();
-
- if (ret > 0) {
- string s;
- string t;
- if (ret == 1) {
- s = _("One error detected");
- t = _("You should try to fix it.");
- } else {
- s += tostr(ret);
- s += _(" errors detected.");
- t = _("You should try to fix them.");
- }
- WriteAlert(_("There were errors during the LaTeX run."), s, t);
- }
- return ret;
-}
-#endif
int MenuBuildProg(Buffer * buffer)
{
return ret;
}
-#ifndef NEW_EXPORT
-int MakeLaTeXOutput(Buffer * buffer)
-{
- // Who cares?
- //if (!bv->text)
- // return 1;
- int ret = 0;
- string path = OnlyPath(buffer->fileName());
- if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
- path = buffer->tmppath;
- }
-
- Path p(path);
- ret = MenuRunLaTeX(buffer);
-
- return ret;
-}
-
-
-/* wait == false means don't wait for termination */
-/* wait == true means wait for termination */
-// The bool should be placed last on the argument line. (Lgb)
-// Returns false if we fail.
-bool RunScript(Buffer * buffer, bool wait,
- string const & command,
- string const & orgname = string(),
- bool need_shell = true)
-{
- string path;
- string cmd;
- string name = orgname;
- int result = 0;
-
- if (MakeLaTeXOutput(buffer) > 0)
- return false;
- /* get DVI-Filename */
- if (name.empty())
- name = ChangeExtension(buffer->getLatexName(), ".dvi");
-
- path = OnlyPath(name);
- if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
- path = buffer->tmppath;
- }
- Path p(path);
- // At this point we check whether the command contains the
- // filename parameter $$FName and if that's the case we
- // substitute the real file name otherwise the filename is
- // simply appended. rokrau 1/12/00
- cmd = command;
- string::size_type i;
- if ( (i=command.find("$$FName")) != string::npos)
- {
- cmd.replace(i,7,QuoteName(name));
- }
- else
- cmd = command + ' ' + QuoteName(name);
-
- Systemcalls one;
-
- if (need_shell) {
-#ifndef __EMX__
- if (!wait)
- cmd += " &";
-#else
- // OS/2 cmd.exe has another use for '&'
- if (!wait) {
- // This is not NLS safe, but it's OK, I think.
- string sh = OnlyFilename(GetEnvPath("EMXSHELL"));
- if (sh.empty()) {
- // COMSPEC is set, unless user unsets
- sh = OnlyFilename(GetEnvPath("COMSPEC"));
- if (sh.empty())
- sh = "cmd.exe";
- }
- sh = lowercase(sh);
- if (contains(sh, "cmd.exe")
- || contains(sh, "4os2.exe"))
- cmd = "start /min/n " + cmd;
- else
- cmd += " &";
- }
-#endif
- // It seems that, if wait is false, we never get back
- // the return code of the command. This means that all
- // the code I added in PrintApplyCB is currently
- // useless...
- // CHECK What should we do here?
- ShowMessage(buffer, _("Executing command:"), cmd);
- result = one.startscript(Systemcalls::System, cmd);
- } else {
- ShowMessage(buffer, _("Executing command:"), cmd);
- result = one.startscript(wait ? Systemcalls::Wait
- : Systemcalls::DontWait, cmd);
- }
- return result == 0;
-}
-
-
-// Returns false if we fail
-bool CreatePostscript(Buffer * buffer, bool wait = false)
-{
- // Who cares?
- //if (!bv->text)
- // return false;
-
- ProhibitInput(current_view);
-
- // Generate dvi file
- if (MakeLaTeXOutput(buffer) > 0) {
- AllowInput(current_view);
- return false;
- }
- // Generate postscript file
- string psname = OnlyFilename(ChangeExtension (buffer->fileName(),
- ".ps_tmp"));
-
- string paper;
-
- // Wrong type
- char real_papersize = buffer->params.papersize;
- if (real_papersize == BufferParams::PAPER_DEFAULT)
- real_papersize = lyxrc.default_papersize;
-
- switch (real_papersize) {
- case BufferParams::PAPER_USLETTER:
- paper = "letter";
- break;
- case BufferParams::PAPER_A3PAPER:
- paper = "a3";
- break;
- case BufferParams::PAPER_A4PAPER:
- paper = "a4";
- break;
- case BufferParams::PAPER_A5PAPER:
- paper = "a5";
- break;
- case BufferParams::PAPER_B5PAPER:
- paper = "b5";
- break;
- case BufferParams::PAPER_EXECUTIVEPAPER:
- paper = "foolscap";
- break;
- case BufferParams::PAPER_LEGALPAPER:
- paper = "legal";
- break;
- default: /* If nothing else fits, keep an empty value... */
- break;
- }
-
- // Make postscript file.
- string command = lyxrc.dvi_to_ps_command + ' ' + lyxrc.print_to_file + ' ';
- command += QuoteName(psname);
- if (buffer->params.use_geometry
- && buffer->params.papersize2 == BufferParams::VM_PAPER_CUSTOM
- && !lyxrc.print_paper_dimension_flag.empty()
- && !buffer->params.paperwidth.empty()
- && !buffer->params.paperheight.empty()) {
- // using a custom papersize
- command += ' ';
- command += lyxrc.print_paper_dimension_flag + ' ';
- command += buffer->params.paperwidth + ',';
- command += buffer->params.paperheight;
- } else if (!paper.empty()
- && (real_papersize != BufferParams::PAPER_USLETTER ||
- buffer->params.orientation == BufferParams::ORIENTATION_PORTRAIT)) {
- // dvips won't accept -t letter -t landscape. In all other
- // cases, include the paper size explicitly.
- command += ' ';
- command += lyxrc.print_paper_flag + ' ' + paper;
- }
- if (buffer->params.orientation == BufferParams::ORIENTATION_LANDSCAPE) {
- command += ' ';
- command += lyxrc.print_landscape_flag;
- }
- // push directorypath, if necessary
- string path = OnlyPath(buffer->fileName());
- if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)){
- path = buffer->tmppath;
- }
- Path p(path);
- bool ret = RunScript(buffer, wait, command);
- AllowInput(current_view);
- return ret;
-}
-
-
-// Returns false if we fail
-//bool MenuPreviewPS(Buffer * buffer)
-bool PreviewPostscript(Buffer * buffer)
-{
- // Who cares?
- //if (!bv->text)
- // return false;
-
- // Generate postscript file
- if (!CreatePostscript(buffer, true)) {
- return false;
- }
-
- // Start postscript viewer
- ProhibitInput(current_view);
- string ps = OnlyFilename(ChangeExtension (buffer->fileName(),
- ".ps_tmp"));
- // push directorypath, if necessary
- string path = OnlyPath(buffer->fileName());
- if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)){
- path = buffer->tmppath;
- }
- Path p(path);
- bool ret = RunScript(buffer, false, lyxrc.view_ps_command, ps);
- AllowInput(current_view);
- return ret;
-}
-#endif
void MenuFax(Buffer * buffer)
{
- // Who cares?
- //if (!bv->text)
- // return;
-
-#ifdef NEW_EXPORT
// Generate postscript file
if (!Exporter::Export(buffer, "ps", true))
return;
// Send fax
- string ps = OnlyFilename(ChangeExtension (buffer->fileName(),
- ".ps"));
-#else
- // Generate postscript file
- if (!CreatePostscript(buffer, true)) {
- return;
- }
+ string const ps = OnlyFilename(ChangeExtension(buffer->fileName(),
+ ".ps"));
- // Send fax
- string ps = OnlyFilename(ChangeExtension (buffer->fileName(),
- ".ps_tmp"));
-#endif
string path = OnlyPath (buffer->fileName());
if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
path = buffer->tmppath;
}
-#ifndef NEW_EXPORT
-// Returns false if we fail
-bool PreviewDVI(Buffer * buffer)
-{
- // Who cares?
- //if (!bv->text)
- // return false;
-
- string paper = lyxrc.view_dvi_paper_option;
- if (!paper.empty()) {
- // wrong type
- char real_papersize = buffer->params.papersize;
- if (real_papersize == BufferParams::PAPER_DEFAULT)
- real_papersize = lyxrc.default_papersize;
-
- switch (real_papersize) {
- case BufferParams::PAPER_USLETTER:
- paper += " us";
- break;
- case BufferParams::PAPER_A3PAPER:
- paper += " a3";
- break;
- case BufferParams::PAPER_A4PAPER:
- paper += " a4";
- break;
- case BufferParams::PAPER_A5PAPER:
- paper += " a5";
- break;
- case BufferParams::PAPER_B5PAPER:
- paper += " b5";
- break;
- case BufferParams::PAPER_EXECUTIVEPAPER:
- paper += " foolscap";
- break;
- case BufferParams::PAPER_LEGALPAPER:
- paper += " legal";
- break;
- default: /* If nothing else fits, keep the empty value */
- break;
- }
- if (real_papersize==' ') {
- // if (paper.empty()) {
- if (buffer->params.orientation
- == BufferParams::ORIENTATION_LANDSCAPE)
- // we HAVE to give a size when the page is in
- // landscape, so use USletter.
- paper = " -paper usr";
- } else {
- // paper = " -paper " + paper;
- if (buffer->params.orientation
- == BufferParams::ORIENTATION_LANDSCAPE)
- paper+= 'r';
- }
- }
- // push directorypath, if necessary
- string path = OnlyPath(buffer->fileName());
- if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
- path = buffer->tmppath;
- }
- Path p(path);
- // Run dvi-viewer
- string command = lyxrc.view_dvi_command + " " + paper;
- bool ret = RunScript(buffer, false, command);
- return ret;
-}
-
-
-bool AskOverwrite(Buffer * buffer, string const & s)
-{
- if (lyxrc.use_gui) {
- // be friendly if there is a gui
- FileInfo fi(s);
- if (fi.readable() &&
- !AskQuestion(_("File already exists:"),
- MakeDisplayPath(s, 50),
- _("Do you want to overwrite the file?"))) {
- ShowMessage(buffer, _("Canceled"));
- return false;
- }
- }
- return true;
-}
-
-
-void MenuMakeLaTeX(Buffer * buffer)
-{
- // Why care about this?
- //if (!bv->text)
- // return;
-
- // Get LaTeX-Filename
- string s = buffer->getLatexName(false);
-
- if (!AskOverwrite(buffer, s))
- return;
-
- if (buffer->isDocBook())
- ShowMessage(buffer, _("DocBook does not have a latex backend"));
- else {
- if (buffer->isLinuxDoc())
- RunLinuxDoc(buffer->getUser(), 0, buffer->fileName());
- else
- buffer->makeLaTeXFile(s, string(), true);
- ShowMessage(buffer, _("Nice LaTeX file saved as"),
- MakeDisplayPath(s));
- }
-}
-
-
-void MenuMakeLinuxDoc(Buffer * buffer)
-{
- // Who cares?
- //if (!bv->text) return;
-
- if (!buffer->isLinuxDoc()) {
- WriteAlert(_("Error!"), _("Document class must be linuxdoc."));
- return;
- }
-
- // Get LinuxDoc-Filename
- string s = ChangeExtension(buffer->fileName(), ".sgml");
-
- if (!AskOverwrite(buffer, s))
- return;
-
- ShowMessage(buffer, _("Building LinuxDoc SGML file `"),
- MakeDisplayPath(s),"'...");
-
- buffer->makeLinuxDocFile(s, true);
- buffer->redraw();
- ShowMessage(buffer, _("LinuxDoc SGML file save as"),
- MakeDisplayPath(s));
-}
-
-
-void MenuMakeDocBook(Buffer * buffer)
-{
- // Who cares?
- //if (!bv->text) return;
-
- if (!buffer->isDocBook()) {
- WriteAlert(_("Error!"),
- _("Document class must be docbook."));
- return;
- }
-
- // Get DocBook-Filename
- string s = ChangeExtension(buffer->fileName(), ".sgml");
-
- if (!AskOverwrite(buffer, s))
- return;
-
- ShowMessage(buffer, _("Building DocBook SGML file `"),
- MakeDisplayPath(s), "'...");
-
- buffer->makeDocBookFile(s, true);
- buffer->redraw();
- ShowMessage(buffer, _("DocBook SGML file save as"),
- MakeDisplayPath(s));
-}
-
-
-void MenuMakeAscii(Buffer * buffer)
-{
- // Who cares?
- //if (!bv->text) return;
-
- /* get LaTeX-Filename */
- string s = ChangeExtension (buffer->fileName(), ".txt");
-
-
- if (!AskOverwrite(buffer, s))
- return;
-
- buffer->writeFileAscii(s, lyxrc.ascii_linelen);
-
- ShowMessage(buffer, _("Ascii file saved as"), MakeDisplayPath(s));
-}
-
-
-void MenuMakeHTML(Buffer * buffer)
-{
- // First, create LaTeX file
- MenuMakeLaTeX(buffer);
-
- // And now, run the converter
- string file = buffer->fileName();
- Path path(OnlyPath(file));
- // the tex file name has to be correct for
- // latex, but the html file name can be
- // anything.
- string result = ChangeExtension(file, ".html");
- string infile = buffer->getLatexName(false);
- string tmp = lyxrc.html_command;
- tmp = subst(tmp, "$$FName", infile);
- tmp = subst(tmp, "$$OutName", result);
- Systemcalls one;
- int res = one.startscript(Systemcalls::System, tmp);
- if (res == 0) {
- ShowMessage(buffer, _("Document exported as HTML to file `")
- + MakeDisplayPath(result) +'\'');
- } else {
- ShowMessage(buffer, _("Unable to convert to HTML the file `")
- + MakeDisplayPath(infile)
- + '\'');
- }
-
-}
-
-
-void MenuMakeHTML_LinuxDoc(Buffer * buffer)
-{
- // First, create LinuxDoc file
- MenuMakeLinuxDoc(buffer);
-
- // And now, run the converter
- string file = buffer->fileName();
-
- string result = ChangeExtension(file, ".html");
- string infile = ChangeExtension(file, ".sgml");
- string tmp = lyxrc.linuxdoc_to_html_command;
- tmp = subst(tmp, "$$FName", infile);
- tmp = subst(tmp, "$$OutName", result);
- Systemcalls one;
- int res = one.startscript(Systemcalls::System, tmp);
- if (res == 0) {
- ShowMessage(buffer,_("Document exported as HTML to file `")
- + MakeDisplayPath(result) +'\'');
- } else {
- ShowMessage(buffer,_("Unable to convert to HTML the file `")
- + MakeDisplayPath(infile)
- + '\'');
- }
-
-}
-
-void MenuMakeHTML_DocBook(Buffer * buffer)
-{
- // First, create LaTeX file
- MenuMakeDocBook(buffer);
-
- // And now, run the converter
- string file = buffer->fileName();
- string result = ChangeExtension(file, ".html");
- string infile = ChangeExtension(file, ".sgml");
- string tmp = lyxrc.docbook_to_html_command;
- tmp = subst(tmp, "$$FName", infile);
- tmp = subst(tmp, "$$OutName", result);
- Systemcalls one;
- int res = one.startscript(Systemcalls::System, tmp);
- if (res == 0) {
- ShowMessage(buffer,_("Document exported as HTML to file `")
- + MakeDisplayPath(result) +'\'');
- } else {
- ShowMessage(buffer,_("Unable to convert to HTML the file `")
- + MakeDisplayPath(infile)
- + '\'');
- }
-
-}
-
-
-void MenuExport(Buffer * buffer, string const & extyp)
-{
- // latex
- if (extyp == "latex") {
- // make sure that this buffer is not linuxdoc
- MenuMakeLaTeX(buffer);
- }
- // linuxdoc
- else if (extyp == "linuxdoc") {
- // make sure that this buffer is not latex
- MenuMakeLinuxDoc(buffer);
- }
- // docbook
- else if (extyp == "docbook") {
- // make sure that this buffer is not latex or linuxdoc
- MenuMakeDocBook(buffer);
- }
- // dvi
- else if (extyp == "dvi") {
- // Run LaTeX as "Update dvi..." Bernhard.
- // We want the dvi in the current directory. This
- // is achieved by temporarily disabling use of
- // temp directory. As a side-effect, we get
- // *.log and *.aux files also. (Asger)
- bool flag = lyxrc.use_tempdir;
- lyxrc.use_tempdir = false;
- MenuRunLaTeX(buffer);
- lyxrc.use_tempdir = flag;
- }
- // postscript
- else if (extyp == "postscript") {
- // Start Print-dialog. Not as good as dvi... Bernhard.
- //should start lyxview->getDialogs()->showPrint();
- // to get same as before
- // MenuPrint(buffer);
- // Since the MenuPrint is a pop-up, we can't use
- // the same trick as above. (Asger)
- // MISSING: Move of ps-file :-(
- // And MenuPrint should not be used for this at all...
- }
- // ascii
- else if (extyp == "ascii") {
- MenuMakeAscii(buffer);
- }
- else if (extyp == "custom") {
- MenuSendto();
- }
- // HTML
- else if (extyp == "html") {
- if (buffer->isLinuxDoc())
- MenuMakeHTML_LinuxDoc(buffer);
- else if (buffer->isDocBook())
- MenuMakeHTML_DocBook(buffer);
- else
- MenuMakeHTML(buffer);
- }
- else {
- ShowMessage(buffer, _("Unknown export type: ") + extyp);
- }
-}
-#endif
-
-
void QuitLyX()
{
lyxerr.debug() << "Running QuitLyX." << endl;
if (!tmp_ret.empty()) {
bv->buffer()->writeFile(tmp_ret, 1);
// assume successful write of tmp_ret
- if (rename(tmp_ret.c_str(), fname.c_str()) == -1) {
+ if (lyx::rename(tmp_ret, fname)) {
failed = true;
// most likely couldn't move between filesystems
// unless write of tmp_ret failed
// so remove tmp file (if it exists)
- remove(tmp_ret.c_str());
+ lyx::unlink(tmp_ret);
}
} else {
failed = true;
copy(ii, end, back_inserter(tmpstr));
#endif
// insert the string
- current_view->hideCursor();
+ bv->hideCursor();
// clear the selection
bv->beforeChange();
}
-// candidate for move to LyXView
-// This is only used in toolbar.C
+// This is _only_ used in Toolbar_pimpl.C, move it there and get rid of
+// current_view. (Lgb)
void LayoutsCB(int sel, void *, Combox *)
{
string tmp = tostr(sel);
tmp);
}
-#ifndef NEW_EXPORT
-/*
- * SGML Linuxdoc support:
- * (flag == 0) make TeX output
- * (flag == 1) make dvi output
- */
-int RunLinuxDoc(BufferView * bv, int flag, string const & filename)
-{
- string s2;
- string add_flags;
-
- int errorcode = 0;
-
- /* generate a path-less extension name */
- string name = OnlyFilename(ChangeExtension (filename, ".sgml"));
- string path = OnlyPath (filename);
- if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
- path = bv->buffer()->tmppath;
- }
- Path p(path);
-
- if (!bv->available())
- return 0;
- bv->buffer()->makeLinuxDocFile(name, false);
-
- // CHECK remove this once we have a proper geometry class
-
- BufferParams::PAPER_SIZE ps =
- static_cast<BufferParams::PAPER_SIZE>(bv->buffer()->params.papersize);
- switch (ps) {
- case BufferParams::PAPER_A4PAPER:
- add_flags = "-p a4";
- break;
- case BufferParams::PAPER_USLETTER:
- add_flags = "-p letter";
- break;
- default: /* nothing to be done yet ;-) */ break;
- }
-
- ProhibitInput(bv);
-
- Systemcalls one;
- switch (flag) {
- case 0: /* TeX output asked */
- bv->owner()->getMiniBuffer()->Set(_("Converting LinuxDoc SGML to TeX file..."));
- s2 = lyxrc.linuxdoc_to_latex_command + ' ' + add_flags + " -o tex " + ' ' + name;
- if (one.startscript(Systemcalls::System, s2))
- errorcode = 1;
- break;
- case 1: /* dvi output asked */
- bv->owner()->getMiniBuffer()->Set(_("Converting LinuxDoc SGML to dvi file..."));
- s2 = lyxrc.linuxdoc_to_latex_command + ' ' + add_flags + " -o dvi " + ' ' + name;
- if (one.startscript(Systemcalls::System, s2)) {
- errorcode = 1;
- }
- break;
- default: /* unknown output */
- break;
- }
-
- AllowInput(bv);
-
- bv->buffer()->redraw();
- return errorcode;
-}
-
-
-/*
- * SGML DocBook support:
- * (flag == 1) make dvi output
- */
-int RunDocBook(int flag, string const & filename)
-{
- /* generate a path-less extension name */
- string name = OnlyFilename(ChangeExtension (filename, ".sgml"));
- string path = OnlyPath (filename);
- if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
- path = current_view->buffer()->tmppath;
- }
- Path p(path);
-
- if (!current_view->available())
- return 0;
-
- current_view->buffer()->makeDocBookFile(name, false);
-
- // Shall this code go or should it stay? (Lgb)
- // This code is a placeholder for future implementation. (Jose')
-// string add_flags;
-// LYX_PAPER_SIZE ps = (LYX_PAPER_SIZE) current_view->buffer()->params.papersize;
-// switch (ps) {
-// case BufferParams::PAPER_A4PAPER: add_flags = "-p a4"; break;
-// case BufferParams::PAPER_USLETTER: add_flags = "-p letter"; break;
-// default: /* nothing to be done yet ;-) */ break;
-// }
- ProhibitInput(current_view);
-
- int errorcode = 0;
- Systemcalls one;
- switch (flag) {
- case 1: /* dvi output asked */
- {
- current_view->owner()->getMiniBuffer()->Set(_("Converting DocBook SGML to dvi file..."));
- string s2 = lyxrc.docbook_to_dvi_command + ' ' + name;
- if (one.startscript(Systemcalls::System, s2)) {
- errorcode = 1;
- }
- }
- break;
- default: /* unknown output */
- break;
- }
-
- AllowInput(current_view);
-
- current_view->buffer()->redraw();
- return errorcode;
-}
-#endif
void MenuLayoutCharacter()
{
}
-static inline
-void DeactivateParagraphButtons ()
+bool UpdateLayoutPreamble()
{
- fl_deactivate_object (fd_form_paragraph->button_ok);
- fl_deactivate_object (fd_form_paragraph->button_apply);
- fl_set_object_lcol (fd_form_paragraph->button_ok, FL_INACTIVE);
- fl_set_object_lcol (fd_form_paragraph->button_apply, FL_INACTIVE);
-}
+ bool update = true;
+ if (!current_view->available())
+ update = false;
-
-static inline
-void ActivateParagraphButtons ()
-{
- fl_activate_object (fd_form_paragraph->button_ok);
- fl_activate_object (fd_form_paragraph->button_apply);
- fl_set_object_lcol (fd_form_paragraph->button_ok, FL_BLACK);
- fl_set_object_lcol (fd_form_paragraph->button_apply, FL_BLACK);
-}
-
-
-static inline
-void DisableParagraphLayout ()
-{
- DeactivateParagraphButtons();
- fl_deactivate_object (fd_form_paragraph->input_labelwidth);
- fl_deactivate_object (fd_form_paragraph->check_lines_top);
- fl_deactivate_object (fd_form_paragraph->check_lines_bottom);
- fl_deactivate_object (fd_form_paragraph->check_pagebreaks_top);
- fl_deactivate_object (fd_form_paragraph->check_pagebreaks_bottom);
- fl_deactivate_object (fd_form_paragraph->check_noindent);
- fl_deactivate_object (fd_form_paragraph->group_radio_alignment);
- fl_deactivate_object (fd_form_paragraph->radio_align_right);
- fl_deactivate_object (fd_form_paragraph->radio_align_left);
- fl_deactivate_object (fd_form_paragraph->radio_align_block);
- fl_deactivate_object (fd_form_paragraph->radio_align_center);
- fl_deactivate_object (fd_form_paragraph->input_space_above);
- fl_deactivate_object (fd_form_paragraph->input_space_below);
- fl_deactivate_object (fd_form_paragraph->choice_space_above);
- fl_deactivate_object (fd_form_paragraph->choice_space_below);
- fl_deactivate_object (fd_form_paragraph->check_space_above);
- fl_deactivate_object (fd_form_paragraph->check_space_below);
-}
-
-
-static inline
-void EnableParagraphLayout ()
-{
- ActivateParagraphButtons();
- fl_activate_object (fd_form_paragraph->input_labelwidth);
- fl_activate_object (fd_form_paragraph->check_lines_top);
- fl_activate_object (fd_form_paragraph->check_lines_bottom);
- fl_activate_object (fd_form_paragraph->check_pagebreaks_top);
- fl_activate_object (fd_form_paragraph->check_pagebreaks_bottom);
- fl_activate_object (fd_form_paragraph->check_noindent);
- fl_activate_object (fd_form_paragraph->group_radio_alignment);
- fl_activate_object (fd_form_paragraph->radio_align_right);
- fl_activate_object (fd_form_paragraph->radio_align_left);
- fl_activate_object (fd_form_paragraph->radio_align_block);
- fl_activate_object (fd_form_paragraph->radio_align_center);
- fl_activate_object (fd_form_paragraph->input_space_above);
- fl_activate_object (fd_form_paragraph->input_space_below);
- fl_activate_object (fd_form_paragraph->choice_space_above);
- fl_activate_object (fd_form_paragraph->choice_space_below);
- fl_activate_object (fd_form_paragraph->check_space_above);
- fl_activate_object (fd_form_paragraph->check_space_below);
-}
-
-
-bool UpdateLayoutParagraph()
-{
- if (!current_view->available()) {
- if (fd_form_paragraph->form_paragraph->visible)
- fl_hide_form(fd_form_paragraph->form_paragraph);
- return false;
- }
-
- Buffer * buf = current_view->buffer();
- LyXText * text = 0;
- if (current_view->the_locking_inset)
- text = current_view->the_locking_inset->getLyXText(current_view);
- if (!text)
- text = current_view->text;
-
- fl_set_input(fd_form_paragraph->input_labelwidth,
- text->cursor.par()->GetLabelWidthString().c_str());
- fl_set_button(fd_form_paragraph->radio_align_right, 0);
- fl_set_button(fd_form_paragraph->radio_align_left, 0);
- fl_set_button(fd_form_paragraph->radio_align_center, 0);
- fl_set_button(fd_form_paragraph->radio_align_block, 0);
-
- int align = text->cursor.par()->GetAlign();
- if (align == LYX_ALIGN_LAYOUT)
- align = textclasslist.Style(buf->params.textclass,
- text->cursor.par()->GetLayout()).align;
-
- switch (align) {
- case LYX_ALIGN_RIGHT:
- fl_set_button(fd_form_paragraph->radio_align_right, 1);
- break;
- case LYX_ALIGN_LEFT:
- fl_set_button(fd_form_paragraph->radio_align_left, 1);
- break;
- case LYX_ALIGN_CENTER:
- fl_set_button(fd_form_paragraph->radio_align_center, 1);
- break;
- default:
- fl_set_button(fd_form_paragraph->radio_align_block, 1);
- break;
- }
-
-#ifndef NEW_INSETS
- fl_set_button(fd_form_paragraph->check_lines_top,
- text->cursor.par()->FirstPhysicalPar()->line_top);
-
- fl_set_button(fd_form_paragraph->check_lines_bottom,
- text->cursor.par()->FirstPhysicalPar()->line_bottom);
-
- fl_set_button(fd_form_paragraph->check_pagebreaks_top,
- text->cursor.par()->FirstPhysicalPar()->pagebreak_top);
-
- fl_set_button(fd_form_paragraph->check_pagebreaks_bottom,
- text->cursor.par()->FirstPhysicalPar()->pagebreak_bottom);
- fl_set_button(fd_form_paragraph->check_noindent,
- text->cursor.par()->FirstPhysicalPar()->noindent);
-#else
- fl_set_button(fd_form_paragraph->check_lines_top,
- text->cursor.par()->line_top);
- fl_set_button(fd_form_paragraph->check_lines_bottom,
- text->cursor.par()->line_bottom);
- fl_set_button(fd_form_paragraph->check_pagebreaks_top,
- text->cursor.par()->pagebreak_top);
- fl_set_button(fd_form_paragraph->check_pagebreaks_bottom,
- text->cursor.par()->pagebreak_bottom);
- fl_set_button(fd_form_paragraph->check_noindent,
- text->cursor.par()->noindent);
-#endif
- fl_set_input (fd_form_paragraph->input_space_above, "");
-
-#ifndef NEW_INSETS
- switch (text->cursor.par()->FirstPhysicalPar()->added_space_top.kind()) {
-#else
- switch (text->cursor.par()->added_space_top.kind()) {
-#endif
-
- case VSpace::NONE:
- fl_set_choice (fd_form_paragraph->choice_space_above, 1);
- break;
- case VSpace::DEFSKIP:
- fl_set_choice (fd_form_paragraph->choice_space_above, 2);
- break;
- case VSpace::SMALLSKIP:
- fl_set_choice (fd_form_paragraph->choice_space_above, 3);
- break;
- case VSpace::MEDSKIP:
- fl_set_choice (fd_form_paragraph->choice_space_above, 4);
- break;
- case VSpace::BIGSKIP:
- fl_set_choice (fd_form_paragraph->choice_space_above, 5);
- break;
- case VSpace::VFILL:
- fl_set_choice (fd_form_paragraph->choice_space_above, 6);
- break;
- case VSpace::LENGTH:
- fl_set_choice (fd_form_paragraph->choice_space_above, 7);
-#ifndef NEW_INSETS
- fl_set_input (fd_form_paragraph->input_space_above,
- text->cursor.par()->FirstPhysicalPar()->added_space_top.length().asString().c_str());
-#else
- fl_set_input (fd_form_paragraph->input_space_above,
- text->cursor.par()->added_space_top.length().asString().c_str());
-#endif
- break;
- }
-#ifndef NEW_INSETS
- fl_set_button (fd_form_paragraph->check_space_above,
- text->cursor.par()->FirstPhysicalPar()->added_space_top.keep());
- fl_set_input (fd_form_paragraph->input_space_below, "");
- switch (text->cursor.par()->FirstPhysicalPar()->added_space_bottom.kind()) {
-#else
- fl_set_button (fd_form_paragraph->check_space_above,
- text->cursor.par()->added_space_top.keep());
- fl_set_input (fd_form_paragraph->input_space_below, "");
- switch (text->cursor.par()->added_space_bottom.kind()) {
-#endif
- case VSpace::NONE:
- fl_set_choice (fd_form_paragraph->choice_space_below,
- 1);
- break;
- case VSpace::DEFSKIP:
- fl_set_choice (fd_form_paragraph->choice_space_below,
- 2);
- break;
- case VSpace::SMALLSKIP:
- fl_set_choice (fd_form_paragraph->choice_space_below,
- 3);
- break;
- case VSpace::MEDSKIP:
- fl_set_choice (fd_form_paragraph->choice_space_below,
- 4);
- break;
- case VSpace::BIGSKIP:
- fl_set_choice (fd_form_paragraph->choice_space_below,
- 5);
- break;
- case VSpace::VFILL:
- fl_set_choice (fd_form_paragraph->choice_space_below,
- 6);
- break;
- case VSpace::LENGTH:
- fl_set_choice (fd_form_paragraph->choice_space_below,
- 7);
-#ifndef NEW_INSETS
- fl_set_input (fd_form_paragraph->input_space_below,
- text->cursor.par()->FirstPhysicalPar()->added_space_bottom.length().asString().c_str());
- break;
- }
- fl_set_button (fd_form_paragraph->check_space_below,
- text->cursor.par()->FirstPhysicalPar()->added_space_bottom.keep());
-
- fl_set_button(fd_form_paragraph->check_noindent,
- text->cursor.par()->FirstPhysicalPar()->noindent);
-#else
- fl_set_input (fd_form_paragraph->input_space_below,
- text->cursor.par()->added_space_bottom.length().asString().c_str());
- break;
- }
- fl_set_button (fd_form_paragraph->check_space_below,
- text->cursor.par()->added_space_bottom.keep());
-
- fl_set_button(fd_form_paragraph->check_noindent,
- text->cursor.par()->noindent);
-#endif
- if (current_view->buffer()->isReadonly()) {
- DisableParagraphLayout();
- } else {
- EnableParagraphLayout();
- }
- return true;
-}
-
-
-void MenuLayoutParagraph()
-{
- if (UpdateLayoutParagraph()) {
- if (fd_form_paragraph->form_paragraph->visible) {
- fl_raise_form(fd_form_paragraph->form_paragraph);
- } else {
- fl_show_form(fd_form_paragraph->form_paragraph,
- FL_PLACE_MOUSE, FL_FULLBORDER,
- _("Paragraph Environment"));
- }
- }
-}
-
-#ifdef USE_OLD_DOCUMENT_LAYOUT
-static inline
-void DeactivateDocumentButtons ()
-{
- fl_deactivate_object (fd_form_document->button_ok);
- fl_deactivate_object (fd_form_document->button_apply);
- fl_set_object_lcol (fd_form_document->button_ok, FL_INACTIVE);
- fl_set_object_lcol (fd_form_document->button_apply, FL_INACTIVE);
-}
-
-
-static inline
-void ActivateDocumentButtons ()
-{
- fl_activate_object (fd_form_document->button_ok);
- fl_activate_object (fd_form_document->button_apply);
- fl_set_object_lcol (fd_form_document->button_ok, FL_BLACK);
- fl_set_object_lcol (fd_form_document->button_apply, FL_BLACK);
-}
-
-
-static inline
-void DisableDocumentLayout ()
-{
- DeactivateDocumentButtons ();
- fl_deactivate_object (fd_form_document->group_radio_separation);
- fl_deactivate_object (fd_form_document->radio_indent);
- fl_deactivate_object (fd_form_document->radio_skip);
- fl_deactivate_object (fd_form_document->choice_class);
- fl_deactivate_object (fd_form_document->choice_pagestyle);
- fl_deactivate_object (fd_form_document->choice_fonts);
- fl_deactivate_object (fd_form_document->choice_fontsize);
- fl_deactivate_object (fd_form_document->input_float_placement);
- fl_deactivate_object (fd_form_document->choice_postscript_driver);
- fl_deactivate_object (fd_form_document->choice_inputenc);
- fl_deactivate_object (fd_form_document->group_radio_sides);
- fl_deactivate_object (fd_form_document->radio_sides_one);
- fl_deactivate_object (fd_form_document->radio_sides_two);
- fl_deactivate_object (fd_form_document->group_radio_columns);
- fl_deactivate_object (fd_form_document->radio_columns_one);
- fl_deactivate_object (fd_form_document->radio_columns_two);
- fl_deactivate_object (fd_form_document->input_extra);
- fl_deactivate_object (fd_form_document->choice_language);
- combo_language->deactivate();
- fl_deactivate_object (fd_form_document->input_default_skip);
- fl_deactivate_object (fd_form_document->choice_default_skip);
- fl_deactivate_object (fd_form_document->slider_secnumdepth);
- fl_deactivate_object (fd_form_document->slider_tocdepth);
- fl_deactivate_object (fd_form_document->choice_spacing);
- fl_deactivate_object (fd_form_document->input_spacing);
- fl_deactivate_object (fd_form_document->check_use_amsmath);
-}
-
-
-static inline
-void EnableDocumentLayout ()
-{
- ActivateDocumentButtons ();
- fl_activate_object (fd_form_document->group_radio_separation);
- fl_activate_object (fd_form_document->radio_indent);
- fl_activate_object (fd_form_document->radio_skip);
- fl_activate_object (fd_form_document->choice_class);
- fl_activate_object (fd_form_document->choice_pagestyle);
- fl_activate_object (fd_form_document->choice_fonts);
- fl_activate_object (fd_form_document->choice_fontsize);
- fl_activate_object (fd_form_document->input_float_placement);
- fl_activate_object (fd_form_document->choice_postscript_driver);
- fl_activate_object (fd_form_document->choice_inputenc);
- fl_activate_object (fd_form_document->group_radio_sides);
- fl_activate_object (fd_form_document->radio_sides_one);
- fl_activate_object (fd_form_document->radio_sides_two);
- fl_activate_object (fd_form_document->group_radio_columns);
- fl_activate_object (fd_form_document->radio_columns_one);
- fl_activate_object (fd_form_document->radio_columns_two);
- fl_activate_object (fd_form_document->input_extra);
- fl_activate_object (fd_form_document->choice_language);
- combo_language->activate();
- fl_activate_object (fd_form_document->input_default_skip);
- fl_activate_object (fd_form_document->choice_default_skip);
- fl_activate_object (fd_form_document->slider_secnumdepth);
- fl_activate_object (fd_form_document->slider_tocdepth);
- fl_activate_object (fd_form_document->choice_spacing);
- fl_activate_object (fd_form_document->input_spacing);
- fl_activate_object (fd_form_document->check_use_amsmath);
-}
-
-
-bool UpdateLayoutDocument(BufferParams * params)
-{
- if (!current_view->available()) {
- if (fd_form_document->form_document->visible)
- fl_hide_form(fd_form_document->form_document);
- return false;
- }
-
- if (params == 0)
- params = ¤t_view->buffer()->params;
- LyXTextClass const & tclass = textclasslist.TextClass(params->textclass);
-
- fl_set_choice_text(fd_form_document->choice_class,
- textclasslist.DescOfClass(params->textclass).c_str());
- combo_language->select_text(params->language.c_str());
-
- fl_set_choice_text(fd_form_document->choice_fonts,
- params->fonts.c_str());
- fl_set_choice_text(fd_form_document->choice_inputenc,
- params->inputenc.c_str());
- fl_set_choice_text(fd_form_document->choice_postscript_driver,
- params->graphicsDriver.c_str());
-
- // ale970405+lasgoutt970513
- fl_clear_choice(fd_form_document->choice_fontsize);
- fl_addto_choice(fd_form_document->choice_fontsize, "default");
- fl_addto_choice(fd_form_document->choice_fontsize,
- tclass.opt_fontsize().c_str());
- fl_set_choice(fd_form_document->choice_fontsize,
- tokenPos(tclass.opt_fontsize(), '|', params->fontsize) + 2);
-
- // ale970405+lasgoutt970513
- fl_clear_choice(fd_form_document->choice_pagestyle);
- fl_addto_choice(fd_form_document->choice_pagestyle, "default");
- fl_addto_choice(fd_form_document->choice_pagestyle,
- tclass.opt_pagestyle().c_str());
-
- fl_set_choice(fd_form_document->choice_pagestyle,
- tokenPos(tclass.opt_pagestyle(), '|', params->pagestyle) + 2);
-
- fl_set_button(fd_form_document->radio_indent, 0);
- fl_set_button(fd_form_document->radio_skip, 0);
-
-
- fl_set_button(fd_form_document->check_use_amsmath, params->use_amsmath);
-
- if (params->paragraph_separation == BufferParams::PARSEP_INDENT)
- fl_set_button(fd_form_document->radio_indent, 1);
- else
- fl_set_button(fd_form_document->radio_skip, 1);
-
- switch (params->getDefSkip().kind()) {
- case VSpace::SMALLSKIP:
- fl_set_choice (fd_form_document->choice_default_skip, 1);
- break;
- case VSpace::MEDSKIP:
- fl_set_choice (fd_form_document->choice_default_skip, 2);
- break;
- case VSpace::BIGSKIP:
- fl_set_choice (fd_form_document->choice_default_skip, 3);
- break;
- case VSpace::LENGTH:
- fl_set_choice (fd_form_document->choice_default_skip, 4);
- fl_set_input (fd_form_document->input_default_skip,
- params->getDefSkip().asLyXCommand().c_str());
- break;
- default:
- fl_set_choice (fd_form_document->choice_default_skip, 2);
- break;
- }
-
- fl_set_button(fd_form_document->radio_sides_one, 0);
- fl_set_button(fd_form_document->radio_sides_two, 0);
-
- switch (params->sides) {
- case LyXTextClass::OneSide:
- fl_set_button(fd_form_document->radio_sides_one, 1);
- break;
- case LyXTextClass::TwoSides:
- fl_set_button(fd_form_document->radio_sides_two, 1);
- break;
- }
-
- fl_set_button(fd_form_document->radio_columns_one, 0);
- fl_set_button(fd_form_document->radio_columns_two, 0);
-
- if (params->columns == 2)
- fl_set_button(fd_form_document->radio_columns_two, 1);
- else
- fl_set_button(fd_form_document->radio_columns_one, 1);
-
- fl_set_input(fd_form_document->input_spacing, "");
- switch (params->spacing.getSpace()) {
- case Spacing::Default: // nothing bad should happen with this
- case Spacing::Single:
- {
- // \singlespacing
- fl_set_choice(fd_form_document->choice_spacing, 1);
- break;
- }
- case Spacing::Onehalf:
- {
- // \onehalfspacing
- fl_set_choice(fd_form_document->choice_spacing, 2);
- break;
- }
- case Spacing::Double:
- {
- // \ doublespacing
- fl_set_choice(fd_form_document->choice_spacing, 3);
- break;
- }
- case Spacing::Other:
- {
- fl_set_choice(fd_form_document->choice_spacing, 4);
- std::ostringstream sval;
- sval << params->spacing.getValue(); // setw?
- fl_set_input(fd_form_document->input_spacing,
- sval.str().c_str());
- break;
- }
- }
-
-
- fl_set_counter_value(fd_form_document->slider_secnumdepth,
- params->secnumdepth);
- fl_set_counter_value(fd_form_document->slider_tocdepth,
- params->tocdepth);
- if (!params->float_placement.empty()) { // buffer local (Lgb)
- fl_set_input(fd_form_document->input_float_placement,
- params->float_placement.c_str());
- } else {
- fl_set_input(fd_form_document->input_float_placement, "");
- }
- if (!params->options.empty())
- fl_set_input(fd_form_document->input_extra,
- params->options.c_str());
- else
- fl_set_input(fd_form_document->input_extra, "");
-
- if (current_view->buffer()->isSGML()) {
- // bullets not used in SGML derived documents
- fl_deactivate_object(fd_form_document->button_bullets);
- fl_set_object_lcol(fd_form_document->button_bullets,
- FL_INACTIVE);
- } else {
- fl_activate_object(fd_form_document->button_bullets);
- fl_set_object_lcol(fd_form_document->button_bullets,
- FL_BLACK);
- }
-
- if (current_view->buffer()->isReadonly()) {
- DisableDocumentLayout();
- } else {
- EnableDocumentLayout();
- }
-
- return true;
-}
-
-
-void MenuLayoutDocument()
-{
- if (UpdateLayoutDocument()) {
- if (fd_form_document->form_document->visible) {
- fl_raise_form(fd_form_document->form_document);
- } else {
- fl_show_form(fd_form_document->form_document,
- FL_PLACE_MOUSE, FL_FULLBORDER,
- _("Document Layout"));
- }
- }
-}
-
-
-bool UpdateLayoutQuotes()
-{
- bool update = true;
- if (!current_view->available()
- || current_view->buffer()->isReadonly())
- update = false;
-
- if (update) {
- fl_set_choice(fd_form_quotes->choice_quotes_language,
- current_view->buffer()->params.quotes_language + 1);
- fl_set_button(fd_form_quotes->radio_single, 0);
- fl_set_button(fd_form_quotes->radio_double, 0);
-
- if (current_view->buffer()->params.quotes_times == InsetQuotes::SingleQ)
- fl_set_button(fd_form_quotes->radio_single, 1);
- else
- fl_set_button(fd_form_quotes->radio_double, 1);
- } else if (fd_form_quotes->form_quotes->visible) {
- fl_hide_form(fd_form_quotes->form_quotes);
- }
- return update;
-}
-
-
-void MenuLayoutQuotes()
-{
- if (UpdateLayoutQuotes()) {
- if (fd_form_quotes->form_quotes->visible) {
- fl_raise_form(fd_form_quotes->form_quotes);
- } else {
- fl_show_form(fd_form_quotes->form_quotes,
- FL_PLACE_MOUSE, FL_FULLBORDER,
- _("Quotes"));
- }
- }
-}
-#endif
-
-
-bool UpdateLayoutPreamble()
-{
- bool update = true;
- if (!current_view->available())
- update = false;
-
- if (update) {
- fl_set_input(fd_form_preamble->input_preamble,
- current_view->buffer()->params.preamble.c_str());
+ if (update) {
+ fl_set_input(fd_form_preamble->input_preamble,
+ current_view->buffer()->params.preamble.c_str());
if (current_view->buffer()->isReadonly()) {
fl_deactivate_object(fd_form_preamble->input_preamble);
}
-/* callbacks for form form_paragraph */
-
-extern "C" void ParagraphVSpaceCB(FL_OBJECT * obj, long )
-{
- // "Synchronize" the choices and input fields, making it
- // impossible to commit senseless data.
-
- FD_form_paragraph const * fp = fd_form_paragraph;
-
- if (obj == fp->choice_space_above) {
- if (fl_get_choice (fp->choice_space_above) != 7) {
- fl_set_input (fp->input_space_above, "");
- ActivateParagraphButtons();
- }
- } else if (obj == fp->choice_space_below) {
- if (fl_get_choice (fp->choice_space_below) != 7) {
- fl_set_input (fp->input_space_below, "");
- ActivateParagraphButtons();
- }
- } else if (obj == fp->input_space_above) {
- string input = fl_get_input (fp->input_space_above);
-
- if (input.empty()) {
- fl_set_choice (fp->choice_space_above, 1);
- ActivateParagraphButtons();
- }
- else if (isValidGlueLength (input)) {
- fl_set_choice (fp->choice_space_above, 7);
- ActivateParagraphButtons();
- }
- else {
- fl_set_choice (fp->choice_space_above, 7);
- DeactivateParagraphButtons();
- }
- } else if (obj == fp->input_space_below) {
- string input = fl_get_input (fp->input_space_below);
-
- if (input.empty()) {
- fl_set_choice (fp->choice_space_below, 1);
- ActivateParagraphButtons();
- }
- else if (isValidGlueLength (input)) {
- fl_set_choice (fp->choice_space_below, 7);
- ActivateParagraphButtons();
- }
- else {
- fl_set_choice (fp->choice_space_below, 7);
- DeactivateParagraphButtons();
- }
- }
-}
-
-
-extern "C" void ParagraphApplyCB(FL_OBJECT *, long)
-{
- if (!current_view->available())
- return;
-
- VSpace space_top, space_bottom;
- LyXAlignment align;
- string labelwidthstring;
- bool noindent;
-
- // If a vspace kind is "Length" but there's no text in
- // the input field, reset the kind to "None".
- if (fl_get_choice (fd_form_paragraph->choice_space_above) == 7
- && !*(fl_get_input (fd_form_paragraph->input_space_above))) {
- fl_set_choice (fd_form_paragraph->choice_space_above, 1);
- }
- if (fl_get_choice (fd_form_paragraph->choice_space_below) == 7
- && !*(fl_get_input (fd_form_paragraph->input_space_below))) {
- fl_set_choice (fd_form_paragraph->choice_space_below, 1);
- }
-
- bool line_top = fl_get_button(fd_form_paragraph->check_lines_top);
- bool line_bottom = fl_get_button(fd_form_paragraph->check_lines_bottom);
- bool pagebreak_top = fl_get_button(fd_form_paragraph->check_pagebreaks_top);
- bool pagebreak_bottom = fl_get_button(fd_form_paragraph->check_pagebreaks_bottom);
- switch (fl_get_choice (fd_form_paragraph->choice_space_above)) {
- case 1: space_top = VSpace(VSpace::NONE); break;
- case 2: space_top = VSpace(VSpace::DEFSKIP); break;
- case 3: space_top = VSpace(VSpace::SMALLSKIP); break;
- case 4: space_top = VSpace(VSpace::MEDSKIP); break;
- case 5: space_top = VSpace(VSpace::BIGSKIP); break;
- case 6: space_top = VSpace(VSpace::VFILL); break;
- case 7: space_top = VSpace(LyXGlueLength (fl_get_input (fd_form_paragraph->input_space_above))); break;
- }
- if (fl_get_button (fd_form_paragraph->check_space_above))
- space_top.setKeep (true);
- switch (fl_get_choice (fd_form_paragraph->choice_space_below)) {
- case 1: space_bottom = VSpace(VSpace::NONE); break;
- case 2: space_bottom = VSpace(VSpace::DEFSKIP); break;
- case 3: space_bottom = VSpace(VSpace::SMALLSKIP); break;
- case 4: space_bottom = VSpace(VSpace::MEDSKIP); break;
- case 5: space_bottom = VSpace(VSpace::BIGSKIP); break;
- case 6: space_bottom = VSpace(VSpace::VFILL); break;
- case 7: space_bottom = VSpace(LyXGlueLength (fl_get_input (fd_form_paragraph->input_space_below))); break;
- }
- if (fl_get_button (fd_form_paragraph->check_space_below))
- space_bottom.setKeep (true);
-
- if (fl_get_button(fd_form_paragraph->radio_align_left))
- align = LYX_ALIGN_LEFT;
- else if (fl_get_button(fd_form_paragraph->radio_align_right))
- align = LYX_ALIGN_RIGHT;
- else if (fl_get_button(fd_form_paragraph->radio_align_center))
- align = LYX_ALIGN_CENTER;
- else
- align = LYX_ALIGN_BLOCK;
-
- labelwidthstring = fl_get_input(fd_form_paragraph->input_labelwidth);
- noindent = fl_get_button(fd_form_paragraph->check_noindent);
-
- LyXText * text = 0;
- if (current_view->the_locking_inset)
- text = current_view->the_locking_inset->getLyXText(current_view);
- if (!text)
- text = current_view->text;
- text->SetParagraph(current_view,
- line_top,
- line_bottom,
- pagebreak_top,
- pagebreak_bottom,
- space_top,
- space_bottom,
- align,
- labelwidthstring,
- noindent);
- current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
- current_view->owner()->getMiniBuffer()->Set(_("Paragraph layout set"));
-}
-
-
-extern "C" void ParagraphCancelCB(FL_OBJECT *, long)
-{
- fl_hide_form(fd_form_paragraph->form_paragraph);
-}
-
-
-extern "C" void ParagraphOKCB(FL_OBJECT *ob, long data)
-{
- ParagraphApplyCB(ob, data);
- ParagraphCancelCB(ob, data);
-}
-
-
/* callbacks for form form_character */
extern "C" void CharacterApplyCB(FL_OBJECT *, long)
}
-#ifdef USE_OLD_DOCUMENT_LAYOUT
-/* callbacks for form form_document */
-void UpdateDocumentButtons(BufferParams const & params)
-{
- fl_set_choice(fd_form_document->choice_pagestyle, 1);
-
- switch (params.sides) {
- case LyXTextClass::OneSide:
- fl_set_button(fd_form_document->radio_sides_one, 1);
- break;
- case LyXTextClass::TwoSides:
- fl_set_button(fd_form_document->radio_sides_two, 1);
- break;
- }
-
- if (params.columns == 2)
- fl_set_button(fd_form_document->radio_columns_two, 1);
- else
- fl_set_button(fd_form_document->radio_columns_one, 1);
-
- fl_set_input(fd_form_document->input_extra, params.options.c_str());
- fl_set_counter_value(fd_form_document->slider_secnumdepth,
- params.secnumdepth);
- fl_set_counter_value(fd_form_document->slider_tocdepth,
- params.tocdepth);
-
-}
-
-extern "C" void ChoiceClassCB(FL_OBJECT * ob, long)
-{
- ProhibitInput(current_view);
- if (textclasslist.Load(fl_get_choice(ob)-1)) {
- if (AskQuestion(_("Should I set some parameters to"),
- fl_get_choice_text(ob),
- _("the defaults of this document class?"))) {
- BufferParams params = BufferParams();
- params.textclass = fl_get_choice(ob)-1;
- params.useClassDefaults();
- UpdateLayoutDocument(¶ms);
- UpdateDocumentButtons(params);
- }
- } else {
- // unable to load new style
- WriteAlert(_("Conversion Errors!"),
- _("Unable to switch to new document class."),
- _("Reverting to original document class."));
- fl_set_choice(fd_form_document->choice_class,
- current_view->buffer()->params.textclass + 1);
- }
- AllowInput(current_view);
-}
-
-
-extern "C" void DocumentDefskipCB(FL_OBJECT * obj, long)
-{
- // "Synchronize" the choice and the input field, so that it
- // is impossible to commit senseless data.
- FD_form_document const * fd = fd_form_document;
-
- if (obj == fd->choice_default_skip) {
- if (fl_get_choice (fd->choice_default_skip) != 4) {
- fl_set_input (fd->input_default_skip, "");
- ActivateDocumentButtons();
- }
- } else if (obj == fd->input_default_skip) {
-
- char const * input = fl_get_input (fd->input_default_skip);
-
- if (!*input) {
- fl_set_choice (fd->choice_default_skip, 2);
- ActivateDocumentButtons();
- } else if (isValidGlueLength (input)) {
- fl_set_choice (fd->choice_default_skip, 4);
- ActivateDocumentButtons();
- } else {
- fl_set_choice (fd->choice_default_skip, 4);
- DeactivateDocumentButtons();
- }
- }
-}
-
-
-extern "C" void DocumentSpacingCB(FL_OBJECT * obj, long)
-{
- // "Synchronize" the choice and the input field, so that it
- // is impossible to commit senseless data.
- FD_form_document const * fd = fd_form_document;
-
- if (obj == fd->choice_spacing
- && fl_get_choice (fd->choice_spacing) != 4) {
- fl_set_input(fd->input_spacing, "");
- } else if (obj == fd->input_spacing) {
-
- const char* input = fl_get_input (fd->input_spacing);
-
- if (!*input) {
- fl_set_choice (fd->choice_spacing, 1);
- } else {
- fl_set_choice (fd->choice_spacing, 4);
- }
- }
-}
-
-
-extern "C" void DocumentApplyCB(FL_OBJECT *, long)
-{
- bool redo = false;
- BufferParams * params = &(current_view->buffer()->params);
-
- Language const * old_language = params->language_info;
- params->language = combo_language->getline();
- Languages::iterator lit = languages.find(params->language);
-
- Language const * new_language;
- if (lit != languages.end())
- new_language = &(*lit).second;
- else
- new_language = default_language;
-
- if (current_view->available()) {
- if (old_language != new_language
- && old_language->RightToLeft() == new_language->RightToLeft()
- && !current_view->buffer()->isMultiLingual())
- current_view->buffer()->ChangeLanguage(old_language,
- new_language);
- if (old_language != new_language) {
- //current_view->buffer()->redraw();
- redo = true;
- }
- }
- params->language_info = new_language;
-
- // If default skip is a "Length" but there's no text in the
- // input field, reset the kind to "Medskip", which is the default.
- if (fl_get_choice (fd_form_document->choice_default_skip) == 4
- && !*(fl_get_input (fd_form_document->input_default_skip))) {
- fl_set_choice (fd_form_document->choice_default_skip, 2);
- }
-
- /* this shouldn't be done automatically IMO. For example I write german
- * documents with an american keyboard very often. Matthias */
-
- /* ChangeKeymap(buffer->parameters.language, TRUE, false,
- fl_get_choice(fd_form_document->choice_language)); */
- params->fonts =
- fl_get_choice_text(fd_form_document->choice_fonts);
- params->inputenc =
- fl_get_choice_text(fd_form_document->choice_inputenc);
- params->fontsize =
- fl_get_choice_text(fd_form_document->choice_fontsize);
- params->pagestyle =
- fl_get_choice_text(fd_form_document->choice_pagestyle);
- params->graphicsDriver =
- fl_get_choice_text(fd_form_document->choice_postscript_driver);
- params->use_amsmath =
- fl_get_button(fd_form_document->check_use_amsmath);
-
- if (!current_view->available())
- return;
-
- current_view->text->SetCursor(current_view,
- current_view->text->cursor.par(),
- current_view->text->cursor.pos());
- current_view->setState();
-
- LyXTextClassList::ClassList::size_type new_class =
- fl_get_choice(fd_form_document->choice_class) - 1;
-
- if (params->textclass != new_class) {
- // try to load new_class
- if (textclasslist.Load(new_class)) {
- // successfully loaded
- redo = true;
- current_view->owner()->getMiniBuffer()->
- Set(_("Converting document to new document class..."));
- CutAndPaste cap;
- int ret = cap.SwitchLayoutsBetweenClasses(
- current_view->buffer()->params.textclass,
- new_class,
- current_view->buffer()->paragraph);
-
- if (ret) {
- string s;
- if (ret == 1)
- s = _("One paragraph couldn't be converted");
- else {
- s += tostr(ret);
- s += _(" paragraphs couldn't be converted");
- }
- WriteAlert(_("Conversion Errors!"), s,
- _("into chosen document class"));
- }
-
- params->textclass = new_class;
- } else {
- // problem changing class -- warn user and retain old style
- WriteAlert(_("Conversion Errors!"),
- _("Unable to switch to new document class."),
- _("Reverting to original document class."));
- fl_set_choice(fd_form_document->choice_class, params->textclass + 1);
- }
- }
-
- char tmpsep = params->paragraph_separation;
- if (fl_get_button(fd_form_document->radio_indent))
- params->paragraph_separation = BufferParams::PARSEP_INDENT;
- else
- params->paragraph_separation = BufferParams::PARSEP_SKIP;
- if (tmpsep != params->paragraph_separation)
- redo = true;
-
- VSpace tmpdefskip = params->getDefSkip();
- switch (fl_get_choice (fd_form_document->choice_default_skip)) {
- case 1: params->setDefSkip(VSpace(VSpace::SMALLSKIP)); break;
- case 2: params->setDefSkip(VSpace(VSpace::MEDSKIP)); break;
- case 3: params->setDefSkip(VSpace(VSpace::BIGSKIP)); break;
- case 4: params->setDefSkip(
- VSpace (LyXGlueLength (fl_get_input
- (fd_form_document->input_default_skip))));
- break;
- // DocumentDefskipCB assures that this never happens
- default: params->setDefSkip(VSpace(VSpace::MEDSKIP)); break;
- }
- if (!(tmpdefskip == params->getDefSkip()))
- redo = true;
-
- if (fl_get_button(fd_form_document->radio_columns_two))
- params->columns = 2;
- else
- params->columns = 1;
- if (fl_get_button(fd_form_document->radio_sides_two))
- params->sides = LyXTextClass::TwoSides;
- else
- params->sides = LyXTextClass::OneSide;
-
- Spacing tmpSpacing = params->spacing;
- switch(fl_get_choice(fd_form_document->choice_spacing)) {
- case 1:
- lyxerr.debug() << "Spacing: SINGLE" << endl;
- params->spacing.set(Spacing::Single);
- break;
- case 2:
- lyxerr.debug() << "Spacing: ONEHALF" << endl;
- params->spacing.set(Spacing::Onehalf);
- break;
- case 3:
- lyxerr.debug() << "Spacing: DOUBLE" << endl;
- params->spacing.set(Spacing::Double);
- break;
- case 4:
- lyxerr.debug() << "Spacing: OTHER" << endl;
- params->spacing.set(Spacing::Other,
- fl_get_input(fd_form_document->input_spacing));
- break;
- }
- if (tmpSpacing != params->spacing)
- redo = true;
-
- signed char tmpchar =
- static_cast<signed char>(fl_get_counter_value(fd_form_document->slider_secnumdepth));
- if (params->secnumdepth != tmpchar)
- redo = true;
- params->secnumdepth = tmpchar;
-
- params->tocdepth =
- static_cast<int>(fl_get_counter_value(fd_form_document->slider_tocdepth));
-
- params->float_placement =
- fl_get_input(fd_form_document->input_float_placement);
-
- // More checking should be done to ensure the string doesn't have
- // spaces or illegal placement characters in it. (thornley)
-
- if (redo)
- current_view->redoCurrentBuffer();
-
- current_view->owner()->getMiniBuffer()->Set(_("Document layout set"));
- current_view->buffer()->markDirty();
-
- params->options =
- fl_get_input(fd_form_document->input_extra);
-}
-
-
-extern "C" void DocumentCancelCB(FL_OBJECT *, long)
-{
- fl_hide_form(fd_form_document->form_document);
-}
-
-
-extern "C" void DocumentOKCB(FL_OBJECT * ob, long data)
-{
- DocumentCancelCB(ob, data);
- DocumentApplyCB(ob, data);
-}
-
-
-extern "C" void DocumentBulletsCB(FL_OBJECT *, long)
-{
- bulletForm();
- // bullet callbacks etc. in bullet_panel.C -- ARRae
-}
-
-/* callbacks for form form_quotes */
-
-extern "C" void QuotesApplyCB(FL_OBJECT *, long)
-{
- if (!current_view->available())
- return;
-
- current_view->owner()->getMiniBuffer()->Set(_("Quotes type set"));
- InsetQuotes::quote_language lga = InsetQuotes::EnglishQ;
- switch(fl_get_choice(fd_form_quotes->choice_quotes_language) - 1) {
- case 0:
- lga = InsetQuotes::EnglishQ;
- break;
- case 1:
- lga = InsetQuotes::SwedishQ;
- break;
- case 2:
- lga = InsetQuotes::GermanQ;
- break;
- case 3:
- lga = InsetQuotes::PolishQ;
- break;
- case 4:
- lga = InsetQuotes::FrenchQ;
- break;
- case 5:
- lga = InsetQuotes::DanishQ;
- break;
- }
- current_view->buffer()->params.quotes_language = lga;
- if (fl_get_button(fd_form_quotes->radio_single))
- current_view->buffer()->
- params.quotes_times = InsetQuotes::SingleQ;
- else
- current_view->buffer()->
- params.quotes_times = InsetQuotes::DoubleQ;
-}
-
-
-extern "C" void QuotesCancelCB(FL_OBJECT *, long)
-{
- fl_hide_form(fd_form_quotes->form_quotes);
-}
-
-
-extern "C" void QuotesOKCB(FL_OBJECT * ob, long data)
-{
- QuotesApplyCB(ob, data);
- QuotesCancelCB(ob, data);
-}
-#else
-// this is needed for now!
-extern "C" void ChoiceClassCB(FL_OBJECT *, long) {}
-extern "C" void DocumentDefskipCB(FL_OBJECT *, long) {}
-extern "C" void DocumentSpacingCB(FL_OBJECT *, long) {}
-extern "C" void DocumentApplyCB(FL_OBJECT *, long) {}
-extern "C" void DocumentCancelCB(FL_OBJECT *, long) {}
-extern "C" void DocumentOKCB(FL_OBJECT *, long) {}
-extern "C" void DocumentBulletsCB(FL_OBJECT *, long) {}
-extern "C" void QuotesApplyCB(FL_OBJECT *, long) {}
-extern "C" void QuotesCancelCB(FL_OBJECT *, long) {}
-extern "C" void QuotesOKCB(FL_OBJECT *, long) {}
-#endif
-
-
/* callbacks for form form_preamble */
extern "C" void PreambleCancelCB(FL_OBJECT *, long)
}
-/* callbacks for form form_table */
-
-extern "C"
-void TableApplyCB(FL_OBJECT *, long)
-{
- if (!current_view->available())
- return;
-
- current_view->owner()->getMiniBuffer()->Set(_("Inserting table..."));
-
- int const ysize = int(fl_get_slider_value(fd_form_table->slider_columns) + 0.5);
- int const xsize = int(fl_get_slider_value(fd_form_table->slider_rows) + 0.5);
-
-
- current_view->hideCursor();
- current_view->beforeChange();
- current_view->update(BufferView::SELECT|BufferView::FITCUR);
-
- current_view->text->SetCursorParUndo(current_view->buffer());
- current_view->text->FreezeUndo();
-
- current_view->text->BreakParagraph(current_view);
- current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
-
- if (current_view->text->cursor.par()->Last()) {
- current_view->text->CursorLeft(current_view);
-
- current_view->text->BreakParagraph(current_view);
- current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
- }
-
- current_view->text->current_font.setLatex(LyXFont::OFF);
- //if (!fl_get_button(fd_form_table->check_latex)){
- // insert the new wysiwy table
- current_view->text->SetLayout(current_view, 0); // standard layout
-#ifndef NEW_INSETS
- if (current_view->text->cursor.par()->footnoteflag ==
- LyXParagraph::NO_FOOTNOTE) {
-#endif
- current_view->text
- ->SetParagraph(current_view, 0, 0,
- 0, 0,
- VSpace (0.3 * current_view->buffer()->
- params.spacing.getValue(),
- LyXLength::CM),
- VSpace (0.3 * current_view->buffer()->
- params.spacing.getValue(),
- LyXLength::CM),
- LYX_ALIGN_CENTER,
- string(),
- 0);
-#ifndef NEW_INSETS
- } else {
- current_view->text
- ->SetParagraph(current_view, 0, 0,
- 0, 0,
- VSpace(VSpace::NONE),
- VSpace(VSpace::NONE),
- LYX_ALIGN_CENTER,
- string(),
- 0);
- }
-#endif
- Language const * lang =
- current_view->text->cursor.par()->getParLanguage(current_view->buffer()->params);
- LyXFont font(LyXFont::ALL_INHERIT, lang);
- for (int i = 0; i < xsize * ysize - 1; ++i) {
- current_view->text->cursor.par()
- ->InsertChar(0, LyXParagraph::META_NEWLINE, font);
- }
- current_view->text->RedoParagraph(current_view);
-
- current_view->text->UnFreezeUndo();
-
- current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
- current_view->owner()->getMiniBuffer()->Set(_("Table inserted"));
- current_view->setState();
-}
-
-
-extern "C"
-void TableCancelCB(FL_OBJECT *, long)
-{
- fl_hide_form(fd_form_table->form_table);
-}
-
-
-extern "C"
-void TableOKCB(FL_OBJECT * ob, long data)
-{
- TableApplyCB(ob, data);
- TableCancelCB(ob, data);
-}
-
-
void Figure()
{
if (fd_form_figure->form_figure->visible) {
}
-void Table()
-{
- if (fd_form_table->form_table->visible) {
- fl_raise_form(fd_form_table->form_table);
- } else {
- fl_show_form(fd_form_table->form_table,
- FL_PLACE_MOUSE, FL_FULLBORDER,
- _("Insert Table"));
- }
-}
-
-
/* callbacks for form form_figure */
extern "C"
void FigureApplyCB(FL_OBJECT *, long)
#define LYX_CB_H
#include "LString.h"
+#include "lyxfont.h"
class BufferParams;
using std::endl;
FD_form_title * fd_form_title;
-FD_form_paragraph * fd_form_paragraph;
-FD_form_paragraph_extra * fd_form_paragraph_extra;
FD_form_character * fd_form_character;
-FD_form_document * fd_form_document;
-FD_form_paper * fd_form_paper;
-FD_form_table_options * fd_form_table_options;
-FD_form_table_extra * fd_form_table_extra;
-FD_form_quotes * fd_form_quotes;
FD_form_preamble * fd_form_preamble;
-FD_form_table * fd_form_table;
FD_form_sendto * fd_form_sendto;
FD_form_figure * fd_form_figure;
FD_LaTeXLog * fd_latex_log; // from log_form.h
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
fl_end_form();
}
-
- // the paragraph form
- fd_form_paragraph = create_form_form_paragraph();
- fl_set_form_atclose(fd_form_paragraph->form_paragraph,
- CancelCloseBoxCB, 0);
- fl_addto_choice(fd_form_paragraph->choice_space_above,
- _(" None | Defskip | Smallskip "
- "| Medskip | Bigskip | VFill | Length "));
- fl_addto_choice(fd_form_paragraph->choice_space_below,
- _(" None | Defskip | Smallskip "
- "| Medskip | Bigskip | VFill | Length "));
- fl_set_input_return(fd_form_paragraph->input_space_above,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paragraph->input_space_below,
- FL_RETURN_ALWAYS);
-
- // the paragraph extra form
- fd_form_paragraph_extra = create_form_form_paragraph_extra();
- fl_set_form_atclose(fd_form_paragraph_extra->form_paragraph_extra,
- CancelCloseBoxCB, 0);
- fl_set_input_return(fd_form_paragraph_extra->input_pextra_width,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paragraph_extra->input_pextra_widthp,
- FL_RETURN_ALWAYS);
- lyxerr[Debug::INIT] << "Initializing form_paragraph...done" << endl;
// the character form
fd_form_character = create_form_form_character();
// build up the combox entries
combo_language2->addto(_("No change"));
combo_language2->addto(_("Reset"));
- for(Languages::const_iterator cit = languages.begin();
+ for(Languages::iterator cit = languages.begin();
cit != languages.end(); ++cit) {
if ((*cit).second.lang() != "default")
combo_language2->addto((*cit).second.lang().c_str());
}
combo_language2->select_text(_("No change"));
-#ifdef USE_OLD_DOCUMENT_LAYOUT
- // the document form
- fd_form_document = create_form_form_document();
- fl_set_form_atclose(fd_form_document->form_document,
- CancelCloseBoxCB, 0);
- fl_addto_choice(fd_form_document->choice_spacing,
- _(" Single | OneHalf | Double | Other "));
-
- fl_set_counter_bounds(fd_form_document->slider_secnumdepth,-2, 5);
- fl_set_counter_bounds(fd_form_document->slider_tocdepth,-1, 5);
- fl_set_counter_step(fd_form_document->slider_secnumdepth, 1, 1);
- fl_set_counter_step(fd_form_document->slider_tocdepth, 1, 1);
- fl_set_counter_precision(fd_form_document->slider_secnumdepth, 0);
- fl_set_counter_precision(fd_form_document->slider_tocdepth, 0);
- fl_addto_form(fd_form_document->form_document);
- combo_language = new Combox(FL_COMBOX_DROPLIST);
- ob = fd_form_document->choice_language;
- combo_language->add(ob->x, ob->y, ob->w, ob->h, 250);
- combo_language->shortcut("#G", 1);
- fl_end_form();
-
- // "default" is not part of the languages array any more.
- combo_language->addto("default");
- for(Languages::const_iterator cit = languages.begin();
- cit != languages.end(); ++cit) {
- combo_language->addto((*cit).second.lang().c_str());
- }
-
- // not really necessary, but we can do it anyway.
- fl_addto_choice(fd_form_document->choice_fontsize, "default|10|11|12");
- int n;
- for (n = 0; tex_fonts[n][0]; ++n) {
- fl_addto_choice(fd_form_document->choice_fonts, tex_fonts[n]);
- }
-
- fl_addto_choice(fd_form_document->choice_inputenc,
- "default|auto|latin1|latin2|latin5"
- "|koi8-r|koi8-u|cp866|cp1251|iso88595");
-
- for (n = 0; tex_graphics[n][0]; ++n) {
- fl_addto_choice(fd_form_document->choice_postscript_driver,
- tex_graphics[n]);
- }
- // not really necessary, but we can do it anyway.
- fl_addto_choice(fd_form_document->choice_pagestyle,
- "default|empty|plain|headings|fancy");
- fl_addto_choice(fd_form_document->choice_default_skip,
- _(" Smallskip | Medskip | Bigskip | Length "));
- fl_set_input_return(fd_form_document->input_default_skip,
- FL_RETURN_ALWAYS);
- fl_set_form_minsize(fd_form_document->form_document,
- fd_form_document->form_document->w,
- fd_form_document->form_document->h);
- lyxerr[Debug::INIT] << "Initializing form_document...done" << endl;
-
- // the paper form
- fd_form_paper = create_form_form_paper();
- fl_set_form_atclose(fd_form_paper->form_paper,
- CancelCloseBoxCB, 0);
- fl_addto_choice(fd_form_paper->choice_papersize2,
- _(" Default | Custom | USletter | USlegal "
- "| USexecutive | A3 | A4 | A5 | B3 | B4 | B5 "));
- fl_addto_choice(fd_form_paper->choice_paperpackage,
- _(" None "
- "| A4 small Margins (only portrait) "
- "| A4 very small Margins (only portrait) "
- "| A4 very wide margins (only portrait) "));
- fl_set_input_return(fd_form_paper->input_custom_width,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paper->input_custom_height,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paper->input_top_margin,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paper->input_bottom_margin,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paper->input_left_margin,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paper->input_right_margin,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paper->input_head_height,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paper->input_head_sep,
- FL_RETURN_ALWAYS);
- fl_set_input_return(fd_form_paper->input_foot_skip,
- FL_RETURN_ALWAYS);
- lyxerr[Debug::INIT] << "Initializing form_paper...done" << endl;
-#endif
-
-#ifdef USE_OLD_DOCUMENT_LAYOUT
- // the quotes form
- fd_form_quotes = create_form_form_quotes();
- fl_set_form_atclose(fd_form_quotes->form_quotes,
- CancelCloseBoxCB, 0);
- // Is it wrong of me to use « » instead of << >> ? (Lgb)
- // Maybe if people use a font other than latin1... (JMarc)
- fl_addto_choice(fd_form_quotes->choice_quotes_language,
- _(" ``text'' | ''text'' | ,,text`` | ,,text'' | «text» | »text« "));
-#endif
-
// the preamble form
fd_form_preamble = create_form_form_preamble();
fl_set_form_atclose(fd_form_preamble->form_preamble,
#include "BufferView.h"
#include "bibforms.h"
#include "buffer.h"
-#include "bullet_forms.h"
#include "form1.h"
#include "gettext.h"
#include "include_form.h"
extern BufferView * current_view;
-extern FD_form_paragraph * fd_form_paragraph;
-extern FD_form_paragraph_extra * fd_form_paragraph_extra;
extern FD_form_character * fd_form_character;
-extern FD_form_document * fd_form_document;
-extern FD_form_paper * fd_form_paper;
-extern FD_form_table_options * fd_form_table_options;
-extern FD_form_quotes * fd_form_quotes;
extern FD_form_preamble * fd_form_preamble;
-extern FD_form_table * fd_form_table;
extern FD_form_sendto * fd_form_sendto;
extern FD_form_figure * fd_form_figure;
-extern FD_form_paragraph_extra * fd_form_paragraph_extra;
extern FD_LaTeXLog * fd_latex_log;
extern FD_form_spell_check * fd_form_spell_check;
-extern FD_form_bullet * fd_form_bullet;
extern FD_panel * fd_panel;
extern FD_delim * fd_delim;
extern FD_deco * fd_deco;
// have been created otherwise hiding one could cause a crash
// need the visible check otherwise XForms prints a warning
// if hiding an invisible form
- if (fd_form_paragraph->form_paragraph->visible) {
- fl_hide_form(fd_form_paragraph->form_paragraph);
- }
- if (fd_form_paragraph_extra->form_paragraph_extra->visible) {
- fl_hide_form(fd_form_paragraph_extra->form_paragraph_extra);
- }
if (fd_form_character->form_character->visible) {
fl_hide_form(fd_form_character->form_character);
}
-#ifdef USE_OLD_DOCUMENT_LAYOUT
- if (fd_form_document->form_document->visible) {
- fl_hide_form(fd_form_document->form_document);
- }
- if (fd_form_quotes->form_quotes->visible) {
- fl_hide_form(fd_form_quotes->form_quotes);
- }
- if (fd_form_paper->form_paper->visible) {
- fl_hide_form(fd_form_paper->form_paper);
- }
- if (fd_form_bullet) {
- if (fd_form_bullet->form_bullet->visible) {
- fl_hide_form(fd_form_bullet->form_bullet);
- }
- }
-#endif
if (fd_form_preamble->form_preamble->visible) {
fl_hide_form(fd_form_preamble->form_preamble);
}
// Again the Signal/Slot mechanism is tailor made for this task.
void updateAllVisibleBufferRelatedDialogs()
{
-#ifdef USE_OLD_DOCUMENT_LAYOUT
- if (fd_form_document->form_document->visible) {
- UpdateLayoutDocument();
- }
- if (fd_form_quotes->form_quotes->visible) {
- UpdateLayoutQuotes();
- }
- if (fd_form_paper->form_paper->visible) {
- UpdateLayoutPaper();
- }
-#endif
if (fd_form_preamble->form_preamble->visible) {
UpdateLayoutPreamble();
}
- if (fd_form_paragraph->form_paragraph->visible) {
- UpdateLayoutParagraph();
- }
- if (fd_form_paragraph_extra->form_paragraph_extra->visible) {
- UpdateParagraphExtra();
- }
- if (fd_form_bullet) {
- if (fd_form_bullet->form_bullet->visible) {
- updateBulletForm();
- }
- }
if (fd_latex_log->LaTeXLog->visible) {
LatexLogUpdate(0,0);
}
// Alarms user of something related to files
void WriteFSAlert(string const & s1, string const & s2)
{
- WriteAlert (s1, s2, strerror(errno));
+ WriteAlert(s1, s2, strerror(errno));
}
#include "MenuBackend.h"
#include "ToolbarDefaults.h"
#include "lyxlex.h"
-#if 1
-// only to get access to NEW_EXPORT
-#include "exporter.h"
-#endif
using std::endl;
// Execute batch commands if available
if (!batch_command.empty()) {
- lyxerr << "About to handle -x '" << batch_command << "'" << endl;
+ lyxerr << "About to handle -x '"
+ << batch_command << "'" << endl;
// no buffer loaded, create one
if (!last_loaded)
// Run configure in user lyx directory
Path p(user_lyxdir);
- system(AddName(system_lyxdir, "configure").c_str());
+ ::system(AddName(system_lyxdir, "configure").c_str());
lyxerr << "LyX: " << _("Done!") << endl;
}
if (i + 1 < *argc) {
string type(argv[i+1]);
removeargs = 2;
-#ifdef NEW_EXPORT
batch_command = "buffer-export " + type;
-#else
- if (type == "tex")
- type = "latex";
- else if (type == "ps")
- type = "postscript";
- else if (type == "text" || type == "txt")
- type = "ascii";
-
- if (type == "latex" || type == "postscript"
- || type == "linuxdoc" || type == "docbook"
- || type == "ascii" || type == "html")
- batch_command = "buffer-export " + type;
- else
- lyxerr << _("Unknown file type '")
- << type << _("' after ")
- << arg << _(" switch!") << endl;
-#endif
} else
lyxerr << _("Missing file type [eg latex, "
"ps...] after ")
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
fl_end_form();
- //fdui->xsendfax->fdui = fdui;
+ fdui->xsendfax->fdui = fdui;
return fdui;
}
fl_set_object_callback(obj, cb_select_phoneno, 0);
fl_end_form();
- //fdui->phonebook->fdui = fdui;
+ fdui->phonebook->fdui = fdui;
return fdui;
}
fl_set_object_callback(obj, FaxLogfileCloseCB, 0);
fl_end_form();
- //fdui->logfile->fdui = fdui;
+ fdui->logfile->fdui = fdui;
return fdui;
}
lyxerr << "CMD: " << cmd << endl;
Systemcalls one(Systemcalls::System, cmd);
show_logfile(logfile, false);
- remove(logfile.c_str());
+ lyx::unlink(logfile);
return true;
}
void cb_save_phoneno(FL_OBJECT *, long )
{
- FILE * fp = fopen(phone_book.c_str(), "w");
+ FILE * fp = ::fopen(phone_book.c_str(), "w");
if (!fp) {
WriteAlert(_("Error!"), _("Cannot open phone book: "), phone_book);
return;
// clear the selection (if there is any)
bv->toggleSelection(false);
bv->text->
- ReplaceSelectionWithString(bv, replacestring.c_str());
+ ReplaceSelectionWithString(bv, replacestring);
bv->text->
- SetSelectionOverString(bv, replacestring.c_str());
+ SetSelectionOverString(bv, replacestring);
bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
bv->update(BufferView::SELECT|BufferView::FITCUR);
bv->toggleSelection(false);
bv->text->
- ReplaceSelectionWithString(bv, replacestring.c_str());
+ ReplaceSelectionWithString(bv, replacestring);
bv->text->
- SetSelectionOverString(bv, replacestring.c_str());
+ SetSelectionOverString(bv, replacestring);
bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
++replace_count;
}
extern int MenuRunLaTeX(Buffer *);
extern int MenuBuildProg(Buffer *);
extern int MenuRunChktex(Buffer *);
-#ifndef NEW_EXPORT
-extern bool CreatePostscript(Buffer *, bool);
-#endif
extern void MenuPrint(Buffer *);
extern void MenuSendto();
extern void QuitLyX();
extern void MenuFax(Buffer *);
-#ifndef NEW_EXPORT
-extern void MenuExport(Buffer *, string const &);
-#endif
extern void show_symbols_form(LyXFunc *);
extern LyXAction lyxaction;
extern tex_accent_struct get_accent(kb_action action);
extern void AutoSave(BufferView *);
-#ifndef NEW_EXPORT
-extern bool PreviewDVI(Buffer *);
-extern bool PreviewPostscript(Buffer *);
-#endif
extern void MenuInsertLabel(string const &);
extern void MenuLayoutCharacter();
extern void MenuLayoutParagraph();
-extern void MenuLayoutDocument();
-extern void MenuLayoutPaper();
-#if 0
-extern void MenuLayoutTable(int flag);
-#endif
-extern void MenuLayoutQuotes();
extern void MenuLayoutPreamble();
extern void MenuLayoutSave();
-extern void bulletForm();
extern Buffer * NewLyxFile(string const &);
extern void LoadLyXFile(string const &);
static bool noLaTeX = lyxrc.latex_command == "none";
bool disable = false;
switch (action) {
-#ifndef NEW_EXPORT
- case LFUN_PREVIEW:
- disable = noLaTeX || lyxrc.view_dvi_command == "none";
- break;
- case LFUN_PREVIEWPS:
- disable = noLaTeX || lyxrc.view_ps_command == "none";
- break;
- case LFUN_RUNLATEX:
- case LFUN_RUNDVIPS:
- disable = noLaTeX;
- break;
-#endif
case LFUN_MENUPRINT:
disable = noLaTeX || lyxrc.print_command == "none";
break;
else if (argument == "linuxdoc")
disable = lyxrc.linuxdoc_to_lyx_command == "none";
break;
-#ifndef NEW_EXPORT
- case LFUN_EXPORT:
- if (argument == "latex")
- disable = (! buf->isLatex() && ! buf->isLiterate()) ;
- else if (argument == "linuxdoc")
- disable = ! buf->isLinuxDoc();
- else if (argument == "docbook")
- disable = ! buf->isDocBook();
- else if (argument == "dvi" || argument == "postscript")
- disable = noLaTeX;
- else if (argument == "html")
- disable = (buf->isLinuxDoc()
- && lyxrc.linuxdoc_to_html_command == "none")
- || (buf->isDocBook()
- && lyxrc.docbook_to_html_command == "none")
- || (! buf->isLinuxDoc() && ! buf->isDocBook()
- && lyxrc.html_command == "none");
- else if (argument == "custom")
- disable = (! buf->isLatex() && ! buf->isLiterate());
- break;
-#endif
case LFUN_UNDO:
disable = buf->undostack.empty();
break;
string line = frontStrip(s);
string arg = strip(frontStrip(split(line, cmd, ' ')));
- return Dispatch(lyxaction.LookupFunc(cmd.c_str()), arg);
+ return Dispatch(lyxaction.LookupFunc(cmd), arg);
}
// this is better
pseudoaction =
lyxaction.searchActionArg(action,
- argument.c_str());
+ argument);
if (pseudoaction == -1) {
pseudoaction = action;
if (!searched_string.empty() &&
((action == LFUN_WORDFINDBACKWARD) ?
- ltCur->SearchBackward(owner->view(), searched_string.c_str()) :
- ltCur->SearchForward(owner->view(), searched_string.c_str()))) {
+ ltCur->SearchBackward(owner->view(), searched_string) :
+ ltCur->SearchForward(owner->view(), searched_string))) {
// ??? What is that ???
owner->view()->update(BufferView::SELECT|BufferView::FITCUR);
reloadBuffer();
break;
-#ifdef NEW_EXPORT
case LFUN_UPDATE:
Exporter::Export(owner->buffer(), argument, true);
break;
case LFUN_PREVIEW:
Exporter::Preview(owner->buffer(), argument);
break;
-#else
- case LFUN_PREVIEW:
- PreviewDVI(owner->buffer());
- break;
-
- case LFUN_PREVIEWPS:
- PreviewPostscript(owner->buffer());
- break;
-
- case LFUN_RUNLATEX:
- MenuRunLaTeX(owner->buffer());
- break;
-
- case LFUN_RUNDVIPS:
- CreatePostscript(owner->buffer(), false);
- break;
-#endif
case LFUN_BUILDPROG:
MenuBuildProg(owner->buffer());
break;
case LFUN_EXPORT:
-#ifdef NEW_EXPORT
Exporter::Export(owner->buffer(), argument, false);
-#else
- MenuExport(owner->buffer(), argument);
-#endif
break;
case LFUN_IMPORT:
break;
case LFUN_LAYOUT_DOCUMENT:
-#ifdef USE_OLD_DOCUMENT_LAYOUT
- MenuLayoutDocument();
-#else
owner->getDialogs()->showLayoutDocument();
-#endif
break;
case LFUN_LAYOUT_PARAGRAPH:
MenuLayoutCharacter();
break;
-#if 0
- case LFUN_LAYOUT_TABLE:
- {
- int flag = 0;
- if (argument == "true") flag = 1;
- MenuLayoutTable(flag);
- }
- break;
-#endif
-
case LFUN_LAYOUT_TABULAR:
if (owner->view()->the_locking_inset) {
if (owner->view()->the_locking_inset->LyxCode()==Inset::TABULAR_CODE) {
}
break;
- case LFUN_LAYOUT_PAPER:
-#ifdef USE_OLD_DOCUMENT_LAYOUT
- MenuLayoutPaper();
-#endif
- break;
-
- case LFUN_LAYOUT_QUOTES:
-#ifdef USE_OLD_DOCUMENT_LAYOUT
- MenuLayoutQuotes();
-#endif
- break;
-
case LFUN_LAYOUT_PREAMBLE:
MenuLayoutPreamble();
break;
break;
case LFUN_INSERT_LABEL:
- MenuInsertLabel(argument.c_str());
+ MenuInsertLabel(argument);
break;
case LFUN_REF_INSERT:
{
int r = 2, c = 2;
if (!argument.empty())
- sscanf(argument.c_str(),"%d%d", &r, &c);
+ ::sscanf(argument.c_str(),"%d%d", &r, &c);
InsetTabular * new_inset =
new InsetTabular(owner->buffer(), r, c);
if (owner->view()->insertInset(new_inset))
{
int x;
long y;
- sscanf(argument.c_str(), " %d %ld", &x, &y);
+ ::sscanf(argument.c_str(), " %d %ld", &x, &y);
owner->view()->text->SetCursorFromCoordinates(owner->view(), x, y);
}
break;
{
char file_name[100];
int row;
- sscanf(argument.c_str(), " %s %d", file_name, &row);
+ ::sscanf(argument.c_str(), " %s %d", file_name, &row);
// Must replace extension of the file to be .lyx and get full path
string s = ChangeExtension(string(file_name), ".lyx");
case LFUN_APROPOS:
case LFUN_GETTIP:
{
- int qa = lyxaction.LookupFunc(argument.c_str());
+ int const qa = lyxaction.LookupFunc(argument);
setMessage(lyxaction.helpText(static_cast<kb_action>(qa)));
}
break;
case LFUN_INSERT_MATH:
{
- math_insert_symbol(argument.c_str());
+ math_insert_symbol(argument);
}
break;
setErrorMessage(N_("Missing argument"));
else {
string s1 = token(s, ' ', 1);
- int na = s1.empty() ? 0: atoi(s1.c_str());
+ int na = s1.empty() ? 0 : lyx::atoi(s1);
owner->view()->
open_new_inset(new InsetFormulaMacro(token(s, ' ', 0), na));
}
owner->view()->setState();
}
break;
-#endif
- case LFUN_BUFFERBULLETSSELECT:
- bulletForm();
- break;
-
+#endif
case LFUN_TOGGLECURSORFOLLOW:
cursor_follows_scrollbar = !cursor_follows_scrollbar;
break;
else
arg = lyxrc.date_insert_format;
char datetmp[32];
- int datetmp_len = strftime(datetmp, 32, arg.c_str(), now_tm);
+ int datetmp_len = ::strftime(datetmp, 32, arg.c_str(), now_tm);
for (int i = 0; i < datetmp_len; i++) {
owner->view()->text->InsertChar(owner->view(), datetmp[i]);
owner->view()->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
if (!prefix.empty()
- && prefixIs(tmpstr, prefix.c_str())) {
+ && prefixIs(tmpstr, prefix)) {
tmpstr.erase(0, prefix.length() - 1);
}
str += frontStrip(tmpstr, "\t") + '\n';
break;
}
- if ((action = lyxaction.LookupFunc(cmd.c_str()))>= 0) {
+ if ((action = lyxaction.LookupFunc(cmd))>= 0) {
if (lyxerr.debugging(Debug::KBMAP)) {
lyxerr << "RC_BIND: Sequence `"
<< seq << "' Command `"
<< cmd << "' Action `"
<< action << '\'' << endl;
}
- res = toplevel_keymap->bind(seq.c_str(),
- action);
+ res = toplevel_keymap->bind(seq, action);
if (res != 0) {
lexrc.printError(
"Invalid key sequence `"
#include "debug.h"
#include "LyXAction.h"
#include "support/lstrings.h"
+#include "support/lyxlib.h"
#ifdef __EMX__
#include <cstdlib>
NP_NOWAIT|0x01, 0600, 0600, 0);
if (rc == ERROR_PIPE_BUSY) {
#else
- if (access(tmp.c_str(), F_OK) == 0) {
+ if (::access(tmp.c_str(), F_OK) == 0) {
#endif
lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
<< "If no other LyX program is active, please delete"
return;
}
#ifndef __EMX__
- if (mkfifo(tmp.c_str(), 0600) < 0) {
+ if (::mkfifo(tmp.c_str(), 0600) < 0) {
lyxerr << "LyXComm: Could not create pipe " << tmp << '\n'
<< strerror(errno) << endl;
return;
};
- infd = open(tmp.c_str(), O_RDONLY|O_NONBLOCK);
+ infd = ::open(tmp.c_str(), O_RDONLY|O_NONBLOCK);
#else
if (rc != NO_ERROR) {
errnum = TranslateOS2Error(rc);
tmp = pipename + ".out";
#ifndef __EMX__
- if (access(tmp.c_str(), F_OK) == 0) {
+ if (::access(tmp.c_str(), F_OK) == 0) {
#else
rc = DosCreateNPipe(tmp.c_str(), &fd, NP_ACCESS_DUPLEX,
NP_NOWAIT|0x01, 0600, 0600, 0);
return;
}
#ifndef __EMX__
- if (mkfifo(tmp.c_str(), 0600) < 0) {
+ if (::mkfifo(tmp.c_str(), 0600) < 0) {
lyxerr << "LyXComm: Could not create pipe " << tmp << '\n'
<< strerror(errno) << endl;
return;
};
- if (access(tmp.c_str(), F_OK) != 0) {
+ if (::access(tmp.c_str(), F_OK) != 0) {
lyxerr << "LyXComm: Pipe " << tmp
<< " does not exist" << endl;
return;
}
- outfd = open(tmp.c_str(), O_RDWR);
+ outfd = ::open(tmp.c_str(), O_RDWR);
#else
if (rc != NO_ERROR) {
errnum = TranslateOS2Error(rc);
<< '\n' << strerror(errno) << endl;
}
#ifndef __EMX__ // OS/2 named pipes will be automatically removed.
- if (unlink(tmp.c_str()) < 0){
+ if (lyx::unlink(tmp) < 0){
lyxerr << "LyXComm: Could not remove pipe " << tmp
<< '\n' << strerror(errno) << endl;
};
return;
}
#endif
- if (close(outfd) < 0) {
+ if (::close(outfd) < 0) {
lyxerr << "LyXComm: Could not close pipe " << tmp
<< '\n' << strerror(errno) << endl;
}
#ifndef __EMX__
- if (unlink(tmp.c_str()) < 0){
+ if (lyx::unlink(tmp) < 0){
lyxerr << "LyXComm: Could not remove pipe " << tmp
<< '\n' << strerror(errno) << endl;
};
if (!ready) {
lyxerr << "LyXComm: Pipes are closed. Could not send "
<< msg << endl;
- } else if (write(outfd, msg.c_str(), msg.length()) < 0) {
+ } else if (::write(outfd, msg.c_str(), msg.length()) < 0) {
lyxerr << "LyXComm: Error sending message: " << msg
<< '\n' << strerror(errno)
<< "\nLyXComm: Resetting connection" << endl;
lyxerr[Debug::LYXSERVER] << "LyXServer: Received: '"
<< msg << '\'' << endl;
- char const *p = msg.c_str();
+ char const * p = msg.c_str();
// --- parse the string --------------------------------------------
//
// connect to the lyxfunc in the single LyXView we
// support currently. (Lgb)
- int action = lyxaction.LookupFunc(cmd.c_str());
+ int action = lyxaction.LookupFunc(cmd);
//int action = -1;
string rval, buf;
///
void CursorRight(BufferView *, bool internal = true) const;
///
- void CursorLeftIntern(BufferView *, bool internal = true) const;
- ///
- void CursorRightIntern(BufferView *, bool internal = true) const;
- ///
void CursorLeftOneWord(BufferView *) const;
///
void CursorRightOneWord(BufferView *) const;
string tmpf = tmpnam(0);
vcs->getLog(tmpf);
viewLog(tmpf);
- unlink(tmpf.c_str());
+ lyx::unlink(tmpf);
}
using std::vector;
using std::max;
-extern char * mathed_label;
+//extern char * mathed_label;
+extern string mathed_label;
extern char const * latex_special_chars;
int ret = 0;
//#warning Alejandro, the number of lines is not returned in this case
// This problem will disapear at 0.13.
- mathed_write(par, os, &ret, fragile, label.c_str());
+ mathed_write(par, os, &ret, fragile, label);
return ret;
}
mathed_parser_file(is, lex.GetLineNo());
// Silly hack to read labels.
- mathed_label = 0;
+ //mathed_label = 0;
+ mathed_label.erase();
+
mathed_parse(0, 0, &par);
par->Metrics();
disp_flag = (par->GetType() > 0);
// Update line number
lex.setLineNo(mathed_parser_lineno());
- if (mathed_label) {
+ //if (mathed_label) {
+ if (!mathed_label.empty()) {
label = mathed_label;
- mathed_label = 0;
+ //mathed_label = 0;
+ mathed_label.erase();
}
// reading of end_inset in the inset!!!
case LFUN_MATH_SIZE:
if (!arg.empty()) {
- latexkeys * l = in_word_set (arg.c_str(), strlen(arg.c_str()));
+ latexkeys * l = in_word_set (arg);
int sz = (l) ? l->id: -1;
mathcursor->SetSize(sz);
UpdateLocal(bv);
case LFUN_INSERT_MATH:
{
bv->lockedInsetStoreUndo(Undo::INSERT);
- InsertSymbol(bv, arg.c_str());
+ InsertSymbol(bv, arg);
break;
}
if (n > 0) {
if (isdigit(lf[0]))
- ilf = atoi(lf);
+ ilf = lyx::atoi(lf);
else
if (lf[1]) {
l = in_word_set(lf, strlen(lf));
if (n > 1) {
if (isdigit(rg[0]))
- irg = atoi(rg);
+ irg = lyx::atoi(rg);
else
if (rg[1]) {
l = in_word_set(rg, strlen(rg));
if (!lb.empty() && lb[0] > ' ') {
SetNumber(true);
if (par->GetType() == LM_OT_MPARN) {
- mathcursor->setLabel(lb.c_str());
+ mathcursor->setLabel(lb);
// MathMatrixInset *mt = (MathMatrixInset*)par;
// mt->SetLabel(lb);
} else {
InsetFormulaMacro::InsetFormulaMacro(string nm, int na, bool /*e*/)
: InsetFormula(true), name(nm)
{
- tmacro = MathMacroTable::mathMTable.getTemplate(name.c_str());
+ tmacro = MathMacroTable::mathMTable.getTemplate(name);
if (!tmacro) {
tmacro = new MathMacroTemplate(name.c_str(), na);
MathMacroTable::mathMTable.addTemplate(tmacro);
int action, string const & arg)
{
if (action == LFUN_MATH_MACROARG) {
- int i = atoi(arg.c_str()) - 1;
+ int i = lyx::atoi(arg) - 1;
if (i >= 0 && i < tmacro->getNoArgs()) {
mathcursor->Insert(tmacro->getMacroPar(i), LM_TC_INSET);
InsetFormula::UpdateLocal(bv);
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
fl_set_object_callback(obj, button_cb, MM_SQRT);
fdui->frac = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 40, 15, 30, 30, "");
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
- fl_set_object_lcol(obj, FL_COL1);
+ fl_set_object_lcolor(obj, FL_COL1);
fl_set_object_callback(obj, button_cb, MM_FRAC);
fdui->delim = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 50, 30, 30, "");
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
fl_set_object_callback(obj, button_cb, MM_SPACE);
fl_end_form();
- //fdui->panel->fdui = fdui;
+ fdui->panel->fdui = fdui;
return fdui;
}
fdui->delim = fl_bgn_form(FL_NO_BOX, 250, 260);
obj = fl_add_box(FL_UP_BOX, 0, 0, 250, 260, "");
fdui->menu = obj = fl_add_bmtable(FL_PUSH_BUTTON, 40, 70, 170, 140, "");
- fl_set_object_lcol(obj, FL_BLUE);
+ fl_set_object_lcolor(obj, FL_BLUE);
fl_set_object_callback(obj, delim_cb, 2);
fdui->lado = fl_bgn_group();
fl_set_object_callback(obj, delim_cb, MM_OK);
fl_end_form();
- //fdui->delim->fdui = fdui;
+ fdui->delim->fdui = fdui;
return fdui;
}
fl_set_object_callback(obj, matrix_cb, MM_APPLY);
fl_end_form();
- //fdui->matrix->fdui = fdui;
+ fdui->matrix->fdui = fdui;
return fdui;
}
fdui->deco = fl_bgn_form(FL_NO_BOX, 160, 150);
obj = fl_add_box(FL_UP_BOX, 0, 0, 160, 150, "");
fdui->menu = obj = fl_add_bmtable(FL_PUSH_BUTTON, 10, 10, 140, 90, "");
- fl_set_object_lcol(obj, FL_BLUE);
+ fl_set_object_lcolor(obj, FL_BLUE);
fl_set_object_callback(obj, deco_cb, MM_APPLY);
obj = fl_add_button(FL_RETURN_BUTTON, 30, 110, 100, 30, _("Close"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, deco_cb, MM_CLOSE);
fl_end_form();
- //fdui->deco->fdui = fdui;
+ fdui->deco->fdui = fdui;
return fdui;
}
fl_end_form();
- //fdui->space->fdui = fdui;
+ fdui->space->fdui = fdui;
return fdui;
}
void MathMatrixInset::SetAlign(char vv, string const & hh)
{
v_align = vv;
- strncpy(h_align, hh.c_str(), nc);
+ ::strncpy(h_align, hh.c_str(), nc);
}
/* --------------------- MathMacroTemplate ---------------------------*/
-MathMacroTemplate::MathMacroTemplate(char const * nm, int na, int flg):
+MathMacroTemplate::MathMacroTemplate(string const & nm, int na, int flg):
MathParInset(LM_ST_TEXT, nm, LM_OT_MACRO),
flags(flg), nargs(na)
{
public:
/// A template constructor needs all the data
explicit
- MathMacroTemplate(char const *, int na = 0, int f = 0);
+ MathMacroTemplate(string const &, int na = 0, int f = 0);
///
~MathMacroTemplate();
///
case MM_APPLY:
case MM_OK:
{
- char c = v_align_c[fl_get_choice(fd_matrix->valign)-1];
+ char c = v_align_c[fl_get_choice(fd_matrix->valign) - 1];
char const * sh = fl_get_input(fd_matrix->halign);
- int nx = int(fl_get_slider_value(fd_matrix->columns)+0.5);
- int ny = int(fl_get_slider_value(fd_matrix->rows)+0.5);
+ int nx = int(fl_get_slider_value(fd_matrix->columns) + 0.5);
+ int ny = int(fl_get_slider_value(fd_matrix->rows) + 0.5);
if (data == MM_OK) fl_hide_form(fd_matrix->matrix);
std::ostringstream ost;
ost << nx << ' ' << ny << ' ' << c << sh;
*/
#include <config.h>
-#include <cstdlib>
+
#include <cctype>
#ifdef __GNUG__
#include "math_macro.h"
#include "math_root.h"
#include "debug.h"
+#include "support/lyxlib.h"
using std::istream;
using std::endl;
FLAG_BRACK_END = 256 // Next ] ends the parsing process
};
+static
YYSTYPE yylval;
-static short mathed_env = LM_EN_INTEXT;
+static
+short mathed_env = LM_EN_INTEXT;
+
+string mathed_label;
-char * mathed_label = 0;
char const * latex_mathenv[] = {
"math",
};
+
char const * latex_mathspace[] = {
"!", ",", ":", ";", "quad", "qquad"
};
-
+
+
char const * latex_special_chars = "#$%&_{}";
// These are lexical codes, not semantic
static istream * yyis;
static bool yy_mtextmode= false;
-static inline
-char * strnew(char const * s)
-{
- char * s1 = new char[strlen(s) + 1]; // this leaks when not delete[]'ed
- strcpy(s1, s);
- return s1;
-}
-
-
static
void mathPrintError(string const & msg)
{
static
char LexGetArg(char lf, bool accept_spaces= false)
{
- char rg;
- char * p = &yytext[0];
- int bcnt = 1;
unsigned char c;
char cc;
while (yyis->good()) {
break;
}
}
- rg = (lf == '{') ? '}': ((lf == '[') ? ']': ((lf == '(') ? ')': 0));
+ char const rg =
+ (lf == '{') ? '}' : ((lf == '[') ? ']' : ((lf == '(') ? ')' : 0));
if (!rg) {
lyxerr << "Math parse error: unknown bracket '"
<< lf << "'" << endl;
return '\0';
- }
+ }
+ char * p = &yytext[0];
+ int bcnt = 1;
do {
yyis->get(cc);
c = cc;
if (c == lf) ++bcnt;
if (c == rg) --bcnt;
- if ((c > ' ' || (c == ' ' && accept_spaces)) && bcnt>0) *(p++) = c;
+ if ((c > ' ' || (c == ' ' && accept_spaces)) && bcnt > 0) *(p++) = c;
} while (bcnt > 0 && yyis->good());
*p = '\0';
return rg;
int yylex(void)
{
static int init_done = 0;
- unsigned char c;
- char cc;
if (!init_done) LexInitCodes();
+ unsigned char c;
+ char cc;
while (yyis->good()) {
yyis->get(cc);
c = cc;
if (yy_mtextmode && c == ' ') {
yylval.i= ' ';
return LM_TK_ALPHA;
- }
+ } else
if (lexcode[c] == LexNewLine) {
++yylineno;
continue;
- }
+ } else
- if (lexcode[c] == LexComment)
- do { yyis->get(cc); c = cc; } while (c != '\n' % yyis->good()); // eat comments
-
- if (lexcode[c] == LexDigit || lexcode[c] == LexOther || lexcode[c] == LexMathSpace) { yylval.i = c; return LM_TK_STR; }
- if (lexcode[c] == LexAlpha) { yylval.i= c; return LM_TK_ALPHA; }
- if (lexcode[c] == LexBOP) { yylval.i= c; return LM_TK_BOP; }
- if (lexcode[c] == LexSelf) { return c; }
+ if (lexcode[c] == LexComment) {
+ do {
+ yyis->get(cc);
+ c = cc;
+ } while (c != '\n' % yyis->good()); // eat comments
+ } else
+
+ if (lexcode[c] == LexDigit
+ || lexcode[c] == LexOther
+ || lexcode[c] == LexMathSpace) {
+ yylval.i = c;
+ return LM_TK_STR;
+ } else
+ if (lexcode[c] == LexAlpha) {
+ yylval.i= c;
+ return LM_TK_ALPHA;
+ } else
+ if (lexcode[c] == LexBOP) {
+ yylval.i= c;
+ return LM_TK_BOP;
+ } else
+ if (lexcode[c] == LexSelf) {
+ return c;
+ } else
if (lexcode[c] == LexArgument) {
yyis->get(cc);
c = cc;
yylval.i = c - '0';
return LM_TK_ARGUMENT;
- }
- if (lexcode[c] == LexOpen) { return LM_TK_OPEN; }
- if (lexcode[c] == LexClose) { return LM_TK_CLOSE; }
-
+ } else
+ if (lexcode[c] == LexOpen) {
+ return LM_TK_OPEN;
+ } else
+ if (lexcode[c] == LexClose) {
+ return LM_TK_CLOSE;
+ } else
if (lexcode[c] == LexESC) {
yyis->get(cc);
c = cc;
- if (c == '\\') { return LM_TK_NEWLINE; }
- if (c == '(') { yylval.i = LM_EN_INTEXT; return LM_TK_BEGIN; }
- if (c == ')') { yylval.i = LM_EN_INTEXT; return LM_TK_END; }
- if (c == '[') { yylval.i = LM_EN_DISPLAY; return LM_TK_BEGIN; }
- if (c == ']') { yylval.i = LM_EN_DISPLAY; return LM_TK_END; }
+ if (c == '\\') {
+ return LM_TK_NEWLINE;
+ }
+ if (c == '(') {
+ yylval.i = LM_EN_INTEXT;
+ return LM_TK_BEGIN;
+ }
+ if (c == ')') {
+ yylval.i = LM_EN_INTEXT;
+ return LM_TK_END;
+ }
+ if (c == '[') {
+ yylval.i = LM_EN_DISPLAY;
+ return LM_TK_BEGIN;
+ }
+ if (c == ']') {
+ yylval.i = LM_EN_DISPLAY;
+ return LM_TK_END;
+ }
if (strchr(latex_special_chars, c)) {
yylval.i = c;
return LM_TK_SPECIAL;
- }
+ }
if (lexcode[c] == LexMathSpace) {
int i;
for (i = 0; i < 4 && static_cast<int>(c) != latex_mathspace[i][0]; ++i);
- yylval.i = (i < 4) ? i: 0;
+ yylval.i = (i < 4) ? i : 0;
return LM_TK_SPACE;
}
if (lexcode[c] == LexAlpha || lexcode[c] == LexDigit) {
}
+static
int parse_align(char * hor, char *)
{
int nc = 0;
// Accent hacks only for 0.12. Stolen from Cursor.
+static
int accent = 0;
+static
int nestaccent[8];
+static
void setAccent(int ac)
{
if (ac > 0 && accent < 8) {
}
+static
MathedInset * doAccent(byte c, MathedTextCodes t)
{
MathedInset * ac = 0;
}
+static
MathedInset * doAccent(MathedInset * p)
{
MathedInset * ac = 0;
LyxArrayBase * mathed_parse(unsigned flags, LyxArrayBase * array,
MathParInset ** mtx)
{
- int t = yylex(), tprev = 0;
+ int t = yylex();
+ int tprev = 0;
bool panic = false;
static int plevel = -1;
static int size = LM_ST_TEXT;
MathedTextCodes varcode = LM_TC_VAR;
MathedInset * binset = 0;
- static MathMacroTemplate * macro= 0;
+ static MathMacroTemplate * macro = 0;
int brace = 0;
int acc_brace = 0;
int na = 0;
LexGetArg('{');
- // This name lives until quitting, for that reason
- // I didn't care on deleting explicitly. Later I will.
- char const * name = strnew(&yytext[1]);
+ string const name(&yytext[1]);
+
// ugly trick to be removed soon (lyx3)
- char c; yyis->get(c);
- yyis->putback(c);
+ //char c; yyis->get(c);
+ //yyis->putback(c);
+ char const c = yyis->peek();
if (c == '[') {
LexGetArg('[');
- na = atoi(yytext);
+ na = lyx::atoi(yytext);
}
macro = new MathMacroTemplate(name, na);
flags = FLAG_BRACE|FLAG_BRACE_LAST;
case LM_TK_STR:
{
if (accent) {
- data.Insert(doAccent(yylval.i, LM_TC_CONST));
+ data.Insert(doAccent(yylval.i, LM_TC_CONST));
} else
data.Insert (yylval.i, LM_TC_CONST);
break;
{
if (flags & FLAG_BRACK_ARG) {
flags &= ~FLAG_BRACK_ARG;
- char rg = LexGetArg('[');
- if (rg!= ']') {
+ char const rg = LexGetArg('[');
+ if (rg != ']') {
mathPrintError("Expected ']'");
panic = true;
break;
if (accent) {
data.Insert(doAccent(yylval.l->id, tc));
} else
- data.Insert (yylval.l->id, tc);
+ data.Insert(yylval.l->id, tc);
} else {
MathFuncInset * bg = new MathFuncInset(yylval.l->name);
if (accent) {
if (accent) {
data.Insert(doAccent(yylval.i, LM_TC_BOP));
} else
- data.Insert (yylval.i, LM_TC_BOP);
+ data.Insert(yylval.i, LM_TC_BOP);
break;
}
case LM_TK_STY:
case LM_TK_LEFT:
{
- int lfd, rgd;
- lfd = yylex();
+ int lfd = yylex();
if (lfd == LM_TK_SYM || lfd == LM_TK_STR || lfd == LM_TK_BOP|| lfd == LM_TK_SPECIAL)
lfd = (lfd == LM_TK_SYM) ? yylval.l->id: yylval.i;
// lyxerr << "L[" << lfd << " " << lfd << "]";
LyxArrayBase * a = mathed_parse(FLAG_RIGHT);
- rgd = yylex();
+ int rgd = yylex();
// lyxerr << "R[" << rgd << "]";
if (rgd == LM_TK_SYM || rgd == LM_TK_STR || rgd == LM_TK_BOP || rgd == LM_TK_SPECIAL)
rgd = (rgd == LM_TK_SYM) ? yylval.l->id: yylval.i;
break;
}
- case LM_TK_ACCENT: setAccent(yylval.l->id); break;
+ case LM_TK_ACCENT:
+ setAccent(yylval.l->id);
+ break;
case LM_TK_NONUM:
{
rg = LexGetArg('{');
}
strcpy(ar, yytext);
- int nc = parse_align(ar, ar2);
+ int const nc = parse_align(ar, ar2);
MathParInset * mm = new MathMatrixInset(nc, 0);
mm->SetAlign(ar2[0], ar);
data.Insert(mm, LM_TC_ACTIVE_INSET);
mathed_parse(FLAG_END, mm->GetData(), &mm);
- } else
- if (yylval.i >= LM_EN_INTEXT && yylval.i<= LM_EN_EQNARRAY) {
+ } else if (yylval.i >= LM_EN_INTEXT && yylval.i<= LM_EN_EQNARRAY) {
if (plevel!= 0) {
mathPrintError("Misplaced environment");
break;
case LM_TK_LABEL:
{
- char rg = LexGetArg('\0', true);
+ char const rg = LexGetArg('\0', true);
if (rg != '}') {
mathPrintError("Expected '{'");
// debug info
break;
}
if (crow) {
- // This is removed by crow's destructor. Bad design? yes, this
- // will be changed after 0.12
- crow->setLabel(strnew(yytext));
- }
- else {
- // where is this math_label free'ed?
- // Supposedly in ~formula, another bad hack,
- // give me some time please.
- mathed_label = strnew(yytext);
+ crow->setLabel(yytext);
+ } else {
+ mathed_label = yytext;
}
#ifdef DEBUG
lyxerr << "Label[" << mathed_label << "]" << endl;
if (panic) {
lyxerr << " Math Panic, expect problems!" << endl;
// Search for the end command.
- do t = yylex (); while (t != LM_TK_END && t);
+ do {
+ t = yylex ();
+ } while (t != LM_TK_END && t);
} else
t = yylex ();
latexkeys * l;
};
-extern YYSTYPE yylval;
-
#endif
p1 = ppar->pextra_width,
p2 = ppar->pextra_widthp;
ppar->SetPExtraType(bparams, ppar->pextra_type,
- p1.c_str(), p2.c_str());
+ p1, p2);
}
if ((par->pextra_type == PEXTRA_NONE) &&
npar && (npar->pextra_type != PEXTRA_NONE)) {
p1 = npar->pextra_width,
p2 = npar->pextra_widthp;
npar->SetPExtraType(bparams, npar->pextra_type,
- p1.c_str(), p2.c_str());
+ p1, p2);
}
}
}
p1 = ppar->pextra_width,
p2 = ppar->pextra_widthp;
ppar->SetPExtraType(bparams, ppar->pextra_type,
- p1.c_str(), p2.c_str());
+ p1, p2);
}
if ((par->pextra_type == PEXTRA_NONE) &&
npar && (npar->pextra_type != PEXTRA_NONE)) {
p1 = npar->pextra_width,
p2 = npar->pextra_widthp;
npar->SetPExtraType(bparams, npar->pextra_type,
- p1.c_str(), p2.c_str());
+ p1, p2);
}
}
}
need_closing = true;
}
- //BufferParams * params = ¤t_view->buffer()->params;
bool footer_in_body = true;
switch (footnotekind) {
case LyXParagraph::FOOTNOTE:
<< pextra_width << "}\n";
else
os << "\\begin{floatingfigure}{"
- << atoi(pextra_widthp.c_str())/100.0
+ << lyx::atoi(pextra_widthp) / 100.0
<< "\\textwidth}\n";
} else {
os << "\\begin{figure}";
}
-void LyXParagraph::SetInsetOwner(Inset *i)
+void LyXParagraph::SetInsetOwner(Inset * i)
{
inset_owner = i;
for (InsetList::const_iterator cit = insetlist.begin();
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
fl_end_form();
- //fdui->form_sendto->fdui = fdui;
+ fdui->form_sendto->fdui = fdui;
return fdui;
}
-// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext
+// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
#include <config.h>
#include "lyx_gui_misc.h"
#include "gettext.h"
fl_set_object_callback(obj, SpellOptionsApplyCB, 0);
fl_end_form();
- //fdui->form_spell_options->fdui = fdui;
+ fdui->form_spell_options->fdui = fdui;
return fdui;
}
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
fl_end_form();
- //fdui->form_spell_check->fdui = fdui;
+ fdui->form_spell_check->fdui = fdui;
return fdui;
}
static
void sc_clean_up_after_error()
{
- fclose(out);
+ ::fclose(out);
}
// Send word to ispell and get reply
{
//Please rewrite to use string.
- fputs(word.c_str(), out);
- fputc('\n', out);
+ ::fputs(word.c_str(), out);
+ ::fputc('\n', out);
char buf[1024];
- fgets(buf, 1024, in);
+ ::fgets(buf, 1024, in);
/* I think we have to check if ispell is still alive here because
the signal-handler could have disabled blocking on the fd */
static inline
void sc_insert_word(string const & word)
{
- fputc('*', out); // Insert word in personal dictionary
- fputs(word.c_str(), out);
- fputc('\n', out);
+ ::fputc('*', out); // Insert word in personal dictionary
+ ::fputs(word.c_str(), out);
+ ::fputc('\n', out);
}
static inline
void sc_accept_word(string const & word)
{
- fputc('@', out); // Accept in this session
- fputs(word.c_str(), out);
- fputc('\n', out);
+ ::fputc('@', out); // Accept in this session
+ ::fputs(word.c_str(), out);
+ ::fputc('\n', out);
}
static inline
void sc_store_replacement(string const & mis, string const & cor) {
if(actual_spell_checker == ASC_ASPELL) {
- fputs("$$ra ", out);
- fputs(mis.c_str(), out);
- fputc(',', out);
- fputs(cor.c_str(), out);
- fputc('\n', out);
+ ::fputs("$$ra ", out);
+ ::fputs(mis.c_str(), out);
+ ::fputc(',', out);
+ ::fputs(cor.c_str(), out);
+ ::fputc('\n', out);
}
}
{
PspellConfig * config = new_pspell_config();
string code;
- (void)split(lang, code, '_');
+ split(lang, code, '_');
config->replace("language-tag", code.c_str());
spell_error_object = new_pspell_manager(config);
if (pspell_error_number(spell_error_object) != 0) {
isp_result * sc_check_word(string const & word)
{
isp_result * result = new isp_result;
+#warning Why isnt word_ok a bool? (Lgb)
int word_ok = pspell_manager_check(sc, word.c_str());
Assert(word_ok != -1);
fl_set_object_lcol(fd_form_spell_check->input, FL_INACTIVE);
fl_set_object_lcol(fd_form_spell_check->browser, FL_INACTIVE);
- while (true){
+ while (true) {
obj = fl_do_forms();
- if (obj == fd_form_spell_check->options){
+ if (obj == fd_form_spell_check->options) {
SpellCheckerOptions();
}
- if (obj == fd_form_spell_check->start){
+ if (obj == fd_form_spell_check->start) {
// activate insert, accept, and stop
fl_activate_object(fd_form_spell_check->insert);
fl_activate_object(fd_form_spell_check->accept);
void FileInfo::dostat(bool link)
{
if (link) {
- status = lstat(fname.c_str(), &buf);
+ status = ::lstat(fname.c_str(), &buf);
} else {
- status = stat(fname.c_str(), &buf);
+ status = ::stat(fname.c_str(), &buf);
}
if (status) err = errno;
}
return false;
}
}
+
+
+
{
regmatch_t tmp;
regexec(preg, str.c_str(), 1, &tmp, 0);
- unsigned int first = tmp.rm_so != -1 ?
+ unsigned int const first = tmp.rm_so != -1 ?
static_cast<unsigned int>(tmp.rm_so) : string::npos;
- unsigned int second = tmp.rm_eo != -1 ?
+ unsigned int const second = tmp.rm_eo != -1 ?
static_cast<unsigned int>(tmp.rm_eo) : string::npos;
return make_pair(first, second - first);
}
size_t nr = regerror(error_code, preg, 0, 0);
char * tmp = new char[nr];
regerror(error_code, preg, tmp, nr);
- string ret(tmp);
+ string const ret(tmp);
delete [] tmp;
return ret;
}
// func much faster, but client code will be simpler,
// because then it will only be needed to scan through
// all the entries in matches.
- size_t subs = (preg->re_nsub != 0 ? (preg->re_nsub + 1) : 1);
+ size_t const subs =
+ (preg->re_nsub != 0 ? (preg->re_nsub + 1) : 1);
regmatch_t * mat = new regmatch_t[subs];
unsigned int first = 0;
unsigned int second = 0;
LSubstring::LSubstring(string & s, LRegex const & r)
: ps(&s)
{
- LRegex::MatchPair res = r.first_match(s);
+ LRegex::MatchPair const res = r.first_match(s);
if (res.first != string::npos) {
n = res.second;
pos = res.first;
StrPool.C \
StrPool.h \
abort.C \
+ atoi.C \
block.h \
chdir.C \
copy.C \
path.h \
putenv.C \
rename.C \
+ rmdir.C \
sstream.h \
$(REGEX) syscall.C \
syscall.h \
syssingleton.C \
translator.h \
textutils.h \
+ unlink.C \
utility.hpp
StrPool::~StrPool()
{
- for (Pool::const_iterator cit = pool_.begin() ;
+ for (Pool::const_iterator cit = pool_.begin();
cit != pool_.end() ; ++cit) {
delete[] (*cit);
}
--- /dev/null
+#include <config.h>
+
+#include <cstdlib>
+
+#include "lyxlib.h"
+
+int lyx::atoi(string const & nstr)
+{
+ return ::atoi(nstr.c_str());
+}
return ::_chdir2(name);
#endif
}
+
+int lyx::chdir(string const & name)
+{
+#ifndef __EMX__
+ return ::chdir(name.c_str());
+#else
+ return ::_chdir2(name.c_str());
+#endif
+}
#include <fstream>
-//#include <stdio.h>
-
#include "support/lyxlib.h"
#include "LString.h"
-//#include "support/syscall.h"
#include "support/filetools.h"
bool lyx::copy(string const & from, string const & to)
{
-#if 0
- string command = "cp " + QuoteName(from) + " " + QuoteName(to);
- return Systemcalls().startscript(Systemcalls::System,
- command) == 0;
-#else
std::ifstream ifs(from.c_str());
if (!ifs) return false;
std::ofstream ofs(to.c_str(), std::ios::out|std::ios::trunc);
ofs << ifs.rdbuf();
if (ofs.good()) return true;
return false;
-#endif
}
string const MakeLatexName(string const & file)
{
string name = OnlyFilename(file);
- string path = OnlyPath(file);
+ string const path = OnlyPath(file);
for (string::size_type i = 0; i < name.length(); ++i) {
name[i] &= 0x7f; // set 8th bit to 0
};
// ok so we scan through the string twice, but who cares.
- string keep("abcdefghijklmnopqrstuvwxyz"
+ string const keep("abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"@!\"'()*+,-./0123456789:;<=>?[]`|");
// -1: error- couldn't find out
int IsDirWriteable (string const & path)
{
- string tmpfl(TmpFileName(path));
+ string const tmpfl(TmpFileName(path));
if (tmpfl.empty()) {
WriteFSAlert(_("LyX Internal Error!"),
{
// if `name' is an absolute path, we ignore the setting of `path'
// Expand Environmentvariables in 'name'
- string tmpname = ReplaceEnvironmentPath(name);
+ string const tmpname = ReplaceEnvironmentPath(name);
string fullname = MakeAbsPath(tmpname, path);
// search first without extension, then with it.
i18nLibFileSearch(string const & dir, string const & name,
string const & ext)
{
- string lang = token(string(GetEnv("LANG")), '_', 0);
+ string const lang = token(string(GetEnv("LANG")), '_', 0);
if (lang.empty() || lang == "C")
return LibFileSearch(dir, name, ext);
else {
- string tmp = LibFileSearch(dir, lang + '_' + name,
- ext);
+ string const tmp = LibFileSearch(dir, lang + '_' + name,
+ ext);
if (!tmp.empty())
return tmp;
else
string const GetEnv(string const & envname)
{
// f.ex. what about error checking?
- char const * const ch = getenv(envname.c_str());
- string envstr = !ch ? "" : ch;
+ char const * const ch = ::getenv(envname.c_str());
+ string const envstr = !ch ? "" : ch;
return envstr;
}
string const GetEnvPath(string const & name)
{
#ifndef __EMX__
- string pathlist = subst(GetEnv(name), ':', ';');
+ string const pathlist = subst(GetEnv(name), ':', ';');
#else
- string pathlist = subst(GetEnv(name), '\\', '/');
+ string const pathlist = subst(GetEnv(name), '\\', '/');
#endif
return strip(pathlist, ';');
}
char * leaker = new char[envstr.length() + 1];
envstr.copy(leaker, envstr.length());
leaker[envstr.length()] = '\0';
- int retval = lyx::putenv(leaker);
+ int const retval = lyx::putenv(leaker);
// If putenv does not make a copy of the char const * this
// is very dangerous. OTOH if it does take a copy this is the
#else
#ifdef HAVE_SETENV
string varname;
- string str = envstr.split(varname,'=');
- int retval = setenv(varname.c_str(), str.c_str(), true);
+ string const str = envstr.split(varname,'=');
+ int const retval = ::setenv(varname.c_str(), str.c_str(), true);
#else
// No environment setting function. Can this happen?
- int retval = 1; //return an error condition.
+ int const retval = 1; //return an error condition.
#endif
#endif
return retval == 0;
// if (filename == "." || filename == "..")
// continue;
// string unlinkpath(AddName(path, filename));
- // if (remove(unlinkpath.c_str()))
+ // if (lyx::unlink(unlinkpath))
// WriteFSAlert(_("Error! Could not remove file:"),
// unlinkpath);
// }
// return 0;
- DIR * dir = opendir(path.c_str());
+ DIR * dir = ::opendir(path.c_str());
if (!dir) {
WriteFSAlert (_("Error! Cannot open directory:"), path);
return -1;
struct dirent * de;
int return_value = 0;
while ((de = readdir(dir))) {
- string temp = de->d_name;
+ string const temp = de->d_name;
if (temp == "." || temp == "..")
continue;
- string unlinkpath = AddName (path, temp);
+ string const unlinkpath = AddName (path, temp);
lyxerr.debug() << "Deleting file: " << unlinkpath << endl;
bool deleted = true;
if (FileInfo(unlinkpath).isDir())
deleted = (DeleteAllFilesInDir(unlinkpath) == 0);
- deleted &= (remove(unlinkpath.c_str()) == 0);
+ deleted &= (lyx::unlink(unlinkpath) == 0);
if (!deleted) {
WriteFSAlert (_("Error! Could not remove file:"),
unlinkpath);
static
-string const CreateTmpDir (string const & tempdir, string const & mask)
+string const CreateTmpDir(string const & tempdir, string const & mask)
{
- string tmpfl(TmpFileName(tempdir, mask));
+ string const tmpfl(TmpFileName(tempdir, mask));
- if ((tmpfl.empty()) || lyx::mkdir (tmpfl.c_str(), 0777)) {
+ if ((tmpfl.empty()) || lyx::mkdir(tmpfl, 0777)) {
WriteFSAlert(_("Error! Couldn't create temporary directory:"),
tempdir);
return string();
static
-int DestroyTmpDir (string const & tmpdir, bool Allfiles)
+int DestroyTmpDir(string const & tmpdir, bool Allfiles)
{
#ifdef __EMX__
Path p(user_lyxdir);
#endif
if (Allfiles && DeleteAllFilesInDir(tmpdir)) return -1;
- if (rmdir(tmpdir.c_str())) {
+ if (lyx::rmdir(tmpdir)) {
WriteFSAlert(_("Error! Couldn't delete temporary directory:"),
tmpdir);
return -1;
}
-string const CreateBufferTmpDir (string const & pathfor)
+string const CreateBufferTmpDir(string const & pathfor)
{
return CreateTmpDir(pathfor, "lyx_bufrtmp");
}
-int DestroyBufferTmpDir (string const & tmpdir)
+int DestroyBufferTmpDir(string const & tmpdir)
{
return DestroyTmpDir(tmpdir, true);
}
-string const CreateLyXTmpDir (string const & deflt)
+string const CreateLyXTmpDir(string const & deflt)
{
if ((!deflt.empty()) && (deflt != "/tmp")) {
- if (lyx::mkdir(deflt.c_str(), 0777)) {
+ if (lyx::mkdir(deflt, 0777)) {
#ifdef __EMX__
Path p(user_lyxdir);
#endif
- string t(CreateTmpDir (deflt.c_str(), "lyx_tmp"));
+ string const t(CreateTmpDir(deflt, "lyx_tmp"));
return t;
} else
return deflt;
#ifdef __EMX__
Path p(user_lyxdir);
#endif
- string t(CreateTmpDir ("/tmp", "lyx_tmp"));
+ string const t(CreateTmpDir("/tmp", "lyx_tmp"));
return t;
}
}
return false;
}
- if (lyx::mkdir(temp.c_str(), permission)) {
+ if (lyx::mkdir(temp, permission)) {
WriteFSAlert (_("Error! Couldn't create directory:"), temp);
return false;
}
char * tbuf = new char[n];
// Safe. Hopefully all getcwds behave this way!
- while (((err = lyx::getcwd (tbuf, n)) == 0) && (errno == ERANGE)) {
+ while (((err = lyx::getcwd(tbuf, n)) == 0) && (errno == ERANGE)) {
// Buffer too small, double the buffersize and try again
delete[] tbuf;
n = 2 * n;
string const AddName(string const & path, string const & fname)
{
// Get basename
- string basename(OnlyFilename(fname));
+ string const basename(OnlyFilename(fname));
string buf;
return RTemp;
string Temp;
- string copy(RTemp);
+ string const copy(RTemp);
// Split by next /
RTemp = split(RTemp, Temp, '/');
string const AddPath(string const & path, string const & path_2)
{
string buf;
- string path2 = CleanupPath(path_2);
+ string const path2 = CleanupPath(path_2);
if (!path.empty() && path != "." && path != "./") {
buf = CleanupPath(path);
string const
ChangeExtension(string const & oldname, string const & extension)
{
- string::size_type last_slash = oldname.rfind('/');
+ string::size_type const last_slash = oldname.rfind('/');
string::size_type last_dot = oldname.rfind('.');
if (last_dot < last_slash && last_slash != string::npos)
last_dot = string::npos;
/// Return the extension of the file (not including the .)
string const GetExtension(string const & name)
{
- string::size_type last_slash = name.rfind('/');
- string::size_type last_dot = name.rfind('.');
+ string::size_type const last_slash = name.rfind('/');
+ string::size_type const last_dot = name.rfind('.');
if (last_dot != string::npos &&
(last_slash == string::npos || last_dot > last_slash))
return name.substr(last_dot + 1,
{
char LinkBuffer[512];
// Should be PATH_MAX but that needs autconf support
- int nRead = readlink(File.c_str(), LinkBuffer, sizeof(LinkBuffer)-1);
+ int const nRead = ::readlink(File.c_str(),
+ LinkBuffer, sizeof(LinkBuffer) - 1);
if (nRead <= 0)
return false;
LinkBuffer[nRead] = 0;
// of course the best would be to have a
// pstream (process stream), with the
// variants ipstream, opstream
- FILE * inf = popen(cmd.c_str(), "r");
+ FILE * inf = ::popen(cmd.c_str(), "r");
string ret;
int c = fgetc(inf);
while (c != EOF) {
a += '#';
FileInfo fileinfo(a);
if (fileinfo.exist()) {
- if (::remove(a.c_str()) != 0) {
+ if (lyx::unlink(a) != 0) {
WriteFSAlert(_("Could not delete auto-save file!"), a);
}
}
using std::tolower;
using std::toupper;
#endif
-
+
+
int compare_no_case(string const & s, string const & s2)
{
// ANSI C
if (str.empty()) return false;
// Remove leading and trailing white space chars.
- string tmpstr = frontStrip(strip(str, ' '), ' ');
+ string const tmpstr = frontStrip(strip(str, ' '), ' ');
if (tmpstr.empty()) return false;
string::const_iterator cit = tmpstr.begin();
{
if (isStrInt(str)) {
// Remove leading and trailing white space chars.
- string tmpstr = frontStrip(strip(str, ' '), ' ');
+ string const tmpstr = frontStrip(strip(str, ' '), ' ');
// Do the conversion proper.
- return atoi(tmpstr.c_str());
+ return lyx::atoi(tmpstr);
} else {
return 0;
}
if (str.empty()) return false;
// Remove leading and trailing white space chars.
- string tmpstr = frontStrip(strip(str, ' '), ' ');
+ string const tmpstr = frontStrip(strip(str, ' '), ' ');
if (tmpstr.empty()) return false;
// if (1 < tmpstr.count('.')) return false;
{
if (isStrDbl(str)) {
// Remove leading and trailing white space chars.
- string tmpstr = frontStrip(strip(str, ' '), ' ');
+ string const tmpstr = frontStrip(strip(str, ' '), ' ');
// Do the conversion proper.
- return atof(tmpstr.c_str());
+ return ::atof(tmpstr.c_str());
} else {
return 0.0;
}
{
Assert(pre);
- unsigned int l = strlen(pre);
- if (l > a.length() || a.empty())
+ unsigned int const l = strlen(pre);
+ string::size_type const alen = a.length();
+
+ if (l > alen || a.empty())
return false;
else {
#if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD)
}
+bool prefixIs(string const & a, string const & pre)
+{
+ string::size_type const prelen = pre.length();
+ string::size_type const alen = a.length();
+
+ if (prelen < alen || a.empty())
+ return false;
+ else {
+#if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD)
+ return ::strncmp(a.c_str(), pre.c_str(), prelen) == 0;
+#else
+ return a.compare(0, prelen, pre) == 0;
+#endif
+ }
+}
+
+
bool suffixIs(string const & a, char c)
{
if (a.empty()) return false;
}
+bool suffixIs(string const & a, string const & suf)
+{
+ string::size_type const suflen = suf.length();
+ string::size_type const alen = a.length();
+
+ if (suflen > alen) {
+ return false;
+ } else {
+#if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD)
+ string tmp(a, alen - suflen);
+ return ::strncmp(tmp.c_str(), suf.c_str(), suflen) == 0;
+#else
+ return a.compare(alen - suflen, suflen, suf);
+#endif
+ }
+}
+
+
bool contains(char const * a, string const & b)
{
Assert(a);
-
- if (!*a || b.empty()) return false;
- return strstr(a, b.c_str()) != 0;
+ string const at(a);
+ return contains(at, b);
}
bool contains(string const & a, char const * b)
{
Assert(b);
-
- if (a.empty())
- return false;
- return a.find(b) != string::npos;
+ string const bt(b);
+ return contains(a, bt);
}
bool contains(char const * a, char const * b)
{
Assert(a && b);
-
- if (!*a || !*b) return false;
- return strstr(a, b) != 0;
+ string const at(a);
+ string const bt(b);
+ return contains(at, bt);
}
}
+string const subst(string const & a,
+ string const & oldstr, string const & newstr)
+{
+ string lstr(a);
+ string::size_type i = 0;
+ string::size_type const olen = oldstr.length();
+ while((i = lstr.find(oldstr, i)) != string::npos) {
+ lstr.replace(i, olen, newstr);
+ i += newstr.length(); // We need to be sure that we dont
+ // use the same i over and over again.
+ }
+ return lstr;
+}
+
+
string const strip(string const & a, char c)
{
if (a.empty()) return a;
///
+template<>
inline
-string const tostr(bool b)
+string const tostr(bool const & b)
{
return (b ? "true" : "false");
}
/// Does the string start with this prefix?
bool prefixIs(string const &, char const *);
+/// Does the string start with this prefix?
+bool prefixIs(string const &, string const &);
+
/// Does the string end with this char?
bool suffixIs(string const &, char);
/// Does the string end with this suffix?
bool suffixIs(string const &, char const *);
+/// Does the string end with this suffix?
+bool suffixIs(string const &, string const &);
+
///
bool contains(char const * a, string const & b);
string const subst(string const & a,
char const * oldstr, string const & newstr);
+/// substitutes all instances ofr oldstr with newstr
+string const subst(string const & a,
+ string const & oldstr, string const & newstr);
+
/** Strips characters off the end of a string.
#"abccc".strip('c') = "ab".#
*/
char * getcwd(char * buffer, size_t size);
///
int chdir(char const * name);
+ ///
+ int chdir(string const & name);
/// Returns false it it fails
bool rename(char const * from, char const * to);
+ /// Returns false if it fails
+ bool rename(string const & from, string const & to);
/// Returns false it it fails
bool copy(string const & from, string const & to);
/// generates a checksum
unsigned long sum(char const * file);
+ /// generates a checksum
+ unsigned long sum(string const & file);
/// returns a date string (not used currently)
char * date();
/// returns the name of the user (not used currently)
int kill(long int pid, int sig);
///
void abort();
- ///
- int mkdir(char const * pathname, unsigned long int mode);
+ ///
+ int mkdir(string const & pathname, unsigned long int mode);
///
int putenv(char const * str);
+ ///
+ int unlink(string const & file);
+ ///
+ int rmdir(string const & file);
+ ///
+ int atoi(string const & nstr);
}
#else
///
static char * getcwd(char * buffer, size_t size);
///
static int chdir(char const * name);
+ ///
+ static int chdir(string const & name);
/// Returns false it it fails
static bool rename(char const * from, char const * to);
+ /// Returns false if it fails
+ static bool rename(string const & from, string const & to);
/// Returns false it it fails
static bool copy(string const & from, string const & to);
/// generates a checksum
static unsigned long sum(char const * file);
+ /// generates a checksum
+ static unsigned long sum(string const & file);
/// returns a date string (not used currently)
static char * date();
/// returns the name of the user (not used currently)
///
static void abort();
///
- static int mkdir(char const * pathname, unsigned long int mode);
+ static int mkdir(string const & pathname, unsigned long int mode);
///
static int putenv(char const * str);
+ ///
+ int unlink(string const & file);
+ ///
+ int rmdir(string const & file);
+ ///
+ int atoi(string const & nstr);
};
#endif // CXX_WORKING_NAMESPACES
#endif
{
Assert(s && n < npos); // STD!
static Srep empty_rep(0, "");
- if (*s && n) { // s is not empty string and n > 0
+ if (n) { // n > 0
rep = new Srep(n, s);
} else {
++empty_rep.ref;
// Assignment
////////////////
-lyxstring & lyxstring::operator= (lyxstring const & x)
+lyxstring & lyxstring::operator=(lyxstring const & x)
{
TestlyxstringInvariant(this);
}
-lyxstring & lyxstring::operator= (value_type const * s)
+lyxstring & lyxstring::operator=(value_type const * s)
{
Assert(s); // OURS!
TestlyxstringInvariant(this);
lyxstring & lyxstring::assign(value_type const * s, size_type n)
{
- Assert(s); // OURS!
+ Assert(s && n < npos); // STD!
TestlyxstringInvariant(this);
- n = min(strlen(s), n);
if (rep->ref == 1) // recycle rep
rep->assign(n, s);
else {
- rep->ref--;
+ --rep->ref;
rep = new Srep(n, s);
}
return *this;
if (!*p || !n) return *this;
rep = rep->get_own_copy();
- rep->append(min(n, strlen(p)), p);
+ rep->append(n, p);
return *this;
}
lyxstring & lyxstring::append(value_type const * p)
{
Assert(p); // OURS!
- TestlyxstringInvariant(this);
-
- if (!*p) return *this;
- rep = rep->get_own_copy();
- rep->append(strlen(p), p);
- return *this;
+ return append(p, strlen(p));
}
return *this;
}
-// insert value_typeacters before (*this)[pos]
+// insert characters before (*this)[pos]
lyxstring & lyxstring::insert(size_type pos, lyxstring const & x)
{
if (*p && n) {
// insert nothing and you change nothing
rep = rep->get_own_copy();
- rep->insert(pos, p, min(n, strlen(p)));
+ rep->insert(pos, p, n);
}
return *this;
}
lyxstring & lyxstring::insert(size_type pos, value_type const * p)
{
Assert(p); // OURS!
- TestlyxstringInvariant(this);
-
- if (*p) {
- // insert nothing and you change nothing
- rep = rep->get_own_copy();
- rep->insert(pos, p, strlen(p));
- }
- return *this;
+ return insert(pos, p, strlen(p));
}
string w = ostr.str().c_str();
return do_crc(w.begin(), w.end());
}
+
+
+unsigned long lyx::sum(string const & file)
+{
+ return lyx::sum(file.c_str());
+}
#include <fcntl.h>
#include <unistd.h>
-#ifdef CXX_WORKING_NAMESPACES
-namespace lyx {
- int mkdir(char const * pathname, unsigned long int mode)
- {
- return ::mkdir(pathname, mode);
- }
-}
-#else
+#include "LString.h"
+
#include "lyxlib.h"
-int lyx::mkdir(char const * pathname, unsigned long int mode)
+int lyx::mkdir(string const & pathname, unsigned long int mode)
{
- return ::mkdir(pathname, mode);
+ return ::mkdir(pathname.c_str(), mode);
}
-#endif
// pushedDir_);
return 0;
}
- if (lyx::chdir(pushedDir_.c_str())) {
+ if (lyx::chdir(pushedDir_)) {
// should throw an exception
// throw DirChangeError();
// The use of WriteFSAlert makes this impossible
{
if (!path.empty()) {
pushedDir_ = GetCWD();
- if (pushedDir_.empty() || lyx::chdir(path.c_str())) {
+ if (pushedDir_.empty() || lyx::chdir(path)) {
// should throw an exception
// throw DirChangeError();
// The use of WriteFSAlert makes this
#include <config.h>
-#include <stdio.h>
+#include <cstdio>
#include "support/lyxlib.h"
{
return ::rename(from, to) != -1;
}
+
+bool lyx::rename(string const & from, string const & to)
+{
+ return ::rename(from.c_str(), to.c_str()) != -1;
+}
--- /dev/null
+#include <config.h>
+
+#include <unistd.h>
+
+#include "lyxlib.h"
+
+int lyx::rmdir(string const & dir)
+{
+ return ::rmdir(dir.c_str());
+}
switch (start) {
case System:
case SystemDontWait:
- retval = system(command.c_str());
+ retval = ::system(command.c_str());
callback();
break;
case Wait:
--- /dev/null
+#include <config.h>
+
+#include <unistd.h>
+
+#include "lyxlib.h"
+
+int lyx::unlink(string const & pathname)
+{
+ return ::unlink(pathname.c_str());
+}
rows_ = rows_arg;
columns_ = columns_arg;
- row_info = vector<rowstruct>(rows_, rowstruct());
- column_info = vector<columnstruct>(columns_, columnstruct());
- cell_info = vector<vector<cellstruct> >
- (rows_, vector<cellstruct>(columns_, cellstruct()));
+ row_info = row_vector(rows_, rowstruct());
+ column_info = column_vector(columns_, columnstruct());
+ cell_info = cell_vvector(rows_, cell_vector(columns_, cellstruct()));
// Jürgen, use iterators.
int cellno = 0;
- int i = 0;
- for (; i < rows_; ++i) {
+ for (int i = 0; i < rows_; ++i) {
for (int j = 0; j < columns_; ++j) {
cell_info[i][j].inset.setOwner(owner_);
cell_info[i][j].inset.SetDrawFrame(0, InsetText::LOCKED);
cell_info[i][j].cellno = cellno++;
}
}
- row_info[i - 1].bottom_line = true;
- row_info[0].bottom_line = true;
+ //row_info[i - 1].bottom_line = true;
+ //row_info[0].bottom_line = true;
+ row_info.back().bottom_line = true;
+ row_info.front().bottom_line = true;
- for (i = 0; i < columns_; ++i) {
+ for (int i = 0; i < columns_; ++i) {
calculate_width_of_column(i);
}
- column_info[columns_ - 1].right_line = true;
+ //column_info[columns_ - 1].right_line = true;
+ column_info.back().right_line = true;
calculate_width_of_tabular();
}
-void LyXTabular::AppendRow(int cell )
+void LyXTabular::AppendRow(int cell)
{
++rows_;
void LyXTabular::DeleteRow(int row)
{
- if (!(rows_ - 1))
- return;
+ // Why make it so hard? (Lgb)
+ //if (!(rows_ - 1))
+ //return;
+ if (rows_ == 1) return; // Not allowed to delete last row
+
row_info.erase(row_info.begin() + row); //&row_info[row]);
cell_info.erase(cell_info.begin() + row); //&cell_info[row]);
--rows_;
void LyXTabular::DeleteColumn(int column)
{
- if (!(columns_ - 1))
- return;
+ // Similar to DeleteRow
+ //if (!(columns_ - 1))
+ //return;
+ if (columns_ == 1) return; // Not allowed to delete last column
+
column_info.erase(column_info.begin() + column);
for (int i = 0; i < rows_; ++i) {
cell_info[i].erase(cell_info[i].begin() + column);
int LyXTabular::NumberOfCellsInRow(int cell) const
{
- int row = row_of_cell(cell);
+ int const row = row_of_cell(cell);
int result = 0;
for (int i = 0; i < columns_; ++i) {
if (cell_info[row][i].multicolumn != LyXTabular::CELL_PART_OF_MULTICOLUMN)
/* returns 1 if there is a topline, returns 0 if not */
bool LyXTabular::TopLine(int cell, bool onlycolumn) const
{
- int row = row_of_cell(cell);
+ int const row = row_of_cell(cell);
if (!onlycolumn && IsMultiColumn(cell))
return cellinfo_of_cell(cell)->top_line;
bool LyXTabular::BottomLine(int cell, bool onlycolumn) const
{
- //no bottom line underneath non-existent cells if you please
+ // no bottom line underneath non-existent cells if you please
+ // Isn't that a programming error? Is so this should
+ // be an Assert instead. (Lgb)
if(cell >= numberofcells)
return false;
int LyXTabular::GetAdditionalHeight(int cell) const
{
- int row = row_of_cell(cell);
+ int const row = row_of_cell(cell);
if (!row) return 0;
-
+
+#warning Jürgen, should the types change? (Lgb)
int top = 1; // bool top = true; ??
int bottom = 1; // bool bottom = true; ??
{
// internally already set in SetWidthOfCell
// used to get it back in text.C
- int col = right_column_of_cell(cell);
+ int const col = right_column_of_cell(cell);
if (col < columns_ - 1 && column_info[col].right_line &&
column_info[col+1].left_line)
return WIDTH_OF_LINE;
}
// set the width to MAX_WIDTH until width > 0
int width = (new_width + 2 * WIDTH_OF_LINE);
- for (i = column1; (i < column2) && (width>column_info[i].width_of_column);
- ++i)
- {
+ for (i = column1;
+ i < column2 && width > column_info[i].width_of_column;
+ ++i) {
cell_info[row][i].width_of_cell = column_info[i].width_of_column;
width -= column_info[i].width_of_column;
}
for(i = 0; (i < numberofcells) && !IsMultiColumn(i); ++i)
;
if (i < numberofcells)
- recalculateMulticolCells(i, GetWidthOfCell(i)-(2*WIDTH_OF_LINE));
+ recalculateMulticolCells(i, GetWidthOfCell(i)-(2 * WIDTH_OF_LINE));
for(i = 0; i < columns_; ++i)
calculate_width_of_column(i);
calculate_width_of_tabular();
bool LyXTabular::SetAlignment(int cell, char align, bool onlycolumn)
{
+#warning Please fix align type. (Lgb)
if (!IsMultiColumn(cell) || onlycolumn)
column_info[column_of_cell(cell)].alignment = align;
if (!onlycolumn)
bool LyXTabular::SetVAlignment(int cell, char align, bool onlycolumn)
{
+#warning Please fix align type. (Lgb)
if (!IsMultiColumn(cell) || onlycolumn)
column_info[column_of_cell(cell)].valignment = align;
if (!onlycolumn)
bool LyXTabular::SetAlignSpecial(int cell, string const & special, int what)
{
+#warning Fix the "what" type. (Lgb)
if (what == SET_SPECIAL_MULTI)
cellinfo_of_cell(cell)->align_special = special;
else
char LyXTabular::GetAlignment(int cell, bool onlycolumn) const
{
+#warning Fix return type. (Lgb)
if (!onlycolumn && IsMultiColumn(cell))
return cellinfo_of_cell(cell)->alignment;
else
char LyXTabular::GetVAlignment(int cell, bool onlycolumn) const
{
+#warning Fix return type. (Lgb)
if (!onlycolumn && IsMultiColumn(cell))
return cellinfo_of_cell(cell)->valignment;
else
return result;
}
+
int LyXTabular::GetBeginningOfTextInCell(int cell) const
{
int x = 0;
bool LyXTabular::IsFirstCellInRow(int cell) const
{
- return (column_of_cell(cell) == 0);
+ return column_of_cell(cell) == 0;
}
void LyXTabular::Write(Buffer const * buf, ostream & os) const
{
// header line
- os << "<LyXTabular version=1 rows=" << rows_ << " columns=" << columns_ <<
- ">" << endl;
+ os << "<LyXTabular version=1 rows=" << rows_
+ << " columns=" << columns_ << ">\n";
// global longtable options
- os << "<Features rotate=" << rotate <<
- " islongtable=" << is_long_tabular <<
- " endhead=" << endhead << " endfirsthead=" << endfirsthead <<
- " endfoot=" << endfoot << " endlastfoot=" << endlastfoot <<
- ">" << endl << endl;
+ os << "<Features rotate=" << rotate
+ << " islongtable=" << is_long_tabular
+ << " endhead=" << endhead
+ << " endfirsthead=" << endfirsthead
+ << " endfoot=" << endfoot
+ << " endlastfoot=" << endlastfoot << ">\n\n";
for (int i = 0; i < rows_; ++i) {
- os << "<Row topline=" << row_info[i].top_line <<
- " bottomline=" << row_info[i].bottom_line <<
- " newpage=" << row_info[i].newpage <<
- ">" << endl;
+ os << "<Row topline=" << row_info[i].top_line
+ << " bottomline=" << row_info[i].bottom_line
+ << " newpage=" << row_info[i].newpage << ">\n";
for (int j = 0; j < columns_; ++j) {
if (!i) {
- os << "<Column alignment=" << column_info[j].alignment <<
- " valignment=" << column_info[j].valignment <<
- " leftline=" << column_info[j].left_line <<
- " rightline=" << column_info[j].right_line <<
- " width=\"" << VSpace(column_info[j].p_width).asLyXCommand() <<
- "\" special=\"" << column_info[j].align_special <<
- "\">" << endl;
+ os << "<Column alignment=" << column_info[j].alignment
+ << " valignment=" << column_info[j].valignment
+ << " leftline=" << column_info[j].left_line
+ << " rightline=" << column_info[j].right_line
+ << " width=\"" << VSpace(column_info[j].p_width).asLyXCommand()
+ << "\" special=\"" << column_info[j].align_special
+ << "\"\n>";
} else {
- os << "<Column>" << endl;
+ os << "<Column>\n";
}
- os << "<Cell multicolumn=" << cell_info[i][j].multicolumn <<
- " alignment=" << cell_info[i][j].alignment <<
- " valignment=" << cell_info[i][j].valignment <<
- " topline=" << cell_info[i][j].top_line <<
- " bottomline=" << cell_info[i][j].bottom_line <<
- " leftline=" << cell_info[i][j].left_line <<
- " rightline=" << cell_info[i][j].right_line <<
- " rotate=" << cell_info[i][j].rotate <<
- " usebox=" << (int)cell_info[i][j].usebox <<
- " width=\"" << cell_info[i][j].p_width <<
- "\" special=\"" << cell_info[i][j].align_special <<
- "\">" << endl;
+ os << "<Cell multicolumn=" << cell_info[i][j].multicolumn
+ << " alignment=" << cell_info[i][j].alignment
+ << " valignment=" << cell_info[i][j].valignment
+ << " topline=" << cell_info[i][j].top_line
+ << " bottomline=" << cell_info[i][j].bottom_line
+ << " leftline=" << cell_info[i][j].left_line
+ << " rightline=" << cell_info[i][j].right_line
+ << " rotate=" << cell_info[i][j].rotate
+ << " usebox=" << (int)cell_info[i][j].usebox
+ << " width=\"" << cell_info[i][j].p_width
+ << "\" special=\"" << cell_info[i][j].align_special
+ << "\">\n";
os << "\\begin_inset ";
cell_info[i][j].inset.Write(buf, os);
- os << "\n\\end_inset " << endl;
- os << "</Cell>" << endl;
- os << "</Column>" << endl;
+ os << "\n\\end_inset \n"
+ << "</Cell>\n"
+ << "</Column\n>";
}
- os << "</Row>" << endl;
+ os << "</Row>\n";
}
- os << "</LyXTabular>" << endl;
+ os << "</LyXTabular>\n";
}
static
bool getTokenValue(string const str, const char * token, int & num)
{
- string ret;
int pos = str.find(token);
char ch = str[pos+strlen(token)];
if ((pos < 0) || (ch != '='))
return false;
- ret.erase();
+ string ret;
+ //ret.erase(); // why? (Lgb)
pos += strlen(token)+1;
ch = str[pos];
if ((ch != '"') && (ch != '\'')) { // only read till next space
static
bool getTokenValue(string const str, const char * token, bool & flag)
{
- string ret;
int pos = str.find(token);
char ch = str[pos+strlen(token)];
if ((pos < 0) || (ch != '='))
return false;
- ret.erase();
+ string ret;
+ //ret.erase(); // Why? (Lgb)
pos += strlen(token)+1;
ch = str[pos];
if ((ch != '"') && (ch != '\'')) { // only read till next space
istream & is = lex.getStream();
string s(fl);
if (s.length() > 8)
- version = atoi(s.c_str() + 8);
+ version = lyx::atoi(s.substr(8, string::npos));
else
version = 1;
LyXParagraph::footnote_flag footnoteflag = LyXParagraph::NO_FOOTNOTE;
LyXParagraph::footnote_kind footnotekind = LyXParagraph::FOOTNOTE;
#endif
- string token, tmptok;
+ string tmptok;
int pos = 0;
char depth = 0;
LyXFont font(LyXFont::ALL_SANE);
while (lex.IsOK()) {
lex.nextToken();
- token = lex.GetString();
+ string const token = lex.GetString();
if (token.empty())
continue;
- if ((token == "\\layout") || (token == "\\end_float") ||
- (token == "\\end_deeper"))
- {
+ if (token == "\\layout"
+ || token == "\\end_float"
+ || token == "\\end_deeper") {
lex.pushToken(token);
break;
}
string const LyXTabular::GetDocBookAlign(int cell, bool isColumn) const
{
- int i = isColumn ? cell : column_of_cell(cell);
+ int const i = isColumn ? cell : column_of_cell(cell);
if (!isColumn && IsMultiColumn(cell)) {
if (!cellinfo_of_cell(cell)->align_special.empty()) {
int LyXTabular::DocBookEndOfCell(ostream & os, int cell, int & depth) const
{
int ret = 0;
- int nvcell;
if (IsLastCell(cell)) {
os << newlineAndDepth(--depth)
<< "</ENTRY>"
<< newlineAndDepth(--depth);
ret += 4;
} else {
- nvcell = cell + 1;
if (cell < 0) {
// preamble
if (is_long_tabular)
int const column = column_of_cell(cell);
return &cell_info[row][column];
}
-
+
void LyXTabular::SetMultiColumn(int cell, int number)
{
void LyXTabular::SetLongTabular(int what)
{
+#warning Should what be bool? (Lgb)
is_long_tabular = what;
}
int LyXTabular::GetUsebox(int cell) const
{
+#warning should the return type change? (Lgb)
if (column_info[column_of_cell(cell)].p_width.empty() &&
!(IsMultiColumn(cell) && !cellinfo_of_cell(cell)->p_width.empty()))
return BOX_NONE;
ostream & os, bool fragile, bool fp) const
{
int ret = 0;
- int i,j;
int cell = 0;
//+---------------------------------------------------------------------
os << "\\begin{longtable}{";
else
os << "\\begin{tabular}{";
- for (i = 0; i < columns_; ++i) {
+ for (int i = 0; i < columns_; ++i) {
if (column_info[i].left_line)
os << '|';
if (!column_info[i].align_special.empty()) {
//+---------------------------------------------------------------------
int bret;
- for(i=0; i < rows_; ++i) {
+ for(int i = 0; i < rows_; ++i) {
ret += TeXTopHLine(os, i);
bret = ret;
if (IsLongTabular()) {
ret += TeXBottomHLine(os, i-1);
ret += TeXTopHLine(os, i);
}
- for(j=0; j < columns_; ++j) {
+ for(int j = 0; j < columns_; ++j) {
if (IsPartOfMultiColumn(i,j))
continue;
ret += TeXCellPreamble(os, cell);
ret += TeXBottomHLine(os, i);
bret = ret;
if (IsLongTabular()) {
- if ((endhead > 0) && (i == (endhead-1))) {
+ if ((endhead > 0) && (i == (endhead - 1))) {
os << "\\endhead\n";
++ret;
}
- if ((endfirsthead > 0) && (i == (endfirsthead-1))) {
+ if ((endfirsthead > 0) && (i == (endfirsthead - 1))) {
os << "\\endfirsthead\n";
++ret;
}
- if ((endfoot > 0) && (i == (endfoot-1))) {
+ if ((endfoot > 0) && (i == (endfoot - 1))) {
os << "\\endfoot\n";
++ret;
}
- if ((endlastfoot > 0) && (i == (endlastfoot-1))) {
+ if ((endlastfoot > 0) && (i == (endlastfoot - 1))) {
os << "\\endlastfoot\n";
++ret;
}
#include <cctype>
#include <algorithm>
-//#ifdef __GNUG__
-//#pragma implementation "table.h"
-//#endif
-
#include "layout.h"
#include "lyxparagraph.h"
#include "lyxtext.h"
using std::pair;
static const int LYX_PAPER_MARGIN = 20;
+
extern int bibitemMaxWidth(BufferView *, LyXFont const &);
break;
}
- if (Encoding::is_arabic(next_char))
+ if (Encoding::is_arabic(next_char)) {
if (Encoding::is_arabic(prev_char))
return Encoding::TransformChar(c, Encoding::FORM_MEDIAL);
else
return Encoding::TransformChar(c, Encoding::FORM_INITIAL);
- else
+ } else {
if (Encoding::is_arabic(prev_char))
return Encoding::TransformChar(c, Encoding::FORM_FINAL);
else
return Encoding::TransformChar(c, Encoding::FORM_ISOLATED);
+ }
}
// This is the comments that some of the warnings below refers to.
int LyXText::SingleWidth(BufferView * bview, LyXParagraph * par,
LyXParagraph::size_type pos) const
{
- char c = par->GetChar(pos);
+ char const c = par->GetChar(pos);
return SingleWidth(bview, par, pos, c);
}
if (!bidi_InRange(pos - 1))
return false;
- bool rtl = bidi_level(pos - 1) % 2;
+ bool const rtl = bidi_level(pos - 1) % 2;
bool rtl2 = rtl;
if (pos == par->Last())
rtl2 = par->isRightToLeftPar(buf->params);
if (!lyxrc.rtl_support)
return false; // This is just for speedup
- bool rtl = font.isVisibleRightToLeft();
+ bool const rtl = font.isVisibleRightToLeft();
bool rtl2 = rtl;
if (pos == par->Last())
rtl2 = par->isRightToLeftPar(buf->params);
}
- LyXFont labelfont = GetFont(bview->buffer(), row->par(), -2);
+ LyXFont const labelfont = GetFont(bview->buffer(), row->par(), -2);
switch (layout.margintype) {
case MARGIN_DYNAMIC:
if (!layout.leftmargin.empty()) {
break;
}
if ((workWidth(bview) > 0) &&
- (row->par()->pextra_type == LyXParagraph::PEXTRA_INDENT))
- {
+ (row->par()->pextra_type == LyXParagraph::PEXTRA_INDENT)) {
if (!row->par()->pextra_widthp.empty()) {
x += workWidth(bview) *
- atoi(row->par()->pextra_widthp.c_str()) / 100;
+ lyx::atoi(row->par()->pextra_widthp) / 100;
} else if (!row->par()->pextra_width.empty()) {
int xx = VSpace(row->par()->pextra_width).inPixels(bview);
if (xx > workWidth(bview))
if (paper_width < 0)
return 0;
- int w, fill;
+ int w;
// get the pure distance
LyXParagraph::size_type last = RowLastPrintable(row);
w = left_margin;
}
- fill = paper_width - w - RightMargin(bview->buffer(), row);
+ int const fill = paper_width - w - RightMargin(bview->buffer(), row);
return fill;
}
// returns the minimum space a manual label needs on the screen in pixel
int LyXText::LabelFill(BufferView * bview, Row const * row) const
{
- LyXParagraph::size_type last = BeginningOfMainBody(bview->buffer(), row->par())-1;
+ LyXParagraph::size_type last = BeginningOfMainBody(bview->buffer(), row->par()) - 1;
// -1 because a label ends either with a space that is in the label,
// or with the beginning of a footnote that is outside the label.
// on the very last column doesnt count
int LyXText::NumberOfSeparators(Buffer const * buf, Row const * row) const
{
- int last = RowLast(row);
- int p = max(row->pos(), BeginningOfMainBody(buf, row->par()));
+ LyXParagraph::size_type const last = RowLast(row);
+ LyXParagraph::size_type p =
+ max(row->pos(), BeginningOfMainBody(buf, row->par()));
int n = 0;
for (; p < last; ++p) {
if (row->par()->IsSeparator(p)) {
// ignored. This is *MUCH* more usefull than not to ignore!
int LyXText::NumberOfHfills(Buffer const * buf, Row const * row) const
{
- int last = RowLast(row);
- int first = row->pos();
+ LyXParagraph::size_type const last = RowLast(row);
+ LyXParagraph::size_type first = row->pos();
if (first) { /* hfill *DO* count at the beginning
* of paragraphs! */
while(first <= last && row->par()->IsHfill(first))
void LyXText::SetHeightOfRow(BufferView * bview, Row * row_ptr) const
{
/* get the maximum ascent and the maximum descent */
- int asc = 0, desc = 0, pos = 0;
+ int asc = 0;
+ int desc = 0;
float layoutasc = 0;
float layoutdesc = 0;
float tmptop = 0;
int maxwidth = 0;
// Check if any insets are larger
- for (pos = row_ptr->pos(); pos <= pos_end; ++pos) {
+ for (int pos = row_ptr->pos(); pos <= pos_end; ++pos) {
if (row_ptr->par()->GetChar(pos) == LyXParagraph::META_INSET) {
tmpfont = GetFont(bview->buffer(), row_ptr->par(), pos);
tmpinset = row_ptr->par()->GetInset(pos);
LyXParagraph * nextpar = row_ptr->par()->Next();
LyXParagraph * comparepar = row_ptr->par();
float usual = 0;
- float unusual = 0;
+ float unusual = 0;
if (comparepar->GetDepth() > nextpar->GetDepth()) {
usual = (textclasslist.Style(bview->buffer()->params.textclass, comparepar->GetLayout()).bottomsep * DefaultHeight());
// The last character position of a paragraph is an invariant so we can
// safely get it here. (Asger)
- int lastposition = row->par()->Last();
+ int const lastposition = row->par()->Last();
do {
// Get the next breakpoint
void LyXText::BreakParagraph(BufferView * bview, char keep_layout)
{
- LyXLayout const & layout = textclasslist.Style(bview->buffer()->params.textclass,
- cursor.par()->GetLayout());
+ LyXLayout const & layout =
+ textclasslist.Style(bview->buffer()->params.textclass,
+ cursor.par()->GetLayout());
// this is only allowed, if the current paragraph is not empty or caption
if ((cursor.par()->Last() <= 0
if (cursor.pos() < cursor.par()->Last() &&
cursor.par()->IsLineSeparator(cursor.pos()))
// newline always after a blank!
- CursorRightIntern(bview);
+ CursorRight(bview);
cursor.row()->fill(-1); // to force a new break
}
old_cursor.par()->previous->id() : 0;
// just move to the right
- CursorRightIntern(bview);
+ CursorRight(bview);
// CHECK Look at the comment here.
// This check is not very good...
tmppar->pagebreak_bottom = cursor.par()->pagebreak_bottom;
}
- CursorLeftIntern(bview);
+ CursorLeft(bview);
// the layout things can change the height of a row !
int tmpheight = cursor.row()->height();
}
+static inline
char alphaCounter(int n)
{
if (n < 1 || n > 26)
}
+static inline
char hebrewCounter(int n)
{
static const char hebrew[22] = {
{
if (par) {
LyXParagraph::size_type i = 0;
- while (pos + i < par->Last() && i < str.length()&&
- str[i] == par->GetChar(pos + i)) {
+ while (pos + i < par->Last()
+ && string::size_type(i) < str.length()
+ && str[i] == par->GetChar(pos + i)) {
++i;
}
- if (str.length() == i)
+ if (str.length() == string::size_type(i))
return true;
}
return false;
void LyXText::CursorLeft(BufferView * bview, bool internal) const
-{
- CursorLeftIntern(bview, internal);
-}
-
-
-void LyXText::CursorLeftIntern(BufferView * bview, bool internal) const
{
if (cursor.pos() > 0) {
bool boundary = cursor.boundary();
void LyXText::CursorRight(BufferView * bview, bool internal) const
-{
- CursorRightIntern(bview, internal);
-}
-
-
-void LyXText::CursorRightIntern(BufferView * bview, bool internal) const
{
if (!internal && cursor.boundary() &&
!cursor.par()->IsNewline(cursor.pos()))
void TransManager::insertVerbatim(string const & str, LyXText * text)
{
- int l = str.length();
+ int const l = str.length();
for (int i = 0; i < l; ++i){
if (str[i] == '\"'
else if (prefixIs (input, "vfill")) kin = VFILL;
else if (isValidGlueLength (input, &len))
kin = LENGTH;
- else if (sscanf (input.c_str(), "%f", &value) == 1) {
+ else if (sscanf(input.c_str(), "%f", &value) == 1) {
// This last one is for reading old .lyx files
// without units in added_space_top/bottom.
// Let unit default to centimeters here.