VolViz
A volume visualization tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | Public Attributes | Private Attributes | List of all members
VolViz::Private_::GL::GLFW Class Reference

RAII wrapper for GLFW. More...

#include <GLFW.h>

+ Collaboration diagram for VolViz::Private_::GL::GLFW:

Public Member Functions

 GLFW ()
 Crates a GLFW context associated with a hidden window. More...
 
 GLFW (std::string title, std::size_t width, std::size_t height)
 
 GLFW (GLFW const &)=delete
 
 GLFW (GLFW &&rhs)
 
 ~GLFW ()
 
void hide () noexcept
 Hides the current window. More...
 
void show () noexcept
 Unhides the current window. More...
 
bool isHidden () const noexcept
 Returns true if the window is hidden. More...
 
void makeCurrent () noexcept
 Makes the window's conext current. More...
 
void detachContext () noexcept
 Detaches the context from the current thread. More...
 
 operator bool () const noexcept
 
void swapBuffers () const noexcept
 
void waitEvents () const noexcept
 
void pollEvents () const noexcept
 
bool supportsExtension (std::string name) const noexcept
 
decltype(auto) supportedExtensions () const noexcept
 
std::size_t width () const noexcept
 Returns the width of the window. More...
 
std::size_t height () const noexcept
 Returns the height of the window. More...
 

Public Attributes

std::function< void(int, int,
int, int)> 
keyInputHandler
 keyboard input handler More...
 
std::function< void(std::size_t,
std::size_t)> 
windowResizeCallback
 window resize callback More...
 
std::function< void(double,
double)> 
scrollWheelInputHandler
 scroll wheel input handler More...
 
std::function< void(int, int, int)> mouseButtonCallback
 mouse button callback More...
 
std::function< void(double,
double)> 
mouseMoveCallback
 mouse move callback More...
 

Private Attributes

GLFWwindow * window = nullptr
 
std::vector< std::stringsupportedExtensions_
 

Detailed Description

RAII wrapper for GLFW.

Constructor & Destructor Documentation

VolViz::Private_::GL::GLFW::GLFW ( )
inline

Crates a GLFW context associated with a hidden window.

VolViz::Private_::GL::GLFW::GLFW ( std::string  title,
std::size_t  width,
std::size_t  height 
)
VolViz::Private_::GL::GLFW::GLFW ( GLFW const &  )
delete
VolViz::Private_::GL::GLFW::GLFW ( GLFW &&  rhs)
VolViz::Private_::GL::GLFW::~GLFW ( )

Member Function Documentation

void VolViz::Private_::GL::GLFW::detachContext ( )
noexcept

Detaches the context from the current thread.

std::size_t VolViz::Private_::GL::GLFW::height ( ) const
noexcept

Returns the height of the window.

void VolViz::Private_::GL::GLFW::hide ( )
noexcept

Hides the current window.

bool VolViz::Private_::GL::GLFW::isHidden ( ) const
noexcept

Returns true if the window is hidden.

void VolViz::Private_::GL::GLFW::makeCurrent ( )
noexcept

Makes the window's conext current.

VolViz::Private_::GL::GLFW::operator bool ( ) const
inlinenoexcept
void VolViz::Private_::GL::GLFW::pollEvents ( ) const
inlinenoexcept
void VolViz::Private_::GL::GLFW::show ( )
noexcept

Unhides the current window.

decltype(auto) VolViz::Private_::GL::GLFW::supportedExtensions ( ) const
inlinenoexcept
bool VolViz::Private_::GL::GLFW::supportsExtension ( std::string  name) const
noexcept
void VolViz::Private_::GL::GLFW::swapBuffers ( ) const
inlinenoexcept
void VolViz::Private_::GL::GLFW::waitEvents ( ) const
inlinenoexcept
std::size_t VolViz::Private_::GL::GLFW::width ( ) const
noexcept

Returns the width of the window.

Member Data Documentation

std::function<void(int, int, int, int)> VolViz::Private_::GL::GLFW::keyInputHandler

keyboard input handler

std::function<void(int, int, int)> VolViz::Private_::GL::GLFW::mouseButtonCallback

mouse button callback

std::function<void(double, double)> VolViz::Private_::GL::GLFW::mouseMoveCallback

mouse move callback

std::function<void(double, double)> VolViz::Private_::GL::GLFW::scrollWheelInputHandler

scroll wheel input handler

std::vector<std::string> VolViz::Private_::GL::GLFW::supportedExtensions_
private
GLFWwindow* VolViz::Private_::GL::GLFW::window = nullptr
private
std::function<void(std::size_t, std::size_t)> VolViz::Private_::GL::GLFW::windowResizeCallback

window resize callback


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