mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-13 06:01:21 +00:00
draft history buttons group
This commit is contained in:
parent
fb54cc4431
commit
17224ebaaa
3
Makefile
3
Makefile
@ -15,6 +15,9 @@ SRCS = src/main.cpp\
|
||||
src/app/browser/main/tab/data.cpp\
|
||||
src/app/browser/main/tab/data/navbar.cpp\
|
||||
src/app/browser/main/tab/data/navbar/base.cpp\
|
||||
src/app/browser/main/tab/data/navbar/history.cpp\
|
||||
src/app/browser/main/tab/data/navbar/history/back.cpp\
|
||||
src/app/browser/main/tab/data/navbar/history/forward.cpp\
|
||||
src/app/browser/main/tab/data/navbar/update.cpp\
|
||||
src/app/browser/main/tab/label.cpp\
|
||||
src/lib/database.cpp\
|
||||
|
@ -7,6 +7,9 @@ src/app/browser/main/tab.cpp
|
||||
src/app/browser/main/tab/data.cpp
|
||||
src/app/browser/main/tab/data/navbar.cpp
|
||||
src/app/browser/main/tab/data/navbar/base.cpp
|
||||
src/app/browser/main/tab/data/navbar/history.cpp
|
||||
src/app/browser/main/tab/data/navbar/history/back.cpp
|
||||
src/app/browser/main/tab/data/navbar/history/forward.cpp
|
||||
src/app/browser/main/tab/data/navbar/update.cpp
|
||||
src/app/browser/main/tab/label.cpp
|
||||
src/lib/database.cpp
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "navbar.hpp"
|
||||
#include "navbar/base.hpp"
|
||||
#include "navbar/history.hpp"
|
||||
#include "navbar/update.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::data;
|
||||
@ -38,6 +39,12 @@ Navbar::Navbar()
|
||||
* base
|
||||
);
|
||||
|
||||
history = new navbar::History();
|
||||
|
||||
append(
|
||||
* history
|
||||
);
|
||||
|
||||
update = new navbar::Update();
|
||||
|
||||
append(
|
||||
|
@ -8,6 +8,7 @@ namespace app::browser::main::tab::data
|
||||
namespace navbar
|
||||
{
|
||||
class Base;
|
||||
class History;
|
||||
class Update;
|
||||
}
|
||||
|
||||
@ -21,6 +22,7 @@ namespace app::browser::main::tab::data
|
||||
|
||||
// Components
|
||||
navbar::Base * base;
|
||||
navbar::History * history;
|
||||
navbar::Update * update;
|
||||
|
||||
public:
|
||||
|
22
src/app/browser/main/tab/data/navbar/history.cpp
Normal file
22
src/app/browser/main/tab/data/navbar/history.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include "history.hpp"
|
||||
#include "history/back.hpp"
|
||||
#include "history/forward.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::data::navbar;
|
||||
|
||||
History::History()
|
||||
{
|
||||
back = new history::Back();
|
||||
|
||||
append(
|
||||
* back
|
||||
);
|
||||
|
||||
forward = new history::Forward();
|
||||
|
||||
append(
|
||||
* forward
|
||||
);
|
||||
}
|
||||
|
||||
History::~History() = default;
|
30
src/app/browser/main/tab/data/navbar/history.hpp
Normal file
30
src/app/browser/main/tab/data/navbar/history.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/box.h>
|
||||
|
||||
namespace app::browser::main::tab::data::navbar
|
||||
{
|
||||
namespace history
|
||||
{
|
||||
class Back;
|
||||
class Forward;
|
||||
}
|
||||
|
||||
class History : public Gtk::Box
|
||||
{
|
||||
private:
|
||||
|
||||
history::Back * back;
|
||||
history::Forward * forward;
|
||||
|
||||
public:
|
||||
|
||||
History();
|
||||
|
||||
~History();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_HPP
|
20
src/app/browser/main/tab/data/navbar/history/back.cpp
Normal file
20
src/app/browser/main/tab/data/navbar/history/back.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include "back.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::data::navbar::history;
|
||||
|
||||
Back::Back()
|
||||
{
|
||||
set_action_name(
|
||||
"tab.back"
|
||||
);
|
||||
|
||||
set_icon_name(
|
||||
"go-previous-symbolic"
|
||||
);
|
||||
|
||||
set_tooltip_text(
|
||||
_("Back")
|
||||
);
|
||||
}
|
||||
|
||||
Back::~Back() = default;
|
19
src/app/browser/main/tab/data/navbar/history/back.hpp
Normal file
19
src/app/browser/main/tab/data/navbar/history/back.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_BACK_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_BACK_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::data::navbar::history
|
||||
{
|
||||
class Back : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Back();
|
||||
|
||||
~Back();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_BACK_HPP
|
20
src/app/browser/main/tab/data/navbar/history/forward.cpp
Normal file
20
src/app/browser/main/tab/data/navbar/history/forward.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include "forward.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::data::navbar::history;
|
||||
|
||||
Forward::Forward()
|
||||
{
|
||||
set_action_name(
|
||||
"tab.forward"
|
||||
);
|
||||
|
||||
set_icon_name(
|
||||
"go-next-symbolic"
|
||||
);
|
||||
|
||||
set_tooltip_text(
|
||||
_("Forward")
|
||||
);
|
||||
}
|
||||
|
||||
Forward::~Forward() = default;
|
19
src/app/browser/main/tab/data/navbar/history/forward.hpp
Normal file
19
src/app/browser/main/tab/data/navbar/history/forward.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_FORWARD_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_FORWARD_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::data::navbar::history
|
||||
{
|
||||
class Forward : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Forward();
|
||||
|
||||
~Forward();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_HISTORY_FORWARD_HPP
|
Loading…
x
Reference in New Issue
Block a user