|
MyGUI 3.4.3
|
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 |
| using | EventHandle_CanvasPtr = delegates::MultiDelegate< Canvas * > |
| using | EventHandle_CanvasPtrEvent = delegates::Delegate< Canvas *, Event > |
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 std::string_view | 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 std::string_view | getClassTypeName () |
Static Public Member Functions inherited from MyGUI::IObject | |
| static std::string_view | getClassTypeName () |
Protected Attributes | |
| ITexture * | mTexture {nullptr} |
| Current texture. | |
| IntSize | mReqTexSize |
| Requested bu user sizes. | |
| std::string | mGenTexName |
| Generated texture name. | |
| TextureResizeMode | mTexResizeMode {TRM_PT_CONST_SIZE} |
| Texture resize mode. | |
| uint8 * | mTexData {nullptr} |
| Saved pointer from last calling lock. | |
| bool | mTexManaged {true} |
| true if we own the texture (can delete it or replace by another instance), otherwise false | |
| bool | mFrameAdvise {false} |
| For updating once per frame. True state means updating before next frame starts. | |
| bool | mInvalidateData {false} |
Protected Attributes inherited from MyGUI::ICroppedRectangle | |
| IntRect | mMargin |
| IntCoord | mCoord |
| IntPoint | mAbsolutePosition |
| bool | mIsMargin {false} |
| ICroppedRectangle * | mCroppedParent {nullptr} |
Definition at line 21 of file MyGUI_Canvas.h.
Definition at line 23 of file MyGUI_Canvas.h.
Definition at line 44 of file MyGUI_Canvas.h.
Definition at line 45 of file MyGUI_Canvas.h.
Definition at line 23 of file MyGUI_Canvas.h.
Available resize and view modes of texture
Definition at line 51 of file MyGUI_Canvas.h.
| MyGUI::Canvas::Canvas | ( | ) |
Definition at line 17 of file MyGUI_Canvas.cpp.
Destroys texture.
Definition at line 165 of file MyGUI_Canvas.cpp.
Definition at line 269 of file MyGUI_Canvas.cpp.
Checks if we need to create a texture with such sizes.
Definition at line 120 of file MyGUI_Canvas.cpp.
|
protected |
Correct texture uv-coordinates.
Definition at line 179 of file MyGUI_Canvas.cpp.
|
protected |
Creates the texture itself.
Definition at line 42 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 30 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 70 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::createTexture | ( | TextureResizeMode | _resizeMode, |
| TextureUsage | _usage = getDefaultTextureUsage(), |
||
| PixelFormat | _format = getDefaultTextureFormat() |
||
| ) |
Creates texture.
Definition at line 22 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::destroyTexture | ( | ) |
Destroys texture.
Definition at line 150 of file MyGUI_Canvas.cpp.
For updating once per frame.
Definition at line 215 of file MyGUI_Canvas.cpp.
For updating once per frame.
Definition at line 235 of file MyGUI_Canvas.cpp.
|
inlinestatic |
Definition at line 23 of file MyGUI_Canvas.h.
|
static |
Returns default GUI texture format.
Definition at line 355 of file MyGUI_Canvas.cpp.
|
static |
Returns default GUI texture usage.
Definition at line 350 of file MyGUI_Canvas.cpp.
| Canvas::TextureResizeMode MyGUI::Canvas::getResizeMode | ( | ) | const |
Returns resize mode.
Definition at line 320 of file MyGUI_Canvas.cpp.
| ITexture * MyGUI::Canvas::getTexture | ( | ) | const |
Reurns interface texture.
Definition at line 340 of file MyGUI_Canvas.cpp.
| PixelFormat MyGUI::Canvas::getTextureFormat | ( | ) | const |
Returns needed sizes while creating texture.
Definition at line 310 of file MyGUI_Canvas.cpp.
| const std::string & MyGUI::Canvas::getTextureName | ( | ) | const |
Returns name of the current texture.
Definition at line 315 of file MyGUI_Canvas.cpp.
| int MyGUI::Canvas::getTextureRealHeight | ( | ) | const |
Returns real height of texture.
Definition at line 285 of file MyGUI_Canvas.cpp.
| IntSize MyGUI::Canvas::getTextureRealSize | ( | ) | const |
Returns real _size of texture.
Definition at line 290 of file MyGUI_Canvas.cpp.
| int MyGUI::Canvas::getTextureRealWidth | ( | ) | const |
Returns real width of texture.
Definition at line 280 of file MyGUI_Canvas.cpp.
| int MyGUI::Canvas::getTextureSrcHeight | ( | ) | const |
Returns needed height while creating texture.
Definition at line 300 of file MyGUI_Canvas.cpp.
| IntSize MyGUI::Canvas::getTextureSrcSize | ( | ) | const |
Returns needed sizes while creating texture.
Definition at line 305 of file MyGUI_Canvas.cpp.
| int MyGUI::Canvas::getTextureSrcWidth | ( | ) | const |
Returns needed width while creating texture.
Definition at line 295 of file MyGUI_Canvas.cpp.
|
inlineoverridevirtual |
Get type name as string
Reimplemented from MyGUI::Widget.
Definition at line 23 of file MyGUI_Canvas.h.
|
overrideprotectedvirtual |
Reimplemented from MyGUI::Widget.
Definition at line 161 of file MyGUI_Canvas.cpp.
| bool MyGUI::Canvas::isLocked | ( | ) | const |
Checks lockness of hardware _pixel buffer.
Definition at line 275 of file MyGUI_Canvas.cpp.
| bool MyGUI::Canvas::isTextureCreated | ( | ) | const |
Returns true if the texture was created (and exists), otherwise false.
Definition at line 330 of file MyGUI_Canvas.cpp.
| bool MyGUI::Canvas::isTextureManaged | ( | ) | const |
Returns true if we own the texture, otherwise false.
Definition at line 335 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 210 of file MyGUI_Canvas.cpp.
Compare with selected type
Definition at line 23 of file MyGUI_Canvas.h.
Compare with selected type
Reimplemented from MyGUI::Widget.
Definition at line 23 of file MyGUI_Canvas.h.
| void * MyGUI::Canvas::lock | ( | TextureUsage | _usage = TextureUsage::Write | ) |
Locks hardware pixel buffer.
Definition at line 196 of file MyGUI_Canvas.cpp.
Calls when resize widget.
Definition at line 60 of file MyGUI_Canvas.cpp.
Set widget position and size
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 107 of file MyGUI_Canvas.cpp.
Set widget position and size
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 172 of file MyGUI_Widget.cpp.
See Widget::setCoord(const IntCoord& _coord)
Definition at line 179 of file MyGUI_Widget.cpp.
Set widget position (position of left top corner)
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 168 of file MyGUI_Widget.cpp.
See Widget::setPosition(const IntPoint& _pos)
Definition at line 175 of file MyGUI_Widget.cpp.
| void MyGUI::Canvas::setResizeMode | ( | TextureResizeMode | _value | ) |
Sets resize mode of texture.
Definition at line 325 of file MyGUI_Canvas.cpp.
Set widget size
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 100 of file MyGUI_Canvas.cpp.
Set widget size
Reimplemented from MyGUI::ICroppedRectangle.
Definition at line 170 of file MyGUI_Widget.cpp.
See Widget::setSize(const IntSize& _size)
Definition at line 177 of file MyGUI_Widget.cpp.
Sets the texture managed.
Definition at line 345 of file MyGUI_Canvas.cpp.
|
overrideprotectedvirtual |
Reimplemented from MyGUI::Widget.
Definition at line 155 of file MyGUI_Canvas.cpp.
Implements MyGUI::ITextureInvalidateListener.
Definition at line 264 of file MyGUI_Canvas.cpp.
| void MyGUI::Canvas::unlock | ( | ) |
Unlocks hardware pixel buffer.
Definition at line 205 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 114 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 131 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 191 of file MyGUI_Canvas.h.
For updating once per frame. True state means updating before next frame starts.
Definition at line 252 of file MyGUI_Canvas.h.
|
protected |
Generated texture name.
Definition at line 240 of file MyGUI_Canvas.h.
Definition at line 254 of file MyGUI_Canvas.h.
|
protected |
Requested bu user sizes.
Definition at line 237 of file MyGUI_Canvas.h.
true if we own the texture (can delete it or replace by another instance), otherwise false
Definition at line 249 of file MyGUI_Canvas.h.
|
protected |
Current texture.
Definition at line 234 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 198 of file MyGUI_Canvas.h.