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;
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;
184 void setStartPos(const
Point<
int>& startPos) noexcept;
185 void setStartPos(
int x,
int y) noexcept;
186 void setEndPos(const
Point<
int>& endPos) noexcept;
187 void setEndPos(
int x,
int y) noexcept;
189 void setInverted(
bool inverted) noexcept;
190 void setRange(
float min,
float max) noexcept;
191 void setStep(
float step) noexcept;
193 void setCallback(
Callback* callback) noexcept;
216 Point<
int> fStartPos;
220 void _recheckArea() noexcept;
240 virtual void imageSwitchClicked(
ImageSwitch* imageButton,
bool down) = 0;
248 bool isDown() const noexcept;
249 void setDown(
bool down) noexcept;
251 void setCallback(
Callback* callback) noexcept;
271 #endif // DGL_IMAGE_WIDGETS_HPP_INCLUDED
Definition: ImageWidgets.hpp:28
void onDisplay() override
Definition: Window.hpp:30
bool onMouse(const MouseEvent &) override
Definition: ImageWidgets.hpp:169
Definition: Geometry.hpp:40
Definition: ImageWidgets.hpp:95
Definition: Geometry.hpp:30
bool onKeyboard(const KeyboardEvent &) override
bool onMotion(const MotionEvent &) override
void onDisplay() override
bool onMouse(const MouseEvent &) override
bool onScroll(const ScrollEvent &) override
Definition: ImageWidgets.hpp:87
Definition: ImageWidgets.hpp:236
Definition: ImageWidgets.hpp:166
Definition: ImageWidgets.hpp:233