]> git.lyx.org Git - lyx.git/blobdiff - src/combox.h
mathed31.diff
[lyx.git] / src / combox.h
index b4f78df680adec285769c81fbde463e649fb0131..53c3fa6a626aeaa009d02057ea59f02219d980fd 100644 (file)
@@ -59,9 +59,15 @@ public:
        ~Combox();
 
        /** To add this object to a form. Note that there are two heights
-        for normal (button) and expanded (browser) mode each.
+           for normal (button) and expanded (browser) mode each.
+           The optional tabfolder arguments are needed to overcome an
+           xforms bug when repositioning a combox in a tab folder.
+           tabfolder1_ is the folder holding the combox.
+           If using nested tabfolders, tabfolder2_ is the "base" folder
+           holding tabfolder1_.
        */
-       void add(int x, int y, int w, int hmin, int hmax);
+       void add(int x, int y, int w, int hmin, int hmax,
+                FL_OBJECT * tabfolder1_ = 0, FL_OBJECT * tabfolder2_ = 0);
        
        /// Add lines. Same as for fl_browser object
        void addline(string const &);
@@ -127,7 +133,9 @@ public:
        ///
        combox_type type;
        ///
-        int bw, bh;
+        int bw;
+       ///
+       int bh;
        ///
        int sel;
        ///
@@ -146,6 +154,10 @@ public:
        FL_OBJECT * label;
        ///
         FL_FORM* form;
+       ///
+       FL_OBJECT * tabfolder1;
+       ///
+       FL_OBJECT * tabfolder2;
 };
 
 
@@ -222,7 +234,7 @@ string const Combox::getline() const
       return fl_get_input(label);
     else
       return (browser && sel > 0) ?
-             fl_get_browser_line(browser, sel) : string();
+             string(fl_get_browser_line(browser, sel)) : string();
 }
 
 #endif