rename widgets

This commit is contained in:
yggverse 2024-09-04 23:16:43 +03:00
parent 38b2ac4f04
commit 57f43e2dd9
28 changed files with 365 additions and 365 deletions

View file

@ -0,0 +1,64 @@
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_HPP
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_HPP
#include <ctime>
#include <glibmm/i18n.h>
#include <glibmm/ustring.h>
#include <gtkmm/box.h>
#include <gtkmm/object.h>
#include <vector>
namespace app::browser::main::tab::page::navigation
{
namespace history
{
class Back;
class Forward;
}
class History : public Gtk::Box
{
// Components
history::Back * historyBack;
history::Forward * historyForward;
int index = -1;
public:
// Extras
struct Memory
{
Glib::ustring request;
std::time_t time; // event unix time
bool permanent; // save in database (on application close) @TODO
};
// Define navigation history storage
std::vector<Memory> memory;
History();
// Actions
void add(
const Glib::ustring & REQUEST,
const bool & FOLLOW = true
);
void refresh();
void save(); // @TODO save history to the permanent storage
bool try_back(
Memory & match,
const bool & FOLLOW = true
);
bool try_forward(
Memory & match,
const bool & FOLLOW = true
);
};
}
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_HPP