libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GtkCRNAltoDocument.h
Go to the documentation of this file.
1 /* Copyright 2012-2016 CoReNum, INSA-Lyon
2  *
3  * This file is part of libgtkcrnmm.
4  *
5  * libgtkcrnmm is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libgtkcrnmm is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libgtkcrnmm. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * file: GdkCRNAltoDocument.h
19  * \author Yann LEYDIER
20  */
21 
22 #ifndef GtkCRNAltoDocument_HEADER
23 #define GtkCRNAltoDocument_HEADER
24 
25 #include <GtkCRNDocument.h>
26 #include <GtkCRNAltoImage.h>
27 
28 #ifndef CRN_USING_GTKMM3
29 namespace GtkCRN
30 {
34  class AltoDocument: public Gtk::Frame
35  {
36  public:
37  AltoDocument();
38  virtual ~AltoDocument() override {}
39 
40  void set_alto(const crn::xml::SAltoWrapper &aw);
41 
42  void set_show_toolbar(bool show);
43 
44  Document& get_document() { return doc; }
45  AltoImage& get_image_wrapper() { return imgwrapper; }
46 
47  Glib::RefPtr<Gtk::ActionGroup> get_image_actions() { return doc.get_image().get_actions(); }
48  Glib::RefPtr<Gtk::ActionGroup> get_alto_actions() { return imgwrapper.get_actions(); }
49  private:
50  void on_view_selection_changed(const crn::String last_selected_view_id, const std::vector<crn::String> selected_views_ids);
51 
52  Document doc;
53  AltoImage imgwrapper;
54 
55  crn::xml::SAltoWrapper alto;
56  Gtk::Toolbar toolbar;
57  };
58 }
59 
60 #endif
61 
62 #endif
63 
Displays a crn::Document.
Glib::RefPtr< Gtk::ActionGroup > get_alto_actions()
virtual ~AltoDocument() override
GtkCRN::Image & get_image()
Gets the image widget.
Glib::RefPtr< Gtk::ActionGroup > get_actions()
Creates a tool button connected to the zoom_fit method.
Definition: GtkCRNImage.h:112
A UTF32 character string class.
Definition: CRNString.h:61
void set_alto(const crn::xml::SAltoWrapper &aw)
Displays an alto document.
AltoImage & get_image_wrapper()
Displays an alto page.
Glib::RefPtr< Gtk::ActionGroup > get_image_actions()
void set_show_toolbar(bool show)
Glib::RefPtr< Gtk::ActionGroup > get_actions()
Gets the action group associated to the alto wrapper.