diff options
author | Enne Walker <ennewalker@users.sourceforge.net> | 2010-04-19 20:00:06 -0400 |
---|---|---|
committer | Enne Walker <ennewalker@users.sourceforge.net> | 2010-04-25 19:33:13 -0400 |
commit | 8305dc11a61b732984b4bf2a2f8c8f48af84630e (patch) | |
tree | 9f605e327b60ab79111ae7c25bec938ed2261a0b /crawl-ref/source/tilereg-crt.h | |
parent | edacdc0db313c0f5385631dfcf560f1fdf8e7c8a (diff) | |
download | crawl-ref-8305dc11a61b732984b4bf2a2f8c8f48af84630e.tar.gz crawl-ref-8305dc11a61b732984b4bf2a2f8c8f48af84630e.zip |
Split tilereg.h/cc into multiple files.
No functional changes, just rearranging and exposing functions where
needed.
Diffstat (limited to 'crawl-ref/source/tilereg-crt.h')
-rw-r--r-- | crawl-ref/source/tilereg-crt.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/crawl-ref/source/tilereg-crt.h b/crawl-ref/source/tilereg-crt.h new file mode 100644 index 0000000000..7ad716b57a --- /dev/null +++ b/crawl-ref/source/tilereg-crt.h @@ -0,0 +1,58 @@ +/* + * File: tilereg.h + * Created by: ennewalker on Sat Jan 5 01:33:53 2008 UTC + */ + +#ifdef USE_TILE +#ifndef TILEREG_CRT_H +#define TILEREG_CRT_H + +#include "tilereg-text.h" + +class CRTMenuEntry; +class PrecisionMenu; + +/** + * Expanded CRTRegion to support highlightable and clickable entries - felirx + * The user of this region will have total control over the positioning of + * objects at all times + * The base class behaves like the current CRTRegion used commonly + * It's identity is mapped to the CRT_NOMOUSESELECT value in TilesFramework + * + * Menu Entries are handled via pointers and are shared with whatever MenuClass + * is using them. This is done to keep the keyboard selections in sync with mouse + */ +class CRTRegion : public TextRegion +{ +public: + + CRTRegion(FontWrapper *font); + virtual ~CRTRegion(); + + virtual void render(); + virtual void clear(); + + virtual int handle_mouse(MouseEvent& event); + + virtual void on_resize(); + + void attach_menu(PrecisionMenu* menu); + void detach_menu(); +protected: + PrecisionMenu* m_attached_menu; +}; + +/** + * Enhanced Mouse handling for CRTRegion + * The behaviour is CRT_SINGESELECT + */ +class CRTSingleSelect : public CRTRegion +{ +public: + CRTSingleSelect(FontWrapper* font); + + virtual int handle_mouse(MouseEvent& event); +}; + +#endif +#endif |