add remote page loading
This commit is contained in:
23
src/node_remote_page.h
Normal file
23
src/node_remote_page.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include "node_border.h"
|
||||
|
||||
class NodeRemotePage : public NodeBorder
|
||||
{
|
||||
class NodeScroll* m_content;
|
||||
class NodeText* m_title;
|
||||
bool m_loading;
|
||||
std::string m_url;
|
||||
public:
|
||||
bool m_loaded;
|
||||
int m_page_id;
|
||||
virtual Node* clone_instantiate() const override;
|
||||
virtual void clone_copy(Node* dest) const override;
|
||||
virtual void init() override;
|
||||
void init_controls();
|
||||
std::future<bool> load_url(const std::string& url,
|
||||
std::function<void(bool success)> on_complete = nullptr) noexcept;
|
||||
void reload() noexcept;
|
||||
void set_title(const std::string& title);
|
||||
void add_button(const std::string& label, int width,
|
||||
std::function<void(Node* target)> onclic = nullptr) noexcept;
|
||||
};
|
||||
Reference in New Issue
Block a user