linestylewidget.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 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

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