-string const browseFile(string const & filename,
- string const & title,
- string const & pattern,
- std::pair<string,string> const & dir1,
- std::pair<string,string> const & dir2);
+string const getSelectedStringFromBrowser(FL_OBJECT * ob);
+
+/// Given input and choice widgets, create a string such as "1cm"
+string getLengthFromWidgets(FL_OBJECT * input, FL_OBJECT * choice);
+
+/** Given a string such as "1cm", set the input and choice widgets.
+ If the string is empty, the choice will be set to default_unit.
+ */
+void updateWidgetsFromLengthString(FL_OBJECT * input, FL_OBJECT * choice,
+ string const & str,
+ string const & default_unit);
+
+/** Given a LyXLength, set the input and choice widgets.
+ If the length is null, the choice will be set to default_unit.
+ */
+void updateWidgetsFromLength(FL_OBJECT * input, FL_OBJECT * choice,
+ LyXLength const & len,
+ string const & default_unit);