GUI: Add override markers where appropriate
This commit is contained in:
parent
37b473cc0d
commit
c566d02992
34 changed files with 237 additions and 237 deletions
|
@ -68,7 +68,7 @@ class WriteStream;
|
|||
class EventRecorder : private Common::EventSource, public Common::Singleton<EventRecorder>, private Common::DefaultEventMapper {
|
||||
friend class Common::Singleton<SingletonBaseType>;
|
||||
EventRecorder();
|
||||
~EventRecorder();
|
||||
~EventRecorder() override;
|
||||
public:
|
||||
/** Specify operation mode of Event Recorder */
|
||||
enum RecordMode {
|
||||
|
@ -176,9 +176,9 @@ public:
|
|||
void switchFastMode();
|
||||
|
||||
private:
|
||||
virtual Common::List<Common::Event> mapEvent(const Common::Event &ev, Common::EventSource *source);
|
||||
Common::List<Common::Event> mapEvent(const Common::Event &ev, Common::EventSource *source) override;
|
||||
bool notifyPoll();
|
||||
bool pollEvent(Common::Event &ev);
|
||||
bool pollEvent(Common::Event &ev) override;
|
||||
bool _initialized;
|
||||
volatile uint32 _fakeTimer;
|
||||
bool _savedState;
|
||||
|
@ -215,7 +215,7 @@ private:
|
|||
bool checkGameHash(const ADGameDescription *desc);
|
||||
|
||||
void checkForKeyCode(const Common::Event &event);
|
||||
bool allowMapping() const { return false; }
|
||||
bool allowMapping() const override { return false; }
|
||||
|
||||
volatile uint32 _lastMillis;
|
||||
uint32 _lastScreenshotTime;
|
||||
|
|
|
@ -35,9 +35,9 @@ class KeysDialog : public GUI::Dialog {
|
|||
public:
|
||||
KeysDialog(const Common::String &title = _("Choose an action to map"));
|
||||
|
||||
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
||||
virtual void handleKeyUp(Common::KeyState state);
|
||||
virtual void handleKeyDown(Common::KeyState state);
|
||||
void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleKeyUp(Common::KeyState state) override;
|
||||
void handleKeyDown(Common::KeyState state) override;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ public:
|
|||
}
|
||||
void reflowLayout(Widget *widgetChain) override;
|
||||
|
||||
void resetLayout() {
|
||||
void resetLayout() override {
|
||||
ThemeLayout::resetLayout();
|
||||
_x = _defaultX;
|
||||
_y = _defaultY;
|
||||
|
@ -162,7 +162,7 @@ public:
|
|||
|
||||
protected:
|
||||
LayoutType getLayoutType() const override { return kLayoutMain; }
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) { assert(!"Do not copy Main Layouts!"); return 0; }
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) override { assert(!"Do not copy Main Layouts!"); return 0; }
|
||||
|
||||
int16 _defaultX;
|
||||
int16 _defaultY;
|
||||
|
@ -204,7 +204,7 @@ protected:
|
|||
|
||||
LayoutType getLayoutType() const override { return _type; }
|
||||
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) {
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) override {
|
||||
ThemeLayoutStacked *n = new ThemeLayoutStacked(*this);
|
||||
n->_parent = newParent;
|
||||
|
||||
|
@ -228,8 +228,8 @@ public:
|
|||
setTextHAlign(align);
|
||||
}
|
||||
|
||||
bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h);
|
||||
Graphics::TextAlign getWidgetTextHAlign(const Common::String &name);
|
||||
bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) override;
|
||||
Graphics::TextAlign getWidgetTextHAlign(const Common::String &name) override;
|
||||
|
||||
void reflowLayout(Widget *widgetChain) override;
|
||||
|
||||
|
@ -241,7 +241,7 @@ protected:
|
|||
bool isBound(Widget *widgetChain) const override;
|
||||
Widget *getWidget(Widget *widgetChain) const;
|
||||
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) {
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) override {
|
||||
ThemeLayout *n = new ThemeLayoutWidget(*this);
|
||||
n->_parent = newParent;
|
||||
return n;
|
||||
|
@ -265,7 +265,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) {
|
||||
bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) override {
|
||||
if (ThemeLayoutWidget::getWidgetData(name, x, y, w, h)) {
|
||||
h -= _tabHeight;
|
||||
return true;
|
||||
|
@ -277,7 +277,7 @@ public:
|
|||
protected:
|
||||
LayoutType getLayoutType() const override { return kLayoutTabWidget; }
|
||||
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) {
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) override {
|
||||
ThemeLayoutTabWidget *n = new ThemeLayoutTabWidget(*this);
|
||||
n->_parent = newParent;
|
||||
return n;
|
||||
|
@ -296,7 +296,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) { return false; }
|
||||
bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) override { return false; }
|
||||
void reflowLayout(Widget *widgetChain) override {}
|
||||
#ifdef LAYOUT_DEBUG_DIALOG
|
||||
const char *getName() const { return "SPACE"; }
|
||||
|
@ -305,7 +305,7 @@ public:
|
|||
protected:
|
||||
LayoutType getLayoutType() const override { return kLayoutSpace; }
|
||||
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) {
|
||||
ThemeLayout *makeClone(ThemeLayout *newParent) override {
|
||||
ThemeLayout *n = new ThemeLayoutSpacing(*this);
|
||||
n->_parent = newParent;
|
||||
return n;
|
||||
|
|
|
@ -34,7 +34,7 @@ class ThemeParser : public Common::XMLParser {
|
|||
public:
|
||||
ThemeParser(ThemeEngine *parent);
|
||||
|
||||
virtual ~ThemeParser();
|
||||
~ThemeParser() override;
|
||||
|
||||
bool getPaletteColor(const Common::String &name, int &r, int &g, int &b) {
|
||||
if (!_palette.contains(name))
|
||||
|
@ -244,11 +244,11 @@ protected:
|
|||
bool parserCallback_space(ParserNode *node);
|
||||
bool parserCallback_import(ParserNode *node);
|
||||
|
||||
bool closedKeyCallback(ParserNode *node);
|
||||
bool closedKeyCallback(ParserNode *node) override;
|
||||
|
||||
bool resolutionCheck(const Common::String &resolution);
|
||||
|
||||
void cleanup();
|
||||
void cleanup() override;
|
||||
|
||||
Graphics::DrawStep *newDrawStep();
|
||||
Graphics::DrawStep *defaultDrawStep();
|
||||
|
|
|
@ -42,29 +42,29 @@ public:
|
|||
|
||||
void drawDialog(DrawLayer layerToDraw) override;
|
||||
|
||||
virtual void receivedFocus(int x = -1, int y = -1) override {}
|
||||
void receivedFocus(int x = -1, int y = -1) override {}
|
||||
protected:
|
||||
virtual void handleMouseDown(int x, int y, int button, int clickCount) override {
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override {
|
||||
close();
|
||||
_parent->handleMouseDown(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount);
|
||||
}
|
||||
virtual void handleMouseUp(int x, int y, int button, int clickCount) override {
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override {
|
||||
close();
|
||||
_parent->handleMouseUp(x + (getAbsX() - _parent->getAbsX()), y + (getAbsY() - _parent->getAbsY()), button, clickCount);
|
||||
}
|
||||
virtual void handleMouseWheel(int x, int y, int direction) override {
|
||||
void handleMouseWheel(int x, int y, int direction) override {
|
||||
close();
|
||||
_parent->handleMouseWheel(x + (getAbsX() - _parent->getAbsX()), y + (getAbsX() - _parent->getAbsX()), direction);
|
||||
}
|
||||
virtual void handleKeyDown(Common::KeyState state) override {
|
||||
void handleKeyDown(Common::KeyState state) override {
|
||||
close();
|
||||
_parent->handleKeyDown(state);
|
||||
}
|
||||
virtual void handleKeyUp(Common::KeyState state) override {
|
||||
void handleKeyUp(Common::KeyState state) override {
|
||||
close();
|
||||
_parent->handleKeyUp(state);
|
||||
}
|
||||
virtual void handleMouseMoved(int x, int y, int button) override {
|
||||
void handleMouseMoved(int x, int y, int button) override {
|
||||
close();
|
||||
}
|
||||
|
||||
|
|
|
@ -38,9 +38,9 @@ class BrowserDialog : public Dialog {
|
|||
public:
|
||||
BrowserDialog(const char *title, bool dirBrowser);
|
||||
|
||||
virtual int runModal();
|
||||
virtual void open();
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
int runModal() override;
|
||||
void open() override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
const Common::FSNode &getResult() { return _choice; }
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
|
||||
void setList(const StringArray& list);
|
||||
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
};
|
||||
|
||||
} // End of namespace GUI
|
||||
|
|
10
gui/dialog.h
10
gui/dialog.h
|
@ -68,9 +68,9 @@ public:
|
|||
|
||||
virtual int runModal();
|
||||
|
||||
bool isVisible() const { return _visible; }
|
||||
bool isVisible() const override { return _visible; }
|
||||
|
||||
void releaseFocus();
|
||||
void releaseFocus() override;
|
||||
void setFocusWidget(Widget *widget);
|
||||
Widget *getFocusWidget() { return _focusedWidget; }
|
||||
|
||||
|
@ -78,7 +78,7 @@ public:
|
|||
void unSetTickleWidget() { _tickleWidget = NULL; }
|
||||
Widget *getTickleWidget() { return _tickleWidget; }
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
virtual void lostFocus();
|
||||
virtual void receivedFocus(int x = -1, int y = -1) { if (x >= 0 && y >= 0) handleMouseMoved(x, y, 0); }
|
||||
|
||||
|
@ -103,12 +103,12 @@ protected:
|
|||
virtual void handleKeyUp(Common::KeyState state);
|
||||
virtual void handleMouseMoved(int x, int y, int button);
|
||||
virtual void handleMouseLeft(int button) {};
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
virtual void handleOtherEvent(Common::Event evt);
|
||||
|
||||
Widget *findWidget(int x, int y); // Find the widget at pos x,y if any
|
||||
Widget *findWidget(const char *name);
|
||||
void removeWidget(Widget *widget);
|
||||
void removeWidget(Widget *widget) override;
|
||||
|
||||
void setDefaultFocusedWidget();
|
||||
|
||||
|
|
|
@ -67,13 +67,13 @@ class DownloadDialog : public Dialog {
|
|||
|
||||
public:
|
||||
DownloadDialog(uint32 storageId, LauncherDialog *launcher);
|
||||
virtual ~DownloadDialog();
|
||||
~DownloadDialog() override;
|
||||
|
||||
virtual void open();
|
||||
virtual void close();
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
virtual void handleTickle();
|
||||
virtual void reflowLayout();
|
||||
void open() override;
|
||||
void close() override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleTickle() override;
|
||||
void reflowLayout() override;
|
||||
};
|
||||
|
||||
} // End of namespace GUI
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
: EditTextWidget(boss, name, text, tooltip) {}
|
||||
|
||||
protected:
|
||||
bool tryInsertChar(byte c, int pos) {
|
||||
bool tryInsertChar(byte c, int pos) override {
|
||||
if (Common::isAlnum(c) || c == '-' || c == '_') {
|
||||
_editString.insertChar(c, pos);
|
||||
return true;
|
||||
|
|
|
@ -62,12 +62,12 @@ class EditGameDialog : public OptionsDialog {
|
|||
public:
|
||||
EditGameDialog(const String &domain);
|
||||
|
||||
void open();
|
||||
virtual void apply();
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void open() override;
|
||||
void apply() override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
protected:
|
||||
virtual void setupGraphicsTab();
|
||||
void setupGraphicsTab() override;
|
||||
|
||||
EditTextWidget *_descriptionWidget;
|
||||
DomainEditTextWidget *_domainWidget;
|
||||
|
|
|
@ -38,7 +38,7 @@ private:
|
|||
EditRecordDialog() : Dialog("EditRecordDialog") {};
|
||||
public:
|
||||
EditRecordDialog(const Common::String author, const Common::String name, const Common::String notes);
|
||||
~EditRecordDialog();
|
||||
~EditRecordDialog() override;
|
||||
|
||||
const Common::String getAuthor();
|
||||
const Common::String getNotes();
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
void setNotes(const Common::String &desc);
|
||||
void setName(const Common::String &name);
|
||||
|
||||
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
};
|
||||
|
||||
}// End of namespace GUI
|
||||
|
|
|
@ -41,9 +41,9 @@ class FileBrowserDialog : public Dialog {
|
|||
public:
|
||||
FileBrowserDialog(const char *title, const char *fileExtension, int mode);
|
||||
|
||||
virtual void open();
|
||||
void open() override;
|
||||
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
const char *getResult() { return Dialog::getResult() ? _fileName->getEditString().c_str() : NULL; }
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ class PopUpWidget;
|
|||
class FluidSynthSettingsDialog : public Dialog {
|
||||
public:
|
||||
FluidSynthSettingsDialog();
|
||||
~FluidSynthSettingsDialog();
|
||||
~FluidSynthSettingsDialog() override;
|
||||
|
||||
void open();
|
||||
void close();
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void open() override;
|
||||
void close() override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
protected:
|
||||
void setChorusSettingsState(bool enabled);
|
||||
|
|
|
@ -67,7 +67,7 @@ class GuiManager : public Common::Singleton<GuiManager> {
|
|||
friend class Dialog;
|
||||
friend class Common::Singleton<SingletonBaseType>;
|
||||
GuiManager();
|
||||
~GuiManager();
|
||||
~GuiManager() override;
|
||||
public:
|
||||
|
||||
// Main entry for the GUI: this will start an event loop that keeps running
|
||||
|
|
|
@ -43,15 +43,15 @@ class LauncherDialog : public Dialog {
|
|||
typedef Common::Array<Common::String> StringArray;
|
||||
public:
|
||||
LauncherDialog();
|
||||
~LauncherDialog();
|
||||
~LauncherDialog() override;
|
||||
|
||||
void rebuild();
|
||||
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
virtual void handleKeyDown(Common::KeyState state);
|
||||
virtual void handleKeyUp(Common::KeyState state);
|
||||
virtual void handleOtherEvent(Common::Event evt);
|
||||
void handleKeyDown(Common::KeyState state) override;
|
||||
void handleKeyUp(Common::KeyState state) override;
|
||||
void handleOtherEvent(Common::Event evt) override;
|
||||
bool doGameDetection(const Common::String &path);
|
||||
protected:
|
||||
EditTextWidget *_searchWidget;
|
||||
|
@ -73,7 +73,7 @@ protected:
|
|||
|
||||
String _search;
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
/**
|
||||
* Fill the list widget with all currently configured targets, and trigger
|
||||
|
@ -86,8 +86,8 @@ protected:
|
|||
void build();
|
||||
void clean();
|
||||
|
||||
void open();
|
||||
void close();
|
||||
void open() override;
|
||||
void close() override;
|
||||
|
||||
/**
|
||||
* Handle "Add game..." button.
|
||||
|
|
|
@ -40,8 +40,8 @@ public:
|
|||
MassAddDialog(const Common::FSNode &startDir);
|
||||
|
||||
//void open();
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleTickle();
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleTickle() override;
|
||||
|
||||
Common::String getFirstAddedTarget() const {
|
||||
if (!_games.empty())
|
||||
|
|
|
@ -43,7 +43,7 @@ class MessageDialog : public Dialog {
|
|||
public:
|
||||
MessageDialog(const Common::String &message, const char *defaultButton = "OK", const char *altButton = 0);
|
||||
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ class TimedMessageDialog : public MessageDialog {
|
|||
public:
|
||||
TimedMessageDialog(const Common::String &message, uint32 duration);
|
||||
|
||||
void handleTickle();
|
||||
void handleTickle() override;
|
||||
|
||||
protected:
|
||||
uint32 _timer;
|
||||
|
|
|
@ -72,7 +72,7 @@ protected:
|
|||
public:
|
||||
GuiObject(int x, int y, int w, int h) : _x(x), _y(y), _w(w), _h(h), _firstWidget(nullptr) { }
|
||||
GuiObject(const Common::String &name);
|
||||
~GuiObject();
|
||||
~GuiObject() override;
|
||||
|
||||
virtual void setTextDrawableArea(const Common::Rect &r) { _textDrawableArea = r; }
|
||||
|
||||
|
|
|
@ -42,23 +42,23 @@ private:
|
|||
|
||||
public:
|
||||
OnScreenDialog(bool recordingMode);
|
||||
~OnScreenDialog();
|
||||
virtual void close();
|
||||
virtual bool isVisible() const;
|
||||
virtual void reflowLayout();
|
||||
~OnScreenDialog() override;
|
||||
void close() override;
|
||||
bool isVisible() const override;
|
||||
void reflowLayout() override;
|
||||
|
||||
void setReplayedTime(uint32 newTime);
|
||||
|
||||
virtual void handleMouseMoved(int x, int y, int button);
|
||||
virtual void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
virtual void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleMouseMoved(int x, int y, int button) override;
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
bool isMouseOver();
|
||||
bool isEditDlgVisible();
|
||||
Dialog *getActiveDlg();
|
||||
protected:
|
||||
virtual void releaseFocus();
|
||||
void releaseFocus() override;
|
||||
};
|
||||
|
||||
} // End of namespace GUI
|
||||
|
|
|
@ -62,17 +62,17 @@ class OptionsDialog : public Dialog {
|
|||
public:
|
||||
OptionsDialog(const Common::String &domain, int x, int y, int w, int h);
|
||||
OptionsDialog(const Common::String &domain, const Common::String &name);
|
||||
~OptionsDialog();
|
||||
~OptionsDialog() override;
|
||||
|
||||
void init();
|
||||
|
||||
void open();
|
||||
void open() override;
|
||||
virtual void apply();
|
||||
void close();
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void close() override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
const Common::String& getDomain() const { return _domain; }
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
protected:
|
||||
/** Config domain this dialog is used to edit. */
|
||||
|
@ -240,18 +240,18 @@ protected:
|
|||
class GlobalOptionsDialog : public OptionsDialog, public CommandSender {
|
||||
public:
|
||||
GlobalOptionsDialog(LauncherDialog *launcher);
|
||||
~GlobalOptionsDialog();
|
||||
~GlobalOptionsDialog() override;
|
||||
|
||||
virtual void apply();
|
||||
void close();
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleTickle();
|
||||
void apply() override;
|
||||
void close() override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleTickle() override;
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
protected:
|
||||
virtual void build();
|
||||
virtual void clean();
|
||||
void build() override;
|
||||
void clean() override;
|
||||
|
||||
Common::String _newTheme;
|
||||
LauncherDialog *_launcher;
|
||||
|
|
|
@ -36,13 +36,13 @@ class PicButtonWidget;
|
|||
class PredictiveDialog : public GUI::Dialog {
|
||||
public:
|
||||
PredictiveDialog();
|
||||
~PredictiveDialog();
|
||||
~PredictiveDialog() override;
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
||||
virtual void handleKeyUp(Common::KeyState state);
|
||||
virtual void handleKeyDown(Common::KeyState state);
|
||||
void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleKeyUp(Common::KeyState state) override;
|
||||
void handleKeyDown(Common::KeyState state) override;
|
||||
|
||||
const char *getResult() const { return _predictiveResult; }
|
||||
|
||||
|
|
|
@ -69,10 +69,10 @@ public:
|
|||
kRecordDialogPlayback
|
||||
};
|
||||
RecorderDialog();
|
||||
~RecorderDialog();
|
||||
~RecorderDialog() override;
|
||||
|
||||
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
||||
virtual void reflowLayout();
|
||||
void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void reflowLayout() override;
|
||||
|
||||
int runModal(Common::String &target);
|
||||
const Common::String getFileName() {return _filename;}
|
||||
|
|
|
@ -39,12 +39,12 @@ class CommandSender;
|
|||
class RemoteBrowserDialog : public Dialog {
|
||||
public:
|
||||
RemoteBrowserDialog(const char *title);
|
||||
virtual ~RemoteBrowserDialog();
|
||||
~RemoteBrowserDialog() override;
|
||||
|
||||
virtual void open();
|
||||
virtual void close();
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
virtual void handleTickle();
|
||||
void open() override;
|
||||
void close() override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleTickle() override;
|
||||
|
||||
const Cloud::StorageFile &getResult() { return _choice; }
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@ class SaveLoadCloudSyncProgressDialog : public Dialog { //protected?
|
|||
bool _close;
|
||||
public:
|
||||
SaveLoadCloudSyncProgressDialog(bool canRunInBackground);
|
||||
virtual ~SaveLoadCloudSyncProgressDialog();
|
||||
~SaveLoadCloudSyncProgressDialog() override;
|
||||
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
virtual void handleTickle();
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleTickle() override;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -72,20 +72,20 @@ class SaveLoadChooserDialog : protected Dialog {
|
|||
public:
|
||||
SaveLoadChooserDialog(const Common::String &dialogName, const bool saveMode);
|
||||
SaveLoadChooserDialog(int x, int y, int w, int h, const bool saveMode);
|
||||
virtual ~SaveLoadChooserDialog();
|
||||
~SaveLoadChooserDialog() override;
|
||||
|
||||
virtual void open();
|
||||
virtual void close();
|
||||
void open() override;
|
||||
void close() override;
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
#if defined(USE_CLOUD) && defined(USE_LIBCURL)
|
||||
virtual void runSaveSync(bool hasSavepathOverride);
|
||||
#endif
|
||||
|
||||
virtual void handleTickle();
|
||||
void handleTickle() override;
|
||||
|
||||
#ifndef DISABLE_SAVELOADCHOOSER_GRID
|
||||
virtual SaveLoadChooserType getType() const = 0;
|
||||
|
@ -136,22 +136,22 @@ class SaveLoadChooserSimple : public SaveLoadChooserDialog {
|
|||
public:
|
||||
SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode);
|
||||
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
virtual const Common::String &getResultString() const;
|
||||
const Common::String &getResultString() const override;
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
#ifndef DISABLE_SAVELOADCHOOSER_GRID
|
||||
virtual SaveLoadChooserType getType() const { return kSaveLoadDialogList; }
|
||||
SaveLoadChooserType getType() const override { return kSaveLoadDialogList; }
|
||||
#endif // !DISABLE_SAVELOADCHOOSER_GRID
|
||||
|
||||
virtual void open();
|
||||
virtual void close();
|
||||
void open() override;
|
||||
void close() override;
|
||||
protected:
|
||||
virtual void updateSaveList();
|
||||
void updateSaveList() override;
|
||||
private:
|
||||
virtual int runIntern();
|
||||
int runIntern() override;
|
||||
|
||||
ListWidget *_list;
|
||||
ButtonWidget *_chooseButton;
|
||||
|
@ -181,9 +181,9 @@ public:
|
|||
|
||||
void setTargetSlot(int slot) { _targetSlot = slot; }
|
||||
|
||||
virtual void open();
|
||||
void open() override;
|
||||
protected:
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
private:
|
||||
int _targetSlot;
|
||||
StaticTextWidget *_title;
|
||||
|
@ -193,23 +193,23 @@ private:
|
|||
class SaveLoadChooserGrid : public SaveLoadChooserDialog {
|
||||
public:
|
||||
SaveLoadChooserGrid(const Common::String &title, bool saveMode);
|
||||
~SaveLoadChooserGrid();
|
||||
~SaveLoadChooserGrid() override;
|
||||
|
||||
virtual const Common::String &getResultString() const;
|
||||
const Common::String &getResultString() const override;
|
||||
|
||||
virtual void open();
|
||||
void open() override;
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
virtual SaveLoadChooserType getType() const { return kSaveLoadDialogGrid; }
|
||||
SaveLoadChooserType getType() const override { return kSaveLoadDialogGrid; }
|
||||
|
||||
virtual void close();
|
||||
void close() override;
|
||||
protected:
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
virtual void handleMouseWheel(int x, int y, int direction);
|
||||
virtual void updateSaveList();
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleMouseWheel(int x, int y, int direction) override;
|
||||
void updateSaveList() override;
|
||||
private:
|
||||
virtual int runIntern();
|
||||
int runIntern() override;
|
||||
|
||||
uint _columns, _lines;
|
||||
uint _entriesPerPage;
|
||||
|
|
|
@ -38,8 +38,8 @@ class ThemeBrowser : public Dialog {
|
|||
public:
|
||||
ThemeBrowser();
|
||||
|
||||
void open();
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void open() override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
const Common::String &getSelected() const { return _select; }
|
||||
const Common::String &getSelectedName() const { return _selectName; }
|
||||
|
|
|
@ -38,9 +38,9 @@ class PopUpWidget;
|
|||
class UpdatesDialog : public Dialog {
|
||||
public:
|
||||
UpdatesDialog();
|
||||
virtual ~UpdatesDialog() {}
|
||||
~UpdatesDialog() override {}
|
||||
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
private:
|
||||
PopUpWidget *_updatesPopUp;
|
||||
|
|
76
gui/widget.h
76
gui/widget.h
|
@ -116,7 +116,7 @@ public:
|
|||
public:
|
||||
Widget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
|
||||
Widget(GuiObject *boss, const Common::String &name, const char *tooltip = 0);
|
||||
virtual ~Widget();
|
||||
~Widget() override;
|
||||
|
||||
void init();
|
||||
void resize(int x, int y, int w, int h);
|
||||
|
@ -124,8 +124,8 @@ public:
|
|||
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(); }
|
||||
int16 getAbsX() const override { return _x + _boss->getChildX(); }
|
||||
int16 getAbsY() const override { return _y + _boss->getChildY(); }
|
||||
|
||||
virtual void setPos(int x, int y) { _x = x; _y = y; }
|
||||
virtual void setSize(int w, int h) { _w = w; _h = h; }
|
||||
|
@ -161,7 +161,7 @@ public:
|
|||
bool isEnabled() const;
|
||||
|
||||
void setVisible(bool e);
|
||||
bool isVisible() const;
|
||||
bool isVisible() const override;
|
||||
|
||||
uint8 parseHotkey(const Common::String &label);
|
||||
Common::String cleanupHotkey(const Common::String &label);
|
||||
|
@ -184,10 +184,10 @@ protected:
|
|||
|
||||
virtual Widget *findWidget(int x, int y) { return this; }
|
||||
|
||||
void releaseFocus() { assert(_boss); _boss->releaseFocus(); }
|
||||
void releaseFocus() override { 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); }
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override { assert(_boss); _boss->handleCommand(sender, cmd, data); }
|
||||
};
|
||||
|
||||
/* StaticTextWidget */
|
||||
|
@ -201,14 +201,14 @@ public:
|
|||
StaticTextWidget(GuiObject *boss, const Common::String &name, const Common::String &text, const char *tooltip = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleBold);
|
||||
void setValue(int value);
|
||||
void setLabel(const Common::String &label);
|
||||
void handleMouseEntered(int button) { readLabel(); }
|
||||
void handleMouseEntered(int button) override { readLabel(); }
|
||||
const Common::String &getLabel() const { return _label; }
|
||||
void setAlign(Graphics::TextAlign align);
|
||||
Graphics::TextAlign getAlign() const { return _align; }
|
||||
void readLabel() { read(_label); }
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
};
|
||||
|
||||
/* ButtonWidget */
|
||||
|
@ -228,16 +228,16 @@ public:
|
|||
|
||||
void setLabel(const Common::String &label);
|
||||
|
||||
void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
void handleMouseEntered(int button) { readLabel(); if (_duringPress) { setFlags(WIDGET_PRESSED); } else { setFlags(WIDGET_HILITED); } markAsDirty(); }
|
||||
void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED | WIDGET_PRESSED); markAsDirty(); }
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseEntered(int button) override { readLabel(); if (_duringPress) { setFlags(WIDGET_PRESSED); } else { setFlags(WIDGET_HILITED); } markAsDirty(); }
|
||||
void handleMouseLeft(int button) override { clearFlags(WIDGET_HILITED | WIDGET_PRESSED); markAsDirty(); }
|
||||
|
||||
void setHighLighted(bool enable);
|
||||
void setPressedState();
|
||||
void setUnpressedState();
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
bool _duringPress;
|
||||
};
|
||||
|
||||
|
@ -281,7 +281,7 @@ class PicButtonWidget : public ButtonWidget {
|
|||
public:
|
||||
PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
~PicButtonWidget();
|
||||
~PicButtonWidget() override;
|
||||
|
||||
void setGfx(const Graphics::Surface *gfx, int statenum = kPicButtonStateEnabled);
|
||||
void setGfx(int w, int h, int r, int g, int b, int statenum = kPicButtonStateEnabled);
|
||||
|
@ -291,7 +291,7 @@ public:
|
|||
void setButtonDisplay(bool enable) {_showButton = enable; }
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
|
||||
Graphics::Surface _gfx[kPicButtonStateMax + 1];
|
||||
int _alpha;
|
||||
|
@ -307,16 +307,16 @@ public:
|
|||
CheckboxWidget(GuiObject *boss, int x, int y, int w, int h, const Common::String &label, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
CheckboxWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip = 0, uint32 cmd = 0, uint8 hotkey = 0);
|
||||
|
||||
void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
virtual void handleMouseEntered(int button) { readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
virtual void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseEntered(int button) override { readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseLeft(int button) override { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
|
||||
void setState(bool state);
|
||||
void toggleState() { setState(!_state); }
|
||||
bool getState() const { return _state; }
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
};
|
||||
|
||||
class RadiobuttonWidget;
|
||||
|
@ -324,7 +324,7 @@ class RadiobuttonWidget;
|
|||
class RadiobuttonGroup : public CommandSender {
|
||||
public:
|
||||
RadiobuttonGroup(GuiObject *boss, uint32 cmd = 0);
|
||||
~RadiobuttonGroup() {}
|
||||
~RadiobuttonGroup() override {}
|
||||
|
||||
void addButton(RadiobuttonWidget *button) { _buttons.push_back(button); }
|
||||
Common::Array<RadiobuttonWidget *> getButtonList() const { return _buttons; }
|
||||
|
@ -353,9 +353,9 @@ public:
|
|||
RadiobuttonWidget(GuiObject *boss, int x, int y, int w, int h, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = 0, uint8 hotkey = 0);
|
||||
RadiobuttonWidget(GuiObject *boss, const Common::String &name, RadiobuttonGroup *group, int value, const Common::String &label, const char *tooltip = 0, uint8 hotkey = 0);
|
||||
|
||||
void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
virtual void handleMouseEntered(int button) { readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
virtual void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseEntered(int button) override { readLabel(); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseLeft(int button) override { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
|
||||
void setState(bool state, bool setGroup = true);
|
||||
void toggleState() { setState(!_state); }
|
||||
|
@ -363,7 +363,7 @@ public:
|
|||
int getValue() const { return _value; }
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
|
||||
RadiobuttonGroup *_group;
|
||||
};
|
||||
|
@ -391,15 +391,15 @@ public:
|
|||
void setMaxValue(int value) { _valueMax = value; }
|
||||
int getMaxValue() const { return _valueMax; }
|
||||
|
||||
void handleMouseMoved(int x, int y, int button);
|
||||
void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
void handleMouseEntered(int button) { setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseWheel(int x, int y, int direction);
|
||||
void handleMouseMoved(int x, int y, int button) override;
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseEntered(int button) override { setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseLeft(int button) override { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseWheel(int x, int y, int direction) override;
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
|
||||
int valueToPos(int value);
|
||||
int posToValue(int pos);
|
||||
|
@ -411,7 +411,7 @@ class GraphicsWidget : public Widget {
|
|||
public:
|
||||
GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
|
||||
GraphicsWidget(GuiObject *boss, const Common::String &name, const char *tooltip = 0);
|
||||
~GraphicsWidget();
|
||||
~GraphicsWidget() override;
|
||||
|
||||
void setGfx(const Graphics::Surface *gfx);
|
||||
void setGfx(int w, int h, int r, int g, int b);
|
||||
|
@ -420,7 +420,7 @@ public:
|
|||
void useThemeTransparency(bool enable) { _transparency = enable; }
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
|
||||
Graphics::Surface _gfx;
|
||||
int _alpha;
|
||||
|
@ -432,15 +432,15 @@ class ContainerWidget : public Widget {
|
|||
public:
|
||||
ContainerWidget(GuiObject *boss, int x, int y, int w, int h);
|
||||
ContainerWidget(GuiObject *boss, const Common::String &name);
|
||||
~ContainerWidget();
|
||||
~ContainerWidget() override;
|
||||
|
||||
virtual bool containsWidget(Widget *) const;
|
||||
virtual Widget *findWidget(int x, int y);
|
||||
virtual void removeWidget(Widget *widget);
|
||||
bool containsWidget(Widget *) const override;
|
||||
Widget *findWidget(int x, int y) override;
|
||||
void removeWidget(Widget *widget) override;
|
||||
|
||||
void setBackgroundType(ThemeEngine::WidgetBackground backgroundType);
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
|
||||
ThemeEngine::WidgetBackground _backgroundType;
|
||||
};
|
||||
|
|
|
@ -62,16 +62,16 @@ protected:
|
|||
public:
|
||||
EditableWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0);
|
||||
EditableWidget(GuiObject *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0);
|
||||
virtual ~EditableWidget();
|
||||
~EditableWidget() override;
|
||||
|
||||
void init();
|
||||
|
||||
virtual void setEditString(const String &str);
|
||||
virtual const String &getEditString() const { return _editString; }
|
||||
|
||||
virtual void handleTickle();
|
||||
virtual bool handleKeyDown(Common::KeyState state);
|
||||
virtual void reflowLayout();
|
||||
void handleTickle() override;
|
||||
bool handleKeyDown(Common::KeyState state) override;
|
||||
void reflowLayout() override;
|
||||
|
||||
bool setCaretPos(int newPos);
|
||||
|
||||
|
|
|
@ -43,24 +43,24 @@ public:
|
|||
EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = 0, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
|
||||
EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal);
|
||||
|
||||
void setEditString(const String &str);
|
||||
void setEditString(const String &str) override;
|
||||
|
||||
virtual void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
|
||||
virtual bool wantsFocus() { return true; }
|
||||
bool wantsFocus() override { return true; }
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void receivedFocusWidget();
|
||||
void lostFocusWidget();
|
||||
void drawWidget() override;
|
||||
void receivedFocusWidget() override;
|
||||
void lostFocusWidget() override;
|
||||
|
||||
void startEditMode();
|
||||
void endEditMode();
|
||||
void abortEditMode();
|
||||
void startEditMode() override;
|
||||
void endEditMode() override;
|
||||
void abortEditMode() override;
|
||||
|
||||
Common::Rect getEditRect() const;
|
||||
Common::Rect getEditRect() const override;
|
||||
|
||||
uint32 _finishCmd;
|
||||
};
|
||||
|
|
|
@ -90,8 +90,8 @@ public:
|
|||
ListWidget(Dialog *boss, const String &name, const char *tooltip = 0, uint32 cmd = 0);
|
||||
ListWidget(Dialog *boss, int x, int y, int w, int h, const char *tooltip = 0, uint32 cmd = 0);
|
||||
|
||||
virtual bool containsWidget(Widget *) const;
|
||||
virtual Widget *findWidget(int x, int y);
|
||||
bool containsWidget(Widget *) const override;
|
||||
Widget *findWidget(int x, int y) override;
|
||||
|
||||
void setList(const StringArray &list, const ColorList *colors = 0);
|
||||
const StringArray &getList() const { return _dataList; }
|
||||
|
@ -118,38 +118,38 @@ public:
|
|||
void setEditColor(ThemeEngine::FontColor color) { _editColor = color; }
|
||||
|
||||
// Made startEditMode/endEditMode for SaveLoadChooser
|
||||
void startEditMode();
|
||||
void endEditMode();
|
||||
void startEditMode() override;
|
||||
void endEditMode() override;
|
||||
|
||||
void setFilter(const String &filter, bool redraw = true);
|
||||
|
||||
virtual void handleTickle();
|
||||
virtual void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
virtual void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
virtual void handleMouseWheel(int x, int y, int direction);
|
||||
virtual void handleMouseMoved(int x, int y, int button);
|
||||
virtual void handleMouseLeft(int button);
|
||||
virtual bool handleKeyDown(Common::KeyState state);
|
||||
virtual bool handleKeyUp(Common::KeyState state);
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
void handleTickle() override;
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseWheel(int x, int y, int direction) override;
|
||||
void handleMouseMoved(int x, int y, int button) override;
|
||||
void handleMouseLeft(int button) override;
|
||||
bool handleKeyDown(Common::KeyState state) override;
|
||||
bool handleKeyUp(Common::KeyState state) override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
|
||||
virtual bool wantsFocus() { return true; }
|
||||
bool wantsFocus() override { return true; }
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
|
||||
/// Finds the item at position (x,y). Returns -1 if there is no item there.
|
||||
int findItem(int x, int y) const;
|
||||
void scrollBarRecalc();
|
||||
|
||||
void abortEditMode();
|
||||
void abortEditMode() override;
|
||||
|
||||
Common::Rect getEditRect() const;
|
||||
Common::Rect getEditRect() const override;
|
||||
|
||||
void receivedFocusWidget();
|
||||
void lostFocusWidget();
|
||||
void receivedFocusWidget() override;
|
||||
void lostFocusWidget() override;
|
||||
void checkBounds();
|
||||
void scrollToCurrent();
|
||||
};
|
||||
|
|
|
@ -60,8 +60,8 @@ public:
|
|||
PopUpWidget(GuiObject *boss, const String &name, const char *tooltip = 0);
|
||||
PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
|
||||
|
||||
void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
void handleMouseWheel(int x, int y, int direction);
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseWheel(int x, int y, int direction) override;
|
||||
|
||||
void appendEntry(const String &entry, uint32 tag = (uint32)-1);
|
||||
void clearEntries();
|
||||
|
@ -77,12 +77,12 @@ public:
|
|||
uint32 getSelectedTag() const { return (_selectedItem >= 0) ? _entries[_selectedItem].tag : (uint32)-1; }
|
||||
// const String& getSelectedString() const { return (_selectedItem >= 0) ? _entries[_selectedItem].name : String::emptyString; }
|
||||
|
||||
void handleMouseEntered(int button) { if (_selectedItem != -1) read(_entries[_selectedItem].name); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseEntered(int button) override { if (_selectedItem != -1) read(_entries[_selectedItem].name); setFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
void handleMouseLeft(int button) override { clearFlags(WIDGET_HILITED); markAsDirty(); }
|
||||
|
||||
virtual void reflowLayout();
|
||||
void reflowLayout() override;
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,14 +65,14 @@ public:
|
|||
public:
|
||||
ScrollBarWidget(GuiObject *boss, int x, int y, int w, int h);
|
||||
|
||||
void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
void handleMouseUp(int x, int y, int button, int clickCount);
|
||||
void handleMouseWheel(int x, int y, int direction);
|
||||
void handleMouseMoved(int x, int y, int button);
|
||||
void handleMouseEntered(int button) { setFlags(WIDGET_HILITED); }
|
||||
void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); _part = kNoPart; markAsDirty(); }
|
||||
void handleTickle();
|
||||
bool wantsFocus() { return true; }
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseUp(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseWheel(int x, int y, int direction) override;
|
||||
void handleMouseMoved(int x, int y, int button) override;
|
||||
void handleMouseEntered(int button) override { setFlags(WIDGET_HILITED); }
|
||||
void handleMouseLeft(int button) override { clearFlags(WIDGET_HILITED); _part = kNoPart; markAsDirty(); }
|
||||
void handleTickle() override;
|
||||
bool wantsFocus() override { return true; }
|
||||
|
||||
// FIXME - this should be private, but then we also have to add accessors
|
||||
// for _numEntries, _entriesPerPage and _currentPos. This again leads to the question:
|
||||
|
@ -82,7 +82,7 @@ public:
|
|||
void checkBounds(int old_pos);
|
||||
|
||||
protected:
|
||||
void drawWidget();
|
||||
void drawWidget() override;
|
||||
};
|
||||
|
||||
} // End of namespace GUI
|
||||
|
|
|
@ -66,7 +66,7 @@ protected:
|
|||
public:
|
||||
TabWidget(GuiObject *boss, int x, int y, int w, int h);
|
||||
TabWidget(GuiObject *boss, const String &name);
|
||||
~TabWidget();
|
||||
~TabWidget() override;
|
||||
|
||||
void init();
|
||||
|
||||
|
@ -103,17 +103,17 @@ public:
|
|||
_tabs[tabID].title = title;
|
||||
}
|
||||
|
||||
virtual void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
virtual void handleMouseMoved(int x, int y, int button);
|
||||
virtual void handleMouseLeft(int button) { _lastRead = -1; };
|
||||
virtual bool handleKeyDown(Common::KeyState state) override;
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
void handleMouseDown(int x, int y, int button, int clickCount) override;
|
||||
void handleMouseMoved(int x, int y, int button) override;
|
||||
void handleMouseLeft(int button) override { _lastRead = -1; };
|
||||
bool handleKeyDown(Common::KeyState state) override;
|
||||
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
||||
virtual int getFirstVisible() const;
|
||||
virtual void setFirstVisible(int tabID, bool adjustIfRoom = false);
|
||||
|
||||
virtual bool containsWidget(Widget *) const override;
|
||||
bool containsWidget(Widget *) const override;
|
||||
|
||||
virtual void reflowLayout() override;
|
||||
void reflowLayout() override;
|
||||
|
||||
void draw() override;
|
||||
void markAsDirty() override;
|
||||
|
@ -121,12 +121,12 @@ public:
|
|||
protected:
|
||||
// We overload getChildY to make sure child widgets are positioned correctly.
|
||||
// Essentially this compensates for the space taken up by the tab title header.
|
||||
virtual int16 getChildY() const override;
|
||||
virtual uint16 getHeight() const override;
|
||||
int16 getChildY() const override;
|
||||
uint16 getHeight() const override;
|
||||
|
||||
virtual void drawWidget() override;
|
||||
void drawWidget() override;
|
||||
|
||||
virtual Widget *findWidget(int x, int y) override;
|
||||
Widget *findWidget(int x, int y) override;
|
||||
|
||||
virtual void adjustTabs(int value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue