Om
1.0.0
A universal framework for multimedia simulation
|
A class that allows the user to render to a rectangular region. More...
#include <omGUIRenderView.h>
Classes | |
class | Delegate |
A class that contains function objects that recieve RenderView events. More... | |
Public Member Functions | |
RenderView (const Size2D &size) | |
Create a new render view with the specified size. More... | |
RenderView (const Size2D &size, const Vector2i &position) | |
Create a new render view with the specified position and size relative to its parent view. More... | |
~RenderView () | |
Destroy an render view, releasing all resources associated with it. More... | |
virtual Size2D | getSize () const |
Return a 2D vector indicating the size on the screen of this render view in pixels. More... | |
virtual Bool | setSize (const Size2D &size) |
Set the size on the screen of this render view in pixels. More... | |
Size2D | getFramebufferSize () const |
Return a 2D vector indicating the size on the screen of this render view in framebuffer pixels. More... | |
virtual Vector2i | getPosition () const |
Return the 2D position of this render view in pixels, relative to the bottom left corner of the view. More... | |
virtual Bool | setPosition (const Vector2i &position) |
Set the 2D position of this render view in pixels, relative to the bottom left corner of the view. More... | |
Float | getPixelDensity () const |
Return the number of actual rendered pixels (in one dimension) per point. More... | |
Bool | setMaxPixelDensity (Float newMaxDensity) |
Set the maximum pixel density that this render view can use. More... | |
Bool | getIsFullscreen () const |
Return whether or not this render view is in fullscreen mode. More... | |
Bool | setIsFullscreen (Bool newIsFullscreen) |
Set whether or not this render view is in fullscreen mode. More... | |
Bool | setIsFullscreen (Bool newIsFullscreen, const Display &display) |
Set whether or not this render view is in fullscreen mode. More... | |
const Delegate & | getDelegate () const |
Return a const reference to the object that responds to events for this RenderView. More... | |
void | setDelegate (const Delegate &newDelegate) |
Set the object to which RenderView events should be delegated. More... | |
virtual void * | getInternalPointer () const |
Return a pointer to platform-specific data for this render view. More... | |
Public Member Functions inherited from om::gui::objects::WindowObject | |
WindowObject () | |
Create a new default window element. More... | |
Size | getWidth () const |
Return the horizontal size in pixels of this window element. More... | |
Size | getHeight () const |
Return the vertical size in pixels of this window element. More... | |
Bool | setSize (Size newWidth, Size newHeight) |
Set the size on the screen of this window element in pixels. More... | |
Window * | getParentWindow () const |
Return the window that is a parent of this window element. More... | |
virtual void | setParentWindow (Window *newParentWindow) |
Set the window that is going to be a parent of this window element. More... | |
Bool | hasParentWindow () const |
Return whether or not this window element belongs to a window. More... | |
Public Member Functions inherited from om::gui::objects::GUIObject | |
virtual | ~GUIObject () |
Destroy a GUI element and release all resources associated with it. More... | |
Additional Inherited Members | |
Protected Attributes inherited from om::gui::objects::WindowObject | |
Window * | parentWindow |
The parent window of this window element, or NULL if this element is not part of a window. More... | |
A class that allows the user to render to a rectangular region.
om::gui::objects::RenderView::RenderView | ( | const Size2D & | size | ) |
Create a new render view with the specified size.
om::gui::objects::RenderView::RenderView | ( | const Size2D & | size, |
const Vector2i & | position | ||
) |
Create a new render view with the specified position and size relative to its parent view.
om::gui::objects::RenderView::~RenderView | ( | ) |
Destroy an render view, releasing all resources associated with it.
|
virtual |
Return a 2D vector indicating the size on the screen of this render view in pixels.
The actual size of the rendering framebuffer may be different than this value, due to differences in the pixel density of displays. Call getFramebufferSize() to get the actual size in rendered pixels of this view.
Implements om::gui::objects::WindowObject.
|
virtual |
Set the size on the screen of this render view in pixels.
The method returns whether or not the size change operation was successful.
Implements om::gui::objects::WindowObject.
Size2D om::gui::objects::RenderView::getFramebufferSize | ( | ) | const |
Return a 2D vector indicating the size on the screen of this render view in framebuffer pixels.
The nominal size of the render view may be different than this value, due to differences in the pixel density of displays.
|
virtual |
Return the 2D position of this render view in pixels, relative to the bottom left corner of the view.
The coordinate position is defined relative to its enclosing coordinate frame where the origin will be the bottom left corner of the enclosing view or window.
Implements om::gui::objects::WindowObject.
|
virtual |
Set the 2D position of this render view in pixels, relative to the bottom left corner of the view.
The coordinate position is defined relative to its enclosing coordinate frame where the origin will be the bottom left corner of the enclosing view or window.
If the position change operation is successful, TRUE is returned and the view is moved. Otherwise, FALSE is returned and the view is not moved.
Implements om::gui::objects::WindowObject.
Float om::gui::objects::RenderView::getPixelDensity | ( | ) | const |
Return the number of actual rendered pixels (in one dimension) per point.
The default value is 1, indicating one rendered pixel for each framebuffer point. Higher values (i.e. 2) can be used to indicate high-resolution (i.e. retina) displays that need greater actual pixel density per logical pixel.
Set the maximum pixel density that this render view can use.
If possible, the render view will use the specified pixel density to determine the actual resolution of the render view. The render view uses a valid pixel density that is as close to this value as possible. The default is 1.
This method should be called before this render view is bound to a rendering context.
Bool om::gui::objects::RenderView::getIsFullscreen | ( | ) | const |
Return whether or not this render view is in fullscreen mode.
Set whether or not this render view is in fullscreen mode.
The method returns whether or not the fullscreen mode change was successful. Setting an render view to fullscreen can fail if the view is already part of a window or is a child of another view.
This method uses the current resolution of the main display for the view and uses the main display as the fullscreen display.
Calling this method may potentially resize the render view if the display has a different size than the view.
Bool om::gui::objects::RenderView::setIsFullscreen | ( | Bool | newIsFullscreen, |
const Display & | display | ||
) |
Set whether or not this render view is in fullscreen mode.
The method returns whether or not the fullscreen mode change was successful. Setting an render view to fullscreen can fail if the view is already part of a window or is a child of another view.
This method uses the current resolution of the specified display for the view and uses that display as the fullscreen display.
Calling this method may potentially resize the render view if the display has a different size than the view.
const Delegate& om::gui::objects::RenderView::getDelegate | ( | ) | const |
Return a const reference to the object that responds to events for this RenderView.
void om::gui::objects::RenderView::setDelegate | ( | const Delegate & | newDelegate | ) |
Set the object to which RenderView events should be delegated.
|
virtual |
Return a pointer to platform-specific data for this render view.
On Mac OS X, this method returns a pointer to a subclass of NSView which represents the render view.
On Windows, this method returns an HWND indicating the 'window' which represents the render view.
Implements om::gui::objects::GUIObject.