1 /* gobby - A GTKmm driven libobby client
2  * Copyright (C) 2005, 2006 0x539 dev group
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public
15  * License along with this program; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 #ifndef _GOBBY_STATUSBAR_HPP_
20 #define _GOBBY_STATUSBAR_HPP_
21 
22 #include <glibmm/ustring.h>
23 #include <gtkmm/box.h>
24 #include <gtkmm/label.h>
25 #include <gtkmm/frame.h>
26 #include <gtkmm/statusbar.h>
27 #include <obby/user.hpp>
28 #include "document.hpp"
29 #include "buffer_def.hpp"
30 #include "header.hpp"
31 #include "folder.hpp"
32 
33 namespace Gobby
34 {
35 
36 class StatusBar: public Gtk::Statusbar
37 {
38 public:
39 	StatusBar(Header& header, const Folder& folder);
40 
41 	void update_language(DocWindow& wnd);
42 	void update_cursor(DocWindow& wnd);
43 	void update_from_document(DocWindow& wnd);
44 
45 	void update_connection(const Glib::ustring& str);
46 
47 	// Calls from the window
48 	void obby_start(LocalBuffer& buf);
49 	void obby_end();
50 	void obby_user_join(const obby::user& user);
51 	void obby_user_part(const obby::user& user);
52 	void obby_document_insert(LocalDocumentInfo& document);
53 	void obby_document_remove(LocalDocumentInfo& document);
54 
55 	virtual void on_show();
56 
57 protected:
58 	Header& m_header;
59 
60 	Gtk::Statusbar m_bar_language;
61 	Gtk::Statusbar m_bar_position;
62 };
63 
64 }
65 
66 #endif // _GOBBY_STATUSBAR_HPP_
67