本文整理汇总了C++中Fl_Group::box方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Group::box方法的具体用法?C++ Fl_Group::box怎么用?C++ Fl_Group::box使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Group
的用法示例。
在下文中一共展示了Fl_Group::box方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
ct_image_window::ct_image_window( ) {
Fl_Double_Window* w;
{ Fl_Double_Window* o = image_window = new Fl_Double_Window(421, 528);
w = o;
o->user_data((void*)(this));
{ Fl_Group* o = new Fl_Group(5, 30, 410, 410);
o->box(FL_PLASTIC_DOWN_FRAME);
{ ct_draw_area* o = ct_image = new ct_draw_area(10, 35, 400, 400, "label");
o->box(FL_FLAT_BOX);
o->color(FL_DARK3);
o->selection_color(FL_BACKGROUND_COLOR);
o->labeltype(FL_NORMAL_LABEL);
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_BLACK);
o->align(FL_ALIGN_CENTER);
o->when(FL_WHEN_RELEASE);
}
o->end();
}
{ Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 100, 25);
o->box(FL_FLAT_BOX);
o->menu(menu_);
}
{ Fl_Value_Slider* o = WL = new Fl_Value_Slider(40, 470, 375, 20, "WL");
o->type(1);
o->box(FL_PLASTIC_THIN_DOWN_BOX);
o->minimum(-2000);
o->maximum(7000);
o->step(1);
o->value(40);
o->callback((Fl_Callback*)cb_WL);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Value_Slider* o = WW = new Fl_Value_Slider(40, 495, 375, 20, "WW");
o->type(1);
o->box(FL_PLASTIC_THIN_DOWN_BOX);
o->minimum(1);
o->maximum(4000);
o->step(1);
o->value(300);
o->callback((Fl_Callback*)cb_WW);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Value_Slider* o = Indx = new Fl_Value_Slider(40, 445, 375, 20, "Indx");
o->type(1);
o->box(FL_PLASTIC_THIN_DOWN_BOX);
o->step(1);
o->callback((Fl_Callback*)cb_Indx);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Progress* o = progress_bar = new Fl_Progress(115, 5, 300, 20);
o->box(FL_PLASTIC_THIN_UP_BOX);
o->selection_color((Fl_Color)1);
o->hide();
}
o->end();
}
}
示例2: make_group
void Fl_Help_Dialog::make_group(int w, int h)
{
menubar_ = new Fl_Menu_Bar(0, 0, 595, 20);
menubar_->begin();
{
Fl_Item_Group *g = new Fl_Item_Group("&File");
Fl_Item *i;
i= new Fl_Item("Open");
i->shortcut(FL_CTRL+'o');
i->callback((Fl_Callback*)cb_open, this);
i = new Fl_Item("Close");
i->shortcut(FL_CTRL+'c');
i->callback((Fl_Callback*)cb_close, this);
g->end();
}
menubar_->end();
{
Fl_Group *g = new Fl_Group(0, 20, w, 30);
g->box(FL_THIN_DOWN_BOX);
Fl_Button *b;
b = back = new Fl_Highlight_Button(35, 2, 30, 25, "@<-");
b->box(FL_HIGHLIGHT_UP_BOX);
b->label_type(FL_SYMBOL_LABEL);
b->label_color(FL_DARK3);
b->highlight_label_color(FL_GRAY);
b->callback((Fl_Callback*)cb_back, this);
b->tooltip("Back");
b->deactivate();
b = next = new Fl_Highlight_Button(65, 2, 30, 25, "@->");
b->box(FL_HIGHLIGHT_UP_BOX);
b->label_type(FL_SYMBOL_LABEL);
b->label_color(FL_DARK3);
b->highlight_label_color(FL_GRAY);
b->callback((Fl_Callback*)cb_next, this);
b->tooltip("Next");
b->deactivate();
b = new Fl_Highlight_Button(5, 2, 30, 25);
b->image(Fl_Image::read(0, (uchar*)datas_open));
b->box(FL_HIGHLIGHT_UP_BOX);
b->callback((Fl_Callback*)cb_open, this);
b->tooltip("Open");
b->take_focus();
g->end();
}
htmlWidget = new Fl_Simple_Html(0, 50, w, h-50);
htmlWidget->callback(cb_html_link, this);
htmlWidget->end();
resizable(htmlWidget);
}
示例3: create
/*
Initial creation of ui components.
*/
void SelectorGUI::create(){
Fl_Window *window = new Fl_Window(400,460,"Stream Selector");
x = 80;
y = 10;
char* participantList[100];
test = "this is a member";
window->size_range(400, 400, 600, 600);
// Scroll window containing participants
swindow = new Fl_Scroll(0, y, 400, 380);
Fl_Group* o = new Fl_Group(x, y, 380, 280);
o->box(FL_THIN_UP_FRAME);
// Add buttons to scroll window
update();
// Apply and close button.
y = 400;
x = 150;
Fl_Button *applyButton = new Fl_Button(150, y, 60, 40, "Refresh");
Fl_Button *closeButton = new Fl_Button(x + 70, y, 60, 40, "Close");
// Callbacks.
applyButton->callback(static_applyCB, this);
closeButton->callback(static_closeCB, this);
window->end();
window->show();
// For some reason, the idle callback causes a segfault.
//Fl::add_idle(static_idleCB);
}
示例4: make_about_panel
Fl_Window* make_about_panel(const char *copyright) {
Fl_Window* w;
{Fl_Window* o = about_panel = new Fl_Window(330, 276, _("About eFluid"));
w = o;
o->type(240);
o->selection_color((Fl_Color)47);
o->shortcut(0xff1b);
{Fl_Group* o = display_group = new Fl_Group(0, 0, 330, 240);
{Fl_Group* o = new Fl_Group(5, 5, 320, 55, _("eFluid"));
o->box(FL_ENGRAVED_BOX);
o->label_font(fl_fonts+1);
o->label_type(FL_EMBOSSED_LABEL);
o->color((Fl_Color)0xb3b3be00);
o->label_color((Fl_Color)32);
o->selection_color((Fl_Color)47);
o->label_size(40);
o->align(FL_ALIGN_INSIDE);
o->end();
}
{Fl_Button* o = new Fl_Button(5, 165, 320, 70, _("\302\251""2002-2003\nClick here for more information"));
o->box(FL_ENGRAVED_BOX);
o->label_font(fl_fonts+1);
o->color((Fl_Color)0xb3b3be00);
o->label_color((Fl_Color)32);
o->highlight_color((Fl_Color)0x9d9da700);
o->highlight_label_color((Fl_Color)55);
o->label_size(14);
o->callback((Fl_Callback*)cb_2002);
o->align(FL_ALIGN_WRAP);
}
{Fl_Box* o = new Fl_Box(5, 60, 320, 105, _("EFLTK User Interface Designer\nVersion 2.0.3"));
o->box(FL_ENGRAVED_BOX);
o->label_font(fl_fonts+1);
o->label_type(FL_EMBOSSED_LABEL);
o->color((Fl_Color)0xb3b3be00);
o->label_color((Fl_Color)32);
o->selection_color((Fl_Color)47);
o->label_size(18);
}
o->end();
}
{Fl_Box* o = copyright_box = new Fl_Box(0, 0, 330, 240);
o->label_size(10);
o->align(FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP|FL_ALIGN_WRAP);
o->hide();
o->label(copyright);
}
{Fl_Return_Button* o = new Fl_Return_Button(5, 245, 320, 25, _("OK"));
o->label_size(10);
o->shortcut(0xff0d);
o->callback((Fl_Callback*)cb_OK);
}
o->end();
}
return w;
}
示例5: box
Flx_Calendar::Flx_Calendar() :
Fl_Window( 0, 0,
TABLE_W + 2*MARGIN,
BAR_H + TABLE_H + BUTTONGROUP_H + 2*MARGIN )
, _isDragging(false)
{
//fl_register_images();
box(FL_DOWN_BOX);
clear_border();
//make a gray bar as a replacement for the title bar,
//containing 2 comboboxes for entering year and month
Fl_Group *pBarGrp = new Fl_Group( MARGIN, MARGIN, TABLE_W, BAR_H );
pBarGrp->box(FL_FLAT_BOX);
pBarGrp->begin();
_pMoCho = new Fl_Choice(18, 4, 55, BAR_H - 5);
_pMoCho->box(FL_FLAT_BOX);
_pMoCho->textsize(10);
_pMoCho->visible_focus( 0 );
_pYCho = new Fl_Choice(_pMoCho->x() + 2 + _pMoCho->w(), 4, 55, BAR_H - 5);
_pYCho->textsize(10);
_pYCho->visible_focus( 0 );
pBarGrp->color(FL_DARK3);
pBarGrp->end();
_pDayTable = new DayTable( MARGIN, MARGIN + BAR_H, TABLE_W, TABLE_H );
_pDayTable->end();
_pBtnOk = new Fl_Return_Button( 2*MARGIN,
this->h() - 2*MARGIN - BUTTON_H,
70,
BUTTON_H, "OK" );
_pBtnOk->labelsize( 10 );
_pBtnOk->callback( staticOnOkCancel, this );
_pBtnCancel = new Fl_Button( _pBtnOk->x() + _pBtnOk->w() + MARGIN,
_pBtnOk->y(), _pBtnOk->w(), _pBtnOk->h(),
"Abbrechen" );
_pBtnCancel->labelsize( _pBtnOk->labelsize() );
_pBtnCancel->callback( staticOnOkCancel, this );
end();
//controls all this stuff:
_pCalCtrl = new CalendarController( *_pMoCho, *_pYCho, *_pDayTable );
//make DayTable cells the right size:
_pDayTable->col_width_all( COLWIDTH );
_pDayTable->row_header_width( COLWIDTH );
_pDayTable->row_height_all( ROWHEIGHT );
}
示例6: create_dlg
//-----------------------------------------------------------------------------
void TrspDlg::create_dlg()
{
wnd = new Fl_Double_Window(220, 170, mgl_gettext("Transpose data"));
Fl_Group *g = new Fl_Group(10, 30, 200, 90, mgl_gettext("Select new order of dimensions"));
g->box(FL_DOWN_BOX);
yxz = new Fl_Round_Button(20, 40, 75, 25, "y - x - z"); yxz->callback(trsp_rad_cb,this);
zyx = new Fl_Round_Button(20, 65, 75, 25, "z - y - x"); zyx->callback(trsp_rad_cb,this);
zxy = new Fl_Round_Button(20, 90, 75, 25, "z - x - y"); zxy->callback(trsp_rad_cb,this);
yzx = new Fl_Round_Button(100, 40, 75, 25, "y - z - x");yzx->callback(trsp_rad_cb,this);
xzy = new Fl_Round_Button(100, 65, 75, 25, "x - z - y");xzy->callback(trsp_rad_cb,this);
xyz = new Fl_Round_Button(100, 90, 75, 25, "x - y - z");xyz->callback(trsp_rad_cb,this);
g->end();
Fl_Button *o;
o = new Fl_Button(25, 130, 75, 25, mgl_gettext("Cancel")); o->callback(close_dlg_cb,wnd);
o->box(UDAV_UP_BOX); o->down_box(UDAV_DOWN_BOX);
o->tooltip(mgl_gettext("Do nothing and close this window"));
o = new Fl_Return_Button(125, 130, 75, 25, mgl_gettext("Do")); o->callback(trsp_dlg_cb,wnd);
o->box(UDAV_UP_BOX); o->down_box(UDAV_DOWN_BOX);
o->tooltip(mgl_gettext("Change data values and close this window"));
wnd->end();
}
示例7: CreateGUI
void DelayGUI::CreateGUI(int xoff, int yoff, char *name)
{
Fl_Group* o = GUIDelayGroup = new Fl_Group(xoff, yoff, 300, 60, name);
o->type(1);
o->color(GUIBG2_COLOUR);
o->box(FL_UP_BOX);
o->labeltype(FL_ENGRAVED_LABEL);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
o->user_data((void*)(this));
DelayA = new Fl_Knob(xoff+50, yoff+5, 40, 40, "Delay");
DelayA->color(GUI_COLOUR);
DelayA->labelsize(10);
DelayA->maximum(1);
DelayA->step(0.01);
DelayA->value(0.5);
DelayA->callback((Fl_Callback*)cb_Delay);
Feedback = new Fl_Knob(xoff+100, yoff+5, 40, 40, "Feedback");
Feedback->color(GUI_COLOUR);
Feedback->labelsize(10);
Feedback->maximum(1.0);
Feedback->step(0.01);
Feedback->value(0.5);
Feedback->callback((Fl_Callback*)cb_Feedback);
Bypass = new Fl_Button(xoff+5, yoff+25, 40, 20, "Bypass");
Bypass->color(GUIBG2_COLOUR);
Bypass->labelsize(10);
Bypass->type(1);
Bypass->value(1);
Bypass->callback((Fl_Callback*)cb_Bypass);
o->end();
}
示例8: 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" );
//.........这里部分代码省略.........
示例9: createSystemArea
void createSystemArea(int32_t x, int32_t y, int32_t w, int32_t h){
tsconf::GameConfig *conf = tsconf::GetGameConfig();
int curH_L = y;
if((x+(tsconf::smallPadding<<1)+tsconf::largeWidgetWidth)>w){ //Enter no-space mode
}
else{ //We got space.
curH_L+=tsconf::smallPadding;
Fl_Group *startupGroup = new Fl_Group(x+tsconf::smallPadding, curH_L, w-(tsconf::smallPadding*2), tsconf::largeWidgetHeight, "Startup Directory");
startupGroup->box(FL_EMBOSSED_BOX);
startupGroup->begin();
Fl_Input *startupInput = new Fl_Input(x+tsconf::smallPadding+12, curH_L+12, (w-(tsconf::smallPadding*2))-76, tsconf::smallWidgetHeight);
startupInput->value(conf->startupdir);
startupInput->when(FL_WHEN_CHANGED);
startupInput->callback(startupCallback);
int newX = static_cast<Fl_Widget *>(startupInput)->x()+static_cast<Fl_Widget *>(startupInput)->w();
Fl_Button *chooseStartupButton = new Fl_Button(newX+12, curH_L+12, 40, tsconf::smallWidgetHeight, "...");
chooseStartupButton->callback(DirectoryChooser, startupInput);
startupGroup->end();
curH_L+=tsconf::smallPadding+tsconf::largeWidgetHeight;
Fl_Group *sgmnameGroup = new Fl_Group(x+tsconf::smallPadding, curH_L, w-(tsconf::smallPadding*2), tsconf::largeWidgetHeight, "SGM File Name");
sgmnameGroup->box(FL_EMBOSSED_BOX);
sgmnameGroup->begin();
Fl_Input *sgmnameInput = new Fl_Input(x+tsconf::smallPadding+12, curH_L+12, (w-(tsconf::smallPadding*2))-24, tsconf::smallWidgetHeight);
sgmnameInput->value(conf->sgmname);
sgmnameInput->when(FL_WHEN_CHANGED);
sgmnameInput->callback(sgmnameCallback);
sgmnameGroup->end();
curH_L+=tsconf::smallPadding+tsconf::largeWidgetHeight;
Fl_Group *tsgmnameGroup = new Fl_Group(x+tsconf::smallPadding, curH_L, w-(tsconf::smallPadding*2), tsconf::largeWidgetHeight, "TSGM File Name");
tsgmnameGroup->box(FL_EMBOSSED_BOX);
tsgmnameGroup->begin();
Fl_Input *tsgmnameInput = new Fl_Input(x+tsconf::smallPadding+12, curH_L+12, (w-(tsconf::smallPadding*2))-24, tsconf::smallWidgetHeight);
tsgmnameInput->value(conf->tsgmname);
tsgmnameInput->when(FL_WHEN_CHANGED);
tsgmnameInput->callback(tsgmnameCallback);
tsgmnameGroup->end();
curH_L+=tsconf::smallPadding+tsconf::largeWidgetHeight;
Fl_Group *mainfuncGroup = new Fl_Group(x+tsconf::smallPadding, curH_L, w-(tsconf::smallPadding*2), tsconf::largeWidgetHeight, "Main Function");
mainfuncGroup->box(FL_EMBOSSED_BOX);
mainfuncGroup->begin();
Fl_Input *mainfuncInput = new Fl_Input(x+tsconf::smallPadding+12, curH_L+12, (w-(tsconf::smallPadding*2))-24, tsconf::smallWidgetHeight);
mainfuncInput->value(conf->gamefunc);
mainfuncInput->when(FL_WHEN_CHANGED);
mainfuncInput->callback(mainfuncCallback);
mainfuncGroup->end();
}
}
示例10: KMeans
ClusterView2D::ClusterView2D(int x, int y, int w, int h, int inResolution, cxVolume * pVolume) : Fl_Gl_Window(x, y, w, h-COLOR_CHOOSER_HEIGHT){
//mode(FL_ALPHA | FL_DEPTH | FL_DOUBLE | FL_RGB8 );
// Fl::add_idle(&idle_cp, (void*)this);
opacityDisp = 0;
histogram1D = 0;
m_dataPts = NULL;
m_cluster = NULL;
m_ctrs = NULL;
m_pVolume = pVolume;
m_percentHeight = (float)COLOR_CHOOSER_HEIGHT / (float) h;
m_percentWidth = (float)COLOR_CHOOSER_WIDTH / (float) w;
ClusterView2D *ihateptrs = this; // this is necessary because &this doesnt work.
//m_buttonA = new Fl_Button(x+MARGIN+COLOR_CHOOSER_WIDTH, y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN, BUTTON_WIDTH,BUTTON_HEIGHT, "Reset");
//m_buttonA->callback((Fl_Callback*)cb_buttonA, this);
//m_buttonA->resizable(0);
Fl_Group* o = new Fl_Group( 2,
y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN,
COLOR_CHOOSER_WIDTH*3,
COLOR_CHOOSER_HEIGHT*4,"K-Means settings");
o->box(FL_ENGRAVED_FRAME);
o->align(FL_ALIGN_TOP_LEFT);
m_pInputA = new Fl_Input( o->x()+3,
o->y()+MARGIN,
BUTTON_WIDTH*2 + 3*2,
BUTTON_HEIGHT,"Filename");
m_pInputA->value("");
m_pInputA->align(FL_ALIGN_RIGHT);
m_pButtonChooser = new Fl_Button( (m_pInputA->x()+m_pInputA->w()),
o->y()+ MARGIN,
BUTTON_WIDTH, BUTTON_HEIGHT,"Browse..");
m_pButtonChooser->callback((Fl_Callback *)cb_ButtonChooser, this);
m_pFileChooser = NULL;
m_inp_tch = new Fl_Input(o->x() + 3, m_pInputA->y()+ BUTTON_HEIGHT*2, BUTTON_WIDTH, BUTTON_HEIGHT, "timesteps intervals");
m_inp_tch->align(FL_ALIGN_TOP_LEFT);
m_inp_tch->value("12");
m_inp_t = new Fl_Input(o->x() + 3, m_pInputA->y()+ BUTTON_HEIGHT*3 + MARGIN, BUTTON_WIDTH, BUTTON_HEIGHT, "algorithm");
m_inp_t->align(FL_ALIGN_TOP_LEFT);
m_inp_t->value("0");
m_inp_k = new Fl_Input(m_inp_tch->x()+m_inp_tch->w() + 3, m_pInputA->y()+ BUTTON_HEIGHT*2, BUTTON_WIDTH, BUTTON_HEIGHT, "clusters");
m_inp_k->align(FL_ALIGN_TOP_LEFT);
m_inp_k->value("3");
m_inp_s = new Fl_Input(m_inp_t->x()+m_inp_t->w() + 3, m_pInputA->y()+ BUTTON_HEIGHT*3 + MARGIN, BUTTON_WIDTH, BUTTON_HEIGHT, "stages");
m_inp_s->align(FL_ALIGN_TOP_LEFT);
m_inp_s->value("300");
m_inp_start_time = new Fl_Input(m_inp_k->x()+m_inp_k->w() + 3, m_pInputA->y()+ BUTTON_HEIGHT*2,
BUTTON_WIDTH, BUTTON_HEIGHT, "start timestep");
m_inp_start_time->align(FL_ALIGN_TOP_LEFT);
m_inp_start_time->value("0");
m_inp_total_time = new Fl_Input(m_inp_s->x()+m_inp_s->w() + 3, m_pInputA->y()+ BUTTON_HEIGHT*3 +
MARGIN, BUTTON_WIDTH, BUTTON_HEIGHT, "number of timesteps");
m_inp_total_time->align(FL_ALIGN_TOP_LEFT);
m_inp_total_time->value("120");
Fl_Button* bt_save = new Fl_Button( m_inp_tch->x()+m_inp_tch->w() + 3,
m_pInputA->y()+ BUTTON_HEIGHT*5 + MARGIN*3,
BUTTON_WIDTH, BUTTON_HEIGHT,"Create new cluster");
bt_save->callback((Fl_Callback *)cb_ButtonSave, this);
Fl_Button* bt_load = new Fl_Button( bt_save->x()+bt_save->w()+3,
m_pInputA->y()+ BUTTON_HEIGHT*5 + MARGIN*3,
BUTTON_WIDTH, BUTTON_HEIGHT,"Load cluster");
bt_load->callback((Fl_Callback *)cb_ButtonLoad, this);
o->end();
m_pLB = new Fl_Light_Button(o->x() + o->w() + 3,
(y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN),
BUTTON_WIDTH,BUTTON_HEIGHT, "Show all clusters");
//m_pLB->labelsize(TEXTSIZE);
m_pLB->callback((Fl_Callback *)cb_LB, this);
m_pLB->set();
m_bshowall = true;
m_pButtonNext = new Fl_Button( o->x() + o->w() + 3,
(y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN + BUTTON_HEIGHT + 3),
BUTTON_WIDTH, BUTTON_HEIGHT,"Next Cluster");
m_pButtonNext->callback((Fl_Callback *)cb_ButtonNext, this);
#ifdef CHANGES
m_pButtonClear = new Fl_Light_Button( o->x() + o->w() + 3,
(y+(h-COLOR_CHOOSER_HEIGHT)+MARGIN + BUTTON_HEIGHT*2 + 6),
BUTTON_WIDTH, BUTTON_HEIGHT,"Clear Cluster");
m_pButtonClear->callback((Fl_Callback *)cb_ButtonClear, this);
m_pButtonClear->set();
m_bClear = true;
//.........这里部分代码省略.........
示例11: make_window
Fl_Double_Window* make_window() {
Fl_Double_Window* w;
{Fl_Double_Window* o = new Fl_Double_Window(560, 489);
w = o;
o->type(241);
{Fl_Box* o = imbox = new Fl_Box(5, 30, 385, 455);
o->box(FL_ENGRAVED_BOX);
o->align(FL_ALIGN_CLIP);
Fl_Group::current()->resizable(o);
}
{Fl_Box* o = filename_box = new Fl_Box(5, 5, 385, 20, "No file loaded...");
o->box(FL_THIN_DOWN_BOX);
o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
}
{Fl_Group* o = new Fl_Group(395, 5, 160, 480);
o->box(FL_THIN_DOWN_BOX);
{Fl_Button* o = new Fl_Button(10, 10, 140, 25, "Load File");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Load);
}
{Fl_Button* o = new Fl_Button(10, 40, 140, 25, "Exit");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Exit);
}
new Fl_Divider(10, 75, 140, 15, "label");
{Fl_Button* o = new Fl_Button(10, 100, 140, 25, "Fit To Box");
o->type(Fl_Button::TOGGLE);
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Fit);
}
{Fl_Button* o = new Fl_Button(10, 130, 140, 25, "Tile");
o->type(Fl_Button::TOGGLE);
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Tile);
}
{Fl_Choice* o = filter_choice = new Fl_Choice(10, 335, 140, 25, "Filter:"); o->begin();
o->align(FL_ALIGN_TOP | FL_ALIGN_LEFT);
o->tooltip("Choose filter");
{Fl_Item* o = new Fl_Item("None");
o->user_data((void*)(0));
}
{Fl_Item* o = new Fl_Item("Brightness");
o->user_data((void*)(FILTER_BRIGHTNESS));
}
{Fl_Item* o = new Fl_Item("Contrast");
o->user_data((void*)(FILTER_CONTRAST));
}
{Fl_Item* o = new Fl_Item("Grayscale");
o->user_data((void*)(FILTER_GRAYSCALE));
}
{Fl_Item* o = new Fl_Item("Gamma");
o->user_data((void*)(FILTER_GAMMA));
}
{Fl_Item* o = new Fl_Item("Fore Blend");
o->user_data((void*)(FILTER_FOREBLEND));
}
{Fl_Item* o = new Fl_Item("Back Blend");
o->user_data((void*)(FILTER_BACKBLEND));
}
o->end();
}
{Fl_Box* o = new Fl_Box(10, 160, 140, 160);
o->parent()->resizable(o);
}
{Fl_Value_Slider* o = Rslider = new Fl_Value_Slider(25, 380, 125, 15, "R");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Red value for filter");
}
{Fl_Value_Slider* o = Gslider = new Fl_Value_Slider(25, 400, 125, 15, "G");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Green value for filter");
}
{Fl_Value_Slider* o = Bslider = new Fl_Value_Slider(25, 420, 125, 15, "B");
o->type(Fl_Value_Slider::HORIZONTAL);
o->label_size(10);
o->text_size(10);
o->minimum(-3);
o->maximum(3);
o->value(1);
o->slider_size(5);
o->align(FL_ALIGN_LEFT);
o->tooltip("Blue value for filter");
}
{Fl_Button* o = new Fl_Button(10, 445, 140, 25, "Apply");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Apply);
//.........这里部分代码省略.........
示例12: make_window
Fl_Double_Window* UserInterface::make_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = m_mainWindow = new Fl_Double_Window(797, 595, "Mesh viewer");
w = o;
o->user_data((void*)(this));
{ Fl_Group* o = new Fl_Group(0, 22, 125, 506, "Camera controls");
o->box(FL_ENGRAVED_BOX);
{ Fl_Slider* o = m_sldZoom = new Fl_Slider(16, 29, 95, 25, "Zoom");
o->tooltip("Zoom camera in and out");
o->type(1);
o->minimum(0.0001);
o->maximum(0.999);
o->step(0.01);
o->value(0.5);
o->slider_size(0.040404);
o->callback((Fl_Callback*)cb_m_sldZoom);
}
{ Fl_Roller* o = m_rolRotAmt = new Fl_Roller(45, 333, 75, 20, "Rot. ");
o->tooltip("Set rotation amount for key (j,k,i,m,r,R)");
o->type(1);
o->value(0.2);
o->callback((Fl_Callback*)cb_m_rolRotAmt);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Dial* o = m_dialSpin = new Fl_Dial(74, 91, 31, 30, "Spin");
o->tooltip("Spin camera");
o->step(0.05);
o->callback((Fl_Callback*)cb_m_dialSpin);
}
{ Fl_Adjuster* o = m_adjXTrans = new Fl_Adjuster(5, 223, 105, 17, "Move horiz");
o->tooltip("Pan left/right");
o->minimum(-5);
o->maximum(5);
o->callback((Fl_Callback*)cb_m_adjXTrans);
}
{ Fl_Adjuster* o = m_adjYTrans = new Fl_Adjuster(5, 257, 105, 17, "Move vertical");
o->tooltip("Camera up/down");
o->minimum(-5);
o->maximum(5);
o->callback((Fl_Callback*)cb_m_adjYTrans);
}
{ Fl_Adjuster* o = m_adjInOut = new Fl_Adjuster(5, 296, 105, 17, "In/Out");
o->tooltip("Move camera in and out");
o->minimum(-5);
o->maximum(5);
o->callback((Fl_Callback*)cb_m_adjInOut);
}
{ Fl_Roller* o = m_rolTransAmt = new Fl_Roller(45, 358, 75, 15, "Trans.");
o->tooltip("Change translation amount");
o->type(1);
o->maximum(10);
o->value(0.1);
o->callback((Fl_Callback*)cb_m_rolTransAmt);
o->align(FL_ALIGN_LEFT);
}
{ Fl_Button* o = new Fl_Button(24, 378, 65, 25, "Reset");
o->tooltip("Reset camera");
o->callback((Fl_Callback*)cb_Reset);
}
{ Fl_Roller* o = m_rolUpDown = new Fl_Roller(15, 68, 20, 70, "Up/down");
o->tooltip("Rotate the camera up/down");
o->minimum(-1);
o->step(0.01);
o->callback((Fl_Callback*)cb_m_rolUpDown);
}
{ Fl_Roller* o = m_rolLeftRight = new Fl_Roller(16, 158, 85, 20, "Rot left/rignt");
o->tooltip("Rotate left to right");
o->type(1);
o->minimum(-1);
o->step(0.01);
o->callback((Fl_Callback*)cb_m_rolLeftRight);
}
{ Fl_Button* o = new Fl_Button(5, 194, 35, 25, "Zero");
o->tooltip("Zero trans sliders");
o->callback((Fl_Callback*)cb_Zero);
}
{ Fl_Check_Button* o = new Fl_Check_Button(0, 462, 20, 25, "IBar");
o->down_box(FL_DOWN_BOX);
o->value(1);
o->callback((Fl_Callback*)cb_IBar);
}
{ Fl_Check_Button* o = new Fl_Check_Button(0, 483, 25, 20, "Center obj");
o->down_box(FL_DOWN_BOX);
o->callback((Fl_Callback*)cb_Center);
}
o->end();
}
{ JofGTIBar* o = m_view = new JofGTIBar(135, 3, 560, 557);
Fl_Group::current()->resizable(o);
}
o->end();
}
return w;
}
示例13: 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]");
}
}
}
示例14: Init
void CInstaller::Init(int argc, char **argv)
{
const int buttonsy = WindowH()-ButtonHeight()-ButtonHSpacing();
m_pMainWindow = new Fl_Double_Window(WindowW(), WindowH(), "Nixstaller");
m_pMainWindow->callback(CancelCB, this);
Fl_Group *maingroup = new Fl_Group(0, 0, WindowW(), WindowH());
maingroup->resizable(NULL);
maingroup->box(FL_FLAT_BOX);
maingroup->color(fl_lighter(FL_BACKGROUND_COLOR));
Fl_Pack *mainpack = new Fl_Pack(0, 0, WindowW(), WindowH()-90);
mainpack->resizable(NULL);
mainpack->type(Fl_Pack::VERTICAL);
CreateHeader();
m_pWizard = new Fl_Wizard(0, m_pHeaderGroup->h(), WindowW(),
(buttonsy-m_pHeaderGroup->h()-ButtonHSpacing()));
m_pWizard->box(FL_ENGRAVED_BOX);
m_pWizard->end();
mainpack->end();
m_pCancelButton = new Fl_Button(ButtonWOffset(), buttonsy, 0, ButtonHeight(), GetTranslation("Cancel"));
SetButtonWidth(m_pCancelButton);
m_pCancelButton->callback(CancelCB, this);
m_pButtonPack = new Fl_Pack(0, buttonsy, 0, ButtonHeight());
m_pButtonPack->type(Fl_Pack::HORIZONTAL);
m_pButtonPack->spacing(ButtonWSpacing());
m_pBackButton = new Fl_Button(0, buttonsy, 0, ButtonHeight(),
CreateText("@<- %s", GetTranslation("Back")));
SetButtonWidth(m_pBackButton);
m_pBackButton->callback(BackCB, this);
m_pNextButton = new Fl_Button(0, buttonsy, 0, ButtonHeight(),
CreateText("%s @->", GetTranslation("Next")));
SetButtonWidth(m_pNextButton);
m_pNextButton->callback(NextCB, this);
m_pButtonPack->end();
UpdateButtonPack();
maingroup->end();
CBaseInstall::Init(argc, argv);
Fl_Shared_Image *img = Fl_Shared_Image::get(GetLogoFName());
if (img)
{
m_pLogoBox = new Fl_Box(HeaderSpacing(), HeaderSpacing(), img->w()+HeaderSpacing(), img->h());
m_pLogoBox->align(FL_ALIGN_TOP | FL_ALIGN_INSIDE);
m_pLogoBox->image(img);
m_pHeaderGroup->add(m_pLogoBox);
}
int size = m_pWizard->children();
for (int i=0; i<size; i++)
{
CInstallScreen *screen = GetScreen(m_pWizard->child(i));
if (screen->CanActivate())
{
ActivateScreen(screen);
break;
}
}
m_pMainWindow->end();
m_pMainWindow->show(argc, argv);
}
示例15: make_window
Fl_Double_Window* ResonanceUI::make_window() {
{ resonancewindow = new Fl_Double_Window(780, 305, "Resonance");
resonancewindow->user_data((void*)(this));
{ khzvalue = new Fl_Value_Output(415, 264, 45, 18, "kHz");
khzvalue->labelsize(12);
khzvalue->minimum(0.001);
khzvalue->maximum(48);
khzvalue->step(0.01);
khzvalue->textfont(1);
khzvalue->textsize(12);
khzvalue->align(FL_ALIGN_RIGHT);
//this widget must be before the calling widgets
} // Fl_Value_Output* khzvalue
{ dbvalue = new Fl_Value_Output(415, 282, 45, 18, "dB");
dbvalue->labelsize(12);
dbvalue->minimum(-150);
dbvalue->maximum(150);
dbvalue->step(0.1);
dbvalue->textfont(1);
dbvalue->textsize(12);
dbvalue->align(FL_ALIGN_RIGHT);
//this widget must be before the calling widgets
} // Fl_Value_Output* dbvalue
{ Fl_Group* o = new Fl_Group(6, 5, 768, 256);
o->box(FL_BORDER_BOX);
rg=new ResonanceGraph(o->x(),o->y(),o->w(),o->h(),"");
rg->init(respar,khzvalue,dbvalue);
rg->show();
o->end();
} // Fl_Group* o
{ Fl_Button* o = new Fl_Button(690, 283, 84, 17, "Close");
o->box(FL_THIN_UP_BOX);
o->callback((Fl_Callback*)cb_Close);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(491, 264, 66, 15, "Zero");
o->tooltip("Clear the resonance function");
o->box(FL_THIN_UP_BOX);
o->labelfont(1);
o->labelsize(12);
o->callback((Fl_Callback*)cb_Zero);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(491, 282, 66, 18, "Smooth");
o->tooltip("Smooth the resonance function");
o->box(FL_THIN_UP_BOX);
o->labelfont(1);
o->labelsize(12);
o->callback((Fl_Callback*)cb_Smooth);
} // Fl_Button* o
{ Fl_Check_Button* o = enabled = new Fl_Check_Button(6, 270, 78, 27, "Enable");
enabled->box(FL_THIN_UP_BOX);
enabled->down_box(FL_DOWN_BOX);
enabled->callback((Fl_Callback*)cb_enabled);
o->value(respar->Penabled);
} // Fl_Check_Button* enabled
{ maxdb = new Fl_Roller(90, 282, 84, 15);
maxdb->type(1);
maxdb->minimum(1);
maxdb->maximum(90);
maxdb->step(1);
maxdb->value(30);
maxdb->callback((Fl_Callback*)cb_maxdb);
} // Fl_Roller* maxdb
{ Fl_Value_Output* o = maxdbvo = new Fl_Value_Output(126, 264, 24, 18, "Max.");
maxdbvo->tooltip("The Maximum amplitude (dB)");
maxdbvo->labelsize(12);
maxdbvo->minimum(1);
maxdbvo->maximum(127);
maxdbvo->step(1);
maxdbvo->value(30);
maxdbvo->textfont(1);
maxdbvo->textsize(12);
maxdbvo->callback((Fl_Callback*)cb_maxdbvo);
o->value(respar->PmaxdB);
} // Fl_Value_Output* maxdbvo
{ new Fl_Box(150, 264, 24, 18, "dB");
} // Fl_Box* o
{ Fl_Value_Output* o = centerfreqvo = new Fl_Value_Output(210, 264, 33, 18, "C.f.");
centerfreqvo->tooltip("Center Frequency (kHz)");
centerfreqvo->labelsize(12);
centerfreqvo->minimum(1);
centerfreqvo->maximum(10);
centerfreqvo->step(0.01);
centerfreqvo->value(1);
centerfreqvo->textfont(1);
centerfreqvo->textsize(12);
centerfreqvo->callback((Fl_Callback*)cb_centerfreqvo);
centerfreqvo->when(3);
o->value(respar->getcenterfreq()/1000.0);
} // Fl_Value_Output* centerfreqvo
{ Fl_Value_Output* o = octavesfreqvo = new Fl_Value_Output(210, 282, 33, 18, "Oct.");
octavesfreqvo->tooltip("No. of octaves");
octavesfreqvo->labelsize(12);
octavesfreqvo->minimum(1);
octavesfreqvo->maximum(127);
octavesfreqvo->step(1);
octavesfreqvo->value(30);
octavesfreqvo->textfont(1);
octavesfreqvo->textsize(12);
octavesfreqvo->callback((Fl_Callback*)cb_octavesfreqvo);
octavesfreqvo->when(3);
//.........这里部分代码省略.........