| 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_VIEW_H_ | 5 #ifndef VIEWS_VIEW_H_ |
| 6 #define VIEWS_VIEW_H_ | 6 #define VIEWS_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #if defined(OS_WIN) | 45 #if defined(OS_WIN) |
| 46 class NativeViewAccessibilityWin; | 46 class NativeViewAccessibilityWin; |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 namespace views { | 49 namespace views { |
| 50 | 50 |
| 51 class Background; | 51 class Background; |
| 52 class Border; | 52 class Border; |
| 53 class FocusManager; | 53 class FocusManager; |
| 54 class FocusTraversable; | 54 class FocusTraversable; |
| 55 class InputMethod; |
| 55 class LayoutManager; | 56 class LayoutManager; |
| 56 class RootView; | 57 class RootView; |
| 57 class ScrollView; | 58 class ScrollView; |
| 59 class TextInputClient; |
| 58 class Widget; | 60 class Widget; |
| 59 class Window; | 61 class Window; |
| 60 | 62 |
| 61 // ContextMenuController is responsible for showing the context menu for a | 63 // ContextMenuController is responsible for showing the context menu for a |
| 62 // View. To use a ContextMenuController invoke SetContextMenuController on a | 64 // View. To use a ContextMenuController invoke SetContextMenuController on a |
| 63 // View. When the appropriate user gesture occurs ShowContextMenu is invoked | 65 // View. When the appropriate user gesture occurs ShowContextMenu is invoked |
| 64 // on the ContextMenuController. | 66 // on the ContextMenuController. |
| 65 // | 67 // |
| 66 // Setting a ContextMenuController on a view makes the view process mouse | 68 // Setting a ContextMenuController on a view makes the view process mouse |
| 67 // events. | 69 // events. |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 // chance. | 680 // chance. |
| 679 virtual bool OnKeyPressed(const KeyEvent& event); | 681 virtual bool OnKeyPressed(const KeyEvent& event); |
| 680 virtual bool OnKeyReleased(const KeyEvent& event); | 682 virtual bool OnKeyReleased(const KeyEvent& event); |
| 681 | 683 |
| 682 // Invoked when the user uses the mousewheel. Implementors should return true | 684 // Invoked when the user uses the mousewheel. Implementors should return true |
| 683 // if the event has been processed and false otherwise. This message is sent | 685 // if the event has been processed and false otherwise. This message is sent |
| 684 // if the view is focused. If the event has not been processed, the parent | 686 // if the view is focused. If the event has not been processed, the parent |
| 685 // will be given a chance. | 687 // will be given a chance. |
| 686 virtual bool OnMouseWheel(const MouseWheelEvent& event); | 688 virtual bool OnMouseWheel(const MouseWheelEvent& event); |
| 687 | 689 |
| 690 // Returns the View's TextInputClient instance or NULL if the View doesn't |
| 691 // support text input. |
| 692 virtual TextInputClient* GetTextInputClient(); |
| 693 |
| 694 // Convenience method to retrieve the InputMethod associated with the |
| 695 // Widget that contains this view. Returns NULL if this view is not part of a |
| 696 // view hierarchy with a Widget. |
| 697 virtual InputMethod* GetInputMethod(); |
| 698 |
| 688 // Accelerators -------------------------------------------------------------- | 699 // Accelerators -------------------------------------------------------------- |
| 689 | 700 |
| 690 // Sets a keyboard accelerator for that view. When the user presses the | 701 // Sets a keyboard accelerator for that view. When the user presses the |
| 691 // accelerator key combination, the AcceleratorPressed method is invoked. | 702 // accelerator key combination, the AcceleratorPressed method is invoked. |
| 692 // Note that you can set multiple accelerators for a view by invoking this | 703 // Note that you can set multiple accelerators for a view by invoking this |
| 693 // method several times. | 704 // method several times. |
| 694 virtual void AddAccelerator(const Accelerator& accelerator); | 705 virtual void AddAccelerator(const Accelerator& accelerator); |
| 695 | 706 |
| 696 // Removes the specified accelerator for this view. | 707 // Removes the specified accelerator for this view. |
| 697 virtual void RemoveAccelerator(const Accelerator& accelerator); | 708 virtual void RemoveAccelerator(const Accelerator& accelerator); |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 // The Windows-specific accessibility implementation for this View. | 1406 // The Windows-specific accessibility implementation for this View. |
| 1396 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; | 1407 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; |
| 1397 #endif | 1408 #endif |
| 1398 | 1409 |
| 1399 DISALLOW_COPY_AND_ASSIGN(View); | 1410 DISALLOW_COPY_AND_ASSIGN(View); |
| 1400 }; | 1411 }; |
| 1401 | 1412 |
| 1402 } // namespace views | 1413 } // namespace views |
| 1403 | 1414 |
| 1404 #endif // VIEWS_VIEW_H_ | 1415 #endif // VIEWS_VIEW_H_ |
| OLD | NEW |