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) 2008 Chris Moore
10 ** Copyright (c) 2009 Gerco Ballintijn
11 ** Copyright (c) 2009 Carlos López
13 ** This package is free software; you can redistribute it and/or
14 ** modify it under the terms of the GNU General Public License as
15 ** published by the Free Software Foundation; either version 2 of
16 ** the License, or (at your option) any later version.
18 ** This package is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 ** General Public License for more details.
24 /* ========================================================================= */
26 /* === H E A D E R S ======================================================= */
35 #include "framedial.h"
36 #include <gtkmm/image.h>
37 #include <gtkmm/stock.h>
41 /* === U S I N G =========================================================== */
44 using namespace studio;
46 /* === M A C R O S ========================================================= */
48 /* === G L O B A L S ======================================================= */
50 /* === P R O C E D U R E S ================================================= */
52 /* === M E T H O D S ======================================================= */
54 FrameDial::FrameDial(): Gtk::Table(5, 1, false)
56 Gtk::IconSize iconsize = Gtk::IconSize::from_name("synfig-small_icon");
58 seek_begin = create_icon(iconsize, Gtk::Stock::MEDIA_PREVIOUS,
60 seek_prev_frame = create_icon(iconsize, Gtk::Stock::MEDIA_REWIND,
62 play_stop = create_icon(iconsize, Gtk::Stock::MEDIA_PLAY,
64 seek_next_frame = create_icon(iconsize, Gtk::Stock::MEDIA_FORWARD,
66 seek_end = create_icon(iconsize, Gtk::Stock::MEDIA_NEXT,
69 attach(*seek_begin, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
70 attach(*seek_prev_frame, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
71 attach(*play_stop, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
72 attach(*seek_next_frame, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
73 attach(*seek_end, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
77 FrameDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
80 Gtk::Button *button = manage(new class Gtk::Button());
81 Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
83 tooltips.set_tip(*button, tooltip);
84 icon->set_padding(0, 0);
86 button->set_relief(Gtk::RELIEF_NONE);