Code

updated spanish.nsh and inkscape.nsi to reflect latest file-changes
[inkscape.git] / trunk / src / extension / param / string.h
1 #ifndef INK_EXTENSION_PARAMSTRING_H_SEEN
2 #define INK_EXTENSION_PARAMSTRING_H_SEEN
4 /*
5  * Copyright (C) 2005-2007 Authors:
6  *   Ted Gould <ted@gould.cx>
7  *   Johan Engelen <johan@shouraizou.nl> *
8  * Released under GNU GPL, read the file 'COPYING' for more information
9  */
11 #include <gtkmm/widget.h>
12 #include <xml/node.h>
13 #include <document.h>
14 #include "parameter.h"
16 namespace Inkscape {
17 namespace Extension {
19 class ParamString : public Parameter {
20 private:
21     /** \brief  Internal value.  This should point to a string that has
22                 been allocated in memory.  And should be free'd. */
23     gchar * _value;
24     /** \brief Internal value. This indicates the maximum leght of the string. Zero meaning unlimited. 
25       */
26     gint _max_length;
27 public:
28     ParamString(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
29     virtual ~ParamString(void);
30     /** \brief  Returns \c _value, with a \i const to protect it. */
31     const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
32     const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
33     Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
34     void string (std::string &string);
35     void setMaxLength(int maxLenght) { _max_length = maxLenght; }
36     int getMaxLength(void) { return _max_length; }
37 };
40 }  /* namespace Extension */
41 }  /* namespace Inkscape */
43 #endif /* INK_EXTENSION_PARAMSTRING_H_SEEN */
45 /*
46   Local Variables:
47   mode:c++
48   c-file-style:"stroustrup"
49   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
50   indent-tabs-mode:nil
51   fill-column:99
52   End:
53 */
54 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :