当前位置: 首页>>代码示例>>C++>>正文


C++ Fl_Box::labelsize方法代码示例

本文整理汇总了C++中Fl_Box::labelsize方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Box::labelsize方法的具体用法?C++ Fl_Box::labelsize怎么用?C++ Fl_Box::labelsize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fl_Box的用法示例。


在下文中一共展示了Fl_Box::labelsize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

    //constructeur
    Fl_Progress_Window()  : Fl_Window(238,105,"Progression...")
    {
        // Progress 1 Label
        Fl_Box *label = new Fl_Box(10,10,215,15,"Pourcentage Général:");
        label->labelsize(12);
        label->labelfont(1);
        label->labelcolor((Fl_Color)136);
        label->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);

        //Progress1
        progress1 = new Fl_Progress(10,28,215,20,"0%");
        progress1->selection_color((Fl_Color)175);
        progress1->maximum(100);
        progress1->minimum(0);
        progress1->labelsize(12);

        // Progress filename (label progress 2)
        progress_filename = new Fl_Box(10,52,215,15, "Fichier:");
        progress_filename->labelsize(12);
        progress_filename->labelfont(1);
        progress_filename->labelcolor((Fl_Color)136);
        progress_filename->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);

        // Progress 2
        progress2 = new Fl_Progress(10,70,215,20,"0%");
        progress2->maximum(100);
        progress2->minimum(0);
        progress2->labelsize(12);
        progress2->selection_color((Fl_Color)175);

        //fin du window...
        this->set_modal();
        this->end();
    }
开发者ID:Asher256,项目名称:ultrasplitter,代码行数:35,代码来源:usplit.cpp

示例2: make_window

Fl_Group* SUBnoteharmonic::make_window() {
  { harmonic = new Fl_Group(0, 0, 90, 225);
    harmonic->box(FL_FLAT_BOX);
    harmonic->color(FL_BACKGROUND_COLOR);
    harmonic->selection_color(FL_BACKGROUND_COLOR);
    harmonic->labeltype(FL_NO_LABEL);
    harmonic->labelfont(0);
    harmonic->labelsize(14);
    harmonic->labelcolor(FL_FOREGROUND_COLOR);
    harmonic->user_data((void*)(this));
    harmonic->align(FL_ALIGN_TOP);
    harmonic->when(FL_WHEN_RELEASE);
    { Fl_Slider* o = mag = new Fl_Slider(0, 15, 10, 115);
      mag->tooltip("harmonic\'s magnitude");
      mag->type(4);
      mag->box(FL_FLAT_BOX);
      mag->selection_color((Fl_Color)222);
      mag->maximum(127);
      mag->step(1);
      mag->value(127);
      mag->callback((Fl_Callback*)cb_mag);
      o->value(127-pars->Phmag[n]);
      if (pars->Phmag[n]==0) o->selection_color(0);
    } // Fl_Slider* mag
    { Fl_Slider* o = bw = new Fl_Slider(0, 135, 10, 75);
      bw->tooltip("harmonic\'s bandwidth");
      bw->type(4);
      bw->box(FL_FLAT_BOX);
      bw->selection_color((Fl_Color)222);
      bw->maximum(127);
      bw->step(1);
      bw->value(64);
      bw->callback((Fl_Callback*)cb_bw);
      o->value(127-pars->Phrelbw[n]);
    } // Fl_Slider* bw
    { Fl_Box* o = new Fl_Box(10, 170, 5, 5);
      o->box(FL_FLAT_BOX);
      o->color(FL_DARK2);
      if (n+1==MAX_SUB_HARMONICS) o->hide();
    } // Fl_Box* o
    { Fl_Box* o = new Fl_Box(0, 210, 10, 15, "01");
      o->labelfont(1);
      o->labelsize(9);
      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
      char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));
    } // Fl_Box* o
    { Fl_Box* o = new Fl_Box(0, 0, 10, 15, "01");
      o->labelfont(1);
      o->labelsize(9);
      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
      char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));
    } // Fl_Box* o
    harmonic->end();
  } // Fl_Group* harmonic
  return harmonic;
}
开发者ID:ishkabbible,项目名称:ZASF,代码行数:56,代码来源:SUBnoteUI.c

示例3:

	Fl_new_adjuster(int X, int Y, int W, int H, const char* L=0)
		:Fl_Adjuster(X,Y,W/2,H, L)
		,b(FL_DOWN_BOX, X+W/2,Y, W/2,H,buf2)
	{
		if(b.h()<=20 && b.labelsize()>11)
			b.labelsize(11);

		align(FL_ALIGN_LEFT);
		step(1);
		value_damage();
	}
开发者ID:VitorRetamal,项目名称:papercrop,代码行数:11,代码来源:FlLayout.cpp

示例4: Init

