diff options
author | Max Horn | 2003-11-03 00:17:12 +0000 |
---|---|---|
committer | Max Horn | 2003-11-03 00:17:12 +0000 |
commit | 56bc7370862a0c7c21bc0f27b03da103cc33ffae (patch) | |
tree | 69317e28154f1c07c1f9784f1d27e5a14163c37c /gui | |
parent | 1fd0ecdccefb4f248a87bca9751959dff10d9125 (diff) | |
download | scummvm-rg350-56bc7370862a0c7c21bc0f27b03da103cc33ffae.tar.gz scummvm-rg350-56bc7370862a0c7c21bc0f27b03da103cc33ffae.tar.bz2 scummvm-rg350-56bc7370862a0c7c21bc0f27b03da103cc33ffae.zip |
Widget::handleCommand delegates unhandled commands to the boss
svn-id: r11071
Diffstat (limited to 'gui')
-rw-r--r-- | gui/widget.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/widget.h b/gui/widget.h index d6da1a5229..8c8db73608 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -113,7 +113,10 @@ protected: virtual Widget *findWidget(int x, int y) { return this; } - void releaseFocus() { _boss->releaseFocus(); } + void releaseFocus() { assert(_boss); _boss->releaseFocus(); } + + // By default, delegate unhandled commands to the boss + void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { assert(_boss); _boss->handleCommand(sender, cmd, data); } }; /* StaticTextWidget */ |