VCV Rack API  v1
rack::Window Struct Reference

#include <window.hpp>

Collaboration diagram for rack::Window:
[legend]

Public Member Functions

 Window ()
 
 ~Window ()
 
void run ()
 
void screenshot (float zoom)
 Takes a screenshot of each module. More...
 
void close ()
 
void cursorLock ()
 
void cursorUnlock ()
 
int getMods ()
 Gets the current keyboard mod state Don't call this from a Key event. More...
 
void setFullScreen (bool fullScreen)
 
bool isFullScreen ()
 
bool isFrameOverdue ()
 
float getMonitorRefreshRate ()
 
float getLastFrameRate ()
 
std::shared_ptr< FontloadFont (const std::string &filename)
 
std::shared_ptr< ImageloadImage (const std::string &filename)
 
std::shared_ptr< SvgloadSvg (const std::string &filename)
 

Public Attributes

GLFWwindow * win = NULL
 
NVGcontext * vg = NULL
 
float pixelRatio = 1.f
 The scaling ratio. More...
 
float windowRatio = 1.f
 
int frame = 0
 
math::Vec mousePos
 The last known absolute mouse position in the window. More...
 
std::shared_ptr< FontuiFont
 
double frameTimeStart = 0.f
 
std::map< std::string, std::weak_ptr< Font > > fontCache
 Use load*() instead of modifying these directly. More...
 
std::map< std::string, std::weak_ptr< Image > > imageCache
 
std::map< std::string, std::weak_ptr< Svg > > svgCache
 
Internal * internal
 

Constructor & Destructor Documentation

◆ Window()

rack::Window::Window ( )

◆ ~Window()

rack::Window::~Window ( )

Member Function Documentation

◆ run()

void rack::Window::run ( )

◆ screenshot()

void rack::Window::screenshot ( float  zoom)

Takes a screenshot of each module.

◆ close()

void rack::Window::close ( )

◆ cursorLock()

void rack::Window::cursorLock ( )

◆ cursorUnlock()

void rack::Window::cursorUnlock ( )

◆ getMods()

int rack::Window::getMods ( )

Gets the current keyboard mod state Don't call this from a Key event.

Simply use e.mods instead.

◆ setFullScreen()

void rack::Window::setFullScreen ( bool  fullScreen)

◆ isFullScreen()

bool rack::Window::isFullScreen ( )

◆ isFrameOverdue()

bool rack::Window::isFrameOverdue ( )

◆ getMonitorRefreshRate()

float rack::Window::getMonitorRefreshRate ( )

◆ getLastFrameRate()

float rack::Window::getLastFrameRate ( )

◆ loadFont()

std::shared_ptr<Font> rack::Window::loadFont ( const std::string &  filename)

◆ loadImage()

std::shared_ptr<Image> rack::Window::loadImage ( const std::string &  filename)

◆ loadSvg()

std::shared_ptr<Svg> rack::Window::loadSvg ( const std::string &  filename)

Member Data Documentation

◆ win

GLFWwindow* rack::Window::win = NULL

◆ vg

NVGcontext* rack::Window::vg = NULL

◆ pixelRatio

float rack::Window::pixelRatio = 1.f

The scaling ratio.

◆ windowRatio

float rack::Window::windowRatio = 1.f

◆ frame

int rack::Window::frame = 0

◆ mousePos

math::Vec rack::Window::mousePos

The last known absolute mouse position in the window.

◆ uiFont

std::shared_ptr<Font> rack::Window::uiFont

◆ frameTimeStart

double rack::Window::frameTimeStart = 0.f

◆ fontCache

std::map<std::string, std::weak_ptr<Font> > rack::Window::fontCache

Use load*() instead of modifying these directly.

◆ imageCache

std::map<std::string, std::weak_ptr<Image> > rack::Window::imageCache

◆ svgCache

std::map<std::string, std::weak_ptr<Svg> > rack::Window::svgCache

◆ internal

Internal* rack::Window::internal

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