void ModelerApplication::Init(ModelerViewCreator_f createView, 
                              const ModelerControl controls[], unsigned numControls)
{
    int i;

	m_animating   = false;
	m_numControls = numControls;

    // ********************************************************
    // Create the FLTK user interface
    // ********************************************************
    
    m_ui = new ModelerUserInterface();
    
    // Store pointers to the controls for manipulation
    m_controlLabelBoxes   = new Fl_Box*[numControls];
    m_controlValueSliders = new Fl_Value_Slider*[numControls];
    
    // Constants for user interface setup
    const int textHeight    = 20;
    const int sliderHeight  = 20;
    const int packWidth     = m_ui->m_controlsPack->w();

	m_ui->m_controlsPack->begin();
    // For each control, add appropriate objects to the user interface
    for (i=0; i<m_numControls; i++)
    {
        // Add the entry to the selection box
        m_ui->m_controlsBrowser->add(controls[i].m_name);

        // Add the label (but make it invisible for now)
        Fl_Box *box = new Fl_Box(0, 0, packWidth, textHeight, controls[i].m_name);
		box->labelsize(10);
		box->hide();
		box->box(FL_FLAT_BOX); // otherwise, Fl_Scroll messes up (ehsu)
        m_controlLabelBoxes[i] = box;

        // Add the slider (but make it invisible for now)
        Fl_Value_Slider *slider = new Fl_Value_Slider(0, 0, packWidth, sliderHeight,0);
        slider->type(1);
        slider->range(controls[i].m_minimum, controls[i].m_maximum);
        slider->step(controls[i].m_stepsize);
        slider->value(controls[i].m_value);
        slider->hide(); 
        m_controlValueSliders[i] = slider;
        slider->callback((Fl_Callback*)ModelerApplication::SliderCallback);
    }
    m_ui->m_controlsPack->end();

	// Make sure that we remove the view from the
	// Fl_Group, otherwise, it'll blow up 
	// THIS BUG FIXED 04-18-01 ehsu
	m_ui->m_modelerWindow->remove(*(m_ui->m_modelerView));
	delete m_ui->m_modelerView;

	m_ui->m_modelerWindow->begin();
	m_ui->m_modelerView = createView(0, 0, m_ui->m_modelerWindow->w(), m_ui->m_modelerWindow->h() ,NULL);
	Fl_Group::current()->resizable(m_ui->m_modelerView);
	m_ui->m_modelerWindow->end();
}
开发者ID:COMP4411-Project-Group,项目名称:Modeller,代码行数:60,代码来源:modelerapp.cpp

示例5: main

int main(int argc, char **argv) {
  Fl_Window *window = new Fl_Window(300,180);
  Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!");
  box->labelfont(FL_BOLD+FL_ITALIC);
  box->labelsize(36);
  box->labeltype(FL_SHADOW_LABEL);
  window->end();
  window->show(argc, argv);
  return Fl::run();
}
开发者ID:tasosbull,项目名称:yewtic,代码行数:10,代码来源:main.cpp

示例6: main

int main(int argc, char *argv[]) {
    	Fl_Window *window = new Fl_Window (800,700,"TETRIS");
	window->color(56);
	Board *b = new Board();
	Fl_Box *scorebox = new Fl_Box(tilesize*xmaxtiles+10,50,300,200,"Score: 0\0");
	scorebox->box(FL_UP_BOX);
	scorebox->labelfont(FL_BOLD+FL_ITALIC);
    scorebox->labelsize(36);
    scorebox->labeltype(FL_ENGRAVED_LABEL);
	b->setScoreBox(&scorebox); 
	Fl_Box *exi = new Fl_Box(tilesize*2,ymaxtiles*15,300,200,"Press Escape to Exit");
	exi->box(FL_UP_BOX);
	exi->labelfont(FL_BOLD+FL_ITALIC);
	exi->labelsize(36);
	exi->labeltype(FL_ENGRAVED_LABEL);
	window->end(); 
   	window->show();
   	
	Fl::add_timeout(0.1, timeractions,b);
    	return(Fl::run());
}
开发者ID:vaibhavb007,项目名称:advanced_graphics,代码行数:21,代码来源:tetris.cpp

示例7: main

int main(int argc, char **argv) {
  Fl_Window *window = new Fl_Window(340,180,"世界へようこそ!");
  Fl_Box *box = new Fl_Box(20,40,300,100,"ようこそ、世界!"); 
  Fl::set_font(FL_HELVETICA, "Kochi Mincho");

  window->begin();

  // Fl_Widget(x, y, width, height, label)

  //box->box(FL_UP_BOX);
  box->box(FL_NO_BOX);
  box->labelsize(36);
  box->labeltype(FL_SHADOW_LABEL);

  window->end();
  window->show(argc, argv);

  return Fl::run();
}
开发者ID:tiborh,项目名称:cplusplus,代码行数:19,代码来源:hello_jp.cpp

示例8: addControl

