class
#include <diplib/viewer/glut.h>
GLUTManager Simple GLUT window manager.
Contents
- Reference
Base classes
- class Manager
- Simple window manager.
Public functions
- void createWindow(WindowPtr window) override
- Create a window.
- auto activeWindows() -> size_t override
- Returns the number of managed windows.
- void destroyWindows() override
- Destroys all windows.
- void processEvents() override
- Processes event queue.
Protected functions
- void swapBuffers(Window* window) override
- Swap display buffers.
- void setWindowTitle(Window* window, const char* name) override
- Sets a Window's title.
- void refreshWindow(Window* window) override
- Refresh a Window's contents.
- void setWindowPosition(Window* window, int x, int y) override
- Set a Window's screen position.
- void setWindowSize(Window* window, int width, int height) override
- Set a Window's size.
Function documentation
void dip:: viewer:: GLUTManager:: createWindow(WindowPtr window) override
Create a window.
Example usage:
manager.createWindow( dip::viewer::SliceViewer::Create( image ));
void dip:: viewer:: GLUTManager:: processEvents() override
Processes event queue.
This function must be periodically called to allow user interaction. Example usage:
while ( manager.activeWindows()) { manager.processEvents(); std::this_thread::sleep_for( std::chrono::microseconds( 1000 ) ); }
void dip:: viewer:: GLUTManager:: swapBuffers(Window* window) override protected
Swap display buffers.
Must be called from the specified Window's callback.
void dip:: viewer:: GLUTManager:: setWindowTitle(Window* window,
const char* name) override protected
Sets a Window's title.
Must be called from the specified Window's callback.