2015-11-29 02:55:30 +00:00
|
|
|
#ifndef SPECTER_MULTILINETEXTVIEW_HPP
|
|
|
|
#define SPECTER_MULTILINETEXTVIEW_HPP
|
|
|
|
|
|
|
|
#include "View.hpp"
|
|
|
|
#include "TextView.hpp"
|
|
|
|
#include "FontCache.hpp"
|
|
|
|
|
|
|
|
namespace Specter
|
|
|
|
{
|
|
|
|
|
|
|
|
class MultiLineTextView : public View
|
|
|
|
{
|
2015-12-02 01:32:15 +00:00
|
|
|
ViewResources& m_viewSystem;
|
2015-11-30 00:21:42 +00:00
|
|
|
std::vector<std::unique_ptr<TextView>> m_lines;
|
2015-11-29 02:55:30 +00:00
|
|
|
const FontAtlas& m_fontAtlas;
|
|
|
|
size_t m_lineCapacity;
|
|
|
|
float m_lineHeight;
|
|
|
|
public:
|
2015-12-02 01:32:15 +00:00
|
|
|
MultiLineTextView(ViewResources& res, View& parentView, const FontAtlas& font, size_t lineCapacity=256, float lineHeight=1.0);
|
|
|
|
MultiLineTextView(ViewResources& res, View& parentView, FontTag font, size_t lineCapacity=256, float lineHeight=1.0);
|
2015-11-29 02:55:30 +00:00
|
|
|
|
|
|
|
void typesetGlyphs(const std::string& str,
|
|
|
|
const Zeus::CColor& defaultColor=Zeus::CColor::skWhite);
|
|
|
|
void typesetGlyphs(const std::wstring& str,
|
|
|
|
const Zeus::CColor& defaultColor=Zeus::CColor::skWhite);
|
|
|
|
|
|
|
|
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
|
|
|
void draw(boo::IGraphicsCommandQueue* gfxQ);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SPECTER_MULTILINETEXTVIEW_HPP
|