X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-event-handler.h;h=00288901322d9d248953c1f18c3e28724c58f58a;hp=092ac58e714192b3861ab5ac6825ceef6c528837;hb=528ee21711fc507b20ddb031cf6b1d71f1f44e75;hpb=ee67cff961ec6b3003586c542dc473dd980c18c9 diff --git a/dali-toolkit/internal/text/text-controller-event-handler.h b/dali-toolkit/internal/text/text-controller-event-handler.h index 092ac58..0028890 100644 --- a/dali-toolkit/internal/text/text-controller-event-handler.h +++ b/dali-toolkit/internal/text/text-controller-event-handler.h @@ -37,18 +37,82 @@ namespace Text { struct Controller::EventHandler { + /// @copydoc Text::Controller::KeyboardFocusGainEvent + /// @param[in] controller A reference to the controller class static void KeyboardFocusGainEvent(Controller& controller); + + /// @copydoc Text::Controller::KeyboardFocusLostEvent + /// @param[in] controller A reference to the controller class static void KeyboardFocusLostEvent(Controller& controller); + + /// @copydoc Text::Controller::KeyEvent + /// @param[in] controller A reference to the controller class static bool KeyEvent(Controller& controller, const Dali::KeyEvent& keyEvent); + + /// @copydoc Text::Controller::AnchorEvent + /// @param[in] controller A reference to the controller class static void AnchorEvent(Controller& controller, float x, float y); + + /// @copydoc Text::Controller::TapEvent + /// @param[in] controller A reference to the controller class static void TapEvent(Controller& controller, unsigned int tapCount, float x, float y); + + /// @copydoc Text::Controller::PanEvent + /// @param[in] controller A reference to the controller class static void PanEvent(Controller& controller, GestureState state, const Vector2& displacement); + + /// @copydoc Text::Controller::LongPressEvent + /// @param[in] controller A reference to the controller class static void LongPressEvent(Controller& controller, GestureState state, float x, float y); + + /// @copydoc Text::Controller::SelectEvent + /// @param[in] controller A reference to the controller class static void SelectEvent(Controller& controller, float x, float y, SelectionType selectType); + + /** + * @brief Creates a selection event with a selection index. + * + * It could be called from the SelectText(). + * The start and end parameters are passed through the event. + * + * @param[in] controller A reference to the controller class + * @param[in] start The start selection position. + * @param[in] end The end selection position. + * @param[in] selection type like the range. + */ + static void SelectEvent(Controller& controller, const uint32_t start, const uint32_t end, SelectionType selectType); + + /** + * @brief Process queued events which modify the model. + * @param[in] controller A reference to the controller class + */ static void ProcessModifyEvents(Controller& controller); + + /** + * @brief Used to process an event queued from SetText() + * @param[in] controller A reference to the controller class + */ static void TextReplacedEvent(Controller& controller); + + /** + * @brief Used to process an event queued from key events etc. + * @param[in] controller A reference to the controller class + */ static void TextInsertedEvent(Controller& controller); + + /** + * @brief Used to process an event queued from backspace key etc. + * @param[in] controller A reference to the controller class + */ static void TextDeletedEvent(Controller& controller); + + /** + * @brief Helper to KeyEvent() to handle the backspace or delete key case. + * + * @param[in] controller A reference to the controller class + * @param[in] keyCode The keycode for the key pressed + * @return True if a character was deleted. + */ static bool DeleteEvent(Controller& controller, int keyCode); static InputMethodContext::CallbackData OnInputMethodContextEvent(Controller& controller,