DISTRHO Plugin Framework
|
#include <ImageBaseWidgets.hpp>
Classes | |
class | Callback |
Public Member Functions | |
ImageBaseButton (Widget *parentWidget, const ImageType &image) | |
ImageBaseButton (Widget *parentWidget, const ImageType &imageNormal, const ImageType &imageDown) | |
ImageBaseButton (Widget *parentWidget, const ImageType &imageNormal, const ImageType &imageHover, const ImageType &imageDown) | |
void | setCallback (Callback *callback) noexcept |
![]() | |
SubWidget (Widget *parentWidget) | |
~SubWidget () override | |
template<typename T > | |
bool | contains (T x, T y) const noexcept |
template<typename T > | |
bool | contains (const Point< T > &pos) const noexcept |
int | getAbsoluteX () const noexcept |
int | getAbsoluteY () const noexcept |
Point< int > | getAbsolutePos () const noexcept |
Rectangle< int > | getAbsoluteArea () const noexcept |
Rectangle< uint > | getConstrainedAbsoluteArea () const noexcept |
void | setAbsoluteX (int x) noexcept |
void | setAbsoluteY (int y) noexcept |
void | setAbsolutePos (int x, int y) noexcept |
void | setAbsolutePos (const Point< int > &pos) noexcept |
Point< int > | getMargin () const noexcept |
void | setMargin (int x, int y) noexcept |
void | setMargin (const Point< int > &offset) noexcept |
Widget * | getParentWidget () const noexcept |
void | repaint () noexcept override |
virtual void | toBottom () |
virtual void | toFront () |
void | setNeedsFullViewportDrawing (bool needsFullViewportForDrawing=true) |
void | setNeedsViewportScaling (bool needsViewportScaling=true, double autoScaleFactor=0.0) |
void | setSkipDrawing (bool skipDrawing=true) |
![]() | |
virtual | ~Widget () |
bool | isVisible () const noexcept |
void | setVisible (bool visible) |
void | show () |
void | hide () |
uint | getWidth () const noexcept |
uint | getHeight () const noexcept |
const Size< uint > | getSize () const noexcept |
void | setWidth (uint width) noexcept |
void | setHeight (uint height) noexcept |
void | setSize (uint width, uint height) noexcept |
void | setSize (const Size< uint > &size) noexcept |
uint | getId () const noexcept |
const char * | getName () const noexcept |
void | setId (uint id) noexcept |
void | setName (const char *name) noexcept |
Application & | getApp () const noexcept |
Window & | getWindow () const noexcept |
const GraphicsContext & | getGraphicsContext () const noexcept |
TopLevelWidget * | getTopLevelWidget () const noexcept |
std::list< SubWidget * > | getChildren () const noexcept |
Application & | getParentApp () const noexcept |
Window & | getParentWindow () const noexcept |
![]() | |
ButtonEventHandler (SubWidget *self) | |
bool | isActive () noexcept |
void | setActive (bool active, bool sendCallback) noexcept |
bool | isChecked () const noexcept |
void | setChecked (bool checked, bool sendCallback) noexcept |
bool | isCheckable () const noexcept |
void | setCheckable (bool checkable) noexcept |
Point< double > | getLastClickPosition () const noexcept |
Point< double > | getLastMotionPosition () const noexcept |
void | setCallback (Callback *callback) noexcept |
bool | mouseEvent (const Widget::MouseEvent &ev) |
bool | motionEvent (const Widget::MotionEvent &ev) |
Protected Member Functions | |
void | onDisplay () override |
bool | onMouse (const MouseEvent &) override |
bool | onMotion (const MotionEvent &) override |
![]() | |
virtual void | onPositionChanged (const PositionChangedEvent &) |
![]() | |
virtual bool | onKeyboard (const KeyboardEvent &) |
virtual bool | onCharacterInput (const CharacterInputEvent &) |
virtual bool | onScroll (const ScrollEvent &) |
virtual void | onResize (const ResizeEvent &) |
virtual bool | onSpecial (const SpecialEvent &) |
![]() | |
State | getState () const noexcept |
void | clearState () noexcept |
virtual void | stateChanged (State state, State oldState) |
void | setInternalCallback (Callback *callback) noexcept |
void | triggerUserCallback (SubWidget *widget, int button) |
Additional Inherited Members | |
![]() | |
enum | State { kButtonStateDefault = 0x0 , kButtonStateHover = 0x1 , kButtonStateActive = 0x2 , kButtonStateActiveHover = kButtonStateActive|kButtonStateHover } |
DGL Image Button class.
This is a typical button, where the drawing comes from a pregenerated set of images. The button can be under "normal", "hover" and "down" states, with one separate image possible for each.
The event logic for this button comes from the ButtonEventHandler class.
|
overrideprotectedvirtual |
A function called to draw the widget contents.
Implements Widget.
|
overrideprotectedvirtual |
A function called when a mouse button is pressed or released.
Reimplemented from Widget.
|
overrideprotectedvirtual |
A function called when the pointer moves.
Reimplemented from Widget.