diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-09-01 16:56:35 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-09-01 16:56:35 +0000 |
| commit | c6067b75a239a1322598f2d85ef0ce7cc59df0d4 (patch) | |
| tree | f91f4514e7fc563d01a0cbe04a863ab0a488acfd /src/extension/prefdialog/parameter-string.h | |
| parent | Add appearance="colorbutton" to parameters of type color (diff) | |
| download | inkscape-c6067b75a239a1322598f2d85ef0ce7cc59df0d4.tar.gz inkscape-c6067b75a239a1322598f2d85ef0ce7cc59df0d4.zip | |
Add appearance="multiline" to parameters of type string
Renders a Gtk::TextView that automatically fills the available
space in the extension's preferences dialog and can be used
to accept longer multi-line strings.
Newlines in the string value will be passed as "\\n" to the
extension script (i.e. literal '\n' with the backspace escaped).
Diffstat (limited to 'src/extension/prefdialog/parameter-string.h')
| -rw-r--r-- | src/extension/prefdialog/parameter-string.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/extension/prefdialog/parameter-string.h b/src/extension/prefdialog/parameter-string.h index ef1d48821..3af83111d 100644 --- a/src/extension/prefdialog/parameter-string.h +++ b/src/extension/prefdialog/parameter-string.h @@ -20,6 +20,10 @@ namespace Extension { class ParamString : public InxParameter { public: + enum AppearanceMode { + DEFAULT, MULTILINE + }; + ParamString(Inkscape::XML::Node *xml, Inkscape::Extension::Extension *ext); /** \brief Returns \c _value, with a \i const to protect it. */ @@ -37,8 +41,10 @@ private: /** \brief Internal value. */ Glib::ustring _value; - /** \brief Maximum length of the string in characters (zero meaning unlimited). - */ + /** appearance mode **/ + AppearanceMode _mode = DEFAULT; + + /** \brief Maximum length of the string in characters (zero meaning unlimited). */ int _max_length = 0; }; |
