aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flbase.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-08-15 02:32:46 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-08-15 02:32:46 +0000
commit185d9a6b38a94150edb98a9a0d3c90fe9a3bd68d (patch)
tree26c4ea60d8d2832f33c57db91bd4403e61d23353 /externals/grill/flext/source/flbase.cpp
parent21e2f111c461725446457f0d768a95b71c17c847 (diff)
""
svn path=/trunk/; revision=848
Diffstat (limited to 'externals/grill/flext/source/flbase.cpp')
-rw-r--r--externals/grill/flext/source/flbase.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/externals/grill/flext/source/flbase.cpp b/externals/grill/flext/source/flbase.cpp
index 525cb294..bbd4cc1c 100644
--- a/externals/grill/flext/source/flbase.cpp
+++ b/externals/grill/flext/source/flbase.cpp
@@ -17,6 +17,19 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
#include "flinternal.h"
#include <string.h>
+#include <ctype.h>
+
+#if FLEXT_SYS == FLEXT_SYS_PD
+#ifdef _MSC_VER
+ #pragma warning (push)
+ #pragma warning (disable:4091)
+#endif
+#include <g_canvas.h>
+#ifdef _MSC_VER
+ #pragma warning (pop)
+#endif
+#endif
+
/////////////////////////////////////////////////////////
//
@@ -82,7 +95,27 @@ void flext_obj::DefineHelp(t_classid c,const char *ref,const char *dir,bool addt
#endif
}
+const t_symbol *flext_obj::GetParamSym(const t_symbol *sym,t_canvas *c)
+{
+ if(!c) c = canvas_getcurrent();
-
-
+#if FLEXT_SYS == FLEXT_SYS_PD
+ const char *s = GetString(sym);
+ if((s[0] == '$' || s[0] == '#') && isdigit(s[1])) {
+ // patcher parameter detected... get value!
+ if(s[0] != '$') {
+ char tmp[MAXPDSTRING];
+ strcpy(tmp,s);
+ tmp[0] = '$';
+ return canvas_realizedollar(c,const_cast<t_symbol *>(MakeSymbol(tmp)));
+ }
+ else
+ return canvas_realizedollar(c,const_cast<t_symbol *>(sym));
+ }
+ else
+#else
+ #pragma warning("Not implemented")
+#endif
+ return sym;
+}