Rob's tab create patch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6360 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-03-06 08:24:33 +00:00
parent 4bb1522fa6
commit 5d2bc94eed
3 changed files with 49 additions and 31 deletions

View File

@ -1,3 +1,11 @@
2003-02-28 Rob Lahaye <lahaye@snu.ac.kr>
* FormTabularCreate.C: remove slider settings (now part of .fd file)
and add tooltips.
* forms/form_tabular_create.fd: prettify; add slider settings and
proper gravity.
2003-03-05 Angus Leeming <leeming@lyx.org> 2003-03-05 Angus Leeming <leeming@lyx.org>
* FormWrap.[Ch]: * FormWrap.[Ch]:

View File

@ -16,6 +16,7 @@
#include "ControlTabularCreate.h" #include "ControlTabularCreate.h"
#include "FormTabularCreate.h" #include "FormTabularCreate.h"
#include "forms/form_tabular_create.h" #include "forms/form_tabular_create.h"
#include "Tooltips.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include FORMS_H_LOCATION #include FORMS_H_LOCATION
@ -34,17 +35,16 @@ void FormTabularCreate::build()
{ {
dialog_.reset(build_tabular_create(this)); dialog_.reset(build_tabular_create(this));
fl_set_slider_bounds(dialog_->slider_rows, 1, 50);
fl_set_slider_bounds(dialog_->slider_columns, 1, 50);
fl_set_slider_value(dialog_->slider_rows, 5);
fl_set_slider_value(dialog_->slider_columns, 5);
fl_set_slider_precision(dialog_->slider_rows, 0);
fl_set_slider_precision(dialog_->slider_columns, 0);
// Manage the ok, apply and cancel/close buttons // Manage the ok, apply and cancel/close buttons
bc().setOK(dialog_->button_ok); bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply); bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_close); bc().setCancel(dialog_->button_close);
// set up the tooltips
string str = _("Number of columns in the tabular");
tooltips().init(dialog_->slider_columns, str);
str = _("Number of rows in the tabular");
tooltips().init(dialog_->slider_rows, str);
} }

View File

@ -9,19 +9,19 @@ SnapGrid: 5
=============== FORM =============== =============== FORM ===============
Name: form_tabular_create Name: form_tabular_create
Width: 310 Width: 290
Height: 130 Height: 100
Number of Objects: 6 Number of Objects: 6
-------------------- --------------------
class: FL_BOX class: FL_BOX
type: UP_BOX type: FLAT_BOX
box: 0 0 310 130 box: 0 0 290 100
boxtype: FL_UP_BOX boxtype: FL_FLAT_BOX
colors: FL_COL1 FL_COL1 colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE style: FL_NORMAL_STYLE
size: FL_DEFAULT_SIZE size: FL_NORMAL_SIZE
lcol: FL_BLACK lcol: FL_BLACK
label: label:
shortcut: shortcut:
@ -34,7 +34,7 @@ argument:
-------------------- --------------------
class: FL_BUTTON class: FL_BUTTON
type: RETURN_BUTTON type: RETURN_BUTTON
box: 10 90 90 30 box: 5 70 90 25
boxtype: FL_UP_BOX boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1 colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER alignment: FL_ALIGN_CENTER
@ -43,16 +43,16 @@ size: FL_NORMAL_SIZE
lcol: FL_BLACK lcol: FL_BLACK
label: OK label: OK
shortcut: ^M shortcut: ^M
resize: FL_RESIZE_ALL resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity gravity: FL_SouthEast FL_SouthEast
name: button_ok name: button_ok
callback: C_FormBaseOKCB callback: C_FormBaseOKCB
argument: argument: 0
-------------------- --------------------
class: FL_BUTTON class: FL_BUTTON
type: NORMAL_BUTTON type: NORMAL_BUTTON
box: 110 90 90 30 box: 100 70 90 25
boxtype: FL_UP_BOX boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1 colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER alignment: FL_ALIGN_CENTER
@ -61,16 +61,16 @@ size: FL_NORMAL_SIZE
lcol: FL_BLACK lcol: FL_BLACK
label: Apply|#A label: Apply|#A
shortcut: shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity gravity: FL_SouthEast FL_SouthEast
name: button_apply name: button_apply
callback: C_FormBaseApplyCB callback: C_FormBaseApplyCB
argument: argument: 0
-------------------- --------------------
class: FL_BUTTON class: FL_BUTTON
type: NORMAL_BUTTON type: NORMAL_BUTTON
box: 210 90 90 30 box: 195 70 90 25
boxtype: FL_UP_BOX boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1 colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER alignment: FL_ALIGN_CENTER
@ -79,16 +79,16 @@ size: FL_NORMAL_SIZE
lcol: FL_BLACK lcol: FL_BLACK
label: Cancel|^[ label: Cancel|^[
shortcut: shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_NONE
gravity: FL_NoGravity FL_NoGravity gravity: FL_SouthEast FL_SouthEast
name: button_close name: button_close
callback: C_FormBaseCancelCB callback: C_FormBaseCancelCB
argument: argument: 0
-------------------- --------------------
class: FL_VALSLIDER class: FL_VALSLIDER
type: HOR_SLIDER type: HOR_SLIDER
box: 80 50 220 30 box: 75 35 210 25
boxtype: FL_DOWN_BOX boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_COL1 colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_LEFT alignment: FL_ALIGN_LEFT
@ -97,16 +97,21 @@ size: FL_NORMAL_SIZE
lcol: FL_BLACK lcol: FL_BLACK
label: Columns: label: Columns:
shortcut: shortcut:
resize: FL_RESIZE_X resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_West FL_East
name: slider_columns name: slider_columns
callback: callback:
argument: argument:
bounds: 1 50
precision: 0
value: 5
increment: 1 1
step: 1
-------------------- --------------------
class: FL_VALSLIDER class: FL_VALSLIDER
type: HOR_SLIDER type: HOR_SLIDER
box: 80 10 220 30 box: 75 5 210 25
boxtype: FL_DOWN_BOX boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_COL1 colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_LEFT alignment: FL_ALIGN_LEFT
@ -115,11 +120,16 @@ size: FL_NORMAL_SIZE
lcol: FL_BLACK lcol: FL_BLACK
label: Rows: label: Rows:
shortcut: shortcut:
resize: FL_RESIZE_X resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_West FL_East
name: slider_rows name: slider_rows
callback: callback:
argument: argument:
bounds: 1 50
precision: 0
value: 5
increment: 1 0
step: 1
============================== ==============================
create_the_forms create_the_forms