4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
16 #include "lengthcommon.h"
28 // Load an icon from GTK icon theme
29 // Return NULL if no suitable icon found
30 Gtk::Image *getGTKIcon(FuncRequest const & func, Gtk::IconSize const & size);
32 std::string const getDefaultUnit();
34 void unitsComboFromLength(
35 Gtk::ComboBox * combo,
36 Gtk::TreeModelColumn<Glib::ustring> const & stringcol,
37 LyXLength const & len,
38 std::string const & defunit);
40 std::vector<std::string> const buildLengthUnitList(bool userelative);
42 /** name is the name of the glade file, without path or extension.
43 * Eg, "aboutlyx", "tableCreate".
45 std::string const findGladeFile(std::string const & name);
48 typename std::vector<A>::size_type
49 findPos(std::vector<A> const & vec, A const & val)
51 typename std::vector<A>::const_iterator it =
52 std::find(vec.begin(), vec.end(), val);
55 return std::distance(vec.begin(), it);
58 } // namespace frontend
61 #endif // NOT GHELPERS_H