1 /* === S Y N F I G ========================================================= */
2 /*! \file framedial.cpp
3 ** \brief Template File
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 ** Copyright (c) 2009 Gerco Ballintijn
11 ** This package is free software; you can redistribute it and/or
12 ** modify it under the terms of the GNU General Public License as
13 ** published by the Free Software Foundation; either version 2 of
14 ** the License, or (at your option) any later version.
16 ** This package is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ** General Public License for more details.
22 /* ========================================================================= */
24 /* === H E A D E R S ======================================================= */
33 #include "framedial.h"
34 #include <gtkmm/image.h>
35 #include <gtkmm/stock.h>
39 /* === U S I N G =========================================================== */
42 using namespace studio;
44 /* === M A C R O S ========================================================= */
46 /* === G L O B A L S ======================================================= */
48 /* === P R O C E D U R E S ================================================= */
50 /* === M E T H O D S ======================================================= */
52 FrameDial::FrameDial(): Gtk::Table(3, 1, false)
54 Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon");
56 seek_begin = create_icon(iconsize, Gtk::Stock::MEDIA_PREVIOUS,
58 seek_prev_frame = create_icon(iconsize, Gtk::Stock::MEDIA_REWIND,
60 seek_next_frame = create_icon(iconsize, Gtk::Stock::MEDIA_FORWARD,
62 seek_end = create_icon(iconsize, Gtk::Stock::MEDIA_NEXT,
65 attach(*seek_begin, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
66 attach(*seek_prev_frame, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
67 attach(*seek_next_frame, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
68 attach(*seek_end, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
72 FrameDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
75 Gtk::Button *button = manage(new class Gtk::Button());
76 Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
78 tooltips.set_tip(*button, tooltip);
79 icon->set_padding(0, 0);
81 button->set_relief(Gtk::RELIEF_NONE);