X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2Fxforms_helpers.h;h=c4325d88012c236db156e51d5d180609d1f1a749;hb=27652900a60fd078f161ce866ddaed21dba21eff;hp=0e6b6050113fb3fcf3e92e057f718eca1f971e6c;hpb=b00e1315fe4da81da67f63d70e455cda167afab9;p=lyx.git diff --git a/src/frontends/xforms/xforms_helpers.h b/src/frontends/xforms/xforms_helpers.h index 0e6b605011..c4325d8801 100644 --- a/src/frontends/xforms/xforms_helpers.h +++ b/src/frontends/xforms/xforms_helpers.h @@ -7,8 +7,6 @@ #pragma interface #endif -#include - #include FORMS_H_LOCATION #include "Color.h" @@ -18,6 +16,12 @@ class LyXLength; +// what we always need for lengths +string const choice_Length_All = + "cm|mm|in|%%|c%%|p%%|l%%|ex|em|pt|sp|bp|dd|pc|cc|mu"; +string const choice_Length_WithUnit = + "cm|mm|in|ex|em|pt|sp|bp|dd|pc|cc|mu"; // all with a Unit + /// Extract shortcut from | string char const * flyx_shortcut_extract(char const * sc); /// Shortcut for flyx_shortcut_extract @@ -41,6 +45,21 @@ std::vector const getVectorFromChoice(FL_OBJECT *); /// Given an fl_browser, create a vector of its entries std::vector const getVectorFromBrowser(FL_OBJECT *); +/// Given an fl_input, return its contents. +string const getStringFromInput(FL_OBJECT * ob); + +/** Given an fl_browser, return the contents of the currently + highlighted line. +*/ +/** Given an fl_browser, return the contents of line + (xforms numbering convention; starts at 1). +*/ +string const getStringFromBrowser(FL_OBJECT * ob, int line); +/** Given an fl_browser, return the contents of the currently + highlighted line. +*/ +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);