public:
class Loader: public Widget::Loader
{
+ public:
+ typedef std::map<std::string, Widget *> WidgetMap;
+
private:
Panel &pnl;
- std::map<std::string, Widget *> &wdg_map;
+ WidgetMap &wdg_map;
public:
- Loader(Panel &, std::map<std::string, Widget *> &);
+ Loader(Panel &, WidgetMap &);
private:
template<typename T>
void child(const std::string &);
#ifndef MSP_GLTK_PART_H_
#define MSP_GLTK_PART_H_
-#include <map>
#include <string>
#include <msp/datafile/loader.h>
-//#include "alignment.h"
#include "geometry.h"
#include "state.h"
const Alignment &get_alignment() const { return align; }
void render(const Geometry &, State) const;
};
-typedef std::list<Part> PartSeq;
} // namespace GLtk
} // namespace Msp
void part(const std::string &);
};
+ typedef std::list<Part> PartSeq;
+
private:
const GL::Font *font;
GL::Color font_color;
void root();
};
+ typedef std::map<std::string, Widget *> WidgetMap;
+
private:
- std::map<std::string, Widget *> widgets;
+ WidgetMap widgets;
Root root;
Logic logic;
template<typename W>
W &get_widget(const std::string &n) const
{
- std::map<std::string, Widget *>::const_iterator i = widgets.find(n);
+ WidgetMap::const_iterator i = widgets.find(n);
if(i==widgets.end())
throw KeyError("Unknown widget", n);
GL::push_matrix();
GL::translate(geom.x, geom.y, 0);
- for(PartSeq::const_iterator i=style->get_parts().begin(); i!=style->get_parts().end(); ++i)
+ const Style::PartSeq &parts = style->get_parts();
+ for(Style::PartSeq::const_iterator i=parts.begin(); i!=parts.end(); ++i)
{
if(i->get_name().empty())
{