|
Carlos Lopez |
a09598 |
/* === S Y N F I G ========================================================= */
|
|
Carlos Lopez |
a09598 |
/*! \file gtkmm/renddesc.cpp
|
|
Carlos Lopez |
a09598 |
** \brief Template File
|
|
Carlos Lopez |
a09598 |
**
|
|
Carlos Lopez |
a09598 |
** $Id$
|
|
Carlos Lopez |
a09598 |
**
|
|
Carlos Lopez |
a09598 |
** \legal
|
|
Carlos Lopez |
a09598 |
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
|
|
Carlos Lopez |
a09598 |
** Copyright (c) 2007 Chris Moore
|
|
Carlos Lopez |
42fd7a |
** Copyright (c) 2010 Carlos Lรณpez
|
|
Carlos Lopez |
a09598 |
**
|
|
Carlos Lopez |
a09598 |
** This package is free software; you can redistribute it and/or
|
|
Carlos Lopez |
a09598 |
** modify it under the terms of the GNU General Public License as
|
|
Carlos Lopez |
a09598 |
** published by the Free Software Foundation; either version 2 of
|
|
Carlos Lopez |
a09598 |
** the License, or (at your option) any later version.
|
|
Carlos Lopez |
a09598 |
**
|
|
Carlos Lopez |
a09598 |
** This package is distributed in the hope that it will be useful,
|
|
Carlos Lopez |
a09598 |
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Carlos Lopez |
a09598 |
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Carlos Lopez |
a09598 |
** General Public License for more details.
|
|
Carlos Lopez |
a09598 |
** \endlegal
|
|
Carlos Lopez |
a09598 |
*/
|
|
Carlos Lopez |
a09598 |
/* ========================================================================= */
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
/* === H E A D E R S ======================================================= */
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#ifdef USING_PCH
|
|
Carlos Lopez |
a09598 |
# include "pch.h"
|
|
Carlos Lopez |
a09598 |
#else
|
|
Carlos Lopez |
a09598 |
#ifdef HAVE_CONFIG_H
|
|
Carlos Lopez |
a09598 |
# include <config.h></config.h>
|
|
Carlos Lopez |
a09598 |
#endif
|
|
Carlos Lopez |
a09598 |
|
|
bw |
94d8a6 |
|
|
Carlos Lopez |
a09598 |
#include <gtkmm label.h=""></gtkmm>
|
|
Carlos Lopez |
a09598 |
#include <gtkmm frame.h=""></gtkmm>
|
|
Carlos Lopez |
a09598 |
#include <gtkmm alignment.h=""></gtkmm>
|
|
Carlos Lopez |
a09598 |
#include <gtkmm box.h=""></gtkmm>
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
#include <gtkmm grid.h=""></gtkmm>
|
|
|
a4bbdd |
#include <gtkmm drawingarea.h=""></gtkmm>
|
|
|
a4bbdd |
|
|
Carlos Lopez |
a09598 |
#include <etl misc=""></etl>
|
|
|
a4bbdd |
|
|
|
a4bbdd |
#include <synfig general.h=""></synfig>
|
|
|
a4bbdd |
|
|
|
a4bbdd |
#include "renddesc.h"
|
|
Carlos Lopez |
a09598 |
|
|
|
abdbf2 |
#include <gui localization.h=""></gui>
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#endif
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
/* === U S I N G =========================================================== */
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
using namespace std;
|
|
Carlos Lopez |
a09598 |
using namespace etl;
|
|
Carlos Lopez |
a09598 |
using namespace synfig;
|
|
Carlos Lopez |
a09598 |
using namespace studio;
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
/* === M A C R O S ========================================================= */
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#ifndef SYNFIG_MAX_PIXEL_WIDTH
|
|
Carlos Lopez |
a09598 |
#define SYNFIG_MAX_PIXEL_WIDTH (~(1<<31))
|
|
Carlos Lopez |
a09598 |
#endif
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#ifndef SYNFIG_MAX_PIXEL_HEIGHT
|
|
Carlos Lopez |
a09598 |
#define SYNFIG_MAX_PIXEL_HEIGHT (~(1<<31))
|
|
Carlos Lopez |
a09598 |
#endif
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#ifndef DPM2DPI
|
|
Carlos Lopez |
a09598 |
#define DPM2DPI(x) ((x)/39.3700787402)
|
|
Carlos Lopez |
a09598 |
#define DPI2DPM(x) ((x)*39.3700787402)
|
|
Carlos Lopez |
a09598 |
#endif
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#ifndef METERS2INCHES
|
|
Carlos Lopez |
a09598 |
#define METERS2INCHES(x) ((x)*39.3700787402)
|
|
Carlos Lopez |
a09598 |
#define INCHES2METERS(x) ((x)/39.3700787402)
|
|
Carlos Lopez |
a09598 |
#endif
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
/* === G L O B A L S ======================================================= */
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
/* === P R O C E D U R E S ================================================= */
|
|
Carlos Lopez |
a09598 |
|
|
|
a4bbdd |
|
|
|
a4bbdd |
class GammaPattern : public Gtk::DrawingArea
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
private:
|
|
|
a4bbdd |
Gamma gamma;
|
|
|
a4bbdd |
int tile_w, tile_h, gradient_h;
|
|
|
a4bbdd |
Cairo::RefPtr<cairo::surfacepattern> pattern;</cairo::surfacepattern>
|
|
|
a4bbdd |
|
|
|
a4bbdd |
public:
|
|
|
a4bbdd |
GammaPattern():
|
|
|
a4bbdd |
tile_w(80),
|
|
|
a4bbdd |
tile_h(80),
|
|
|
a4bbdd |
gradient_h(20)
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
set_size_request(tile_w*4, tile_h*2 + gradient_h*2);
|
|
|
a4bbdd |
|
|
|
a4bbdd |
// make pattern
|
|
|
a4bbdd |
Cairo::RefPtr<cairo::imagesurface> surface =</cairo::imagesurface>
|
|
|
a4bbdd |
Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, 2, 2);
|
|
|
a4bbdd |
Cairo::RefPtr<cairo::context> context = Cairo::Context::create(surface);</cairo::context>
|
|
|
a4bbdd |
context->set_operator(Cairo::OPERATOR_SOURCE);
|
|
|
a4bbdd |
context->set_source_rgba(0, 0, 0, 0);
|
|
|
a4bbdd |
context->rectangle(0, 0, 1, 1);
|
|
|
a4bbdd |
context->fill();
|
|
|
a4bbdd |
context->set_source_rgba(0, 0, 0, 1);
|
|
|
a4bbdd |
context->rectangle(0, 0, 1, 1);
|
|
|
a4bbdd |
context->rectangle(1, 1, 1, 1);
|
|
|
a4bbdd |
context->fill();
|
|
|
a4bbdd |
surface->flush();
|
|
|
a4bbdd |
|
|
|
a4bbdd |
pattern = Cairo::SurfacePattern::create(surface);
|
|
|
a4bbdd |
pattern->set_filter(Cairo::FILTER_NEAREST);
|
|
|
a4bbdd |
pattern->set_extend(Cairo::EXTEND_REPEAT);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
const Gamma& get_gamma() const { return gamma; }
|
|
|
a4bbdd |
|
|
|
a4bbdd |
void set_gamma(const Gamma &x) {
|
|
|
a4bbdd |
if (gamma == x) return;
|
|
|
a4bbdd |
gamma = x;
|
|
|
a4bbdd |
queue_draw();
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
virtual bool on_draw(const Cairo::RefPtr<cairo::context> &cr)</cairo::context>
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
cr->save();
|
|
|
a4bbdd |
|
|
|
a4bbdd |
// prepare colors
|
|
|
a4bbdd |
ColorReal values[3] = {0.25, 0.5, 1};
|
|
|
a4bbdd |
Color colors[3][4];
|
|
|
af4eca |
for(int i = 0; i < 3; ++i) {
|
|
|
a4bbdd |
ColorReal v = values[i];
|
|
|
a4bbdd |
Color *c = colors[i];
|
|
|
a4bbdd |
c[0] = Color(v, v, v);
|
|
|
a4bbdd |
c[1] = Color(v, 0, 0);
|
|
|
a4bbdd |
c[2] = Color(0, v, 0);
|
|
|
a4bbdd |
c[3] = Color(0, 0, v);
|
|
|
a4bbdd |
for(int j = 0; j < 4; ++j)
|
|
|
a4bbdd |
c[j] = gamma.apply(c[j]);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
Color *gray25 = colors[0];
|
|
|
a4bbdd |
Color *gray50 = colors[1];
|
|
|
a4bbdd |
Color *white = colors[2];
|
|
|
a4bbdd |
|
|
|
a4bbdd |
// 50% pattern
|
|
|
a4bbdd |
for(int i = 0; i < 4; ++i)
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
cr->set_source_rgb(white[i].get_r(), white[i].get_g(), white[i].get_b());
|
|
|
a4bbdd |
cr->rectangle(i*tile_w, 0, tile_w, tile_h);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
|
|
|
a4bbdd |
cr->set_source(pattern);
|
|
|
a4bbdd |
cr->rectangle(i*tile_w, 0, tile_w, tile_h);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
|
|
|
a4bbdd |
cr->set_source_rgb(gray50[i].get_r(), gray50[i].get_g(), gray50[i].get_b());
|
|
|
a4bbdd |
cr->rectangle(i*tile_w+tile_w/4, tile_h/4, tile_w-tile_w/2, tile_h-tile_h/2);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
// 25% pattern
|
|
|
a4bbdd |
for(int i = 0; i < 4; ++i)
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
cr->set_source_rgb(gray50[i].get_r(), gray50[i].get_g(), gray50[i].get_b());
|
|
|
a4bbdd |
cr->rectangle(i*tile_w, tile_h, tile_w, tile_h);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
|
|
|
a4bbdd |
cr->set_source(pattern);
|
|
|
a4bbdd |
cr->rectangle(i*tile_w, tile_h, tile_w, tile_h);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
|
|
|
a4bbdd |
cr->set_source_rgb(gray25[i].get_r(), gray25[i].get_g(), gray25[i].get_b());
|
|
|
a4bbdd |
cr->rectangle(i*tile_w+tile_w/4, tile_h+tile_h/4, tile_w-tile_w/2, tile_h-tile_h/2);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
// black and white level pattern
|
|
|
a4bbdd |
cr->set_source_rgb(0, 0, 0);
|
|
|
a4bbdd |
cr->rectangle(0, tile_h*2, tile_w*4, gradient_h);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
cr->set_source_rgb(1, 1, 1);
|
|
|
a4bbdd |
cr->rectangle(0, tile_h*2 + gradient_h, tile_w*4, gradient_h);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
ColorReal level = 1;
|
|
|
a4bbdd |
for(int i = 0; i < 8; ++i)
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
level *= 0.5;
|
|
|
a4bbdd |
Color black = gamma.apply(Color(level, level, level));
|
|
|
a4bbdd |
Color white = gamma.apply(Color(1-level, 1-level, 1-level));
|
|
|
a4bbdd |
double x = tile_w*4*(i/8.0 + 1/16.0);
|
|
|
a4bbdd |
double yb = tile_h*2 + gradient_h/2.0;
|
|
|
a4bbdd |
double yw = yb + gradient_h;
|
|
|
a4bbdd |
double r = gradient_h/4.0;
|
|
|
a4bbdd |
|
|
|
a4bbdd |
cr->set_source_rgb(black.get_r(), black.get_g(), black.get_b());
|
|
|
a4bbdd |
cr->arc(x, yb, r, 0, 2*M_PI);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
|
|
|
a4bbdd |
cr->set_source_rgb(white.get_r(), white.get_g(), white.get_b());
|
|
|
a4bbdd |
cr->arc(x, yw, r, 0, 2*M_PI);
|
|
|
a4bbdd |
cr->fill();
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
cr->restore();
|
|
|
a4bbdd |
return true;
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
}; // END of class GammaPattern
|
|
|
a4bbdd |
|
|
|
a4bbdd |
|
|
Carlos Lopez |
a09598 |
/* === M E T H O D S ======================================================= */
|
|
Carlos Lopez |
a09598 |
|
|
|
a4bbdd |
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::Widget_RendDesc():
|
|
Carlos Lopez |
a09598 |
Gtk::Notebook(),
|
|
|
a4bbdd |
adjustment_width (Gtk::Adjustment::create(1, 1, SYNFIG_MAX_PIXEL_WIDTH)),
|
|
|
a4bbdd |
adjustment_height (Gtk::Adjustment::create(1, 1, SYNFIG_MAX_PIXEL_HEIGHT)),
|
|
|
a4bbdd |
adjustment_xres (Gtk::Adjustment::create(0, 1e-10, 1e7)),
|
|
|
a4bbdd |
adjustment_yres (Gtk::Adjustment::create(0, 1e-10, 1e7)),
|
|
|
a4bbdd |
adjustment_phy_width (Gtk::Adjustment::create(0, 1e-10, 1e7)),
|
|
|
a4bbdd |
adjustment_phy_height(Gtk::Adjustment::create(0, 1e-10, 1e7)),
|
|
|
a4bbdd |
adjustment_fps (Gtk::Adjustment::create(0, 1e-10, 1e7)),
|
|
|
a4bbdd |
adjustment_span (Gtk::Adjustment::create(0, 1e-10, 1e7)),
|
|
|
a4bbdd |
adjustment_gamma_r (Gtk::Adjustment::create(1, 0.1, 3.0, 0.025, 0.025)),
|
|
|
a4bbdd |
adjustment_gamma_g (Gtk::Adjustment::create(1, 0.1, 3.0, 0.025, 0.025)),
|
|
|
a4bbdd |
adjustment_gamma_b (Gtk::Adjustment::create(1, 0.1, 3.0, 0.025, 0.025))
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
update_lock=0;
|
|
Carlos Lopez |
a09598 |
create_widgets();
|
|
Carlos Lopez |
a09598 |
connect_signals();
|
|
|
a4bbdd |
append_page(*create_image_tab(), Glib::ustring(_("Image")));
|
|
|
a4bbdd |
append_page(*create_time_tab(), Glib::ustring(_("Time")));
|
|
|
a4bbdd |
append_page(*create_gamma_tab(), Glib::ustring(_("Gamma correction")));
|
|
|
a4bbdd |
append_page(*create_other_tab(), Glib::ustring(_("Other")));
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::~Widget_RendDesc()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void Widget_RendDesc::set_rend_desc(const synfig::RendDesc &rend_desc)
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
rend_desc_=rend_desc;
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::refresh()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
a4bbdd |
|
|
|
a4bbdd |
// image tab
|
|
|
536d22 |
adjustment_width->set_value(rend_desc_.get_w());
|
|
|
536d22 |
adjustment_height->set_value(rend_desc_.get_h());
|
|
|
536d22 |
adjustment_phy_width->set_value(METERS2INCHES(rend_desc_.get_physical_w()));
|
|
|
536d22 |
adjustment_phy_height->set_value(METERS2INCHES(rend_desc_.get_physical_h()));
|
|
|
536d22 |
adjustment_xres->set_value(DPM2DPI(rend_desc_.get_x_res()));
|
|
|
536d22 |
adjustment_yres->set_value(DPM2DPI(rend_desc_.get_y_res()));
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
toggle_wh_ratio->set_active((bool)(rend_desc_.get_flags()&RendDesc::LINK_IM_ASPECT));
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
toggle_res_ratio->set_active((bool)(rend_desc_.get_flags()&RendDesc::LINK_RES));
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
int w_ratio, h_ratio;
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
rend_desc_.get_pixel_ratio_reduced(w_ratio, h_ratio);
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
std::ostringstream px_ratio_str;
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
px_ratio_str << _("Image Size Ratio : ") << w_ratio << '/' << h_ratio;
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
pixel_ratio_label->set_label(px_ratio_str.str());
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
entry_tl->set_value(rend_desc_.get_tl());
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
entry_br->set_value(rend_desc_.get_br());
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
adjustment_span->set_value(rend_desc_.get_span());
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
|
|
|
a4bbdd |
// time tab
|
|
Carlos Lopez |
a09598 |
entry_start_time->set_fps(rend_desc_.get_frame_rate());
|
|
Carlos Lopez |
a09598 |
entry_start_time->set_value(rend_desc_.get_time_start());
|
|
Carlos Lopez |
a09598 |
entry_end_time->set_fps(rend_desc_.get_frame_rate());
|
|
Carlos Lopez |
a09598 |
entry_end_time->set_value(rend_desc_.get_time_end());
|
|
Carlos Lopez |
3cf655 |
entry_duration->set_fps(rend_desc_.get_frame_rate());
|
|
Carlos Lopez |
3cf655 |
entry_duration->set_value(rend_desc_.get_duration());
|
|
|
536d22 |
adjustment_fps->set_value(rend_desc_.get_frame_rate());
|
|
Carlos Lopez |
a09598 |
|
|
|
a4bbdd |
// gamma tab
|
|
|
a4bbdd |
adjustment_gamma_r->set_value(rend_desc_.get_gamma().get_r());
|
|
|
a4bbdd |
adjustment_gamma_g->set_value(rend_desc_.get_gamma().get_g());
|
|
|
a4bbdd |
adjustment_gamma_b->set_value(rend_desc_.get_gamma().get_b());
|
|
|
a4bbdd |
dynamic_cast<gammapattern*>(gamma_pattern)->set_gamma(rend_desc_.get_gamma().get_inverted());</gammapattern*>
|
|
|
a4bbdd |
|
|
|
a4bbdd |
// other tab
|
|
Carlos Lopez |
a09598 |
toggle_px_aspect->set_active((bool)(rend_desc_.get_flags()&RendDesc::PX_ASPECT));
|
|
Carlos Lopez |
a09598 |
toggle_px_width->set_active((bool)(rend_desc_.get_flags()&RendDesc::PX_W));
|
|
Carlos Lopez |
a09598 |
toggle_px_height->set_active((bool)(rend_desc_.get_flags()&RendDesc::PX_H));
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
toggle_im_aspect->set_active((bool)(rend_desc_.get_flags()&RendDesc::IM_ASPECT));
|
|
Carlos Lopez |
a09598 |
toggle_im_width->set_active((bool)(rend_desc_.get_flags()&RendDesc::IM_W));
|
|
Carlos Lopez |
a09598 |
toggle_im_height->set_active((bool)(rend_desc_.get_flags()&RendDesc::IM_H));
|
|
Carlos Lopez |
a09598 |
toggle_im_span->set_active((bool)(rend_desc_.get_flags()&RendDesc::IM_SPAN));
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
entry_focus->set_value(rend_desc_.get_focus());
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void Widget_RendDesc::apply_rend_desc(const synfig::RendDesc &rend_desc)
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
set_rend_desc(rend_desc);
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
const synfig::RendDesc &
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::get_rend_desc()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
return rend_desc_;
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_width_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
536d22 |
rend_desc_.set_w(round_to_int(adjustment_width->get_value()));
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_lock_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#define DO_TOGGLE(x,y) if(toggle_ ## x->get_active()) \
|
|
Carlos Lopez |
a09598 |
rend_desc_.set_flags(rend_desc_.get_flags()|RendDesc:: y); \
|
|
Carlos Lopez |
a09598 |
else \
|
|
Carlos Lopez |
a09598 |
rend_desc_.set_flags(rend_desc_.get_flags()&~RendDesc:: y)
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
DO_TOGGLE(px_aspect,PX_ASPECT);
|
|
Carlos Lopez |
a09598 |
DO_TOGGLE(px_width,PX_W);
|
|
Carlos Lopez |
a09598 |
DO_TOGGLE(px_height,PX_H);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
DO_TOGGLE(im_aspect,IM_ASPECT);
|
|
Carlos Lopez |
a09598 |
DO_TOGGLE(im_width,IM_W);
|
|
Carlos Lopez |
a09598 |
DO_TOGGLE(im_height,IM_H);
|
|
Carlos Lopez |
a09598 |
DO_TOGGLE(im_span,IM_SPAN);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
#undef DO_TOGGLE
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_height_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
536d22 |
rend_desc_.set_h(round_to_int(adjustment_height->get_value()));
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_phy_width_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
536d22 |
rend_desc_.set_physical_w(INCHES2METERS(adjustment_phy_width->get_value()));
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_phy_height_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
536d22 |
rend_desc_.set_physical_h(INCHES2METERS(adjustment_phy_height->get_value()));
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_xres_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
536d22 |
rend_desc_.set_x_res(DPI2DPM(adjustment_xres->get_value()));
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_yres_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
536d22 |
rend_desc_.set_y_res(DPI2DPM(adjustment_yres->get_value()));
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_start_time_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
Carlos Lopez |
a09598 |
rend_desc_.set_time_start(entry_start_time->get_value());
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_end_time_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
Carlos Lopez |
a09598 |
rend_desc_.set_time_end(entry_end_time->get_value());
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
3cf655 |
Widget_RendDesc::on_duration_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
Carlos Lopez |
3cf655 |
rend_desc_.set_duration(entry_duration->get_value());
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_fps_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
536d22 |
rend_desc_.set_frame_rate(adjustment_fps->get_value());
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_tl_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
Carlos Lopez |
a09598 |
rend_desc_.set_tl(entry_tl->get_value());
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_br_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
Carlos Lopez |
a09598 |
rend_desc_.set_br(entry_br->get_value());
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_focus_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
Carlos Lopez |
a09598 |
rend_desc_.set_focus(entry_focus->get_value());
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::on_span_changed()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
if(update_lock)return;
|
|
Carlos Lopez |
a09598 |
UpdateLock lock(update_lock);
|
|
|
536d22 |
rend_desc_.set_span(adjustment_span->get_value());
|
|
Carlos Lopez |
a09598 |
refresh();
|
|
Carlos Lopez |
a09598 |
signal_changed()();
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
|
a4bbdd |
Widget_RendDesc::on_gamma_changed()
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
if(update_lock)return;
|
|
|
a4bbdd |
UpdateLock lock(update_lock);
|
|
|
a4bbdd |
rend_desc_.set_gamma(Gamma(
|
|
|
a4bbdd |
adjustment_gamma_r->get_value(),
|
|
|
a4bbdd |
adjustment_gamma_g->get_value(),
|
|
|
a4bbdd |
adjustment_gamma_b->get_value() ));
|
|
|
a4bbdd |
refresh();
|
|
|
a4bbdd |
signal_changed()();
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::disable_time_section()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
time_frame->set_sensitive(false);
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::enable_time_section()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
time_frame->set_sensitive(true);
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
|
a4bbdd |
Widget_RendDesc::disable_gamma_section()
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
gamma_frame->set_sensitive(false);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
void
|
|
|
a4bbdd |
Widget_RendDesc::enable_gamma_section()
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
gamma_frame->set_sensitive(true);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
void
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
Widget_RendDesc::on_ratio_wh_toggled()
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
{
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
if(update_lock)return;
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
UpdateLock lock(update_lock);
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
|
|
[d.j.a.y] Jerome Blanchi |
bd2b32 |
if(toggle_wh_ratio->get_active())
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
{
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
rend_desc_.set_pixel_ratio(adjustment_width->get_value(), adjustment_height->get_value());
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
rend_desc_.set_flags(rend_desc_.get_flags()|RendDesc::LINK_IM_ASPECT);
|
|
|
6eafe8 |
rend_desc_.set_flags(rend_desc_.get_flags()&~RendDesc::PX_ASPECT);
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
}
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
else
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
{
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
rend_desc_.set_flags(rend_desc_.get_flags()&~RendDesc::LINK_IM_ASPECT);
|
|
|
6eafe8 |
rend_desc_.set_flags(rend_desc_.get_flags()|RendDesc::PX_ASPECT);
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
}
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
}
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
void
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
Widget_RendDesc::on_ratio_res_toggled()
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
{
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
if(update_lock)return;
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
UpdateLock lock(update_lock);
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
if(toggle_res_ratio->get_active())
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
{
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
rend_desc_.set_res_ratio(adjustment_xres->get_value(), adjustment_yres->get_value());
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
rend_desc_.set_flags(rend_desc_.get_flags()|RendDesc::LINK_RES);
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
}
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
else
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
{
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
rend_desc_.set_flags(rend_desc_.get_flags()&~RendDesc::LINK_RES);
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
}
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
}
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::create_widgets()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
entry_width=manage(new Gtk::SpinButton(adjustment_width,1,0));
|
|
Carlos Lopez |
a09598 |
entry_width->set_alignment(1);
|
|
Carlos Lopez |
a09598 |
entry_height=manage(new Gtk::SpinButton(adjustment_height,1,0));
|
|
Carlos Lopez |
a09598 |
entry_height->set_alignment(1);
|
|
Carlos Lopez |
a09598 |
entry_xres=manage(new Gtk::SpinButton(adjustment_xres,0.5,1));
|
|
Carlos Lopez |
a09598 |
entry_xres->set_alignment(1);
|
|
Carlos Lopez |
a09598 |
entry_yres=manage(new Gtk::SpinButton(adjustment_yres,0.5,1));
|
|
Carlos Lopez |
a09598 |
entry_yres->set_alignment(1);
|
|
Carlos Lopez |
a09598 |
entry_phy_width=manage(new Gtk::SpinButton(adjustment_phy_width,0.25,2));
|
|
Carlos Lopez |
a09598 |
entry_phy_width->set_alignment(1);
|
|
Carlos Lopez |
a09598 |
entry_phy_height=manage(new Gtk::SpinButton(adjustment_phy_height,0.25,2));
|
|
Carlos Lopez |
a09598 |
entry_phy_height->set_alignment(1);
|
|
Carlos Lopez |
a09598 |
entry_span=manage(new Gtk::SpinButton(adjustment_span,0.1,4));
|
|
Carlos Lopez |
a09598 |
entry_span->set_alignment(1);
|
|
Carlos Lopez |
a09598 |
entry_tl=manage(new Widget_Vector());
|
|
[d.j.a.y] Jerome Blanchi |
6a9ede |
entry_tl->set_digits(4);
|
|
Carlos Lopez |
a09598 |
entry_br=manage(new Widget_Vector());
|
|
[d.j.a.y] Jerome Blanchi |
6a9ede |
entry_br->set_digits(4);
|
|
Carlos Lopez |
a09598 |
entry_fps=manage(new Gtk::SpinButton(adjustment_fps,1,5));
|
|
Carlos Lopez |
a09598 |
entry_start_time=manage(new Widget_Time());
|
|
Carlos Lopez |
a09598 |
entry_end_time=manage(new Widget_Time());
|
|
Carlos Lopez |
3cf655 |
entry_duration=manage(new Widget_Time());
|
|
Carlos Lopez |
a09598 |
entry_focus=manage(new Widget_Vector());
|
|
|
a4bbdd |
entry_gamma_r=manage(new Gtk::SpinButton(adjustment_gamma_r,0.01,2));
|
|
|
a4bbdd |
entry_gamma_g=manage(new Gtk::SpinButton(adjustment_gamma_g,0.01,2));
|
|
|
a4bbdd |
entry_gamma_b=manage(new Gtk::SpinButton(adjustment_gamma_b,0.01,2));
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_r=manage(new Gtk::Scale(adjustment_gamma_r));
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_g=manage(new Gtk::Scale(adjustment_gamma_g));
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_b=manage(new Gtk::Scale(adjustment_gamma_b));
|
|
Carlos Lopez |
a09598 |
toggle_px_aspect=manage(new Gtk::CheckButton(_("_Pixel Aspect"), true));
|
|
Carlos Lopez |
a09598 |
toggle_px_aspect->set_alignment(0, 0.5);
|
|
Carlos Lopez |
a09598 |
toggle_px_width=manage(new Gtk::CheckButton(_("Pi_xel Width"), true));
|
|
Carlos Lopez |
a09598 |
toggle_px_width->set_alignment(0, 0.5);
|
|
Carlos Lopez |
a09598 |
toggle_px_height=manage(new Gtk::CheckButton(_("Pix_el Height"), true));
|
|
Carlos Lopez |
a09598 |
toggle_px_height->set_alignment(0, 0.5);
|
|
Carlos Lopez |
a09598 |
toggle_im_aspect=manage(new Gtk::CheckButton(_("Image _Aspect"), true));
|
|
Carlos Lopez |
a09598 |
toggle_im_aspect->set_alignment(0, 0.5);
|
|
Carlos Lopez |
a09598 |
toggle_im_width=manage(new Gtk::CheckButton(_("Image _Width"), true));
|
|
Carlos Lopez |
a09598 |
toggle_im_width->set_alignment(0, 0.5);
|
|
Carlos Lopez |
a09598 |
toggle_im_height=manage(new Gtk::CheckButton(_("Image _Height"), true));
|
|
Carlos Lopez |
a09598 |
toggle_im_height->set_alignment(0, 0.5);
|
|
Carlos Lopez |
a09598 |
toggle_im_span=manage(new Gtk::CheckButton(_("Image _Span"), true));
|
|
Carlos Lopez |
a09598 |
toggle_im_span->set_alignment(0, 0.5);
|
|
[d.j.a.y] Jerome Blanchi |
bcf30c |
|
|
[d.j.a.y] Jerome Blanchi |
0b7a3c |
toggle_wh_ratio=manage(new Widget_Link(_("Link width and height"), _("Unlink width and height")));
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
toggle_res_ratio=manage(new Widget_Link(_("Link x and y resolution"), _("Unlink x and y resolution")));
|
|
[d.j.a.y] Jerome Blanchi |
bd2b32 |
|
|
[d.j.a.y] Jerome Blanchi |
340c6e |
pixel_ratio_label=manage(new Gtk::Label("", 0, 0.5, false));
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
void
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::connect_signals()
|
|
Carlos Lopez |
a09598 |
{
|
|
|
a4bbdd |
entry_width ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_width_changed));
|
|
|
a4bbdd |
entry_height ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_height_changed));
|
|
|
a4bbdd |
entry_xres ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_xres_changed));
|
|
|
a4bbdd |
entry_yres ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_yres_changed));
|
|
|
a4bbdd |
entry_phy_width ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_phy_width_changed));
|
|
|
a4bbdd |
entry_phy_height->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_phy_height_changed));
|
|
|
a4bbdd |
entry_span ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_span_changed));
|
|
|
a4bbdd |
entry_tl ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_tl_changed));
|
|
|
a4bbdd |
entry_br ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_br_changed));
|
|
|
a4bbdd |
entry_fps ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_fps_changed));
|
|
|
a4bbdd |
entry_start_time->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_start_time_changed));
|
|
|
a4bbdd |
entry_end_time ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_end_time_changed));
|
|
|
a4bbdd |
entry_duration ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_duration_changed));
|
|
|
a4bbdd |
entry_focus ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_focus_changed));
|
|
|
a4bbdd |
entry_gamma_r ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_gamma_changed));
|
|
|
a4bbdd |
entry_gamma_g ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_gamma_changed));
|
|
|
a4bbdd |
entry_gamma_b ->signal_value_changed().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_gamma_changed));
|
|
|
a4bbdd |
|
|
Carlos Lopez |
a09598 |
toggle_px_aspect->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
|
|
|
a4bbdd |
toggle_px_width ->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
|
|
Carlos Lopez |
a09598 |
toggle_px_height->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
|
|
Carlos Lopez |
a09598 |
toggle_im_aspect->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
|
|
|
a4bbdd |
toggle_im_width ->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
|
|
Carlos Lopez |
a09598 |
toggle_im_height->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
|
|
|
a4bbdd |
toggle_im_span ->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_lock_changed));
|
|
|
a4bbdd |
toggle_wh_ratio ->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_ratio_wh_toggled));
|
|
[d.j.a.y] Jerome Blanchi |
981c82 |
toggle_res_ratio->signal_toggled().connect(sigc::mem_fun(*this, &studio::Widget_RendDesc::on_ratio_res_toggled));
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Widget *
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::create_image_tab()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
Gtk::Alignment *paddedPanel = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
Carlos Lopez |
a09598 |
paddedPanel->set_padding(12, 12, 12, 12);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
Gtk::Box *panelBox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 12));
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
panelBox->set_homogeneous(false);
|
|
Carlos Lopez |
a09598 |
paddedPanel->add(*panelBox);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
Gtk::Frame *imageSizeFrame = manage(new Gtk::Frame(_("Image Size")));
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeFrame->set_shadow_type(Gtk::SHADOW_NONE);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
((Gtk::Label *) imageSizeFrame->get_label_widget())->set_markup(_("Image Size"));
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
// panelBox->pack_start(*imageSizeFrame, false, false, 0);
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
panelBox->pack_start(*imageSizeFrame, Gtk::PACK_SHRINK);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
Gtk::Alignment *tableSizePadding = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
tableSizePadding->set_padding(6, 0, 24, 0);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
Gtk::Grid *imageSizeGrid = manage(new Gtk::Grid());
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
tableSizePadding->add(*imageSizeGrid);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeFrame->add(*tableSizePadding);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *size_width_label = manage(new Gtk::Label(_("_Width"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
size_width_label->set_mnemonic_widget(*entry_width);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *size_height_label = manage(new Gtk::Label(_("_Height"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
size_height_label->set_mnemonic_widget(*entry_height);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *size_xres_label = manage(new Gtk::Label(_("_XRes"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
size_xres_label->set_mnemonic_widget(*entry_xres);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *size_yres_label = manage(new Gtk::Label(_("_YRes"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
size_yres_label->set_mnemonic_widget(*entry_yres);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *size_physwidth_label = manage(new Gtk::Label(_("_Physical Width"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
size_physwidth_label->set_mnemonic_widget(*entry_phy_width);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *size_physheight_label = manage(new Gtk::Label(_("Phy_sical Height"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
size_physheight_label->set_mnemonic_widget(*entry_phy_height);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->set_row_spacing(6);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*size_width_label, 0, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*size_height_label, 0, 1, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
entry_width->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
entry_height->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*entry_width, 1, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*entry_height, 1, 1, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
toggle_wh_ratio->set_margin_right(6);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*toggle_wh_ratio, 2, 0, 1, 2);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*size_xres_label, 3, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*size_yres_label, 3, 1, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
entry_xres->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
entry_yres->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*entry_xres, 4, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*entry_yres, 4, 1, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
toggle_res_ratio->set_margin_right(6);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*toggle_res_ratio, 5, 0, 1, 2);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*size_physwidth_label, 6, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*size_physheight_label, 6, 1, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
entry_phy_width->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
entry_phy_height->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*entry_phy_width, 7, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*entry_phy_height, 7, 1, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
|
|
[d.j.a.y] Jerome Blanchi |
9a82c8 |
imageSizeGrid->attach(*pixel_ratio_label, 0, 3, 3, 1);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Frame *imageAreaFrame = manage(new Gtk::Frame(_("Image Area")));
|
|
Carlos Lopez |
a09598 |
imageAreaFrame->set_shadow_type(Gtk::SHADOW_NONE);
|
|
Carlos Lopez |
a09598 |
((Gtk::Label *) imageAreaFrame->get_label_widget())->set_markup(_("Image Area"));
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
//panelBox->pack_start(*imageAreaFrame, false, false, 0);
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
panelBox->pack_start(*imageAreaFrame, Gtk::PACK_SHRINK);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Alignment *imageAreaPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
Carlos Lopez |
a09598 |
imageAreaPadding->set_padding(6, 0, 24, 0);
|
|
Carlos Lopez |
a09598 |
imageAreaFrame->add(*imageAreaPadding);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
Gtk::Box *imageAreaBox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL,12));
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
Gtk::Box *imageAreaTlbrLabelBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL,6));
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
Gtk::Box *imageAreaTlbrBox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL,6));
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
Gtk::Box *imageAreaSpanBox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL,6));
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaPadding->add(*imageAreaBox);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *imageAreaTopLeftLabel = manage(new Gtk::Label(_("_Top Left"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
imageAreaTopLeftLabel->set_mnemonic_widget(*entry_tl);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *imageAreaBottomRightLabel = manage(new Gtk::Label(_("_Bottom Right"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
imageAreaBottomRightLabel->set_mnemonic_widget(*entry_br);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
ff93bc |
Gtk::Label *size_span = manage(new Gtk::Label(_("I_mage Span"), 0, 0.5, true));
|
|
[d.j.a.y] Jerome Blanchi |
ff93bc |
size_span->set_mnemonic_widget(*entry_span);
|
|
[d.j.a.y] Jerome Blanchi |
ff93bc |
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaTlbrLabelBox->pack_start(*imageAreaTopLeftLabel);
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaTlbrLabelBox->pack_start(*imageAreaBottomRightLabel);
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaTlbrBox->pack_start(*entry_tl);
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaTlbrBox->pack_start(*entry_br);
|
|
[d.j.a.y] Jerome Blanchi |
ff93bc |
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaSpanBox->pack_start(*size_span);
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaSpanBox->pack_start(*entry_span);
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaBox->pack_start(*imageAreaTlbrLabelBox);
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaBox->pack_start(*imageAreaTlbrBox);
|
|
[d.j.a.y] Jerome Blanchi |
9c8ef8 |
imageAreaBox->pack_start(*imageAreaSpanBox);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
paddedPanel->show_all();
|
|
Carlos Lopez |
a09598 |
return paddedPanel;
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Widget *
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::create_time_tab()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
Gtk::Alignment *paddedPanel = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
Carlos Lopez |
a09598 |
paddedPanel->set_padding(12, 12, 12, 12);
|
|
|
a4bbdd |
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
Gtk::Box *panelBox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 12)); // for future widgets
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
panelBox->set_homogeneous(false);
|
|
Carlos Lopez |
a09598 |
paddedPanel->add(*panelBox);
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Frame *frame = manage(new Gtk::Frame(_("Time Settings")));
|
|
|
a4bbdd |
frame->set_shadow_type(Gtk::SHADOW_NONE);
|
|
|
a4bbdd |
((Gtk::Label*)frame->get_label_widget())->set_markup(_("Time Settings"));
|
|
|
a4bbdd |
panelBox->pack_start(*frame, Gtk::PACK_SHRINK);
|
|
|
a4bbdd |
time_frame = frame;
|
|
|
a4bbdd |
|
|
|
a4bbdd |
Gtk::Alignment *framePadding = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
|
a4bbdd |
framePadding->set_padding(6, 0, 24, 0);
|
|
|
a4bbdd |
frame->add(*framePadding);
|
|
|
a4bbdd |
|
|
|
a4bbdd |
Gtk::Grid *frameGrid = manage(new Gtk::Grid());
|
|
|
a4bbdd |
framePadding->add(*frameGrid);
|
|
|
a4bbdd |
frameGrid->set_row_spacing(6);
|
|
|
a4bbdd |
frameGrid->set_column_spacing(250);
|
|
|
a4bbdd |
int row = 0;
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Label *label = manage(new Gtk::Label(_("_Frames per second"), 0, 0.5, true));
|
|
|
a4bbdd |
label->set_mnemonic_widget(*entry_fps);
|
|
|
a4bbdd |
frameGrid->attach(*label, 0, row, 1, 1);
|
|
|
a4bbdd |
entry_fps->set_hexpand(true);
|
|
|
a4bbdd |
frameGrid->attach(*entry_fps, 1, row++, 1, 1);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Label *label = manage(new Gtk::Label(_("_Start Time"), 0, 0.5, true));
|
|
|
a4bbdd |
label->set_mnemonic_widget(*entry_start_time);
|
|
|
a4bbdd |
frameGrid->attach(*label, 0, row, 1, 1);
|
|
|
a4bbdd |
frameGrid->attach(*entry_start_time, 1, row++, 1, 1);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Label *label = manage(new Gtk::Label(_("_End Time"), 0, 0.5, true));
|
|
|
a4bbdd |
label->set_mnemonic_widget(*entry_end_time);
|
|
|
a4bbdd |
frameGrid->attach(*label, 0, row, 1, 1);
|
|
|
a4bbdd |
frameGrid->attach(*entry_end_time, 1, row++, 1, 1);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Label *label = manage(new Gtk::Label(_("_Duration"), 0, 0.5, true));
|
|
|
a4bbdd |
label->set_mnemonic_widget(*entry_duration);
|
|
|
a4bbdd |
frameGrid->attach(*label, 0, row, 1, 1);
|
|
|
a4bbdd |
frameGrid->attach(*entry_duration, 1, row++, 1, 1);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
paddedPanel->show_all();
|
|
|
a4bbdd |
return paddedPanel;
|
|
|
a4bbdd |
}
|
|
Carlos Lopez |
a09598 |
|
|
|
a4bbdd |
Gtk::Widget *
|
|
|
a4bbdd |
Widget_RendDesc::create_gamma_tab()
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Alignment *paddedPanel = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
|
a4bbdd |
paddedPanel->set_padding(12, 12, 12, 12);
|
|
Carlos Lopez |
3cf655 |
|
|
|
a4bbdd |
Gtk::Box *panelBox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 12));
|
|
|
a4bbdd |
panelBox->set_homogeneous(false);
|
|
|
a4bbdd |
paddedPanel->add(*panelBox);
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Frame *frame = manage(new Gtk::Frame(_("Gamma Correction Settings")));
|
|
|
a4bbdd |
frame->set_shadow_type(Gtk::SHADOW_NONE);
|
|
|
a4bbdd |
((Gtk::Label*)frame->get_label_widget())->set_markup(_("Gamma Correction Settings"));
|
|
|
a4bbdd |
panelBox->pack_start(*frame, Gtk::PACK_SHRINK);
|
|
|
a4bbdd |
|
|
|
a4bbdd |
Gtk::Alignment *framePadding = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
Keyikedalube Ndang |
31db4c |
framePadding->set_padding(6, 0, 6, 0);
|
|
|
a4bbdd |
frame->add(*framePadding);
|
|
|
a4bbdd |
gamma_frame = frame;
|
|
|
a4bbdd |
|
|
|
a4bbdd |
Gtk::Grid *frameGrid = manage(new Gtk::Grid());
|
|
|
a4bbdd |
framePadding->add(*frameGrid);
|
|
Keyikedalube Ndang |
5d9a7f |
frameGrid->set_row_spacing(10);
|
|
Keyikedalube Ndang |
5d9a7f |
frameGrid->set_column_spacing(10);
|
|
|
a4bbdd |
int row = 0;
|
|
Keyikedalube Ndang |
31db4c |
int col = 0;
|
|
|
a4bbdd |
|
|
|
a4bbdd |
gamma_pattern = manage(new GammaPattern());
|
|
Keyikedalube Ndang |
5d9a7f |
gamma_pattern->set_halign(Gtk::ALIGN_START);
|
|
Keyikedalube Ndang |
5d9a7f |
frameGrid->attach(*gamma_pattern, col, row, 1, 1);
|
|
Keyikedalube Ndang |
5d9a7f |
|
|
Keyikedalube Ndang |
5d9a7f |
// place this grid within frameGrid on column 2
|
|
Keyikedalube Ndang |
5d9a7f |
// for labels, scales and spin buttons
|
|
Keyikedalube Ndang |
5d9a7f |
Gtk::Grid *controlsGrid = manage(new Gtk::Grid());
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->set_row_spacing(10);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->set_column_spacing(5);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->set_column_homogeneous(false);
|
|
Keyikedalube Ndang |
5d9a7f |
frameGrid->attach(*controlsGrid, col+1, row, 1, 1);
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Label *label = manage(new Gtk::Label(_("_Red"), 0, 0.5, true));
|
|
|
a4bbdd |
label->set_mnemonic_widget(*entry_gamma_r);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*label, col, row, 1, 1);
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_r->set_hexpand(true);
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_r->set_draw_value(false);
|
|
Keyikedalube Ndang |
3cab2c |
scale_gamma_r->set_round_digits(1);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*scale_gamma_r, col+1, row, 1, 1);
|
|
Keyikedalube Ndang |
5d9a7f |
//entry_gamma_r->set_hexpand(true);
|
|
Keyikedalube Ndang |
5d9a7f |
entry_gamma_r->set_halign(Gtk::ALIGN_END);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*entry_gamma_r, col+2, row++, 1, 1);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Label *label = manage(new Gtk::Label(_("_Green"), 0, 0.5, true));
|
|
|
a4bbdd |
label->set_mnemonic_widget(*entry_gamma_g);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*label, col, row, 1, 1);
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_g->set_hexpand(true);
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_g->set_draw_value(false);
|
|
Keyikedalube Ndang |
3cab2c |
scale_gamma_g->set_round_digits(1);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*scale_gamma_g, col+1, row, 1, 1);
|
|
Keyikedalube Ndang |
5d9a7f |
//entry_gamma_g->set_hexpand(true);
|
|
Keyikedalube Ndang |
5d9a7f |
entry_gamma_g->set_halign(Gtk::ALIGN_END);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*entry_gamma_g, col+2, row++, 1, 1);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
|
a4bbdd |
{
|
|
|
a4bbdd |
Gtk::Label *label = manage(new Gtk::Label(_("_Blue"), 0, 0.5, true));
|
|
|
a4bbdd |
label->set_mnemonic_widget(*entry_gamma_b);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*label, col, row, 1, 1);
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_b->set_hexpand(true);
|
|
Keyikedalube Ndang |
31db4c |
scale_gamma_b->set_draw_value(false);
|
|
Keyikedalube Ndang |
3cab2c |
scale_gamma_b->set_round_digits(1);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*scale_gamma_b, col+1, row, 1, 1);
|
|
Keyikedalube Ndang |
5d9a7f |
//entry_gamma_b->set_hexpand(true);
|
|
Keyikedalube Ndang |
5d9a7f |
entry_gamma_b->set_halign(Gtk::ALIGN_END);
|
|
Keyikedalube Ndang |
5d9a7f |
controlsGrid->attach(*entry_gamma_b, col+2, row, 1, 1);
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
}
|
|
|
a4bbdd |
|
|
Carlos Lopez |
a09598 |
paddedPanel->show_all();
|
|
Carlos Lopez |
a09598 |
return paddedPanel;
|
|
Carlos Lopez |
a09598 |
}
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Widget *
|
|
Carlos Lopez |
a09598 |
Widget_RendDesc::create_other_tab()
|
|
Carlos Lopez |
a09598 |
{
|
|
Carlos Lopez |
a09598 |
Gtk::Alignment *paddedPanel = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
Carlos Lopez |
a09598 |
paddedPanel->set_padding(12, 12, 12, 12);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
Gtk::Box *panelBox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 12));
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
panelBox->set_homogeneous(false);
|
|
Carlos Lopez |
a09598 |
paddedPanel->add(*panelBox);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Frame *lockFrame = manage(new Gtk::Frame(_("Locks and Links")));
|
|
Carlos Lopez |
a09598 |
lockFrame->set_shadow_type(Gtk::SHADOW_NONE);
|
|
Carlos Lopez |
a09598 |
((Gtk::Label *) lockFrame->get_label_widget())->set_markup(_("Locks and Links"));
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
panelBox->pack_start(*lockFrame, Gtk::PACK_SHRINK);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Alignment *lockPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
Carlos Lopez |
a09598 |
lockPadding->set_padding(6, 0, 24, 0);
|
|
Carlos Lopez |
a09598 |
lockFrame->add(*lockPadding);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
Gtk::Grid *lockGrid = manage(new Gtk::Grid());
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->set_row_spacing(6);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->set_column_spacing(12);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockPadding->add(*lockGrid);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->attach(*toggle_im_width, 0, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
toggle_im_width->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->attach(*toggle_im_height, 1, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
toggle_im_height->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->attach(*toggle_im_aspect, 2, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
toggle_im_aspect->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->attach(*toggle_im_span, 3, 0, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
toggle_im_span->set_hexpand(true);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->attach(*toggle_px_width, 0, 1, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->attach(*toggle_px_height, 1, 1, 1, 1);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
lockGrid->attach(*toggle_px_aspect, 2, 1, 1, 1);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Frame *focusFrame = manage(new Gtk::Frame(_("Focus Point")));
|
|
Carlos Lopez |
a09598 |
focusFrame->set_shadow_type(Gtk::SHADOW_NONE);
|
|
Carlos Lopez |
a09598 |
((Gtk::Label *) focusFrame->get_label_widget())->set_markup(_("Focus Point"));
|
|
[d.j.a.y] Jerome Blanchi |
7c15b5 |
panelBox->pack_start(*focusFrame, Gtk::PACK_SHRINK);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Alignment *focusPadding = manage(new Gtk::Alignment(0, 0, 1, 1));
|
|
Carlos Lopez |
a09598 |
focusPadding->set_padding(6, 0, 24, 0);
|
|
Carlos Lopez |
a09598 |
focusFrame->add(*focusPadding);
|
|
Carlos Lopez |
a09598 |
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
Gtk::Box *focusBox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 12));
|
|
Carlos Lopez |
a09598 |
focusPadding->add(*focusBox);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
Gtk::Label *focusLabel = manage(new Gtk::Label(_("_Focus Point"), 0, 0.5, true));
|
|
Carlos Lopez |
a09598 |
focusLabel->set_mnemonic_widget(*entry_focus);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
focusBox->pack_start(*focusLabel, Gtk::PACK_SHRINK);
|
|
[d.j.a.y] Jerome Blanchi |
89bcba |
focusBox->pack_start(*entry_focus, Gtk::PACK_EXPAND_WIDGET);
|
|
Carlos Lopez |
a09598 |
|
|
Carlos Lopez |
a09598 |
paddedPanel->show_all();
|
|
Carlos Lopez |
a09598 |
return paddedPanel;
|
|
Carlos Lopez |
a09598 |
}
|