|
MyGUI 3.4.2
|
wrapper over Texture - shows the texture. Implemented: resizing of texture (see TextureResizeMode); recovery after loosing device; More...
#include <MyGUI_Canvas.h>

Data Structures | |
| struct | Event |
Public Types | |
| enum | TextureResizeMode { TRM_PT_CONST_SIZE , TRM_PT_VIEW_REQUESTED , TRM_PT_VIEW_ALL } |
| typedef RTTIBase | Base |
| typedef Canvas | RTTIBase |
| typedef delegates::CMultiDelegate1< Canvas * > | EventHandle_CanvasPtr |
| typedef delegates::CDelegate2< Canvas *, Event > | EventHandle_CanvasPtrEvent |
Public Types inherited from MyGUI::Widget | |
| typedef RTTIBase | Base |
| typedef Widget | RTTIBase |
Public Types inherited from MyGUI::IObject | |
| typedef IObject | RTTIBase |
Static Public Member Functions | |
| static const std::string & | getClassTypeName () |
| static TextureUsage | getDefaultTextureUsage () |
| Returns default GUI texture usage. | |
| static PixelFormat | getDefaultTextureFormat () |
| Returns default GUI texture format. | |
Static Public Member Functions inherited from MyGUI::Widget | |
| static const std::string & | getClassTypeName () |
Static Public Member Functions inherited from MyGUI::IObject | |
| static const std::string & | getClassTypeName () |
Protected Attributes | |
| ITexture * | mTexture |
| Current texture. | |
| IntSize | mReqTexSize |
| Requested bu user sizes. | |
| std::string | mGenTexName |
| Generated texture name. | |
| TextureResizeMode | mTexResizeMode |
| Texture resize mode. | |
| uint8 * | mTexData |
| Saved pointer from last calling lock. | |
| bool | mTexManaged |
| true if we own the texture (can delete it or replace by another instance), otherwise false | |
| bool | mFrameAdvise |
| For updating once per frame. True state means updating before next frame starts. | |
| bool | mInvalidateData |
Protected Attributes inherited from MyGUI::ICroppedRectangle | |
| IntRect | mMargin |
| IntCoord | mCoord |
| IntPoint | mAbsolutePosition |
| bool | mIsMargin |
| ICroppedRectangle * | mCroppedParent |
Definition at line 21 of file MyGUI_Canvas.h.
Definition at line 25 of file MyGUI_Canvas.h.
Definition at line 46 of file MyGUI_Canvas.h.
Definition at line 47 of file MyGUI_Canvas.h.
Definition at line 25 of file MyGUI_Canvas.h.
Available resize and view modes of texture
Definition at line 53 of file MyGUI_Canvas.h.
| MyGUI::Canvas::Canvas | ( | ) |
Definition at line 17 of file MyGUI_Canvas.cpp.
Destroys texture.
Definition at line 162 of file MyGUI_Canvas.cpp.
Definition at line 268 of file MyGUI_Canvas.cpp.
Checks if we need to create a texture with such sizes.
Definition at line 117 of file MyGUI_Canvas.cpp.
|
protected |
Correct texture uv-coordinates.
Definition at line 177 of file MyGUI_Canvas.cpp.
|
protected |
Creates the texture itself.
Definition at line 44 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::createTexture | ( | const IntSize & | _size, |
| TextureResizeMode | _resizeMode, | ||
| TextureUsage | _usage = getDefaultTextureUsage(), |
||
| PixelFormat | _format = getDefaultTextureFormat() |
||
| ) |
Creates texture.
Definition at line 36 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::createTexture | ( | int | _width, |
| int | _height, | ||
| TextureResizeMode | _resizeMode, | ||
| TextureUsage | _usage = getDefaultTextureUsage(), |
||
| PixelFormat | _format = getDefaultTextureFormat() |
||
| ) |
Creates texture.
Definition at line 72 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::createTexture | ( | TextureResizeMode | _resizeMode, |
| TextureUsage | _usage = getDefaultTextureUsage(), |
||
| PixelFormat | _format = getDefaultTextureFormat() |
||
| ) |
Creates texture.
Definition at line 28 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::destroyTexture | ( | ) |
Destroys texture.
Definition at line 147 of file MyGUI_Canvas.cpp.
For updating once per frame.
Definition at line 214 of file MyGUI_Canvas.cpp.
For updating once per frame.
Definition at line 234 of file MyGUI_Canvas.cpp.
Definition at line 25 of file MyGUI_Canvas.h.
|
static |
Returns default GUI texture format.
Definition at line 354 of file MyGUI_Canvas.cpp.
|
static |
Returns default GUI texture usage.
Definition at line 349 of file MyGUI_Canvas.cpp.
| Canvas::TextureResizeMode MyGUI::Canvas::getResizeMode | ( | ) | const |
Returns resize mode.
Definition at line 319 of file MyGUI_Canvas.cpp.
| ITexture * MyGUI::Canvas::getTexture | ( | ) | const |
Reurns interface texture.
Definition at line 339 of file MyGUI_Canvas.cpp.
| PixelFormat MyGUI::Canvas::getTextureFormat | ( | ) | const |
Returns needed sizes while creating texture.
Definition at line 309 of file MyGUI_Canvas.cpp.
| const std::string & MyGUI::Canvas::getTextureName | ( | ) | const |
Returns name of the current texture.
Definition at line 314 of file MyGUI_Canvas.cpp.
| int MyGUI::Canvas::getTextureRealHeight | ( | ) | const |
Returns real height of texture.
Definition at line 284 of file MyGUI_Canvas.cpp.
| IntSize MyGUI::Canvas::getTextureRealSize | ( | ) | const |
Returns real _size of texture.
Definition at line 289 of file MyGUI_Canvas.cpp.
| int MyGUI::Canvas::getTextureRealWidth | ( | ) | const |
Returns real width of texture.
Definition at line 279 of file MyGUI_Canvas.cpp.
| int MyGUI::Canvas::getTextureSrcHeight | ( | ) | const |
Returns needed height while creating texture.
Definition at line 299 of file MyGUI_Canvas.cpp.
| IntSize MyGUI::Canvas::getTextureSrcSize | ( | ) | const |
Returns needed sizes while creating texture.
Definition at line 304 of file MyGUI_Canvas.cpp.
| int MyGUI::Canvas::getTextureSrcWidth | ( | ) | const |
Returns needed width while creating texture.
Definition at line 294 of file MyGUI_Canvas.cpp.
Get type name as string
Reimplemented from MyGUI::Widget.
Definition at line 25 of file MyGUI_Canvas.h.
|
overrideprotectedvirtual |
Reimplemented from MyGUI::Widget.
Definition at line 158 of file MyGUI_Canvas.cpp.
| bool MyGUI::Canvas::isLocked | ( | ) | const |
Checks lockness of hardware _pixel buffer.
Definition at line 274 of file MyGUI_Canvas.cpp.
| bool MyGUI::Canvas::isTextureCreated | ( | ) | const |
Returns true if the texture was created (and exists), otherwise false.
Definition at line 329 of file MyGUI_Canvas.cpp.
| bool MyGUI::Canvas::isTextureManaged | ( | ) | const |
Returns true if we own the texture, otherwise false.
Definition at line 334 of file MyGUI_Canvas.cpp.
| bool MyGUI::Canvas::isTextureSrcSize | ( | ) | const |
Checks if the texture has the source (required by user) size, otherwise real texture size are bigger.
Definition at line 209 of file MyGUI_Canvas.cpp.
Compare with selected type
Definition at line 25 of file MyGUI_Canvas.h.
Compare with selected type
Reimplemented from MyGUI::Widget.
Definition at line 25 of file MyGUI_Canvas.h.
| void * MyGUI::Canvas::lock | ( | TextureUsage | _usage = TextureUsage::Write | ) |
Locks hardware pixel buffer.
Definition at line 195 of file MyGUI_Canvas.cpp.
Calls when resize widget.
Definition at line 62 of file MyGUI_Canvas.cpp.
Set widget position and size
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 104 of file MyGUI_Canvas.cpp.
Set widget position and size
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 116 of file MyGUI_Widget.cpp.
See Widget::setCoord(const IntCoord& _coord)
Definition at line 123 of file MyGUI_Widget.cpp.
Set widget position (position of left top corner)
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 112 of file MyGUI_Widget.cpp.
See Widget::setPosition(const IntPoint& _pos)
Definition at line 119 of file MyGUI_Widget.cpp.
| void MyGUI::Canvas::setResizeMode | ( | TextureResizeMode | _value | ) |
Sets resize mode of texture.
Definition at line 324 of file MyGUI_Canvas.cpp.
Set widget size
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 97 of file MyGUI_Canvas.cpp.
Set widget size
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 114 of file MyGUI_Widget.cpp.
See Widget::setSize(const IntSize& _size)
Definition at line 121 of file MyGUI_Widget.cpp.
Sets the texture managed.
Definition at line 344 of file MyGUI_Canvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from MyGUI::Widget.
Definition at line 152 of file MyGUI_Canvas.cpp.
Implements MyGUI::ITextureInvalidateListener.
Definition at line 263 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::unlock | ( | ) |
Unlocks hardware pixel buffer.
Definition at line 204 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::updateTexture | ( | ) |
Call user delegate update and removes old texture if it isn't original.
Definition at line 111 of file MyGUI_Canvas.cpp.
|
protected |
Update entered parameters according to current texture resize mode(size) and restore (if can) parameters of usage and format from texture.
Definition at line 128 of file MyGUI_Canvas.cpp.
| EventHandle_CanvasPtr MyGUI::Canvas::eventPreTextureChanges |
Event : Notify user texture instance will be changed
| _canvas,which | will be updated |
Definition at line 181 of file MyGUI_Canvas.h.
|
protected |
For updating once per frame. True state means updating before next frame starts.
Definition at line 242 of file MyGUI_Canvas.h.
|
protected |
Generated texture name.
Definition at line 230 of file MyGUI_Canvas.h.
|
protected |
Definition at line 244 of file MyGUI_Canvas.h.
|
protected |
Requested bu user sizes.
Definition at line 227 of file MyGUI_Canvas.h.
|
protected |
|
protected |
true if we own the texture (can delete it or replace by another instance), otherwise false
Definition at line 239 of file MyGUI_Canvas.h.
|
protected |
|
protected |
Current texture.
Definition at line 224 of file MyGUI_Canvas.h.
| EventHandle_CanvasPtrEvent MyGUI::Canvas::requestUpdateCanvas |
Event : Texture instance was changed (May be caused by resizing texture or lossing device). User have to update all references to new instance of texture.
signature : void method(MyGUI::Canvas* _canvas, MyGUI::Canvas::Event _event)
| _canvas,which | needs to update |
| _event |
Definition at line 188 of file MyGUI_Canvas.h.