+2002-10-24 Rob Lahaye <lahaye@snu.ac.kr>
+
+ * FormFloat.C (input): fix the radio buttongroup behaviour.
+
+ * RadioButtonGroup.C (init): Assert on ROUND3DBUTTON and RADIO_BUTTON
+ when adding object to the group.
+
+ * forms/form_float.fd: use RADIO_BUTTON for the buttons in the radio
+ group.
+
+ * FormDocument.C: remove redundant header files.
+
+2002-10-24 Angus Leeming <leeming@lyx.org>
+
+ * Dialogs_impl.h: set the policy of the BibtexDialog to
+ NoRepeatedApplyReadOnlyPolicy.
+
2002-10-23 Rob Lahaye <lahaye@snu.ac.kr>
* forms/form_float.fd: prettify and implement gravity/resize policy
typedef GUI<ControlBibitem, FormBibitem, OkCancelReadOnlyPolicy, xformsBC>
BibitemDialog;
-typedef GUI<ControlBibtex, FormBibtex, OkApplyCancelReadOnlyPolicy, xformsBC>
+typedef GUI<ControlBibtex, FormBibtex, NoRepeatedApplyReadOnlyPolicy, xformsBC>
BibtexDialog;
typedef GUI<ControlCharacter, FormCharacter, OkApplyCancelReadOnlyPolicy, xformsBC>
#include <config.h>
-#include FORMS_H_LOCATION
-#include XPM_H_LOCATION
-
#ifdef __GNUG__
#pragma implementation
#endif
#include "FormDocument.h"
#include "forms/form_document.h"
-#include "Alert.h"
-#include "lyxtextclasslist.h"
-#include "combox.h"
-#include "tex-strings.h"
-#include "bufferparams.h"
-#include "vspace.h"
+
#include "bmtable.h"
-#include "language.h"
-#include "frnt_lang.h"
-#include "frontends/LyXView.h"
-#include "lyxfunc.h"
-#include "lyxrc.h"
-#include "BufferView.h"
+#include "checkedwidgets.h"
+#include "combox.h"
+#include "input_validators.h" // fl_unsigned_float_filter
+#include "xforms_helpers.h"
+
#include "buffer.h"
+#include "BufferView.h"
#include "CutAndPaste.h"
-#include "bufferview_funcs.h"
-#include "xforms_helpers.h"
-#include "checkedwidgets.h"
#include "debug.h"
-#include "input_validators.h" // fl_unsigned_float_filter
-#include "helper_funcs.h"
+#include "language.h"
#include "lyx_main.h" // for user_lyxdir
+#include "lyxrc.h"
+#include "lyxtextclasslist.h"
+#include "tex-strings.h"
-#include "insets/insetquotes.h"
+#include "controllers/frnt_lang.h"
+#include "controllers/helper_funcs.h"
+
+#include "frontends/LyXView.h"
+#include "frontends/Alert.h"
#include "support/filetools.h"
-#include "support/lstrings.h"
+#include XPM_H_LOCATION
#include FORMS_H_LOCATION
#include <boost/bind.hpp>
ButtonPolicy::SMInput FormFloat::input(FL_OBJECT * ob, long)
{
- bool alternatives = placement_.get() == ALTERNATIVES;
+ bool const alternatives = placement_.get() == ALTERNATIVES;
bool const wide = fl_get_button(dialog_->check_wide);
if (ob == dialog_->radio_default ||
ob == dialog_->radio_here_definitely ||
ob == dialog_->radio_alternatives) {
-
- // set radio button
- placement_.set(ob);
- alternatives = placement_.get() == ALTERNATIVES;
-
- // enable check buttons for Alternatives
+ // enable check buttons only for Alternatives
setEnabled(dialog_->check_top, alternatives);
setEnabled(dialog_->check_bottom, alternatives);
setEnabled(dialog_->check_page, alternatives);
setEnabled(dialog_->check_here, alternatives && !wide);
} else if (ob == dialog_->check_wide) {
- // wide float doesn't allow 'Here, definitely!' and 'here'
- setEnabled(dialog_->radio_here_definitely, !wide);
- setEnabled(dialog_->check_here, alternatives && !wide);
-
- // flip to default, if 'Here, definitely!' was selected
if (wide && placement_.get() == HERE_DEFINITELY) {
+ // wide float doesn't allow 'Here, definitely!'
+ // placement
placement_.set(dialog_->radio_default);
}
+ setEnabled(dialog_->check_here, alternatives && !wide);
+ setEnabled(dialog_->radio_here_definitely, !wide);
}
// enable force button, if Alternatives is selected and at least
#include "RadioButtonGroup.h"
#include FORMS_H_LOCATION
+#include "support/LAssert.h"
#include "debug.h" // for lyxerr
#include "support/lyxfunctional.h"
void RadioButtonGroup::init(FL_OBJECT * ob, size_type value)
{
+ // Object must be a ROUND3DBUTTON (let all radio buttons look the same)
+ // and of type RADIO_BUTTON (otherwise it ain't work).
+ lyx::Assert(ob && ob->objclass == FL_ROUND3DBUTTON
+ && ob->type == FL_RADIO_BUTTON);
+
map.push_back(ButtonValuePair(ob, value));
}
--------------------
class: FL_ROUND3DBUTTON
-type: PUSH_BUTTON
+type: RADIO_BUTTON
box: 10 85 200 25
boxtype: FL_NO_BOX
colors: FL_COL1 FL_YELLOW
--------------------
class: FL_ROUND3DBUTTON
-type: PUSH_BUTTON
+type: RADIO_BUTTON
box: 10 55 200 25
boxtype: FL_NO_BOX
colors: FL_COL1 FL_YELLOW
--------------------
class: FL_ROUND3DBUTTON
-type: PUSH_BUTTON
+type: RADIO_BUTTON
box: 10 25 200 25
boxtype: FL_NO_BOX
colors: FL_COL1 FL_YELLOW