summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2007-03-01 07:13:43 +0000
committergouldtj <gouldtj@users.sourceforge.net>2007-03-01 07:13:43 +0000
commit66babe9f6e5a1012103063d3f94338b03819ed33 (patch)
treefe7892d5e2d90c5db7b18448d58717e6208d2598 /src
parentAPI change: render methods now take a cairo_t (not yet used) (diff)
downloadinkscape-66babe9f6e5a1012103063d3f94338b03819ed33.tar.gz
inkscape-66babe9f6e5a1012103063d3f94338b03819ed33.zip
r14576@tres: ted | 2007-02-26 23:29:13 -0800
Basic construction in place to --verb-list (bzr r2473)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp11
-rw-r--r--src/verbs.cpp6
-rw-r--r--src/verbs.h4
3 files changed, 20 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c62bed422..50aaf99a7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -144,6 +144,7 @@ enum {
SP_ARG_QUERY_ID,
SP_ARG_VERSION,
SP_ARG_VACUUM_DEFS,
+ SP_ARG_VERB_LIST,
SP_ARG_LAST
};
@@ -366,6 +367,11 @@ struct poptOption options[] = {
N_("Remove unused definitions from the defs section(s) of the document"),
NULL},
+ {"verb-list", 0,
+ POPT_ARG_NONE, NULL, SP_ARG_VERB_LIST,
+ N_("List the IDs of all the verbs in Inkscape"),
+ NULL},
+
POPT_AUTOHELP POPT_TABLEEND
};
@@ -1370,6 +1376,11 @@ sp_process_args(poptContext ctx)
exit(0);
break;
}
+ case SP_ARG_VERB_LIST: {
+ Inkscape::Verb::list();
+ exit(0);
+ break;
+ }
default: {
break;
}
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 401390fba..36884f37b 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -2404,6 +2404,12 @@ Verb *Verb::_base_verbs[] = {
};
+void
+Verb::list (void) {
+ printf("Listing Verbs\n");
+
+};
+
} /* namespace Inkscape */
/*
diff --git a/src/verbs.h b/src/verbs.h
index 4143c6fd7..9fd9689e2 100644
--- a/src/verbs.h
+++ b/src/verbs.h
@@ -401,8 +401,10 @@ protected:
For testing, a subclass that returns this value can be created to verify that the
length matches the enum values, etc.
*/
- static int _getBaseListSize() {return G_N_ELEMENTS(_base_verbs);}
+ static int _getBaseListSize(void) {return G_N_ELEMENTS(_base_verbs);}
+public:
+ static void list (void);
}; /* Verb class */