papyrus logo

markerwidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the papyrus library.                             *
00006  *                                                                         *
00007  *   papyrus is free software; you can redistribute it and/or modify       *
00008  *   it under the terms of the GNU Lesser General Public License           *
00009  *   version 3.0 as published by the Free Software Foundation.             *
00010  *                                                                         *
00011  *   papyrus is distributed in the hope that it will be useful,            *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Lesser General Public License version 3.0 for more details.       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with the papyrus library. If not, see                   *
00018  *   <http://www.gnu.org/licenses/>.                                       *
00019  ***************************************************************************/
00020 #ifndef PAPYRUSGTKMARKERWIDGET_H
00021 #define PAPYRUSGTKMARKERWIDGET_H
00022 
00023 #include <gtkmm/table.h>
00024 #include <papyrus-gtkmm/markercombobox.h>
00025 #include <papyrus-gtkmm/strokewidget.h>
00026 
00027 namespace Papyrus
00028 {
00029   namespace Gtk
00030   {
00031 
00035     class MarkerWidget : public ::Gtk::Table
00036     {
00037       public:
00038         MarkerWidget ( bool use_preview=true );
00039 
00040         ~MarkerWidget();
00041 
00042         Papyrus::Marker::pointer get_marker();
00043 
00044         bool use_preview();
00045         void set_use_preview ( bool use=true );
00046 
00047       protected:
00048         ::Gtk::Expander* m_expander;
00049         Papyrus::Gtk::Viewport* m_viewport;
00050         Papyrus::Polyline::pointer m_line;
00051         Papyrus::Marker::pointer m_marker;
00052 
00053         ::Gtk::ColorButton m_fill_color_button;
00054         ::Gtk::ColorButton m_stroke_color_button;
00055         ::Gtk::Adjustment m_marker_width_adjustment;
00056         ::Gtk::SpinButton m_marker_width_entry;
00057         ::Gtk::Adjustment m_marker_height_adjustment;
00058         ::Gtk::SpinButton m_marker_height_entry;
00059         ::Gtk::Adjustment m_line_width_adjustment;
00060         ::Gtk::SpinButton m_line_width_entry;
00061         Papyrus::Gtk::MarkerComboBox m_marker_combobox;
00062         Papyrus::Gtk::LineJoinButtonBox m_line_join_buttonbox;
00063         Papyrus::Gtk::LineCapButtonBox m_line_cap_buttonbox;
00064 
00065         void on_marker_style_changed();
00066         void on_fill_color_changed();
00067         void on_stroke_color_changed();
00068         void on_marker_width_changed();
00069         void on_marker_height_changed();
00070         void on_line_width_changed();
00071         void on_line_join_changed ( Cairo::LineJoin );
00072         void on_line_cap_changed ( Cairo::LineCap );
00073 
00074         void update_line_marker();
00075     };
00076 
00077   }
00078 
00079 }
00080 
00081 #endif

Generated on Fri Apr 16 12:40:10 2010 for papyrus by doxygen 1.6.1