Visual Computing Library
Loading...
Searching...
No Matches
vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM Class Reference

The RenderApp::WM inner class is an Attorney that allow access to some private member functions of the RenderApp class to the WindowManagerType class. More...

#include <vclib/render/render_app.h>

Private Types

using WindowManagerType = WindowManagerT< RenderApp >
 

Static Private Member Functions

static void init (RenderApp *r)
 The WindowManagerType calls this member function when the window render backend is initialized. The RenderApp propagates the init event to the CanvasType and to each Drawer object, by calling the onInit(uint) member function.
 
static void resize (RenderApp *r, uint width, uint height)
 The WindowManagerType calls this member function when the window is resized, telling the new width and height. The RenderApp propagates the resize event to the CanvasType and to each Drawer object, by calling the onResize(uint, uint) member function.
 
static void paint (RenderApp *r)
 The WindowManagerType calls this member function when the window triggers a paint event.
 
static void setModifiers (RenderApp *r, const KeyModifiers &modifiers)
 The WindowManagerType calls this member function when the current modifiers are updated.
 
static void keyPress (RenderApp *r, Key::Enum key)
 The WindowManagerType calls this member function when a key is pressed.
 
static void keyRelease (RenderApp *r, Key::Enum key)
 The WindowManagerType calls this member function when a key is released.
 
static void mouseMove (RenderApp *r, double x, double y)
 The WindowManagerType calls this member function when the mouse cursor is moved.
 
static void mousePress (RenderApp *r, MouseButton::Enum button, double x, double y)
 The WindowManagerType calls this member function when a mouse button is pressed.
 
static void mouseRelease (RenderApp *r, MouseButton::Enum button, double x, double y)
 The WindowManagerType calls this member function when a mouse button is released.
 
static void mouseDoubleClick (RenderApp *r, MouseButton::Enum button, double x, double y)
 The WindowManagerType calls this member function when a mouse button is double clicked.
 
static void mouseScroll (RenderApp *r, double x, double y)
 The WindowManagerType calls this member function when the mouse wheel is scrolled.
 

Private Attributes

friend WindowManagerType
 

Detailed Description

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
class vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM

The RenderApp::WM inner class is an Attorney that allow access to some private member functions of the RenderApp class to the WindowManagerType class.

The member functions of the RenderApp::WM inner class can be called only by the WindowManagerType class. For example, to call the init member function, the WindowManagerType can call it in the following way:

RenderApp::WM::init(static_cast<RenderApp*>(this));
static void init(RenderApp *r)
The WindowManagerType calls this member function when the window render backend is initialized....
Definition render_app.h:397
The RenderApp class is a template class that combines a canvas, a window manager, and a set of drawer...
Definition render_app.h:67

Member Function Documentation

◆ keyPress()

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
static void vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM::keyPress ( RenderApp r,
Key::Enum  key 
)
inlinestaticprivate

The WindowManagerType calls this member function when a key is pressed.

The event (along with the current key modifiers) is propagated to each Drawer object that is a EventDrawer object, by calling the onKeyPress(Key::Enum, KeyModifiers) member function.

Parameters
key

◆ keyRelease()

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
static void vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM::keyRelease ( RenderApp r,
Key::Enum  key 
)
inlinestaticprivate

The WindowManagerType calls this member function when a key is released.

The event (along with the current key modifiers) is propagated to each Drawer object that is a EventDrawer object, by calling the onKeyRelease(Key::Enum, KeyModifiers) member function.

Parameters
key

◆ mouseDoubleClick()

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
static void vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM::mouseDoubleClick ( RenderApp r,
MouseButton::Enum  button,
double  x,
double  y 
)
inlinestaticprivate

The WindowManagerType calls this member function when a mouse button is double clicked.

The event (along with the current key modifiers) is propagated to each Drawer object that is a EventDrawer object, by calling the onMouseDoubleClick(MouseButton::Enum, double, double, KeyModifiers) member function.

Parameters
button
x
y

◆ mouseMove()

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
static void vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM::mouseMove ( RenderApp r,
double  x,
double  y 
)
inlinestaticprivate

The WindowManagerType calls this member function when the mouse cursor is moved.

The event (along with the current key modifiers) is propagated to each Drawer object that is a EventDrawer object, by calling the onMouseMove(double, double, KeyModifiers) member function.

Parameters
x
y

◆ mousePress()

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
static void vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM::mousePress ( RenderApp r,
MouseButton::Enum  button,
double  x,
double  y 
)
inlinestaticprivate

The WindowManagerType calls this member function when a mouse button is pressed.

The event (along with the current key modifiers) is propagated to each Drawer object that is a EventDrawer object, by calling the onMousePress(MouseButton::Enum, double, double, KeyModifiers) member function.

Parameters
button
x
y

◆ mouseRelease()

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
static void vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM::mouseRelease ( RenderApp r,
MouseButton::Enum  button,
double  x,
double  y 
)
inlinestaticprivate

The WindowManagerType calls this member function when a mouse button is released.

The event (along with the current key modifiers) is propagated to each Drawer object that is a EventDrawer object, by calling the onMouseRelease(MouseButton::Enum, double, double, KeyModifiers) member function.

Parameters
button
x
y

◆ mouseScroll()

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
static void vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM::mouseScroll ( RenderApp r,
double  x,
double  y 
)
inlinestaticprivate

The WindowManagerType calls this member function when the mouse wheel is scrolled.

The event (along with the current key modifiers) is propagated to each Drawer object that is a EventDrawer object, by calling the onMouseScroll(double, double, KeyModifiers) member function.

Parameters
button
x
y

◆ resize()

template<template< typename > typename WindowManagerT, template< typename > typename CanvasT, template< typename > typename... Drawers>
static void vcl::RenderApp< WindowManagerT, CanvasT, Drawers >::WM::resize ( RenderApp r,
uint  width,
uint  height 
)
inlinestaticprivate

The WindowManagerType calls this member function when the window is resized, telling the new width and height. The RenderApp propagates the resize event to the CanvasType and to each Drawer object, by calling the onResize(uint, uint) member function.

Parameters
width
height

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