Пример #1
0
void GLabel::setLabel(string str) {
    this->str = str;
    pp->setLabel(this, str);
    GDimension size = pp->getGLabelSize(this);
    width = size.getWidth();
    height = size.getHeight();
}
Пример #2
0
void GLabel::setLabel(const std::string& str) {
    this->str = str;
    stanfordcpplib::getPlatform()->glabel_setLabel(this, str);
    GDimension size = stanfordcpplib::getPlatform()->glabel_getSize(this);
    width = size.getWidth();
    height = size.getHeight();
}
Пример #3
0
void GLabel::setFont(const std::string& font) {
    this->font = font;
    stanfordcpplib::getPlatform()->glabel_setFont(this, font);
    GDimension size = stanfordcpplib::getPlatform()->glabel_getSize(this);
    width = size.getWidth();
    height = size.getHeight();
    ascent = stanfordcpplib::getPlatform()->glabel_getFontAscent(this);
    descent = stanfordcpplib::getPlatform()->glabel_getFontDescent(this);
}
Пример #4
0
void GLabel::setFont(string font) {
    this->font = font;
    pp->setFont(this, font);
    GDimension size = pp->getGLabelSize(this);
    width = size.getWidth();
    height = size.getHeight();
    ascent = pp->getFontAscent(this);
    descent = pp->getFontDescent(this);
}
Пример #5
0
void GLabel::createGLabel(const std::string& str) {
    this->str = str;
    stanfordcpplib::getPlatform()->glabel_constructor(this, str);
    setFont(DEFAULT_GLABEL_FONT);
    GDimension size = stanfordcpplib::getPlatform()->glabel_getSize(this);
    width = size.getWidth();
    height = size.getHeight();
    ascent = stanfordcpplib::getPlatform()->glabel_getFontAscent(this);
    descent = stanfordcpplib::getPlatform()->glabel_getFontDescent(this);
}
Пример #6
0
void GLabel::create(const string & str) {
    this->str = str;
    pp->createGLabel(this, str);
    setFont(DEFAULT_GLABEL_FONT);
    GDimension size = pp->getGLabelSize(this);
    width = size.getWidth();
    height = size.getHeight();
    ascent = pp->getFontAscent(this);
    descent = pp->getFontDescent(this);
}
Пример #7
0
void GImage::createGImage(const std::string& filename) {
    this->filename = filename;
    GDimension size = stanfordcpplib::getPlatform()->gimage_constructor(this, filename);
    width = size.getWidth();
    height = size.getHeight();
}
Пример #8
0
void GOval::setSize(const GDimension& size) {
    setSize(size.getWidth(), size.getHeight());
}
Пример #9
0
void GImage::create(string filename) {
    this->filename = filename;
    GDimension size = pp->createGImage(this, filename);
    width = size.getWidth();
    height = size.getHeight();
}
Пример #10
0
GRectangle GInteractor::getBounds() const {
    GDimension size = getPlatform()->ginteractor_getSize((GObject *) this);
    return GRectangle(x, y, size.getWidth(), size.getHeight());
}
Пример #11
0
void GInteractor::setSize(const GDimension& size) {
    setSize(size.getWidth(), size.getHeight());
}