mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:27:35 +00:00
Browser: Add context menu with history for back/forward button
Right clicking on back or forward will now show a context menu with URLs to navigate to. Also added an optional argument for the number of steps in go_back() and go_forward().
This commit is contained in:
parent
0688e02339
commit
6b85c7647c
4 changed files with 68 additions and 20 deletions
|
@ -17,13 +17,14 @@ public:
|
|||
|
||||
void push(const URL&);
|
||||
URL current() const;
|
||||
const Vector<URL> get_back_history();
|
||||
const Vector<URL> get_forward_history();
|
||||
|
||||
void go_back();
|
||||
void go_forward();
|
||||
|
||||
bool can_go_back() { return m_current > 0; }
|
||||
bool can_go_forward() { return m_current + 1 < static_cast<int>(m_items.size()); }
|
||||
void go_back(int steps = 1);
|
||||
void go_forward(int steps = 1);
|
||||
|
||||
bool can_go_back(int steps = 1) { return (m_current - steps) >= 0; }
|
||||
bool can_go_forward(int steps = 1) { return (m_current + steps) < static_cast<int>(m_items.size()); }
|
||||
void clear();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue