00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PAPYRUSGTKLINESTYLEWIDGET_H
00020 #define PAPYRUSGTKLINESTYLEWIDGET_H
00021
00022 #include <gtkmm/table.h>
00023
00024 #include <papyrus/linestyle.h>
00025 #include <papyrus/polyline.h>
00026 #include <papyrusmm/linejoinbuttonbox.h>
00027 #include <papyrusmm/linecapbuttonbox.h>
00028 #include <papyrusmm/viewport.h>
00029
00030 namespace PapyrusGtk {
00031
00035 class LineStyleWidget : public Gtk::Table
00036 {
00037 public:
00038 LineStyleWidget(bool use_preview=true);
00039
00040 ~LineStyleWidget();
00041
00042 const Papyrus::LineStyle& get_line_style() const;
00043
00044 bool use_preview();
00045 void set_use_preview(bool use=true);
00046
00047 protected:
00048 Gtk::Expander* m_expander;
00049 PapyrusGtk::Viewport* m_viewport;
00050 Papyrus::Polyline::pointer m_line;
00051
00052 Gtk::ColorButton m_color_button;
00053 Gtk::Adjustment m_width_adjustment;
00054 Gtk::SpinButton m_width_entry;
00055 Gtk::Adjustment m_miter_limit_adjustment;
00056 Gtk::SpinButton m_miter_limit_entry;
00057 PapyrusGtk::LineJoinButtonBox m_line_join_buttonbox;
00058 PapyrusGtk::LineCapButtonBox m_line_cap_buttonbox;
00059
00060 Papyrus::LineStyle m_line_style;
00061
00062 void on_color_changed();
00063 void on_width_changed();
00064 void on_line_join_changed( Cairo::LineJoin );
00065 void on_line_cap_changed( Cairo::LineCap );
00066
00067 };
00068
00069 }
00070
00071 #endif