blob: ca2e01b1aa6e640b42d6c3f237d1b6b96826b9fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*
* PreviewView.h
*
* Created on: Jan 21, 2012
* Author: Simon
*/
#ifndef PREVIEWVIEW_H_
#define PREVIEWVIEW_H_
#include <vector>
#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::Textblock * saveDescriptionTextblock;
std::vector<ui::Component*> commentComponents;
std::vector<ui::Component*> commentTextComponents;
int votesUp;
int votesDown;
public:
void AttachController(PreviewController * controller) { c = controller;}
PreviewView();
void NotifyPreviewChanged(PreviewModel * sender);
void NotifySaveChanged(PreviewModel * sender);
void NotifyCommentsChanged(PreviewModel * sender);
virtual void OnDraw();
virtual void OnTick(float dt);
virtual void OnMouseDown(int x, int y, unsigned button);
virtual ~PreviewView();
};
#endif /* PREVIEWVIEW_H_ */
|