- int const infoHeight = 110;
- int const otherHeight = 140;
- brsrHeight = max( brsrHeight, 175 );
- int formHeight = brsrHeight + otherHeight;
-
- if( bibPresent ) formHeight += infoHeight + 30;
- fl_set_form_size( dialog_->form_citation, 430, formHeight );
-
- // No resizing is alowed in the y-direction
- fl_set_form_minsize( dialog_->form_citation, 430, formHeight );
- fl_set_form_maxsize( dialog_->form_citation, 1000, formHeight );
-
- int ypos = 0;
- fl_set_object_geometry( dialog_->box, 0, ypos, 430, formHeight );
- ypos += 30;
- fl_set_object_geometry( dialog_->citeBrsr, 10, ypos, 180, brsrHeight );
- fl_set_object_geometry( dialog_->bibBrsr, 240, ypos, 180, brsrHeight );
- fl_set_object_geometry( dialog_->addBtn, 200, ypos, 30, 30 );
- ypos += 35;
- fl_set_object_geometry( dialog_->delBtn, 200, ypos, 30, 30 );
- ypos += 35;
- fl_set_object_geometry( dialog_->upBtn, 200, ypos, 30, 30 );
- ypos += 35;
- fl_set_object_geometry( dialog_->downBtn, 200, ypos, 30, 30 );
-
- ypos = brsrHeight+30; // base of Citation/Bibliography browsers
-
- // awaiting natbib support
- fl_hide_object( dialog_->style );
-
- if( bibPresent ) {
- ypos += 30;
- fl_set_object_geometry( dialog_->infoBrsr, 10, ypos, 410, infoHeight );
+ bool const natbib = false; // will eventually be input
+ hbrsr = max( hbrsr, 175 ); // limit max size of cite/bib brsrs
+
+ // dh1, dh2, dh3 are the vertical separation between elements.
+ // These can be specified because the browser height is fixed
+ // so they are not changed by dynamic resizing
+ static int const dh1 = 30; // top of form to top of cite/bib brsrs;
+ // bottom of cite/bib brsrs to top of info;
+ // bottom of info to top next element;
+ // bottom of style to top textBefore;
+ // bottom of text to top ok/cancel buttons.
+ static int const dh2 = 10; // bottom of textBefore to top textAftr;
+ // bottom of ok/cancel buttons to bottom form
+ static int const dh3 = 5; // spacing between add/delete/... buttons.
+
+ int const wbrsr = dialog_->citeBrsr->w;
+ static int const hinfo = dialog_->infoBrsr->h;
+ static int const hstyle = dialog_->style->h;
+ static int const htext = dialog_->textAftr->h;
+ static int const hok = dialog_->button_ok->h;
+
+ int hform = dh1 + hbrsr + dh1;
+ if (bibPresent ) hform += hinfo + dh1;
+ if (natbib ) hform += hstyle + dh1 + htext + dh2;
+ hform += htext + dh1 + hok + dh2;
+
+ if (hform != minh_) {
+ minh_ = hform;
+ fl_set_form_size( dialog_->form, minw_, minh_ );
+ } else
+ return;
+
+ int x = 0;
+ int y = 0;
+ fl_set_object_geometry( dialog_->box, x, y, minw_, minh_ );
+
+ x = dialog_->citeBrsr->x;
+ y += dh1;
+ fl_set_object_geometry( dialog_->citeBrsr, x, y, wbrsr, hbrsr );
+ x = dialog_->bibBrsr->x;
+ fl_set_object_geometry( dialog_->bibBrsr, x, y, wbrsr, hbrsr );
+
+ x = dialog_->addBtn->x;
+ fl_set_object_position( dialog_->addBtn, x, y );
+ y += dh3 + dialog_->addBtn->h;
+ fl_set_object_position( dialog_->delBtn, x, y );
+ y += dh3 + dialog_->delBtn->h;
+ fl_set_object_position( dialog_->upBtn, x, y );
+ y += dh3 + dialog_->upBtn->h;
+ fl_set_object_position( dialog_->downBtn, x, y );
+
+ y = dh1 + hbrsr + dh1; // in position for next element
+
+ if (bibPresent) {
+ x = dialog_->infoBrsr->x;
+ fl_set_object_position( dialog_->infoBrsr, x, y );