#include <vgui_soview2D.h>
Inheritance diagram for vgui_soview2D_image:

This will store a GL pixel buffer of the input image and display it, on request, with the top left corner at (x,y). It does not keep a reference to the image. Rather, it will create the GL pixel buffer at construction time and store that.
Definition at line 383 of file vgui_soview2D.h.
Public Member Functions | |
| vgui_soview2D_image (float x, float y, vil1_image const &img, bool blend=false, GLenum format=GL_NONE, GLenum type=GL_NONE) | |
| Create the sprite from a vil1_image. | |
| vgui_soview2D_image (float x, float y, vil_image_view_base const &img, bool blend=false, GLenum format=GL_NONE, GLenum type=GL_NONE) | |
| Create the sprite from a vil_image_view. | |
| ~vgui_soview2D_image () | |
| Destructor - delete this image. | |
| virtual void | draw () const |
| Render this image on the display. | |
| virtual vcl_ostream & | print (vcl_ostream &) const |
| Print details about this image to the given stream. | |
| virtual float | distance_squared (float x, float y) const |
| Returns the distance squared from the centroid. | |
| vcl_string | type_name () const |
| Returns the type of this class ('vgui_soview2D_image'). | |
| void | get_centroid (float *x, float *y) const |
| Returns the centroid of this 2D image. | |
| void | translate (float x, float y) |
| Translate this 2D image by the given x and y distances. | |
| virtual void | draw_select () const |
| Render this soview for selection purposes. | |
| virtual void | load_name () const |
| Calls OpenGL function glLoadName with this soview's id. | |
| virtual void | set_style (const vgui_style_sptr &newstyle) |
| Set the style (colour, line width) of the soview. | |
| virtual vgui_style_sptr | get_style () const |
| Return the style (colour, line width) of the soview. | |
| void | set_colour (float r, float g, float b) |
| Set the colour of the soview. | |
| void | set_point_size (float s) |
| Set the point radius of the soview. | |
| void | set_line_width (float w) |
| Set the line width of the soview. | |
| void | attach (vgui_observer *) |
| Attach given observer to this soview. | |
| void | detach (vgui_observer *) |
| Detach the given observer from this soview. | |
| void | get_observers (vcl_vector< vgui_observer * > &) const |
| Get a list of all observers attached to this soview. | |
| virtual void | notify () const |
| Update all observers. | |
| virtual void | notify (vgui_message const &) const |
| Send message to all observers. | |
| virtual unsigned | get_id () const |
| Returns the ID of this soview. | |
| bool | get_selectable () const |
| Return true if it is possible to select this soview. | |
| void | set_selectable (bool s) |
| Make this soview selectable/non-selectable. | |
Static Public Member Functions | |
| static vgui_soview * | id_to_object (unsigned id) |
| Returns a pointer to the vgui_soview, given the ID. | |
| static unsigned | create_id () |
| Create a new ID. | |
Static Public Attributes | |
| static vgui_DLLDATA const void *const | msg_select = "select" |
| static vgui_DLLDATA const void *const | msg_deselect = "deselect" |
| static vgui_DLLDATA const void *const | msg_highlight = "highlight" |
| static vgui_DLLDATA const void *const | msg_unhighlight = "unhighlight" |
Protected Attributes | |
| unsigned | id |
| ID of this soview. | |
| bool | selectable |
| Whether this soview is selectable. | |
| vgui_style_sptr | style |
| Style (colour, line width, etc) of this soview. | |
Private Attributes | |
| float | x_ |
| Coordinates of the upper lefthand corner of the image. | |
| float | y_ |
| unsigned | w_ |
| Width and height of the image. | |
| unsigned | h_ |
| bool | blend_ |
| Render with or without blending?. | |
| vgui_section_buffer * | buffer_ |
| The OpenGL buffer corresponding to the image. | |
|
||||||||||||||||||||||||||||
|
Create the sprite from a vil1_image. If format and type are not specified, the "best" one will be automatically chosen. blend will set the blend state for rendering. See draw(). Definition at line 502 of file vgui_soview2D.cxx. |
|
||||||||||||||||||||||||||||
|
Create the sprite from a vil_image_view. If format and type are not specified, the "best" one will be automatically chosen. blend will set the blend state for rendering. See draw(). Definition at line 517 of file vgui_soview2D.cxx. |
|
|
Destructor - delete this image.
Definition at line 532 of file vgui_soview2D.cxx. |
|
|
Attach given observer to this soview.
Definition at line 183 of file vgui_soview.cxx. |
|
|
Create a new ID.
Definition at line 52 of file vgui_soview.cxx. |
|
|
Detach the given observer from this soview.
Definition at line 188 of file vgui_soview.cxx. |
|
||||||||||||
|
Returns the distance squared from the centroid.
Implements vgui_soview2D. Definition at line 565 of file vgui_soview2D.cxx. |
|
|
Render this image on the display. If the blend state is on, then the image will be rendered with GL_BLEND enabled, and with glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) Implements vgui_soview. Definition at line 537 of file vgui_soview2D.cxx. |
|
|
Render this soview for selection purposes. By default, this will call draw(). However, some objects take time to draw, especially in GL_SELECT mode. The routine allows such objects to render a simplified version for the selection process. Note that during selection, the object is not rendered on screen. The "rendering" is used by OpenGL internals to determine if the object is in the selection region (e.g. area around mouse pointer). Reimplemented in vgui_soview2D_point, and vgui_soview2D_group. Definition at line 93 of file vgui_soview.cxx. |
|
||||||||||||
|
Returns the centroid of this 2D image.
Implements vgui_soview2D. Definition at line 572 of file vgui_soview2D.cxx. |
|
|
Returns the ID of this soview.
Definition at line 102 of file vgui_soview.h. |
|
|
Get a list of all observers attached to this soview.
Definition at line 204 of file vgui_soview.cxx. |
|
|
Return true if it is possible to select this soview.
Definition at line 111 of file vgui_soview.h. |
|
|
Return the style (colour, line width) of the soview.
Definition at line 69 of file vgui_soview.h. |
|
|
Returns a pointer to the vgui_soview, given the ID.
Definition at line 70 of file vgui_soview.cxx. |
|
|
Calls OpenGL function glLoadName with this soview's id.
Definition at line 102 of file vgui_soview.cxx. |
|
|
Send message to all observers.
Definition at line 221 of file vgui_soview.cxx. |
|
|
Update all observers.
Definition at line 213 of file vgui_soview.cxx. |
|
|
Print details about this image to the given stream.
Reimplemented from vgui_soview. Definition at line 560 of file vgui_soview2D.cxx. |
|
||||||||||||||||
|
Set the colour of the soview.
Definition at line 108 of file vgui_soview.cxx. |
|
|
Set the line width of the soview.
Definition at line 140 of file vgui_soview.cxx. |
|
|
Set the point radius of the soview.
Definition at line 124 of file vgui_soview.cxx. |
|
|
Make this soview selectable/non-selectable.
Definition at line 114 of file vgui_soview.h. |
|
|
Set the style (colour, line width) of the soview.
Reimplemented in vgui_soview2D_group. Definition at line 66 of file vgui_soview.h. |
|
||||||||||||
|
Translate this 2D image by the given x and y distances.
Implements vgui_soview2D. Definition at line 581 of file vgui_soview2D.cxx. |
|
|
Returns the type of this class ('vgui_soview2D_image').
Reimplemented from vgui_soview. Definition at line 428 of file vgui_soview2D.h. |
|
|
Render with or without blending?.
Definition at line 444 of file vgui_soview2D.h. |
|
|
The OpenGL buffer corresponding to the image.
Definition at line 447 of file vgui_soview2D.h. |
|
|
Definition at line 441 of file vgui_soview2D.h. |
|
|
ID of this soview.
Definition at line 118 of file vgui_soview.h. |
|
|
Definition at line 97 of file vgui_soview.h. |
|
|
Definition at line 98 of file vgui_soview.h. |
|
|
Definition at line 96 of file vgui_soview.h. |
|
|
Definition at line 99 of file vgui_soview.h. |
|
|
Whether this soview is selectable.
Definition at line 121 of file vgui_soview.h. |
|
|
Style (colour, line width, etc) of this soview.
Definition at line 124 of file vgui_soview.h. |
|
|
Width and height of the image.
Definition at line 441 of file vgui_soview2D.h. |
|
|
Coordinates of the upper lefthand corner of the image.
Definition at line 438 of file vgui_soview2D.h. |
|
|
Definition at line 438 of file vgui_soview2D.h. |
1.4.4