Browse Source

update namespaces

CPP-GTK4
yggverse 2 months ago
parent
commit
fb71cfa2be
  1. 32
      src/app/browser/header.cpp
  2. 14
      src/app/browser/header.hpp
  3. 8
      src/app/browser/header/main.cpp
  4. 4
      src/app/browser/header/main.hpp

32
src/app/browser/header.cpp

@ -9,50 +9,50 @@ Header::Header() @@ -9,50 +9,50 @@ Header::Header()
{
// Init header bar
set_show_title_buttons(
true
SHOW_TITLE_BUTTONS
);
// Init menu
menu = new header::Menu();
headerMenu = new header::Menu();
pack_start(
* menu
* headerMenu
);
// Init tab
tab = new header::Tab();
headerTab = new header::Tab();
pack_start(
* tab
* headerTab
);
// Init main widget
main = new header::Main();
headerMain = new header::Main();
set_title_widget(
* main
* headerMain
);
}
Header::~Header()
{
delete main;
delete menu;
delete tab;
delete headerMain;
delete headerMenu;
delete headerTab;
}
void Header::set_title(
const Glib::ustring text
const Glib::ustring & VALUE
) {
main->set_title(
text
headerMain->set_title(
VALUE
);
}
void Header::set_subtitle(
const Glib::ustring text
const Glib::ustring & VALUE
) {
main->set_subtitle(
text
headerMain->set_subtitle(
VALUE
);
}

14
src/app/browser/header.hpp

@ -15,9 +15,13 @@ namespace app::browser @@ -15,9 +15,13 @@ namespace app::browser
class Header : public Gtk::HeaderBar
{
app::browser::header::Main * main;
app::browser::header::Menu * menu;
app::browser::header::Tab * tab;
// Components
header::Main * headerMain;
header::Menu * headerMenu;
header::Tab * headerTab;
// Defaults
const bool SHOW_TITLE_BUTTONS = true;
public:
@ -26,11 +30,11 @@ namespace app::browser @@ -26,11 +30,11 @@ namespace app::browser
~Header();
void set_title(
const Glib::ustring text
const Glib::ustring & VALUE
);
void set_subtitle(
const Glib::ustring text
const Glib::ustring & VALUE
);
};
}

8
src/app/browser/header/main.cpp

@ -36,17 +36,17 @@ Main::~Main() @@ -36,17 +36,17 @@ Main::~Main()
}
void Main::set_title(
const Glib::ustring & TEXT
const Glib::ustring & VALUE
) {
mainTitle->set(
TEXT
VALUE
);
}
void Main::set_subtitle(
const Glib::ustring & TEXT
const Glib::ustring & VALUE
) {
mainSubtitle->set(
TEXT
VALUE
);
}

4
src/app/browser/header/main.hpp

@ -26,11 +26,11 @@ namespace app::browser::header @@ -26,11 +26,11 @@ namespace app::browser::header
~Main();
void set_title(
const Glib::ustring & TEXT
const Glib::ustring & VALUE
);
void set_subtitle(
const Glib::ustring & TEXT
const Glib::ustring & VALUE
);
};
}

Loading…
Cancel
Save