本文整理汇总了C++中Fl_Group::color方法的典型用法代码示例。如果您正苦于以下问题:C++ Fl_Group::color方法的具体用法?C++ Fl_Group::color怎么用?C++ Fl_Group::color使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fl_Group
的用法示例。
在下文中一共展示了Fl_Group::color方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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_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;
}
示例3: 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 );
}
示例4: 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();
}
示例5: labelsize
/* Fl_Group( X, Y, W, H, L) */
Chain::Chain ( ) : Fl_Group( 0, 0, 100, 100, "")
{
/* not really deleting here, but reusing this variable */
_deleting = true;
int X = 0;
int Y = 0;
int W = 100;
int H = 100;
/* _outs = 1; */
/* _ins = 1; */
_configure_outputs_callback = NULL;
_strip = NULL;
_name = NULL;
labelsize( 10 );
align( FL_ALIGN_TOP );
{ Fl_Flip_Button* o = tab_button = new Fl_Flip_Button( X, Y, W, 16, "chain/controls");
o->type(1);
o->labelsize( 12 );
o->callback( cb_handle, this );
}
Y += 18;
H -= 18;
{ Fl_Group *o = chain_tab = new Fl_Group( X, Y, W, H, "" );
o->labeltype( FL_NO_LABEL );
o->box( FL_FLAT_BOX );
// o->color( fl_darker( FL_BACKGROUND_COLOR ) );
// o->color( FL_BACKGROUND_COLOR );
// o->box( FL_NO_BOX );
{ Fl_Packscroller *o = new Fl_Packscroller( X, Y, W, H );
o->color( FL_BACKGROUND_COLOR );
// o->box( FL_FLAT_BOX );
o->box( FL_THIN_UP_BOX );
o->type( Fl_Scroll::VERTICAL );
{ Fl_Pack *o = modules_pack = new Fl_Pack( X, Y, W, H );
o->type( Fl_Pack::VERTICAL );
o->spacing( 6 );
o->end();
Fl_Group::current()->resizable( o );
}
o->end();
}
o->end();
}
{ Fl_Group *o = control_tab = new Fl_Group( X, Y, W, H, "" );
o->box( FL_FLAT_BOX );
o->color( FL_BACKGROUND_COLOR );
o->labeltype( FL_NO_LABEL );
o->hide();
{ Fl_Scroll *o = new Fl_Scroll( X, Y, W, H );
o->color( FL_BACKGROUND_COLOR );
o->box( FL_NO_BOX );
o->type( Fl_Scroll::VERTICAL );
{ Fl_Pack *o = controls_pack = new Fl_Pack( X, Y, W, H );
o->type( Fl_Pack::VERTICAL );
o->spacing( 5 );
// o->color( FL_RED );
o->end();
Fl_Group::current()->resizable( o );
}
o->end();
Fl_Group::current()->resizable( o );
}
o->end();
o->hide();
Fl_Group::current()->resizable( o );
}
end();
log_create();
_deleting = false;
}
示例6: 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);
}
示例7: Fl_Scroll
ModelerUserInterface::ModelerUserInterface() {
// Make this instance the current one
instance = this;
// Initialize pointers to NULL
m_nativeChooser = NULL;
model = NULL;
currentGroup = NULL;
// Set appearance to GTK+ for a nice look
Fl::scheme("gtk+");
// Set the animation speed to 24 frames/second
framesPerSecond = 24;
// We're not animating yet.
animating = false;
// Set the color scheme
Fl::set_color(FL_BACKGROUND_COLOR, 240, 240, 240);
Fl::set_color(FL_BACKGROUND2_COLOR, 255, 255, 255);
Fl::set_color(FL_FOREGROUND_COLOR, 0, 0, 0);
Fl::set_color(FL_INACTIVE_COLOR, 128, 128, 128);
Fl::set_color(FL_SELECTION_COLOR, 51, 153, 255);
// Create all of the UI elements
// (autogenerated by FLUID, the FLTK UI Designer)
Fl_Double_Window* w;
//const char* title = "CSEP457 Modeler";
const char* title = "CSEP557 Modeler";
{ Fl_Double_Window* o = m_controlsWindow = new Fl_Double_Window(800, 625, title);
w = o;
o->callback((Fl_Callback*)cb_m_controlsWindow, (void*)(this));
o->when(FL_WHEN_NEVER);
{ Fl_Menu_Bar* o = m_controlsMenuBar = new Fl_Menu_Bar(0, 0, 800, 25);
o->menu(menu_m_controlsMenuBar);
}
// Contains the controls on the left
{ leftPane = new Fl_Group(0, 25, 250, 600);
int tabSpace = -25, controlSpace = 0;
{ Fl_Tile* o = m_controlSplitPane = new Fl_Tile(0, 50 + tabSpace, 250, 575 - tabSpace);
o->box(FL_FLAT_BOX);
{ Fl_Tree* o = m_controlsTree = new Fl_Tree(0, 50 + tabSpace, 250, 100);
o->when(FL_WHEN_CHANGED);
o->callback((Fl_Callback*)TreeCallback);
o->marginleft(-5);
o->end();
}
{ Fl_Scroll* o = m_controlsScroll =
new Fl_Scroll(0, 150 + tabSpace, 250, 475 - tabSpace - controlSpace);
o->type(Fl_Scroll::VERTICAL);
o->when(FL_WHEN_CHANGED);
{ Fl_Pack* o = m_controlsPack =
new Fl_Pack(10, 150 + tabSpace, 215, 475 - tabSpace - controlSpace);
Fl_Group::current()->resizable(o);
o->spacing(2);
o->end();
}
o->end();
}
o->end();
} // end Modeler group/tab
leftPane->end();
} // left pane
{ // TODO: remove this extra brace!
{ Fl_Group* o = m_viewPane = new Fl_Group(250, 25, 550, 600);
o->box(FL_NO_BOX);
o->color(FL_BACKGROUND_COLOR);
m_modelerView = new ModelerView(250, 25, 550, 600, "");
w->resizable(m_modelerView);
o->end();
Fl_Group::current()->resizable(o);
}
}
o->end();
}
}
示例8: make_window
void ColorFltkMenu::make_window() {
size(400, 305);
{
{ Fl_Hold_Browser* o = categorybrowser = new Fl_Hold_Browser(10, 55, 125, 100, "Categories");
o->align(FL_ALIGN_TOP);
o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
o->callback(category_cb, this);
VMDFLTKTOOLTIP(o, "Select color category then name to set active color")
}
{ Fl_Hold_Browser* o = itembrowser = new Fl_Hold_Browser(140, 55, 120, 100, "Names");
o->align(FL_ALIGN_TOP);
o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
o->callback(item_cb, this);
VMDFLTKTOOLTIP(o, "Select color category then name to set active color")
}
{ Fl_Hold_Browser* o = colorbrowser = new Fl_Hold_Browser(265, 55, 125, 100, "Colors");
o->align(FL_ALIGN_TOP);
o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
o->callback(color_cb, this);
VMDFLTKTOOLTIP(o, "Select color category then name to set active color")
}
new Fl_Box(10, 10, 190, 25, "Assign colors to categories:");
{ Fl_Tabs* o = new Fl_Tabs(0, 165, 400, 150);
#if defined(VMDMENU_WINDOW)
o->color(VMDMENU_WINDOW, FL_GRAY);
o->selection_color(VMDMENU_WINDOW);
#endif
{ Fl_Group* o = new Fl_Group(0, 185, 400, 125, "Color Definitions");
#if defined(VMDMENU_WINDOW)
o->color(VMDMENU_WINDOW, FL_GRAY);
o->selection_color(VMDMENU_WINDOW);
#endif
{ Fl_Hold_Browser* o = colordefbrowser = new Fl_Hold_Browser(15, 195, 135, 100);
o->labeltype(FL_NO_LABEL);
o->color(VMDMENU_BROWSER_BG, VMDMENU_BROWSER_SEL);
o->callback(colordef_cb, this);
VMDFLTKTOOLTIP(o, "Select color name to adjust RGB color definition")
}
{ Fl_Value_Slider* o = redscale = new Fl_Value_Slider(160, 195, 225, 20);
o->type(FL_HORIZONTAL);
o->color(VMDMENU_COLOR_RSLIDER);
o->callback(rgb_cb, this);
VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition")
}
{ Fl_Value_Slider* o = greenscale = new Fl_Value_Slider(160, 215, 225, 20);
o->type(FL_HORIZONTAL);
o->color(VMDMENU_COLOR_GSLIDER);
o->callback(rgb_cb, this);
VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition")
}
{ Fl_Value_Slider* o = bluescale = new Fl_Value_Slider(160, 235, 225, 20);
o->type(FL_HORIZONTAL);
o->color(VMDMENU_COLOR_BSLIDER);
o->callback(rgb_cb, this);
VMDFLTKTOOLTIP(o, "Adjust slider to change RGB color definition")
}
{ Fl_Button* o = grayscalebutton = new Fl_Button(165, 265, 85, 25, "Grayscale");
o->type(FL_TOGGLE_BUTTON);
#if defined(VMDMENU_WINDOW)
o->color(VMDMENU_WINDOW, FL_GRAY);
#endif
VMDFLTKTOOLTIP(o, "Lock sliders for grayscale color")
}
defaultbutton = new Fl_Button(290, 265, 85, 25, "Default");
#if defined(VMDMENU_WINDOW)
defaultbutton->color(VMDMENU_WINDOW, FL_GRAY);
#endif
defaultbutton->callback(default_cb, this);
VMDFLTKTOOLTIP(defaultbutton, "Reset to original RGB color")
o->end();
}
{ Fl_Group* o = new Fl_Group(0, 185, 400, 125, "Color Scale");
#if defined(VMDMENU_WINDOW)
o->color(VMDMENU_WINDOW, FL_GRAY);
o->selection_color(VMDMENU_WINDOW);
#endif
o->hide();
{ Fl_Choice* o = scalemethod = new Fl_Choice(15, 220, 80, 25, "Method");
o->color(VMDMENU_CHOOSER_BG, VMDMENU_CHOOSER_SEL);
o->down_box(FL_BORDER_BOX);
o->align(FL_ALIGN_TOP);
o->callback(scalemethod_cb, this);
}
offsetvalue = new Fl_Value_Slider(160, 205, 180, 20, "Offset");
offsetvalue->type(FL_HORIZONTAL);
offsetvalue->color(VMDMENU_SLIDER_BG, VMDMENU_SLIDER_FG);
offsetvalue->align(FL_ALIGN_LEFT);
offsetvalue->range(-1.0, 1.0);
offsetvalue->callback(scalesettings_cb, this);
{ Fl_Value_Slider* o = midpointvalue = new Fl_Value_Slider(160, 235, 180, 20, "Midpoint");
o->type(FL_HORIZONTAL);
midpointvalue->align(FL_ALIGN_LEFT);
midpointvalue->color(VMDMENU_SLIDER_BG, VMDMENU_SLIDER_FG);
o->range(0.0, 1.0);
o->callback(scalesettings_cb, this);
}
image = new ColorscaleImage(10, 265, 380, 25, app);
o->end();
}
//.........这里部分代码省略.........
示例9:
SciCalc::SciCalc() {
{ win = new Fl_Double_Window(181, 262, "ecalc");
win->user_data((void*)(this));
{ leddisplay = new Fl_Box(5, 3, 172, 24, "0 ");
leddisplay->box(FL_DOWN_BOX);
leddisplay->color((Fl_Color)207);
leddisplay->labelfont(1);
leddisplay->labelsize(16);
leddisplay->labelcolor((Fl_Color)59);
leddisplay->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
} // Fl_Box* leddisplay
{ box_DEGRAD = new Fl_Box(24, 27, 35, 15, " ");
box_DEGRAD->box(FL_ENGRAVED_BOX);
box_DEGRAD->labelsize(9);
box_DEGRAD->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
} // Fl_Box* box_DEGRAD
{ box_bracket = new Fl_Box(59, 27, 65, 15);
box_bracket->box(FL_ENGRAVED_BOX);
box_bracket->labelsize(9);
box_bracket->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
} // Fl_Box* box_bracket
{ box_M = new Fl_Box(124, 27, 35, 15, "M");
box_M->box(FL_ENGRAVED_BOX);
box_M->labelsize(9);
box_M->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
} // Fl_Box* box_M
{ Fl_Group* o = new Fl_Group(46, 44, 93, 22);
o->color((Fl_Color)46);
{ radio_2 = new Fl_Button(49, 48, 20, 15, "2");
radio_2->type(102);
radio_2->labelsize(10);
radio_2->labelcolor((Fl_Color)1);
radio_2->callback((Fl_Callback*)cb_radio_2);
} // Fl_Button* radio_2
{ radio_8 = new Fl_Button(70, 48, 21, 15, "8");
radio_8->type(102);
radio_8->labelsize(10);
radio_8->labelcolor((Fl_Color)1);
radio_8->callback((Fl_Callback*)cb_radio_8);
} // Fl_Button* radio_8
{ radio_10 = new Fl_Button(92, 48, 21, 15, "10");
radio_10->type(102);
radio_10->value(1);
radio_10->labelsize(10);
radio_10->labelcolor((Fl_Color)1);
radio_10->callback((Fl_Callback*)cb_radio_10);
} // Fl_Button* radio_10
{ radio_16 = new Fl_Button(114, 48, 21, 15, "16");
radio_16->type(102);
radio_16->labelsize(10);
radio_16->labelcolor((Fl_Color)1);
radio_16->callback((Fl_Callback*)cb_radio_16);
} // Fl_Button* radio_16
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(3, 163, 107, 94);
o->box(FL_FLAT_BOX);
o->color((Fl_Color)43);
{ but_7 = new Fl_Button(6, 167, 32, 20, "7");
but_7->shortcut(0x37);
but_7->labelfont(1);
but_7->labelsize(16);
but_7->callback((Fl_Callback*)cb_but_7);
} // Fl_Button* but_7
{ but_8 = new Fl_Button(41, 167, 32, 20, "8");
but_8->shortcut(0x38);
but_8->labelfont(1);
but_8->labelsize(16);
but_8->callback((Fl_Callback*)cb_but_8);
} // Fl_Button* but_8
{ but_9 = new Fl_Button(75, 167, 32, 20, "9");
but_9->shortcut(0x39);
but_9->labelfont(1);
but_9->labelsize(16);
but_9->callback((Fl_Callback*)cb_but_9);
} // Fl_Button* but_9
{ but_4 = new Fl_Button(6, 189, 32, 20, "4");
but_4->shortcut(0x34);
but_4->labelfont(1);
but_4->labelsize(16);
but_4->callback((Fl_Callback*)cb_but_4);
} // Fl_Button* but_4
{ but_5 = new Fl_Button(41, 189, 32, 20, "5");
but_5->shortcut(0x35);
but_5->labelfont(1);
but_5->labelsize(16);
but_5->callback((Fl_Callback*)cb_but_5);
} // Fl_Button* but_5
{ but_6 = new Fl_Button(75, 189, 32, 20, "6");
but_6->shortcut(0x36);
but_6->labelfont(1);
but_6->labelsize(16);
but_6->callback((Fl_Callback*)cb_but_6);
} // Fl_Button* but_6
{ but_1 = new Fl_Button(6, 211, 32, 20, "1");
but_1->shortcut(0x31);
but_1->labelfont(1);
but_1->labelsize(16);
but_1->callback((Fl_Callback*)cb_but_1);
} // Fl_Button* but_1
//.........这里部分代码省略.........
示例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" );
//.........这里部分代码省略.........
示例11: if
//.........这里部分代码省略.........
o->textfont(FL_HELVETICA);
o->textsize(FL_NORMAL_SIZE - 1);
o->box(FL_FLAT_BOX);
std::string s;
s += "<h3>Keyboard Shortcuts</h3>";
s += "<table border=1>";
{
std::vector<std::pair<std::string, std::string> > s0 = GetShortcutsUsage();
for(unsigned int i = 0; i < s0.size(); i++)
s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>";
}
s += "</table>";
s += "<h3>Mouse Actions</h3>";
s += "<table border=1>";
{
std::vector<std::pair<std::string, std::string> > s0 = GetMouseUsage();
for(unsigned int i = 0; i < s0.size(); i++)
s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>";
}
s += "</table>";
s += "For a 2 button mouse, Middle button = Shift+Left button.<p>";
s += "For a 1 button mouse, Middle button = Shift+Left button, "
"Right button = Alt+Left button.";
s += "<h3>Command Line Switches</h3>";
s += "<table border=1>";
{
std::vector<std::pair<std::string, std::string> > s0 = GetUsage();
for(unsigned int i = 0; i < s0.size(); i++)
if(s0[i].first.size() && s0[i].second.size())
s += "<tr><td>" + s0[i].first + "</td><td>" + s0[i].second + "</td></tr>";
else if(s0[i].first.size() && s0[i].second.empty())
s += "</table>" + s0[i].first + "<table border=1>";
}
s += "</table>";
o->value(s.c_str());
basic->resizable(o);
basic->position(Fl::x() + Fl::w()/2 - width / 2,
Fl::y() + Fl::h()/2 - height / 2);
basic->end();
}
{
int width = 40 * FL_NORMAL_SIZE;
int height = 18 * BH;
options = new paletteWindow
(width, height, CTX::instance()->nonModalWindows ? true : false,
"Current Options and Workspace");
options->box(GMSH_WINDOW_BOX);
int BW = (width - 4 * WB) / 3;
modified = new Fl_Check_Button
(WB, WB, BW, BH, "Only show modified");
modified->type(FL_TOGGLE_BUTTON);
modified->callback(help_options_cb);
modified->tooltip("Show only values different from defaults");
showhelp = new Fl_Check_Button
(2 * WB + BW, WB, BW, BH, "Show help");
showhelp->type(FL_TOGGLE_BUTTON);
showhelp->callback(help_options_cb);
showhelp->tooltip("Show help strings");
Fl_Group* o = new Fl_Group(3 * WB + 2 * BW, WB, BW, BH);
o->tooltip("Filter values");
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
search = new Fl_Input
(3 * WB + 2 * BW + BH, WB + 2, BW - BH - 2, BH - 4, "@gmsh_search");
search->box(FL_FLAT_BOX);
search->callback(help_options_cb);
search->when(FL_WHEN_CHANGED);
//search->take_focus(); cannot call this here - it triggers show() on Linux in fltk 1.3.3
o->resizable(search);
o->end();
browser = new Fl_Browser(0, BH + 2 * WB, width, height - BH - 2 * WB);
browser->box(GMSH_SIMPLE_TOP_BOX);
browser->textfont(FL_SCREEN);
browser->textsize(FL_NORMAL_SIZE - 2);
browser->type(FL_MULTI_BROWSER);
browser->callback(browser_cb);
browser->tooltip("Double-click to edit value");
browser->scrollbar_size(std::max(10, FL_NORMAL_SIZE - 2)); // thinner scrollbars
options->resizable(browser);
options->position(Fl::x() + Fl::w()/2 - width / 2,
Fl::y() + Fl::h()/2 - height / 2);
options->size_range(width, height);
options->end();
}
}
示例12:
SciCalc::SciCalc() {
Fl_Window* w;
{Fl_Window* o = win = new Fl_Window(181, 262, "eCalc");
w = o;
o->label_type(FL_NO_LABEL);
o->shortcut(0xff1b);
o->user_data((void*)(this));
o->align();
{Fl_Box* o = leddisplay = new Fl_Box(2, 2, 176, 24, "Welcome");
o->box(FL_THIN_DOWN_BOX);
o->label_font(fl_fonts+4);
o->color((Fl_Color)207);
o->label_color((Fl_Color)59);
o->label_size(14);
o->callback((Fl_Callback*)cb_leddisplay);
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
}
{Fl_Box* o = box_DEGRAD = new Fl_Box(24, 28, 35, 16);
o->box(FL_THIN_DOWN_BOX);
o->label_color((Fl_Color)1);
o->label_size(9);
o->callback((Fl_Callback*)cb_box_DEGRAD);
o->align(FL_ALIGN_INSIDE);
}
{Fl_Box* o = box_bracket = new Fl_Box(59, 28, 65, 16);
o->box(FL_THIN_DOWN_BOX);
o->label_color((Fl_Color)1);
o->label_size(9);
o->align(FL_ALIGN_INSIDE);
}
{Fl_Box* o = box_M = new Fl_Box(124, 28, 35, 16);
o->box(FL_THIN_DOWN_BOX);
o->label_color((Fl_Color)1);
o->label_size(9);
o->callback((Fl_Callback*)cb_box_M);
o->align(FL_ALIGN_INSIDE);
}
{Fl_Group* o = new Fl_Group(46, 46, 93, 22);
o->color((Fl_Color)46);
{Fl_Button* o = radio_2 = new Fl_Button(3, 3, 20, 15, "2");
o->type(Fl_Button::RADIO);
o->label_color((Fl_Color)1);
o->label_size(10);
o->shortcut(0x40062);
o->callback((Fl_Callback*)cb_radio_2);
o->tooltip("Binary mode");
}
{Fl_Button* o = radio_8 = new Fl_Button(24, 3, 21, 15, "8");
o->type(Fl_Button::RADIO);
o->label_color((Fl_Color)1);
o->label_size(10);
o->shortcut(0x4006f);
o->callback((Fl_Callback*)cb_radio_8);
o->tooltip("Octal mode");
}
{Fl_Button* o = radio_10 = new Fl_Button(46, 3, 21, 15, "10");
o->type(Fl_Button::RADIO);
o->label_color((Fl_Color)1);
o->label_size(10);
o->shortcut(0x40064);
o->value(1);
o->callback((Fl_Callback*)cb_radio_10);
o->tooltip("Decimal mode");
}
{Fl_Button* o = radio_16 = new Fl_Button(68, 3, 21, 15, "16");
o->type(Fl_Button::RADIO);
o->label_color((Fl_Color)1);
o->label_size(10);
o->shortcut(0x40068);
o->callback((Fl_Callback*)cb_radio_16);
o->tooltip("Hex mode");
}
o->end();
}
{Fl_Group* o = new Fl_Group(3, 163, 107, 94);
o->box(FL_BORDER_BOX);
o->color((Fl_Color)43);
{Fl_Button* o = but_7 = new Fl_Button(3, 4, 32, 20, "7");
o->label_font(fl_fonts+1);
o->label_size(14);
o->shortcut(0x37);
o->callback((Fl_Callback*)cb_but_7);
}
{Fl_Button* o = but_8 = new Fl_Button(38, 4, 32, 20, "8");
o->label_font(fl_fonts+1);
o->label_size(14);
o->shortcut(0x38);
o->callback((Fl_Callback*)cb_but_8);
}
{Fl_Button* o = but_9 = new Fl_Button(72, 4, 32, 20, "9");
o->label_font(fl_fonts+1);
o->label_size(14);
o->shortcut(0x39);
o->callback((Fl_Callback*)cb_but_9);
}
{Fl_Button* o = but_4 = new Fl_Button(3, 26, 32, 20, "4");
o->label_font(fl_fonts+1);
o->label_size(14);
o->shortcut(0x34);
o->callback((Fl_Callback*)cb_but_4);
//.........这里部分代码省略.........
示例13: make_zoom_panel
Fl_Double_Window* make_zoom_panel() {
{ zoom_panel_window = new Fl_Double_Window(670, 490, "Zoom Panel Window");
{ Fl_Group* o = new Fl_Group(0, 6, 417, 148);
o->box(FL_UP_BOX);
o->color((Fl_Color)92);
{ Fl_Group* o = new Fl_Group(22, 6, 380, 118);
{ x_cmap_range_min_box = new Fl_Value_Input(163, 44, 89, 25, "Cmap Range(X): Min");
x_cmap_range_min_box->callback((Fl_Callback*)x_cmap_range_min_box_cb);
x_cmap_range_min_box->when(FL_WHEN_RELEASE);
} // Fl_Value_Input* x_cmap_range_min_box
{ x_cmap_range_max_box = new Fl_Value_Input(302, 44, 95, 25, "Max");
x_cmap_range_max_box->value(1);
x_cmap_range_max_box->callback((Fl_Callback*)x_cmap_range_max_box_cb);
x_cmap_range_max_box->when(FL_WHEN_RELEASE);
} // Fl_Value_Input* x_cmap_range_max_box
{ x_display_range_min_box = new Fl_Value_Input(163, 74, 89, 25, "Display Range(X): Min");
x_display_range_min_box->callback((Fl_Callback*)x_display_range_min_box_cb);
x_display_range_min_box->when(FL_WHEN_RELEASE);
} // Fl_Value_Input* x_display_range_min_box
{ x_display_range_max_box = new Fl_Value_Input(302, 74, 95, 25, "Max");
x_display_range_max_box->value(1);
x_display_range_max_box->callback((Fl_Callback*)x_display_range_max_box_cb);
x_display_range_max_box->when(FL_WHEN_RELEASE);
} // Fl_Value_Input* x_display_range_max_box
{ x_hist_range_max_box = new Fl_Output(302, 15, 95, 25, "Max");
x_hist_range_max_box->color((Fl_Color)31);
} // Fl_Output* x_hist_range_max_box
{ x_hist_range_min_box = new Fl_Output(163, 15, 89, 25, "Hist Range(X): Min");
x_hist_range_min_box->color((Fl_Color)31);
x_hist_range_min_box->selection_color(FL_BACKGROUND2_COLOR);
} // Fl_Output* x_hist_range_min_box
{ x_display_range_min_slider = new Fl_Slider(137, 101, 115, 19);
x_display_range_min_slider->type(5);
x_display_range_min_slider->callback((Fl_Callback*)x_display_range_min_slider_cb);
x_display_range_min_slider->align(Fl_Align(FL_ALIGN_LEFT));
} // Fl_Slider* x_display_range_min_slider
{ Fl_Slider* o = x_display_range_max_slider = new Fl_Slider(277, 102, 120, 18);
x_display_range_max_slider->type(5);
x_display_range_max_slider->callback((Fl_Callback*)x_display_range_max_slider_cb);
o->value(o->maximum());
} // Fl_Slider* x_display_range_max_slider
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(402, 18, 5, 84);
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(420, 5, 245, 455);
o->box(FL_UP_BOX);
o->color((Fl_Color)214);
{ y_hist_range_max_box = new Fl_Output(562, 12, 93, 25, "Hist Range(Y) Max:");
y_hist_range_max_box->color(FL_DARK1);
y_hist_range_max_box->callback((Fl_Callback*)y_hist_range_max_box_cf);
} // Fl_Output* y_hist_range_max_box
{ y_hist_range_min_box = new Fl_Output(517, 421, 95, 25, "Min:");
y_hist_range_min_box->color((Fl_Color)46);
y_hist_range_min_box->callback((Fl_Callback*)y_hist_range_min_box_cf);
} // Fl_Output* y_hist_range_min_box
{ y_cmap_range_max_box = new Fl_Value_Input(446, 88, 70, 20, "Cmap Range(Y) \nMax:");
y_cmap_range_max_box->callback((Fl_Callback*)y_cmap_range_max_box_cb);
y_cmap_range_max_box->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Value_Input* y_cmap_range_max_box
{ y_cmap_range_min_box = new Fl_Value_Input(446, 372, 70, 20, "Min:");
y_cmap_range_min_box->callback((Fl_Callback*)y_cmap_range_min_box_cb);
y_cmap_range_min_box->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Value_Input* y_cmap_range_min_box
{ y_display_range_max_box = new Fl_Value_Input(565, 88, 72, 19, "Display Range(Y)\nMax:");
y_display_range_max_box->callback((Fl_Callback*)y_display_range_max_box_cb);
y_display_range_max_box->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Value_Input* y_display_range_max_box
{ y_display_range_min_box = new Fl_Value_Input(565, 371, 72, 19, "Min:");
y_display_range_min_box->callback((Fl_Callback*)y_display_range_min_box_cb);
y_display_range_min_box->align(Fl_Align(FL_ALIGN_TOP));
} // Fl_Value_Input* y_display_range_min_box
{ y_cmap_range_max_slider = new Fl_Slider(470, 122, 20, 98);
y_cmap_range_max_slider->type(4);
y_cmap_range_max_slider->callback((Fl_Callback*)y_cmap_range_max_slider_cb);
} // Fl_Slider* y_cmap_range_max_slider
{ Fl_Slider* o = y_display_range_min_slider = new Fl_Slider(590, 234, 20, 98);
y_display_range_min_slider->type(4);
y_display_range_min_slider->callback((Fl_Callback*)y_display_range_min_slider_cb);
o->value(o->minimum());
} // Fl_Slider* y_display_range_min_slider
{ Fl_Slider* o = y_cmap_range_min_slider = new Fl_Slider(470, 235, 20, 98);
y_cmap_range_min_slider->type(4);
y_cmap_range_min_slider->callback((Fl_Callback*)y_cmap_range_min_slider_cb);
o->value(o->minimum());
} // Fl_Slider* y_cmap_range_min_slider
{ y_display_range_max_slider = new Fl_Slider(590, 120, 20, 98);
y_display_range_max_slider->type(4);
y_display_range_max_slider->callback((Fl_Callback*)y_display_range_max_slider_cb);
} // Fl_Slider* y_display_range_max_slider
o->end();
} // Fl_Group* o
zoom_panel_window->end();
} // Fl_Double_Window* zoom_panel_window
return zoom_panel_window;
}
示例14: Fl_Tile
ModelerUserInterface::ModelerUserInterface() {
// Make this instance the current one
instance = this;
// Initialize pointers to NULL
m_nativeChooser = NULL;
model = NULL;
currentGroup = NULL;
renderGroup = NULL;
defaultCam = NULL;
ps = NULL;
movieWidth = 720;
movieHeight = 480;
// Set appearance to GTK+ for a nice look
Fl::scheme("gtk+");
// Set the animation speed to 24 frames/second
framesPerSecond = 24;
// We're not animating yet.
animating = false;
simulating = false;
rendering = false;
drawing = false;
// Set the color scheme
Fl::set_color(FL_BACKGROUND_COLOR, 240, 240, 240);
Fl::set_color(FL_BACKGROUND2_COLOR, 255, 255, 255);
Fl::set_color(FL_FOREGROUND_COLOR, 0, 0, 0);
Fl::set_color(FL_INACTIVE_COLOR, 128, 128, 128);
Fl::set_color(FL_SELECTION_COLOR, 51, 153, 255);
// Create all of the UI elements
// (autogenerated by FLUID, the FLTK UI Designer)
Fl_Double_Window* w;
const char* title = "Animator";
{ Fl_Double_Window* o = m_controlsWindow = new Fl_Double_Window(800, 625, title);
w = o;
o->callback((Fl_Callback*)cb_m_controlsWindow, (void*)(this));
o->when(FL_WHEN_NEVER);
{ Fl_Menu_Bar* o = m_controlsMenuBar = new Fl_Menu_Bar(0, 0, 800, 25);
o->menu(menu_m_controlsMenuBar);
}
// Contains the controls on the left
{ leftPane = new Fl_Group(0, 25, 250, 600);
int tabSpace = 0, controlSpace = 0;
int controlTop = 25 + 600 - controlSpace;
// Modeler and Curves tabs
{ Fl_Tabs* t = new Fl_Tabs(0, 25, 250, 600 - controlSpace);
// Make the tab area stretch.
leftPane->resizable(t);
t->when(FL_WHEN_CHANGED);
t->callback((Fl_Callback*)TabsCallback, this);
// Curves tab
{ Fl_Group* o = new Fl_Group(0, 50, 250, 575 - controlSpace, "Curves");
o->box(FL_FLAT_BOX);
o->color(FL_BACKGROUND_COLOR);
{ Fl_Tree* o = curvesTree = new Fl_Tree(0, 50, 250, 575 - controlSpace);
o->when(FL_WHEN_CHANGED);
o->callback((Fl_Callback*)CurveTreeCallback);
o->marginleft(-5);
o->end();
}
o->end();
}
// Modeler tab
{ Fl_Tile* o = m_controlSplitPane =
new Fl_Tile(0, 50 + tabSpace, 250, 575 + tabSpace - controlSpace, "Modeler");
// Make only the content area of the tabs resize.
t->resizable(o);
o->box(FL_FLAT_BOX);
{ Fl_Tree* o = m_controlsTree = new Fl_Tree(0, 50 + tabSpace, 250, 100);
o->when(FL_WHEN_CHANGED);
o->callback((Fl_Callback*)TreeCallback);
o->marginleft(-5);
o->end();
}
{ Fl_Scroll* o = m_controlsScroll =
new Fl_Scroll(0, 150 + tabSpace, 250, 475 - tabSpace - controlSpace);
o->type(Fl_Scroll::VERTICAL);
o->when(FL_WHEN_CHANGED);
{ Fl_Pack* o = m_controlsPack =
new Fl_Pack(10, 150 + tabSpace, 215, 475 - tabSpace - controlSpace);
Fl_Group::current()->resizable(o);
o->spacing(2);
o->end();
}
o->end();
}
o->end();
} // end Modeler group/tab
t->end();
} // end tabs
leftPane->end();
} // left pane
{ // TODO: remove this extra brace!
//.........这里部分代码省略.........