summaryrefslogtreecommitdiffstats
path: root/src/extension/extension.h
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2008-02-29 21:37:22 +0000
committergouldtj <gouldtj@users.sourceforge.net>2008-02-29 21:37:22 +0000
commit23c6090f0f77b6cd8b47e80e69974519e22f4ecf (patch)
tree91fc6ca41a0daacd1f336038b2e77eacc1315ae0 /src/extension/extension.h
parentCopy perspectives, too, when pasting 3D boxes (solves LP #195867) (diff)
downloadinkscape-23c6090f0f77b6cd8b47e80e69974519e22f4ecf.tar.gz
inkscape-23c6090f0f77b6cd8b47e80e69974519e22f4ecf.zip
r18220@shi: ted | 2008-02-29 13:18:55 -0800
Okay, sadly I'm not keeping the version history because I'm not convenced that SVK will do it right. One mega-patch, but that's life. Reshuffle the exection-env and prefdialog code so that the state machines aren't intertwines, which fixes a whole host of bugs with them. I think the behavior is correct now. Make it so that the effects can count how many preferences they have to determine if the dialog should be shown (fix above). Once this code was written it was easy to make it show an ellipsis on the verb if there is a dialog or not. This involved removing ellipsis from those effects that had it hard coded. Make it so that the parameters know that their command line options are going into a list. They don't have to acknowledge it, but they can, and specifically notebook does and handles it differently. This should fix the notebooks on Win32, but doesn't apparently completely. Change the script extension on windows to use pythonw instead of python so that the command line doesn't appear all the time. (bzr r4908)
Diffstat (limited to 'src/extension/extension.h')
-rw-r--r--src/extension/extension.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/extension/extension.h b/src/extension/extension.h
index e4f2dc88e..4af65dc92 100644
--- a/src/extension/extension.h
+++ b/src/extension/extension.h
@@ -94,7 +94,7 @@ private:
static std::ofstream error_file; /**< This is the place where errors get reported */
protected:
- Inkscape::XML::Node *repr; /**< The XML description of the Extension */
+ Inkscape::XML::Node *repr; /**< The XML description of the Extension */
Implementation::Implementation * imp; /**< An object that holds all the functions for making this work */
ExpirationTimer * timer; /**< Timeout to unload after a given time */
@@ -124,6 +124,23 @@ private:
extension */
public:
+ /** \brief A function to get the the number of parameters that
+ the extension has.
+ \return The number of parameters. */
+ unsigned int param_count ( ) { return parameters == NULL ? 0 :
+ g_slist_length(parameters); };
+ /** \brief A function to get the the number of parameters that
+ are visible to the user that the extension has.
+ \return The number of visible parameters.
+
+ \note Currently this just calls param_count as visible isn't implemented
+ but in the future it'll do something different. Please call
+ the appropriate function in code so that it'll work in the
+ future.
+ */
+ unsigned int param_visible_count ( ) { return param_count(); };
+
+public:
/** An error class for when a parameter is called on a type it is not */
class param_wrong_type {};
class param_not_color_param {};