1 #ifndef _KVI_KVS_EVENTTRIGGERS_H_
2 #define _KVI_KVS_EVENTTRIGGERS_H_
48 #define KVS_TRIGGER_EVENT(__idx, __wnd, __parms) \
49 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
50 KviKvsEventManager::instance()->trigger(__idx, __wnd, __parms);
52 #define KVS_TRIGGER_EVENT_HALTED(__idx, __wnd, __parms) \
53 (KviKvsEventManager::instance()->hasAppHandlers(__idx) ? KviKvsEventManager::instance()->trigger(__idx, __wnd, __parms) : false)
56 #define KVS_TRIGGER_EVENT_0(__idx, __wnd) \
57 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
59 KviKvsVariantList _vLocalParamList; \
60 KviKvsEventManager::instance()->trigger(__idx, __wnd, &_vLocalParamList); \
63 #define KVS_TRIGGER_EVENT_1(__idx, __wnd, __param1) \
64 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
66 KviKvsVariantList _vLocalParamList( \
67 new KviKvsVariant(__param1)); \
68 KviKvsEventManager::instance()->trigger(__idx, __wnd, &_vLocalParamList); \
71 #define KVS_TRIGGER_EVENT_2(__idx, __wnd, __param1, __param2) \
72 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
74 KviKvsVariantList _vLocalParamList( \
75 new KviKvsVariant(__param1), \
76 new KviKvsVariant(__param2)); \
77 KviKvsEventManager::instance()->trigger(__idx, __wnd, &_vLocalParamList); \
80 #define KVS_TRIGGER_EVENT_3(__idx, __wnd, __param1, __param2, __param3) \
81 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
83 KviKvsVariantList _vLocalParamList( \
84 new KviKvsVariant(__param1), \
85 new KviKvsVariant(__param2), \
86 new KviKvsVariant(__param3)); \
87 KviKvsEventManager::instance()->trigger(__idx, __wnd, &_vLocalParamList); \
90 #define KVS_TRIGGER_EVENT_4(__idx, __wnd, __param1, __param2, __param3, __param4) \
91 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
93 KviKvsVariantList _vLocalParamList( \
94 new KviKvsVariant(__param1), \
95 new KviKvsVariant(__param2), \
96 new KviKvsVariant(__param3), \
97 new KviKvsVariant(__param4)); \
98 KviKvsEventManager::instance()->trigger(__idx, __wnd, &_vLocalParamList); \
101 #define KVS_TRIGGER_EVENT_5(__idx, __wnd, __param1, __param2, __param3, __param4, __param5) \
102 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
104 KviKvsVariantList _vLocalParamList( \
105 new KviKvsVariant(__param1), \
106 new KviKvsVariant(__param2), \
107 new KviKvsVariant(__param3), \
108 new KviKvsVariant(__param4), \
109 new KviKvsVariant(__param5)); \
110 KviKvsEventManager::instance()->trigger(__idx, __wnd, &_vLocalParamList); \
113 #define KVS_TRIGGER_EVENT_6(__idx, __wnd, __param1, __param2, __param3, __param4, __param5, __param6) \
114 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
116 KviKvsVariantList _vLocalParamList( \
117 new KviKvsVariant(__param1), \
118 new KviKvsVariant(__param2), \
119 new KviKvsVariant(__param3), \
120 new KviKvsVariant(__param4), \
121 new KviKvsVariant(__param5), \
122 new KviKvsVariant(__param6)); \
123 KviKvsEventManager::instance()->trigger(__idx, __wnd, &_vLocalParamList); \
126 #define KVS_TRIGGER_EVENT_7(__idx, __wnd, __param1, __param2, __param3, __param4, __param5, __param6, __param7) \
127 if(KviKvsEventManager::instance()->hasAppHandlers(__idx)) \
129 KviKvsVariantList _vLocalParamList( \
130 new KviKvsVariant(__param1), \
131 new KviKvsVariant(__param2), \
132 new KviKvsVariant(__param3), \
133 new KviKvsVariant(__param4), \
134 new KviKvsVariant(__param5), \
135 new KviKvsVariant(__param6), \
136 new KviKvsVariant(__param7)); \
137 KviKvsEventManager::instance()->trigger(__idx, __wnd, &_vLocalParamList); \
140 #define KVS_TRIGGER_EVENT_0_HALTED(__idx, __wnd) \
142 KviKvsEventManager::instance()->hasAppHandlers(__idx) \
143 ? KviKvsEventManager::instance()->triggerDeleteParams( \
146 new KviKvsVariantList()) \
149 #define KVS_TRIGGER_EVENT_1_HALTED(__idx, __wnd, __param1) \
151 KviKvsEventManager::instance()->hasAppHandlers(__idx) \
152 ? KviKvsEventManager::instance()->triggerDeleteParams( \
155 new KviKvsVariantList( \
156 new KviKvsVariant(__param1))) \
159 #define KVS_TRIGGER_EVENT_2_HALTED(__idx, __wnd, __param1, __param2) \
161 KviKvsEventManager::instance()->hasAppHandlers(__idx) \
162 ? KviKvsEventManager::instance()->triggerDeleteParams( \
165 new KviKvsVariantList( \
166 new KviKvsVariant(__param1), \
167 new KviKvsVariant(__param2))) \
170 #define KVS_TRIGGER_EVENT_3_HALTED(__idx, __wnd, __param1, __param2, __param3) \
172 KviKvsEventManager::instance()->hasAppHandlers(__idx) \
173 ? KviKvsEventManager::instance()->triggerDeleteParams( \
176 new KviKvsVariantList( \
177 new KviKvsVariant(__param1), \
178 new KviKvsVariant(__param2), \
179 new KviKvsVariant(__param3))) \
182 #define KVS_TRIGGER_EVENT_4_HALTED(__idx, __wnd, __param1, __param2, __param3, __param4) \
184 KviKvsEventManager::instance()->hasAppHandlers(__idx) \
185 ? KviKvsEventManager::instance()->triggerDeleteParams( \
188 new KviKvsVariantList( \
189 new KviKvsVariant(__param1), \
190 new KviKvsVariant(__param2), \
191 new KviKvsVariant(__param3), \
192 new KviKvsVariant(__param4))) \
195 #define KVS_TRIGGER_EVENT_5_HALTED(__idx, __wnd, __param1, __param2, __param3, __param4, __param5) \
197 KviKvsEventManager::instance()->hasAppHandlers(__idx) \
198 ? KviKvsEventManager::instance()->triggerDeleteParams( \
201 new KviKvsVariantList( \
202 new KviKvsVariant(__param1), \
203 new KviKvsVariant(__param2), \
204 new KviKvsVariant(__param3), \
205 new KviKvsVariant(__param4), \
206 new KviKvsVariant(__param5))) \
209 #define KVS_TRIGGER_EVENT_6_HALTED(__idx, __wnd, __param1, __param2, __param3, __param4, __param5, __param6) \
211 KviKvsEventManager::instance()->hasAppHandlers(__idx) \
212 ? KviKvsEventManager::instance()->triggerDeleteParams( \
215 new KviKvsVariantList( \
216 new KviKvsVariant(__param1), \
217 new KviKvsVariant(__param2), \
218 new KviKvsVariant(__param3), \
219 new KviKvsVariant(__param4), \
220 new KviKvsVariant(__param5), \
221 new KviKvsVariant(__param6))) \
224 #define KVS_TRIGGER_EVENT_7_HALTED(__idx, __wnd, __param1, __param2, __param3, __param4, __param5, __param6, __param7) \
226 KviKvsEventManager::instance()->hasAppHandlers(__idx) \
227 ? KviKvsEventManager::instance()->triggerDeleteParams( \
230 new KviKvsVariantList( \
231 new KviKvsVariant(__param1), \
232 new KviKvsVariant(__param2), \
233 new KviKvsVariant(__param3), \
234 new KviKvsVariant(__param4), \
235 new KviKvsVariant(__param5), \
236 new KviKvsVariant(__param6), \
237 new KviKvsVariant(__param7))) \
Parser class to handle variant variables lists.
This file contains compile time settings.