Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: b6c95c73215369e767f64432a33dd4b4f37e2711 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
   client/reputationwindow.h
   This file is part of the Osirion project and is distributed under
   the terms of the GNU General Public License version 2
*/

#ifndef __INCLUDED_CLIENT_REPUTATIONWINDOW_H__
#define __INCLUDED_CLIENT_REPUTATIONWINDOW_H__

#include "ui/button.h"
#include "ui/iconbutton.h"
#include "ui/listview.h"
#include "ui/scrollpane.h"
#include "ui/slider.h"
#include "ui/plaintext.h"
#include "ui/window.h"

namespace client {

/**
 * @brief a player reputation window
 */
class ReputationWindow : public ui::Window
{
public:
	/**
	 * @brief constructor
	 * */
	ReputationWindow(ui::Widget *parent = 0);
	
	/**
	 * @brief destructor
	 * */
	~ReputationWindow();

	/**
	 * @brief show the window
	 * Showing the reputation window will refrish its content
	 * */
	virtual void show();
	
protected:
	/**
	 * @brief draw event handler
	 * */
	virtual void draw();
	
	/**
	 * @brief resize event handler
	 * */
	virtual void resize();
	
	/**
	 * @brief emit event handler
	 * */
	virtual bool on_emit(ui::Widget *sender, const Event event, void *data);
	
	/**
	 * @brief keypress event handler
	 * */
	virtual bool on_keypress(const int key, const unsigned int modifier);
	
private:
	/**
	 * @brief refresh window content
	 * */
	void refresh();
	
	void set_info(const core::Info *info = 0);
	
	ui::Text		reputationwindow_infotext;

	ui::Label		*reputationwindow_titlelabel;
	ui::Label		*reputationwindow_targetlabel;
	ui::IconButton		*reputationwindow_closebutton;
	ui::ListView		*reputationwindow_listview;
	ui::ScrollPane		*reputationwindow_scrollpane;
	
	ui::Widget		*reputationwindow_pane_right;
	
	const core::Info	*reputationwindow_info;
	
	unsigned long		reputationwindow_timestamp;
	
}; // class ReputationWindow

} // namespace client

#endif // __INCLUDED_CLIENT_REPUTATIONWINDOW_H__