postponed_(false),
expecting_update_(false),
long_mouse_press_(false),
- caret_selection_(true),
selection_data_(new SelectionBoxEfl(parent_view)),
start_handle_(new SelectionHandleEfl(*this, SelectionHandleEfl::HANDLE_TYPE_LEFT, parent_view)),
end_handle_(new SelectionHandleEfl(*this, SelectionHandleEfl::HANDLE_TYPE_RIGHT, parent_view)),
show_only_large_handle_ = false;
long_mouse_press_ = true;
Clear();
- caret_selection_ = true;
if (selection_data_->IsInEditField())
SetCaretSelectionStatus(true);
- if (caret_selection_) {
- Evas_Coord x, y;
- evas_object_geometry_get(parent_view_, &x, &y, 0, 0);
- magnifier_->HandleLongPress(gfx::Point(touch_point.x() + x,
- touch_point.y() + y));
- } else {
- long_mouse_press_ = false;
- }
+
+ Evas_Coord x, y;
+ evas_object_geometry_get(parent_view_, &x, &y, 0, 0);
+ magnifier_->HandleLongPress(gfx::Point(touch_point.x() + x,
+ touch_point.y() + y));
}
void SelectionControllerEfl::HandleLongPressMoveEvent(const gfx::Point& touch_point) {
void ChangeContextMenuPosition(gfx::Point& position, int& drawDirection);
bool GetLongPressed() { return long_mouse_press_; }
- bool IsCaretSelection() { return caret_selection_; }
bool IsShowingMagnifier();
// Saves state so that handlers and context menu is not shown when seletion change event occurs.
bool long_mouse_press_;
- // Saves state so that magnifier and context menu is not shown when
- // long pressing should work like tap, e.g. press into editable field
- bool caret_selection_;
-
// Saves the data that are required to draw handle and context menu
scoped_ptr<SelectionBoxEfl> selection_data_;
context_menu_position_ = gfx::Point(convertedParams.x, convertedParams.y);
if (GetSelectionController()) {
- if (!GetSelectionController()->IsShowingMagnifier() &&
- GetSelectionController()->IsCaretSelection()) {
+ if (!GetSelectionController()->IsShowingMagnifier()) {
if(!context_menu_->PopulateAndShowContextMenu(convertedParams)) {
context_menu_.reset();
GetSelectionController()->HideHandles();