Older/WebApplication/view/CommentView.h

27 lines
591 B
C
Raw Normal View History

2024-11-02 00:30:14 +08:00
#ifndef __COMMENTVIEW_H__
#define __COMMENTVIEW_H__
#include <Wt/Dbo/ptr.h>
#include <Wt/WTemplate.h>
class BlogSession;
class Comment;
class CommentView : public Wt::WTemplate {
public:
CommentView(BlogSession &session, long long parentId);
CommentView(BlogSession& session, Wt::Dbo::ptr<Comment> comment);
protected:
void edit();
void save();
void cancel();
void renderView();
bool isNew() const;
void reply();
void rm();
private:
BlogSession &session_;
Wt::Dbo::ptr<Comment> comment_;
Wt::WTextArea *editArea_;
};
#endif // __COMMENTVIEW_H__