// Fl_Matte_Button Simple Example #include #include #include #include #include #include #include "FL/Fl_Matte_Button.H" void Pushed_CB(Fl_Widget*w,void*) { printf("* Pushed *\n"); } int main() { Fl_Window win(0,0,800,200,"Simple Matte Button Example"); //// // CHECK FOR SEE-THROUGH AREAS //// Fl_Box *bx1 = new Fl_Box(10,10,100,FL_MATTE_BUTTON_HEIGHT); //// bx1->color(FL_RED); //// bx1->box(FL_FLAT_BOX); Fl::visible_focus(0); Fl_Matte_Button *gry = new Fl_Matte_Button(10+(120*0),10,100,FL_MATTE_BUTTON_HEIGHT,"Gray Igj 1"); gry->callback(Pushed_CB); Fl_Matte_Button *cyn = new Fl_Matte_Button(10+(120*1),10,100,FL_MATTE_BUTTON_HEIGHT,"Cyan Igj 2"); cyn->color(FL_CYAN); cyn->down_color(FL_CYAN); cyn->callback(Pushed_CB); Fl_Matte_Button *yel = new Fl_Matte_Button(10+(120*2),10,100,FL_MATTE_BUTTON_HEIGHT,"Yellow Igj 3"); yel->color(FL_YELLOW); yel->down_color(FL_YELLOW); yel->callback(Pushed_CB); Fl_Matte_Button *grn = new Fl_Matte_Button(10+(120*3),10,100,FL_MATTE_BUTTON_HEIGHT,"Green Igj 4"); grn->color(FL_GREEN); grn->down_color(FL_GREEN); grn->callback(Pushed_CB); Fl_Matte_Button *orn = new Fl_Matte_Button(10+(120*4),10,100,FL_MATTE_BUTTON_HEIGHT,"Orange Igj 5"); orn->color(FL_ORANGE); orn->down_color(FL_ORANGE); orn->callback(Pushed_CB); Fl_Matte_Button *red = new Fl_Matte_Button(10+(120*5),10,100,FL_MATTE_BUTTON_HEIGHT,"Red Igj 6"); red->color(FL_RED); red->down_color(FL_RED); red->callback(Pushed_CB); for ( int x=10; xx()?FL_GRAY: xx()?FL_CYAN: xx()?FL_YELLOW: xx()?FL_GREEN: xx()?FL_ORANGE: FL_RED; Fl_Matte_Button *b = new Fl_Matte_Button(x,45,21,FL_MATTE_BUTTON_HEIGHT,""); b->color(c); b->down_color(c); b->callback(Pushed_CB); } // REGULAR BUTTONS REFERECE Fl_Button *b4 = new Fl_Button(10,135,100,FL_MATTE_BUTTON_HEIGHT,"Button Igj 3"); b4->callback(Pushed_CB); // REGULAR BUTTONS REFERECE Fl_Button *b5 = new Fl_Button(150,135,100,FL_MATTE_BUTTON_HEIGHT,"Button Igj 3"); b5->box(FL_PLASTIC_UP_BOX); b5->callback(Pushed_CB); win.end(); win.resizable(win); win.show(); return(Fl::run()); }