26 mCurrentColourNative(0xFFFFFFFF),
27 mInverseColourNative(0xFF000000),
28 mShadowColourNative(0x00000000),
30 mTextAlign(
Align::Default),
32 mShadowColour(
Colour::Black),
37 mBackgroundNormal(
true),
41 mVisibleCursor(
false),
47 mIsAddCursorWidth(
true),
143 if (
nullptr !=
mNode)
159 if (
nullptr !=
mNode)
171 if (
nullptr !=
mNode)
175 void EditText::checkVertexSize()
187 unsigned int EditText::getMixedNativeAlpha(
float secondAlpha)
const
214 if (
nullptr !=
mNode)
233 if (
nullptr !=
mNode)
241 if (
mFont !=
nullptr)
268 if (
nullptr !=
mNode)
282 if (
nullptr !=
mNode)
329 if (
nullptr !=
mNode)
344 if (
nullptr !=
mNode)
359 if (
nullptr !=
mNode)
374 if (
nullptr !=
mNode)
382 if (
nullptr !=
mNode)
421 if (
nullptr !=
mNode)
432 if (
nullptr ==
mFont)
448 if (
nullptr ==
mFont)
468 if (
nullptr !=
mNode)
477 if (
nullptr !=
mNode)
483 if (
nullptr ==
mFont)
542 for (VectorCharInfo::const_iterator
sim =
line->symbols.begin();
sim !=
line->symbols.end(); ++
sim)
546 colour =
sim->getColour() | (colour & 0xFF000000);
612 if (
nullptr !=
mNode)
633 if (
nullptr !=
mNode)
644 if (
nullptr !=
mNode)
653 void EditText::drawQuad(
707 void EditText::drawGlyph(
708 const RenderTargetInfo& _renderTargetInfo,
710 size_t& _vertexCount,
721 _textureRect.left += _textureRect.width() * leftClip / _vertexRect.width();
722 _vertexRect.left += leftClip;
732 if (rightClip > 0.0f)
736 _textureRect.right -= _textureRect.width() * rightClip / _vertexRect.width();
737 _vertexRect.right -= rightClip;
751 _textureRect.top += _textureRect.height() * topClip / _vertexRect.height();
752 _vertexRect.top += topClip;
762 if (bottomClip > 0.0f)
766 _textureRect.bottom -= _textureRect.height() * bottomClip / _vertexRect.height();
767 _vertexRect.bottom -= bottomClip;
779 ((_renderTargetInfo.pixScaleX * pix_left + _renderTargetInfo.hOffset) * 2.0f) - 1.0f,
780 -(((_renderTargetInfo.pixScaleY * pix_top + _renderTargetInfo.vOffset) * 2.0f) - 1.0f),
781 ((_renderTargetInfo.pixScaleX * (pix_left + _vertexRect.width()) + _renderTargetInfo.hOffset) * 2.0f) - 1.0f,
782 -(((_renderTargetInfo.pixScaleY * (pix_top + _vertexRect.height()) + _renderTargetInfo.vOffset) * 2.0f) - 1.0f));
784 drawQuad(_vertex, _vertexCount, vertexRect,
mNode->
getNodeDepth(), _textureRect, _colour);
#define MYGUI_ASSERT(exp, dest)
void setTextColour(const Colour &_value) override
VertexColourType mVertexFormat
size_t getTextSelectionEnd() const override
void setFontName(const std::string &_value) override
void setAlpha(float _value) override
uint32 mCurrentColourNative
void setSelectBackground(bool _normal) override
void setTextSelection(size_t _start, size_t _end) override
void setWordWrap(bool _value) override
void _setAlign(const IntSize &_oldsize) override
bool isVisibleCursor() const override
bool getShadow() const override
IntCoord getCursorCoord(size_t _position) const override
void _correctView() override
virtual const VectorLineInfo & getLineInfo() const
void setInvertSelected(bool _value) override
const Colour & getTextColour() const override
void setFontHeight(int _value) override
void setVisible(bool _value) override
uint32 mInverseColourNative
const Colour & getShadowColour() const override
void setShadowColour(const Colour &_value) override
const UString & getCaption() const override
bool getInvertSelected() const override
void setCaption(const UString &_value) override
void setTextAlign(Align _value) override
void setStateData(IStateInfo *_data) override
int getFontHeight() const override
size_t getTextSelectionStart() const override
IntPoint getViewOffset() const override
void setVisibleCursor(bool _value) override
bool getSelectBackground() const override
IntSize getTextSize() const override
const std::string & getFontName() const override
size_t getCursorPosition() const override
void setViewOffset(const IntPoint &_point) override
Align getTextAlign() const override
void _updateView() override
uint32 mShadowColourNative
UString::utf32string mUtf32Caption
void createDrawItem(ITexture *_texture, ILayerNode *_node) override
void setCursorPosition(size_t _index) override
void setShiftText(bool _shift) override
void setShadow(bool _value) override
void updateRawData() const
void destroyDrawItem() override
const Colour & getColour() const
static FontManager & getInstance()
int getAbsoluteLeft() const
const IntPoint & getAbsolutePosition() const
bool _checkOutside() const
ICroppedRectangle * mCroppedParent
int getAbsoluteTop() const
int _getViewWidth() const
int _getViewHeight() const
virtual ITexture * getTextureFont() const =0
virtual int getDefaultHeight() const =0
virtual const GlyphInfo * getGlyphInfo(Char _id) const =0
virtual float getNodeDepth() const =0
virtual void outOfDate(RenderItem *_item)=0
virtual RenderItem * addToRenderItem(ITexture *_texture, bool _firstQueue, bool _separate)=0
virtual const RenderTargetInfo & getInfo() const =0
const std::string & getResourceName() const
void addDrawItem(ISubWidget *_item, size_t _count)
bool getCurrentUpdate() const
IRenderTarget * getRenderTarget()
void reallockDrawItem(ISubWidget *_item, size_t _count)
void removeDrawItem(ISubWidget *_item)
Vertex * getCurrentVertexBuffer() const
void setLastVertexCount(size_t _count)
static RenderManager & getInstance()
size_t getCursorPosition(const IntPoint &_value) const
IntPoint getCursorPoint(size_t _position) const
void update(const UString::utf32string &_text, IFont *_font, int _height, Align _align, VertexColourType _format, int _maxWidth=-1)
const VectorLineInfo & getData() const
const IntSize & getViewSize() const
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
const utf32string & asUTF32() const
returns the current string in UTF-32 form within a utf32string
uint32 toNativeColour(const Colour &_colour, VertexColourType _format)
Convert Colour to 32-bit representation.
types::TCoord< int > IntCoord
const size_t SIMPLETEXT_COUNT_VERTEX
std::vector< LineInfo > VectorLineInfo
types::TRect< float > FloatRect
TPoint< T > point() const