2024-08-15 18:52:11 +03:00
|
|
|
#ifndef APP_BROWSER_MAIN_TAB_PAGE_HPP
|
|
|
|
#define APP_BROWSER_MAIN_TAB_PAGE_HPP
|
2024-08-13 08:07:56 +03:00
|
|
|
|
2024-08-16 17:56:42 +03:00
|
|
|
#include <giomm/asyncresult.h>
|
|
|
|
#include <giomm/inputstream.h>
|
|
|
|
#include <giomm/outputstream.h>
|
2024-08-14 07:56:34 +03:00
|
|
|
#include <giomm/simpleactiongroup.h>
|
2024-08-16 17:56:42 +03:00
|
|
|
#include <giomm/socketclient.h>
|
|
|
|
#include <giomm/socketconnection.h>
|
2024-08-18 15:32:31 +03:00
|
|
|
#include <glibmm/i18n.h>
|
2024-08-14 11:30:05 +03:00
|
|
|
#include <glibmm/refptr.h>
|
2024-08-18 15:19:36 +03:00
|
|
|
#include <glibmm/regex.h>
|
2024-08-18 16:06:22 +03:00
|
|
|
#include <glibmm/stringutils.h>
|
2024-08-17 12:45:43 +03:00
|
|
|
#include <glibmm/ustring.h>
|
2024-08-14 11:30:05 +03:00
|
|
|
#include <gtkmm/box.h>
|
2024-09-02 16:25:31 +03:00
|
|
|
#include <gtkmm/object.h>
|
2024-08-13 08:07:56 +03:00
|
|
|
|
|
|
|
namespace app::browser::main::tab
|
|
|
|
{
|
2024-08-15 18:52:11 +03:00
|
|
|
namespace page
|
2024-08-13 08:48:17 +03:00
|
|
|
{
|
2024-08-14 11:30:05 +03:00
|
|
|
class Content;
|
2024-08-18 23:46:27 +03:00
|
|
|
class Navbar;
|
|
|
|
class Progressbar;
|
2024-08-13 08:48:17 +03:00
|
|
|
}
|
|
|
|
|
2024-08-15 18:52:11 +03:00
|
|
|
class Page : public Gtk::Box
|
2024-08-13 08:07:56 +03:00
|
|
|
{
|
2024-08-27 15:02:09 +03:00
|
|
|
// Extras
|
2024-08-27 14:15:13 +03:00
|
|
|
Glib::ustring title;
|
2024-08-27 14:49:09 +03:00
|
|
|
Glib::ustring subtitle;
|
2024-08-27 14:15:13 +03:00
|
|
|
|
2024-08-27 15:02:09 +03:00
|
|
|
// Socket
|
|
|
|
char buffer[0xfffff]; // 1Mb
|
|
|
|
|
2024-08-26 23:11:27 +03:00
|
|
|
Glib::RefPtr<Gio::SocketClient> GioSocketClient_RefPtr;
|
|
|
|
Glib::RefPtr<Gio::SocketConnection> GioSocketConnection_RefPtr;
|
2024-08-16 17:56:42 +03:00
|
|
|
|
2024-08-27 15:02:09 +03:00
|
|
|
// Components
|
2024-08-26 23:11:27 +03:00
|
|
|
page::Content * pageContent;
|
|
|
|
page::Navbar * pageNavbar;
|
|
|
|
page::Progressbar * pageProgressbar;
|
2024-08-13 08:48:17 +03:00
|
|
|
|
2024-08-13 08:07:56 +03:00
|
|
|
public:
|
|
|
|
|
2024-08-26 22:29:09 +03:00
|
|
|
Page(
|
2024-08-27 14:15:13 +03:00
|
|
|
const Glib::ustring & TITLE,
|
2024-08-27 14:49:09 +03:00
|
|
|
const Glib::ustring & SUBTITLE = "",
|
2024-08-27 14:15:13 +03:00
|
|
|
const Glib::ustring & REQUEST = ""
|
2024-08-26 22:29:09 +03:00
|
|
|
);
|
|
|
|
|
2024-08-27 14:15:13 +03:00
|
|
|
// Getters
|
|
|
|
Glib::ustring get_title();
|
2024-08-27 15:02:09 +03:00
|
|
|
Glib::ustring get_subtitle();
|
2024-08-27 14:15:13 +03:00
|
|
|
|
|
|
|
// Actions
|
2024-09-01 15:21:12 +03:00
|
|
|
void back();
|
|
|
|
void forward();
|
2024-09-02 21:56:06 +03:00
|
|
|
|
|
|
|
void refresh(
|
|
|
|
const Glib::ustring & TITLE,
|
|
|
|
const Glib::ustring & SUBTITLE,
|
|
|
|
const double & PROGRESS
|
|
|
|
);
|
|
|
|
|
2024-09-04 21:30:35 +03:00
|
|
|
void update(
|
|
|
|
const bool & HISTORY = false
|
|
|
|
);
|
2024-08-13 08:07:56 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2024-08-15 18:52:11 +03:00
|
|
|
#endif // APP_BROWSER_MAIN_TAB_PAGE_HPP
|