#include <marker.h>
Public Types | |
enum | Style { FIRST_STYLE, NONE = FIRST_STYLE, LINES, TRIANGLE, DIAMOND, HALF_DIAMOND, HALF_HEAD_UPPER, HALF_HEAD_LOWER, SLASHED_CROSS, ELLIPSE, DOT, DOUBLE_TRIANGLE, DOT_AND_TRIANGLE, BOX, CROW_FOOT, CROSS, ONE_OR_MANY, ZERO_OR_MANY, ONE_OR_ZERO, ONE_EXACTLY, CONCAVE, ROUND, OPEN_ROUND, BACKSLASH, LAST_STYLE = BACKSLASH } |
enum | Facing { LEFT, RIGHT } |
typedef enum Papyrus::Marker::Style | Style |
typedef enum Papyrus::Marker::Facing | Facing |
typedef PapyrusPointer< Marker > | pointer |
Public Member Functions | |
virtual | ~Marker () |
Destructor. | |
Style | style () const |
void | set_style (Style style) |
set marker style | |
double | width () const |
void | set_width (double width) |
set drawing width of marker | |
double | height () const |
void | set_height (double height) |
set drawing height of marker | |
void | width_height (double &width, double &height) const |
get the drawing width and height of the marker | |
void | set_width_height (double width, double height) |
set the drawing width and height of the marker | |
Facing | facing () const |
void | set_facing (Facing facing) |
set the facing direction | |
virtual void | draw_shape (Cairo::RefPtr< Cairo::Context > cairo) const |
Draws on the provided context. | |
PAPYRUS_CLASS_NAME ("Marker") | |
PAPYRUS_CLONE_METHOD (Marker) | |
Static Public Member Functions | |
static pointer | create (Style style=NONE, double width=20.0, double height=20.0, Facing facing=RIGHT, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Creates an marker with the specified style. | |
static pointer | create (const Glib::ustring &id, Style style=NONE, double width=20.0, double height=20.0, Facing facing=RIGHT, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Creates an marker with the specified style. | |
Static Public Attributes | |
static const char * | style_strings [] |
Protected Member Functions | |
Marker (const Glib::ustring &id, Style style, double width, double height, Facing facing, Fill::pointer fill, Stroke::pointer stroke) | |
Default constructor. | |
Protected Attributes | |
Style | m_style |
double | m_width |
double | m_height |
Facing | m_facing |
typedef enum Papyrus::Marker::Facing Papyrus::Marker::Facing |
typedef PapyrusPointer<Marker> Papyrus::Marker::pointer |
Reimplemented from Papyrus::Shape.
typedef enum Papyrus::Marker::Style Papyrus::Marker::Style |
Papyrus::Marker::Marker | ( | const Glib::ustring & | id, | |
Style | style, | |||
double | width, | |||
double | height, | |||
Facing | facing, | |||
Fill::pointer | fill, | |||
Stroke::pointer | stroke | |||
) | [protected] |
Default constructor.
References Papyrus::Stroke::create(), Papyrus::Shape::m_stroke, and Papyrus::Shape::set_stroke().
Papyrus::Marker::~Marker | ( | ) | [virtual] |
Destructor.
Marker::pointer Papyrus::Marker::create | ( | const Glib::ustring & | id, | |
Style | style = NONE , |
|||
double | width = 20.0 , |
|||
double | height = 20.0 , |
|||
Facing | facing = RIGHT , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
Marker::pointer Papyrus::Marker::create | ( | Style | style = NONE , |
|
double | width = 20.0 , |
|||
double | height = 20.0 , |
|||
Facing | facing = RIGHT , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
Creates an marker with the specified style.
References PAPYRUS_CREATE.
Referenced by Papyrus::example_marker(), and Papyrus::Gtk::MarkerWidget::MarkerWidget().
void Papyrus::Marker::draw_shape | ( | Cairo::RefPtr< Cairo::Context > | cairo | ) | const [virtual] |
Draws on the provided context.
Implements Papyrus::Shape.
References BACKSLASH, BOX, CONCAVE, CROSS, CROW_FOOT, DIAMOND, DOT, DOT_AND_TRIANGLE, DOUBLE_TRIANGLE, ELLIPSE, HALF_DIAMOND, HALF_HEAD_LOWER, HALF_HEAD_UPPER, LEFT, LINES, m_facing, m_height, m_style, m_width, NONE, ONE_EXACTLY, ONE_OR_MANY, ONE_OR_ZERO, OPEN_ROUND, RIGHT, ROUND, SLASHED_CROSS, top, TRIANGLE, and ZERO_OR_MANY.
Marker::Facing Papyrus::Marker::facing | ( | ) | const |
References m_facing.
double Papyrus::Marker::height | ( | ) | const |
Papyrus::Marker::PAPYRUS_CLASS_NAME | ( | "Marker" | ) |
Papyrus::Marker::PAPYRUS_CLONE_METHOD | ( | Marker | ) |
void Papyrus::Marker::set_facing | ( | Facing | facing | ) |
void Papyrus::Marker::set_height | ( | double | height | ) |
void Papyrus::Marker::set_style | ( | Style | style | ) |
void Papyrus::Marker::set_width | ( | double | width | ) |
void Papyrus::Marker::set_width_height | ( | double | width, | |
double | height | |||
) |
set the drawing width and height of the marker
References m_height, m_width, and Papyrus::Shape::shape_changed().
Marker::Style Papyrus::Marker::style | ( | ) | const |
double Papyrus::Marker::width | ( | ) | const |
void Papyrus::Marker::width_height | ( | double & | width, | |
double & | height | |||
) | const |
Facing Papyrus::Marker::m_facing [protected] |
Referenced by draw_shape(), facing(), and set_facing().
double Papyrus::Marker::m_height [protected] |
Referenced by draw_shape(), height(), set_height(), set_width_height(), and width_height().
Style Papyrus::Marker::m_style [protected] |
Referenced by draw_shape(), set_style(), and style().
double Papyrus::Marker::m_width [protected] |
Referenced by draw_shape(), set_width(), set_width_height(), width(), and width_height().
const char * Papyrus::Marker::style_strings [static] |
Initial value:
{ "None", "Lines", "Triangle", "Diamond", "Half Diamond", "Half Head Upper", "Half Head Lower", "Slashed Cross", "Ellipse", "Dot", "Double Triangle", "Dot and Triangle", "Box", "Crow Foot", "Cross", "One or Many", "Zero or Many", "One or Zero", "One Exactly", "Concave", "Round", "Open Round", "Backslash", }