DMFXImageViewer(3dm)
DMFXImageViewer - An image viewer class for plugins
Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.
NAME DMFXImageViewer - An image viewer class for plugins SYNOPSIS #include <dmedia/fx_image_viewer.h> Methods of class DMFXImageViewer: DMFXImageViewer( Widget parent ) ~DMFXImageViewer() void setBuf(const void *buf, unsigned int width, unsigned int height, unsigned int rowBytes) void redraw() void setExposeCallback(ExposeCallback exposeCB, XtPointer clientData) void setGLContext() void restoreGLContext() Boolean setKeepAspectRatio(Boolean keepAspect) Boolean getKeepAspectRatio() DESCRIPTION Special effects plugins may have user customizable settings in the form of a dialog box. These dialog boxes may have an image viewer. This class provides an easy way for plugins to display an image. METHODS DMFXImageViewer(const char *name, Widget parent, const String *resources) The plugin image viewer constructor. ~DMFXImageViewer( ) The plugin image viewer destructor. void setBuf(const void *buf, unsigned int width, unsigned int height, unsigned int rowBytes) Takes a pointer to an ABGR image that is to be displayed in the gl widget. The image is resized as needed to show up in the window. Ownership of the pointer remains with the caller, *but* this object retains a pointer to it until the next setBuf call. It is OK to call setBuf with NULL. void redraw( ) Redraws the image. Note that no explicit call to redraw() is necessary after a setBuf() call. void setExposeCallback(ExposeCallback exposeCB, XtPointer clientData) Set the expose callback, where exposeCB should look like: void exposeCB(Widget w, XtPointer clientData, const XEvent *xev); Note that when using setBuf(), expose events are handled by the image viewer class, and the plugin does not need to handle them. void setGLContext( ) Saves the GL context. PlugIns that render with OpenGL, and want to render directly to the screen can use the setGLContext(), and restoreGLContext(). void restoreGLContext( ) Restores the GL context. PlugIns that render with OpenGL, and want to render directly to the screen can use the setGLContext(), and restoreGLContext(). Boolean setKeepAspectRatio(Boolean keepAspect) Set whether or not the image viewer should maintain its aspect ratio. Boolean getKeepAspectRatio( ) Return whether or not the image viewer should maintain its aspect ratio. SEE ALSO DMFXDialog(3dm).