void ModelerUI::addControl(const char* szName, float fMin, float fMax, float fStepSize, float fInitVal) 
{
	Fl_Group* pgrpCurrBak = Fl_Group::current();
	Fl_Group::current(m_ppckPack);
	
	const int k_iTextHeight = 20;
	const int k_iSliderHeight = 20;

	// Setup the label box
	Fl_Box* box = new Fl_Box(0, 0, m_ppckPack->w(), k_iTextHeight, szName);
	box->labelsize(10);
	box->hide();
	box->box(FL_FLAT_BOX); // otherwise, Fl_Scroll messes up (ehsu)
		
	// Setup the slider
	Fl_Value_Slider *slider = new Fl_Value_Slider(0, 0, m_ppckPack->w(), k_iSliderHeight, 0);
	slider->type(1);
	slider->hide();
	slider->user_data(this);
	slider->callback(cb_sliders);
	slider->range(fMin, fMax);
	slider->step(fStepSize);
	slider->value(fInitVal);

	Fl_Group::current(pgrpCurrBak);

	// Add this entry to the browser
	string strName = "@C0"; // FLTK color encoding, we'll use @[email protected]
	strName += szName;
	m_pbrsBrowser->add(strName.c_str());
	
	// Setup the curve
	m_pwndGraphWidget->addCurve(fInitVal, fMin, fMax);

	++m_iCurrControlCount;
}
开发者ID:johnmave126,项目名称:Animator,代码行数:36,代码来源:modelerui.cpp

示例9: pickGroupProperty

