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

Side by Side Diff: views/view.h

Issue 6976048: views: Add OnEnabledChanged() method to View class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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
OLDNEW
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 <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // Return whether a view is visible 310 // Return whether a view is visible
311 virtual bool IsVisible() const; 311 virtual bool IsVisible() const;
312 312
313 // Return whether a view and its ancestors are visible. Returns true if the 313 // Return whether a view and its ancestors are visible. Returns true if the
314 // path from this view to the root view is visible. 314 // path from this view to the root view is visible.
315 virtual bool IsVisibleInRootView() const; 315 virtual bool IsVisibleInRootView() const;
316 316
317 // Set whether this view is enabled. A disabled view does not receive keyboard 317 // Set whether this view is enabled. A disabled view does not receive keyboard
318 // or mouse inputs. If flag differs from the current value, SchedulePaint is 318 // or mouse inputs. If flag differs from the current value, SchedulePaint is
319 // invoked. 319 // invoked.
320 virtual void SetEnabled(bool flag); 320 void SetEnabled(bool enabled);
321 321
322 // Returns whether the view is enabled. 322 // Returns whether the view is enabled.
323 virtual bool IsEnabled() const; 323 virtual bool IsEnabled() const;
324 324
325 virtual void OnEnabledChanged(bool enabled);
Ben Goodger (Google) 2011/05/27 16:01:21 I would say don't pass the parameter here. This me
tfarina 2011/05/27 16:25:04 Done.
326
325 // Transformations ----------------------------------------------------------- 327 // Transformations -----------------------------------------------------------
326 328
327 // Methods for setting transformations for a view (e.g. rotation, scaling). 329 // Methods for setting transformations for a view (e.g. rotation, scaling).
328 330
329 const ui::Transform& GetTransform() const; 331 const ui::Transform& GetTransform() const;
330 332
331 // Clipping parameters. Clipping happens from the right and/or bottom. The 333 // Clipping parameters. Clipping happens from the right and/or bottom. The
332 // clipping amount is in parent's coordinate system, as in, if the view is 334 // clipping amount is in parent's coordinate system, as in, if the view is
333 // rotated, then the clipping will be applied after the rotation (and other 335 // rotated, then the clipping will be applied after the rotation (and other
334 // transformations, if any). 336 // transformations, if any).
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 // The Windows-specific accessibility implementation for this View. 1431 // The Windows-specific accessibility implementation for this View.
1430 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; 1432 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_;
1431 #endif 1433 #endif
1432 1434
1433 DISALLOW_COPY_AND_ASSIGN(View); 1435 DISALLOW_COPY_AND_ASSIGN(View);
1434 }; 1436 };
1435 1437
1436 } // namespace views 1438 } // namespace views
1437 1439
1438 #endif // VIEWS_VIEW_H_ 1440 #endif // VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698