/* * PreviewView.h * * Created on: Jan 21, 2012 * Author: Simon */ #ifndef PREVIEWVIEW_H_ #define PREVIEWVIEW_H_ #include #include "Comment.h" #include "interface/Window.h" #include "preview/PreviewController.h" #include "preview/PreviewModel.h" #include "interface/Button.h" #include "search/Thumbnail.h" #include "interface/Label.h" #include "interface/Textblock.h" class PreviewModel; class PreviewController; class PreviewView: public ui::Window { PreviewController * c; Thumbnail * savePreview; ui::Button * openButton; ui::Button * browserOpenButton; ui::Button * favButton; ui::Button * reportButton; ui::Label * saveNameLabel; ui::Label * authorDateLabel; ui::Label * pageInfo; ui::Textblock * saveDescriptionTextblock; std::vector comments; std::vector commentComponents; std::vector commentTextComponents; int votesUp; int votesDown; bool doOpen; bool commentsEnd; bool commentsBegin; int maxOffset; float commentsOffset; float commentsVel; void displayComments(int yOffset); public: void AttachController(PreviewController * controller) { c = controller;} PreviewView(); void NotifySaveChanged(PreviewModel * sender); void NotifyCommentsChanged(PreviewModel * sender); void NotifyCommentsPageChanged(PreviewModel * sender); virtual void OnDraw(); virtual void DoDraw(); virtual void OnTick(float dt); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseWheel(int x, int y, int d); virtual ~PreviewView(); }; #endif /* PREVIEWVIEW_H_ */