17 #ifndef DGL_WIDGET_HPP_INCLUDED
18 #define DGL_WIDGET_HPP_INCLUDED
20 #include "Geometry.hpp"
70 BaseEvent() noexcept : mod(0x0), flags(0x0), time(0) {}
113 struct DISTRHO_DEPRECATED_BY("KeyboardEvent") SpecialEvent : BaseEvent {
118 SpecialEvent() noexcept
149 #ifdef DISTRHO_PROPER_CPP11_SUPPORT
150 string{
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0',
'\0'} {}
152 string() { std::memset(
string, 0,
sizeof(
string)); }
177 absolutePos(0.0, 0.0) {}
195 absolutePos(0.0, 0.0) {}
217 ScrollDirection direction;
223 absolutePos(0.0, 0.0),
225 direction(kScrollSmooth) {}
328 void setSize(uint width, uint height) noexcept;
339 uint
getId() const noexcept;
345 void setId(uint
id) noexcept;
377 virtual
void repaint() noexcept;
379 DISTRHO_DEPRECATED_BY("
getApp()")
382 DISTRHO_DEPRECATED_BY(
"getWindow()")
395 virtual bool onKeyboard(
const KeyboardEvent&);
407 virtual bool onMouse(
const MouseEvent&);
413 virtual bool onMotion(
const MotionEvent&);
419 virtual bool onScroll(
const ScrollEvent&);
424 virtual void onResize(
const ResizeEvent&);
430 #if defined(__clang__)
431 # pragma clang diagnostic push
432 # pragma clang diagnostic ignored "-Wdeprecated-declarations"
433 #elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 460
434 # pragma GCC diagnostic push
435 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
437 virtual bool onSpecial(
const SpecialEvent&) {
return false; }
438 #if defined(__clang__)
439 # pragma clang diagnostic pop
440 #elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 460
441 # pragma GCC diagnostic pop
446 PrivateData*
const pData;
450 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
Widget)
457 #endif // DGL_WIDGET_HPP_INCLUDED
Definition: Window.hpp:50
Definition: Application.hpp:36