DISTRHO Plugin Framework
Public Member Functions | Friends | List of all members
TopLevelWidget Class Reference

#include <TopLevelWidget.hpp>

Inheritance diagram for TopLevelWidget:
Widget StandaloneWindow ImageBaseAboutWindow< ImageType >

Public Member Functions

 TopLevelWidget (Window &windowToMapTo)
 
virtual ~TopLevelWidget ()
 
ApplicationgetApp () const noexcept
 
WindowgetWindow () const noexcept
 
void setWidth (uint width)
 
void setHeight (uint height)
 
void setSize (uint width, uint height)
 
void setSize (const Size< uint > &size)
 
bool addIdleCallback (IdleCallback *callback, uint timerFrequencyInMs=0)
 
bool removeIdleCallback (IdleCallback *callback)
 
double getScaleFactor () const noexcept
 
void repaint () noexcept
 
void repaint (const Rectangle< uint > &rect) noexcept
 
void setGeometryConstraints (uint minimumWidth, uint minimumHeight, bool keepAspectRatio=false, bool automaticallyScale=false)
 
ApplicationgetParentApp () const noexcept
 
WindowgetParentWindow () 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
 
void setId (uint id) noexcept
 
ApplicationgetApp () const noexcept
 
WindowgetWindow () const noexcept
 
const GraphicsContextgetGraphicsContext () const noexcept
 
TopLevelWidgetgetTopLevelWidget () const noexcept
 
ApplicationgetParentApp () const noexcept
 
WindowgetParentWindow () const noexcept
 

Friends

class Window
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
virtual void onDisplay ()=0
 
virtual bool onKeyboard (const KeyboardEvent &)
 
virtual bool onSpecial (const SpecialEvent &)
 
virtual bool onCharacterInput (const CharacterInputEvent &)
 
virtual bool onMouse (const MouseEvent &)
 
virtual bool onMotion (const MotionEvent &)
 
virtual bool onScroll (const ScrollEvent &)
 
virtual void onResize (const ResizeEvent &)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TopLevelWidget()

TopLevelWidget::TopLevelWidget ( Window windowToMapTo)
explicit

Constructor.

◆ ~TopLevelWidget()

virtual TopLevelWidget::~TopLevelWidget ( )
virtual

Destructor.

Member Function Documentation

◆ getApp()

Application& TopLevelWidget::getApp ( ) const
noexcept

Get the application associated with this top-level widget's window.

◆ getWindow()

Window& TopLevelWidget::getWindow ( ) const
noexcept

Get the window associated with this top-level widget.

◆ setWidth()

void TopLevelWidget::setWidth ( uint  width)

Set width of this widget's window.

Note
This will not change the widget's size right away, but be pending on the OS resizing the window

◆ setHeight()

void TopLevelWidget::setHeight ( uint  height)

Set height of this widget's window.

Note
This will not change the widget's size right away, but be pending on the OS resizing the window

◆ setSize() [1/2]

void TopLevelWidget::setSize ( uint  width,
uint  height 
)

Set size of this widget's window, using width and height values.

Note
This will not change the widget's size right away, but be pending on the OS resizing the window

◆ setSize() [2/2]

void TopLevelWidget::setSize ( const Size< uint > &  size)

Set size of this widget's window.

Note
This will not change the widget's size right away, but be pending on the OS resizing the window

◆ repaint()

void TopLevelWidget::repaint ( )
virtualnoexcept

Request repaint of this widget's area to the window this widget belongs to. On the raw Widget class this function does nothing.

Reimplemented from Widget.


The documentation for this class was generated from the following file: