[Scummvm-cvs-logs] CVS: scummvm/gui widget.h,1.26,1.27

Max Horn fingolfin at users.sourceforge.net
Sun Nov 2 16:18:07 CET 2003


Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv2291

Modified Files:
	widget.h 
Log Message:
Widget::handleCommand delegates unhandled commands to the boss

Index: widget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/widget.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- widget.h	2 Nov 2003 22:31:20 -0000	1.26
+++ widget.h	3 Nov 2003 00:17:12 -0000	1.27
@@ -113,7 +113,10 @@
 	
 	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 */





More information about the Scummvm-git-logs mailing list