| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 #pragma once | 1 /* |
|
Oleksandr
2015/08/10 09:13:34
Nit: We try to use GNU style guards in the new cod
sergei
2015/08/17 13:12:53
Done.
| |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | |
| 4 * | |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | |
| 6 * it under the terms of the GNU General Public License version 3 as | |
| 7 * published by the Free Software Foundation. | |
| 8 * | |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 * GNU General Public License for more details. | |
| 13 * | |
| 14 * You should have received a copy of the GNU General Public License | |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | |
| 16 */ | |
| 17 | |
| 18 #ifndef NOTIFICATION_WINDOW_H | |
| 19 #define NOTIFICATION_WINDOW_H | |
| 20 | |
| 2 #include <atlbase.h> | 21 #include <atlbase.h> |
| 3 #include <atlwin.h> | 22 #include <atlwin.h> |
| 4 #include <atlctl.h> | 23 #include <atlctl.h> |
| 5 #include <atlimage.h> | 24 #include <atlimage.h> |
| 6 #include <AdblockPlus/JsValue.h> | 25 #include <AdblockPlus/JsValue.h> |
| 7 #include <AdblockPlus/Notification.h> | 26 #include <AdblockPlus/Notification.h> |
| 8 #include <functional> | 27 #include <functional> |
| 9 #include <MsHtmdid.h> | 28 #include <MsHtmdid.h> |
| 10 | 29 |
| 11 class IconStaticControl : public ATL::CWindow | 30 class IconStaticControl : public ATL::CWindow |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 void OnFinalMessage(HWND) override; | 294 void OnFinalMessage(HWND) override; |
| 276 | 295 |
| 277 // returns {windowX, windowY} of top left corner on the monitor | 296 // returns {windowX, windowY} of top left corner on the monitor |
| 278 POINT GetWindowCoordinates(); | 297 POINT GetWindowCoordinates(); |
| 279 private: | 298 private: |
| 280 // m_content is used as a holder of all children and we need it to have a bord er. | 299 // m_content is used as a holder of all children and we need it to have a bord er. |
| 281 // It seems the most correct way to have a border to set WS_POPUPWINDOW style | 300 // It seems the most correct way to have a border to set WS_POPUPWINDOW style |
| 282 // and paint the border in WM_NCPAINT but it simply does not work here. | 301 // and paint the border in WM_NCPAINT but it simply does not work here. |
| 283 NotificationWindow m_content; | 302 NotificationWindow m_content; |
| 284 std::function<void()> m_onDestroyedCallback; | 303 std::function<void()> m_onDestroyedCallback; |
| 285 }; | 304 }; |
| 305 #endif | |
| LEFT | RIGHT |