17 #ifndef DGL_IMAGE_BASE_WIDGETS_HPP_INCLUDED
18 #define DGL_IMAGE_BASE_WIDGETS_HPP_INCLUDED
20 #include "EventHandlers.hpp"
21 #include "StandaloneWindow.hpp"
22 #include "SubWidget.hpp"
38 template <
class ImageType>
83 template <
class ImageType>
92 virtual void imageButtonClicked(
ImageBaseButton* imageButton,
int button) = 0;
96 explicit ImageBaseButton(
Widget* parentWidget,
const ImageType& imageNormal,
const ImageType& imageDown);
97 explicit ImageBaseButton(
Widget* parentWidget,
const ImageType& imageNormal,
const ImageType& imageHover,
const ImageType& imageDown);
101 void setCallback(
Callback* callback) noexcept;
110 PrivateData*
const pData;
129 template <
class ImageType>
138 virtual void imageKnobDragStarted(
ImageBaseKnob* imageKnob) = 0;
139 virtual void imageKnobDragFinished(
ImageBaseKnob* imageKnob) = 0;
140 virtual void imageKnobValueChanged(
ImageBaseKnob* imageKnob,
float value) = 0;
143 explicit ImageBaseKnob(
Widget* parentWidget,
const ImageType& image, Orientation orientation = Vertical) noexcept;
148 void setCallback(
Callback* callback) noexcept;
149 void setImageLayerCount(uint count) noexcept;
150 void setRotationAngle(
int angle);
151 bool setValue(
float value,
bool sendCallback =
false) noexcept override;
161 PrivateData* const pData;
170 template <class ImageType>
179 virtual void imageSliderDragFinished(
ImageBaseSlider* imageSlider) = 0;
180 virtual void imageSliderValueChanged(
ImageBaseSlider* imageSlider,
float value) = 0;
186 float getValue() const noexcept;
187 void setValue(
float value,
bool sendCallback = false) noexcept;
188 void setDefault(
float def) noexcept;
190 void setStartPos(const
Point<
int>& startPos) noexcept;
191 void setStartPos(
int x,
int y) noexcept;
192 void setEndPos(const
Point<
int>& endPos) noexcept;
193 void setEndPos(
int x,
int y) noexcept;
195 void setCheckable(
bool checkable) noexcept;
196 void setInverted(
bool inverted) noexcept;
197 void setRange(
float min,
float max) noexcept;
198 void setStep(
float step) noexcept;
200 void setCallback(
Callback* callback) noexcept;
209 PrivateData* const pData;
222 template <
class ImageType>
230 virtual void imageSwitchClicked(
ImageBaseSwitch* imageSwitch,
bool down) = 0;
233 explicit ImageBaseSwitch(
Widget* parentWidget,
const ImageType& imageNormal,
const ImageType& imageDown) noexcept;
238 bool isDown() const noexcept;
239 void setDown(
bool down) noexcept;
241 void setCallback(
Callback* callback) noexcept;
249 PrivateData* const pData;
Definition: ImageBaseWidgets.hpp:40
void setImage(const ImageType &image)
bool onKeyboard(const KeyboardEvent &) override
void onDisplay() override
ImageBaseAboutWindow(TopLevelWidget *topLevelWidget, const ImageType &image=ImageType())
bool onMouse(const MouseEvent &) override
ImageBaseAboutWindow(Window &transientParentWindow, const ImageType &image=ImageType())
Definition: ImageBaseWidgets.hpp:135
Definition: ImageBaseWidgets.hpp:132
bool onMouse(const MouseEvent &) override
void onDisplay() override
bool onMotion(const MotionEvent &) override
bool onScroll(const ScrollEvent &) override
Definition: ImageBaseWidgets.hpp:175
Definition: ImageBaseWidgets.hpp:172
Definition: ImageBaseWidgets.hpp:227
Definition: ImageBaseWidgets.hpp:224
Definition: EventHandlers.hpp:93
Definition: Geometry.hpp:41
Definition: StandaloneWindow.hpp:29
Definition: Window.hpp:63