DISTRHO Plugin Framework
|
#include <TopLevelWidget.hpp>
Public Member Functions | |
TopLevelWidget (Window &windowToMapTo) | |
~TopLevelWidget () override | |
Application & | getApp () const noexcept |
Window & | getWindow () const noexcept |
void | setWidth (uint width) |
void | setHeight (uint height) |
void | setSize (uint width, uint height) |
void | setSize (const Size< uint > &size) |
void | repaint () noexcept override |
void | repaint (const Rectangle< uint > &rect) noexcept |
const void * | getClipboard (size_t &dataSize) |
bool | setClipboard (const char *mimeType, const void *data, size_t dataSize) |
bool | setCursor (MouseCursor cursor) |
bool | addIdleCallback (IdleCallback *callback, uint timerFrequencyInMs=0) |
bool | removeIdleCallback (IdleCallback *callback) |
double | getScaleFactor () const noexcept |
void | setGeometryConstraints (uint minimumWidth, uint minimumHeight, bool keepAspectRatio=false, bool automaticallyScale=false, bool resizeNowIfAutoScaling=true) |
Application & | getParentApp () const noexcept |
Window & | getParentWindow () const noexcept |
Public Member Functions inherited from Widget | |
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 |
Protected Member Functions | |
bool | onKeyboard (const KeyboardEvent &) override |
bool | onCharacterInput (const CharacterInputEvent &) override |
bool | onMouse (const MouseEvent &) override |
bool | onMotion (const MotionEvent &) override |
bool | onScroll (const ScrollEvent &) override |
Protected Member Functions inherited from Widget | |
virtual void | onDisplay ()=0 |
virtual void | onResize (const ResizeEvent &) |
virtual bool | onSpecial (const SpecialEvent &) |
Friends | |
class | Window |
Top-Level Widget class.
This is the only Widget class that is allowed to be used directly on a Window.
This widget takes the full size of the Window it is mapped to. Sub-widgets can be added on top of this top-level widget, by creating them with this class as parent. Doing so allows for custom position and sizes.
This class is used as the type for DPF Plugin UIs. So anything that a plugin UI might need that does not belong in a simple Widget will go here.
|
explicit |
Constructor.
|
override |
Destructor.
|
noexcept |
Get the application associated with this top-level widget's window.
|
noexcept |
Get the window associated with this top-level widget.
void TopLevelWidget::setWidth | ( | uint | width | ) |
Set width of this widget's window.
void TopLevelWidget::setHeight | ( | uint | height | ) |
Set height of this widget's window.
void TopLevelWidget::setSize | ( | uint | width, |
uint | height | ||
) |
Set size of this widget's window, using width and height values.
void TopLevelWidget::setSize | ( | const Size< uint > & | size | ) |
Set size of this widget's window.
|
overridevirtualnoexcept |
TODO document this.
Reimplemented from Widget.
|
noexcept |
TODO document this.
|
overrideprotectedvirtual |
A function called when a key is pressed or released.
Reimplemented from Widget.
|
overrideprotectedvirtual |
A function called when an UTF-8 character is received.
Reimplemented from 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.
|
overrideprotectedvirtual |
A function called on scrolling (e.g. mouse wheel or track pad).
Reimplemented from Widget.