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

Side by Side Diff: ui/views/view.h

Issue 103493005: Rename View::set_focusable and View::set_accessibility_focusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a few missing files Created 7 years 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 | « ui/views/touchui/touch_editing_menu.cc ('k') | ui/views/view.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 // Sets the component that should be selected next when pressing Tab, and 763 // Sets the component that should be selected next when pressing Tab, and
764 // makes the current view the precedent view of the specified one. 764 // makes the current view the precedent view of the specified one.
765 // Note that by default views are linked in the order they have been added to 765 // Note that by default views are linked in the order they have been added to
766 // their container. Use this method if you want to modify the order. 766 // their container. Use this method if you want to modify the order.
767 // IMPORTANT NOTE: loops in the focus hierarchy are not supported. 767 // IMPORTANT NOTE: loops in the focus hierarchy are not supported.
768 void SetNextFocusableView(View* view); 768 void SetNextFocusableView(View* view);
769 769
770 // Sets whether this view is capable of taking focus. 770 // Sets whether this view is capable of taking focus.
771 // Note that this is false by default so that a view used as a container does 771 // Note that this is false by default so that a view used as a container does
772 // not get the focus. 772 // not get the focus.
773 void set_focusable(bool focusable) { focusable_ = focusable; } 773 void SetFocusable(bool focusable);
774 774
775 // Returns true if this view is capable of taking focus. 775 // Returns true if this view is capable of taking focus.
776 bool focusable() const { return focusable_ && enabled_ && visible_; } 776 bool focusable() const { return focusable_ && enabled_ && visible_; }
777 777
778 // Returns true if this view is |focusable_|, |enabled_| and drawn. 778 // Returns true if this view is |focusable_|, |enabled_| and drawn.
779 virtual bool IsFocusable() const; 779 virtual bool IsFocusable() const;
780 780
781 // Return whether this view is focusable when the user requires full keyboard 781 // Return whether this view is focusable when the user requires full keyboard
782 // access, even though it may not be normally focusable. 782 // access, even though it may not be normally focusable.
783 bool IsAccessibilityFocusable() const; 783 bool IsAccessibilityFocusable() const;
784 784
785 // Set whether this view can be made focusable if the user requires 785 // Set whether this view can be made focusable if the user requires
786 // full keyboard access, even though it's not normally focusable. 786 // full keyboard access, even though it's not normally focusable.
787 // Note that this is false by default. 787 // Note that this is false by default.
788 void set_accessibility_focusable(bool accessibility_focusable) { 788 void SetAccessibilityFocusable(bool accessibility_focusable);
789 accessibility_focusable_ = accessibility_focusable;
790 }
791 789
792 // Convenience method to retrieve the FocusManager associated with the 790 // Convenience method to retrieve the FocusManager associated with the
793 // Widget that contains this view. This can return NULL if this view is not 791 // Widget that contains this view. This can return NULL if this view is not
794 // part of a view hierarchy with a Widget. 792 // part of a view hierarchy with a Widget.
795 virtual FocusManager* GetFocusManager(); 793 virtual FocusManager* GetFocusManager();
796 virtual const FocusManager* GetFocusManager() const; 794 virtual const FocusManager* GetFocusManager() const;
797 795
798 // Request keyboard focus. The receiving view will become the focused view. 796 // Request keyboard focus. The receiving view will become the focused view.
799 virtual void RequestFocus(); 797 virtual void RequestFocus();
800 798
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 // Belongs to this view, but it's reference-counted on some platforms 1557 // Belongs to this view, but it's reference-counted on some platforms
1560 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1558 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1561 NativeViewAccessibility* native_view_accessibility_; 1559 NativeViewAccessibility* native_view_accessibility_;
1562 1560
1563 DISALLOW_COPY_AND_ASSIGN(View); 1561 DISALLOW_COPY_AND_ASSIGN(View);
1564 }; 1562 };
1565 1563
1566 } // namespace views 1564 } // namespace views
1567 1565
1568 #endif // UI_VIEWS_VIEW_H_ 1566 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/touchui/touch_editing_menu.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698