2024-10-30 23:59:59 +08:00
|
|
|
#ifndef __HELLO_H__
|
|
|
|
#define __HELLO_H__
|
|
|
|
|
|
|
|
#include <Wt/WApplication.h>
|
|
|
|
|
2024-10-31 19:40:29 +08:00
|
|
|
class Session;
|
|
|
|
|
2024-10-30 23:59:59 +08:00
|
|
|
class Hello : public Wt::WApplication {
|
|
|
|
public:
|
2024-11-26 22:58:54 +08:00
|
|
|
Hello(const Wt::WEnvironment &env, bool embedded);
|
2024-10-31 19:40:29 +08:00
|
|
|
~Hello();
|
2024-10-30 23:59:59 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void greet();
|
2024-10-31 19:40:29 +08:00
|
|
|
void authEvent();
|
2024-11-19 19:23:08 +08:00
|
|
|
void handlePathChange(const std::string &path);
|
2024-10-30 23:59:59 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
Wt::WLineEdit *m_nameEdit = nullptr;
|
|
|
|
Wt::WText *m_greeting = nullptr;
|
2024-10-31 19:40:29 +08:00
|
|
|
std::unique_ptr<Session> m_session;
|
2024-11-19 19:23:08 +08:00
|
|
|
std::string m_externalPath;
|
2024-11-19 23:39:40 +08:00
|
|
|
|
|
|
|
Wt::WContainerWidget *m_root = nullptr;
|
2024-10-30 23:59:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __HELLO_H__
|