void ModelerUserInterface::pickGroupProperty(GroupProperty* group) {
	// Remove the event listeners for old controls
	// TODO: we really need to have a PropertyEditor class that handles this
	// automatically...
	if (currentGroup) {
		PropertyList* props = currentGroup->getProperties();
		for (PropertyList::iterator iter = props->begin();
			 iter != props->end();
			 iter++)
		{
			if (RangeProperty* prop = dynamic_cast<RangeProperty*>(*iter)) {
				prop->unlisten((SignalListener)updateRangeSlider);
			} else if (RGBProperty* prop = dynamic_cast<RGBProperty*>(*iter)) {
				prop->unlisten((SignalListener)updateColorChooser);
			} else if (BooleanProperty* prop = dynamic_cast<BooleanProperty*>(*iter)) {
				prop->unlisten((SignalListener)updateCheckbox);
			} else if (ChoiceProperty* prop = dynamic_cast<ChoiceProperty*>(*iter)) {
				prop->unlisten((SignalListener)updateChoice);
			}
		}

		// Clear out the old controls
		m_controlsPack->clear();

		currentGroup = NULL;
	}

	// Reset the scrollbar
	m_controlsScroll->position(0, 0);

	// If there's no group, exit
	if (!group) {
		m_controlsScroll->redraw();
		return;
	}

	// Constants for slider dimensions
	const int packWidth = m_controlsPack->w();
	const int textHeight = 20;
	const int sliderHeight = 20;
	const int chooserHeight = 100;
	const int buttonHeight = 20;

	// Show them
	// For each control, add appropriate objects to the user interface
	currentGroup = group;
	PropertyList* props = group->getProperties();
	for (PropertyList::iterator iter = props->begin();
		 iter != props->end();
		 iter++)
    {
		// Ignore it if it's a group property (those belong in the tree).
		if (dynamic_cast<GroupProperty*>(*iter))
			continue;

		// And now we'll create a UI element for the property.
		// The big if-statement below uses dynamic_cast<PropertyType*>(ptr),
		// to see if a property has a given type.  dynamic_cast will
		// return 0 if ptr is not of type PropertyType.

		// Add a slider if the property is a RangeProperty
		if (RangeProperty* prop = dynamic_cast<RangeProperty*>(*iter)) {
			// Add the label
			Fl_Box *box = new Fl_Box(0, 0, packWidth, textHeight, (*iter)->getName());
			box->labelsize(14);
			box->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
			box->box(FL_FLAT_BOX); // otherwise, Fl_Scroll messes up (ehsu)
			m_controlsPack->add(box);

			// Add the slider
			Fl_Value_Slider *slider = new Fl_Value_Slider(0, 0, packWidth, sliderHeight);
			slider->type(1);
			slider->range(prop->getMin(), prop->getMax());
			slider->step(prop->getStep());
			slider->value(prop->getValue());
			m_controlsPack->add(slider);

			// Use the step size to determine the number of decimal places
			// shown in the slider's label.
			if (prop->getStep() > 0) {
			  slider->precision((int)-log(prop->getStep()));
			}

			// Have the slider notify the program when it changes
			slider->callback((Fl_Callback*)SliderCallback, (void*) prop);

			

			// Have the property notify the slider when it changes
			prop->listen((SignalListener)updateRangeSlider, (void*) slider);

		// Add a color picker if the property is an RGB property
		} else if (RGBProperty* prop = dynamic_cast<RGBProperty*>(*iter)) {
			// Add the label
			Fl_Box *box = new Fl_Box(0, 0, packWidth, textHeight, (*iter)->getName());
			box->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
			box->labelsize(14);
			box->box(FL_FLAT_BOX); // otherwise, Fl_Scroll messes up (ehsu)
			m_controlsPack->add(box);

//.........这里部分代码省略.........
开发者ID:thebandrews,项目名称:modeler_impl,代码行数:101,代码来源:modelerui.cpp

示例10: labeltype

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" );
//.........这里部分代码省略.........
开发者ID:shanipribadi,项目名称:non,代码行数:101,代码来源:Track.C

示例11: createComponents

void MainWindow::createComponents()
{
    Fl_Group* grpSequence = new Fl_Group(10,20,150,120, "Sequence :");
    if ( grpSequence != NULL )
    {
        grpSequence->box(FL_DOWN_BOX);
        grpSequence->align(Fl_Align(FL_ALIGN_TOP_LEFT));
        grpSequence->labelsize(DEFAULT_FONT_SIZE);
        grpSequence->begin();

        seqPreparing = new Fl_Box(20,30,130,20,"1. Preparing update ...");
        if ( seqPreparing != NULL )
        {
            seqPreparing->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqPreparing->labelsize(DEFAULT_FONT_SIZE);
            seqPreparing->deactivate();
        }

        seqRetrieving = new Fl_Box(20,50,130,20,"2. Retrieving data ...");
        if ( seqRetrieving != NULL )
        {
            seqRetrieving->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqRetrieving->labelsize(DEFAULT_FONT_SIZE);
            seqRetrieving->deactivate();
        }

        seqProcessing = new Fl_Box(20,70,130,20,"3. Processing data ...");
        if ( seqProcessing != NULL )
        {
            seqProcessing->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqProcessing->labelsize(DEFAULT_FONT_SIZE);
            seqProcessing->deactivate();
        }

        seqUpdating = new Fl_Box(20,90,130,20,"4. Updating ...");
        if ( seqUpdating != NULL )
        {
            seqUpdating->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqUpdating->labelsize(DEFAULT_FONT_SIZE);
            seqUpdating->deactivate();
        }

        seqFinalizing = new Fl_Box(20,110,130,20,"5. Finalizing ...");
        if ( seqFinalizing != NULL )
        {
            seqFinalizing->align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
            seqFinalizing->labelsize(DEFAULT_FONT_SIZE);
            seqFinalizing->deactivate();
        }

        grpSequence->end();

        progBar = new Fl_Progress(10,150,150,10);
        if ( progBar != NULL )
        {
            progBar->color2(FL_BLUE);
            progBar->maximum(5);
            progBar->minimum(0);
            progBar->value(0);
        }

        mli_info = new Fl_Box(170,20,220,140,"");
        if ( mli_info != NULL )
        {
            mli_info->box( FL_DOWN_BOX );
            mli_info->align( FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE );
            mli_info->labelsize(DEFAULT_FONT_SIZE);
        }

        Fl_Box* boxCopyright = new Fl_Box(10,165,380,35);
        if ( boxCopyright != NULL )
        {
            boxCopyright->box(FL_DOWN_BOX);
            boxCopyright->align( FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE );
            boxCopyright->labelsize(COPYRIGHT_FONT_SIZE);
            boxCopyright->label("Automatic Updater, (C)Copyright 2013 Rageworx freeware.\n"
                                "All rights reserved, [email protected]");
        }

    }
}
开发者ID:rageworx,项目名称:autoupgrader,代码行数:81,代码来源:mainwindow.cpp

示例12: if

MatrixPluginGUI::MatrixPluginGUI(int w, int h,MatrixPlugin *o,ChannelHandler *ch,const HostInfo *Info) :
SpiralPluginGUI(w,h,o,ch),
m_LastLight(0),
m_LastPatSeqLight(0)
{
	//size_range(10,10);
	m_Pattern = new Fl_Counter (5, 20, 40, 20, "View");
        m_Pattern->labelsize (10);
	m_Pattern->type (FL_SIMPLE_COUNTER);
        m_Pattern->box (FL_PLASTIC_UP_BOX);
        m_Pattern->color (Info->GUI_COLOUR);
        m_Pattern->step (1);
        m_Pattern->minimum (0);
        m_Pattern->maximum (NUM_PATTERNS-1);
	m_Pattern->value (0);
	m_Pattern->callback ((Fl_Callback*)cb_Pattern);
	add (m_Pattern);

	m_PlayPattern = new Fl_Counter (50, 20, 40, 20, "Play");
        m_PlayPattern->labelsize (10);
	m_PlayPattern->type (FL_SIMPLE_COUNTER);
        m_PlayPattern->box (FL_PLASTIC_UP_BOX);
        m_PlayPattern->color (Info->GUI_COLOUR);
	m_PlayPattern->step (1);
        m_PlayPattern->minimum (0);
        m_PlayPattern->maximum (NUM_PATTERNS-1);
	m_PlayPattern->value (0);
	m_PlayPattern->callback ((Fl_Callback*)cb_PlayPattern);
	add (m_PlayPattern);

        m_Length = new Fl_Counter (5, 55, 40, 20, "Length");
        m_Length->labelsize (10);
	m_Length->type (FL_SIMPLE_COUNTER);
        m_Length->box (FL_PLASTIC_UP_BOX);
        m_Length->color (Info->GUI_COLOUR);
	m_Length->step (1);
	m_Length->value (64);
	m_Length->minimum (1);
	m_Length->maximum (64);
	m_Length->callback ((Fl_Callback*)cb_Length);
	add (m_Length);

	m_Octave = new Fl_Counter(5, 90, 40, 20, "Octave");
        m_Octave->labelsize(10);
	m_Octave->type (FL_SIMPLE_COUNTER);
        m_Octave->box (FL_PLASTIC_UP_BOX);
        m_Octave->color (Info->GUI_COLOUR);
        m_Octave->minimum (0);
        m_Octave->maximum (6);
	m_Octave->step (1);
	m_Octave->value (0);
	m_Octave->callback((Fl_Callback*)cb_Octave);
	add (m_Octave);

        m_Speed = new Fl_Knob (50, 60, 40, 40, "Speed");
        m_Speed->color (Info->GUI_COLOUR);
	m_Speed->type (Fl_Knob::DOTLIN);
        m_Speed->labelsize (10);
        m_Speed->minimum (0);
        m_Speed->maximum (400);
        m_Speed->step (0.01);
        m_Speed->value (8);
	m_Speed->callback ((Fl_Callback*)cb_Speed);
	add (m_Speed);

	m_SpeedVal = new Fl_Counter (5, 125, 85, 20, "");
	m_SpeedVal->labelsize (10);
	m_SpeedVal->value (10);
	m_SpeedVal->type (FL_SIMPLE_COUNTER);
        m_SpeedVal->box (FL_PLASTIC_UP_BOX);
        m_SpeedVal->color (Info->GUI_COLOUR);
	m_SpeedVal->step (1);
	m_SpeedVal->maximum (400);
	m_SpeedVal->minimum (0);
        m_SpeedVal->value (8);
	m_SpeedVal->callback ((Fl_Callback*)cb_SpeedVal);
	add (m_SpeedVal);

        m_CopyBtn = new Fl_Button (5, 150, 40, 20, "Copy");
	m_CopyBtn->labelsize (10);
        m_CopyBtn->box (FL_PLASTIC_UP_BOX);
        m_CopyBtn->color (Info->GUI_COLOUR);
        m_CopyBtn->selection_color (Info->GUI_COLOUR);
        m_CopyBtn->callback ((Fl_Callback*)cb_CopyBtn);
	add (m_CopyBtn);

	m_PasteBtn = new Fl_Button (50, 150, 40, 20, "Paste");
	m_PasteBtn->labelsize (10);
        m_PasteBtn->box (FL_PLASTIC_UP_BOX);
        m_PasteBtn->color (Info->GUI_COLOUR);
        m_PasteBtn->selection_color (Info->GUI_COLOUR);
	m_PasteBtn->deactivate();
	m_PasteBtn->callback ((Fl_Callback*)cb_PasteBtn);
	add (m_PasteBtn);

	m_ClearBtn = new Fl_Button (5, 175, 85, 20, "Clear");
	m_ClearBtn->labelsize (10);
        m_ClearBtn->box (FL_PLASTIC_UP_BOX);
        m_ClearBtn->color (Info->GUI_COLOUR);
        m_ClearBtn->selection_color (Info->GUI_COLOUR);
//.........这里部分代码省略.........
开发者ID:original-male,项目名称:spiralsynthmodular,代码行数:101,代码来源:MatrixPluginGUI.C

示例13: LoadPlugins

void SynthModular::LoadPlugins (string pluginPath) {
     int Width  = 35;
     int Height = 35;
     int SWidth  = 256;
     int SHeight = 256;
     Fl_Pixmap pic (SSM_xpm);
     Fl_Double_Window* Splash = new Fl_Double_Window ((Fl::w()/2) - (SWidth/2), (Fl::h()/2) - (SHeight/2),
                                                       SWidth, SHeight, "SSM");
     Splash->border(0);
     Fl_Box* pbut = new Fl_Box (0, 8, SWidth, SHeight, "");
     pbut->box (FL_NO_BOX);
     pic.label (pbut);
     Fl_Box *splashtext = new Fl_Box (5, SHeight-20, 200, 20, "Loading...");
     splashtext->labelsize (10);
     splashtext->box (FL_NO_BOX);
     splashtext->align (FL_ALIGN_INSIDE | FL_ALIGN_LEFT);
     Splash->add (pbut);
     Splash->add (splashtext);
     Splash->show();
     int ID=-1;
     vector<string> PluginVector;
     if (SpiralInfo::USEPLUGINLIST) PluginVector = SpiralInfo::PLUGINVEC;
     else {
        if (pluginPath.empty()) PluginVector = BuildPluginList (SpiralInfo::PLUGIN_PATH);
        else {
           string::iterator i = pluginPath.end() - 1;
           if (*i != '/') pluginPath += '/';
           PluginVector = BuildPluginList (pluginPath);
        }
     }
     for (vector<string>::iterator i=PluginVector.begin(); i!=PluginVector.end(); i++) {
         string Fullpath;
         if (pluginPath=="") Fullpath=SpiralInfo::PLUGIN_PATH+*i;
         else Fullpath = pluginPath + *"/" + *i;
         ID = PluginManager::Get()->LoadPlugin (Fullpath.c_str());
         if (ID!=PluginError) {
            #ifdef DEBUG_PLUGINS
            cerr << ID << " = Plugin [" << *i << "]" << endl;
            #endif
            Fl_ToolButton *NewButton = new Fl_ToolButton (0, 0, Width, Height, "");
            // we can't set user data, because the callback uses it
            // NewButton->user_data ((void*)(this));
            NewButton->labelsize (1);
            Fl_Pixmap *tPix = new Fl_Pixmap (PluginManager::Get()->GetPlugin(ID)->GetIcon());
            NewButton->image(tPix->copy(tPix->w(),tPix->h()));
            delete tPix;
            const char * gName = PluginManager::Get()->GetPlugin(ID)->GetGroupName();
            string GroupName(gName);
            Fl_Pack* the_group=NULL;
            // find or create this group, and add an icon
            map<string,Fl_Pack*>::iterator gi = m_PluginGroupMap.find (GroupName);
            if (gi == m_PluginGroupMap.end()) {
               the_group = new Fl_Pack (m_GroupTab->x(), 16, m_GroupTab->w(), m_GroupTab->h() - 15, gName);
               the_group->type(FL_HORIZONTAL);
               the_group->labelsize(8);
               the_group->color(SpiralInfo::GUICOL_Button);
               the_group->user_data((void*)(this));
               //m_GroupTab->add(the_group);
               m_GroupTab->value(the_group);
               m_PluginGroupMap[GroupName]=the_group;
            }
            else the_group = gi->second;
            NewButton->type (0);
            NewButton->box (FL_NO_BOX);
            NewButton->down_box (FL_NO_BOX);
            //NewButton->color(SpiralInfo::GUICOL_Button);
            //NewButton->selection_color(SpiralInfo::GUICOL_Button);
            the_group->add (NewButton);

            // we need to keep tooltips stored outside their widgets - widgets just have a pointer
            // I haven't done anything about cleaning up these strings - which may cause memory leaks?
            // But m_DeviceVec - which, I assume, would be used to keep track of / clean up the dynamicly
            //     created NewButton widgets isn't cleaned up either, so we might have 2 memory leaks
            //     involved? - but then again, they might be automatically deallocated because they're
            //     in another widget, in which case there's just one memory leak to deal with. (andy)
            string* PluginName = new string (*i);
            // find the first slash, if there is one, and get rid of everything before and including it
            unsigned int p = PluginName->find ('/');
            if (p < PluginName->length()) PluginName->erase (0, p);
            // find last . and get rid of everything after and including it
            p = PluginName->rfind ('.');
            unsigned int l = PluginName->length ();
            if (p < l) PluginName->erase (p, l);
            NewButton->tooltip (PluginName->c_str());
            // Slashes have significance to the menu widgets, remove them from the GroupName
            while ((p = GroupName.find ('/')) < PluginName->length())
                  GroupName = GroupName.replace (p, 1, " and ");
            string MenuEntry = "Plugins/" + GroupName + "/" + *PluginName;
            m_MainMenu->add (MenuEntry.c_str(), 0, cb_NewDeviceFromMenu, &Numbers[ID], 0);
            // when help is working better - this will put the plugins into the help menu
            // MenuEntry = "Help/" + MenuEntry;
            // m_MainMenu->add (MenuEntry.c_str(), 0, NULL, &Numbers[ID], 0);

            // Add the plugins to the canvas menu
            m_Canvas->AddPluginName (MenuEntry, PluginManager::Get()->GetPlugin(ID)->ID);
            // this overwrites the widget's user_data with that specified for the callback
            // so we can't use it for other purposes
            NewButton->callback ((Fl_Callback*)cb_NewDevice, &Numbers[ID]);
            NewButton->show();
            // Nothing else ever touches m_DeviceVec - is this right??? (andy)
//.........这里部分代码省略.........
开发者ID:sdekrijger,项目名称:spiralsynthmodular,代码行数:101,代码来源:SpiralSynthModular.C

示例14: end

Fl_Font_Browser::Fl_Font_Browser():Fl_Window(100,100,550-60,332-5,"Font Browser") 
{
      lst_Font = new Fl_Browser(15, 55-5, 195, 159);
      lst_Font->labelsize(12);
      lst_Font->textsize(12);
      lst_Font->callback((Fl_Callback*)cb_FontName_Selected, (void*)(lst_Font->parent()));
      lst_Font->type(FL_HOLD_BROWSER);
    
      txt_InputFont = new Fl_Input(15, 31-5, 195, 24, "Font:");
      txt_InputFont->labelsize(12);
      txt_InputFont->textsize(12);
      txt_InputFont->align(FL_ALIGN_TOP_LEFT);
      txt_InputFont->when(FL_WHEN_ENTER_KEY);
      txt_InputFont->callback((Fl_Callback*)cb_txtInputFontName, (void*)(txt_InputFont->parent()));
    
      lst_Style = new Fl_Browser(215, 56-5, 155-60, 159);
      lst_Style->labelsize(12);
      lst_Style->type(FL_HOLD_BROWSER);
      lst_Style->textsize(12); 
      lst_Style->callback((Fl_Callback*)cb_StyleSelected, (void*)(lst_Style->parent()));   
       
      txt_InputStyle = new Fl_Input(215, 32-5, 155-60, 24, "Syle:");
      txt_InputStyle->labelsize(12);
      txt_InputStyle->align(FL_ALIGN_TOP_LEFT);
      txt_InputStyle->textsize(12);    
      txt_InputStyle->callback((Fl_Callback*)cb_txtInputFontStyle, (void*)(txt_InputStyle->parent()));
      
      lst_Size = new Fl_Browser(375-60, 56-5, 75, 159);
      lst_Size->labelsize(12);
      lst_Size->type(FL_HOLD_BROWSER);
      lst_Size->textsize(12); 
      lst_Size->callback((Fl_Callback*)cb_FontSize_Selected, (void*)(lst_Size->parent()));   
      
      txt_InputSize = new Fl_Input(375-60, 32-5, 75, 24, "Size:");
      txt_InputSize->labelsize(12);
      txt_InputSize->align(FL_ALIGN_TOP_LEFT);
      txt_InputSize->textsize(12);    
      txt_InputSize->callback((Fl_Callback*)cb_txtInputFontSize, (void*)(txt_InputSize->parent()));
      
      btn_OK =new Fl_Button(475-60, 35-5, 64, 20, "&OK");
      btn_OK->shortcut(0x8006f);
      btn_OK->labelfont(1);
      btn_OK->labelsize(12);
      btn_OK->callback((Fl_Callback*)cb_okBtn_Red );
         
      btn_Cancel =new Fl_Button(475-60, 60-5, 64, 20, "Cancel");
      btn_Cancel->labelsize(12);
      btn_Cancel->callback((Fl_Callback*)cb_Cancel, (void *)(btn_Cancel->parent()));
    
    
       Fl_Box* o = new Fl_Box(15, 220-5, 20, 10, "Properties");
       
       o->box(FL_BORDER_FRAME);
       o->labelsize(12);
       o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
      
        btn_Check1= new Fl_Check_Button(40-20, 250-5-5, 100, 15, "Strikethrough");
        btn_Check1->down_box(FL_DOWN_BOX);
        btn_Check1->labelsize(12);
        btn_Check1->callback((Fl_Callback*)cb_Strikethrough, (void *)(btn_Check1->parent()));
      
        btn_Check2 = new Fl_Check_Button(40-20, 270-5-5, 100, 15, "Underline");
        btn_Check2->down_box(FL_DOWN_BOX);
        btn_Check2->labelsize(12);
        btn_Check2->callback((Fl_Callback*)cb_UnderLine, (void *)(btn_Check2->parent()));
    
        btn_Color = new Fl_Button(40-20, 307-10-5, 90, 23, "Color:");
        btn_Color->down_box(FL_BORDER_BOX);
        btn_Color->labelsize(12);
        btn_Color->align(FL_ALIGN_TOP_LEFT);
        btn_Color->color(FL_BLACK);
        btn_Color->callback((Fl_Callback*)cb_Color_Select, (void *)(lst_Size->parent()));

     
    { Fl_Group* o = new Fl_Group(130, 220-5, 256+180, 82, "Example");
      o->box(FL_BORDER_FRAME);
      o->labelsize(12);
      o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
      { box_Example = new Fl_Font_Preview_Box(132-10, 241-5, 227+50+35+10, 48, "AaBbCcDdEeFfGgHhIi");
        box_Example->box(FL_DOWN_BOX);
        box_Example->labelsize(12);
        box_Example->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP|FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
      }
      o->end();
    }
     set_modal();
     end();
 // Initializations 
  pickedsize = 14; // Font Size to be used
          //
  int k =   Fl::set_fonts(0); // Nr of fonts available on the server
  
  for(int i= 0; i < k; i++) 
  {
    int t;
    const char *name = Fl::get_font_name((Fl_Font)i,&t);
    char buffer[128];

// Load the font list .. Ignore the bold and italic types of the font
     if(!((t & FL_BOLD) ||(t & FL_ITALIC)))
//.........这里部分代码省略.........
开发者ID:oracle2025,项目名称:openmovieeditor,代码行数:101,代码来源:fl_font_browser.cpp

示例15: make_window

Fl_Double_Window* make_window() {
  Fl_Double_Window* w;
  { Fl_Double_Window* o = new Fl_Double_Window(400, 605);
    w = o;
    { undobutton = new Fl_Button(6, 25, 40, 25, "Undo");
      undobutton->down_box(FL_DOWN_BOX);
      undobutton->callback((Fl_Callback*)undo_cb);
    } // Fl_Button* undobutton
    { forceslider = new Fl_Slider(206, 25, 75, 25, "Force");
      forceslider->type(5);
      forceslider->selection_color((Fl_Color)1);
      forceslider->minimum(0.05);
      forceslider->value(0.5);
      forceslider->callback((Fl_Callback*)lerp_cb);
      forceslider->align(Fl_Align(FL_ALIGN_RIGHT));
    } // Fl_Slider* forceslider
    { rgbmode = new Fl_Button(331, 25, 35, 25, "HSB");
      rgbmode->labelsize(12);
      rgbmode->callback((Fl_Callback*)rgbmode_cb);
      rgbmode->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
    } // Fl_Button* rgbmode
    { fnamebox = new Fl_Input(31, 60, 355, 25, "File:");
      fnamebox->labeltype(FL_ENGRAVED_LABEL);
      fnamebox->labelsize(12);
      fnamebox->callback((Fl_Callback*)input_cb);
      fnamebox->when(FL_WHEN_ENTER_KEY_ALWAYS);
    } // Fl_Input* fnamebox
    { cshow.hsblbls[0] = new Fl_Box(30, 219, 80, 20, "Hue (L)");
      cshow.hsblbls[0]->box(FL_FLAT_BOX);
      cshow.hsblbls[0]->color((Fl_Color)34);
      cshow.hsblbls[0]->labelfont(1);
      cshow.hsblbls[0]->labelsize(12);
      cshow.hsblbls[0]->labelcolor((Fl_Color)3);
    } // Fl_Box* cshow.hsblbls[0]
    { cshow.hsblbls[1] = new Fl_Box(115, 219, 75, 20, "Sat(M)");
      cshow.hsblbls[1]->box(FL_FLAT_BOX);
      cshow.hsblbls[1]->color((Fl_Color)34);
      cshow.hsblbls[1]->labelfont(1);
      cshow.hsblbls[1]->labelsize(12);
      cshow.hsblbls[1]->labelcolor((Fl_Color)2);
    } // Fl_Box* cshow.hsblbls[1]
    { cshow.hsblbls[2] = new Fl_Box(195, 219, 75, 20, "Bright(R)");
      cshow.hsblbls[2]->box(FL_FLAT_BOX);
      cshow.hsblbls[2]->color((Fl_Color)34);
      cshow.hsblbls[2]->labelfont(1);
      cshow.hsblbls[2]->labelsize(12);
      cshow.hsblbls[2]->labelcolor((Fl_Color)235);
    } // Fl_Box* cshow.hsblbls[2]
    { Fl_Box* o = new Fl_Box(275, 219, 80, 20, "Alpha(shift)");
      o->box(FL_FLAT_BOX);
      o->color((Fl_Color)34);
      o->labelfont(1);
      o->labelsize(12);
      o->labelcolor(FL_BACKGROUND2_COLOR);
    } // Fl_Box* o
    { cmedit = new class CMedit(5, 239, 380, 270);
      cmedit->box(FL_FLAT_BOX);
      cmedit->color(FL_BACKGROUND_COLOR);
      cmedit->selection_color(FL_BACKGROUND_COLOR);
      cmedit->labeltype(FL_NORMAL_LABEL);
      cmedit->labelfont(0);
      cmedit->labelsize(14);
      cmedit->labelcolor(FL_FOREGROUND_COLOR);
      cmedit->align(Fl_Align(FL_ALIGN_CENTER));
      cmedit->when(FL_WHEN_RELEASE);
      Fl_Group::current()->resizable(cmedit);
    } // class CMedit* cmedit
    { cshow.color = new colorpatch(62, 515, 50, 40);
      cshow.color->box(FL_DOWN_BOX);
      cshow.color->color(FL_BACKGROUND_COLOR);
      cshow.color->selection_color(FL_BACKGROUND_COLOR);
      cshow.color->labeltype(FL_NO_LABEL);
      cshow.color->labelfont(0);
      cshow.color->labelsize(14);
      cshow.color->labelcolor(FL_FOREGROUND_COLOR);
      cshow.color->align(Fl_Align(FL_ALIGN_CENTER));
      cshow.color->when(FL_WHEN_RELEASE);
    } // colorpatch* cshow.color
    { cshow.cindex = new Fl_Value_Input(7, 530, 50, 25, "  (index");
      cshow.cindex->box(FL_FLAT_BOX);
      cshow.cindex->color((Fl_Color)16);
      cshow.cindex->maximum(0);
      cshow.cindex->step(1);
      cshow.cindex->textsize(12);
      cshow.cindex->callback((Fl_Callback*)report_cb);
      cshow.cindex->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Value_Input* cshow.cindex
    { cshow.hsba = new Fl_Output(117, 530, 120, 25, "HSBA");
      cshow.hsba->box(FL_FLAT_BOX);
      cshow.hsba->color((Fl_Color)16);
      cshow.hsba->textsize(11);
      cshow.hsba->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Output* cshow.hsba
    { cshow.rgba = new Fl_Output(247, 530, 125, 25, "rgb");
      cshow.rgba->box(FL_FLAT_BOX);
      cshow.rgba->color((Fl_Color)16);
      cshow.rgba->textsize(11);
      cshow.rgba->align(Fl_Align(FL_ALIGN_TOP));
    } // Fl_Output* cshow.rgba
    { cshow.postscalein = new Fl_Value_Input(317, 570, 65, 25, "* Amax");
//.........这里部分代码省略.........
开发者ID:zding5,项目名称:cmed-Colormap-eDream-NCSA-U-of-I-,代码行数:101,代码来源:cmedpanel.C


注:本文中的Fl_Box::labelsize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。