Save_Widget::Save_Widget() : _plugin (0), _compression_widget(0) { //DJV_DEBUG("Save_Widget::Save_Widget"); // Create widgets. Group_Box * group = new Group_Box(label_compression_group); _compression_widget = new Radio_Button_Group(label_compression()); // Layout. Vertical_Layout * layout = new Vertical_Layout(this); layout->margin(Style::global()->margin_large()); layout->spacing(Style::global()->spacing_large()); layout->add(group); group->layout()->add(_compression_widget); layout->add_stretch(); // Initialize. plugin_update(); widget_update(); // Callbacks. _compression_widget->signal.set(this, compression_callback); }
Save_Widget::Save_Widget() : _plugin (0), _color_profile_widget(0), _black_widget (0), _white_widget (0), _gamma_widget (0) { // Create color profile widgets. Group_Box * color_profile_group = new Group_Box(label_color_profile_group); _color_profile_widget = new Radio_Button_Group(label_color_profile()); Group_Box * film_print_group = new Group_Box(label_film_print_group); _black_widget = new Int_Edit_Slider(0, 1023); _white_widget = new Int_Edit_Slider(0, 1023); _gamma_widget = new Float_Edit_Slider(0.01, 4.0); // Layout. Vertical_Layout * layout = new Vertical_Layout(this); layout->margin(Style::global()->margin_large()); layout->spacing(Style::global()->spacing_large()); layout->add(color_profile_group); color_profile_group->layout()->add(_color_profile_widget); color_profile_group->layout()->add(film_print_group); Form_Widget * form_widget = new Form_Widget; film_print_group->layout()->add(form_widget); form_widget->add_row(label_film_print_black, _black_widget); form_widget->add_row(label_film_print_white, _white_widget); form_widget->add_row(label_film_print_gamma, _gamma_widget); layout->add_stretch(); // Initialize. _black_widget->default_value(Save::Options().film_print.black); _white_widget->default_value(Save::Options().film_print.white); _gamma_widget->default_value(Save::Options().film_print.gamma); plugin_update(); widget_update(); // Callbacks. _color_profile_widget->signal.set(this, color_profile_callback); _black_widget->signal.set(this, black_callback); _white_widget->signal.set(this, white_callback); _gamma_widget->signal.set(this, gamma_callback); }
Application::Application(int argc, char ** argv) : djv::Application("djv_play2_test", argc, argv), _frame(0), _image0(0), _image1(0), _window(0) { File::seq_extensions.add(List<String>() << ".ppm" << ".PPM"); // Command line. if (argc != 2) { print("usage: test_image_play2 (input)"); exit(EXIT_ERROR); return; } _file.set(argv[1]); if (_file.is_seq_valid()) { _file.type(File::SEQ); } is_valid(true); // Widgets. _window = new djv::Window(name()); _widget = new Widget; // Layout. Vertical_Layout * layout = new Vertical_Layout(_window); layout->margin(0); layout->add(_widget); layout->stretch(_widget); // Initialize. _image_buf.resize(20); List<Image_Ptr>::size_type i = 0; for (; i < _image_buf.size(); ++i) { _image_buf[i].p = new Image_Ppm; } i = 0; for (; i < _image_buf.size() - 1; ++i) { _image_buf[i].next = &_image_buf[i + 1]; } _image_buf[i].next = &_image_buf[0]; _image0 = &_image_buf[0]; _image0->p->load(_file.get(_file.seq().list[_frame])); _image0->frame = _frame; _image1 = &_image_buf[0]; //update(); Fl::add_idle(update_callback, this); _window->size(_image0->p->info().size); _window->show(); // Callbacks. _window->close_signal.set(this, exit_callback); }
Application::Application(int argc, char ** argv) : djv::Application("djv_play_test", argc, argv), _load (0), _window(0), _frame (0) { // Command line. if (argc != 2) { print("usage: djv_play_test (input)"); exit(EXIT_ERROR); return; } _file.set(argv[1]); if (_file.is_seq_valid()) { _file.type(File::SEQ); } try { _load = Image_Load_Factory::global()->get(_file, &_info); } catch (Error error) { this->error(error); exit(EXIT_ERROR); return; } is_valid(true); // Widgets. _window = new djv::Window(name()); _widget = new Widget; // Layout. Vertical_Layout * layout = new Vertical_Layout(_window); layout->margin(0); layout->add(_widget); layout->stretch(_widget); // Initialize. //update(); Fl::add_idle(update_callback, this); //_widget->zoom(0.5); _window->size(_info.size); _window->show(); // Callbacks. _window->close_signal.set(this, exit_callback); }