X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgui%2FguiHyperText.h;h=5b936262e88ab4aa256836fff75a31c4ef05518d;hb=91ad0d049706ed2892ba728cb8cad48480908027;hp=093c84ccd9473e61d62f289d2c217ef83e6edaee;hpb=b42493fb4c40611020c9ded9b7af5b96dc4148bd;p=dragonfireclient.git diff --git a/src/gui/guiHyperText.h b/src/gui/guiHyperText.h index 093c84ccd..5b936262e 100644 --- a/src/gui/guiHyperText.h +++ b/src/gui/guiHyperText.h @@ -134,11 +134,13 @@ class ParsedText Tag m_root_tag; protected: + typedef enum { ER_NONE, ER_TAG, ER_NEWLINE } EndReason; + // Parser functions void enterElement(ElementType type); void endElement(); void enterParagraph(); - void endParagraph(); + void endParagraph(EndReason reason); void pushChar(wchar_t c); ParsedText::Tag *newTag(const std::string &name, const AttrsList &attrs); ParsedText::Tag *openTag(const std::string &name, const AttrsList &attrs); @@ -160,6 +162,8 @@ class ParsedText StyleList m_style; Element *m_element; Paragraph *m_paragraph; + bool m_empty_paragraph; + EndReason m_end_paragraph_reason; }; class TextDrawer @@ -170,7 +174,7 @@ class TextDrawer void place(const core::rect &dest_rect); inline s32 getHeight() { return m_height; }; - void draw(const core::rect &dest_rect, + void draw(const core::rect &clip_rect, const core::position2d &dest_offset); ParsedText::Element *getElementAt(core::position2d pos); ParsedText::Tag *m_hovertag;