add new sigc++2 directory
[ardour.git] / libs / cairomm / cairomm / path.h
1 /* Copyright (C) 2005 The cairomm Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Library General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Library General Public License for more details.
12  *
13  * You should have received a copy of the GNU Library General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16  * 02110-1301, USA.
17  */
18
19 #ifndef __CAIROMM_PATH_H
20 #define __CAIROMM_PATH_H
21
22 #include <cairomm/enums.h>
23 #include <string>
24 #include <cairo.h>
25
26
27 namespace Cairo
28 {
29
30 /** A data structure for holding a path.
31  * Use Context::copy_path() or Context::copy_path_flat() to instantiate a new
32  * Path.  The application is responsible for freeing the Path object when it is
33  * no longer needed.
34  *
35  * @todo There's currently no way to access the path data without reverting to
36  * the C object (see cobj())
37  */
38 class Path
39 {
40 public:
41   //Path();
42   explicit Path(cairo_path_t* cobject, bool take_ownership = false);
43   //Path(const Path& src);
44
45   virtual ~Path();
46
47   //Path& operator=(const Path& src);
48
49   //bool operator ==(const Path& src) const;
50   //bool operator !=(const Path& src) const;
51
52   typedef cairo_path_t cobject;
53   inline cobject* cobj() { return m_cobject; }
54   inline const cobject* cobj() const { return m_cobject; }
55
56   #ifndef DOXYGEN_IGNORE_THIS
57   ///For use only by the cairomm implementation.
58   //There is no *_status() function for this object:
59   //inline ErrorStatus get_status() const
60   //{ return cairo_path_status(const_cast<cairo_path_t*>(cobj())); }
61   #endif //DOXYGEN_IGNORE_THIS
62
63 protected:
64
65   cobject* m_cobject;
66 };
67
68 } // namespace Cairo
69
70 #endif //__CAIROMM_PATH_H
71
72 // vim: ts=2 sw=2 et