/** @file * @author Edouard DUPIN * @copyright 2010, Edouard DUPIN, all right reserved * @license GPL v3 (see license file) */ #pragma once #include #include #include #include #include namespace appl { namespace widget { class Search; using SearchShared = ememory::SharedPtr; using SearchWeak = ememory::WeakPtr; class Search : public ewol::widget::Composer { private: ememory::SharedPtr m_viewerManager; //!< handle on the buffer manager bool m_forward; bool m_caseSensitive; bool m_wrap; ememory::SharedPtr m_searchEntry; ememory::SharedPtr m_replaceEntry; etk::UString m_searchData; etk::UString m_replaceData; protected: // Constructeur Search(); void init(); public: DECLARE_FACTORY(Search); virtual ~Search(); private: /** * @brief Find the next element that corespond at the search */ void find(); /** * @brief Replace the current selected text. */ void replace(); public: void selectSearch(); bool isSelectSearch(); void selectReplace(); bool isSelectReplace(); private: // callback functions void OnCallbackHide(); void OnCallbackSearchValue(const etk::String& _value); void OnCallbackSearch(); void OnCallbackSearchEntryValidate(const etk::String& _value); void OnCallbackReplaceValue(const etk::String& _value); void OnCallbackReplace(); void OnCallbackReplaceEntryValidate(const etk::String& _value); void OnCallbackCase(const bool& _value); void OnCallbackWrap(const bool& _value); void OnCallbackForward(const bool& _value); }; }; }