Browse Source

add page number argument

CPP-GTK4
yggverse 3 months ago
parent
commit
24ffe358c4
  1. 8
      src/app/browser/main.cpp
  2. 28
      src/app/browser/main/tab.cpp
  3. 9
      src/app/browser/main/tab.hpp

8
src/app/browser/main.cpp

@ -81,12 +81,16 @@ void Main::tab_close_all()
void Main::tab_history_back() void Main::tab_history_back()
{ {
mainTab->history_back(); mainTab->history_back(
mainTab->get_current_page()
);
}; };
void Main::tab_history_forward() void Main::tab_history_forward()
{ {
mainTab->history_forward(); mainTab->history_forward(
mainTab->get_current_page()
);
}; };
void Main::refresh() void Main::refresh()

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

@ -98,11 +98,31 @@ void Tab::close_all()
} }
} }
void Tab::history_back() void Tab::history_back(
{} // @TODO const int & PAGE_NUMBER
) {
auto tabPage = get_tabPage(
PAGE_NUMBER
);
void Tab::history_forward() // @TODO tabPage->back()
{} // @TODO
// Refresh children widgets
tabPage->refresh();
}
void Tab::history_forward(
const int & PAGE_NUMBER
) {
auto tabPage = get_tabPage(
PAGE_NUMBER
);
// @TODO tabPage->forward()
// Refresh children widgets
tabPage->refresh();
}
void Tab::refresh( void Tab::refresh(
const int & PAGE_NUMBER const int & PAGE_NUMBER

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

@ -54,8 +54,13 @@ namespace app::browser::main
void close_right(); void close_right();
void close_all(); void close_all();
void history_back(); void history_back(
void history_forward(); const int & PAGE_NUMBER
);
void history_forward(
const int & PAGE_NUMBER
);
void refresh( void refresh(
const int & PAGE_NUMBER const int & PAGE_NUMBER

Loading…
Cancel
Save