5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2001 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 Code is mostly ripped from Gabber, thus code also copyrighted by:
19 Copyright (C) 1999-2001 Dave Smith & Julian Missig
22 #ifndef SILCERCHATVIEW_HH
23 #define SILCERCHATVIEW_HH
29 #include <gtk/gtkframe.h>
30 #include <gtk/gtkvscrollbar.h>
31 #include <gtk--/container.h>
32 #include <gtk--/paned.h>
33 #include <gtk--/widget.h>
35 typedef const string COLOR_T;
37 COLOR_T BLACK = "\0030";
38 COLOR_T WHITE = "\0031";
39 COLOR_T BLUE = "\0032";
40 COLOR_T GREEN = "\0033";
41 COLOR_T RED = "\0034";
42 COLOR_T YELLOWBROWN = "\0035";
43 COLOR_T PURPLE = "\0036";
44 COLOR_T ORANGE = "\0037";
45 COLOR_T YELLOW = "\0038";
46 COLOR_T GREEN2 = "\0039";
47 COLOR_T AQUA = "\00310";
48 COLOR_T LIGHTAQUA = "\00311";
49 COLOR_T BLUE2 = "\00312";
50 COLOR_T PINK = "\00313";
51 COLOR_T GREY = "\00314";
52 COLOR_T LIGHTGREY = "\00315";
53 COLOR_T BLUEMARKBACK= "\00316";
54 COLOR_T WHITEMARKFORE= "\00317";
55 COLOR_T WHITEFORE = "\00318";
56 COLOR_T BLACKBACK = "\00319";
62 SilcerChatView(Gtk::Widget *owner, Gtk::Container *parent,
63 gboolean indent = true);
64 SilcerChatView(Gtk::Widget *owner, Gtk::Paned *parent,
65 gboolean indent = true);
67 void render(const string &message, const string &username,
68 const string ×tamp, COLOR_T &delimiter_color);
69 void render_error(const string &message, const string &error,
70 const string ×tamp, COLOR_T &delimiter_color);
75 GtkVScrollbar *_vsChat;
78 void print(const string &s);
79 void print(const string &left, const string &right);
80 void on_word_clicked(char* word, GdkEventButton *evt);
81 static void _on_word_clicked_stub(GtkXText *xtext, char *word,
83 SilcerChatView *_this);
86 #endif /* SILCERCHATVIEW_HH */