Visual Computing Library  devel
Loading...
Searching...
No Matches
vcl::glfw::WindowManager< DerivedRenderApp > Class Template Reference

Public Types

using ParentType = void
 The ParentType is the type of the parent class. It is used to initialize the base class (if any). In the glfw::WindowManager, the parent class is void and it is not managed.
 

Public Member Functions

voiddisplayId () const
 
Point2f dpiScale () const
 
uint height () const
 
bool isMinimized () const
 Returns true if the window is minimized (i.e. iconified), false otherwise.
 
void resize (uint width, uint height)
 
void setWindowTitle (const std::string &title)
 
void show ()
 
void update ()
 
uint width () const
 
 WindowManager (const std::string &windowTitle, uint width=1024, uint height=768, ParentType *=nullptr)
 
 WindowManager (ParentType *parent=nullptr)
 
const std::string & windowTitle () const
 
voidwinId () const
 

Static Public Attributes

static const uint WINDOW_MANAGER_ID = WindowManagerId::GLFW_WINDOW
 The WINDOW_MANAGER_ID is the ID of the window manager. It is used to identify the window manager implementation (if necessary) by the DerivedRenderApp class.
 

Protected Member Functions

virtual void glfwContentScaleCallback (GLFWwindow *, float xscale, float yscale)
 
virtual void glfwCursorPosCallback (GLFWwindow *, double xpos, double ypos)
 
virtual void glfwFramebufferSizeCallback (GLFWwindow *, int width, int height)
 
virtual void glfwKeyCallback (GLFWwindow *, int key, int, int action, int mods)
 
virtual void glfwMouseButtonCallback (GLFWwindow *win, int button, int action, int mods)
 
virtual void glfwScrollCallback (GLFWwindow *, double xoffset, double yoffset)
 
voidwindowPtr ()
 

Protected Attributes

float mScaleX = 1.0f
 
float mScaleY = 1.0f
 
GLFWwindowmWindow = nullptr
 

Private Member Functions

void cleanup ()
 
autoderived ()
 
const autoderived () const
 
void setCallbacks ()
 

Static Private Member Functions

static int fixKeyboardMods (int key, int action, int mods)
 

Private Attributes

int mLastPressedButton = NO_BUTTON
 
Point2d mLastPressedPos = {0, 0}
 
double mLastPressedTime = 0.0
 
std::string mTitle
 

Static Private Attributes

static constexpr double DOUBLE_CLICK_DIST_PIXELS = 4.0
 
static constexpr double DOUBLE_CLICK_TIME_SECS = 0.25
 
static constexpr int NO_BUTTON = GLFW_MOUSE_BUTTON_LAST + 1
 

Member Function Documentation

◆ isMinimized()

bool vcl::glfw::WindowManager< DerivedRenderApp >::isMinimized ( ) const
inline

Returns true if the window is minimized (i.e. iconified), false otherwise.

Returns
true if the window is minimized, false otherwise.

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