objectactuator.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef __OBJECTACTUATOR_H
  2. #define __OBJECTACTUATOR_H
  3. #include <api/skin/nakedobject.h>
  4. #define OBJECTACTUATOR_PARENT NakedObject
  5. // -----------------------------------------------------------------------
  6. // Your wnd object class
  7. class ObjectActuator : public OBJECTACTUATOR_PARENT {
  8. public:
  9. ObjectActuator();
  10. virtual ~ObjectActuator();
  11. virtual int onInit();
  12. virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  13. virtual void actuator_setTarget(const wchar_t *value);
  14. virtual void actuator_setGroup(const wchar_t *value);
  15. virtual int actuator_wantTargetParam() { return 1; }
  16. virtual int actuator_wantGroupParam() { return 1; }
  17. virtual int actuator_wantAutoPerform() { return 1; }
  18. virtual void actuator_onPerform(GuiObject *target) { } // called back n times for n targets found (separated by ';'), guaranteed non NULL
  19. virtual const wchar_t *getActuatorTag(); // for error msgs purposes
  20. protected:
  21. void performActions();
  22. /*static */void CreateXMLParameters(int master_handle);
  23. private:
  24. static XMLParamPair params[];
  25. int myxuihandle;
  26. enum {
  27. OBJECTACTUATOR_TARGET= 0,
  28. OBJECTACTUATOR_GROUP,
  29. };
  30. StringW groupid;
  31. StringW objectsid;
  32. };
  33. #endif