mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
rename widgets
This commit is contained in:
parent
38b2ac4f04
commit
57f43e2dd9
28 changed files with 365 additions and 365 deletions
|
|
@ -1,182 +0,0 @@
|
|||
#include "navbar.hpp"
|
||||
#include "navbar/base.hpp"
|
||||
#include "navbar/bookmark.hpp"
|
||||
#include "navbar/history.hpp"
|
||||
#include "navbar/request.hpp"
|
||||
#include "navbar/update.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page;
|
||||
|
||||
Navbar::Navbar(
|
||||
const Glib::ustring & REQUEST
|
||||
) {
|
||||
// Init container
|
||||
set_orientation(
|
||||
Gtk::Orientation::HORIZONTAL
|
||||
);
|
||||
|
||||
set_spacing(
|
||||
SPACING
|
||||
);
|
||||
|
||||
set_margin_top(
|
||||
MARGIN
|
||||
);
|
||||
|
||||
set_margin_start(
|
||||
MARGIN
|
||||
);
|
||||
|
||||
set_margin_end(
|
||||
MARGIN
|
||||
);
|
||||
|
||||
set_margin_bottom(
|
||||
MARGIN
|
||||
);
|
||||
|
||||
// Init components
|
||||
navbarBase = Gtk::make_managed<navbar::Base>();
|
||||
|
||||
append(
|
||||
* navbarBase
|
||||
);
|
||||
|
||||
navbarHistory = Gtk::make_managed<navbar::History>();
|
||||
|
||||
append(
|
||||
* navbarHistory
|
||||
);
|
||||
|
||||
navbarUpdate = Gtk::make_managed<navbar::Update>();
|
||||
|
||||
append(
|
||||
* navbarUpdate
|
||||
);
|
||||
|
||||
navbarRequest = Gtk::make_managed<navbar::Request>(
|
||||
REQUEST
|
||||
);
|
||||
|
||||
append(
|
||||
* navbarRequest
|
||||
);
|
||||
|
||||
navbarBookmark = Gtk::make_managed<navbar::Bookmark>();
|
||||
|
||||
append(
|
||||
* navbarBookmark
|
||||
);
|
||||
|
||||
// Init actions group
|
||||
auto GioSimpleActionGroup = Gio::SimpleActionGroup::create();
|
||||
|
||||
// Define group actions
|
||||
GioSimpleActionGroup->add_action(
|
||||
"refresh",
|
||||
[this]
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
);
|
||||
|
||||
insert_action_group(
|
||||
"navbar",
|
||||
GioSimpleActionGroup
|
||||
);
|
||||
}
|
||||
|
||||
// Actions
|
||||
void Navbar::history_back()
|
||||
{
|
||||
navbar::History::Memory match;
|
||||
|
||||
if (navbarHistory->try_back(match))
|
||||
{
|
||||
navbarRequest->set_text(
|
||||
match.request
|
||||
);
|
||||
|
||||
navbarUpdate->activate();
|
||||
}
|
||||
}
|
||||
|
||||
void Navbar::history_forward()
|
||||
{
|
||||
navbar::History::Memory match;
|
||||
|
||||
if (navbarHistory->try_forward(match))
|
||||
{
|
||||
navbarRequest->set_text(
|
||||
match.request
|
||||
);
|
||||
|
||||
navbarUpdate->activate();
|
||||
}
|
||||
}
|
||||
|
||||
void Navbar::history_add(
|
||||
const Glib::ustring & VALUE
|
||||
) {
|
||||
navbarHistory->add(
|
||||
VALUE
|
||||
);
|
||||
}
|
||||
|
||||
void Navbar::refresh()
|
||||
{
|
||||
// Toggle base button sensibility
|
||||
navbarBase->set_sensitive(
|
||||
!navbarRequest->get_host().empty() && !navbarRequest->get_path().empty()
|
||||
);
|
||||
|
||||
// Toggle update button sensibility
|
||||
navbarUpdate->set_sensitive(
|
||||
navbarRequest->get_text_length() > 0
|
||||
);
|
||||
|
||||
// Refresh history widget
|
||||
navbarHistory->refresh();
|
||||
}
|
||||
|
||||
// Setters @TODO is really wanted?
|
||||
void Navbar::set_request_text(
|
||||
const Glib::ustring & VALUE
|
||||
) {
|
||||
navbarRequest->set_text(
|
||||
VALUE
|
||||
);
|
||||
|
||||
// refresh(); not wanted as on change listener do same @TODO
|
||||
}
|
||||
|
||||
// Getters @TODO &
|
||||
Glib::ustring Navbar::get_request_text()
|
||||
{
|
||||
return navbarRequest->get_text();
|
||||
}
|
||||
|
||||
Glib::ustring Navbar::get_request_scheme()
|
||||
{
|
||||
return navbarRequest->get_scheme();
|
||||
}
|
||||
|
||||
Glib::ustring Navbar::get_request_host()
|
||||
{
|
||||
return navbarRequest->get_host();
|
||||
}
|
||||
|
||||
Glib::ustring Navbar::get_request_path()
|
||||
{
|
||||
return navbarRequest->get_path();
|
||||
}
|
||||
|
||||
Glib::ustring Navbar::get_request_query()
|
||||
{
|
||||
return navbarRequest->get_query();
|
||||
}
|
||||
|
||||
Glib::ustring Navbar::get_request_port()
|
||||
{
|
||||
return navbarRequest->get_port();
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BASE_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BASE_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navbar
|
||||
{
|
||||
class Base : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Base();
|
||||
|
||||
~Base();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BASE_HPP
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BOOKMARK_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BOOKMARK_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navbar
|
||||
{
|
||||
class Bookmark : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Bookmark();
|
||||
|
||||
~Bookmark();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_BOOKMARK_HPP
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_BACK_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_BACK_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navbar::history
|
||||
{
|
||||
class Back : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Back();
|
||||
|
||||
~Back();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_BACK_HPP
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_FORWARD_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_FORWARD_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navbar::history
|
||||
{
|
||||
class Forward : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Forward();
|
||||
|
||||
~Forward();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_FORWARD_HPP
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_UPDATE_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_UPDATE_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navbar
|
||||
{
|
||||
class Update : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Update();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_UPDATE_HPP
|
||||
182
src/app/browser/main/tab/page/navigation.cpp
Normal file
182
src/app/browser/main/tab/page/navigation.cpp
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
#include "navigation.hpp"
|
||||
#include "navigation/base.hpp"
|
||||
#include "navigation/bookmark.hpp"
|
||||
#include "navigation/history.hpp"
|
||||
#include "navigation/request.hpp"
|
||||
#include "navigation/update.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page;
|
||||
|
||||
Navigation::Navigation(
|
||||
const Glib::ustring & REQUEST
|
||||
) {
|
||||
// Init container
|
||||
set_orientation(
|
||||
Gtk::Orientation::HORIZONTAL
|
||||
);
|
||||
|
||||
set_spacing(
|
||||
SPACING
|
||||
);
|
||||
|
||||
set_margin_top(
|
||||
MARGIN
|
||||
);
|
||||
|
||||
set_margin_start(
|
||||
MARGIN
|
||||
);
|
||||
|
||||
set_margin_end(
|
||||
MARGIN
|
||||
);
|
||||
|
||||
set_margin_bottom(
|
||||
MARGIN
|
||||
);
|
||||
|
||||
// Init components
|
||||
navigationBase = Gtk::make_managed<navigation::Base>();
|
||||
|
||||
append(
|
||||
* navigationBase
|
||||
);
|
||||
|
||||
navigationHistory = Gtk::make_managed<navigation::History>();
|
||||
|
||||
append(
|
||||
* navigationHistory
|
||||
);
|
||||
|
||||
navigationUpdate = Gtk::make_managed<navigation::Update>();
|
||||
|
||||
append(
|
||||
* navigationUpdate
|
||||
);
|
||||
|
||||
navigationRequest = Gtk::make_managed<navigation::Request>(
|
||||
REQUEST
|
||||
);
|
||||
|
||||
append(
|
||||
* navigationRequest
|
||||
);
|
||||
|
||||
navigationBookmark = Gtk::make_managed<navigation::Bookmark>();
|
||||
|
||||
append(
|
||||
* navigationBookmark
|
||||
);
|
||||
|
||||
// Init actions group
|
||||
auto GioSimpleActionGroup = Gio::SimpleActionGroup::create();
|
||||
|
||||
// Define group actions
|
||||
GioSimpleActionGroup->add_action(
|
||||
"refresh",
|
||||
[this]
|
||||
{
|
||||
refresh();
|
||||
}
|
||||
);
|
||||
|
||||
insert_action_group(
|
||||
"navigation",
|
||||
GioSimpleActionGroup
|
||||
);
|
||||
}
|
||||
|
||||
// Actions
|
||||
void Navigation::history_back()
|
||||
{
|
||||
navigation::History::Memory match;
|
||||
|
||||
if (navigationHistory->try_back(match))
|
||||
{
|
||||
navigationRequest->set_text(
|
||||
match.request
|
||||
);
|
||||
|
||||
navigationUpdate->activate();
|
||||
}
|
||||
}
|
||||
|
||||
void Navigation::history_forward()
|
||||
{
|
||||
navigation::History::Memory match;
|
||||
|
||||
if (navigationHistory->try_forward(match))
|
||||
{
|
||||
navigationRequest->set_text(
|
||||
match.request
|
||||
);
|
||||
|
||||
navigationUpdate->activate();
|
||||
}
|
||||
}
|
||||
|
||||
void Navigation::history_add(
|
||||
const Glib::ustring & VALUE
|
||||
) {
|
||||
navigationHistory->add(
|
||||
VALUE
|
||||
);
|
||||
}
|
||||
|
||||
void Navigation::refresh()
|
||||
{
|
||||
// Toggle base button sensibility
|
||||
navigationBase->set_sensitive(
|
||||
!navigationRequest->get_host().empty() && !navigationRequest->get_path().empty()
|
||||
);
|
||||
|
||||
// Toggle update button sensibility
|
||||
navigationUpdate->set_sensitive(
|
||||
navigationRequest->get_text_length() > 0
|
||||
);
|
||||
|
||||
// Refresh history widget
|
||||
navigationHistory->refresh();
|
||||
}
|
||||
|
||||
// Setters @TODO is really wanted?
|
||||
void Navigation::set_request_text(
|
||||
const Glib::ustring & VALUE
|
||||
) {
|
||||
navigationRequest->set_text(
|
||||
VALUE
|
||||
);
|
||||
|
||||
// refresh(); not wanted as on change listener do same @TODO
|
||||
}
|
||||
|
||||
// Getters @TODO &
|
||||
Glib::ustring Navigation::get_request_text()
|
||||
{
|
||||
return navigationRequest->get_text();
|
||||
}
|
||||
|
||||
Glib::ustring Navigation::get_request_scheme()
|
||||
{
|
||||
return navigationRequest->get_scheme();
|
||||
}
|
||||
|
||||
Glib::ustring Navigation::get_request_host()
|
||||
{
|
||||
return navigationRequest->get_host();
|
||||
}
|
||||
|
||||
Glib::ustring Navigation::get_request_path()
|
||||
{
|
||||
return navigationRequest->get_path();
|
||||
}
|
||||
|
||||
Glib::ustring Navigation::get_request_query()
|
||||
{
|
||||
return navigationRequest->get_query();
|
||||
}
|
||||
|
||||
Glib::ustring Navigation::get_request_port()
|
||||
{
|
||||
return navigationRequest->get_port();
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HPP
|
||||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HPP
|
||||
|
||||
#include <giomm/simpleactiongroup.h>
|
||||
#include <glibmm/ustring.h>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace app::browser::main::tab::page
|
||||
{
|
||||
namespace navbar
|
||||
namespace navigation
|
||||
{
|
||||
class Base;
|
||||
class Bookmark;
|
||||
|
|
@ -17,14 +17,14 @@ namespace app::browser::main::tab::page
|
|||
class Request;
|
||||
}
|
||||
|
||||
class Navbar : public Gtk::Box
|
||||
class Navigation : public Gtk::Box
|
||||
{
|
||||
// Components
|
||||
navbar::Base * navbarBase;
|
||||
navbar::Bookmark * navbarBookmark;
|
||||
navbar::History * navbarHistory;
|
||||
navbar::Request * navbarRequest;
|
||||
navbar::Update * navbarUpdate;
|
||||
navigation::Base * navigationBase;
|
||||
navigation::Bookmark * navigationBookmark;
|
||||
navigation::History * navigationHistory;
|
||||
navigation::Request * navigationRequest;
|
||||
navigation::Update * navigationUpdate;
|
||||
|
||||
// Defaults
|
||||
const int SPACING = 8;
|
||||
|
|
@ -32,7 +32,7 @@ namespace app::browser::main::tab::page
|
|||
|
||||
public:
|
||||
|
||||
Navbar(
|
||||
Navigation(
|
||||
const Glib::ustring & REQUEST
|
||||
);
|
||||
|
||||
|
|
@ -63,4 +63,4 @@ namespace app::browser::main::tab::page
|
|||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HPP
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HPP
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "base.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page::navbar;
|
||||
using namespace app::browser::main::tab::page::navigation;
|
||||
|
||||
Base::Base()
|
||||
{
|
||||
19
src/app/browser/main/tab/page/navigation/base.hpp
Normal file
19
src/app/browser/main/tab/page/navigation/base.hpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_BASE_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_BASE_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navigation
|
||||
{
|
||||
class Base : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Base();
|
||||
|
||||
~Base();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_BASE_HPP
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "bookmark.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page::navbar;
|
||||
using namespace app::browser::main::tab::page::navigation;
|
||||
|
||||
Bookmark::Bookmark()
|
||||
{
|
||||
19
src/app/browser/main/tab/page/navigation/bookmark.hpp
Normal file
19
src/app/browser/main/tab/page/navigation/bookmark.hpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_BOOKMARK_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_BOOKMARK_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navigation
|
||||
{
|
||||
class Bookmark : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Bookmark();
|
||||
|
||||
~Bookmark();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_BOOKMARK_HPP
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
#include "history/back.hpp"
|
||||
#include "history/forward.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page::navbar;
|
||||
using namespace app::browser::main::tab::page::navigation;
|
||||
|
||||
History::History()
|
||||
{
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_HPP
|
||||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_HPP
|
||||
|
||||
#include <ctime>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
#include <gtkmm/object.h>
|
||||
#include <vector>
|
||||
|
||||
namespace app::browser::main::tab::page::navbar
|
||||
namespace app::browser::main::tab::page::navigation
|
||||
{
|
||||
namespace history
|
||||
{
|
||||
|
|
@ -61,4 +61,4 @@ namespace app::browser::main::tab::page::navbar
|
|||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_HISTORY_HPP
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_HPP
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "back.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page::navbar::history;
|
||||
using namespace app::browser::main::tab::page::navigation::history;
|
||||
|
||||
Back::Back()
|
||||
{
|
||||
19
src/app/browser/main/tab/page/navigation/history/back.hpp
Normal file
19
src/app/browser/main/tab/page/navigation/history/back.hpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_BACK_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_BACK_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navigation::history
|
||||
{
|
||||
class Back : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Back();
|
||||
|
||||
~Back();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_BACK_HPP
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "forward.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page::navbar::history;
|
||||
using namespace app::browser::main::tab::page::navigation::history;
|
||||
|
||||
Forward::Forward()
|
||||
{
|
||||
19
src/app/browser/main/tab/page/navigation/history/forward.hpp
Normal file
19
src/app/browser/main/tab/page/navigation/history/forward.hpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_FORWARD_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_FORWARD_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navigation::history
|
||||
{
|
||||
class Forward : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Forward();
|
||||
|
||||
~Forward();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_HISTORY_FORWARD_HPP
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "request.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page::navbar;
|
||||
using namespace app::browser::main::tab::page::navigation;
|
||||
|
||||
// Construct
|
||||
Request::Request(
|
||||
|
|
@ -31,7 +31,7 @@ Request::Request(
|
|||
parse();
|
||||
|
||||
activate_action(
|
||||
"navbar.refresh"
|
||||
"navigation.refresh"
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_REQUEST_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_REQUEST_HPP
|
||||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_REQUEST_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_REQUEST_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <glibmm/regex.h>
|
||||
#include <glibmm/ustring.h>
|
||||
#include <gtkmm/entry.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navbar
|
||||
namespace app::browser::main::tab::page::navigation
|
||||
{
|
||||
class Request : public Gtk::Entry
|
||||
{
|
||||
|
|
@ -34,4 +34,4 @@ namespace app::browser::main::tab::page::navbar
|
|||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVBAR_REQUEST_HPP
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_REQUEST_HPP
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include "update.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page::navbar;
|
||||
using namespace app::browser::main::tab::page::navigation;
|
||||
|
||||
Update::Update()
|
||||
{
|
||||
17
src/app/browser/main/tab/page/navigation/update.hpp
Normal file
17
src/app/browser/main/tab/page/navigation/update.hpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_UPDATE_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_UPDATE_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::page::navigation
|
||||
{
|
||||
class Update : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Update();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_NAVIGATION_UPDATE_HPP
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#include "progressbar.hpp"
|
||||
#include "progress.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::page;
|
||||
|
||||
Progressbar::Progressbar()
|
||||
Progress::Progress()
|
||||
{
|
||||
set_margin_top(
|
||||
MARGIN
|
||||
|
|
@ -20,7 +20,7 @@ Progressbar::Progressbar()
|
|||
}
|
||||
|
||||
// Public actions
|
||||
void Progressbar::refresh(
|
||||
void Progress::refresh(
|
||||
double fraction
|
||||
) {
|
||||
// Toggle transparency
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_PROGRESSBAR_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_PROGRESSBAR_HPP
|
||||
#ifndef APP_BROWSER_MAIN_TAB_PAGE_PROGRESS_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_PAGE_PROGRESS_HPP
|
||||
|
||||
#include <glibmm/main.h>
|
||||
#include <gtkmm/progressbar.h>
|
||||
|
||||
namespace app::browser::main::tab::page
|
||||
{
|
||||
class Progressbar : public Gtk::ProgressBar
|
||||
class Progress : public Gtk::ProgressBar
|
||||
{
|
||||
const int MARGIN = 2;
|
||||
const double PULSE_STEP = .1;
|
||||
|
|
@ -16,7 +16,7 @@ namespace app::browser::main::tab::page
|
|||
|
||||
public:
|
||||
|
||||
Progressbar();
|
||||
Progress();
|
||||
|
||||
void refresh(
|
||||
double fraction
|
||||
|
|
@ -24,4 +24,4 @@ namespace app::browser::main::tab::page
|
|||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_PROGRESSBAR_HPP
|
||||
#endif // APP_BROWSER_MAIN_TAB_PAGE_PROGRESS_HPP
|
||||
Loading…
Add table
Add a link
Reference in a new issue