22 #include "precompiled.h"
36 std::vector<SGUIText*>::iterator it;
58 if (Message.
value ==
"size" || Message.
value ==
"z" ||
59 Message.
value ==
"absolute" || Message.
value ==
"caption" ||
60 Message.
value ==
"font" || Message.
value ==
"textcolor" ||
61 Message.
value ==
"buffer_zone")
91 debug_warn(L
"Trying to draw a Text Index within a IGUITextOwner that doesn't exist");
108 TextPos.
x = ObjSize.
left;
113 TextPos.
y = ObjSize.
top;
123 debug_warn(L
"Broken EVAlign in CButton::SetupText()");
virtual void SetupText()=0
Setup texts.
CPos CenterPoint() const
Get Position equivalent to the center of the rectangle.
virtual void UpdateCachedSize()
float left
Returning CPos representing each corner.
static PSRETURN GetSetting(const IGUIObject *pObject, const CStr &Setting, T &Value)
Retrieves a setting by name from object pointer.
virtual bool MouseOverIcon()
Test if mouse position is over an icon.
void CalculateTextPosition(CRect &ObjSize, CPos &TextPos, SGUIText &Text)
Calculate the position for the text, based on the alignment.
virtual void UpdateCachedSize()
All sizes are relative to resolution, and the calculation is not wanted in real time, therefore it is cached, update the cached size with this function.
CSize m_Size
Width and height of the whole output, used when setting up scrollbars and such.
virtual void HandleMessage(SGUIMessage &Message)
Made to represent screen positions and delta values.
virtual void DrawText(int index, const CColor &color, const CPos &pos, float z, const CRect &clipping=CRect())
Draws the Text.
void DrawText(SGUIText &Text, const CColor &DefaultColor, const CPos &pos, const float &z, const CRect &clipping)
Draw a SGUIText object.
#define debug_warn(expr)
display the error dialog with the given text.
std::vector< SGUIText * > m_GeneratedTexts
Texts that are generated and ready to be rendered.
Message send to IGUIObject::HandleMessage() in order to give life to Objects manually with a derived ...
EGUIMessageType type
Describes what the message regards.
void AddText(SGUIText *text)
Adds a text object.
bool m_GeneratedTextsValid
Whether the cached text is currently valid (if not then SetupText will be called by Draw) ...
An SGUIText object is a parsed string, divided into text-rendering components.
Rectangle class used for screen rectangles.