diff options
author | Eugene Sandulenko | 2017-07-30 22:46:58 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-01 10:42:22 +0200 |
commit | a2427fddd72f6c18c1609e50393950c8f2cb20ba (patch) | |
tree | 01bffdf8590224b1c219b818046d4602c12a01da /graphics/macgui/mactextwindow.h | |
parent | 62a2ac8c2bf2113e6cd96c232f6d68bcb6d42929 (diff) | |
download | scummvm-rg350-a2427fddd72f6c18c1609e50393950c8f2cb20ba.tar.gz scummvm-rg350-a2427fddd72f6c18c1609e50393950c8f2cb20ba.tar.bz2 scummvm-rg350-a2427fddd72f6c18c1609e50393950c8f2cb20ba.zip |
GRAPHICS: MACGUI: Initial code for cursor drawing in MacTextWindow
Diffstat (limited to 'graphics/macgui/mactextwindow.h')
-rw-r--r-- | graphics/macgui/mactextwindow.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/graphics/macgui/mactextwindow.h b/graphics/macgui/mactextwindow.h index 802d02b717..0e48122e36 100644 --- a/graphics/macgui/mactextwindow.h +++ b/graphics/macgui/mactextwindow.h @@ -28,6 +28,10 @@ namespace Graphics { +enum { + kCursorHeight = 12 +}; + struct SelectedText { int startX, startY; int endX, endY; @@ -49,6 +53,13 @@ public: virtual bool processEvent(Common::Event &event); + /** + * Similar to that described in BaseMacWindow. + * @param g See BaseMacWindow. + * @param forceRedraw If true, the borders are guarranteed to redraw. + */ + virtual bool draw(ManagedSurface *g, bool forceRedraw = false); + void setTextWindowFont(const MacFont *macFont); const MacFont *getTextWindowFont(); @@ -59,9 +70,21 @@ public: void setSelection(int selStartX, int selStartY, int selEndX, int selEndY); + void undrawCursor(); + private: void drawInput(); +public: + int _cursorX, _cursorY; + bool _cursorState; + + bool _cursorDirty; + Common::Rect _cursorRect; + bool _cursorOff; + + int _scrollPos; + private: MacText *_mactext; const MacFont *_font; @@ -72,6 +95,7 @@ private: int _maxWidth; Common::String _inputText; uint _inputTextHeight; + }; } // End of namespace Graphics |