mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-13 06:01:21 +00:00
init base button class
This commit is contained in:
parent
3136b0b21c
commit
940c98f3c6
1
Makefile
1
Makefile
@ -14,6 +14,7 @@ SRCS = src/main.cpp\
|
||||
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/label.cpp\
|
||||
src/lib/database.cpp\
|
||||
src/lib/database/session.cpp
|
||||
|
@ -6,6 +6,7 @@ src/app/browser/main.cpp
|
||||
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/label.cpp
|
||||
src/lib/database.cpp
|
||||
src/lib/database/session.cpp
|
||||
|
@ -1,9 +1,11 @@
|
||||
#include "navbar.hpp"
|
||||
#include "navbar/base.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::data;
|
||||
|
||||
Navbar::Navbar()
|
||||
{
|
||||
// Init container
|
||||
set_orientation(
|
||||
Gtk::Orientation::HORIZONTAL
|
||||
);
|
||||
@ -11,6 +13,13 @@ Navbar::Navbar()
|
||||
set_homogeneous(
|
||||
true
|
||||
);
|
||||
|
||||
// Init elements
|
||||
base = new navbar::Base();
|
||||
|
||||
append(
|
||||
* base
|
||||
);
|
||||
}
|
||||
|
||||
Navbar::~Navbar() = default;
|
||||
|
@ -5,8 +5,17 @@
|
||||
|
||||
namespace app::browser::main::tab::data
|
||||
{
|
||||
namespace navbar
|
||||
{
|
||||
class Base;
|
||||
}
|
||||
|
||||
class Navbar : public Gtk::Box
|
||||
{
|
||||
private:
|
||||
|
||||
navbar::Base * base;
|
||||
|
||||
public:
|
||||
|
||||
Navbar();
|
||||
|
20
src/app/browser/main/tab/data/navbar/base.cpp
Normal file
20
src/app/browser/main/tab/data/navbar/base.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include "base.hpp"
|
||||
|
||||
using namespace app::browser::main::tab::data::navbar;
|
||||
|
||||
Base::Base()
|
||||
{
|
||||
set_action_name(
|
||||
"tab.base"
|
||||
);
|
||||
|
||||
set_icon_name(
|
||||
"go-home-symbolic"
|
||||
);
|
||||
|
||||
set_tooltip_text(
|
||||
_("Base")
|
||||
);
|
||||
}
|
||||
|
||||
Base::~Base() = default;
|
19
src/app/browser/main/tab/data/navbar/base.hpp
Normal file
19
src/app/browser/main/tab/data/navbar/base.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BASE_HPP
|
||||
#define APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BASE_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
namespace app::browser::main::tab::data::navbar
|
||||
{
|
||||
class Base : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
|
||||
Base();
|
||||
|
||||
~Base();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_MAIN_TAB_DATA_NAVBAR_BASE_HPP
|
Loading…
x
Reference in New Issue
Block a user