Browse Source

reorder methods

CPP-GTK4
yggverse 3 months ago
parent
commit
946211167b
  1. 30
      src/app/browser/main.cpp
  2. 8
      src/app/browser/main.hpp
  3. 26
      src/app/browser/main/tab.cpp
  4. 18
      src/app/browser/main/tab.hpp
  5. 22
      src/app/browser/main/tab/page.cpp
  6. 8
      src/app/browser/main/tab/page.hpp

30
src/app/browser/main.cpp

@ -22,21 +22,6 @@ Main::Main() @@ -22,21 +22,6 @@ Main::Main()
);
}
// Getters
Glib::ustring Main::get_current_tab_page_title()
{
return mainTab->get_page_title(
mainTab->get_current_page()
);
};
Glib::ustring Main::get_current_tab_page_subtitle()
{
return mainTab->get_page_subtitle(
mainTab->get_current_page()
);
};
// Actions
void Main::refresh()
{
@ -93,3 +78,18 @@ void Main::tab_page_navigation_history_forward() @@ -93,3 +78,18 @@ void Main::tab_page_navigation_history_forward()
mainTab->get_current_page() // @TODO
);
};
// Getters
Glib::ustring Main::get_current_tab_page_title()
{
return mainTab->get_page_title(
mainTab->get_current_page()
);
};
Glib::ustring Main::get_current_tab_page_subtitle()
{
return mainTab->get_page_subtitle(
mainTab->get_current_page()
);
};

8
src/app/browser/main.hpp

@ -25,10 +25,6 @@ namespace app::browser @@ -25,10 +25,6 @@ namespace app::browser
Main();
// Getters
Glib::ustring get_current_tab_page_title();
Glib::ustring get_current_tab_page_subtitle();
// Actions
void refresh();
@ -41,6 +37,10 @@ namespace app::browser @@ -41,6 +37,10 @@ namespace app::browser
void tab_page_navigation_update();
void tab_page_navigation_history_back();
void tab_page_navigation_history_forward();
// Getters
Glib::ustring get_current_tab_page_title();
Glib::ustring get_current_tab_page_subtitle();
};
}

26
src/app/browser/main/tab.cpp

@ -23,19 +23,6 @@ Tab::Tab() @@ -23,19 +23,6 @@ Tab::Tab()
);
}
// Getters
Glib::ustring Tab::get_page_title(
const int & PAGE_NUMBER
) {
return get_tabPage(PAGE_NUMBER)->get_title();
};
Glib::ustring Tab::get_page_subtitle(
const int & PAGE_NUMBER
) {
return get_tabPage(PAGE_NUMBER)->get_subtitle();
};
// Actions
void Tab::refresh(
const int & PAGE_NUMBER
@ -134,6 +121,19 @@ void Tab::page_navigation_history_forward( @@ -134,6 +121,19 @@ void Tab::page_navigation_history_forward(
)->navigation_history_forward();
}
// Getters
Glib::ustring Tab::get_page_title(
const int & PAGE_NUMBER
) {
return get_tabPage(PAGE_NUMBER)->get_title();
};
Glib::ustring Tab::get_page_subtitle(
const int & PAGE_NUMBER
) {
return get_tabPage(PAGE_NUMBER)->get_subtitle();
};
// Private helpers
tab::Label * Tab::get_tabLabel(
const int & PAGE_NUMBER

18
src/app/browser/main/tab.hpp

@ -30,15 +30,6 @@ namespace app::browser::main @@ -30,15 +30,6 @@ namespace app::browser::main
Tab();
// Getters
Glib::ustring get_page_title(
const int & PAGE_NUMBER
);
Glib::ustring get_page_subtitle(
const int & PAGE_NUMBER
);
// Actions
void refresh(
const int & PAGE_NUMBER // @TODO
@ -70,6 +61,15 @@ namespace app::browser::main @@ -70,6 +61,15 @@ namespace app::browser::main
void page_navigation_history_forward(
const int & PAGE_NUMBER
);
// Getters
Glib::ustring get_page_title(
const int & PAGE_NUMBER
);
Glib::ustring get_page_subtitle(
const int & PAGE_NUMBER
);
};
}

22
src/app/browser/main/tab/page.cpp

@ -44,17 +44,6 @@ Page::Page( @@ -44,17 +44,6 @@ Page::Page(
);
}
// Getters
Glib::ustring Page::get_title()
{
return title;
}
Glib::ustring Page::get_subtitle()
{
return subtitle;
}
// Actions
void Page::refresh(
const Glib::ustring & TITLE,
@ -274,3 +263,14 @@ void Page::navigation_history_forward() @@ -274,3 +263,14 @@ void Page::navigation_history_forward()
);
}
}
// Getters
Glib::ustring Page::get_title()
{
return title;
}
Glib::ustring Page::get_subtitle()
{
return subtitle;
}

8
src/app/browser/main/tab/page.hpp

@ -48,10 +48,6 @@ namespace app::browser::main::tab @@ -48,10 +48,6 @@ namespace app::browser::main::tab
const Glib::ustring & REQUEST = ""
);
// Getters
Glib::ustring get_title();
Glib::ustring get_subtitle();
// Actions
void refresh(
const Glib::ustring & TITLE,
@ -65,6 +61,10 @@ namespace app::browser::main::tab @@ -65,6 +61,10 @@ namespace app::browser::main::tab
void navigation_history_back();
void navigation_history_forward();
// Getters
Glib::ustring get_title();
Glib::ustring get_subtitle();
};
}

Loading…
Cancel
Save