2024-09-04 23:16:43 +03:00
|
|
|
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HPP
|
|
|
|
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HPP
|
2024-08-13 08:28:33 +03:00
|
|
|
|
2024-08-14 09:16:45 +03:00
|
|
|
#include <giomm/simpleactiongroup.h>
|
|
|
|
#include <glibmm/ustring.h>
|
2024-08-13 08:28:33 +03:00
|
|
|
#include <gtkmm/box.h>
|
2024-09-02 16:25:31 +03:00
|
|
|
#include <gtkmm/object.h>
|
2024-08-13 08:28:33 +03:00
|
|
|
|
2024-08-15 18:52:11 +03:00
|
|
|
namespace app::browser::main::tab::page
|
2024-08-13 08:28:33 +03:00
|
|
|
{
|
2024-09-04 23:16:43 +03:00
|
|
|
namespace navigation
|
2024-08-13 08:40:17 +03:00
|
|
|
{
|
|
|
|
class Base;
|
2024-08-13 09:54:11 +03:00
|
|
|
class Bookmark;
|
2024-08-13 09:47:59 +03:00
|
|
|
class History;
|
2024-08-13 09:05:59 +03:00
|
|
|
class Update;
|
2024-08-13 09:59:58 +03:00
|
|
|
class Request;
|
2024-08-13 08:40:17 +03:00
|
|
|
}
|
|
|
|
|
2024-09-04 23:16:43 +03:00
|
|
|
class Navigation : public Gtk::Box
|
2024-08-13 08:28:33 +03:00
|
|
|
{
|
2024-08-17 00:50:24 +03:00
|
|
|
// Components
|
2024-09-04 23:16:43 +03:00
|
|
|
navigation::Base * navigationBase;
|
|
|
|
navigation::Bookmark * navigationBookmark;
|
|
|
|
navigation::History * navigationHistory;
|
|
|
|
navigation::Request * navigationRequest;
|
|
|
|
navigation::Update * navigationUpdate;
|
2024-08-17 00:50:24 +03:00
|
|
|
|
|
|
|
// Defaults
|
|
|
|
const int SPACING = 8;
|
|
|
|
const int MARGIN = 8;
|
2024-08-14 09:16:45 +03:00
|
|
|
|
2024-08-13 08:28:33 +03:00
|
|
|
public:
|
|
|
|
|
2024-09-04 23:16:43 +03:00
|
|
|
Navigation(
|
2024-08-29 04:10:43 +03:00
|
|
|
const Glib::ustring & REQUEST
|
2024-08-26 22:29:09 +03:00
|
|
|
);
|
|
|
|
|
2024-08-14 09:16:45 +03:00
|
|
|
// Actions
|
2024-09-04 20:51:14 +03:00
|
|
|
void history_add(
|
2024-08-29 04:02:38 +03:00
|
|
|
const Glib::ustring & VALUE
|
|
|
|
);
|
|
|
|
|
2024-09-05 02:50:41 +03:00
|
|
|
bool history_try_back();
|
|
|
|
bool history_try_forward();
|
2024-09-04 20:51:14 +03:00
|
|
|
|
2024-08-14 09:16:45 +03:00
|
|
|
void refresh();
|
|
|
|
|
2024-08-17 10:27:17 +03:00
|
|
|
// Setters
|
2024-08-26 22:29:09 +03:00
|
|
|
void set_request_text(
|
2024-08-29 04:12:32 +03:00
|
|
|
const Glib::ustring & VALUE
|
2024-08-17 10:27:17 +03:00
|
|
|
);
|
|
|
|
|
2024-08-14 09:16:45 +03:00
|
|
|
// Getters
|
2024-08-26 22:29:09 +03:00
|
|
|
Glib::ustring get_request_text();
|
2024-08-16 09:02:50 +03:00
|
|
|
|
2024-08-17 12:45:43 +03:00
|
|
|
Glib::ustring get_request_scheme();
|
|
|
|
Glib::ustring get_request_host();
|
|
|
|
Glib::ustring get_request_port();
|
|
|
|
Glib::ustring get_request_path();
|
|
|
|
Glib::ustring get_request_query();
|
2024-08-13 08:28:33 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2024-09-04 23:16:43 +03:00
|
|
|
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HPP
|