Exemplo n.º 1
0
int main(int argc, char **argv) {
	ThemeLoader::init();
	IconLoader::init();
	win = new EdeWindow(455, 485, "Theme demo");
	win->begin();
	{ Fl_Button* o = new Fl_Button(355, 450, 90, 25, "Load");
	  o->tooltip("Load predefined theme");
	  o->callback(load_theme_cb);
	} // Fl_Button* o
	{ Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 455, 25);
	  o->menu(menu_);
	} // Fl_Menu_Bar* o
	{ Fl_Round_Button* o = new Fl_Round_Button(5, 285, 90, 25, "round");
	  o->down_box(FL_ROUND_DOWN_BOX);
	} // Fl_Round_Button* o
	{ new Fl_Return_Button(5, 195, 90, 25, "button");
	} // Fl_Return_Button* o
	{ new Fl_Input(160, 196, 285, 25, "input:");
	} // Fl_Input* o
	{ Fl_Output* o = new Fl_Output(160, 225, 285, 25, "output:");
	  o->value("Some output value");
	} // Fl_Output* o
	{ Fl_File_Browser* o = new Fl_File_Browser(5, 30, 210, 125);
	  o->load("/");
	} // Fl_File_Browser* o
	{ Fl_Check_Browser* o = new Fl_Check_Browser(220, 30, 225, 125);
	  o->add("foo");
	  o->add("foo");
	  o->add("foo");
	} // Fl_Check_Browser* o
	{ Fl_Progress* o = new Fl_Progress(5, 160, 210, 25, "progress bar");
	  o->value(50);
	} // Fl_Progress* o
	{ Fl_Slider* o = new Fl_Slider(220, 160, 225, 25);
	  o->type(1);
	  o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
	} // Fl_Slider* o
	{ new Fl_Light_Button(5, 225, 90, 25, "button");
	} // Fl_Light_Button* o
	{ Fl_Check_Button* o = new Fl_Check_Button(5, 255, 90, 25, "check");
	  o->down_box(FL_DOWN_BOX);
	} // Fl_Check_Button* o
	{ Fl_File_Input* o = new Fl_File_Input(160, 256, 285, 35, "file:");
	  o->value("/home/foo/baz/taz.txt");
	} // Fl_File_Input* o
	{ Fl_Text_Editor* o = new Fl_Text_Editor(160, 325, 285, 115, "Text editor");
	  o->buffer(new Fl_Text_Buffer());
	} // Fl_Text_Editor* o
	{ Fl_Box* o = new Fl_Box(25, 328, 80, 80, "image");
	  IconLoader::set(o, "utilities-terminal", ICON_SIZE_MEDIUM);
	} // Fl_Box* o
	win->end();
	win->show(argc, argv);

	Fl::run();
	ThemeLoader::shutdown();
	IconLoader::shutdown();
	return 0;
}
Exemplo n.º 2
0
FltDesignUI::FltDesignUI() {
  Fl_Window* w;
  { Fl_Window* o = mainWindow = new Fl_Window(439, 249, "Filter Design UI");
    w = o;
    o->user_data((void*)(this));
    { Fl_Group* o = kernel = new Fl_Group(0, 20, 272, 140, "Filter Kernel");
      o->box(FL_ENGRAVED_FRAME);
      o->when(FL_WHEN_CHANGED);
      { Fl_Value_Input* o = ele0 = new Fl_Value_Input(5, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele0);
      }
      { Fl_Value_Input* o = ele1 = new Fl_Value_Input(58, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele1);
      }
      { Fl_Value_Input* o = ele2 = new Fl_Value_Input(111, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele2);
      }
      { Fl_Value_Input* o = ele3 = new Fl_Value_Input(164, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele3);
      }
      { Fl_Value_Input* o = ele4 = new Fl_Value_Input(217, 26, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele4);
      }
      { Fl_Value_Input* o = ele5 = new Fl_Value_Input(5, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele5);
      }
      { Fl_Value_Input* o = ele6 = new Fl_Value_Input(58, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele6);
      }
      { Fl_Value_Input* o = ele7 = new Fl_Value_Input(111, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele7);
      }
      { Fl_Value_Input* o = ele8 = new Fl_Value_Input(164, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele8);
      }
      { Fl_Value_Input* o = ele9 = new Fl_Value_Input(217, 52, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele9);
      }
      { Fl_Value_Input* o = ele10 = new Fl_Value_Input(5, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele10);
      }
      { Fl_Value_Input* o = ele11 = new Fl_Value_Input(58, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele11);
      }
      { Fl_Value_Input* o = ele12 = new Fl_Value_Input(111, 78, 50, 25);
        o->maximum(255);
        o->value(1);
        o->callback((Fl_Callback*)cb_ele12);
      }
      { Fl_Value_Input* o = ele13 = new Fl_Value_Input(164, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele13);
      }
      { Fl_Value_Input* o = ele14 = new Fl_Value_Input(217, 78, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele14);
      }
      { Fl_Value_Input* o = ele15 = new Fl_Value_Input(5, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele15);
      }
      { Fl_Value_Input* o = ele16 = new Fl_Value_Input(58, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele16);
      }
      { Fl_Value_Input* o = ele17 = new Fl_Value_Input(111, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele17);
      }
      { Fl_Value_Input* o = ele18 = new Fl_Value_Input(164, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele18);
      }
      { Fl_Value_Input* o = ele19 = new Fl_Value_Input(217, 104, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele19);
      }
      { Fl_Value_Input* o = ele20 = new Fl_Value_Input(5, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele20);
      }
      { Fl_Value_Input* o = ele21 = new Fl_Value_Input(58, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele21);
      }
      { Fl_Value_Input* o = ele22 = new Fl_Value_Input(111, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele22);
      }
      { Fl_Value_Input* o = ele23 = new Fl_Value_Input(164, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele23);
      }
      { Fl_Value_Input* o = ele24 = new Fl_Value_Input(217, 130, 50, 25);
        o->maximum(255);
        o->callback((Fl_Callback*)cb_ele24);
      }
      o->end();
    }
    { Fl_Value_Input* o = scale = new Fl_Value_Input(112, 163, 154, 25, "Divide by::");
      o->maximum(255);
      o->value(1);
      o->callback((Fl_Callback*)cb_scale);
    }
    { Fl_Value_Input* o = offset = new Fl_Value_Input(112, 191, 154, 25, "Offset:");
      o->maximum(255);
      o->callback((Fl_Callback*)cb_offset);
    }
    { Fl_Group* o = new Fl_Group(280, 20, 160, 64, "Filter Range");
      o->box(FL_ENGRAVED_FRAME);
      { Fl_Round_Button* o = image = new Fl_Round_Button(284, 27, 68, 28, "Whole Image");
        o->type(102);
        o->down_box(FL_ROUND_DOWN_BOX);
      }
      { Fl_Round_Button* o = selection = new Fl_Round_Button(284, 51, 68, 28, "Brush Selection");
        o->type(102);
        o->down_box(FL_ROUND_DOWN_BOX);
      }
      o->end();
    }
    { Fl_Button* o = new Fl_Button(4, 224, 124, 24, "Load");
      o->callback((Fl_Callback*)cb_Load);
    }
    { Fl_Button* o = new Fl_Button(144, 224, 124, 24, "Save");
      o->callback((Fl_Callback*)cb_Save);
    }
    { Fl_Button* o = new Fl_Button(280, 125, 156, 24, "Preview");
      o->callback((Fl_Callback*)cb_Preview);
    }
    { Fl_Button* o = new Fl_Button(280, 159, 156, 24, "Cancel");
      o->callback((Fl_Callback*)cb_Cancel);
    }
    { Fl_Button* o = new Fl_Button(280, 192, 156, 24, "Accept");
      o->callback((Fl_Callback*)cb_Accept);
    }
    { Fl_Button* o = new Fl_Button(280, 224, 156, 24, "Close");
      o->callback((Fl_Callback*)cb_Close);
    }
    o->end();
  }
}