Scheme_Object* spark_fltk_group::fl_group(int argc, Scheme_Object** argv) { DEFAULT_RET_INIT; int x = 0; int y = 0; int w = 0; int h = 0; spark::Utils::int_from_scheme_long(argv[0], x); spark::Utils::int_from_scheme_long(argv[1], y); spark::Utils::int_from_scheme_long(argv[2], w); spark::Utils::int_from_scheme_long(argv[3], h); std::string title; if (argv[4] != scheme_null) { Scheme_Object* str = scheme_char_string_to_byte_string(argv[4]); title = SCHEME_BYTE_STR_VAL(str); } Fl_Group* group = new Fl_Group(x, y, w, h); if (title.length() > 0) group->copy_label(title.c_str()); Fltk_tag t = FL_WIDGET_TAG; spark_fltk::Widget* widget = new spark_fltk::Widget; group->argument(reinterpret_cast<long>(widget)); { Scheme_Object* tag = 0; MZ_GC_DECL_REG(1); MZ_GC_VAR_IN_REG(0, tag); MZ_GC_REG(); tag = scheme_make_integer(t); MZ_GC_UNREG(); _ret_ = scheme_make_cptr(group, tag); } DEFAULT_RET_FINISH; }
Fl_Group* TabScreen::MakeTab( const string& title ) { int rx, ry, rw, rh; m_MenuTabs->client_area( rx, ry, rw, rh, TAB_H ); Fl_Group* grp = new Fl_Group( rx, ry, rw, rh ); grp->copy_label( title.c_str() ); grp->selection_color( FL_GRAY ); grp->labelfont( 1 ); grp->labelcolor( FL_BLACK ); grp->hide(); m_TabGroupVec.push_back( grp ); return grp; }