Browse Source

implement set_title method

CPP-GTK4
yggverse 3 months ago
parent
commit
98a572a1c0
  1. 10
      src/app/browser/header.cpp
  2. 5
      src/app/browser/header.hpp
  3. 8
      src/app/browser/header/main.cpp
  4. 5
      src/app/browser/header/main.hpp

10
src/app/browser/header.cpp

@ -36,7 +36,15 @@ Header::Header()
Header::~Header() Header::~Header()
{ {
delete main;
delete menu; delete menu;
delete tab; delete tab;
delete main; }
void Header::set_title(
const Glib::ustring text
) {
main->set_title(
text
);
} }

5
src/app/browser/header.hpp

@ -1,6 +1,7 @@
#ifndef APP_BROWSER_HEADER_HPP #ifndef APP_BROWSER_HEADER_HPP
#define APP_BROWSER_HEADER_HPP #define APP_BROWSER_HEADER_HPP
#include <glibmm/ustring.h>
#include <gtkmm/headerbar.h> #include <gtkmm/headerbar.h>
namespace app::browser namespace app::browser
@ -23,6 +24,10 @@ namespace app::browser
Header(); Header();
~Header(); ~Header();
void set_title(
const Glib::ustring text
);
}; };
} }

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

@ -22,3 +22,11 @@ Main::~Main()
{ {
delete title; delete title;
} }
void Main::set_title(
const Glib::ustring text
) {
title->set_text(
text
);
}

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

@ -1,6 +1,7 @@
#ifndef APP_BROWSER_HEADER_MAIN_HPP #ifndef APP_BROWSER_HEADER_MAIN_HPP
#define APP_BROWSER_HEADER_MAIN_HPP #define APP_BROWSER_HEADER_MAIN_HPP
#include <glibmm/ustring.h>
#include <gtkmm/box.h> #include <gtkmm/box.h>
namespace app::browser::header namespace app::browser::header
@ -19,6 +20,10 @@ namespace app::browser::header
Main(); Main();
~Main(); ~Main();
void set_title(
const Glib::ustring text
);
}; };
} }

Loading…
Cancel
Save