setupPage.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef NULLOSFT_ONLINEMEDIA_PLUGIN_SETUPPAGE_HEADER
  2. #define NULLOSFT_ONLINEMEDIA_PLUGIN_SETUPPAGE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include <bfc/multipatch.h>
  8. #include "../../winamp/setup/ifc_setuppage.h"
  9. #include "../../winamp/setup/ifc_setupjob.h"
  10. #include "./setupGroupList.h"
  11. class SetupListboxLabel;
  12. #define ID_KNOWNGROUP 0
  13. #define ID_FEATUREDGROUP 1
  14. #define MPIID_SETUPPAGE 10
  15. #define MPIID_SETUPJOB 20
  16. #define SPM_FIRST (WM_APP + 2)
  17. #define SPM_UPDATELIST (SPM_FIRST + 0)
  18. class SetupPage : public MultiPatch<MPIID_SETUPPAGE, ifc_setuppage>,
  19. public MultiPatch<MPIID_SETUPJOB, ifc_setupjob>
  20. {
  21. protected:
  22. typedef enum
  23. {
  24. flagInitWasabi = 0x00000001,
  25. };
  26. protected:
  27. SetupPage();
  28. virtual ~SetupPage();
  29. public:
  30. static SetupPage* CreateInstance();
  31. public:
  32. /* Dispatchable */
  33. size_t AddRef();
  34. size_t Release();
  35. int QueryInterface(GUID interface_guid, void **object);
  36. /* ifc_setuppage */
  37. HRESULT GetName(bool bShort, const wchar_t **pszName);
  38. HRESULT Save(HWND hText);
  39. HRESULT CreateView(HWND hParent, HWND *phwnd);
  40. HRESULT Revert(void);
  41. HRESULT IsDirty(void);
  42. HRESULT Validate(void);
  43. /* ifc_setupjob */
  44. HRESULT Execute(HWND hwndText);
  45. HRESULT Cancel(HWND hwndText);
  46. HRESULT IsCancelSupported(void);
  47. public:
  48. BOOL AttachWindow(HWND hAttach);
  49. void DetachWindow();
  50. void ListboxSelectionChanged();
  51. BOOL UpdateListAsync(INT groupId);
  52. protected:
  53. HRESULT InitializeServices();
  54. private:
  55. size_t ref;
  56. HWND hwnd;
  57. LPWSTR name;
  58. LPWSTR title;
  59. SetupGroupList *groupList;
  60. HANDLE completeEvent;
  61. BOOL servicesInitialized;
  62. protected:
  63. RECVS_MULTIPATCH;
  64. };
  65. #endif //NULLOSFT_ONLINEMEDIA_PLUGIN_SETUPPAGE_HEADER