markerwidget.h

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

Generated on Sun Mar 11 10:01:28 2007 by  doxygen 1.5.1