);
spec.ftype = f_Unknown;
- new GUIHyperText(
- spec.flabel.c_str(), Environment, this, spec.fid, rect, m_client, m_tsrc);
+ GUIHyperText *e = new GUIHyperText(spec.flabel.c_str(), Environment, this,
+ spec.fid, rect, m_client, m_tsrc);
+ e->drop();
m_fields.push_back(spec);
}
m_root_tag.style["color"] = "#EEEEEE";
m_root_tag.style["hovercolor"] = m_root_tag.style["color"];
- m_tags.push_back(&m_root_tag);
m_active_tags.push_front(&m_root_tag);
m_style = m_root_tag.style;
ParsedText::~ParsedText()
{
- for (auto &tag : m_tags)
+ for (auto &tag : m_not_root_tags)
delete tag;
}
Tag *newtag = new Tag();
newtag->name = name;
newtag->attrs = attrs;
- m_tags.push_back(newtag);
+ m_not_root_tags.push_back(newtag);
return newtag;
}
GUIHyperText::~GUIHyperText()
{
m_vscrollbar->remove();
+ m_vscrollbar->drop();
}
ParsedText::Element *GUIHyperText::getElementAt(s32 X, s32 Y)
std::unordered_map<std::string, StyleList> m_elementtags;
std::unordered_map<std::string, StyleList> m_paragraphtags;
- std::vector<Tag *> m_tags;
+ std::vector<Tag *> m_not_root_tags;
std::list<Tag *> m_active_tags;
// Current values