return false;
}
-void SelectionControllerEfl::OnMouseDown(const gfx::Point& touch_point,
- SelectionHandleEfl::HandleType handle) {
+void SelectionControllerEfl::OnMouseDown(
+ const gfx::Point& touch_point, SelectionHandleEfl* handle) {
// Hide context menu on mouse down
show_only_large_handle_ = false;
CancelContextMenu(0);
Evas_Coord x, y;
evas_object_geometry_get(parent_view_, &x, &y, 0, 0);
- gfx::Point magnifier_point;
-
- switch (handle) {
- case SelectionHandleEfl::HANDLE_TYPE_INPUT:
- magnifier_point.set_x(input_handle_->GetBasePosition().x() + x);
- magnifier_point.set_y(input_handle_->GetBasePosition().y() + y);
- break;
-
- case SelectionHandleEfl::HANDLE_TYPE_LEFT:
- magnifier_point.set_x(start_handle_->GetBasePosition().x() + x);
- magnifier_point.set_y(start_handle_->GetBasePosition().y() + y);
- break;
-
- case SelectionHandleEfl::HANDLE_TYPE_RIGHT:
- magnifier_point.set_x(end_handle_->GetBasePosition().x() + x);
- magnifier_point.set_y(end_handle_->GetBasePosition().y() + y);
- break;
- }
+ gfx::Point magnifier_point(
+ handle->GetBasePosition().x() + x,
+ handle->GetBasePosition().y() + y);
magnifier_->UpdateLocation(magnifier_point);
magnifier_->Move(magnifier_point);
const gfx::Rect& right_rect, bool is_anchor_first, bool show = true);
void GetSelectionBounds(gfx::Rect* left, gfx::Rect* right);
// Handles the mouse press,move and relase events on selection handles
- void OnMouseDown(const gfx::Point& touch_point, SelectionHandleEfl::HandleType);
+ void OnMouseDown(const gfx::Point& touch_point, SelectionHandleEfl*);
void OnMouseMove(const gfx::Point& touch_point, SelectionHandleEfl::HandleType);
void OnMouseUp(const gfx::Point& touch_point);
handle->base_point_.SetPoint(delta_x, delta_y);
handle->controller_.OnMouseDown(
- gfx::Point(event->canvas.x , event->canvas.y ), handle->handle_type_);
+ gfx::Point(event->canvas.x , event->canvas.y), handle);
}
void SelectionHandleEfl::OnMouseMove(void* data, Evas*, Evas_Object*, void* event_info) {