81 #include "render/graphics.h"
91 static std::string
const data[2] =
94 "slider_highlighted.xml"
98 const double scaleEnd,
99 const double stepLength) :
104 mStepLength(stepLength),
116 const double scaleStart,
117 const double scaleEnd,
118 const double stepLength) :
123 mStepLength(stepLength),
124 mScaleStart(scaleStart),
143 for (
int mode = 0; mode < 2; mode ++)
162 if (
theme !=
nullptr)
164 for (
int mode = 0; mode < 2; mode ++)
184 for (
int f = 0; f < 2; f ++)
188 if (
buttons[f].grid[d] !=
nullptr)
235 w, hMid->getHeight());
270 w, hMid->getHeight());
384 const int x =
event.getX();
385 const int y =
event.getY();
390 &&
x >= 0 && x <= width && y >= 0 &&
y <= height)
495 const double pos = v / (
static_cast<double>(w) -
mMarkerLength);
virtual void drawImage(const Image *const image, int dstX, int dstY)=0
virtual void drawTileCollection(const ImageCollection *const vertCol)=0
virtual void calcTileCollection(ImageCollection *const vertCol, const Image *const image, int x, int y)=0
virtual void calcPattern(ImageVertexes *const vert, const Image *const image, const int x, const int y, const int w, const int h) const =0
virtual void finalize(ImageCollection *const col)
virtual void drawPattern(const Image *const image, const int x, const int y, const int w, const int h)=0
void removeDragged(const Widget *const widget)
MouseButtonT getButton() const
double markerPositionToValue(const int position) const
int getMarkerPosition() const
void setScale(const double scaleStart, const double scaleEnd)
OrientationT mOrientation
static ImageRect buttons[2]
void mouseExited(MouseEvent &event)
void draw(Graphics *const graphics)
void safeDraw(Graphics *const graphics)
void setValue(const double value)
ImageCollection * mVertexes
void mouseEntered(MouseEvent &event)
void setMarkerLength(const int length)
void mouseWheelMovedUp(MouseEvent &event)
void keyPressed(KeyEvent &event)
void mouseDragged(MouseEvent &event)
Slider(Widget2 *const widget, const double scaleEnd, const double stepLength)
void mousePressed(MouseEvent &event)
void mouseWheelMovedDown(MouseEvent &event)
int valueToMarkerPosition(const double value) const
static void unloadRect(const ImageRect &rect, const int start, const int end)
void loadRect(ImageRect &image, const std::string &name, const std::string &name2, const int start, const int end)
float getMinimumOpacity() const
#define BLOCK_START(name)
static std::string const data[2]