blob: 83a64c2fc54c1115dd615c4eeba64233328a6d66 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#ifndef SEARCHVIEW_H
#define SEARCHVIEW_H
#include <vector>
#include "SearchController.h"
#include "interface/SaveButton.h"
#include "interface/Button.h"
#include "interface/Label.h"
#include "interface/Spinner.h"
#include "interface/Textbox.h"
#include "client/ClientListener.h"
using namespace std;
class SearchModel;
class SearchController;
class SearchView: public ui::Window, public ClientListener
{
private:
SearchController * c;
vector<ui::SaveButton*> saveButtons;
vector<ui::Button*> tagButtons;
ui::Button * favButton;
ui::Button * nextButton;
ui::Button * previousButton;
ui::Label * errorLabel;
ui::Textbox * searchField;
ui::Label * infoLabel;
ui::Label * tagsLabel;
ui::Button * sortButton;
ui::Button * ownButton;
ui::Spinner * loadingSpinner;
ui::Button * removeSelected;
ui::Button * unpublishSelected;
ui::Button * favouriteSelected;
ui::Button * clearSelection;
void clearSearch();
void doSearch();
public:
void NotifySaveListChanged(SearchModel * sender);
void NotifySelectedChanged(SearchModel * sender);
void NotifyPageChanged(SearchModel * sender);
void NotifySortChanged(SearchModel * sender);
void NotifyShowOwnChanged(SearchModel * sender);
void NotifyShowFavouriteChanged(SearchModel * sender);
void NotifyAuthUserChanged(Client * sender);
void CheckAccess();
virtual void OnTryOkay(OkayMethod method);
SearchView();
virtual ~SearchView();
void AttachController(SearchController * _c) { c = _c; }
virtual void Search(std::string);
virtual void OnTick(float dt);
virtual void OnMouseWheel(int x, int y, int d);
virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
};
#endif // SEARCHVIEW_H
|