17 #ifndef DGL_IMAGE_WIDGETS_HPP_INCLUDED 18 #define DGL_IMAGE_WIDGETS_HPP_INCLUDED 35 void setImage(
const Image& image);
41 void onReshape(uint width, uint height)
override;
58 virtual void imageButtonClicked(
ImageButton* imageButton,
int button) = 0;
71 void setCallback(
Callback* callback) noexcept;
80 PrivateData*
const pData;
82 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
ImageButton)
99 virtual void imageKnobDragStarted(
ImageKnob* imageKnob) = 0;
100 virtual void imageKnobDragFinished(
ImageKnob* imageKnob) = 0;
101 virtual void imageKnobValueChanged(
ImageKnob* imageKnob,
float value) = 0;
104 explicit ImageKnob(
Window& parent,
const Image& image, Orientation orientation = Vertical) noexcept;
105 explicit ImageKnob(
Widget* widget,
const Image& image, Orientation orientation = Vertical) noexcept;
110 float getValue()
const noexcept;
112 void setDefault(
float def) noexcept;
113 void setRange(
float min,
float max) noexcept;
114 void setStep(
float step) noexcept;
115 void setScrollStep(
float step) noexcept;
116 void setValue(
float value,
bool sendCallback =
false) noexcept;
117 void setUsingLogScale(
bool yesNo) noexcept;
119 void setCallback(
Callback* callback) noexcept;
120 void setOrientation(Orientation orientation) noexcept;
121 void setRotationAngle(
int angle);
123 void setImageLayerCount(uint count) noexcept;
142 Orientation fOrientation;
153 uint fImgLayerHeight;
158 float _logscale(
float value)
const;
159 float _invlogscale(
float value)
const;
175 virtual void imageSliderDragStarted(
ImageSlider* imageSlider) = 0;
176 virtual void imageSliderDragFinished(
ImageSlider* imageSlider) = 0;
177 virtual void imageSliderValueChanged(
ImageSlider* imageSlider,
float value) = 0;
183 float getValue()
const noexcept;
184 void setValue(
float value,
bool sendCallback =
false) noexcept;
186 void setStartPos(
const Point<int>& startPos) noexcept;
187 void setStartPos(
int x,
int y) noexcept;
188 void setEndPos(
const Point<int>& endPos) noexcept;
189 void setEndPos(
int x,
int y) noexcept;
191 void setInverted(
bool inverted) noexcept;
192 void setRange(
float min,
float max) noexcept;
193 void setStep(
float step) noexcept;
195 void setCallback(
Callback* callback) noexcept;
222 void _recheckArea() noexcept;
230 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
ImageSlider)
242 virtual void imageSwitchClicked(
ImageSwitch* imageButton,
bool down) = 0;
250 bool isDown()
const noexcept;
251 void setDown(
bool down) noexcept;
253 void setCallback(
Callback* callback) noexcept;
273 #endif // DGL_IMAGE_WIDGETS_HPP_INCLUDED Definition: ImageWidgets.hpp:28
Definition: Window.hpp:30
Definition: ImageWidgets.hpp:171
Definition: ImageWidgets.hpp:95
bool onKeyboard(const KeyboardEvent &) override
void onDisplay() override
bool onMouse(const MouseEvent &) override
Definition: ImageWidgets.hpp:87
Definition: ImageWidgets.hpp:238
Definition: ImageWidgets.hpp:168
Definition: ImageWidgets.hpp:235