diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/auth/Loginbox/popupAgreement.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/auth/Loginbox/popupAgreement.h')
-rw-r--r-- | Src/auth/Loginbox/popupAgreement.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Src/auth/Loginbox/popupAgreement.h b/Src/auth/Loginbox/popupAgreement.h new file mode 100644 index 00000000..39f0c964 --- /dev/null +++ b/Src/auth/Loginbox/popupAgreement.h @@ -0,0 +1,48 @@ +#ifndef NULLSOFT_AUTH_LOGINPOPUP_AGREEMENT_HEADER +#define NULLSOFT_AUTH_LOGINPOPUP_AGREEMENT_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include "./loginPopup.h" + +class LoginProvider; + +class LoginPopupAgreement : public LoginPopup +{ +protected: + LoginPopupAgreement(HWND hwnd); + ~LoginPopupAgreement(); + +public: + static HWND CreatePopup(HWND hParent, LoginProvider *provider); + +protected: + void UpdateLayout(BOOL fRedraw); + void EndDialog(INT_PTR code); + void UpdateMargins(); + + BOOL CreateProviderLinks(LPCWSTR pszProvider, LPCWSTR pszTos, LPCWSTR pszPrivacy, INT groupId, HWND hwndInsertAfter); + HDWP LayoutProviderLinks(HDWP hdwp, INT groupId, HWND hwndInsertAfter, INT x, INT y, UINT flags, SIZE *size); // pass hdwp = NULL to get ideal size + + + void OnLinkClicked(HWND hLink); + HBRUSH OnGetStaticColor(HDC hdc, HWND hControl); + LRESULT OnNotify(UINT controlId, const NMHDR *pnmh); + void OnParentNotify(UINT eventId, UINT wParam, LPARAM lParam); + BOOL OnUpdateWindowPos(const RECT* clientRect, RECT *rectOut); + BOOL OnInitDialog(HWND hFocus, LPARAM param); + void OnDestroy(); + +protected: + LONG marginLinkLeft; + LONG marginLinkFirst; + LONG marginLinkNext; + +private: + friend static HRESULT CALLBACK LoginPopupAgreement_CreateInstance(HWND hwnd, LPARAM param, LoginPopup **instance); +}; + + +#endif //NULLSOFT_AUTH_LOGINPOPUP_AGREEMENT_HEADER
\ No newline at end of file |