void Window::show(void) { image(Fl::scheme_bg_); if(Fl::scheme_bg_) { labeltype(FL_NORMAL_LABEL); align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP); } else { labeltype(FL_NO_LABEL); } Fl_Tooltip::exit(this); if(!shown()) { // Don't set background pixel for double-buffered windows... int background_pixel = -1; if(type() == FL_WINDOW && ((box() == 1) || ((box() & 2) && (box() <= 15)))) { background_pixel = int(fl_xpixel(color())); } window_xid_create(this, set_titlebar_icon, background_pixel); } else { XMapRaised(fl_display, fl_xid(this)); } }
void Flu_Button :: down_image( Fl_Image *i ) { if( downImg ) delete downImg; downImg = NULL; if( i ) { if( labeltype() != FL_NORMAL_LABEL ) labeltype( FL_NORMAL_LABEL ); downImg = i->copy(); } }
void Flu_Button :: image( Fl_Image *i ) { if( inactiveImg ) delete inactiveImg; inactiveImg = NULL; if( i ) { if( labeltype() != FL_NORMAL_LABEL ) labeltype( FL_NORMAL_LABEL ); Fl_Button::image( i ); inactiveImg = Fl_Button::image()->copy(); inactiveImg->desaturate(); Fl_Button::deimage( inactiveImg ); } }
void Module::init ( void ) { /* we use pointers to these vector elements for port auto connection stuff and need to prevent reallocation from invalidating them. */ audio_input.reserve(16); audio_output.reserve(16); control_input.reserve(16); control_output.reserve(16); aux_audio_input.reserve(16); aux_audio_output.reserve(16); // _latency = 0; _is_default = false; _editor = 0; _chain = 0; _instances = 1; _bypass = 0; box( FL_UP_BOX ); labeltype( FL_NO_LABEL ); align( FL_ALIGN_CENTER | FL_ALIGN_INSIDE ); set_visible_focus(); selection_color( FL_YELLOW ); labelsize(12); color( fl_rgb_color( 122,190,200 ) ); tooltip(); }
Fl_DeviceGUI::Fl_DeviceGUI(const DeviceGUIInfo& Info, SpiralGUIType *PW, Fl_Pixmap *Icon, bool Terminal) : Fl_Group (Info.XPos, Info.YPos, Info.Width+(PortGroupWidth*2), Info.Height+TitleBarHeight, ""), m_PluginWindow (NULL), m_Icon (NULL), m_Name (Info.Name), m_ID (-1), m_DelMe (false), m_IsTerminal (Terminal), m_Minimised (true) { for (int n=0; n<512; n++) Numbers[n]=n; type(1); box((Fl_Boxtype)SpiralInfo::GUIDEVICE_Box); labeltype(FL_ENGRAVED_LABEL); align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); color(SpiralInfo::GUICOL_Device); m_Icon=Icon; m_MiniWidth=w(); m_MiniHeight=h(); m_DragBar = new Fl_DragBar(Info.XPos, Info.YPos, Info.Width+PortGroupWidth*2, TitleBarHeight, m_Name.c_str()); m_DragBar->labelsize(10); m_DragBar->type(Fl_DragBar::FLDRAG); m_DragBar->color(SpiralInfo::GUICOL_Device); m_Menu = new Fl_Menu_Button(x(),y(),w(),h(),""); m_Menu->type(Fl_Menu_Button::POPUP3); m_Menu->textsize(8); m_Menu->add("rename", 0, (Fl_Callback*)cb_Rename,this); m_Menu->add("delete", 0, (Fl_Callback*)cb_Delete,this); int Centx=x()+w()/2; int Centy=y()+h()/2; if (m_Icon) { m_IconButton = new Fl_Button(Centx-m_Icon->w()/2,Centy-m_Icon->h()/2,m_Icon->w(),m_Icon->h()); m_IconButton->box(FL_NO_BOX); m_IconButton->image(m_Icon); } else { m_IconButton = NULL; } m_PluginWindow = PW; if (m_PluginWindow) { m_PluginWindow->hide(); add (m_PluginWindow); m_PluginWindow->SetResizeCallback (&cb_Resize, this); } resizable(NULL); //Add the input/output ports Setup(Info, true); }
void Module::init ( void ) { _is_default = false; _editor = 0; _chain = 0; _instances = 1; _bypass = 0; box( FL_UP_BOX ); labeltype( FL_NO_LABEL ); set_visible_focus(); selection_color( FL_RED ); }
void Track::init ( void ) { _row = 0; _sequence = NULL; _name = NULL; _selected = false; _size = 1; record_ds = NULL; playback_ds = NULL; labeltype( FL_NO_LABEL ); // clear_visible_focus(); Fl_Group::size( timeline->w(), height() ); Track *o = this; o->box( FL_FLAT_BOX ); { Track_Header *o = new Track_Header( x(), y(), w(), h() ); name_field = o->name_input; record_button = o->rec_button; mute_button = o->mute_button; solo_button = o->solo_button; menu_button = o->menu_button; show_all_takes_button = o->show_all_takes_button; overlay_controls_button = o->overlay_controls_button; name_field->callback( cb_button, this ); record_button->callback( cb_button, this ); mute_button->callback( cb_button, this ); solo_button->callback( cb_button, this ); show_all_takes_button->callback( cb_button, this ); overlay_controls_button->callback( cb_button, this ); menu_button->callback( cb_button, this ); resizable( o ); // o->color( (Fl_Color)53 ); } { /* this pack holds the active sequence, annotation sequence, control sequences and takes */ Fl_Pack *o = pack = new Fl_Pack( x(), y(), w(), h() ); o->type( Fl_Pack::VERTICAL ); o->labeltype( FL_NO_LABEL ); /* o->resize( x() + width(), y(), w() - width(), h() ); */ /* resizable( o ); */ { Fl_Pack *o = annotation = new Fl_Pack( 0, 0, pack->w(), 1 ); o->type( Fl_Pack::VERTICAL ); o->end(); } { { Fl_Group *o = controls_heading = new Fl_Group( 0, 0, pack->w(), 10 ); o->box( FL_FLAT_BOX ); o->color( fl_color_add_alpha( fl_rgb_color( 1,1,1 ), 127 ) ); { Fl_Box *o = new Fl_Box( 0,0, Track::width(), 10 ); o->label( "Controls" ); o->align( FL_ALIGN_RIGHT | FL_ALIGN_INSIDE ); o->labelsize( 10 ); } o->hide(); o->end(); o->resizable( 0 ); } { Fl_Sometimes_Pack *o = control = new Fl_Sometimes_Pack( 0, 0, pack->w(), 1 ); o->spacing( 1 ); o->box( FL_NO_BOX ); o->color( FL_BACKGROUND_COLOR ); o->type( Fl_Pack::VERTICAL ); o->pack( true ); o->hide(); o->align( FL_ALIGN_TOP | FL_ALIGN_LEFT ); o->end(); } } { { Fl_Group *o = takes_heading = new Fl_Group( 0, 0, pack->w(), 10 ); o->box( FL_FLAT_BOX ); o->color( fl_color_add_alpha( fl_rgb_color( 1,1,1 ), 127 ) ); { Fl_Box *o = new Fl_Box( 0,0, Track::width(), 10 ); o->label( "Takes" ); o->align( FL_ALIGN_RIGHT | FL_ALIGN_INSIDE ); o->labelsize( 10 ); } o->hide(); o->end(); o->resizable( 0 ); } { Fl_Pack *o = takes = new Fl_Pack( 0, 0, pack->w(), 1 ); o->type( Fl_Pack::VERTICAL ); o->end(); o->hide(); o->align( FL_ALIGN_TOP | FL_ALIGN_LEFT ); } } o->end(); } end(); }