Browse Source

update namespaces

CPP-GTK4
yggverse 3 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()
{ {
// Init header bar // Init header bar
set_show_title_buttons( set_show_title_buttons(
true SHOW_TITLE_BUTTONS
); );
// Init menu // Init menu
menu = new header::Menu(); headerMenu = new header::Menu();
pack_start( pack_start(
* menu * headerMenu
); );
// Init tab // Init tab
tab = new header::Tab(); headerTab = new header::Tab();
pack_start( pack_start(
* tab * headerTab
); );
// Init main widget // Init main widget
main = new header::Main(); headerMain = new header::Main();
set_title_widget( set_title_widget(
* main * headerMain
); );
} }
Header::~Header() Header::~Header()
{ {
delete main; delete headerMain;
delete menu; delete headerMenu;
delete tab; delete headerTab;
} }
void Header::set_title( void Header::set_title(
const Glib::ustring text const Glib::ustring & VALUE
) { ) {
main->set_title( headerMain->set_title(
text VALUE
); );
} }
void Header::set_subtitle( void Header::set_subtitle(
const Glib::ustring text const Glib::ustring & VALUE
) { ) {
main->set_subtitle( headerMain->set_subtitle(
text VALUE
); );
} }

14
src/app/browser/header.hpp

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

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

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

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

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

Loading…
Cancel
Save