From b22eaaa98a9620fae346b1bd1bf67311cb312ec0 Mon Sep 17 00:00:00 2001 From: Tobia Tesan Date: Fri, 20 Sep 2013 17:07:01 +0200 Subject: WINTERMUTE: Keep attributes private in UIEdit --- engines/wintermute/ui/ui_edit.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/engines/wintermute/ui/ui_edit.h b/engines/wintermute/ui/ui_edit.h index a057be9ead..7a379011fd 100644 --- a/engines/wintermute/ui/ui_edit.h +++ b/engines/wintermute/ui/ui_edit.h @@ -38,21 +38,15 @@ class BaseFont; class UIEdit : public UIObject { public: DECLARE_PERSISTENT(UIEdit, UIObject) - int32 _maxLength; + int insertChars(int pos, const byte *chars, int num); int deleteChars(int start, int end); - bool _cursorVisible; - uint32 _lastBlinkTime; + virtual bool display(int offsetX, int offsetY); virtual bool handleKeypress(Common::Event *event, bool printable = false); - int32 _scrollOffset; - int32 _frameWidth; - uint32 _cursorBlinkRate; + void setCursorChar(const char *character); - char *_cursorChar; - int32 _selEnd; - int32 _selStart; - BaseFont *_fontSelected; + UIEdit(BaseGame *inGame); virtual ~UIEdit(); @@ -65,6 +59,17 @@ public: virtual bool scSetProperty(const char *name, ScValue *value) override; virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override; virtual const char *scToString() override; +private: + uint32 _cursorBlinkRate; + uint32 _lastBlinkTime; + int32 _selEnd; + int32 _selStart; + int32 _scrollOffset; + int32 _frameWidth; + BaseFont *_fontSelected; + int32 _maxLength; + bool _cursorVisible; + char *_cursorChar; }; } // End of namespace Wintermute -- cgit v1.2.3