25 #include "common/scummsys.h" 26 #include "common/str.h" 27 #include "common/keyboard.h" 29 #include "gui/object.h" 30 #include "gui/ThemeEngine.h" 44 kCloseWithResultCmd =
'clsr',
51 friend class EventRecorder;
63 bool _mouseUpdatedOnFocus;
69 bool _handlingMouseWheel;
72 Dialog(
int x,
int y,
int w,
int h,
bool scale =
false);
75 virtual int runModal();
77 bool isVisible()
const override {
return _visible; }
79 bool isMouseUpdatedOnFocus()
const {
return _mouseUpdatedOnFocus; }
81 void releaseFocus()
override;
82 void setFocusWidget(
Widget *widget);
83 Widget *getFocusWidget() {
return _focusedWidget; }
85 bool isDragging()
const {
return _dragWidget !=
nullptr; }
87 void setTickleWidget(
Widget *widget) { _tickleWidget = widget; }
88 void unSetTickleWidget() { _tickleWidget =
nullptr; }
89 Widget *getTickleWidget() {
return _tickleWidget; }
91 void reflowLayout()
override;
92 virtual void lostFocus();
93 virtual void receivedFocus(
int x = -1,
int y = -1) {
if (x >= 0 && y >= 0) handleMouseMoved(x, y, 0); }
100 void markWidgetsAsDirty();
103 virtual void drawDialog(DrawLayer layerToDraw);
108 virtual void handleTickle();
109 virtual void handleMouseDown(
int x,
int y,
int button,
int clickCount);
110 virtual void handleMouseUp(
int x,
int y,
int button,
int clickCount);
111 virtual void handleMouseWheel(
int x,
int y,
int direction)
override;
114 virtual void handleMouseMoved(
int x,
int y,
int button);
115 virtual void handleMouseLeft(
int button) {}
117 void handleCommand(
CommandSender *sender, uint32 cmd, uint32 data)
override;
119 Widget *findWidget(
int x,
int y);
120 Widget *findWidget(
const char *name);
121 void removeWidget(
Widget *widget)
override;
123 void setMouseUpdatedOnFocus(
bool mouseUpdatedOnFocus) { _mouseUpdatedOnFocus = mouseUpdatedOnFocus; }
124 void setDefaultFocusedWidget();
126 void setResult(
int result) { _result = result; }
127 int getResult()
const {
return _result; }
Definition: gui-manager.h:83
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
DialogBackground
Dialog background type.
Definition: ThemeEngine.h:239
Definition: algorithm.h:29
Definition: keyboard.h:294