diff --git a/configure.ac b/configure.ac
index 6dfaea3..2a94236 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,6 +226,7 @@ src/addins/inserttimestamp/Makefile
 src/addins/noteoftheday/Makefile
 src/addins/printnotes/Makefile
 src/addins/stickynoteimport/Makefile
+src/addins/tableofcontent/Makefile
 src/addins/tomboyimport/Makefile
 src/addins/underline/Makefile
 src/dbus/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4b6fa36..965d1e1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -35,6 +35,7 @@ src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
 src/addins/noteoftheday/noteofthedaypreferences.cpp
 src/addins/printnotes/printnotesnoteaddin.cpp
 src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
+src/addins/tableofcontent/tableofcontentnoteaddin.cpp
 src/addins/tomboyimport/tomboyimportaddin.cpp
 src/addins/underline/underlinemenuitem.cpp
 src/addins/underline/underlinenoteaddin.cpp
diff --git a/src/addins/Makefile.am b/src/addins/Makefile.am
index 45b5a82..743faca 100644
--- a/src/addins/Makefile.am
+++ b/src/addins/Makefile.am
@@ -9,6 +9,7 @@ SUBDIRS = backlinks \
 	noteoftheday \
 	printnotes \
 	stickynoteimport \
+	tableofcontent \
 	tomboyimport \
 	underline \
