summaryrefslogtreecommitdiff
path: root/src/components/channeltabswitcherhandy.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/channeltabswitcherhandy.hpp')
-rw-r--r--src/components/channeltabswitcherhandy.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/components/channeltabswitcherhandy.hpp b/src/components/channeltabswitcherhandy.hpp
index 41c9c92..37a71ee 100644
--- a/src/components/channeltabswitcherhandy.hpp
+++ b/src/components/channeltabswitcherhandy.hpp
@@ -22,11 +22,16 @@ public:
TabsState GetTabsState();
void UseTabsState(const TabsState &state);
+ void GoBackOnCurrent();
+ void GoForwardOnCurrent();
+
private:
void CheckUnread(Snowflake id);
void ClearPage(HdyTabPage *page);
void OnPageIconLoad(HdyTabPage *page, const Glib::RefPtr<Gdk::Pixbuf> &pb);
void CheckPageIcon(HdyTabPage *page, const ChannelData &data);
+ void AppendPageHistory(HdyTabPage *page, Snowflake channel);
+ void AdvanceOnCurrent(size_t by);
HdyTabBar *m_tab_bar;
Gtk::Widget *m_tab_bar_wrapped;
@@ -38,6 +43,13 @@ private:
// need to hold a reference to the pixbuf data
std::unordered_map<HdyTabPage *, Glib::RefPtr<Gdk::Pixbuf>> m_page_icons;
+ struct PageHistory {
+ std::vector<Snowflake> Visited;
+ size_t CurrentVisitedIndex;
+ };
+
+ std::unordered_map<HdyTabPage *, PageHistory> m_page_history;
+
friend void selected_page_notify_cb(HdyTabView *, GParamSpec *, ChannelTabSwitcherHandy *);
friend gboolean close_page_cb(HdyTabView *, HdyTabPage *, ChannelTabSwitcherHandy *);