void GLabel::setLabel(string str) { this->str = str; pp->setLabel(this, str); GDimension size = pp->getGLabelSize(this); width = size.getWidth(); height = size.getHeight(); }
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(); }
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); }
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); }
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); }
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); }
void GImage::createGImage(const std::string& filename) { this->filename = filename; GDimension size = stanfordcpplib::getPlatform()->gimage_constructor(this, filename); width = size.getWidth(); height = size.getHeight(); }
void GOval::setSize(const GDimension& size) { setSize(size.getWidth(), size.getHeight()); }
void GImage::create(string filename) { this->filename = filename; GDimension size = pp->createGImage(this, filename); width = size.getWidth(); height = size.getHeight(); }
GRectangle GInteractor::getBounds() const { GDimension size = getPlatform()->ginteractor_getSize((GObject *) this); return GRectangle(x, y, size.getWidth(), size.getHeight()); }
void GInteractor::setSize(const GDimension& size) { setSize(size.getWidth(), size.getHeight()); }