17 #ifndef DGL_IMAGE_WIDGETS_HPP_INCLUDED
18 #define DGL_IMAGE_WIDGETS_HPP_INCLUDED
21 #include "ImageBaseWidgets.hpp"
22 #include "SubWidget.hpp"
25 #if defined(__GNUC__) && (__GNUC__ >= 6)
26 # pragma GCC diagnostic push
27 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
46 virtual void imageKnobDragStarted(
ImageKnob* imageKnob) = 0;
47 virtual void imageKnobDragFinished(
ImageKnob* imageKnob) = 0;
48 virtual void imageKnobValueChanged(
ImageKnob* imageKnob,
float value) = 0;
51 explicit ImageKnob(
Widget* parentWidget,
const Image& image, Orientation orientation = Vertical) noexcept;
56 float getValue() const noexcept;
58 void setDefault(
float def) noexcept;
59 void setRange(
float min,
float max) noexcept;
60 void setStep(
float step) noexcept;
61 void setValue(
float value,
bool sendCallback = false) noexcept;
62 void setUsingLogScale(
bool yesNo) noexcept;
64 void setCallback(
Callback* callback) noexcept;
65 void setOrientation(Orientation orientation) noexcept;
66 void setRotationAngle(
int angle);
68 void setImageLayerCount(uint count) noexcept;
86 Orientation fOrientation;
102 float _logscale(
float value) const;
103 float _invlogscale(
float value) const;
119 virtual void imageSliderDragStarted(
ImageSlider* imageSlider) = 0;
120 virtual void imageSliderDragFinished(
ImageSlider* imageSlider) = 0;
121 virtual void imageSliderValueChanged(
ImageSlider* imageSlider,
float value) = 0;
126 float getValue() const noexcept;
127 void setValue(
float value,
bool sendCallback = false) noexcept;
128 void setDefault(
float def) noexcept;
130 void setStartPos(const
Point<
int>& startPos) noexcept;
131 void setStartPos(
int x,
int y) noexcept;
132 void setEndPos(const
Point<
int>& endPos) noexcept;
133 void setEndPos(
int x,
int y) noexcept;
135 void setInverted(
bool inverted) noexcept;
136 void setRange(
float min,
float max) noexcept;
137 void setStep(
float step) noexcept;
139 void setCallback(
Callback* callback) noexcept;
164 Point<
int> fStartPos;
168 void _recheckArea() noexcept;
176 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
ImageSlider)
188 virtual void imageSwitchClicked(
ImageSwitch* imageSwitch,
bool down) = 0;
191 explicit ImageSwitch(
Widget* parentWidget,
const Image& imageNormal,
const Image& imageDown) noexcept;
195 bool isDown() const noexcept;
196 void setDown(
bool down) noexcept;
198 void setCallback(
Callback* callback) noexcept;
218 #if defined(__GNUC__) && (__GNUC__ >= 6)
219 # pragma GCC diagnostic pop
222 #endif // DGL_IMAGE_WIDGETS_HPP_INCLUDED
Definition: Geometry.hpp:30
Definition: ImageWidgets.hpp:42
bool onScroll(const ScrollEvent &) override
Definition: ImageWidgets.hpp:115
Definition: ImageWidgets.hpp:181
Definition: ImageWidgets.hpp:184
bool onMotion(const MotionEvent &) override
Definition: ImageWidgets.hpp:34
Definition: ImageWidgets.hpp:112
bool onMouse(const MouseEvent &) override
Definition: Geometry.hpp:40
void onDisplay() override