OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef VIEWS_WINDOW_WINDOW_WIN_H_ | 5 #ifndef VIEWS_WINDOW_WINDOW_WIN_H_ |
6 #define VIEWS_WINDOW_WINDOW_WIN_H_ | 6 #define VIEWS_WINDOW_WINDOW_WIN_H_ |
7 | 7 |
8 #include "views/widget/widget_win.h" | 8 #include "views/widget/widget_win.h" |
9 #include "views/window/window.h" | 9 #include "views/window/window.h" |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 virtual void OnFinalMessage(HWND window); | 117 virtual void OnFinalMessage(HWND window); |
118 virtual void OnGetMinMaxInfo(MINMAXINFO* minmax_info); | 118 virtual void OnGetMinMaxInfo(MINMAXINFO* minmax_info); |
119 virtual void OnInitMenu(HMENU menu); | 119 virtual void OnInitMenu(HMENU menu); |
120 virtual void OnMouseLeave(); | 120 virtual void OnMouseLeave(); |
121 virtual LRESULT OnNCActivate(BOOL active); | 121 virtual LRESULT OnNCActivate(BOOL active); |
122 virtual LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param); | 122 virtual LRESULT OnNCCalcSize(BOOL mode, LPARAM l_param); |
123 virtual LRESULT OnNCHitTest(const CPoint& point); | 123 virtual LRESULT OnNCHitTest(const CPoint& point); |
124 virtual void OnNCPaint(HRGN rgn); | 124 virtual void OnNCPaint(HRGN rgn); |
125 virtual void OnNCLButtonDown(UINT ht_component, const CPoint& point); | 125 virtual void OnNCLButtonDown(UINT ht_component, const CPoint& point); |
126 virtual void OnNCRButtonDown(UINT ht_component, const CPoint& point); | 126 virtual void OnNCRButtonDown(UINT ht_component, const CPoint& point); |
| 127 virtual void OnNCRButtonUp(UINT ht_component, const CPoint& point); |
| 128 virtual void OnRButtonUp(UINT ht_component, const CPoint& point); |
127 virtual LRESULT OnNCUAHDrawCaption(UINT msg, WPARAM w_param, LPARAM l_param); | 129 virtual LRESULT OnNCUAHDrawCaption(UINT msg, WPARAM w_param, LPARAM l_param); |
128 virtual LRESULT OnNCUAHDrawFrame(UINT msg, WPARAM w_param, LPARAM l_param); | 130 virtual LRESULT OnNCUAHDrawFrame(UINT msg, WPARAM w_param, LPARAM l_param); |
129 virtual LRESULT OnSetCursor(HWND window, UINT hittest_code, UINT message); | 131 virtual LRESULT OnSetCursor(HWND window, UINT hittest_code, UINT message); |
130 virtual LRESULT OnSetIcon(UINT size_type, HICON new_icon); | 132 virtual LRESULT OnSetIcon(UINT size_type, HICON new_icon); |
131 virtual LRESULT OnSetText(const wchar_t* text); | 133 virtual LRESULT OnSetText(const wchar_t* text); |
132 virtual void OnSettingChange(UINT flags, const wchar_t* section); | 134 virtual void OnSettingChange(UINT flags, const wchar_t* section); |
133 virtual void OnSize(UINT size_param, const CSize& new_size); | 135 virtual void OnSize(UINT size_param, const CSize& new_size); |
134 virtual void OnSysCommand(UINT notification_code, CPoint click); | 136 virtual void OnSysCommand(UINT notification_code, CPoint click); |
135 virtual void OnWindowPosChanging(WINDOWPOS* window_pos); | 137 virtual void OnWindowPosChanging(WINDOWPOS* window_pos); |
136 virtual Window* GetWindow() { return this; } | 138 virtual Window* GetWindow() { return this; } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // The following factory is used to ignore SetWindowPos() calls for short time | 271 // The following factory is used to ignore SetWindowPos() calls for short time |
270 // periods. | 272 // periods. |
271 ScopedRunnableMethodFactory<WindowWin> ignore_pos_changes_factory_; | 273 ScopedRunnableMethodFactory<WindowWin> ignore_pos_changes_factory_; |
272 | 274 |
273 // If this is greater than zero, we should prevent attempts to make the window | 275 // If this is greater than zero, we should prevent attempts to make the window |
274 // visible when we handle WM_WINDOWPOSCHANGING. Some calls like | 276 // visible when we handle WM_WINDOWPOSCHANGING. Some calls like |
275 // ShowWindow(SW_RESTORE) make the window visible in addition to restoring it, | 277 // ShowWindow(SW_RESTORE) make the window visible in addition to restoring it, |
276 // when all we want to do is restore it. | 278 // when all we want to do is restore it. |
277 int force_hidden_count_; | 279 int force_hidden_count_; |
278 | 280 |
| 281 // Set to true when the user presses the right mouse button on the caption |
| 282 // area. We need this so we can correctly show the context menu on mouse-up. |
| 283 bool is_right_mouse_pressed_on_caption_; |
| 284 |
279 // The last-seen monitor containing us, and its rect and work area. These are | 285 // The last-seen monitor containing us, and its rect and work area. These are |
280 // used to catch updates to the rect and work area and react accordingly. | 286 // used to catch updates to the rect and work area and react accordingly. |
281 HMONITOR last_monitor_; | 287 HMONITOR last_monitor_; |
282 gfx::Rect last_monitor_rect_, last_work_area_; | 288 gfx::Rect last_monitor_rect_, last_work_area_; |
283 | 289 |
284 DISALLOW_COPY_AND_ASSIGN(WindowWin); | 290 DISALLOW_COPY_AND_ASSIGN(WindowWin); |
285 }; | 291 }; |
286 | 292 |
287 } // namespace views | 293 } // namespace views |
288 | 294 |
289 #endif // VIEWS_WINDOW_WINDOW_WIN_H_ | 295 #endif // VIEWS_WINDOW_WINDOW_WIN_H_ |
OLD | NEW |