John's math matrix patch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2520 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2001-08-16 09:42:04 +00:00
parent 5d4c914806
commit 352172a0aa
4 changed files with 38 additions and 29 deletions

View File

@ -1,3 +1,10 @@
2001-08-15 John Levon <moz@compsoc.man.ac.uk>
* combox.h: fix source doc
* form_math_matrix.C:
* forms/form_math_matrix.fd: new layout
2001-08-15 Angus Leeming <a.leeming@ic.ac.uk>
* forms/form_character.fd: small adjustment to the position of John's

View File

@ -94,8 +94,10 @@ public:
/// Remove the objects from the form they are in.
void remove();
/** Assign a callback to this object. The callback should be a void
function with a int and a void pointer as parameters.
/**
* Assign a callback to this object. The callback should be a void
* function with a int, a void pointer, and a Combox pointer as
* parameters.
*/
void setcallback(FL_COMBO_CB, void *);

View File

@ -22,17 +22,17 @@ FD_form_maths_matrix * FormMathsMatrix::build_maths_matrix()
FL_OBJECT *obj;
FD_form_maths_matrix *fdui = new FD_form_maths_matrix;
fdui->form = fl_bgn_form(FL_NO_BOX, 280, 170);
fdui->form = fl_bgn_form(FL_NO_BOX, 295, 183);
fdui->form->u_vdata = this;
obj = fl_add_box(FL_UP_BOX, 0, 0, 280, 170, "");
fdui->slider_rows = obj = fl_add_valslider(FL_HOR_NICE_SLIDER, 10, 30, 160, 30, _("Rows"));
obj = fl_add_box(FL_UP_BOX, 0, 0, 295, 183, "");
fdui->slider_rows = obj = fl_add_valslider(FL_VERT_NICE_SLIDER, 10, 30, 32, 140, _("Rows"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_TOP);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
fl_set_slider_precision(obj, 0);
fl_set_slider_bounds(obj, 1, 20);
fl_set_slider_return(obj, FL_RETURN_END_CHANGED);
fdui->slider_columns = obj = fl_add_valslider(FL_HOR_NICE_SLIDER, 10, 90, 160, 30, _("Columns "));
fdui->slider_columns = obj = fl_add_valslider(FL_HOR_NICE_SLIDER, 54, 28, 214, 30, _("Columns "));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_TOP);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
@ -41,7 +41,7 @@ FD_form_maths_matrix * FormMathsMatrix::build_maths_matrix()
fl_set_slider_return(obj, FL_RETURN_END_CHANGED);
{
char const * const dummy = N_("Vertical align|#V");
fdui->choice_valign = obj = fl_add_choice(FL_NORMAL_CHOICE, 180, 30, 90, 30, idex(_(dummy)));
fdui->choice_valign = obj = fl_add_choice(FL_NORMAL_CHOICE, 56, 86, 90, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_boxtype(obj, FL_FRAME_BOX);
@ -50,25 +50,25 @@ FD_form_maths_matrix * FormMathsMatrix::build_maths_matrix()
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
{
char const * const dummy = N_("Horizontal align|#H");
fdui->input_halign = obj = fl_add_input(FL_NORMAL_INPUT, 180, 90, 90, 30, idex(_(dummy)));
fdui->input_halign = obj = fl_add_input(FL_NORMAL_INPUT, 174, 86, 90, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_TOP);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 130, 80, 30, _("OK "));
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 44, 140, 80, 30, _("OK "));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
{
char const * const dummy = N_("Apply|#A");
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 100, 130, 80, 30, idex(_(dummy)));
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 126, 140, 80, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
{
char const * const dummy = N_("Cancel|^[");
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 190, 130, 80, 30, idex(_(dummy)));
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 208, 140, 80, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);

View File

@ -9,14 +9,14 @@ SnapGrid: 2
=============== FORM ===============
Name: form_maths_matrix
Width: 280
Height: 170
Width: 295
Height: 183
Number of Objects: 8
--------------------
class: FL_BOX
type: UP_BOX
box: 0 0 280 170
box: 0 0 295 183
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
@ -33,8 +33,8 @@ argument:
--------------------
class: FL_VALSLIDER
type: HOR_NICE_SLIDER
box: 10 30 160 30
type: VERT_NICE_SLIDER
box: 10 30 32 140
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_TOP
@ -47,7 +47,7 @@ resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_rows
callback: C_FormBaseDeprecatedInputCB
argument:
argument: 0
bounds: 1 20
precision: 0
return: FL_RETURN_END_CHANGED
@ -55,7 +55,7 @@ argument:
--------------------
class: FL_VALSLIDER
type: HOR_NICE_SLIDER
box: 10 90 160 30
box: 54 28 214 30
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_TOP
@ -68,7 +68,7 @@ resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: slider_columns
callback: C_FormBaseDeprecatedInputCB
argument:
argument: 0
bounds: 1 20
precision: 0
return: FL_RETURN_END_CHANGED
@ -76,7 +76,7 @@ argument:
--------------------
class: FL_CHOICE
type: NORMAL_CHOICE
box: 180 30 90 30
box: 56 86 90 30
boxtype: FL_FRAME_BOX
colors: FL_COL1 FL_BLACK
alignment: FL_ALIGN_TOP
@ -89,12 +89,12 @@ resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_valign
callback: C_FormBaseDeprecatedInputCB
argument:
argument: 0
--------------------
class: FL_INPUT
type: NORMAL_INPUT
box: 180 90 90 30
box: 174 86 90 30
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_TOP
@ -107,12 +107,12 @@ resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_halign
callback: C_FormBaseDeprecatedInputCB
argument:
argument: 0
--------------------
class: FL_BUTTON
type: RETURN_BUTTON
box: 10 130 80 30
box: 44 140 80 30
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
@ -125,12 +125,12 @@ resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
callback: C_FormBaseDeprecatedOKCB
argument:
argument: 0
--------------------
class: FL_BUTTON
type: NORMAL_BUTTON
box: 100 130 80 30
box: 126 140 80 30
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
@ -143,12 +143,12 @@ resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
callback: C_FormBaseDeprecatedApplyCB
argument:
argument: 0
--------------------
class: FL_BUTTON
type: NORMAL_BUTTON
box: 190 130 80 30
box: 208 140 80 30
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
@ -161,7 +161,7 @@ resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
callback: C_FormBaseDeprecatedCancelCB
argument:
argument: 0
==============================
create_the_forms