OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WIDGET_WIDGET_WIN_H_ | 5 #ifndef VIEWS_WIDGET_WIDGET_WIN_H_ |
6 #define VIEWS_WIDGET_WIDGET_WIN_H_ | 6 #define VIEWS_WIDGET_WIDGET_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlapp.h> | 10 #include <atlapp.h> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 virtual void Show(); | 132 virtual void Show(); |
133 virtual void Hide(); | 133 virtual void Hide(); |
134 virtual gfx::NativeView GetNativeView() const; | 134 virtual gfx::NativeView GetNativeView() const; |
135 virtual void SetOpacity(unsigned char opacity); | 135 virtual void SetOpacity(unsigned char opacity); |
136 virtual void SetAlwaysOnTop(bool on_top); | 136 virtual void SetAlwaysOnTop(bool on_top); |
137 virtual Widget* GetRootWidget() const; | 137 virtual Widget* GetRootWidget() const; |
138 virtual bool IsVisible() const; | 138 virtual bool IsVisible() const; |
139 virtual bool IsActive() const; | 139 virtual bool IsActive() const; |
140 virtual bool IsAccessibleWidget() const; | 140 virtual bool IsAccessibleWidget() const; |
141 virtual TooltipManager* GetTooltipManager(); | 141 virtual TooltipManager* GetTooltipManager(); |
142 virtual void GenerateMousePressedForView(View* view, | |
143 const gfx::Point& point); | |
144 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); | 142 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); |
145 virtual Window* GetWindow(); | 143 virtual Window* GetWindow(); |
146 virtual const Window* GetWindow() const; | 144 virtual const Window* GetWindow() const; |
147 virtual void SetNativeWindowProperty(const char* name, void* value); | 145 virtual void SetNativeWindowProperty(const char* name, void* value); |
148 virtual void* GetNativeWindowProperty(const char* name); | 146 virtual void* GetNativeWindowProperty(const char* name); |
149 virtual ThemeProvider* GetThemeProvider() const; | 147 virtual ThemeProvider* GetThemeProvider() const; |
150 virtual FocusManager* GetFocusManager(); | 148 virtual FocusManager* GetFocusManager(); |
151 virtual void ViewHierarchyChanged(bool is_add, View *parent, | 149 virtual void ViewHierarchyChanged(bool is_add, View *parent, |
152 View *child); | 150 View *child); |
153 virtual bool ContainsNativeView(gfx::NativeView native_view); | 151 virtual bool ContainsNativeView(gfx::NativeView native_view); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 | 246 |
249 // CustomFrameWindow hacks | 247 // CustomFrameWindow hacks |
250 MESSAGE_HANDLER_EX(WM_NCUAHDRAWCAPTION, OnNCUAHDrawCaption) | 248 MESSAGE_HANDLER_EX(WM_NCUAHDRAWCAPTION, OnNCUAHDrawCaption) |
251 MESSAGE_HANDLER_EX(WM_NCUAHDRAWFRAME, OnNCUAHDrawFrame) | 249 MESSAGE_HANDLER_EX(WM_NCUAHDRAWFRAME, OnNCUAHDrawFrame) |
252 | 250 |
253 // Vista and newer | 251 // Vista and newer |
254 MESSAGE_HANDLER_EX(WM_DWMCOMPOSITIONCHANGED, OnDwmCompositionChanged) | 252 MESSAGE_HANDLER_EX(WM_DWMCOMPOSITIONCHANGED, OnDwmCompositionChanged) |
255 | 253 |
256 // Non-atlcrack.h handlers | 254 // Non-atlcrack.h handlers |
257 MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject) | 255 MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject) |
256 | |
257 // TODO(msw): Many of these handlers could go directly to ProcessMouse* | |
258 // Unless they are actually overridder somewhere... (where?) | |
259 // Mouse events. | |
260 MESSAGE_HANDLER_EX(WM_LBUTTONDBLCLK, OnLButtonDblClk) | |
Ben Goodger (Google)
2011/03/03 00:13:41
There is definitely room to consolidate all of thi
| |
261 MESSAGE_HANDLER_EX(WM_LBUTTONDOWN, OnLButtonDown) | |
262 MESSAGE_HANDLER_EX(WM_LBUTTONUP, OnLButtonUp) | |
263 MESSAGE_HANDLER_EX(WM_MBUTTONDBLCLK, OnMButtonDblClk) | |
264 MESSAGE_HANDLER_EX(WM_MBUTTONDOWN, OnMButtonDown) | |
265 MESSAGE_HANDLER_EX(WM_MBUTTONUP, OnMButtonUp) | |
266 MESSAGE_HANDLER_EX(WM_MOUSEACTIVATE, OnMouseActivate) | |
267 MESSAGE_HANDLER_EX(WM_MOUSELEAVE, OnMouseLeave) | |
268 MESSAGE_HANDLER_EX(WM_MOUSEMOVE, OnMouseMove) | |
269 MESSAGE_HANDLER_EX(WM_MOUSEWHEEL, OnMouseWheel) | |
270 MESSAGE_HANDLER_EX(WM_NCLBUTTONDBLCLK, OnNCLButtonDblClk) | |
271 MESSAGE_HANDLER_EX(WM_NCLBUTTONDOWN, OnNCLButtonDown) | |
272 MESSAGE_HANDLER_EX(WM_NCLBUTTONUP, OnNCLButtonUp) | |
273 MESSAGE_HANDLER_EX(WM_NCMBUTTONDBLCLK, OnNCMButtonDblClk) | |
274 MESSAGE_HANDLER_EX(WM_NCMBUTTONDOWN, OnNCMButtonDown) | |
275 MESSAGE_HANDLER_EX(WM_NCMBUTTONUP, OnNCMButtonUp) | |
258 MESSAGE_HANDLER_EX(WM_NCMOUSELEAVE, OnNCMouseLeave) | 276 MESSAGE_HANDLER_EX(WM_NCMOUSELEAVE, OnNCMouseLeave) |
259 MESSAGE_HANDLER_EX(WM_MOUSELEAVE, OnMouseLeave) | 277 MESSAGE_HANDLER_EX(WM_NCMOUSEMOVE, OnNCMouseMove) |
260 MESSAGE_HANDLER_EX(WM_MOUSEWHEEL, OnMouseWheel) | 278 MESSAGE_HANDLER_EX(WM_NCRBUTTONDBLCLK, OnNCRButtonDblClk) |
279 MESSAGE_HANDLER_EX(WM_NCRBUTTONDOWN, OnNCRButtonDown) | |
280 MESSAGE_HANDLER_EX(WM_NCRBUTTONUP, OnNCRButtonUp) | |
281 MESSAGE_HANDLER_EX(WM_RBUTTONDBLCLK, OnRButtonDblClk) | |
282 MESSAGE_HANDLER_EX(WM_RBUTTONDOWN, OnRButtonDown) | |
283 MESSAGE_HANDLER_EX(WM_RBUTTONUP, OnRButtonUp) | |
261 | 284 |
262 // Key events. | 285 // Key events. |
263 MESSAGE_HANDLER_EX(WM_KEYDOWN, OnKeyDown) | 286 MESSAGE_HANDLER_EX(WM_KEYDOWN, OnKeyDown) |
264 MESSAGE_HANDLER_EX(WM_KEYUP, OnKeyUp) | 287 MESSAGE_HANDLER_EX(WM_KEYUP, OnKeyUp) |
265 MESSAGE_HANDLER_EX(WM_SYSKEYDOWN, OnKeyDown); | 288 MESSAGE_HANDLER_EX(WM_SYSKEYDOWN, OnKeyDown); |
266 MESSAGE_HANDLER_EX(WM_SYSKEYUP, OnKeyUp); | 289 MESSAGE_HANDLER_EX(WM_SYSKEYUP, OnKeyUp); |
267 | 290 |
268 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. | 291 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. |
269 MSG_WM_ACTIVATE(OnActivate) | 292 MSG_WM_ACTIVATE(OnActivate) |
270 MSG_WM_ACTIVATEAPP(OnActivateApp) | 293 MSG_WM_ACTIVATEAPP(OnActivateApp) |
271 MSG_WM_APPCOMMAND(OnAppCommand) | 294 MSG_WM_APPCOMMAND(OnAppCommand) |
272 MSG_WM_CANCELMODE(OnCancelMode) | 295 MSG_WM_CANCELMODE(OnCancelMode) |
273 MSG_WM_CAPTURECHANGED(OnCaptureChanged) | 296 MSG_WM_CAPTURECHANGED(OnCaptureChanged) |
274 MSG_WM_CLOSE(OnClose) | 297 MSG_WM_CLOSE(OnClose) |
275 MSG_WM_COMMAND(OnCommand) | 298 MSG_WM_COMMAND(OnCommand) |
276 MSG_WM_CREATE(OnCreate) | 299 MSG_WM_CREATE(OnCreate) |
277 MSG_WM_DESTROY(OnDestroy) | 300 MSG_WM_DESTROY(OnDestroy) |
278 MSG_WM_DISPLAYCHANGE(OnDisplayChange) | 301 MSG_WM_DISPLAYCHANGE(OnDisplayChange) |
279 MSG_WM_ERASEBKGND(OnEraseBkgnd) | 302 MSG_WM_ERASEBKGND(OnEraseBkgnd) |
280 MSG_WM_ENDSESSION(OnEndSession) | 303 MSG_WM_ENDSESSION(OnEndSession) |
281 MSG_WM_ENTERSIZEMOVE(OnEnterSizeMove) | 304 MSG_WM_ENTERSIZEMOVE(OnEnterSizeMove) |
282 MSG_WM_EXITMENULOOP(OnExitMenuLoop) | 305 MSG_WM_EXITMENULOOP(OnExitMenuLoop) |
283 MSG_WM_EXITSIZEMOVE(OnExitSizeMove) | 306 MSG_WM_EXITSIZEMOVE(OnExitSizeMove) |
284 MSG_WM_GETMINMAXINFO(OnGetMinMaxInfo) | 307 MSG_WM_GETMINMAXINFO(OnGetMinMaxInfo) |
285 MSG_WM_HSCROLL(OnHScroll) | 308 MSG_WM_HSCROLL(OnHScroll) |
286 MSG_WM_INITMENU(OnInitMenu) | 309 MSG_WM_INITMENU(OnInitMenu) |
287 MSG_WM_INITMENUPOPUP(OnInitMenuPopup) | 310 MSG_WM_INITMENUPOPUP(OnInitMenuPopup) |
288 MSG_WM_KILLFOCUS(OnKillFocus) | 311 MSG_WM_KILLFOCUS(OnKillFocus) |
289 MSG_WM_LBUTTONDBLCLK(OnLButtonDblClk) | |
290 MSG_WM_LBUTTONDOWN(OnLButtonDown) | |
291 MSG_WM_LBUTTONUP(OnLButtonUp) | |
292 MSG_WM_MBUTTONDOWN(OnMButtonDown) | |
293 MSG_WM_MBUTTONUP(OnMButtonUp) | |
294 MSG_WM_MBUTTONDBLCLK(OnMButtonDblClk) | |
295 MSG_WM_MOUSEACTIVATE(OnMouseActivate) | |
296 MSG_WM_MOUSEMOVE(OnMouseMove) | |
297 MSG_WM_MOVE(OnMove) | 312 MSG_WM_MOVE(OnMove) |
298 MSG_WM_MOVING(OnMoving) | 313 MSG_WM_MOVING(OnMoving) |
299 MSG_WM_NCACTIVATE(OnNCActivate) | 314 MSG_WM_NCACTIVATE(OnNCActivate) |
300 MSG_WM_NCCALCSIZE(OnNCCalcSize) | 315 MSG_WM_NCCALCSIZE(OnNCCalcSize) |
301 MSG_WM_NCHITTEST(OnNCHitTest) | 316 MSG_WM_NCHITTEST(OnNCHitTest) |
302 MSG_WM_NCMOUSEMOVE(OnNCMouseMove) | |
303 MSG_WM_NCLBUTTONDBLCLK(OnNCLButtonDblClk) | |
304 MSG_WM_NCLBUTTONDOWN(OnNCLButtonDown) | |
305 MSG_WM_NCLBUTTONUP(OnNCLButtonUp) | |
306 MSG_WM_NCMBUTTONDBLCLK(OnNCMButtonDblClk) | |
307 MSG_WM_NCMBUTTONDOWN(OnNCMButtonDown) | |
308 MSG_WM_NCMBUTTONUP(OnNCMButtonUp) | |
309 MSG_WM_NCPAINT(OnNCPaint) | 317 MSG_WM_NCPAINT(OnNCPaint) |
310 MSG_WM_NCRBUTTONDBLCLK(OnNCRButtonDblClk) | |
311 MSG_WM_NCRBUTTONDOWN(OnNCRButtonDown) | |
312 MSG_WM_NCRBUTTONUP(OnNCRButtonUp) | |
313 MSG_WM_NOTIFY(OnNotify) | 318 MSG_WM_NOTIFY(OnNotify) |
314 MSG_WM_PAINT(OnPaint) | 319 MSG_WM_PAINT(OnPaint) |
315 MSG_WM_POWERBROADCAST(OnPowerBroadcast) | 320 MSG_WM_POWERBROADCAST(OnPowerBroadcast) |
316 MSG_WM_RBUTTONDBLCLK(OnRButtonDblClk) | |
317 MSG_WM_RBUTTONDOWN(OnRButtonDown) | |
318 MSG_WM_RBUTTONUP(OnRButtonUp) | |
319 MSG_WM_SETFOCUS(OnSetFocus) | 321 MSG_WM_SETFOCUS(OnSetFocus) |
320 MSG_WM_SETICON(OnSetIcon) | 322 MSG_WM_SETICON(OnSetIcon) |
321 MSG_WM_SETTEXT(OnSetText) | 323 MSG_WM_SETTEXT(OnSetText) |
322 MSG_WM_SETTINGCHANGE(OnSettingChange) | 324 MSG_WM_SETTINGCHANGE(OnSettingChange) |
323 MSG_WM_SIZE(OnSize) | 325 MSG_WM_SIZE(OnSize) |
324 MSG_WM_SYSCOMMAND(OnSysCommand) | 326 MSG_WM_SYSCOMMAND(OnSysCommand) |
325 MSG_WM_THEMECHANGED(OnThemeChanged) | 327 MSG_WM_THEMECHANGED(OnThemeChanged) |
326 MSG_WM_VSCROLL(OnVScroll) | 328 MSG_WM_VSCROLL(OnVScroll) |
327 MSG_WM_WINDOWPOSCHANGING(OnWindowPosChanging) | 329 MSG_WM_WINDOWPOSCHANGING(OnWindowPosChanging) |
328 MSG_WM_WINDOWPOSCHANGED(OnWindowPosChanged) | 330 MSG_WM_WINDOWPOSCHANGED(OnWindowPosChanged) |
(...skipping 29 matching lines...) Expand all Loading... | |
358 virtual void OnExitMenuLoop(BOOL is_track_popup_menu); | 360 virtual void OnExitMenuLoop(BOOL is_track_popup_menu); |
359 virtual void OnExitSizeMove(); | 361 virtual void OnExitSizeMove(); |
360 virtual LRESULT OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param); | 362 virtual LRESULT OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param); |
361 virtual void OnGetMinMaxInfo(MINMAXINFO* minmax_info); | 363 virtual void OnGetMinMaxInfo(MINMAXINFO* minmax_info); |
362 virtual void OnHScroll(int scroll_type, short position, HWND scrollbar); | 364 virtual void OnHScroll(int scroll_type, short position, HWND scrollbar); |
363 virtual void OnInitMenu(HMENU menu); | 365 virtual void OnInitMenu(HMENU menu); |
364 virtual void OnInitMenuPopup(HMENU menu, UINT position, BOOL is_system_menu); | 366 virtual void OnInitMenuPopup(HMENU menu, UINT position, BOOL is_system_menu); |
365 virtual LRESULT OnKeyDown(UINT message, WPARAM w_param, LPARAM l_param); | 367 virtual LRESULT OnKeyDown(UINT message, WPARAM w_param, LPARAM l_param); |
366 virtual LRESULT OnKeyUp(UINT message, WPARAM w_param, LPARAM l_param); | 368 virtual LRESULT OnKeyUp(UINT message, WPARAM w_param, LPARAM l_param); |
367 virtual void OnKillFocus(HWND focused_window); | 369 virtual void OnKillFocus(HWND focused_window); |
368 virtual void OnLButtonDblClk(UINT flags, const CPoint& point); | 370 virtual LRESULT OnLButtonDblClk(UINT message, WPARAM w_param, LPARAM l_param); |
369 virtual void OnLButtonDown(UINT flags, const CPoint& point); | 371 virtual LRESULT OnLButtonDown(UINT message, WPARAM w_param, LPARAM l_param); |
370 virtual void OnLButtonUp(UINT flags, const CPoint& point); | 372 virtual LRESULT OnLButtonUp(UINT message, WPARAM w_param, LPARAM l_param); |
371 virtual void OnMButtonDblClk(UINT flags, const CPoint& point); | 373 virtual LRESULT OnMButtonDblClk(UINT message, WPARAM w_param, LPARAM l_param); |
372 virtual void OnMButtonDown(UINT flags, const CPoint& point); | 374 virtual LRESULT OnMButtonDown(UINT message, WPARAM w_param, LPARAM l_param); |
373 virtual void OnMButtonUp(UINT flags, const CPoint& point); | 375 virtual LRESULT OnMButtonUp(UINT message, WPARAM w_param, LPARAM l_param); |
374 virtual LRESULT OnMouseActivate(HWND window, UINT hittest_code, UINT message); | 376 virtual LRESULT OnMouseActivate(UINT message, WPARAM w_param, LPARAM l_param); |
375 virtual void OnMouseMove(UINT flags, const CPoint& point); | 377 virtual LRESULT OnMouseMove(UINT message, WPARAM w_param, LPARAM l_param); |
376 virtual LRESULT OnMouseLeave(UINT message, WPARAM w_param, LPARAM l_param); | 378 virtual LRESULT OnMouseLeave(UINT message, WPARAM w_param, LPARAM l_param); |
377 virtual LRESULT OnMouseWheel(UINT message, WPARAM w_param, LPARAM l_param); | 379 virtual LRESULT OnMouseWheel(UINT message, WPARAM w_param, LPARAM l_param); |
378 virtual void OnMove(const CPoint& point); | 380 virtual void OnMove(const CPoint& point); |
379 virtual void OnMoving(UINT param, LPRECT new_bounds); | 381 virtual void OnMoving(UINT param, LPRECT new_bounds); |
380 virtual LRESULT OnMouseRange(UINT msg, WPARAM w_param, LPARAM l_param); | 382 virtual LRESULT OnMouseRange(UINT msg, WPARAM w_param, LPARAM l_param); |
381 virtual LRESULT OnNCActivate(BOOL active); | 383 virtual LRESULT OnNCActivate(BOOL active); |
382 virtual LRESULT OnNCCalcSize(BOOL w_param, LPARAM l_param); | 384 virtual LRESULT OnNCCalcSize(BOOL w_param, LPARAM l_param); |
383 virtual LRESULT OnNCHitTest(const CPoint& pt); | 385 virtual LRESULT OnNCHitTest(const CPoint& pt); |
384 virtual void OnNCLButtonDblClk(UINT flags, const CPoint& point); | 386 virtual LRESULT OnNCLButtonDblClk(UINT message, |
385 virtual void OnNCLButtonDown(UINT flags, const CPoint& point); | 387 WPARAM w_param, |
386 virtual void OnNCLButtonUp(UINT flags, const CPoint& point); | 388 LPARAM l_param); |
387 virtual void OnNCMButtonDblClk(UINT flags, const CPoint& point); | 389 virtual LRESULT OnNCLButtonDown(UINT message, WPARAM w_param, LPARAM l_param); |
388 virtual void OnNCMButtonDown(UINT flags, const CPoint& point); | 390 virtual LRESULT OnNCLButtonUp(UINT message, WPARAM w_param, LPARAM l_param); |
389 virtual void OnNCMButtonUp(UINT flags, const CPoint& point); | 391 virtual LRESULT OnNCMButtonDblClk(UINT message, |
390 virtual LRESULT OnNCMouseLeave(UINT uMsg, WPARAM w_param, LPARAM l_param); | 392 WPARAM w_param, |
391 virtual LRESULT OnNCMouseMove(UINT flags, const CPoint& point); | 393 LPARAM l_param); |
394 virtual LRESULT OnNCMButtonDown(UINT message, WPARAM w_param, LPARAM l_param); | |
395 virtual LRESULT OnNCMButtonUp(UINT message, WPARAM w_param, LPARAM l_param); | |
396 virtual LRESULT OnNCMouseLeave(UINT message, WPARAM w_param, LPARAM l_param); | |
397 virtual LRESULT OnNCMouseMove(UINT message, WPARAM w_param, LPARAM l_param); | |
392 virtual void OnNCPaint(HRGN rgn); | 398 virtual void OnNCPaint(HRGN rgn); |
393 virtual void OnNCRButtonDblClk(UINT flags, const CPoint& point); | 399 virtual LRESULT OnNCRButtonDblClk(UINT message, |
394 virtual void OnNCRButtonDown(UINT flags, const CPoint& point); | 400 WPARAM w_param, |
395 virtual void OnNCRButtonUp(UINT flags, const CPoint& point); | 401 LPARAM l_param); |
402 virtual LRESULT OnNCRButtonDown(UINT message, WPARAM w_param, LPARAM l_param); | |
403 virtual LRESULT OnNCRButtonUp(UINT message, WPARAM w_param, LPARAM l_param); | |
396 virtual LRESULT OnNCUAHDrawCaption(UINT msg, | 404 virtual LRESULT OnNCUAHDrawCaption(UINT msg, |
397 WPARAM w_param, | 405 WPARAM w_param, |
398 LPARAM l_param); | 406 LPARAM l_param); |
399 virtual LRESULT OnNCUAHDrawFrame(UINT msg, WPARAM w_param, LPARAM l_param); | 407 virtual LRESULT OnNCUAHDrawFrame(UINT msg, WPARAM w_param, LPARAM l_param); |
400 virtual LRESULT OnNotify(int w_param, NMHDR* l_param); | 408 virtual LRESULT OnNotify(int w_param, NMHDR* l_param); |
401 virtual void OnPaint(HDC dc); | 409 virtual void OnPaint(HDC dc); |
402 virtual LRESULT OnPowerBroadcast(DWORD power_event, DWORD data); | 410 virtual LRESULT OnPowerBroadcast(DWORD power_event, DWORD data); |
403 virtual void OnRButtonDblClk(UINT flags, const CPoint& point); | 411 virtual LRESULT OnRButtonDblClk(UINT message, WPARAM w_param, LPARAM l_param); |
404 virtual void OnRButtonDown(UINT flags, const CPoint& point); | 412 virtual LRESULT OnRButtonDown(UINT message, WPARAM w_param, LPARAM l_param); |
405 virtual void OnRButtonUp(UINT flags, const CPoint& point); | 413 virtual LRESULT OnRButtonUp(UINT message, WPARAM w_param, LPARAM l_param); |
406 virtual LRESULT OnReflectedMessage(UINT msg, WPARAM w_param, LPARAM l_param); | 414 virtual LRESULT OnReflectedMessage(UINT msg, WPARAM w_param, LPARAM l_param); |
407 virtual void OnSetFocus(HWND focused_window); | 415 virtual void OnSetFocus(HWND focused_window); |
408 virtual LRESULT OnSetIcon(UINT size_type, HICON new_icon); | 416 virtual LRESULT OnSetIcon(UINT size_type, HICON new_icon); |
409 virtual LRESULT OnSetText(const wchar_t* text); | 417 virtual LRESULT OnSetText(const wchar_t* text); |
410 virtual void OnSettingChange(UINT flags, const wchar_t* section); | 418 virtual void OnSettingChange(UINT flags, const wchar_t* section); |
411 virtual void OnSize(UINT param, const CSize& size); | 419 virtual void OnSize(UINT param, const CSize& size); |
412 virtual void OnSysCommand(UINT notification_code, CPoint click); | 420 virtual void OnSysCommand(UINT notification_code, CPoint click); |
413 virtual void OnThemeChanged(); | 421 virtual void OnThemeChanged(); |
414 virtual void OnVScroll(int scroll_type, short position, HWND scrollbar); | 422 virtual void OnVScroll(int scroll_type, short position, HWND scrollbar); |
415 virtual void OnWindowPosChanging(WINDOWPOS* window_pos); | 423 virtual void OnWindowPosChanging(WINDOWPOS* window_pos); |
416 virtual void OnWindowPosChanged(WINDOWPOS* window_pos); | 424 virtual void OnWindowPosChanged(WINDOWPOS* window_pos); |
417 | 425 |
418 // Deletes this window as it is destroyed, override to provide different | 426 // Deletes this window as it is destroyed, override to provide different |
419 // behavior. | 427 // behavior. |
420 virtual void OnFinalMessage(HWND window); | 428 virtual void OnFinalMessage(HWND window); |
421 | 429 |
422 // Returns the size that the RootView should be set to in LayoutRootView(). | 430 // Returns the size that the RootView should be set to in LayoutRootView(). |
423 virtual gfx::Size GetRootViewSize() const; | 431 virtual gfx::Size GetRootViewSize() const; |
424 | 432 |
425 // Start tracking all mouse events so that this window gets sent mouse leave | 433 // Start tracking all mouse events so that this window gets sent mouse leave |
426 // messages too. | 434 // messages too. |
427 void TrackMouseEvents(DWORD mouse_tracking_flags); | 435 void TrackMouseEvents(DWORD mouse_tracking_flags); |
428 | 436 |
429 // Actually handle mouse events. These functions are called by subclasses who | 437 // Actually handle mouse events. These functions are called by subclasses who |
430 // override the message handlers above to do the actual real work of handling | 438 // override the message handlers above to do the actual real work of handling |
431 // the event in the View system. | 439 // the event in the View system. |
432 bool ProcessMousePressed(const CPoint& point, | 440 bool ProcessMousePressed(UINT message, WPARAM w_param, LPARAM l_param); |
433 UINT flags, | 441 // TODO(msw): ProcessMouseDragged could be made class/file private. |
434 bool dbl_click, | 442 void ProcessMouseDragged(UINT message, WPARAM w_param, LPARAM l_param); |
435 bool non_client); | 443 void ProcessMouseReleased(UINT message, WPARAM w_param, LPARAM l_param); |
436 void ProcessMouseDragged(const CPoint& point, UINT flags); | 444 void ProcessMouseMoved(UINT message, WPARAM w_param, LPARAM l_param); |
437 void ProcessMouseReleased(const CPoint& point, UINT flags); | |
438 void ProcessMouseMoved(const CPoint& point, UINT flags, bool is_nonclient); | |
439 void ProcessMouseExited(); | 445 void ProcessMouseExited(); |
440 | 446 |
441 // Lays out the root view to fit the appropriate area within the widget. | 447 // Lays out the root view to fit the appropriate area within the widget. |
442 // Called when the window size or non client metrics change. | 448 // Called when the window size or non client metrics change. |
443 void LayoutRootView(); | 449 void LayoutRootView(); |
444 | 450 |
445 // Called when a MSAA screen reader client is detected. | 451 // Called when a MSAA screen reader client is detected. |
446 virtual void OnScreenReaderDetected(); | 452 virtual void OnScreenReaderDetected(); |
447 | 453 |
448 // Returns whether capture should be released on mouse release. The default | 454 // Returns whether capture should be released on mouse release. The default |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
591 gfx::NativeCursor previous_cursor_; | 597 gfx::NativeCursor previous_cursor_; |
592 | 598 |
593 ViewProps props_; | 599 ViewProps props_; |
594 | 600 |
595 DISALLOW_COPY_AND_ASSIGN(WidgetWin); | 601 DISALLOW_COPY_AND_ASSIGN(WidgetWin); |
596 }; | 602 }; |
597 | 603 |
598 } // namespace views | 604 } // namespace views |
599 | 605 |
600 #endif // VIEWS_WIDGET_WIDGET_WIN_H_ | 606 #endif // VIEWS_WIDGET_WIDGET_WIN_H_ |
OLD | NEW |