aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/ui/ui_object.h
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-09-30 11:23:36 +0200
committerEinar Johan Trøan Sømåen2013-09-30 11:23:57 +0200
commit48ad18d2664f83271613191351b7b92d06fd5cf0 (patch)
treeecc1f5266ec16bb2aa4c45a0152c420ac447f4e3 /engines/wintermute/ui/ui_object.h
parentaf8fa194be7abdb9f72d50a558a1dbcb3e666c9f (diff)
parentccd3258bdccaf7290137aea5b98889a9568547db (diff)
downloadscummvm-rg350-48ad18d2664f83271613191351b7b92d06fd5cf0.tar.gz
scummvm-rg350-48ad18d2664f83271613191351b7b92d06fd5cf0.tar.bz2
scummvm-rg350-48ad18d2664f83271613191351b7b92d06fd5cf0.zip
Merge branch 'refac'
Conflicts: engines/wintermute/graphics/transparent_surface.cpp engines/wintermute/graphics/transparent_surface.h
Diffstat (limited to 'engines/wintermute/ui/ui_object.h')
-rw-r--r--engines/wintermute/ui/ui_object.h56
1 files changed, 40 insertions, 16 deletions
diff --git a/engines/wintermute/ui/ui_object.h b/engines/wintermute/ui/ui_object.h
index 5d9508c2cf..8d14d8a6a4 100644
--- a/engines/wintermute/ui/ui_object.h
+++ b/engines/wintermute/ui/ui_object.h
@@ -41,35 +41,23 @@ class UIObject : public BaseObject {
public:
bool getTotalOffset(int *offsetX, int *offsetY);
- bool _canFocus;
bool focus();
virtual bool handleMouse(TMouseEvent event, TMouseButton button);
bool isFocused();
- bool _parentNotify;
+
DECLARE_PERSISTENT(UIObject, BaseObject)
UIObject *_parent;
virtual bool display() override { return display(0, 0); }
virtual bool display(int offsetX) { return display(offsetX, 0); }
virtual bool display(int offsetX, int offsetY);
virtual void correctSize();
- bool _sharedFonts;
- bool _sharedImages;
void setText(const char *text);
- char *_text;
- BaseFont *_font;
- bool _visible;
- UITiledImage *_back;
- bool _disable;
+
UIObject(BaseGame *inGame = nullptr);
virtual ~UIObject();
- int32 _width;
- int32 _height;
- TUIObjectType _type;
- BaseSprite *_image;
void setListener(BaseScriptHolder *object, BaseScriptHolder *listenerObject, uint32 listenerParam);
- BaseScriptHolder *_listenerParamObject;
- uint32 _listenerParamDWORD;
- BaseScriptHolder *_listenerObject;
+ BaseScriptHolder *getListener() const;
+
UIObject *_focusedWidget;
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
@@ -78,6 +66,42 @@ 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;
+ TUIObjectType _type;
+
+ int32 getWidth() const;
+ int32 getHeight() const;
+ void setHeight(int32 height);
+ void setWidth(int32 width);
+ bool isDisabled() const;
+ void setDisabled(bool disable);
+ bool isVisible() const;
+ void setVisible(bool visible);
+ bool hasSharedFonts() const;
+ void setSharedFonts(bool shared);
+ bool hasSharedImages() const;
+ void setSharedImages(bool shared);
+ BaseSprite *getImage() const;
+ void setImage(BaseSprite *image);
+ void setFont(BaseFont *font);
+ BaseFont *getFont();
+ bool canFocus() const;
+
+protected:
+ BaseScriptHolder *_listenerParamObject;
+ uint32 _listenerParamDWORD;
+ BaseScriptHolder *_listenerObject;
+ BaseSprite *_image;
+ BaseFont *_font;
+ bool _sharedFonts;
+ bool _sharedImages;
+ char *_text;
+ bool _visible;
+ bool _disable;
+ int32 _width;
+ int32 _height;
+ bool _canFocus;
+ bool _parentNotify;
+ UITiledImage *_back;
};
} // End of namespace Wintermute