mirror of https://github.com/stella-emu/stella.git
Added 'id' item to handleCommand(), so that the method knows which widget
has sent a signal (required when there are more than one of the same type of widget in a widget/container). Still TODO is modify each handleCommand() method that cares about 'id' to actually detect and act on it. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@608 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
3e0a2db948
commit
1e1ce94b7d
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AboutDialog.cxx,v 1.3 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: AboutDialog.cxx,v 1.4 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -230,7 +230,7 @@ void AboutDialog::displayInfo()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void AboutDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void AboutDialog::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
@ -255,6 +255,6 @@ void AboutDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AboutDialog.hxx,v 1.2 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: AboutDialog.hxx,v 1.3 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -51,7 +51,7 @@ class AboutDialog : public Dialog
|
|||
int myNumPages;
|
||||
|
||||
private:
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
virtual void updateStrings(int page, int lines, string& title, string* &dsc);
|
||||
void displayInfo();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AddrValueWidget.cxx,v 1.7 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: AddrValueWidget.cxx,v 1.8 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -142,7 +142,7 @@ void AddrValueWidget::handleMouseDown(int x, int y, int button, int clickCount)
|
|||
if (_editMode)
|
||||
abortEditMode();
|
||||
_selectedItem = newSelectedItem;
|
||||
sendCommand(kAVSelectionChangedCmd, _selectedItem);
|
||||
sendCommand(kAVSelectionChangedCmd, _selectedItem, _id);
|
||||
|
||||
// TODO - dirty rectangle
|
||||
instance()->frameBuffer().refreshOverlay();
|
||||
|
@ -160,7 +160,7 @@ void AddrValueWidget::handleMouseUp(int x, int y, int button, int clickCount)
|
|||
// send the double click command
|
||||
if (clickCount == 2 && (_selectedItem == findItem(x, y)))
|
||||
{
|
||||
sendCommand(kAVItemDoubleClickedCmd, _selectedItem);
|
||||
sendCommand(kAVItemDoubleClickedCmd, _selectedItem, _id);
|
||||
|
||||
// Start edit mode
|
||||
if(_editable && !_editMode)
|
||||
|
@ -213,7 +213,7 @@ bool AddrValueWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
startEditMode();
|
||||
}
|
||||
else
|
||||
sendCommand(kAVItemActivatedCmd, _selectedItem);
|
||||
sendCommand(kAVItemActivatedCmd, _selectedItem, _id);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -259,7 +259,7 @@ bool AddrValueWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
|
||||
if (_selectedItem != oldSelectedItem)
|
||||
{
|
||||
sendCommand(kAVSelectionChangedCmd, _selectedItem);
|
||||
sendCommand(kAVSelectionChangedCmd, _selectedItem, _id);
|
||||
// also draw scrollbar
|
||||
_scrollBar->draw();
|
||||
|
||||
|
@ -287,7 +287,8 @@ void AddrValueWidget::lostFocusWidget()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void AddrValueWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void AddrValueWidget::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
|
@ -427,7 +428,7 @@ void AddrValueWidget::endEditMode()
|
|||
_valueStringList[_selectedItem] = _editString;
|
||||
_valueList[_selectedItem] = value;
|
||||
|
||||
sendCommand(kAVItemDataChangedCmd, _selectedItem);
|
||||
sendCommand(kAVItemDataChangedCmd, _selectedItem, _id);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AddrValueWidget.hxx,v 1.5 2005-06-22 18:30:43 stephena Exp $
|
||||
// $Id: AddrValueWidget.hxx,v 1.6 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -64,7 +64,7 @@ class AddrValueWidget : public EditableWidget, public CommandSender
|
|||
virtual void handleMouseWheel(int x, int y, int direction);
|
||||
virtual bool handleKeyDown(int ascii, int keycode, int modifiers);
|
||||
virtual bool handleKeyUp(int ascii, int keycode, int modifiers);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
virtual bool wantsFocus() { return true; }
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AudioDialog.cxx,v 1.9 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: AudioDialog.cxx,v 1.10 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -193,7 +193,8 @@ void AudioDialog::handleSoundEnableChange(bool active)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void AudioDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void AudioDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
@ -215,7 +216,7 @@ void AudioDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AudioDialog.hxx,v 1.4 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: AudioDialog.hxx,v 1.5 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -52,7 +52,7 @@ class AudioDialog : public Dialog
|
|||
void setDefaults();
|
||||
|
||||
void handleSoundEnableChange(bool active);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: BrowserDialog.cxx,v 1.6 2005-06-20 18:32:12 stephena Exp $
|
||||
// $Id: BrowserDialog.cxx,v 1.7 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -88,7 +88,8 @@ void BrowserDialog::setStartPath(const string& startpath)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void BrowserDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void BrowserDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
|
@ -103,8 +104,9 @@ void BrowserDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
_choice = _node;
|
||||
|
||||
// Send a signal to the calling class that a selection has been made
|
||||
// Since we aren't derived from a widget, we don't have a 'data' or 'id'
|
||||
if(_cmd)
|
||||
sendCommand(_cmd, 0);
|
||||
sendCommand(_cmd, 0, 0);
|
||||
|
||||
close();
|
||||
break;
|
||||
|
@ -122,7 +124,7 @@ void BrowserDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: BrowserDialog.hxx,v 1.4 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: BrowserDialog.hxx,v 1.5 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -43,7 +43,7 @@ class BrowserDialog : public Dialog, public CommandSender
|
|||
void setStartPath(const string& startpath);
|
||||
|
||||
protected:
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
void updateListing();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: CheatWidget.cxx,v 1.10 2005-06-20 21:01:37 stephena Exp $
|
||||
// $Id: CheatWidget.cxx,v 1.11 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -104,7 +104,7 @@ CheatWidget::~CheatWidget()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CheatWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void CheatWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: CheatWidget.hxx,v 1.5 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: CheatWidget.hxx,v 1.6 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -52,7 +52,7 @@ class CheatWidget : public Widget, public CommandSender
|
|||
|
||||
Widget* activeWidget() { return myActiveWidget; }
|
||||
|
||||
void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
private:
|
||||
void doSearch();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Command.hxx,v 1.4 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: Command.hxx,v 1.5 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -28,7 +28,7 @@
|
|||
Allows base GUI objects to send and receive commands.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: Command.hxx,v 1.4 2005-06-16 00:55:59 stephena Exp $
|
||||
@version $Id: Command.hxx,v 1.5 2005-07-05 15:25:44 stephena Exp $
|
||||
*/
|
||||
class CommandReceiver;
|
||||
class CommandSender;
|
||||
|
@ -41,7 +41,7 @@ class CommandReceiver
|
|||
virtual ~CommandReceiver() {}
|
||||
|
||||
protected:
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data) {}
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) {}
|
||||
};
|
||||
|
||||
class CommandSender
|
||||
|
@ -57,10 +57,10 @@ class CommandSender
|
|||
void setTarget(CommandReceiver* target) { _target = target; }
|
||||
CommandReceiver* getTarget() const { return _target; }
|
||||
|
||||
virtual void sendCommand(int cmd, int data)
|
||||
virtual void sendCommand(int cmd, int data, int id)
|
||||
{
|
||||
if(_target && cmd)
|
||||
_target->handleCommand(this, cmd, data);
|
||||
_target->handleCommand(this, cmd, data, id);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: CpuWidget.cxx,v 1.9 2005-07-03 00:53:59 stephena Exp $
|
||||
// $Id: CpuWidget.cxx,v 1.10 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -135,7 +135,7 @@ CpuWidget::~CpuWidget()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CpuWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void CpuWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
int addr, value;
|
||||
Debugger& dbg = instance()->debugger();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: CpuWidget.hxx,v 1.4 2005-06-23 18:11:59 stephena Exp $
|
||||
// $Id: CpuWidget.hxx,v 1.5 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -41,7 +41,7 @@ class CpuWidget : public Widget, public CommandSender
|
|||
|
||||
Widget* activeWidget() { return myActiveWidget; }
|
||||
|
||||
void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
void loadConfig();
|
||||
|
||||
private:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: DataGridWidget.cxx,v 1.10 2005-07-05 00:07:57 stephena Exp $
|
||||
// $Id: DataGridWidget.cxx,v 1.11 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -92,7 +92,7 @@ void DataGridWidget::setList(const AddrList& alist, const ValueList& vlist,
|
|||
_editMode = false;
|
||||
|
||||
// Send item selected signal for starting with cell 0
|
||||
sendCommand(kDGSelectionChangedCmd, _selectedItem);
|
||||
sendCommand(kDGSelectionChangedCmd, _selectedItem, _id);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -105,7 +105,7 @@ void DataGridWidget::setSelectedValue(int value)
|
|||
_changedList[_selectedItem] = (_valueList[_selectedItem] != value);
|
||||
_valueList[_selectedItem] = value;
|
||||
|
||||
sendCommand(kDGItemDataChangedCmd, _selectedItem);
|
||||
sendCommand(kDGItemDataChangedCmd, _selectedItem, _id);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -133,7 +133,7 @@ void DataGridWidget::handleMouseDown(int x, int y, int button, int clickCount)
|
|||
_currentRow = _selectedItem / _cols;
|
||||
_currentCol = _selectedItem - (_currentRow * _cols);
|
||||
|
||||
sendCommand(kDGSelectionChangedCmd, _selectedItem);
|
||||
sendCommand(kDGSelectionChangedCmd, _selectedItem, _id);
|
||||
|
||||
// TODO - dirty rectangle
|
||||
instance()->frameBuffer().refreshOverlay();
|
||||
|
@ -151,7 +151,7 @@ void DataGridWidget::handleMouseUp(int x, int y, int button, int clickCount)
|
|||
// send the double click command
|
||||
if (clickCount == 2 && (_selectedItem == findItem(x, y)))
|
||||
{
|
||||
sendCommand(kDGItemDoubleClickedCmd, _selectedItem);
|
||||
sendCommand(kDGItemDoubleClickedCmd, _selectedItem, _id);
|
||||
|
||||
// Start edit mode
|
||||
if(_editable && !_editMode)
|
||||
|
@ -300,47 +300,47 @@ bool DataGridWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
// commands someday (the CPU tab in particular should).
|
||||
if(!handled) switch(ascii) {
|
||||
case 'n': // negate
|
||||
sendCommand(kRNegateCmd, _selectedItem);
|
||||
sendCommand(kRNegateCmd, _selectedItem, _id);
|
||||
dirty = true;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case 'i': // invert
|
||||
case '!':
|
||||
sendCommand(kRInvertCmd, _selectedItem);
|
||||
sendCommand(kRInvertCmd, _selectedItem, _id);
|
||||
dirty = true;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case '-': // decrement
|
||||
sendCommand(kRDecCmd, _selectedItem);
|
||||
sendCommand(kRDecCmd, _selectedItem, _id);
|
||||
dirty = true;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case '+': // increment
|
||||
case '=':
|
||||
sendCommand(kRIncCmd, _selectedItem);
|
||||
sendCommand(kRIncCmd, _selectedItem, _id);
|
||||
dirty = true;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case '<': // shift left
|
||||
case ',':
|
||||
sendCommand(kRShiftLCmd, _selectedItem);
|
||||
sendCommand(kRShiftLCmd, _selectedItem, _id);
|
||||
dirty = true;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case '>': // shift right
|
||||
case '.':
|
||||
sendCommand(kRShiftRCmd, _selectedItem);
|
||||
sendCommand(kRShiftRCmd, _selectedItem, _id);
|
||||
dirty = true;
|
||||
handled = true;
|
||||
break;
|
||||
|
||||
case 'z': // zero
|
||||
sendCommand(kRZeroCmd, _selectedItem);
|
||||
sendCommand(kRZeroCmd, _selectedItem, _id);
|
||||
dirty = true;
|
||||
handled = true;
|
||||
break;
|
||||
|
@ -354,7 +354,7 @@ bool DataGridWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
{
|
||||
_selectedItem = _currentRow*_cols + _currentCol;
|
||||
draw();
|
||||
sendCommand(kDGSelectionChangedCmd, _selectedItem);
|
||||
sendCommand(kDGSelectionChangedCmd, _selectedItem, _id);
|
||||
|
||||
// TODO - dirty rectangle
|
||||
instance()->frameBuffer().refreshOverlay();
|
||||
|
@ -380,7 +380,8 @@ void DataGridWidget::lostFocusWidget()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DataGridWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void DataGridWidget::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: DataGridWidget.hxx,v 1.5 2005-07-03 00:53:59 stephena Exp $
|
||||
// $Id: DataGridWidget.hxx,v 1.6 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -61,7 +61,7 @@ class DataGridWidget : public EditableWidget, public CommandSender
|
|||
virtual void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
virtual bool handleKeyDown(int ascii, int keycode, int modifiers);
|
||||
virtual bool handleKeyUp(int ascii, int keycode, int modifiers);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
virtual bool wantsFocus() { return true; }
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: DebuggerDialog.cxx,v 1.20 2005-07-04 15:59:38 stephena Exp $
|
||||
// $Id: DebuggerDialog.cxx,v 1.21 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -125,7 +125,8 @@ void DebuggerDialog::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DebuggerDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void DebuggerDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
// We reload the tabs in the cases where the actions could possibly
|
||||
// change their contents
|
||||
|
@ -148,7 +149,7 @@ void DebuggerDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: DebuggerDialog.hxx,v 1.10 2005-06-24 12:01:27 stephena Exp $
|
||||
// $Id: DebuggerDialog.hxx,v 1.11 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -39,7 +39,7 @@ class DebuggerDialog : public Dialog
|
|||
PromptWidget *prompt();
|
||||
virtual void loadConfig();
|
||||
virtual void handleKeyDown(int ascii, int keycode, int modifiers);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
protected:
|
||||
TabWidget* myTab;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Dialog.cxx,v 1.20 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: Dialog.cxx,v 1.21 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -281,7 +281,7 @@ void Dialog::handleJoyUp(int stick, int button)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Dialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void Dialog::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Dialog.hxx,v 1.17 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: Dialog.hxx,v 1.18 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -35,7 +35,7 @@ class DialogContainer;
|
|||
This is the base class for all dialog boxes.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: Dialog.hxx,v 1.17 2005-06-16 00:55:59 stephena Exp $
|
||||
@version $Id: Dialog.hxx,v 1.18 2005-07-05 15:25:44 stephena Exp $
|
||||
*/
|
||||
class Dialog : public GuiObject
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ class Dialog : public GuiObject
|
|||
virtual void handleMouseMoved(int x, int y, int button);
|
||||
virtual void handleJoyDown(int stick, int button);
|
||||
virtual void handleJoyUp(int stick, int button);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
virtual void handleScreenChanged() {}
|
||||
|
||||
Widget* findWidget(int x, int y); // Find the widget at pos x,y if any
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: EventMappingDialog.cxx,v 1.15 2005-06-20 18:32:12 stephena Exp $
|
||||
// $Id: EventMappingDialog.cxx,v 1.16 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -208,7 +208,8 @@ void EventMappingDialog::handleJoyDown(int stick, int button)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void EventMappingDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void EventMappingDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
@ -246,6 +247,6 @@ void EventMappingDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: EventMappingDialog.hxx,v 1.10 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: EventMappingDialog.hxx,v 1.11 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -60,7 +60,7 @@ class EventMappingDialog : public Dialog
|
|||
kStopMapCmd = 'smap'
|
||||
};
|
||||
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
void startRemapping();
|
||||
void eraseRemapping();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: GameInfoDialog.cxx,v 1.7 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: GameInfoDialog.cxx,v 1.8 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -122,7 +122,8 @@ void GameInfoDialog::displayInfo()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void GameInfoDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void GameInfoDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
@ -147,6 +148,6 @@ void GameInfoDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: GameInfoDialog.hxx,v 1.6 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: GameInfoDialog.hxx,v 1.7 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -59,7 +59,7 @@ class GameInfoDialog : public Dialog
|
|||
uInt8 myNumPages;
|
||||
|
||||
private:
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
virtual void updateStrings(uInt8 page, uInt8 lines,
|
||||
string& title, string*& key, string* &dsc);
|
||||
void displayInfo();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: HelpDialog.cxx,v 1.9 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: HelpDialog.cxx,v 1.10 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -177,7 +177,8 @@ void HelpDialog::displayInfo()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void HelpDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void HelpDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
@ -202,6 +203,6 @@ void HelpDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: HelpDialog.hxx,v 1.5 2005-06-16 00:55:59 stephena Exp $
|
||||
// $Id: HelpDialog.hxx,v 1.6 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -56,7 +56,7 @@ class HelpDialog : public Dialog
|
|||
uInt8 myNumPages;
|
||||
|
||||
private:
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
virtual void updateStrings(uInt8 page, uInt8 lines,
|
||||
string& title, string*& key, string* &dsc);
|
||||
void displayInfo();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: LauncherDialog.cxx,v 1.24 2005-06-21 18:46:33 stephena Exp $
|
||||
// $Id: LauncherDialog.cxx,v 1.25 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -345,7 +345,8 @@ string LauncherDialog::MD5FromFile(const string& path)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void LauncherDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
int item;
|
||||
|
||||
|
@ -392,6 +393,6 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: LauncherDialog.hxx,v 1.10 2005-06-21 18:46:33 stephena Exp $
|
||||
// $Id: LauncherDialog.hxx,v 1.11 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -53,7 +53,7 @@ class LauncherDialog : public Dialog
|
|||
int x, int y, int w, int h);
|
||||
~LauncherDialog();
|
||||
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
protected:
|
||||
void updateListing(bool fullReload = false);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: LauncherOptionsDialog.cxx,v 1.6 2005-06-21 18:46:33 stephena Exp $
|
||||
// $Id: LauncherOptionsDialog.cxx,v 1.7 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -165,14 +165,15 @@ void LauncherOptionsDialog::openSnapBrowser()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void LauncherOptionsDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void LauncherOptionsDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
case kOKCmd:
|
||||
saveConfig();
|
||||
close();
|
||||
sendCommand(kRomDirChosenCmd, 0); // Let the boss know romdir has changed
|
||||
sendCommand(kRomDirChosenCmd, 0, 0); // Let the boss know romdir has changed
|
||||
break;
|
||||
|
||||
case kChooseRomDirCmd:
|
||||
|
@ -198,7 +199,7 @@ void LauncherOptionsDialog::handleCommand(CommandSender* sender, int cmd, int da
|
|||
}
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: LauncherOptionsDialog.hxx,v 1.5 2005-06-21 18:46:34 stephena Exp $
|
||||
// $Id: LauncherOptionsDialog.hxx,v 1.6 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -44,7 +44,7 @@ class LauncherOptionsDialog : public Dialog, public CommandSender
|
|||
virtual void loadConfig();
|
||||
virtual void saveConfig();
|
||||
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
protected:
|
||||
BrowserDialog* myBrowser;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: ListWidget.cxx,v 1.22 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: ListWidget.cxx,v 1.23 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -72,7 +72,7 @@ void ListWidget::setSelected(int item)
|
|||
abortEditMode();
|
||||
|
||||
_selectedItem = item;
|
||||
sendCommand(kListSelectionChangedCmd, _selectedItem);
|
||||
sendCommand(kListSelectionChangedCmd, _selectedItem, _id);
|
||||
|
||||
_currentPos = _selectedItem - _entriesPerPage / 2;
|
||||
scrollToCurrent();
|
||||
|
@ -143,7 +143,7 @@ void ListWidget::handleMouseDown(int x, int y, int button, int clickCount)
|
|||
if (_editMode)
|
||||
abortEditMode();
|
||||
_selectedItem = newSelectedItem;
|
||||
sendCommand(kListSelectionChangedCmd, _selectedItem);
|
||||
sendCommand(kListSelectionChangedCmd, _selectedItem, _id);
|
||||
|
||||
// TODO - dirty rectangle
|
||||
instance()->frameBuffer().refreshOverlay();
|
||||
|
@ -161,7 +161,7 @@ void ListWidget::handleMouseUp(int x, int y, int button, int clickCount)
|
|||
// send the double click command
|
||||
if (clickCount == 2 && (_selectedItem == findItem(x, y)))
|
||||
{
|
||||
sendCommand(kListItemDoubleClickedCmd, _selectedItem);
|
||||
sendCommand(kListItemDoubleClickedCmd, _selectedItem, _id);
|
||||
|
||||
// Start edit mode
|
||||
if(_editable && !_editMode)
|
||||
|
@ -256,7 +256,7 @@ bool ListWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
startEditMode();
|
||||
}
|
||||
else
|
||||
sendCommand(kListItemActivatedCmd, _selectedItem);
|
||||
sendCommand(kListItemActivatedCmd, _selectedItem, _id);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -302,7 +302,7 @@ bool ListWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
|
||||
if (_selectedItem != oldSelectedItem)
|
||||
{
|
||||
sendCommand(kListSelectionChangedCmd, _selectedItem);
|
||||
sendCommand(kListSelectionChangedCmd, _selectedItem, _id);
|
||||
// also draw scrollbar
|
||||
_scrollBar->draw();
|
||||
|
||||
|
@ -330,7 +330,7 @@ void ListWidget::lostFocusWidget()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void ListWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void ListWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
|
@ -469,7 +469,7 @@ void ListWidget::endEditMode()
|
|||
// send a message that editing finished with a return/enter key press
|
||||
_editMode = false;
|
||||
_list[_selectedItem] = _editString;
|
||||
sendCommand(kListItemDataChangedCmd, _selectedItem);
|
||||
sendCommand(kListItemDataChangedCmd, _selectedItem, _id);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: ListWidget.hxx,v 1.7 2005-06-22 18:30:43 stephena Exp $
|
||||
// $Id: ListWidget.hxx,v 1.8 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -65,7 +65,7 @@ class ListWidget : public EditableWidget, public CommandSender
|
|||
virtual void handleMouseWheel(int x, int y, int direction);
|
||||
virtual bool handleKeyDown(int ascii, int keycode, int modifiers);
|
||||
virtual bool handleKeyUp(int ascii, int keycode, int modifiers);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
virtual bool wantsFocus() { return true; }
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: OptionsDialog.cxx,v 1.20 2005-06-16 00:56:00 stephena Exp $
|
||||
// $Id: OptionsDialog.cxx,v 1.21 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -147,7 +147,8 @@ void OptionsDialog::reset()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void OptionsDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void OptionsDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
@ -180,6 +181,6 @@ void OptionsDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: OptionsDialog.hxx,v 1.10 2005-06-16 00:56:00 stephena Exp $
|
||||
// $Id: OptionsDialog.hxx,v 1.11 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -42,7 +42,7 @@ class OptionsDialog : public Dialog
|
|||
OptionsDialog(OSystem* osystem, DialogContainer* parent);
|
||||
~OptionsDialog();
|
||||
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
void reset();
|
||||
void setGameProfile(Properties& props) { myGameInfoDialog->setGameProfile(props); }
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: PopUpWidget.cxx,v 1.13 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: PopUpWidget.cxx,v 1.14 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -186,7 +186,7 @@ void PopUpDialog::setSelection(int item)
|
|||
void PopUpDialog::sendSelection()
|
||||
{
|
||||
if(_popUpBoss->_cmd)
|
||||
_popUpBoss->sendCommand(_popUpBoss->_cmd, _selection);
|
||||
_popUpBoss->sendCommand(_popUpBoss->_cmd, _selection, _popUpBoss->_id);
|
||||
|
||||
// We remove the dialog when the user has selected an item
|
||||
parent()->removeDialog();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: PromptWidget.cxx,v 1.24 2005-07-03 01:36:40 urchlay Exp $
|
||||
// $Id: PromptWidget.cxx,v 1.25 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -460,7 +460,8 @@ void PromptWidget::insertIntoPrompt(const char* str)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void PromptWidget::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: PromptWidget.hxx,v 1.6 2005-07-02 15:36:44 stephena Exp $
|
||||
// $Id: PromptWidget.hxx,v 1.7 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -78,7 +78,7 @@ class PromptWidget : public Widget, public CommandSender
|
|||
void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
void handleMouseWheel(int x, int y, int direction);
|
||||
bool handleKeyDown(int ascii, int keycode, int modifiers);
|
||||
void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
protected:
|
||||
int _buffer[kBufferSize];
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: RamWidget.cxx,v 1.13 2005-07-03 21:14:42 urchlay Exp $
|
||||
// $Id: RamWidget.cxx,v 1.14 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -145,7 +145,7 @@ RamWidget::~RamWidget()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void RamWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void RamWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
// We simply change the values in the ByteGridWidget
|
||||
// It will then send the 'kDGItemDataChangedCmd' signal to change the actual
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: RamWidget.hxx,v 1.5 2005-07-03 21:14:42 urchlay Exp $
|
||||
// $Id: RamWidget.hxx,v 1.6 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -53,7 +53,7 @@ class RamWidget : public Widget, public CommandSender
|
|||
|
||||
Widget* activeWidget() { return myActiveWidget; }
|
||||
|
||||
void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
void loadConfig();
|
||||
|
||||
private:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: ScrollBarWidget.cxx,v 1.8 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: ScrollBarWidget.cxx,v 1.9 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -205,7 +205,7 @@ void ScrollBarWidget::checkBounds(int old_pos)
|
|||
{
|
||||
recalc(); // This takes care of the required refresh
|
||||
draw();
|
||||
sendCommand(kSetPositionCmd, _currentPos);
|
||||
sendCommand(kSetPositionCmd, _currentPos, _id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: TabWidget.cxx,v 1.12 2005-06-25 16:35:36 stephena Exp $
|
||||
// $Id: TabWidget.cxx,v 1.13 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -238,7 +238,7 @@ bool TabWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void TabWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void TabWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ void TabWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
sendCommand(cmd, data);
|
||||
sendCommand(cmd, data, _id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: TabWidget.hxx,v 1.7 2005-06-17 14:42:49 stephena Exp $
|
||||
// $Id: TabWidget.hxx,v 1.8 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -67,7 +67,7 @@ class TabWidget : public Widget, public CommandSender
|
|||
|
||||
virtual void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
virtual bool handleKeyDown(int ascii, int keycode, int modifiers);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
virtual void loadConfig();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: TiaWidget.cxx,v 1.1 2005-07-04 15:59:38 stephena Exp $
|
||||
// $Id: TiaWidget.cxx,v 1.2 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -145,7 +145,7 @@ RamWidget::~RamWidget()
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void RamWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void RamWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{
|
||||
// We simply change the values in the ByteGridWidget
|
||||
// It will then send the 'kDGItemDataChangedCmd' signal to change the actual
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: TiaWidget.hxx,v 1.1 2005-07-04 15:59:38 stephena Exp $
|
||||
// $Id: TiaWidget.hxx,v 1.2 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -41,7 +41,7 @@ class TiaWidget : public Widget, public CommandSender
|
|||
|
||||
Widget* activeWidget() { return myActiveWidget; }
|
||||
|
||||
void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
void loadConfig();
|
||||
|
||||
private:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: ToggleBitWidget.cxx,v 1.2 2005-07-02 18:34:54 stephena Exp $
|
||||
// $Id: ToggleBitWidget.cxx,v 1.3 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -111,7 +111,7 @@ void ToggleBitWidget::handleMouseUp(int x, int y, int button, int clickCount)
|
|||
if (clickCount == 2 && (_selectedItem == findItem(x, y)))
|
||||
{
|
||||
_stateList[_selectedItem] = !_stateList[_selectedItem];
|
||||
sendCommand(kTBItemDataChangedCmd, _selectedItem);
|
||||
sendCommand(kTBItemDataChangedCmd, _selectedItem, _id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ bool ToggleBitWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
if(toggle)
|
||||
{
|
||||
_stateList[_selectedItem] = !_stateList[_selectedItem];
|
||||
sendCommand(kTBItemDataChangedCmd, _selectedItem);
|
||||
sendCommand(kTBItemDataChangedCmd, _selectedItem, _id);
|
||||
}
|
||||
|
||||
draw();
|
||||
|
@ -236,7 +236,8 @@ bool ToggleBitWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void ToggleBitWidget::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void ToggleBitWidget::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: ToggleBitWidget.hxx,v 1.2 2005-07-02 18:34:54 stephena Exp $
|
||||
// $Id: ToggleBitWidget.hxx,v 1.3 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -51,7 +51,7 @@ class ToggleBitWidget : public Widget, public CommandSender
|
|||
virtual void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
virtual void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
virtual bool handleKeyDown(int ascii, int keycode, int modifiers);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
|
||||
virtual bool wantsFocus() { return true; }
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: VideoDialog.cxx,v 1.17 2005-06-23 14:33:11 stephena Exp $
|
||||
// $Id: VideoDialog.cxx,v 1.18 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -352,7 +352,8 @@ void VideoDialog::handleRendererChange(int item)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void VideoDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
||||
void VideoDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
int data, int id)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
|
@ -391,7 +392,7 @@ void VideoDialog::handleCommand(CommandSender* sender, int cmd, int data)
|
|||
break;
|
||||
|
||||
default:
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: VideoDialog.hxx,v 1.7 2005-06-16 00:56:00 stephena Exp $
|
||||
// $Id: VideoDialog.hxx,v 1.8 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -60,7 +60,7 @@ class VideoDialog : public Dialog
|
|||
void setDefaults();
|
||||
|
||||
void handleRendererChange(int item);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data);
|
||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Widget.cxx,v 1.21 2005-06-30 00:08:02 stephena Exp $
|
||||
// $Id: Widget.cxx,v 1.22 2005-07-05 15:25:44 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -127,7 +127,7 @@ void Widget::receivedFocus()
|
|||
if(getFlags() & WIDGET_TAB_NAVIGATE)
|
||||
{
|
||||
_activeWidget = this;
|
||||
_boss->handleCommand(NULL, kActiveWidgetCmd, 0);
|
||||
_boss->handleCommand(NULL, kActiveWidgetCmd, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h,
|
|||
void ButtonWidget::handleMouseUp(int x, int y, int button, int clickCount)
|
||||
{
|
||||
if(isEnabled() && x >= 0 && x < _w && y >= 0 && y < _h)
|
||||
sendCommand(_cmd, 0);
|
||||
sendCommand(_cmd, 0, _id);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -409,7 +409,7 @@ void CheckboxWidget::setState(bool state)
|
|||
_flags ^= WIDGET_INV_BORDER;
|
||||
draw();
|
||||
}
|
||||
sendCommand(_cmd, _state);
|
||||
sendCommand(_cmd, _state, _id);
|
||||
|
||||
// Refresh the screen after the checkbox is drawn
|
||||
// TODO - create dirty rectangle
|
||||
|
@ -468,7 +468,7 @@ void SliderWidget::handleMouseMoved(int x, int y, int button)
|
|||
{
|
||||
_value = newValue;
|
||||
draw();
|
||||
sendCommand(_cmd, _value);
|
||||
sendCommand(_cmd, _value, _id);
|
||||
}
|
||||
// Refresh the screen while the slider is being redrawn
|
||||
// TODO - create dirty rectangle
|
||||
|
@ -490,7 +490,7 @@ void SliderWidget::handleMouseDown(int x, int y, int button, int clickCount)
|
|||
void SliderWidget::handleMouseUp(int x, int y, int button, int clickCount)
|
||||
{
|
||||
if(isEnabled() && _isDragging)
|
||||
sendCommand(_cmd, _value);
|
||||
sendCommand(_cmd, _value, _id);
|
||||
|
||||
_isDragging = false;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Widget.hxx,v 1.22 2005-06-23 18:11:59 stephena Exp $
|
||||
// $Id: Widget.hxx,v 1.23 2005-07-05 15:25:45 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -68,7 +68,7 @@ enum {
|
|||
This is the base class for all widgets.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: Widget.hxx,v 1.22 2005-06-23 18:11:59 stephena Exp $
|
||||
@version $Id: Widget.hxx,v 1.23 2005-07-05 15:25:45 stephena Exp $
|
||||
*/
|
||||
class Widget : public GuiObject
|
||||
{
|
||||
|
@ -110,6 +110,9 @@ class Widget : public GuiObject
|
|||
bool isEnabled() const { return _flags & WIDGET_ENABLED; }
|
||||
bool isVisible() const { return !(_flags & WIDGET_INVISIBLE); }
|
||||
|
||||
void setID(int id) { _id = id; }
|
||||
int getID() { return _id; }
|
||||
|
||||
void setColor(OverlayColor color) { _color = color; }
|
||||
void setFont(const GUI::Font& font) { _font = (GUI::Font*) &font; }
|
||||
const GUI::Font* font() { return _font; }
|
||||
|
@ -127,8 +130,8 @@ class Widget : public GuiObject
|
|||
void releaseFocus() { assert(_boss); _boss->releaseFocus(); }
|
||||
|
||||
// By default, delegate unhandled commands to the boss
|
||||
void handleCommand(CommandSender* sender, int cmd, int data)
|
||||
{ assert(_boss); _boss->handleCommand(sender, cmd, data); }
|
||||
void handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||
{ assert(_boss); _boss->handleCommand(sender, cmd, data, id); }
|
||||
|
||||
protected:
|
||||
int _type;
|
||||
|
|
Loading…
Reference in New Issue