Inheritance diagram for gcp::Text:
Public Member Functions | |
xmlNodePtr | Save (xmlDocPtr xml) |
bool | Load (xmlNodePtr) |
void | Add (GtkWidget *w) |
void | Update (GtkWidget *w) |
void | SetSelected (GtkWidget *w, int state) |
void | Transform2D (Matrix2D &m, double x, double y) |
void | GetSize (double &x, double &y) |
double | GetYAlign () |
void | SetText (char const *text) |
Definition at line 35 of file text.h.
xmlNodePtr gcp::Text::Save | ( | xmlDocPtr | xml | ) | [virtual] |
xml,: | the xmlDoc used to save the document. |
Reimplemented from gcu::Object.
bool gcp::Text::Load | ( | xmlNodePtr | node | ) | [virtual] |
node,: | a pointer to the xmlNode containing the serialized object. |
Example:
std::string str = (const char*)node->name; Object* pObject = Object::CreateObject(str, this); if (pObject) { if (!pObject->Load(node)) delete Object; } else cerr << "Warning: unknown object: " << str << endl;
Reimplemented from gcp::TextObject.
void gcp::Text::Add | ( | GtkWidget * | w | ) | [virtual] |
w,: | the GtkWidget inside which the Object will be displayed. |
Reimplemented from gcu::Object.
void gcp::Text::Update | ( | GtkWidget * | w | ) | [virtual] |
w,: | the GtkWidget inside which the Object is displayed. |
Reimplemented from gcu::Object.
void gcp::Text::SetSelected | ( | GtkWidget * | w, | |
int | state | |||
) | [virtual] |
w,: | the GtkWidget inside which the Object is displayed. | |
state,: | the selection state of the Object. |
Reimplemented from gcu::Object.
void gcp::Text::Transform2D | ( | Matrix2D & | m, | |
double | x, | |||
double | y | |||
) | [virtual] |
m,: | the 2D Matrix of the transformation. | |
x,: | the x component of the center of the transformation. | |
y,: | the y component of the center of the transformation. |
Reimplemented from gcu::Object.
double gcp::Text::GetYAlign | ( | ) | [virtual] |
Used to retreive the y coordinate for alignment. The default implementation returns 0.0 and every derived class for which alignment has a meaning should implement this method.
Reimplemented from gcu::Object.