source: synfigstudio/trunk/fuentes/src/gui/workarearenderer/workarearenderer.cpp @ 481

Last change on this file since 481 was 481, checked in by jrpelegrina, 4 years ago

First release to xenial

File size: 2.8 KB
Line 
1/* === S Y N F I G ========================================================= */
2/*!     \file workarearenderer.cpp
3**      \brief Template File
4**
5**      $Id$
6**
7**      \legal
8**      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9**
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.
14**
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.
19**      \endlegal
20*/
21/* ========================================================================= */
22
23/* === H E A D E R S ======================================================= */
24
25#ifdef USING_PCH
26#       include "pch.h"
27#else
28#ifdef HAVE_CONFIG_H
29#       include <config.h>
30#endif
31
32#include "workarearenderer.h"
33#include "workarea.h"
34
35#include "general.h"
36
37#endif
38
39/* === U S I N G =========================================================== */
40
41using namespace std;
42using namespace etl;
43using namespace synfig;
44using namespace studio;
45
46/* === M A C R O S ========================================================= */
47
48/* === G L O B A L S ======================================================= */
49
50/* === P R O C E D U R E S ================================================= */
51
52/* === M E T H O D S ======================================================= */
53
54WorkAreaRenderer::WorkAreaRenderer():
55        enabled_(true),
56        priority_(0),
57        work_area_(NULL)
58{ }
59
60WorkAreaRenderer::~WorkAreaRenderer()
61{ }
62
63bool
64WorkAreaRenderer::get_enabled_vfunc()const
65{
66        return enabled_;
67}
68
69void
70WorkAreaRenderer::set_enabled(bool x)
71{
72        if(x==enabled_)
73                return;
74        enabled_=x;
75        signal_changed()();
76}
77
78void
79WorkAreaRenderer::set_priority(int x)
80{
81        if(x==priority_)
82                return;
83        priority_=x;
84        signal_changed()();
85}
86
87void
88WorkAreaRenderer::set_work_area(WorkArea* x)
89{
90        work_area_=x;
91}
92
93void
94WorkAreaRenderer::render_vfunc(
95        const Glib::RefPtr<Gdk::Window>& /*window*/,
96        const Gdk::Rectangle& /*expose_area*/
97)
98{
99}
100
101bool
102WorkAreaRenderer::event_vfunc(
103        GdkEvent* /*event*/
104)
105{
106        return false;
107}
108
109int
110WorkAreaRenderer::get_w()const
111{ return get_work_area()->get_w(); }
112int
113WorkAreaRenderer::get_h()const
114{ return get_work_area()->get_h(); }
115
116float
117WorkAreaRenderer::get_pw()const
118{ return get_work_area()->get_pw(); }
119float
120WorkAreaRenderer::get_ph()const
121{ return get_work_area()->get_ph(); }
122
123synfig::Point
124WorkAreaRenderer::screen_to_comp_coords(synfig::Point pos)const
125{
126        return get_work_area()->screen_to_comp_coords(pos);
127}
128
129synfig::Point
130WorkAreaRenderer::comp_to_screen_coords(synfig::Point pos)const
131{
132        return get_work_area()->comp_to_screen_coords(pos);
133}
Note: See TracBrowser for help on using the repository browser.