OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
| 6 #define UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
| 7 |
| 8 #include "ui/touch_selection/touch_handle.h" |
| 9 #include "ui/touch_selection/touch_handle_orientation.h" |
| 10 #include "ui/touch_selection/ui_touch_selection_export.h" |
| 11 |
| 12 namespace aura { |
| 13 class Window; |
| 14 } |
| 15 |
| 16 namespace aura_extra { |
| 17 class ImageWindowDelegate; |
| 18 } |
| 19 |
| 20 namespace ui { |
| 21 |
| 22 class UI_TOUCH_SELECTION_EXPORT TouchHandleDrawableAura |
| 23 : public TouchHandleDrawable { |
| 24 public: |
| 25 explicit TouchHandleDrawableAura(aura::Window* parent); |
| 26 ~TouchHandleDrawableAura() override; |
| 27 |
| 28 private: |
| 29 void UpdateBounds(); |
| 30 |
| 31 // TouchHandleDrawable: |
| 32 void SetEnabled(bool enabled) override; |
| 33 void SetOrientation(TouchHandleOrientation orientation) override; |
| 34 void SetAlpha(float alpha) override; |
| 35 void SetFocus(const gfx::PointF& position) override; |
| 36 gfx::RectF GetVisibleBounds() const override; |
| 37 |
| 38 aura_extra::ImageWindowDelegate* window_delegate_; |
| 39 scoped_ptr<aura::Window> window_; |
| 40 bool enabled_; |
| 41 float alpha_; |
| 42 ui::TouchHandleOrientation orientation_; |
| 43 |
| 44 // Focal position of the handle set via SetFocus (normally located on the |
| 45 // intersection of the cursor line and the text base line). |
| 46 gfx::PointF focal_position_; |
| 47 |
| 48 // Window bounds relative to the focal position. |
| 49 gfx::RectF relative_bounds_; |
| 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura); |
| 52 }; |
| 53 |
| 54 } // namespace ui |
| 55 |
| 56 #endif // UI_TOUCH_SELECTION_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
OLD | NEW |