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 setValue(
float value,
bool sendCallback =
false) noexcept;
116 void setUsingLogScale(
bool yesNo) noexcept;
118 void setCallback(
Callback* callback) noexcept;
119 void setOrientation(Orientation orientation) noexcept;
120 void setRotationAngle(
int angle);
122 void setImageLayerCount(uint count) noexcept;
140 Orientation fOrientation;
151 uint fImgLayerHeight;
156 float _logscale(
float value)
const;
157 float _invlogscale(
float value)
const;
173 virtual void imageSliderDragStarted(
ImageSlider* imageSlider) = 0;
174 virtual void imageSliderDragFinished(
ImageSlider* imageSlider) = 0;
175 virtual void imageSliderValueChanged(
ImageSlider* imageSlider,
float value) = 0;
181 float getValue()
const noexcept;
182 void setValue(
float value,
bool sendCallback =
false) noexcept;
183 void setDefault(
float def) noexcept;
185 void setStartPos(
const Point<int>& startPos) noexcept;
186 void setStartPos(
int x,
int y) noexcept;
187 void setEndPos(
const Point<int>& endPos) noexcept;
188 void setEndPos(
int x,
int y) noexcept;
190 void setInverted(
bool inverted) noexcept;
191 void setRange(
float min,
float max) noexcept;
192 void setStep(
float step) noexcept;
194 void setCallback(
Callback* callback) noexcept;
223 void _recheckArea() noexcept;
231 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
ImageSlider)
243 virtual void imageSwitchClicked(
ImageSwitch* imageSwitch,
bool down) = 0;
251 bool isDown()
const noexcept;
252 void setDown(
bool down) noexcept;
254 void setCallback(
Callback* callback) noexcept;
274 #endif // DGL_IMAGE_WIDGETS_HPP_INCLUDED Definition: ImageWidgets.hpp:28
Definition: Window.hpp:36
Definition: ImageWidgets.hpp:169
Definition: ImageWidgets.hpp:95
bool onKeyboard(const KeyboardEvent &) override
void onDisplay() override
bool onMouse(const MouseEvent &) override
Definition: ImageWidgets.hpp:87
Definition: ImageWidgets.hpp:239
Definition: ImageWidgets.hpp:166
Definition: ImageWidgets.hpp:236