append progressbar to request entry

This commit is contained in:
yggverse 2024-09-06 05:17:33 +03:00
parent f959a6627b
commit 3a91155596
10 changed files with 68 additions and 103 deletions

View file

@ -2,6 +2,7 @@
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_REQUEST_HPP
#include <glibmm/i18n.h>
#include <glibmm/main.h>
#include <glibmm/regex.h>
#include <glibmm/ustring.h>
#include <gtkmm/entry.h>
@ -10,7 +11,8 @@ namespace app::browser::main::tab::page::navigation
{
class Request : public Gtk::Entry
{
const bool HEXPAND = true;
// Extras
double progress_fraction;
Glib::ustring scheme,
host,
@ -18,14 +20,26 @@ namespace app::browser::main::tab::page::navigation
path,
query;
// Defaults
const bool HEXPAND = true;
const double PROGRESS_PULSE_STEP = .1;
const int PROGRESS_ANIMATION_TIME = 10;
// Private helpers
void parse();
public:
Request(
const Glib::ustring & VALUE = ""
const Glib::ustring & VALUE = "" // @TODO remove default value
);
// Actions
void refresh(
const double & PROGRESS_FRACTION
);
// Getters
Glib::ustring get_scheme();
Glib::ustring get_host();
Glib::ustring get_port();