*
* LyX, The Document Processor
*
- * Copyright 2000 The LyX Team.
+ * Copyright 2000-2001 The LyX Team.
*
* ======================================================
*
{
public:
///
- FormBase(ControlButton &, string const &);
+ FormBase(ControlButtons &, string const &, bool allowResize);
///
virtual ~FormBase() {}
private:
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const = 0;
- /** Filter the inputs on callback from xforms
- Return true if inputs are valid. */
+ /// Filter the inputs on callback from xforms
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
/** Redraw the form (on receipt of a Signal indicating, for example,
that the xform colors have been re-mapped). */
virtual void redraw();
-protected:
- /// Overcome a dumb xforms sizing bug
- mutable int minw_;
+ /// The dialog's minimum allowable dimensions.
+ int minw_;
///
- mutable int minh_;
-
-private:
+ int minh_;
+ /// Can the dialog be resized after it has been created?
+ bool allow_resize_;
/// dialog title, displayed by WM.
string title_;
};
{
protected:
///
- FormDB(ControlButton &, string const &);
+ FormDB(ControlButtons &, string const &, bool allowResize=true);
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const;
/// Real GUI implementation.
template <class Dialog>
-FormDB<Dialog>::FormDB(ControlButton & c, string const & t)
- : FormBase(c, t)
+FormDB<Dialog>::FormDB(ControlButtons & c, string const & t, bool allowResize)
+ : FormBase(c, t, allowResize)
{}
{
protected:
///
- FormCB(ControlButton &, string const &);
+ FormCB(ControlButtons &, string const &, bool allowResize=true);
/// The parent controller
Controller & controller() const;
};
template <class Controller, class Base>
-FormCB<Controller, Base>::FormCB(ControlButton & c, string const & t)
- : Base(c, t)
+FormCB<Controller, Base>::FormCB(ControlButtons & c, string const & t,
+ bool allowResize)
+ : Base(c, t, allowResize)
{}