dip::viewer::Manager class

Simple window manager.

Contents

Derived classes

class dip::viewer::GLFWManager
Simple GLFW window manager.
class dip::viewer::GLUTManager
Simple GLUT window manager.
class dip::viewer::ProxyManager

Functions

void createWindow(dip::viewer::WindowPtr window) pure virtual
Create a window.
auto activeWindows() -> dip::uint pure virtual
Returns the number of managed windows.
void destroyWindows() pure virtual
Destroys all windows.
void processEvents() pure virtual
Processes event queue.
void swapBuffers(dip::viewer::Window* window) protected pure virtual
Swap display buffers.
void setWindowTitle(dip::viewer::Window* window, char const* name) protected pure virtual
Sets a Window’s title.
void refreshWindow(dip::viewer::Window* window) protected pure virtual
Refresh a Window’s contents.
void setWindowPosition(dip::viewer::Window* window, int x, int y) protected pure virtual
Set a Window’s screen position.
void setWindowSize(dip::viewer::Window* window, int width, int height) protected pure virtual
Set a Window’s size.

Function documentation

void createWindow(dip::viewer::WindowPtr window) pure virtual

Create a window.

Example usage:

manager.createWindow( dip::viewer::SliceViewer::Create( image ));

void processEvents() pure virtual

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 swapBuffers(dip::viewer::Window* window) protected pure virtual

Swap display buffers.

Must be called from the specified Window’s callback.

void setWindowTitle(dip::viewer::Window* window, char const* name) protected pure virtual

Sets a Window’s title.

Must be called from the specified Window’s callback.