int main ( int argc, char **argv ) { { Fl_Single_Window *w = new Fl_Single_Window( 800, 600 ); { Fl_Choice *o = new Fl_Choice( 0, 0, 200, 24, "Boxtype" ); o->align( FL_ALIGN_RIGHT ); o->callback( boxtype_cb, NULL ); o->add( "UP_BOX" ); o->add( "FLAT_BOX" ); o->add( "ROUNDED_BOX" ); o->add( "OVAL_BOX" ); } { Fl_Scalepack *o = new Fl_Scalepack( 0, 24, 800, 600 - 24 ); o->type( 0 ); { PerfTest *o = new PerfTest( 0,0, 800, 400, "Xlib" ); } { PerfTest *o = new PerfTest( 0,0, 800, 400, "Cairo" ); o->use_cairo = true; } o->end(); } w->end(); w->show(); } /* { */ /* Fl_Single_Window *w = new Fl_Single_Window( 800, 600 ); */ /* PerfTest *o = new PerfTest( 0,0, 800, 600 ); */ /* w->end(); */ /* w->show(); */ /* } */ Fl::run(); }
JACK_Module::JACK_Module ( bool log ) : Module ( 25, 25, name() ) { _prefix = 0; _connection_handle_outputs[0][0] = 0; _connection_handle_outputs[0][1] = 0; _connection_handle_outputs[1][0] = 0; _connection_handle_outputs[1][1] = 0; align( FL_ALIGN_TOP | FL_ALIGN_INSIDE ); if ( log ) { /* FIXME: how do Controls find out that a connected value has changed? How does this work in ladspa? */ { Port p( this, Port::INPUT, Port::CONTROL, "Inputs" ); p.hints.type = Port::Hints::INTEGER; p.hints.minimum = 0; p.hints.maximum = 16; p.hints.ranged = true; p.hints.visible = false; p.connect_to( new float ); p.control_value_no_callback( 0 ); add_port( p ); } { Port p( this, Port::INPUT, Port::CONTROL, "Outputs" ); p.hints.type = Port::Hints::INTEGER; p.hints.minimum = 0; p.hints.maximum = 16; p.hints.ranged = true; p.hints.visible = false; p.connect_to( new float ); p.control_value_no_callback( 0 ); add_port( p ); } color( FL_DARK1 ); log_create(); } { Fl_Scalepack *o = new Fl_Scalepack( x() + Fl::box_dx(box()), y() + Fl::box_dy(box()), w() - Fl::box_dw(box()), h() - Fl::box_dh(box()) ); o->type( Fl_Pack::VERTICAL ); o->spacing(0); { Fl_Scalepack *o = new Fl_Scalepack( x() + Fl::box_dx(box()), y() + Fl::box_dy(box()), w(), 24 - Fl::box_dh(box()) ); o->type( Fl_Pack::HORIZONTAL ); o->spacing( 0 ); { Fl_Box *o = input_connection_handle = new Fl_Box( x(), y(), 18, 18 ); o->tooltip( "Drag and drop to make and break JACK connections."); o->hide(); o->image( input_connector_image ? input_connector_image : input_connector_image = new Fl_PNG_Image( "input_connector", img_io_input_connector_10x10_png, img_io_input_connector_10x10_png_len ) ); } { Fl_Box *o = new Fl_Box( x() + 10, y(), w() - 20, h() ); Fl_Group::current()->resizable(o); } { Fl_Button *o = dec_button = new Fl_Button( 0, 0, 12, h(), "-" ); o->callback( cb_button, this ); o->labelsize(10); o->labelfont( FL_HELVETICA_BOLD ); o->hide(); } { Fl_Button *o = inc_button = new Fl_Button( 0,0, 12, h(), "+" ); o->labelsize(10); o->labelfont( FL_HELVETICA_BOLD ); o->callback( cb_button, this ); o->hide(); } { Fl_Box *o = output_connection_handle = new Fl_Box( x(), y(), 12, 12 ); o->tooltip( "Drag and drop to make and break JACK connections."); o->image( output_connector_image ? output_connector_image : output_connector_image = new Fl_PNG_Image( "output_connector", img_io_output_connector_10x10_png, img_io_output_connector_10x10_png_len ) ); o->hide(); } { Fl_Box *o = output_connection2_handle = new Fl_Box( x(), y(), 12, 12 ); o->tooltip( "Drag and drop to make and break JACK connections."); o->image( output_connector_image ? output_connector_image : output_connector_image = new Fl_PNG_Image( "output_connector", img_io_output_connector_10x10_png, img_io_output_connector_10x10_png_len ) ); o->hide(); } o->end(); } { Fl_Browser *o = connection_display = new Fl_Browser( 0, 0, w(), h() ); o->has_scrollbar(Fl_Browser_::VERTICAL); o->textsize( 10 ); o->textcolor( FL_LIGHT3 ); o->textfont( FL_COURIER ); o->box( FL_FLAT_BOX ); o->color( FL_DARK1 ); // o->color( fl_color_add_alpha( fl_rgb_color( 10, 10, 10 ), 100 )); Fl_Group::current()->resizable(o); } o->end(); resizable(o); } end(); }