TDME2 1.9.121
|
GUI texture base node. More...
#include <tdme/gui/nodes/GUITextureBaseNode.h>
Classes | |
struct | RequestedDimensionConstraints |
Public Member Functions | |
int | getContentWidth () override |
int | getContentHeight () override |
void | dispose () override |
Dispose node. More... | |
void | render (GUIRenderer *guiRenderer) override |
Render. More... | |
void | setTextureMatrix (const Matrix2D3x3 &textureMatrix) |
Set texture matrix. More... | |
const GUIColor & | getEffectColorMul () |
void | setEffectColorMul (const GUIColor &effectColorMul) |
Set effect color mul. More... | |
const GUIColor & | getEffectColorAdd () |
void | setEffectColorAdd (const GUIColor &effectColorAdd) |
Set effect color add. More... | |
GUINode_Clipping & | getClipping () |
const string & | getMask () |
void | setMask (const string &mask) |
Set mask source. More... | |
float | getMaskMaxValue () |
void | setMaskMaxValue (float maskMaxValue) |
Set maximum value of mask to display image. More... | |
![]() | |
GUIScreenNode * | getScreenNode () |
GUIParentNode * | getParentNode () |
const string & | getId () |
const string | getHierarchicalId () |
virtual const string | getNodeType ()=0 |
virtual int | getContentWidth ()=0 |
virtual int | getContentHeight ()=0 |
virtual int | getAutoWidth () |
virtual int | getAutoHeight () |
GUINode_Border & | getBorder () |
GUINode_Padding & | getPadding () |
GUINode_RequestedConstraints & | getRequestsConstraints () |
GUINode_ComputedConstraints & | getComputedConstraints () |
GUIColor & | getBackgroundColor () |
virtual void | dispose () |
Dispose node. More... | |
bool | isConditionsMet () |
Determine if conditions are set. More... | |
virtual void | setConditionsMet () |
Set conditions met for this node and its subnodes. More... | |
virtual void | layoutOnDemand () |
Layout on demand. More... | |
bool | hasEffects () |
virtual void | applyEffects (GUIRenderer *guiRenderer) |
Apply effects. More... | |
virtual void | undoEffects (GUIRenderer *guiRenderer) |
Undo effects. More... | |
virtual void | render (GUIRenderer *guiRenderer) |
Render. More... | |
float | computeParentChildrenRenderOffsetXTotal () |
float | computeParentChildrenRenderOffsetYTotal () |
bool | isEventBelongingToNode (GUIMouseEvent *event, Vector2 &position) |
Is event belonging to node. More... | |
bool | isEventBelongingToNode (GUIMouseEvent *event) |
Is event belonging to node. More... | |
void | getEventOffNodeRelativePosition (GUIMouseEvent *event, Vector2 &position) |
Get event off node relative position TODO: use Vector2 instead of array<float, 2> More... | |
void | getEventNodePosition (GUIMouseEvent *event, Vector2 &position) |
Get event position clamped to node constraints TODO: use Vector2 instead of array<float, 2> More... | |
GUIParentNode * | getParentControllerNode () |
virtual void | determineMouseEventNodes (GUIMouseEvent *event, bool floatingNode, unordered_set< string > &eventNodeIds, unordered_set< string > &eventFloatingNodeIds) |
Determine mouse event nodes. More... | |
GUINodeController * | getController () |
void | setController (GUINodeController *controller) |
Set up node controller. More... | |
void | scrollToNodeY (GUIParentNode *toNode=nullptr) |
Scroll to node Y. More... | |
void | scrollToNodeX (GUIParentNode *toNode=nullptr) |
Scroll to node X. More... | |
void | setBackgroundImage (const string &backgroundImage) |
Set background image. More... | |
int | getGUIEffectOffsetX () |
void | setGUIEffectOffsetX (int guiEffectOffsetX) |
Set GUI effect offset X. More... | |
int | getGUIEffectOffsetY () |
void | setGUIEffectOffsetY (int guiEffectOffsetY) |
Set GUI effect offset Y. More... | |
GUIEffectState * | getEffectState () |
GUIEffect * | getEffect (const string &id) |
Get effect. More... | |
void | addEffect (const string &id, GUIEffect *effect) |
Add effect, effect already registered with the is will be removed. More... | |
void | removeEffect (const string &id) |
Remove effect. More... | |
Static Public Member Functions | |
static GUINode_Clipping | createClipping (const string &allClipping, const string &left, const string &top, const string &right, const string &bottom) |
Create clipping. More... | |
static RequestedDimensionConstraints | createRequestedDimensionConstraints (const string &width, const string &height) |
Create requested dimension constraints. More... | |
![]() | |
static GUINode_Alignments | createAlignments (const string &horizontal, const string &vertical) |
Create alignments. More... | |
static GUINode_RequestedConstraints | createRequestedConstraints (const string &left, const string &top, const string &width, const string &height, int factor) |
Create requested constraints. More... | |
static GUIColor | getRequestedColor (const string &color, const GUIColor &defaultColor) |
Get color. More... | |
static GUINode_Flow * | createFlow (const string &flow) |
Create flow. More... | |
static GUINode_Border | createBorder (const string &allBorder, const string &left, const string &top, const string &right, const string &bottom, const string &allBorderColor, const string &leftColor, const string &topColor, const string &rightColor, const string &bottomColor) |
Create border. More... | |
static GUINode_Padding | createPadding (const string &allPadding, const string &left, const string &top, const string &right, const string &bottom) |
Create padding. More... | |
static GUINode_Scale9Grid | createScale9Grid (const string &all, const string &left, const string &top, const string &right, const string &bottom) |
Create scale 9 grid. More... | |
static GUINodeConditions | createConditions (const string &conditions) |
Create conditions. More... | |
static void | dumpNode (GUINode *node, int depth=0, int indent=0, int depthIdx=0) |
Dump node. More... | |
static void | dumpParentNodes (GUINode *node, int indent=0) |
Dump parent nodes. More... | |
Protected Attributes | |
int32_t | textureId { 0 } |
int | textureWidth { 0 } |
int | textureHeight { 0 } |
![]() | |
GUIScreenNode * | screenNode { nullptr } |
GUIParentNode * | parentNode { nullptr } |
string | id |
GUINode_Alignments | alignments |
GUINode_RequestedConstraints | requestedConstraints |
GUINode_ComputedConstraints | computedConstraints |
GUIColor | backgroundColor |
Texture * | backgroundTexture { nullptr } |
int | backgroundTextureId |
GUINode_Scale9Grid | backgroundImageScale9Grid |
GUIColor | backgroundImageEffectColorMul |
GUIColor | backgroundImageEffectColorAdd |
GUINode_Padding | padding |
GUINode_Border | border |
GUINodeConditions | showOn |
GUINodeConditions | hideOn |
GUINodeController * | controller { nullptr } |
unordered_map< string, GUIEffect * > | effects |
int | guiEffectOffsetX |
int | guiEffectOffsetY |
bool | conditionsMet |
bool | layouted |
bool | haveOutEffect |
vector< string > | lastConditions |
GUIEffectState * | effectState { nullptr } |
Private Attributes | |
RequestedDimensionConstraints | requestedDimensionConstraints |
bool | mirrorX { false } |
bool | mirrorY { false } |
GUIColor | effectColorMul |
GUIColor | effectColorAdd |
GUINode_Clipping | clipping |
Texture * | maskTexture { nullptr } |
float | maskMaxValue |
int32_t | maskTextureId { 0 } |
Matrix2D3x3 | textureMatrix |
Matrix2D3x3 | mirrorTextureMatrix |
GUINode_Scale9Grid | scale9Grid |
string | mask |
Friends | |
class | tdme::gui::GUIParser |
Additional Inherited Members | |
![]() | |
static GUINode_RequestedConstraints_RequestedConstraintsType * | getRequestedConstraintsType (const string &constraint, GUINode_RequestedConstraints_RequestedConstraintsType *defaultConstraintsType) |
Get requested constraints type. More... | |
static int | getRequestedConstraintsValue (const string &constraint, int defaultConstraintsValue) |
Get requested constraints value. More... | |
static int | getRequestedPixelValue (const string &value, int defaultValue) |
Get requested pixel value. More... | |
|
protected |
Constructor.
screenNode | screen node |
parentNode | parent node |
id | id |
flow | flow |
alignments | alignments |
requestedConstraints | requested constraints |
backgroundColor | background color |
backgroundImage | background image |
backgroundImageScale9Grid | background image scale 9 grid |
backgroundImageEffectColorMul | background image effect color mul |
backgroundImageEffectColorAdd | background image effect color add |
border | border |
padding | padding |
showOn | show on |
hideOn | hide on |
requestedDimensionConstraints | requested dimension constraints |
mirrorX | mirror X |
mirrorY | mirror Y |
effectColorMul | effect color mul |
effectColorAdd | effect color add |
scale9Grid | scale 9 grid |
clipping | clipping |
mask | mask image |
maskMaxValue | maximum value of mask to display image |
tdme::gui::GUIParserException |
Definition at line 42 of file GUITextureBaseNode.cpp.
|
static |
Create clipping.
allClipping | all sides |
left | left |
top | top |
right | right |
bottom | bottom |
Definition at line 516 of file GUITextureBaseNode.cpp.
|
static |
Create requested dimension constraints.
width | width |
height | height |
Definition at line 544 of file GUITextureBaseNode.cpp.
|
overridevirtual |
Dispose node.
Reimplemented from GUINode.
Reimplemented in GUITextureNode.
Definition at line 108 of file GUITextureBaseNode.cpp.
GUINode_Clipping & getClipping | ( | ) |
Definition at line 512 of file GUITextureBaseNode.cpp.
|
overridevirtual |
Implements GUINode.
Definition at line 99 of file GUITextureBaseNode.cpp.
|
overridevirtual |
Implements GUINode.
Definition at line 90 of file GUITextureBaseNode.cpp.
const GUIColor & getEffectColorAdd | ( | ) |
Definition at line 504 of file GUITextureBaseNode.cpp.
const GUIColor & getEffectColorMul | ( | ) |
Definition at line 496 of file GUITextureBaseNode.cpp.
const string & getMask | ( | ) |
Definition at line 530 of file GUITextureBaseNode.cpp.
|
inline |
Definition at line 197 of file GUITextureBaseNode.h.
|
overrideprotectedpure virtual |
Implements GUINode.
Implemented in GUIFrameBufferNode, GUIImageNode, and GUITextureNode.
|
overrideprotectedvirtual |
|
overridevirtual |
Render.
guiRenderer | gui renderer |
floatingNodes | floating nodes |
Reimplemented from GUINode.
Definition at line 114 of file GUITextureBaseNode.cpp.
void setEffectColorAdd | ( | const GUIColor & | effectColorAdd | ) |
Set effect color add.
effectColorAdd | effect color add |
Definition at line 508 of file GUITextureBaseNode.cpp.
void setEffectColorMul | ( | const GUIColor & | effectColorMul | ) |
Set effect color mul.
effectColorMul | effect color mul |
Definition at line 500 of file GUITextureBaseNode.cpp.
void setMask | ( | const string & | mask | ) |
|
inline |
Set maximum value of mask to display image.
maskMinValue | value of mask to display image |
Definition at line 205 of file GUITextureBaseNode.h.
void setTextureMatrix | ( | const Matrix2D3x3 & | textureMatrix | ) |
Set texture matrix.
textureMatrix | texture matrix |
Definition at line 492 of file GUITextureBaseNode.cpp.
|
friend |
Definition at line 44 of file GUITextureBaseNode.h.
|
private |
Definition at line 57 of file GUITextureBaseNode.h.
|
private |
Definition at line 56 of file GUITextureBaseNode.h.
|
private |
Definition at line 55 of file GUITextureBaseNode.h.
|
private |
Definition at line 65 of file GUITextureBaseNode.h.
|
private |
Definition at line 59 of file GUITextureBaseNode.h.
|
private |
Definition at line 58 of file GUITextureBaseNode.h.
|
private |
Definition at line 60 of file GUITextureBaseNode.h.
|
private |
Definition at line 63 of file GUITextureBaseNode.h.
|
private |
Definition at line 53 of file GUITextureBaseNode.h.
|
private |
Definition at line 54 of file GUITextureBaseNode.h.
|
private |
Definition at line 52 of file GUITextureBaseNode.h.
|
private |
Definition at line 64 of file GUITextureBaseNode.h.
|
protected |
Definition at line 70 of file GUITextureBaseNode.h.
|
protected |
Definition at line 68 of file GUITextureBaseNode.h.
|
private |
Definition at line 62 of file GUITextureBaseNode.h.
|
protected |
Definition at line 69 of file GUITextureBaseNode.h.