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 CHROME_VIEWS_VIEW_H_ | 5 #ifndef CHROME_VIEWS_VIEW_H_ |
6 #define CHROME_VIEWS_VIEW_H_ | 6 #define CHROME_VIEWS_VIEW_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 | 665 |
666 // Convert a point from source coordinate system to dst coordinate system. | 666 // Convert a point from source coordinate system to dst coordinate system. |
667 // | 667 // |
668 // source is a parent or a child of dst, directly or transitively. | 668 // source is a parent or a child of dst, directly or transitively. |
669 // If source and dst are not in the same View hierarchy, the result is | 669 // If source and dst are not in the same View hierarchy, the result is |
670 // undefined. | 670 // undefined. |
671 // Source can be NULL in which case it means the screen coordinate system | 671 // Source can be NULL in which case it means the screen coordinate system |
672 static void ConvertPointToView(View* src, | 672 static void ConvertPointToView(View* src, |
673 View* dst, | 673 View* dst, |
674 gfx::Point* point); | 674 gfx::Point* point); |
675 // WARNING: DEPRECATED. Will be removed once everything is converted to | |
676 // gfx::Point. Don't add code that use this overload. | |
677 static void ConvertPointToView(View* src, | |
678 View* dst, | |
679 CPoint* point); | |
680 | 675 |
681 // Convert a point from the coordinate system of a View to that of the | 676 // Convert a point from the coordinate system of a View to that of the |
682 // ViewContainer. This is useful for example when sizing HWND children | 677 // ViewContainer. This is useful for example when sizing HWND children |
683 // of the ViewContainer that don't know about the View hierarchy and need | 678 // of the ViewContainer that don't know about the View hierarchy and need |
684 // to be placed relative to the ViewContainer that is their parent. | 679 // to be placed relative to the ViewContainer that is their parent. |
685 static void ConvertPointToViewContainer(View* src, CPoint* point); | 680 static void ConvertPointToViewContainer(View* src, gfx::Point* point); |
686 | 681 |
687 // Convert a point from a view ViewContainer to a View dest | 682 // Convert a point from a view ViewContainer to a View dest |
688 static void ConvertPointFromViewContainer(View *dest, CPoint *p); | 683 static void ConvertPointFromViewContainer(View *dest, gfx::Point* p); |
689 | 684 |
690 // Convert a point from the coordinate system of a View to that of the | 685 // Convert a point from the coordinate system of a View to that of the |
691 // screen. This is useful for example when placing popup windows. | 686 // screen. This is useful for example when placing popup windows. |
692 static void ConvertPointToScreen(View* src, CPoint* point); | 687 static void ConvertPointToScreen(View* src, gfx::Point* point); |
693 | 688 |
694 // Event Handlers | 689 // Event Handlers |
695 | 690 |
696 // This method is invoked when the user clicks on this view. | 691 // This method is invoked when the user clicks on this view. |
697 // The provided event is in the receiver's coordinate system. | 692 // The provided event is in the receiver's coordinate system. |
698 // | 693 // |
699 // Return true if you processed the event and want to receive subsequent | 694 // Return true if you processed the event and want to receive subsequent |
700 // MouseDraggged and MouseReleased events. This also stops the event from | 695 // MouseDraggged and MouseReleased events. This also stops the event from |
701 // bubbling. If you return false, the event will bubble through parent | 696 // bubbling. If you return false, the event will bubble through parent |
702 // views. | 697 // views. |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 // right-to-left locales for this View. | 1295 // right-to-left locales for this View. |
1301 bool flip_canvas_on_paint_for_rtl_ui_; | 1296 bool flip_canvas_on_paint_for_rtl_ui_; |
1302 | 1297 |
1303 DISALLOW_COPY_AND_ASSIGN(View); | 1298 DISALLOW_COPY_AND_ASSIGN(View); |
1304 }; | 1299 }; |
1305 | 1300 |
1306 } // namespace ChromeViews | 1301 } // namespace ChromeViews |
1307 | 1302 |
1308 #endif // CHROME_VIEWS_VIEW_H_ | 1303 #endif // CHROME_VIEWS_VIEW_H_ |
1309 | 1304 |
OLD | NEW |