mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 02:28:19 +00:00
Insetcite updates from Angus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@833 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c8fd4b49a8
commit
d70f607a37
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2000-06-23 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
|
* forms/cite.fd: modified to allow resizing without messing
|
||||||
|
up the dialog.
|
||||||
|
|
||||||
|
* src/insetcite.C: Uses code from cite.fd almost without
|
||||||
|
tweaking. ;-)
|
||||||
|
User can now resize dialog in the x-direction.
|
||||||
|
Resizing the dialog in the y-direction is prevented, as the
|
||||||
|
code does this intelligently already.
|
||||||
|
|
||||||
2000-06-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
2000-06-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* INSTALL: remove obsolete entry in "problems" section.
|
* INSTALL: remove obsolete entry in "problems" section.
|
||||||
|
@ -24,9 +24,9 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label:
|
label:
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_X
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: box
|
||||||
callback:
|
callback:
|
||||||
argument:
|
argument:
|
||||||
|
|
||||||
@ -42,11 +42,11 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Inset keys
|
label: Inset keys
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_X
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: citeBrsr
|
||||||
callback:
|
callback: citation_cb
|
||||||
argument:
|
argument: InsetCitation::CITEBRSR
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BROWSER
|
class: FL_BROWSER
|
||||||
@ -60,11 +60,11 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Bibliography keys
|
label: Bibliography keys
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_X
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: bibBrsr
|
||||||
callback:
|
callback: citation_cb
|
||||||
argument:
|
argument: InsetCitation::BIBBRSR
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
@ -78,11 +78,11 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: @4->
|
label: @4->
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_NONE
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: addBtn
|
||||||
callback:
|
callback: citation_cb
|
||||||
argument:
|
argument: InsetCitation::ADD
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
@ -96,11 +96,11 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: @9+
|
label: @9+
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_NONE
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: delBtn
|
||||||
callback:
|
callback: citation_cb
|
||||||
argument:
|
argument: InsetCitation::DELETE
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
@ -114,11 +114,11 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: @8->
|
label: @8->
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_NONE
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: upBtn
|
||||||
callback:
|
callback: citation_cb
|
||||||
argument:
|
argument: InsetCitation::UP
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
@ -132,11 +132,11 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: @2->
|
label: @2->
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_NONE
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: downBtn
|
||||||
callback:
|
callback: citation_cb
|
||||||
argument:
|
argument: InsetCitation::DOWN
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BROWSER
|
class: FL_BROWSER
|
||||||
@ -150,9 +150,9 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Info
|
label: Info
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_X
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: infoBrsr
|
||||||
callback:
|
callback:
|
||||||
argument:
|
argument:
|
||||||
|
|
||||||
@ -168,9 +168,9 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Citation style
|
label: Citation style
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_X
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: style
|
||||||
callback:
|
callback:
|
||||||
argument:
|
argument:
|
||||||
|
|
||||||
@ -186,9 +186,9 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Text before
|
label: Text before
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_X
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: textBefore
|
||||||
callback:
|
callback:
|
||||||
argument:
|
argument:
|
||||||
|
|
||||||
@ -204,9 +204,9 @@ size: FL_DEFAULT_SIZE
|
|||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Text after
|
label: Text after
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_X
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name:
|
name: textAftr
|
||||||
callback:
|
callback:
|
||||||
argument:
|
argument:
|
||||||
|
|
||||||
@ -223,10 +223,10 @@ lcol: FL_BLACK
|
|||||||
label: OK
|
label: OK
|
||||||
shortcut: ^M
|
shortcut: ^M
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_ALL
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_SouthEast FL_SouthEast
|
||||||
name:
|
name: ok
|
||||||
callback:
|
callback: citation_cb
|
||||||
argument:
|
argument: InsetCitation::OK
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
@ -239,12 +239,12 @@ style: FL_NORMAL_STYLE
|
|||||||
size: FL_DEFAULT_SIZE
|
size: FL_DEFAULT_SIZE
|
||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Cancel
|
label: Cancel
|
||||||
shortcut:
|
shortcut: ^[
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_ALL
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_SouthEast FL_SouthEast
|
||||||
name:
|
name: cancel
|
||||||
callback:
|
callback: citation_cb
|
||||||
argument:
|
argument: InsetCitation::CANCEL
|
||||||
|
|
||||||
==============================
|
==============================
|
||||||
create_the_forms
|
create_the_forms
|
||||||
|
@ -43,71 +43,81 @@ extern "C" void citation_cb( FL_OBJECT *, long data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FD_citation_form * create_form_citation_form(void)
|
FD_citation_form *create_form_citation_form(void)
|
||||||
{
|
{
|
||||||
FL_OBJECT * obj;
|
FL_OBJECT *obj;
|
||||||
FD_citation_form * fdui = (FD_citation_form *) fl_calloc(1, sizeof(*fdui));
|
FD_citation_form *fdui = (FD_citation_form *) fl_calloc(1, sizeof(*fdui));
|
||||||
|
|
||||||
// NOTE: dialog geometry is set in setSize().
|
fdui->form = fl_bgn_form(FL_NO_BOX, 440, 790);
|
||||||
// Initial size is simply non-zero.
|
fdui->box = obj = fl_add_box(FL_UP_BOX,0,0,440,790,"");
|
||||||
fdui->form = fl_bgn_form(FL_NO_BOX, 10, 10);
|
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||||
fdui->box = obj = fl_add_box(FL_UP_BOX, 0, 0, 10, 10, "");
|
|
||||||
|
|
||||||
fdui->citeBrsr = obj =
|
fdui->citeBrsr = obj =
|
||||||
fl_add_browser(FL_HOLD_BROWSER, 0, 0, 10, 10, _("Citation keys"));
|
fl_add_browser(FL_HOLD_BROWSER,20,40,170,370,_("Inset keys"));
|
||||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
fl_set_object_lalign(obj,FL_ALIGN_TOP_LEFT);
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||||
fl_set_object_callback(obj, citation_cb, InsetCitation::CITEBRSR);
|
fl_set_object_callback(obj,citation_cb,InsetCitation::CITEBRSR);
|
||||||
|
|
||||||
fdui->bibBrsr = obj =
|
fdui->bibBrsr = obj =
|
||||||
fl_add_browser(FL_HOLD_BROWSER, 0, 0, 10, 10, _("Bibliography keys"));
|
fl_add_browser(FL_HOLD_BROWSER,250,40,170,370,_("Bibliography keys"));
|
||||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
fl_set_object_lalign(obj,FL_ALIGN_TOP_LEFT);
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||||
fl_set_object_callback(obj, citation_cb, InsetCitation::BIBBRSR);
|
fl_set_object_callback(obj,citation_cb,InsetCitation::BIBBRSR);
|
||||||
|
|
||||||
fdui->addBtn = obj =
|
fdui->addBtn = obj =
|
||||||
fl_add_button(FL_NORMAL_BUTTON, 0, 0, 10, 10, "@4->");
|
fl_add_button(FL_NORMAL_BUTTON,200,40,40,40,"@4->");
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||||
fl_set_object_callback(obj, citation_cb, InsetCitation::ADD);
|
fl_set_object_callback(obj,citation_cb,InsetCitation::ADD);
|
||||||
|
|
||||||
fdui->delBtn = obj =
|
fdui->delBtn = obj =
|
||||||
fl_add_button(FL_NORMAL_BUTTON, 0, 0, 10, 10, "@9+");
|
fl_add_button(FL_NORMAL_BUTTON,200,90,40,40,"@9+");
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||||
fl_set_object_callback(obj, citation_cb, InsetCitation::DELETE);
|
fl_set_object_callback(obj,citation_cb,InsetCitation::DELETE);
|
||||||
|
|
||||||
fdui->upBtn = obj =
|
fdui->upBtn = obj =
|
||||||
fl_add_button(FL_NORMAL_BUTTON, 0, 0, 10, 10, "@8->");
|
fl_add_button(FL_NORMAL_BUTTON,200,140,40,40,"@8->");
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||||
fl_set_object_callback(obj, citation_cb, InsetCitation::UP);
|
fl_set_object_callback(obj,citation_cb,InsetCitation::UP);
|
||||||
|
|
||||||
fdui->downBtn = obj =
|
fdui->downBtn = obj =
|
||||||
fl_add_button(FL_NORMAL_BUTTON, 0, 0, 10, 10, "@2->");
|
fl_add_button(FL_NORMAL_BUTTON,200,190,40,40,"@2->");
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||||
fl_set_object_callback(obj, citation_cb, InsetCitation::DOWN);
|
fl_set_object_callback(obj,citation_cb,InsetCitation::DOWN);
|
||||||
|
|
||||||
fdui->infoBrsr = obj =
|
fdui->infoBrsr = obj =
|
||||||
fl_add_browser(FL_NORMAL_BROWSER, 0, 0, 10, 10, _("Info"));
|
fl_add_browser(FL_NORMAL_BROWSER,20,440,400,110,_("Info"));
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE) ;
|
fl_set_object_lalign(obj,FL_ALIGN_TOP_LEFT);
|
||||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||||
|
|
||||||
fdui->textAftr = obj =
|
/*
|
||||||
fl_add_input(FL_NORMAL_INPUT, 0, 0, 10, 10, _("Text after"));
|
fdui->style = obj =
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_add_choice(FL_NORMAL_CHOICE,160,570,130,30,_("Citation style"));
|
||||||
|
fl_set_object_boxtype(obj,FL_DOWN_BOX);
|
||||||
|
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||||
|
|
||||||
fdui->ok = obj =
|
fdui->textBefore = obj =
|
||||||
fl_add_button(FL_RETURN_BUTTON, 0, 0, 10, 10, _("OK"));
|
fl_add_input(FL_NORMAL_INPUT,100,620,250,30,_("Text before"));
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||||
fl_set_object_callback(obj, citation_cb, InsetCitation::OK);
|
*/
|
||||||
|
|
||||||
fdui->cancel = obj =
|
fdui->textAftr = obj =
|
||||||
fl_add_button(FL_NORMAL_BUTTON, 0, 0, 10, 10, idex(_("Cancel|^[")));
|
fl_add_input(FL_NORMAL_INPUT,100,660,250,30,_("Text after"));
|
||||||
fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
|
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
|
||||||
fl_set_object_callback(obj, citation_cb, InsetCitation::CANCEL);
|
|
||||||
|
|
||||||
fl_end_form();
|
fdui->ok = obj =
|
||||||
|
fl_add_button(FL_RETURN_BUTTON,190,730,110,40,_("OK"));
|
||||||
|
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
|
||||||
|
fl_set_object_callback(obj,citation_cb,InsetCitation::OK);
|
||||||
|
|
||||||
return fdui;
|
fdui->cancel = obj =
|
||||||
|
fl_add_button(FL_NORMAL_BUTTON,310,730,110,40,idex(_("Cancel|^[")));
|
||||||
|
fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
|
||||||
|
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
|
||||||
|
fl_set_object_callback(obj,citation_cb,InsetCitation::CANCEL);
|
||||||
|
|
||||||
|
fl_end_form();
|
||||||
|
|
||||||
|
return fdui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -373,6 +383,10 @@ void InsetCitation::setSize( FD_citation_form * form,
|
|||||||
if( bibPresent ) formHeight += infoHeight + 30;
|
if( bibPresent ) formHeight += infoHeight + 30;
|
||||||
fl_set_form_size( form->form, 430, formHeight );
|
fl_set_form_size( form->form, 430, formHeight );
|
||||||
|
|
||||||
|
// No resizing is alowed in the y-direction
|
||||||
|
fl_set_form_minsize( form->form, 300, formHeight );
|
||||||
|
fl_set_form_maxsize( form->form, 1000, formHeight );
|
||||||
|
|
||||||
int ypos = 0;
|
int ypos = 0;
|
||||||
fl_set_object_geometry( form->box, 0, ypos, 430, formHeight );
|
fl_set_object_geometry( form->box, 0, ypos, 430, formHeight );
|
||||||
ypos += 30;
|
ypos += 30;
|
||||||
|
Loading…
Reference in New Issue
Block a user