11 // Insert the latex builtin float-types
14 Floating table("table", "htbp", "lot", "", "plain", "Table", true);
15 list[table.type()] = table;
18 Floating figure("figure", "htbp", "lof", "", "plain", "Figure", true);
19 list[figure.type()] = figure;
21 // And we add algorithm too since LyX has
22 // supported that for a long time,
23 // but support for this should probably be moved to a layout file.
24 Floating algorithm("algorithm", "htbp", "loa",
25 "", "ruled", "Algorithm");
26 list[algorithm.type()] = algorithm;
30 FloatList::const_iterator FloatList::begin() const
36 FloatList::const_iterator FloatList::end() const
42 void FloatList::newFloat(Floating const & fl)
48 string const FloatList::defaultPlacement(string const & t) const
50 List::const_iterator cit = list.find(t);
51 if (cit != list.end())
52 return (*cit).second.placement();
57 bool FloatList::typeExist(string const & t) const
59 List::const_iterator cit = list.find(t);
60 return cit != list.end();
64 Floating const & FloatList::getType(string const & t) const
66 // I wish we could use exceptions
67 List::const_iterator cit = list.find(t);
68 if (cit != list.end())
70 #ifdef HAVE_EXCEPTIONS
71 throw UnknownFloatType(t);
73 static Floating empty_float;
79 FloatList::const_iterator FloatList::operator[](string const & t) const
85 // The global floatlist