1 /* === S Y N F I G ========================================================= */
3 ** \brief Template File
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === H E A D E R S ======================================================= */
33 #include <gtkmm/image.h>
34 #include <gtkmm/stock.h>
40 /* === U S I N G =========================================================== */
43 using namespace studio;
45 /* === M A C R O S ========================================================= */
47 /* === G L O B A L S ======================================================= */
49 /* === P R O C E D U R E S ================================================= */
51 /* === M E T H O D S ======================================================= */
53 ZoomDial::ZoomDial(Gtk::IconSize & size): Table(3, 1, false)
55 zoom_in = create_icon(size, Gtk::Stock::ZOOM_IN, _("Zoom In"));
56 zoom_out = create_icon(size, Gtk::Stock::ZOOM_OUT, _("Zoom Out"));
57 zoom_fit = create_icon(size, Gtk::Stock::ZOOM_FIT, _("Zoom to Fit"));
58 zoom_norm = create_icon(size, Gtk::Stock::ZOOM_100, _("Zoom to 100%"));
60 attach(*zoom_out, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
61 attach(*zoom_norm, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
62 attach(*zoom_fit, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
63 attach(*zoom_in, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
67 ZoomDial::create_icon(Gtk::IconSize size, const Gtk::BuiltinStockID & stockid,
70 Gtk::Button *button = manage(new class Gtk::Button());
71 Gtk::Image *icon = manage(new Gtk::Image(stockid, size));
73 tooltips.set_tip(*button, tooltip);
74 icon->set_padding(0, 0);
76 button->set_relief(Gtk::RELIEF_NONE);