File: mainframe.h

package info (click to toggle)
clanlib 1.0~svn3827-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 24,600 kB
  • sloc: cpp: 101,591; xml: 6,410; makefile: 1,743; ansic: 463; perl: 424; php: 247; sh: 53
file content (69 lines) | stat: -rw-r--r-- 1,078 bytes parent folder | download | duplicates (7)
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

#ifndef file_mainframe
#define file_mainframe

#include <vector>

class Document;
class View;
class IRCConnection;
class CL_Button;

class MainFrame : public CL_Frame
{
//! Construction:
public:
	MainFrame(CL_Component *parent, CL_ResourceManager *resources);

	~MainFrame();

//! Attributes:
public:
	Document *get_document();

	int get_num_views();

	View *get_view(int index);

	View *get_active_view();

	CL_Rect get_view_area();

	CL_ResourceManager *get_resources();

//! Operations:
public:
	void set_active_view(View *view);

	void set_active_view(int index);

	void add_view(View *view);

	void remove_view(View *view);

	int find_view_index(View *view);

//! Implementation:
private:
	void arrange_buttons();

	void on_paint();

	void on_view_button_clicked(View *view);

	void on_connection_join(const std::string &nick, const std::string &channel, IRCConnection *connection);

	CL_ResourceManager *resources;

	CL_Frame *view_area;

	Document *document;

	std::vector< std::pair<CL_Button *, View *> > views;

	int active_view;

	CL_SlotContainer slots;
};

#endif