summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c277a5)
raw | patch | inline | side by side (parent: 3c277a5)
author | Jon A. Cruz <jon@joncruz.org> | |
Tue, 23 Mar 2010 05:39:04 +0000 (22:39 -0700) | ||
committer | Jon A. Cruz <jon@joncruz.org> | |
Tue, 23 Mar 2010 05:39:04 +0000 (22:39 -0700) |
src/style.h | patch | blob | history |
diff --git a/src/style.h b/src/style.h
index 9a2c72f16a694005d01076a0ced930f2905e63a0..f1b5ec534cb622263372bb439e22cc174e8c15b4 100644 (file)
--- a/src/style.h
+++ b/src/style.h
-#ifndef __SP_STYLE_H__
-#define __SP_STYLE_H__
+#ifndef SEEN_SP_STYLE_H
+#define SEEN_SP_STYLE_H
/** \file
* SPStyle - a style object for SPItem objects
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
+ * Jon A. Cruz <jon@joncruz.org>
*
+ * Copyright (C) 2010 Jon A. Cruz
* Copyright (C) 2001-2002 Lauris Kaplinski
* Copyright (C) 2001 Ximian, Inc.
*
SPIEnum enable_background;
/// style belongs to a cloned object
- bool cloned;
+ bool cloned;
sigc::connection release_connection;
sigc::connection fill_ps_modified_connection;
sigc::connection stroke_ps_modified_connection;
- SPObject *getFilter() {if (filter.href) return filter.href->getObject(); else return NULL;}
- const gchar *getFilterURI() {if (filter.href) return filter.href->getURI()->toString(); else return NULL;}
- SPPaintServer *getFillPaintServer() {if (fill.value.href) return fill.value.href->getObject(); else return NULL;}
- const gchar *getFillURI() {if (fill.value.href) return fill.value.href->getURI()->toString(); else return NULL;}
- SPPaintServer *getStrokePaintServer() {if (stroke.value.href) return stroke.value.href->getObject(); else return NULL;}
- const gchar *getStrokeURI() {if (stroke.value.href) return stroke.value.href->getURI()->toString(); else return NULL;}
+ SPObject *getFilter() { return (filter.href) ? filter.href->getObject() : 0; }
+ SPObject const *getFilter() const { return (filter.href) ? filter.href->getObject() : 0; }
+ gchar const *getFilterURI() const { return (filter.href) ? filter.href->getURI()->toString() : 0; }
+
+ SPPaintServer *getFillPaintServer() { return (fill.value.href) ? fill.value.href->getObject() : 0; }
+ SPPaintServer const *getFillPaintServer() const { return (fill.value.href) ? fill.value.href->getObject() : 0; }
+ gchar const *getFillURI() const { return (fill.value.href) ? fill.value.href->getURI()->toString() : 0; }
+
+ SPPaintServer *getStrokePaintServer() { return (stroke.value.href) ? stroke.value.href->getObject() : 0; }
+ SPPaintServer const *getStrokePaintServer() const { return (stroke.value.href) ? stroke.value.href->getObject() : 0; }
+ gchar const *getStrokeURI() const { return (stroke.value.href) ? stroke.value.href->getURI()->toString() : 0; }
};
SPStyle *sp_style_new(SPDocument *document);
/* Full font name, as font_factory::ConstructFontSpecification would give */
SPIString font_specification;
-
+
/** \todo fixme: The 'font' property is ugly, and not working (lauris) */
SPIString font;
};
gchar *attribute_unquote(gchar const *val);
gchar *css2_escape_quote(gchar const *val);
-#endif
+#endif // SEEN_SP_STYLE_H
/*