1
0

setup.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef NULLSOFT_WINAMP_SETUP_HEADER
  2. #define NULLSOFT_WINAMP_SETUP_HEADER
  3. #include "./svc_setup.h"
  4. #include <vector>
  5. typedef struct _UI UI;
  6. class WASetup : svc_setup
  7. {
  8. protected:
  9. WASetup(void);
  10. ~WASetup(void);
  11. public:
  12. static svc_setup *CreateInstance();
  13. public:
  14. int AddRef(void);
  15. int Release(void);
  16. HRESULT InsertPage(ifc_setuppage *pPage, int*pIndex);
  17. HRESULT RemovePage(size_t index);
  18. HRESULT GetPageCount(int*pCount);
  19. HRESULT GetPage(size_t index, ifc_setuppage **pPage);
  20. HRESULT AddJob(ifc_setupjob *pJob);
  21. HRESULT RemoveJob(ifc_setupjob *pJob);
  22. HRESULT GetActiveIndex(int*pIndex);
  23. HRESULT Start(HWND hwndWinamp);
  24. HRESULT CreateStatusWnd(HWND *phwndStatus);
  25. HRESULT Save(HWND hwndStatus);
  26. HRESULT ExecJobs(HWND hwndStatus);
  27. HRESULT GetWinampWnd(HWND *phwndWinamp);
  28. protected:
  29. INT_PTR DialogProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  30. INT_PTR OnInitDialog(HWND hwndFocused, LPARAM lParam);
  31. void OnDestroy(void);
  32. void OnCommand(INT nCtrlID, INT nEvntID, HWND hwndCtrl);
  33. void OnCancel(void); // use it if you want prompt user first
  34. void OnCancel_Clicked(void);
  35. void OnNext_Clicked(HWND hwndCtrl);
  36. void OnBack_Clicked(HWND hwndCtrl);
  37. void OnNavigation_SelChange(HWND hwndCtrl);
  38. INT_PTR OnDrawItem(INT nCtrlID, DRAWITEMSTRUCT *pdis);
  39. INT_PTR OnMeasureItem(INT nCtrlID, MEASUREITEMSTRUCT *pmis);
  40. void OnDrawHeader(DRAWITEMSTRUCT *pdis);
  41. void OnDrawNavigationItem(DRAWITEMSTRUCT *pdis);
  42. INT_PTR OnColorListBox(HDC hdc, HWND hwndCtrl);
  43. private:
  44. int ref;
  45. HWND hwnd;
  46. std::vector<ifc_setuppage*> pageList;
  47. std::vector<ifc_setupjob*> jobList;
  48. HWND hwndActive;
  49. size_t nPageActive;
  50. UI *pui;
  51. RECT rcUI;
  52. HWND hWinamp;
  53. protected:
  54. friend static INT_PTR WINAPI DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  55. RECVS_DISPATCH;
  56. };
  57. #endif //WINAMP_SETUP_WIZARD_HEADER