|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A history of routes: a browser's session history, or a test's. More...
#include <route_history.hpp>
Public Member Functions | |
| IHistory (IHistory const &)=delete | |
| IHistory & | operator= (IHistory const &)=delete |
| IHistory (IHistory &&)=delete | |
| IHistory & | operator= (IHistory &&)=delete |
| virtual std::string | current () const =0 |
| The route the current entry holds. | |
| virtual void | push (std::string const &route)=0 |
| Adds an entry after the current one, dropping any entries forward of it, and makes it current. | |
| virtual void | replace (std::string const &route)=0 |
| Replaces the route the current entry holds. | |
| virtual void | onPop (std::function< void(std::string const &route)> popped)=0 |
| Sets what is called when the current entry changes from outside: back, forward, or an address the user edited. Replaces the previous callback; an empty one stops the calls. | |
A history of routes: a browser's session history, or a test's.
Definition at line 19 of file route_history.hpp.
|
nodiscardpure virtual |
The route the current entry holds.
Implemented in morph::ui::testing::MemoryHistory.
|
pure virtual |
Adds an entry after the current one, dropping any entries forward of it, and makes it current.
| route | The route it holds. |
Implemented in morph::ui::testing::MemoryHistory.
|
pure virtual |
Replaces the route the current entry holds.
| route | The route. |
Implemented in morph::ui::testing::MemoryHistory.
|
pure virtual |
Sets what is called when the current entry changes from outside: back, forward, or an address the user edited. Replaces the previous callback; an empty one stops the calls.
| popped | Called with the new current entry's route, empty when it holds none. |
Implemented in morph::ui::testing::MemoryHistory.