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

Side by Side Diff: views/view.h

Issue 7273073: Animated Rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove unused includes Created 9 years, 5 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 virtual bool IsVisibleInRootView() const; 243 virtual bool IsVisibleInRootView() const;
244 244
245 // Set whether this view is enabled. A disabled view does not receive keyboard 245 // Set whether this view is enabled. A disabled view does not receive keyboard
246 // or mouse inputs. If flag differs from the current value, SchedulePaint is 246 // or mouse inputs. If flag differs from the current value, SchedulePaint is
247 // invoked. 247 // invoked.
248 void SetEnabled(bool enabled); 248 void SetEnabled(bool enabled);
249 249
250 // Returns whether the view is enabled. 250 // Returns whether the view is enabled.
251 virtual bool IsEnabled() const; 251 virtual bool IsEnabled() const;
252 252
253 // Sets whether this view is painting.
254 void set_painting_enabled(bool enabled) { painting_enabled_ = enabled; }
sky 2011/07/27 22:16:19 This makes painting that much more complicated. Se
255
256 // Returns whether the view is painting.
257 bool painting_enabled() const { return painting_enabled_; }
258
253 // Transformations ----------------------------------------------------------- 259 // Transformations -----------------------------------------------------------
254 260
255 // Methods for setting transformations for a view (e.g. rotation, scaling). 261 // Methods for setting transformations for a view (e.g. rotation, scaling).
256 262
257 const ui::Transform& GetTransform() const; 263 const ui::Transform& GetTransform() const;
258 264
259 // Clipping parameters. Clipping happens from the right and/or bottom. The 265 // Clipping parameters. Clipping happens from the right and/or bottom. The
260 // clipping amount is in parent's coordinate system, as in, if the view is 266 // clipping amount is in parent's coordinate system, as in, if the view is
261 // rotated, then the clipping will be applied after the rotation (and other 267 // rotated, then the clipping will be applied after the rotation (and other
262 // transformations, if any). 268 // transformations, if any).
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 447
442 // Mark all or part of the View's bounds as dirty (needing repaint). 448 // Mark all or part of the View's bounds as dirty (needing repaint).
443 // |r| is in the View's coordinates. 449 // |r| is in the View's coordinates.
444 // Rectangle |r| should be in the view's coordinate system. The 450 // Rectangle |r| should be in the view's coordinate system. The
445 // transformations are applied to it to convert it into the parent coordinate 451 // transformations are applied to it to convert it into the parent coordinate
446 // system before propagating SchedulePaint up the view hierarchy. 452 // system before propagating SchedulePaint up the view hierarchy.
447 // TODO(beng): Make protected. 453 // TODO(beng): Make protected.
448 virtual void SchedulePaint(); 454 virtual void SchedulePaint();
449 virtual void SchedulePaintInRect(const gfx::Rect& r); 455 virtual void SchedulePaintInRect(const gfx::Rect& r);
450 456
457 virtual void ScheduleComposite();
458 virtual void ScheduleCompositeInRect(const gfx::Rect& r);
459
451 // Called by the framework to paint a View. Performs translation and clipping 460 // Called by the framework to paint a View. Performs translation and clipping
452 // for View coordinates and language direction as required, allows the View 461 // for View coordinates and language direction as required, allows the View
453 // to paint itself via the various OnPaint*() event handlers and then paints 462 // to paint itself via the various OnPaint*() event handlers and then paints
454 // the hierarchy beneath it. 463 // the hierarchy beneath it.
455 virtual void Paint(gfx::Canvas* canvas); 464 virtual void Paint(gfx::Canvas* canvas);
456 465
457 // The background object is owned by this object and may be NULL. 466 // The background object is owned by this object and may be NULL.
458 void set_background(Background* b) { background_.reset(b); } 467 void set_background(Background* b) { background_.reset(b); }
459 const Background* background() const { return background_.get(); } 468 const Background* background() const { return background_.get(); }
460 Background* background() { return background_.get(); } 469 Background* background() { return background_.get(); }
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 // Next view to be focused when the Shift-Tab key combination is pressed. 1418 // Next view to be focused when the Shift-Tab key combination is pressed.
1410 View* previous_focusable_view_; 1419 View* previous_focusable_view_;
1411 1420
1412 // Whether this view can be focused. 1421 // Whether this view can be focused.
1413 bool focusable_; 1422 bool focusable_;
1414 1423
1415 // Whether this view is focusable if the user requires full keyboard access, 1424 // Whether this view is focusable if the user requires full keyboard access,
1416 // even though it may not be normally focusable. 1425 // even though it may not be normally focusable.
1417 bool accessibility_focusable_; 1426 bool accessibility_focusable_;
1418 1427
1428 // Whether this view can be painted. Can be disabled during an animation.
1429 bool painting_enabled_;
1430
1419 // Context menus ------------------------------------------------------------- 1431 // Context menus -------------------------------------------------------------
1420 1432
1421 // The menu controller. 1433 // The menu controller.
1422 ContextMenuController* context_menu_controller_; 1434 ContextMenuController* context_menu_controller_;
1423 1435
1424 // Drag and drop ------------------------------------------------------------- 1436 // Drag and drop -------------------------------------------------------------
1425 1437
1426 DragController* drag_controller_; 1438 DragController* drag_controller_;
1427 1439
1428 // Accessibility ------------------------------------------------------------- 1440 // Accessibility -------------------------------------------------------------
1429 1441
1430 // The Windows-specific accessibility implementation for this view. 1442 // The Windows-specific accessibility implementation for this view.
1431 #if defined(OS_WIN) 1443 #if defined(OS_WIN)
1432 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; 1444 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_;
1433 #endif 1445 #endif
1434 1446
1435 DISALLOW_COPY_AND_ASSIGN(View); 1447 DISALLOW_COPY_AND_ASSIGN(View);
1436 }; 1448 };
1437 1449
1438 } // namespace views 1450 } // namespace views
1439 1451
1440 #endif // VIEWS_VIEW_H_ 1452 #endif // VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698