]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormBase.h
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormBase.h
index d61281893d1c1e44af6beacac56ff4447a78ade4..3774f2bbf24c8725e510859d4f7713a22cd504e4 100644 (file)
@@ -33,7 +33,7 @@ class FormBase : public ViewBC<xformsBC>
 {
 public:
        ///
-       FormBase(ControlButtons &, string const &);
+       FormBase(ControlButtons &, string const &, bool allowResize);
        ///
        virtual ~FormBase() {}
 
@@ -51,21 +51,19 @@ protected:
 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_;
 };
@@ -76,7 +74,7 @@ class FormDB: public FormBase
 {
 protected:
        ///
-       FormDB(ControlButtons &, 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.
@@ -85,8 +83,8 @@ protected:
 
 
 template <class Dialog>
-FormDB<Dialog>::FormDB(ControlButtons & c, string const & t)
-       : FormBase(c, t)
+FormDB<Dialog>::FormDB(ControlButtons & c, string const & t, bool allowResize)
+       : FormBase(c, t, allowResize)
 {}
 
 
@@ -103,15 +101,16 @@ class FormCB: public Base
 {
 protected:
        ///
-       FormCB(ControlButtons &, string const &);
+       FormCB(ControlButtons &, string const &, bool allowResize=true);
        /// The parent controller
        Controller & controller() const;
 };
 
 
 template <class Controller, class Base>
-FormCB<Controller, Base>::FormCB(ControlButtons & c, string const & t)
-       : Base(c, t)
+FormCB<Controller, Base>::FormCB(ControlButtons & c, string const & t,
+                                bool allowResize)
+       : Base(c, t, allowResize)
 {}