dip::viewer::Manager class

Simple window manager.

Contents

Derived classes

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

Functions

auto activeWindows() -> dip::uint pure virtual
Returns the number of managed windows.
void createWindow(dip::viewer::WindowPtr window) pure virtual
Create a window. more...
void destroyWindows() pure virtual
Destroys all windows.
void processEvents() pure virtual
Processes event queue. more...
void refreshWindow(dip::viewer::Window* window) protected pure virtual
Refresh a Window’s contents.
auto screenSize() const -> dip::UnsignedArray pure virtual
Returns the size of the screen in pixels. more...
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.
void setWindowTitle(dip::viewer::Window* window, char const* name) protected pure virtual
Sets a Window’s title. more...
void swapBuffers(dip::viewer::Window* window) protected pure virtual
Swap display buffers. more...

Function documentation

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

Create a window.

Example usage:

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

dip::uint activeWindows( ) pure virtual

Returns the number of managed windows.

void destroyWindows( ) pure virtual

Destroys all windows.

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 ));
}

dip::UnsignedArray screenSize( ) const pure virtual

Returns the size of the screen in pixels.

May only be called after the window manager has been initialized, such as after creating a window.

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.

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.