aboutsummaryrefslogtreecommitdiff
path: root/gui/widget.h
diff options
context:
space:
mode:
authorJohannes Schickel2006-04-19 01:05:28 +0000
committerJohannes Schickel2006-04-19 01:05:28 +0000
commit30787714d30e9202890922ec10833e695bc8a3bf (patch)
treeb2a699d793bbafd7a5fade0f366b3ec3636f4ffe /gui/widget.h
parentec7e734adb2133a653f500636b101fc09ab6e4ae (diff)
downloadscummvm-rg350-30787714d30e9202890922ec10833e695bc8a3bf.tar.gz
scummvm-rg350-30787714d30e9202890922ec10833e695bc8a3bf.tar.bz2
scummvm-rg350-30787714d30e9202890922ec10833e695bc8a3bf.zip
Started to prepare the gui for runtime resolution switches.
(some little things could be missing yet though) svn-id: r22017
Diffstat (limited to 'gui/widget.h')
-rw-r--r--gui/widget.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/widget.h b/gui/widget.h
index 9869331909..08e811cd6a 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -98,6 +98,7 @@ protected:
public:
static Widget *findWidgetInChain(Widget *start, int x, int y);
+ static Widget *findWidgetInChain(Widget *start, const char *name);
public:
Widget(GuiObject *boss, int x, int y, int w, int h);
@@ -105,6 +106,10 @@ public:
virtual ~Widget();
void init();
+ void resize(int x, int y, int w, int h);
+
+ void setNext(Widget *w) { _next = w; }
+ Widget *next() { return _next; }
virtual int16 getAbsX() const { return _x + _boss->getChildX(); }
virtual int16 getAbsY() const { return _y + _boss->getChildY(); }
@@ -122,6 +127,8 @@ public:
virtual bool handleKeyUp(uint16 ascii, int keycode, int modifiers) { return false; } // Return true if the event was handled
virtual void handleTickle() {}
+ virtual void handleScreenChanged() { GuiObject::handleScreenChanged(); }
+
void draw();
void receivedFocus() { _hasFocus = true; receivedFocusWidget(); }
void lostFocus() { _hasFocus = false; lostFocusWidget(); }
@@ -171,6 +178,8 @@ public:
void setAlign(TextAlignment align);
TextAlignment getAlign() const { return _align; }
+ virtual void handleScreenChanged();
+
protected:
void drawWidget(bool hilite);
};