xuipathpicker.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef __XUIPATHPICKER_H
  2. #define __XUIPATHPICKER_H
  3. #include <api/skin/widgets/pathpicker.h>
  4. #include <api/script/objcontroller.h>
  5. #define SCRIPTPATHPICKER_PARENT PathPicker
  6. // -----------------------------------------------------------------------
  7. // Your wnd object class
  8. class ScriptPathPicker: public SCRIPTPATHPICKER_PARENT {
  9. public:
  10. ScriptPathPicker();
  11. virtual ~ScriptPathPicker();
  12. private:
  13. };
  14. // -----------------------------------------------------------------------
  15. class PathPickerScriptController: public ScriptObjectControllerI {
  16. public:
  17. virtual const wchar_t *getClassName() { return L"PathPicker"; }
  18. virtual const wchar_t *getAncestorClassName() { return L"GuiObject"; }
  19. virtual ScriptObjectController *getAncestorController() { return WASABI_API_MAKI->maki_getController(guiObjectGuid); }
  20. virtual int getNumFunctions();
  21. virtual const function_descriptor_struct *getExportedFunctions();
  22. virtual GUID getClassGuid() { return pathPickerGuid; }
  23. virtual ScriptObject *instantiate();
  24. virtual void destroy(ScriptObject *o);
  25. virtual void *encapsulate(ScriptObject *o);
  26. virtual void deencapsulate(void *o);
  27. private:
  28. static function_descriptor_struct exportedFunction[];
  29. static scriptVar PathPicker_getPath(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  30. static scriptVar PathPicker_onPathChanged(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar newpath);
  31. };
  32. extern PathPickerScriptController *pathPickerController;
  33. // -----------------------------------------------------------------------
  34. // This defines the svc_xuiObject that exposes your wnd object
  35. extern const wchar_t PathPickerXuiObjectStr[];
  36. extern char PathPickerXuiSvcName[];
  37. class PathPickerXuiSvc : public XuiObjectSvc<ScriptPathPicker, PathPickerXuiObjectStr, PathPickerXuiSvcName> {};
  38. #endif