-	$(NULL)
\ No newline at end of file
+	$(NULL)
diff --git a/src/addins/tableofcontent/Makefile.am b/src/addins/tableofcontent/Makefile.am
new file mode 100644
index 0000000..41c6a52
--- /dev/null
+++ b/src/addins/tableofcontent/Makefile.am
@@ -0,0 +1,14 @@
+
+include $(builddir)/../addins.mk
+
+addinsdir = $(ADDINSDIR)
+addins_LTLIBRARIES = tableofcontent.la
+
+
+tableofcontent_la_SOURCES = \
+	tableofcontent.hpp \
+	tableofcontentnoteaddin.hpp \
+	tableofcontentnoteaddin.cpp \
+	tableofcontentmenuitem.hpp  \
+	tableofcontentmenuitem.cpp  \
+	$(NULL)
diff --git a/src/addins/tableofcontent/TODO b/src/addins/tableofcontent/TODO
new file mode 100644
index 0000000..8ec5c7d
--- /dev/null
+++ b/src/addins/tableofcontent/TODO
@@ -0,0 +1,7 @@
+
+- todo: port to 3.8 / GTK3
+
+- todo: add a help page
+
+- todo: check all FIXMEs
+
diff --git a/src/addins/tableofcontent/tableofcontent.hpp b/src/addins/tableofcontent/tableofcontent.hpp
new file mode 100644
index 0000000..7ae8ff5
--- /dev/null
+++ b/src/addins/tableofcontent/tableofcontent.hpp
@@ -0,0 +1,33 @@
+/*
+ *  "Table of Content" is a Note addin for gnote.
+ *    It lists Note's table of contents in a menu.
+ *    Headers are bold/large and bold/huge lines.
+ *
+ *  Copyright (C) 2013 Luc Pionchon <pionchon.luc@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __TABLEOFCONTENT_HPP_
+#define __TABLEOFCONTENT_HPP_
+
+namespace tableofcontent {
+
+namespace Level { enum Type {H1, H2, H3, None}; }; // H1=title, H2:bold/huge, H3:bold/large
+
+
+}
+
+#endif
+
diff --git a/src/addins/tableofcontent/tableofcontentmenuitem.cpp b/src/addins/tableofcontent/tableofcontentmenuitem.cpp
new file mode 100644
index 0000000..1668a54
--- /dev/null
+++ b/src/addins/tableofcontent/tableofcontentmenuitem.cpp
@@ -0,0 +1,87 @@
+/*
+ *  "Table of Content" is a Note addin for gnote.
+ *    It lists Note's table of contents in a menu.
+ *    Headers are bold/large and bold/huge lines.
+ *
+ *  Copyright (C) 2013 Luc Pionchon <pionchon.luc@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtkmm/stock.h>
+
+#include "notewindow.hpp"
+#include "utils.hpp"
+
+#include "tableofcontentmenuitem.hpp"
+#include "tableofcontent.hpp"
+
+namespace tableofcontent {
+
+
+TableofcontentMenuItem::TableofcontentMenuItem(
+                            const gnote::Note::Ptr & note,
+                            const std::string      & header,
+                            Level::Type              header_level,
+                            int                      header_position)
+  : m_note(note)
+  , m_header_position(header_position)
+{
+
+  // Set TOC style, depending on the header level
+  /* +------------------+
+     |[] NOTE TITLE     |
+     | > Header H2      |
+     | > Header H2      |
+     |   └→  Header H3  |
+     |   └→  Header H3  |
+     |   └→  Header H3  |
+     | > Header H2      |
+     +------------------+ */
+  
+  set_use_underline (false); //we don't want potential '_' in the header to be used as mnemonic
+  
+  if (header_level == Level::H1) {
+    set_image(*manage(new Gtk::Image(gnote::utils::get_icon("note", 16)))); //FIXME, we want to use ICON_SIZE_MENU
+    Gtk::Label *label = (Gtk::Label*)get_child();
+    label->set_markup("<b>"+ header + "</b>"); //FIXME, GTK lacks a function menuitem->set_markup()
+  }
+  else if (header_level == Level::H2) {
+    set_image(*manage(new Gtk::Image(Gtk::Stock::GO_FORWARD, Gtk::ICON_SIZE_MENU)));
+    set_label(header);
+  }
+  else if (header_level == Level::H3) {
+    set_label("└→  " + header);
+  }
+}
+
+
+void TableofcontentMenuItem::on_activate()
+{
+  if (!m_note) {
+    return; 
+  }
+
+  // Scroll the TextView and place the cursor on the header
+  Gtk::TextIter header_iter;
+  header_iter = m_note->get_buffer()->get_iter_at_offset (m_header_position);
+  m_note->get_window()->editor()->scroll_to (header_iter, 
+                                              0.0, //[0.0,0.5] within_margin, margin as a fraction of screen size. 
+                                              0.0, //[0.0,1.0] horizontal alignment of mark within visible area.
+                                              0.0);//[0.0,1.0] vertical alignment of mark within visible area.
+  m_note->get_buffer()->place_cursor (header_iter);
+}
+
+
+} //namespace
diff --git a/src/addins/tableofcontent/tableofcontentmenuitem.hpp b/src/addins/tableofcontent/tableofcontentmenuitem.hpp
new file mode 100644
index 0000000..34c54c0
--- /dev/null
+++ b/src/addins/tableofcontent/tableofcontentmenuitem.hpp
@@ -0,0 +1,54 @@
+/*
+ *  "Table of Content" is a Note addin for gnote.
+ *    It lists Note's table of contents in a menu.
+ *    Headers are bold/large and bold/huge lines.
+ *
+ *  Copyright (C) 2013 Luc Pionchon <pionchon.luc@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef __TABLEOFCONTENT_MENU_ITEM_HPP_
+#define __TABLEOFCONTENT_MENU_ITEM_HPP_
+
+#include <string>
+#include <gtkmm/imagemenuitem.h>
+
+#include "note.hpp"
+#include "tableofcontent.hpp"
+
+
+namespace tableofcontent {
+
+class TableofcontentMenuItem : public Gtk::ImageMenuItem
+{
+public:
+  TableofcontentMenuItem( const gnote::Note::Ptr & note,
+                          const std::string      & header,
+                          Level::Type              header_level,
+                          int                      header_position);
+
+protected:
+  virtual void on_activate();
+
+private:
+  gnote::Note::Ptr   m_note;
+  int                m_header_position;
+
+};
+
+}
+
+#endif
diff --git a/src/addins/tableofcontent/tableofcontentnoteaddin.cpp b/src/addins/tableofcontent/tableofcontentnoteaddin.cpp
new file mode 100644
index 0000000..87ba305
--- /dev/null
+++ b/src/addins/tableofcontent/tableofcontentnoteaddin.cpp
@@ -0,0 +1,358 @@
+/*
+ *  "Table of Content" is a Note addin for gnote.
+ *    It lists Note's table of contents in a menu.
+ *    Headers are bold/large and bold/huge lines.
+ *
+ *  Copyright (C) 2013 Luc Pionchon <pionchon.luc@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glibmm/i18n.h>
+
+#include <gtkmm/stock.h>
+#include <gtkmm/separatormenuitem.h>
+
+#include "sharp/string.hpp"
+
+#include "tableofcontent.hpp"
+#include "tableofcontentnoteaddin.hpp"
+#include "tableofcontentmenuitem.hpp"
+
+#include "notemanager.hpp"
+#include "notewindow.hpp"
+#include "notebuffer.hpp"
+#include "utils.hpp"
+
+namespace tableofcontent {
+
+TableofcontentModule::TableofcontentModule()
+{
+  ADD_INTERFACE_IMPL(TableofcontentNoteAddin);
+}
+const char * TableofcontentModule::id() const
+{
+  return "TableofcontentAddin";
+}
+const char * TableofcontentModule::name() const
+{
+  return _("Table of Content");
+}
+const char * TableofcontentModule::description() const
+{
+  return _("Show the table of content of the current note in a menu. Headers are lines formated with bold/large or bold/huge.");
+}
+const char * TableofcontentModule::authors() const
+{
+  return "Luc Pionchon";
+}
+int TableofcontentModule::category() const
+{
+  return gnote::ADDIN_CATEGORY_TOOLS;
+}
+const char * TableofcontentModule::version() const
+{
+  return "0.5";
+}
+const char * TableofcontentModule::copyright() const
+{
+  return "Luc Pionchon";
+}
+
+
+TableofcontentNoteAddin::TableofcontentNoteAddin()
+  : m_menu_item(NULL)
+  , m_menu(NULL)
+  , m_submenu_built(false)
+{
+}
+
+
+void TableofcontentNoteAddin::initialize ()
+{
+}
+
+
+void TableofcontentNoteAddin::shutdown ()
+{
+}
+
+
+void TableofcontentNoteAddin::on_note_opened ()
+{
+  // TOC menu
+  m_menu = manage(new Gtk::Menu());
+  m_menu->signal_hide().connect(
+    sigc::mem_fun(*this, &TableofcontentNoteAddin::on_menu_hidden));
+  m_menu->show_all ();
+
+  // TOC menu entry
+  m_menu_item = manage(new Gtk::ImageMenuItem (_("Table of Content")));
+  m_menu_item->set_image(*manage(new Gtk::Image(Gtk::Stock::JUMP_TO, Gtk::ICON_SIZE_MENU)));
+  m_menu_item->set_submenu(*m_menu);
+  m_menu_item->signal_activate().connect(
+    sigc::mem_fun(*this, &TableofcontentNoteAddin::on_menu_item_activated));
+  m_menu_item->show ();
+
+  add_plugin_menu_item (m_menu_item);
+
+
+  // Reacts to key press events
+  get_note()->get_window()->signal_key_press_event().connect(
+    sigc::mem_fun(*this, &TableofcontentNoteAddin::on_key_pressed));
+
+
+  // TOC can show up also in the contextual menu
+  get_note()->get_window()->editor()->signal_populate_popup().connect(
+    sigc::mem_fun(*this, &TableofcontentNoteAddin::on_populate_popup));
+
+
+  // Header tags
+  m_tag_bold  = get_note()->get_tag_table()->lookup ("bold");
+  m_tag_large = get_note()->get_tag_table()->lookup ("size:large");
+  m_tag_huge  = get_note()->get_tag_table()->lookup ("size:huge");
+
+}
+
+void TableofcontentNoteAddin::on_menu_item_activated()
+{
+  if(m_submenu_built) {
+    return;
+  }
+  populate_toc_menu(m_menu);
+  m_submenu_built = true;
+}
+
+
+void TableofcontentNoteAddin::on_menu_hidden()
+{
+  // Force the submenu to rebuild next time it's supposed to show
+  m_submenu_built = false;
+}
+
+
+void TableofcontentNoteAddin::populate_toc_menu(Gtk::Menu *toc_menu)
+//populates a menu with Note's table of content
+{
+  // Clear out the old list
+  std::vector<Gtk::Widget*> menu_items = toc_menu->get_children();
+  for(std::vector<Gtk::Widget*>::reverse_iterator iter = menu_items.rbegin();
+      iter != menu_items.rend(); ++iter) {
+    toc_menu->remove(**iter);
+  }
+  //NOTE: Gtk::Menu is a Gtk::Container which has a foreach function
+  //void Gtk::Container::foreach(const ForeachSlot& slot)
+
+
+  // Build a new list
+  std::list<TableofcontentMenuItem*> items;
+
+  get_tableofcontent_menu_items(items);
+
+  for(std::list<TableofcontentMenuItem*>::iterator iter = items.begin();
+      iter != items.end(); ++iter) {
+    TableofcontentMenuItem * item(*iter);
+    item->show_all();
+    toc_menu->append (*item);
+  }
+
+  // If nothing was found, add an explanatory text
+  if (toc_menu->get_children().size() == 0) {
+    Gtk::MenuItem *item = manage(new Gtk::MenuItem(_(
+      "The Table of Content is empty.\n\n"
+      
+      "When you set headers, they will show here.\n\n"
+      
+      "A header is a complete line formatted with either:\n"
+      "- bold + huge \t= level 1 header \t(Ctrl-1)\n"
+      "- bold + large \t= level 2 header \t(Ctrl-2)\n\n"
+      
+      "You can set the headers with normal formatting commands,\n"
+      "- or select one line and type Ctrl-1 (resp. Ctrl-2),\n"
+      "- or on a new line type Ctrl-1 (resp. Ctrl-2) and enter your text.\n\n"
+      
+      "Open the Table of Content in the plugin menu,\n"
+      "- or in the contextual menu (right click),\n"
+      "- or in a popup menu with Ctrl-Alt-1"
+      )));
+    item->set_sensitive (true); // keep it sensitive, so it is readable. //FIXME: make sure it behaves on_activated ()
+    item->show_all ();
+    toc_menu->append (*item);
+  }
+}
+
+void TableofcontentNoteAddin::on_populate_popup (Gtk::Menu* popup_menu)
+{
+  Gtk::Menu *menu = manage(new Gtk::Menu());
+  populate_toc_menu (menu);
+  
+  Gtk::SeparatorMenuItem *separator = manage(new Gtk::SeparatorMenuItem ());
+  separator->show ();
+  popup_menu->prepend (*separator);
+  
+  Gtk::ImageMenuItem *item;
+  item = manage(new Gtk::ImageMenuItem (_("Table of Content")));
+  item->set_image(*manage(new Gtk::Image(Gtk::Stock::JUMP_TO, Gtk::ICON_SIZE_MENU)));
+  item->set_submenu(*menu);
+  item->show ();
+  popup_menu->prepend (*item);
+}
+
+
+bool TableofcontentNoteAddin::has_tag_over_range (Glib::RefPtr<Gtk::TextTag> tag, Gtk::TextIter start, Gtk::TextIter end)
+//return true if tag is set from start to end
+{
+  bool has = false;
+  Gtk::TextIter iter = start;
+  while (iter.compare(end) != 0 && (has = iter.has_tag(tag))){
+    iter.forward_char();
+  }
+  return has;
+}
+
+
+Level::Type TableofcontentNoteAddin::get_range_level (Gtk::TextIter start, Gtk::TextIter end)
+//return the header Level from start to end
+{
+  if (has_tag_over_range (m_tag_bold, start, end))
+    if (has_tag_over_range (m_tag_huge , start, end)) 
+        return Level::H2;
+    else if (has_tag_over_range (m_tag_large, start, end))
+        return Level::H3;
+    else
+        return Level::None;
+  else
+      return Level::None;
+}
+
+
+void TableofcontentNoteAddin::get_tableofcontent_menu_items(std::list<TableofcontentMenuItem*> & items)
+//Go through the note text, and list all lines taged as header
+{
+  TableofcontentMenuItem *item = NULL;
+
+  std::string header;
+  Level::Type header_level;
+  int         header_position;
+
+  Gtk::TextIter iter, iter_end, eol;
+
+  //for each line of the buffer,
+  //check if the full line has bold and (large or huge) tags
+  iter     = get_note()->get_buffer()->begin();
+  iter_end = get_note()->get_buffer()->end();
+
+  while (iter != iter_end) {
+    eol = iter;
+    eol.forward_to_line_end();
+    
+    header_level = get_range_level (iter, eol);
+    
+    if (header_level == Level::H2 || header_level == Level::H3) {
+      header_position = iter.get_offset();
+      header = iter.get_text(eol);
+
+      if (items.size() == 0) {
+        //It's the first header found,
+        //we also insert an entry linked to the Note's Title:
+        item = manage(new TableofcontentMenuItem (get_note(), get_note()->get_title(), Level::H1, 0));
+        items.push_back(item);
+      }
+      item = manage(new TableofcontentMenuItem (get_note(), header, header_level, header_position));
+      items.push_back(item);
+    }
+    //next line
+    iter.forward_visible_line();
+  }
+}
+
+bool TableofcontentNoteAddin::on_key_pressed(GdkEventKey *ev)
+//return true if signal handled, false otherwise
+{
+  switch(ev->keyval) {
+    
+  case GDK_KEY_1: 
+      if (ev->state == (GDK_CONTROL_MASK | GDK_MOD1_MASK)) // Ctrl-Alt-1
+      {
+        // We show m_menu in a popup
+        if(m_submenu_built == false) {
+          populate_toc_menu(m_menu);
+          m_submenu_built = true;
+        }
+        m_menu->popup(0, 0);
+        return true;
+      }
+      else if (ev->state == GDK_CONTROL_MASK) // Ctrl-1
+      {
+        headification_switch (Level::H2);
+        return true;
+      }
+      else
+      { 
+        return false; 
+      }
+  break;
+  
+  case GDK_KEY_2:
+      if (ev->state == GDK_CONTROL_MASK) // Ctrl-2
+      {
+        headification_switch (Level::H3);
+        return true;
+      }
+      else 
+      { 
+        return false; 
+      }
+  break;
+  
+  default:
+    return false;
+  }
+  return false;
+}/* on_key_pressed() */
+
+
+void TableofcontentNoteAddin::headification_switch (Level::Type header_request)
+// Apply the correct header style ==> switch:  H2 <--> H3 <--> text
+{
+  
+  Glib::RefPtr<gnote::NoteBuffer> buffer = get_note()->get_buffer();
+  Gtk::TextIter start, end;
+
+  buffer->get_selection_bounds (start, end); //TODO: really?
+
+  Level::Type current_header = get_range_level (start, end);
+  
+  buffer->remove_all_tags (start, end);//reset all tags
+  
+  if( current_header == Level::H2 && header_request == Level::H3) //existing vs requested
+  {
+    buffer->set_active_tag ("bold");
+    buffer->set_active_tag ("size:large");
+  }
+  else if( current_header == Level::H3 && header_request == Level::H2)
+  {
+    buffer->set_active_tag ("bold");
+    buffer->set_active_tag ("size:huge");
+  }
+  else if( current_header == Level::None)
+  {
+    buffer->set_active_tag ("bold");
+    buffer->set_active_tag ( (header_request == Level::H2)?"size:huge":"size:large");
+  }
+  
+}/* headification_switch() */
+
+
+} //namespace
diff --git a/src/addins/tableofcontent/tableofcontentnoteaddin.hpp b/src/addins/tableofcontent/tableofcontentnoteaddin.hpp
new file mode 100644
index 0000000..a922513
--- /dev/null
+++ b/src/addins/tableofcontent/tableofcontentnoteaddin.hpp
@@ -0,0 +1,96 @@
+/*
+ *  "Table of Content" is a Note addin for gnote.
+ *    It lists Note's table of contents in a menu.
+ *    Headers are bold/large and bold/huge lines.
+ *
+ *  Copyright (C) 2013 Luc Pionchon <pionchon.luc@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __TABLEOFCONTENT_NOTEADDIN_HPP_
+#define __TABLEOFCONTENT_NOTEADDIN_HPP_
+
+#include <list>
+
+#include <gtkmm/imagemenuitem.h>
+#include <gtkmm/menu.h>
+
+#include "sharp/dynamicmodule.hpp"
+#include "note.hpp"
+#include "noteaddin.hpp"
+
+#include "tableofcontent.hpp"
+
+namespace tableofcontent {
+
+class TableofcontentModule
+  : public sharp::DynamicModule
+{
+public:
+  TableofcontentModule();
+  virtual const char * id()          const;
+  virtual const char * name()        const;
+  virtual const char * description() const;
+  virtual const char * authors()     const;
+  virtual       int    category()    const;
+  virtual const char * version()     const;
+  virtual const char * copyright()   const;
+};
+
+DECLARE_MODULE(TableofcontentModule);
+
+
+class TableofcontentMenuItem;
+
+class TableofcontentNoteAddin : public gnote::NoteAddin
+{
+public:
+  static TableofcontentNoteAddin *create()
+    {
+      return new TableofcontentNoteAddin;
+    }
+  TableofcontentNoteAddin();
+
+  virtual void initialize ();
+  virtual void shutdown ();
+  virtual void on_note_opened ();
+
+private:
+  void on_menu_item_activated ();
+  void on_menu_hidden ();
+  bool on_key_pressed (GdkEventKey *ev);
+  void on_populate_popup (Gtk::Menu* popup_menu);
+
+  void populate_toc_menu (Gtk::Menu *toc_menu);
+
+  bool has_tag_over_range (Glib::RefPtr<Gtk::TextTag> tag, Gtk::TextIter start, Gtk::TextIter end);
+  Level::Type get_range_level (Gtk::TextIter start, Gtk::TextIter end);
+  void get_tableofcontent_menu_items (std::list<TableofcontentMenuItem*> & items);
+
+  void headification_switch (Level::Type header_request);
+
+  Gtk::ImageMenuItem *m_menu_item;     // TOC menu entry in the plugin menu
+  Gtk::Menu          *m_menu;          // TOC submenu, containing the TOC
+  bool                m_submenu_built;   //FIXME: rename submenu/menu --> toc_menu
+
+  Glib::RefPtr<Gtk::TextTag> m_tag_bold;
+  Glib::RefPtr<Gtk::TextTag> m_tag_large;
+  Glib::RefPtr<Gtk::TextTag> m_tag_huge;
+};
+
+} //namespace
+
+#endif
+
