mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
init main header widget
This commit is contained in:
parent
fac548a738
commit
a98e9e088a
8 changed files with 102 additions and 0 deletions
24
src/app/browser/header/main.cpp
Normal file
24
src/app/browser/header/main.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "main.hpp"
|
||||
#include "main/title.hpp"
|
||||
|
||||
using namespace app::browser::header;
|
||||
|
||||
Main::Main()
|
||||
{
|
||||
// Init container
|
||||
set_orientation(
|
||||
Gtk::Orientation::VERTICAL
|
||||
);
|
||||
|
||||
// Init title
|
||||
title = new main::Title();
|
||||
|
||||
append(
|
||||
* title
|
||||
);
|
||||
}
|
||||
|
||||
Main::~Main()
|
||||
{
|
||||
delete title;
|
||||
}
|
||||
25
src/app/browser/header/main.hpp
Normal file
25
src/app/browser/header/main.hpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef APP_BROWSER_HEADER_MAIN_HPP
|
||||
#define APP_BROWSER_HEADER_MAIN_HPP
|
||||
|
||||
#include <gtkmm/box.h>
|
||||
|
||||
namespace app::browser::header
|
||||
{
|
||||
namespace main
|
||||
{
|
||||
class Title;
|
||||
}
|
||||
|
||||
class Main : public Gtk::Box
|
||||
{
|
||||
main::Title * title;
|
||||
|
||||
public:
|
||||
|
||||
Main();
|
||||
|
||||
~Main();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_HEADER_MAIN_HPP
|
||||
10
src/app/browser/header/main/title.cpp
Normal file
10
src/app/browser/header/main/title.cpp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#include "title.hpp"
|
||||
|
||||
using namespace app::browser::header::main;
|
||||
|
||||
Title::Title()
|
||||
{
|
||||
// @TODO
|
||||
}
|
||||
|
||||
Title::~Title() = default;
|
||||
28
src/app/browser/header/main/title.hpp
Normal file
28
src/app/browser/header/main/title.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef APP_BROWSER_HEADER_MAIN_TITLE_HPP
|
||||
#define APP_BROWSER_HEADER_MAIN_TITLE_HPP
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
#include <glibmm/ustring.h>
|
||||
#include <gtkmm/label.h>
|
||||
|
||||
namespace app::browser::header::main
|
||||
{
|
||||
class Title : public Gtk::Label
|
||||
{
|
||||
public:
|
||||
|
||||
Title();
|
||||
|
||||
~Title();
|
||||
|
||||
void set_title(
|
||||
Glib::ustring $value
|
||||
);
|
||||
|
||||
void set_subtitle(
|
||||
Glib::ustring $value
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // APP_BROWSER_HEADER_MAIN_TITLE_HPP
|
||||
Loading…
Add table
Add a link
Reference in a new issue