DISTRHO Plugin Framework
Public Member Functions | Protected Member Functions | List of all members
ImageBaseAboutWindow< ImageType > Class Template Reference

#include <ImageBaseWidgets.hpp>

Inheritance diagram for ImageBaseAboutWindow< ImageType >:
StandaloneWindow Window TopLevelWidget Widget

Public Member Functions

 ImageBaseAboutWindow (Window &transientParentWindow, const ImageType &image=ImageType())
 
 ImageBaseAboutWindow (TopLevelWidget *topLevelWidget, const ImageType &image=ImageType())
 
void setImage (const ImageType &image)
 
- Public Member Functions inherited from StandaloneWindow
 StandaloneWindow (Application &app)
 
 StandaloneWindow (Application &app, Window &transientParentWindow)
 
void done ()
 
void reinit ()
 
bool isVisible () const noexcept
 
void setVisible (bool yesNo)
 
void hide ()
 
void show ()
 
uint getWidth () const noexcept
 
uint getHeight () const noexcept
 
const Size< uint > getSize () const noexcept
 
void repaint () 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)
 
ApplicationgetApp () const noexcept
 
const GraphicsContextgetGraphicsContext () const noexcept
 
double getScaleFactor () const noexcept
 
void setGeometryConstraints (uint minimumWidth, uint minimumHeight, bool keepAspectRatio=false, bool automaticallyScale=false)
 
- Public Member Functions inherited from Window
 Window (Application &app)
 
 Window (Application &app, Window &transientParentWindow)
 
 Window (Application &app, uintptr_t parentWindowHandle, double scaleFactor, bool resizable)
 
 Window (Application &app, uintptr_t parentWindowHandle, uint width, uint height, double scaleFactor, bool resizable)
 
virtual ~Window ()
 
bool isEmbed () const noexcept
 
bool isVisible () const noexcept
 
void setVisible (bool visible)
 
void show ()
 
void hide ()
 
void close ()
 
bool isResizable () const noexcept
 
void setResizable (bool resizable)
 
int getOffsetX () const noexcept
 
int getOffsetY () const noexcept
 
Point< int > getOffset () const noexcept
 
void setOffsetX (int x)
 
void setOffsetY (int y)
 
void setOffset (int x, int y)
 
void setOffset (const Point< int > &offset)
 
uint getWidth () const noexcept
 
uint getHeight () const noexcept
 
Size< uint > getSize () const noexcept
 
void setWidth (uint width)
 
void setHeight (uint height)
 
void setSize (uint width, uint height)
 
void setSize (const Size< uint > &size)
 
const char * getTitle () const noexcept
 
void setTitle (const char *title)
 
bool isIgnoringKeyRepeat () const noexcept
 
void setIgnoringKeyRepeat (bool ignore) 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)
 
ApplicationgetApp () const noexcept
 
const GraphicsContextgetGraphicsContext () const noexcept
 
uintptr_t getNativeWindowHandle () const noexcept
 
double getScaleFactor () const noexcept
 
void focus ()
 
bool openFileBrowser (const DGL_NAMESPACE::FileBrowserOptions &options=FileBrowserOptions())
 
void repaint () noexcept
 
void repaint (const Rectangle< uint > &rect) noexcept
 
void renderToPicture (const char *filename)
 
void runAsModal (bool blockWait=false)
 
Size< uint > getGeometryConstraints (bool &keepAspectRatio)
 
void setGeometryConstraints (uint minimumWidth, uint minimumHeight, bool keepAspectRatio=false, bool automaticallyScale=false, bool resizeNowIfAutoScaling=true)
 
void setTransientParent (uintptr_t transientParentWindowHandle)
 
bool getIgnoringKeyRepeat () const noexcept
 
double getScaling () const noexcept
 
void exec (bool blockWait=false)
 
- Public Member Functions inherited from TopLevelWidget
 TopLevelWidget (Window &windowToMapTo)
 
 ~TopLevelWidget () override
 
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)
 
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)
 
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
 
const char * getName () const noexcept
 
void setId (uint id) noexcept
 
void setName (const char *name) noexcept
 
ApplicationgetApp () const noexcept
 
WindowgetWindow () const noexcept
 
const GraphicsContextgetGraphicsContext () const noexcept
 
TopLevelWidgetgetTopLevelWidget () const noexcept
 
std::list< SubWidget * > getChildren () const noexcept
 
ApplicationgetParentApp () const noexcept
 
WindowgetParentWindow () const noexcept
 

Protected Member Functions

void onDisplay () override
 
bool onKeyboard (const KeyboardEvent &) override
 
bool onMouse (const MouseEvent &) override
 
- Protected Member Functions inherited from Window
std::vector< ClipboardDataOffergetClipboardDataOfferTypes ()
 
virtual uint32_t onClipboardDataOffer ()
 
virtual bool onClose ()
 
virtual void onFocus (bool focus, CrossingMode mode)
 
virtual void onReshape (uint width, uint height)
 
virtual void onScaleFactorChanged (double scaleFactor)
 
virtual void onFileSelected (const char *filename)
 
virtual void fileBrowserSelected (const char *filename)
 
- Protected Member Functions inherited from TopLevelWidget
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 onResize (const ResizeEvent &)
 
virtual bool onSpecial (const SpecialEvent &)
 

Detailed Description

template<class ImageType>
class ImageBaseAboutWindow< ImageType >

DGL Image About Window class.

This is a Window attached (transient) to another Window that simply shows an Image as its content. It is typically used for "about this project" style pop-up Windows.

Pressing 'Esc' or clicking anywhere on the window will automatically close it.

See also
CairoImageAboutWindow, OpenGLImageAboutWindow, Window::runAsModal(bool)

Constructor & Destructor Documentation

◆ ImageBaseAboutWindow() [1/2]

template<class ImageType >
ImageBaseAboutWindow< ImageType >::ImageBaseAboutWindow ( Window transientParentWindow,
const ImageType &  image = ImageType() 
)
explicit

Constructor taking an existing Window as the parent transient window and an optional image. If image is valid, the about window size will match the image size.

◆ ImageBaseAboutWindow() [2/2]

template<class ImageType >
ImageBaseAboutWindow< ImageType >::ImageBaseAboutWindow ( TopLevelWidget topLevelWidget,
const ImageType &  image = ImageType() 
)
explicit

Constructor taking a top-level-widget's Window as the parent transient window and an optional image. If image is valid, the about window size will match the image size.

Member Function Documentation

◆ setImage()

template<class ImageType >
void ImageBaseAboutWindow< ImageType >::setImage ( const ImageType &  image)

Set a new image to use as background for this window. Window size will adjust to match the image size.

◆ onDisplay()

template<class ImageType >
void ImageBaseAboutWindow< ImageType >::onDisplay ( )
overrideprotectedvirtual

A function called to draw the widget contents.

Implements Widget.

◆ onKeyboard()

template<class ImageType >
bool ImageBaseAboutWindow< ImageType >::onKeyboard ( const KeyboardEvent )
overrideprotectedvirtual

A function called when a key is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

◆ onMouse()

template<class ImageType >
bool ImageBaseAboutWindow< ImageType >::onMouse ( const MouseEvent )
overrideprotectedvirtual

A function called when a mouse button is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.


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