2 * Copyright (C) 2009 by Aiwota Programmer
3 * aiwotaprog@tetteke.tk
5 * This file is part of Dialektos.
7 * Dialektos is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * Dialektos is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Dialektos. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef TEXT_VIEW_POPUPABLE_HXX
22 #define TEXT_VIEW_POPUPABLE_HXX
24 #include <boost/unordered_set.hpp>
25 #include <boost/scoped_ptr.hpp>
26 #include "text_view_drawable.hxx"
31 namespace text_element {
41 class Popupable: public dialektos::text_view::Drawable {
47 bool is_pointer_on_the_element() const;
48 bool is_pointer_on_the_popup() const;
50 virtual void on_anchor_hovered_event(const text_element::Anchor&);
51 void do_popup(const text_element::Anchor&, const LineListType& line);
54 virtual const LineListType& get_original_line_list() const;
55 void do_id_hovered_event(const text_element::ID&);
56 void do_res_num_hovered_event(const text_element::ResNum&);
57 void do_anchor_hovered_event(const text_element::Anchor&);
58 void build_line_list_for_popup(
59 const boost::unordered_set<int>& res_nums, LineListType& target) const;
61 boost::scoped_ptr<Popup> popup_;
65 } // namespace text_view
67 } // namespce dialektos