source: cpp/frams/param/mutparamlist.h @ 695

Last change on this file since 695 was 286, checked in by Maciej Komosinski, 10 years ago

Updated headers

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5#ifndef _MUTPARAMLIST_H_
6#define _MUTPARAMLIST_H_
7
8#include "param.h"
9#include "mutparamiface.h"
10#include <frams/util/list.h>
11
12struct ParamInfo;
13
14class MutableParamList: public virtual ParamInterface, public MutableParamInterface
15{
16SList list;
17const char *objname;
18int getSubParam(int i,ParamInterface **sub_p,int *sub_i);
19int getSubGroup(int i,ParamInterface **sub_p,int *sub_i);
20
21ParamInfo* getParamInfo(int i);
22void addPI(int pos,ParamInfo *pi);
23int findPI(ParamInfo *pi);
24int findPI(ParamInterface *p);
25int findPI(MutableParamInterface *p);
26void adjustPI(int firstPI,int addprop,int addgroup);
27void removePI(int pi_index);
28
29#define STATRICKCLASS MutableParamList
30STCALLBACKDEF(onPropAdd);
31STCALLBACKDEF(onPropDelete);
32STCALLBACKDEF(onGroupAdd);
33STCALLBACKDEF(onGroupDelete);
34STCALLBACKDEF(onPropChange);
35STCALLBACKDEF(onGroupChange);
36STCALLBACKDEF(onPropActivate);
37#undef STATRICKCLASS
38
39public:
40
41void firePropChange(int i) {onchange.action(i);}
42void fireGroupChange(int i) {ongroupchange.action(i);}
43
44MutableParamList(const char* n=0,const char* d=0):objname(n),description(d) {}
45~MutableParamList();
46
47void operator+=(ParamInterface *p);
48void operator-=(ParamInterface *p);
49void operator+=(MutableParamInterface *p);
50void operator-=(MutableParamInterface *p);
51void insert(int i,ParamInterface *p);
52void insert(int i,MutableParamInterface *p);
53void operator-=(int i);
54
55/** remove all sub params */
56void clear();
57
58const char* getName() {return objname;}
59const char* description;
60const char* getDescription() {return description;}
61
62int getGroupCount();
63int getPropCount();
64
65const char *id(int i);
66const char *name(int i);
67const char *type(int i);
68const char *help(int i);
69int flags(int i);
70int group(int i);
71void call(int i,ExtValue* args,ExtValue *ret);
72const char *grname(int i);
73
74int grmember(int gi,int n);
75
76SString getString(int);
77paInt getInt(int);
78double getDouble(int);
79ExtValue getExtValue(int);
80ExtObject getObject(int);
81
82int setInt(int,paInt);
83int setDouble(int,double);
84int setString(int,const SString &);
85int setObject(int,const ExtObject&);
86int setExtValue(int,const ExtValue&);
87};
88
89#endif
90
91
92
93
94
95
96
97
Note: See TracBrowser for help on using the repository browser.