diff options
author | Florian Diebold <flodiebold@gmail.com> | 2011-04-11 20:15:49 +0200 |
---|---|---|
committer | Florian Diebold <flodiebold@gmail.com> | 2011-06-26 17:41:18 +0200 |
commit | 13d737ecc79b9d366a60cff4c2e10dcdee88f4e5 (patch) | |
tree | 87949ccdd83a195735dafbae17a32fcbcbb61738 /crawl-ref/source/tileweb-text.h | |
parent | 81a5812d15b1c25cc55ee9160bd776db11efd4ae (diff) | |
download | crawl-ref-13d737ecc79b9d366a60cff4c2e10dcdee88f4e5.tar.gz crawl-ref-13d737ecc79b9d366a60cff4c2e10dcdee88f4e5.zip |
Yet another text area rewrite.
Now the texts are cached in the crawl process and then sent as html.
Diffstat (limited to 'crawl-ref/source/tileweb-text.h')
-rw-r--r-- | crawl-ref/source/tileweb-text.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/crawl-ref/source/tileweb-text.h b/crawl-ref/source/tileweb-text.h new file mode 100644 index 0000000000..6d2d570e6e --- /dev/null +++ b/crawl-ref/source/tileweb-text.h @@ -0,0 +1,60 @@ +#ifdef USE_TILE_WEB +#ifndef TILEWEB_TEXT_H +#define TILEWEB_TEXT_H + +#include <string> + +class WebTextArea +{ +public: + WebTextArea(std::string name); + virtual ~WebTextArea(); + + void resize(int mx, int my); + + void clear(); + + void put_character(ucs_t chr, int fg, int bg, int x, int y); + + void send(); + + int mx, my; // Size + +protected: + ucs_t *m_cbuf; // Character buffer + uint8_t *m_abuf; // Color buffer + + std::string m_client_side_name; + + virtual void on_resize(); +}; + +class CRTTextArea : public WebTextArea +{ +public: + CRTTextArea(); + +protected: + virtual void on_resize(); +}; + +class StatTextArea : public WebTextArea +{ +public: + StatTextArea(); + +protected: + virtual void on_resize(); +}; + +class MessageTextArea : public WebTextArea +{ +public: + MessageTextArea(); + +protected: + virtual void on_resize(); +}; + +#endif +#endif |