Window class
Simple GL window
Contents
- Reference
Derived classes
-
class dip::
viewer:: Viewer abstract - A Window for viewing a
dip::Imagemore...
Functions
- void click(int , int , int , int , int ) protected virtual
- Overridable callback that is called when a mouse button is clicked.
- void close() protected virtual
- Overridable callback that is called when the window is closed.
- void create() protected virtual
- Overridable callback that is called when the window is created.
- void destroy()
- Marks the window for destruction.
- auto destroyed() const -> bool
- Returns whether the window is marked for destruction. more...
- void draw() protected virtual
- Overridable callback that draws the visualization.
- auto drawString(char const* string) -> dip::uint
- Draw a string onto the window. more...
- auto height() const -> int
- Returns the window’s height.
- auto id() -> void* protected
- Returns the window’s identity.
- void id(void* _id) private
- Sets the window’s identity. more...
- void idle() protected virtual
- Overridable callback that is called periodically to allow for animation.
- void key(unsigned char k, int x, int y, int mods) protected virtual
- Overridable callback that is called when a key is pressed.
- auto manager() -> dip::viewer::Manager* protected
- Returns the
dip::viewer::Managerthat manages this window. - void manager(dip::viewer::Manager* _manager) private
- Sets the window’s manager.
- void motion(int , int ) protected virtual
- Overridable callback that is called when the mouse is moved while a button is clicked.
- void refresh()
- Refresh window contents.
- void release() protected virtual
- Release any resources held or referenced by this window.
- void requestSize(dip::uint width, dip::uint height) protected
- Suggests a window’s size. more...
- void reshape(int , int ) protected virtual
- Overridable callback that is called when the window shape is changed.
- void resize(int width, int height) private
- Sets the window’s size. more...
- void setPosition(int x, int y)
- Set the window’s screen position.
- void setSize(int width, int height)
- Set the window’s size.
- void swap() protected
- Swaps display buffers. more...
- void title(char const* name) protected
- Sets the window’s title. more...
- void visible(int ) protected virtual
- Overridable callback that is called when the window visibility changes.
- auto width() const -> int
- Returns the window’s width.
Function documentation
void refresh( )
Refresh window contents.
void destroy( )
Marks the window for destruction.
bool destroyed( ) const
Returns whether the window is marked for destruction.
This is set either from a callback, or by calling dip::viewer::Window::destroy.
dip::uint drawString( char const* string)
Draw a string onto the window.
Must be called from a callback.
int width( ) const
Returns the window’s width.
int height( ) const
Returns the window’s height.
void setPosition( int x, int y)
Set the window’s screen position.
void setSize( int width, int height)
Set the window’s size.
dip::viewer::Manager* manager( ) protected
Returns the dip::viewer::Manager that manages this window.
void* id( ) protected
Returns the window’s identity.
void requestSize( dip::uint width, dip::uint height) protected
Suggests a window’s size.
Note that this function must be called before the dip::viewer::Window::create callback is called.
void release( ) protected virtual
Release any resources held or referenced by this window.
void draw( ) protected virtual
Overridable callback that draws the visualization.
void idle( ) protected virtual
Overridable callback that is called periodically to allow for animation.
void reshape( int , int ) protected virtual
Overridable callback that is called when the window shape is changed.
void visible( int ) protected virtual
Overridable callback that is called when the window visibility changes.
void create( ) protected virtual
Overridable callback that is called when the window is created.
void close( ) protected virtual
Overridable callback that is called when the window is closed.
void key( unsigned char k, int x, int y, int mods) protected virtual
Overridable callback that is called when a key is pressed.
void click( int , int , int , int , int ) protected virtual
Overridable callback that is called when a mouse button is clicked.
void motion( int , int ) protected virtual
Overridable callback that is called when the mouse is moved while a button is clicked.
void manager( dip::viewer::Manager* _manager) private
Sets the window’s manager.
void id( void* _id) private
Sets the window’s identity.
This should be called by the window’s manager in order to set a unique identifier that can be used to determine the window context.
void resize( int width, int height) private
Sets the window’s size.
Note that this does not actually resize the window!