summaryrefslogtreecommitdiff
path: root/src/search/SearchView.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-11-17 19:44:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-11-17 19:44:09 (GMT)
commit058a2edd75debbd0297f92572316daa704bd379f (patch)
treead303f091f9a08b209b91eb34a9fcad996a3de69 /src/search/SearchView.h
parente3594aba9e05c6865d396418c028049cda92c2f3 (diff)
parent7a21ae192fe19868539956f3fe28e62b2c7c4429 (diff)
downloadpowder-058a2edd75debbd0297f92572316daa704bd379f.zip
powder-058a2edd75debbd0297f92572316daa704bd379f.tar.gz
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/search/SearchView.h')
-rw-r--r--src/search/SearchView.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/search/SearchView.h b/src/search/SearchView.h
new file mode 100644
index 0000000..05ecde2
--- /dev/null
+++ b/src/search/SearchView.h
@@ -0,0 +1,74 @@
+#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;
+
+namespace ui
+{
+ class RichLabel;
+ class SaveButton;
+ class Button;
+ class Label;
+ class Spinner;
+ class Textbox;
+}
+
+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::RichLabel * motdLabel;
+ 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 NotifyTagListChanged(SearchModel * sender);
+ 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 NotifyMessageOfTheDay(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