Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: views/widget/widget_win.h

Issue 174029: Reverting 23645. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/native_control.cc ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlapp.h> 9 #include <atlapp.h>
10 #include <atlcrack.h> 10 #include <atlcrack.h>
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // that disregards duplicate mouse moves when ending animation requires 296 // that disregards duplicate mouse moves when ending animation requires
297 // a new hit-test to do some highlighting as in TabStrip::RemoveTabAnimation 297 // a new hit-test to do some highlighting as in TabStrip::RemoveTabAnimation
298 // to cause the close button to highlight. 298 // to cause the close button to highlight.
299 void ResetLastMouseMoveFlag() { 299 void ResetLastMouseMoveFlag() {
300 last_mouse_event_was_move_ = false; 300 last_mouse_event_was_move_ = false;
301 } 301 }
302 302
303 protected: 303 protected:
304 // Overridden from WindowImpl: 304 // Overridden from WindowImpl:
305 virtual HICON GetDefaultWindowIcon() const; 305 virtual HICON GetDefaultWindowIcon() const;
306 virtual void OnFinalMessage(HWND window);
307 virtual LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param); 306 virtual LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param);
308 307
309 // Message Handlers 308 // Message Handlers
310 // These are all virtual so that specialized Widgets can modify or augment 309 // These are all virtual so that specialized Widgets can modify or augment
311 // processing. 310 // processing.
312 // This list is in _ALPHABETICAL_ order! 311 // This list is in _ALPHABETICAL_ order!
313 // Note: in the base class these functions must do nothing but convert point 312 // Note: in the base class these functions must do nothing but convert point
314 // coordinates to client coordinates (if necessary) and forward the 313 // coordinates to client coordinates (if necessary) and forward the
315 // handling to the appropriate Process* function. This is so that 314 // handling to the appropriate Process* function. This is so that
316 // subclasses can easily override these methods to do different things 315 // subclasses can easily override these methods to do different things
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 virtual void OnMButtonDblClk(UINT flags, const CPoint& point); 367 virtual void OnMButtonDblClk(UINT flags, const CPoint& point);
369 virtual void OnMButtonDown(UINT flags, const CPoint& point); 368 virtual void OnMButtonDown(UINT flags, const CPoint& point);
370 virtual void OnMButtonUp(UINT flags, const CPoint& point); 369 virtual void OnMButtonUp(UINT flags, const CPoint& point);
371 virtual LRESULT OnMouseActivate(HWND window, UINT hittest_code, UINT message); 370 virtual LRESULT OnMouseActivate(HWND window, UINT hittest_code, UINT message);
372 virtual void OnMouseMove(UINT flags, const CPoint& point); 371 virtual void OnMouseMove(UINT flags, const CPoint& point);
373 virtual LRESULT OnMouseLeave(UINT message, WPARAM w_param, LPARAM l_param); 372 virtual LRESULT OnMouseLeave(UINT message, WPARAM w_param, LPARAM l_param);
374 virtual LRESULT OnMouseWheel(UINT message, WPARAM w_param, LPARAM l_param); 373 virtual LRESULT OnMouseWheel(UINT message, WPARAM w_param, LPARAM l_param);
375 virtual void OnMove(const CPoint& point) { SetMsgHandled(FALSE); } 374 virtual void OnMove(const CPoint& point) { SetMsgHandled(FALSE); }
376 virtual void OnMoving(UINT param, const LPRECT new_bounds) { } 375 virtual void OnMoving(UINT param, const LPRECT new_bounds) { }
377 virtual LRESULT OnMouseRange(UINT msg, WPARAM w_param, LPARAM l_param); 376 virtual LRESULT OnMouseRange(UINT msg, WPARAM w_param, LPARAM l_param);
378 virtual LRESULT OnNCActivate(BOOL active) { 377 virtual LRESULT OnNCActivate(BOOL active) { SetMsgHandled(FALSE); return 0; }
379 SetMsgHandled(FALSE);
380 return 0;
381 }
382 virtual LRESULT OnNCCalcSize(BOOL w_param, LPARAM l_param) { 378 virtual LRESULT OnNCCalcSize(BOOL w_param, LPARAM l_param) {
383 SetMsgHandled(FALSE); 379 SetMsgHandled(FALSE);
384 return 0; 380 return 0;
385 } 381 }
386 virtual LRESULT OnNCHitTest(const CPoint& pt) { 382 virtual LRESULT OnNCHitTest(const CPoint& pt) {
387 SetMsgHandled(FALSE); 383 SetMsgHandled(FALSE);
388 return 0; 384 return 0;
389 } 385 }
390 virtual void OnNCLButtonDblClk(UINT flags, const CPoint& point); 386 virtual void OnNCLButtonDblClk(UINT flags, const CPoint& point);
391 virtual void OnNCLButtonDown(UINT flags, const CPoint& point); 387 virtual void OnNCLButtonDown(UINT flags, const CPoint& point);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 virtual void OnVScroll(int scroll_type, short position, HWND scrollbar) { 441 virtual void OnVScroll(int scroll_type, short position, HWND scrollbar) {
446 SetMsgHandled(FALSE); 442 SetMsgHandled(FALSE);
447 } 443 }
448 virtual void OnWindowPosChanging(WINDOWPOS* window_pos) { 444 virtual void OnWindowPosChanging(WINDOWPOS* window_pos) {
449 SetMsgHandled(FALSE); 445 SetMsgHandled(FALSE);
450 } 446 }
451 virtual void OnWindowPosChanged(WINDOWPOS* window_pos) { 447 virtual void OnWindowPosChanged(WINDOWPOS* window_pos) {
452 SetMsgHandled(FALSE); 448 SetMsgHandled(FALSE);
453 } 449 }
454 450
451 // deletes this window as it is destroyed, override to provide different
452 // behavior.
453 virtual void OnFinalMessage(HWND window);
454
455 // Start tracking all mouse events so that this window gets sent mouse leave 455 // Start tracking all mouse events so that this window gets sent mouse leave
456 // messages too. |is_nonclient| is true when we should track WM_NCMOUSELEAVE 456 // messages too. |is_nonclient| is true when we should track WM_NCMOUSELEAVE
457 // messages instead of WM_MOUSELEAVE ones. 457 // messages instead of WM_MOUSELEAVE ones.
458 void TrackMouseEvents(DWORD mouse_tracking_flags); 458 void TrackMouseEvents(DWORD mouse_tracking_flags);
459 459
460 // Actually handle mouse events. These functions are called by subclasses who 460 // Actually handle mouse events. These functions are called by subclasses who
461 // override the message handlers above to do the actual real work of handling 461 // override the message handlers above to do the actual real work of handling
462 // the event in the View system. 462 // the event in the View system.
463 bool ProcessMousePressed(const CPoint& point, 463 bool ProcessMousePressed(const CPoint& point,
464 UINT flags, 464 UINT flags,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 588
589 // Instance of accessibility information and handling for MSAA root 589 // Instance of accessibility information and handling for MSAA root
590 CComPtr<IAccessible> accessibility_root_; 590 CComPtr<IAccessible> accessibility_root_;
591 591
592 scoped_ptr<DefaultThemeProvider> default_theme_provider_; 592 scoped_ptr<DefaultThemeProvider> default_theme_provider_;
593 }; 593 };
594 594
595 } // namespace views 595 } // namespace views
596 596
597 #endif // VIEWS_WIDGET_WIDGET_WIN_H_ 597 #endif // VIEWS_WIDGET_WIDGET_WIN_H_
OLDNEW
« no previous file with comments | « views/controls/native_control.cc ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698