00001
00013 #ifndef _CHANNELGUI
00014 #define _CHANNELGUI
00015
00016 #include <wx/tokenzr.h>
00017 #include <wx/listbox.h>
00018 #include "TerminalGui.h"
00019
00021
00023
00024 #define LISTWIDTH 120
00025
00026 class ChannelGui : public TerminalGui
00027 {
00028 public:
00029 ChannelGui(Connessione* connection,
00030 PARENT_FRAME* parent,
00031 wxWindowID id = -1,
00032 const wxString& title = _("Channel"),
00033 const wxPoint& position = wxDefaultPosition,
00034 const wxSize& size = wxDefaultSize,
00035 long style = GUI_STYLE,
00036 const wxString& name = _("Quirck Channel"));
00037 void receiveMsg(wxString message, wxTextAttr style = STYLE_DEFAULT);
00038 bool IsActive();
00039 void SetActive();
00040
00041 private:
00042 wxListBox* userlist;
00043 void SetLayout();
00044
00045
00046
00047 DECLARE_EVENT_TABLE()
00048
00049
00055 void OnDoubleClick(wxCommandEvent& event);
00056 void ChannelGuiClose(wxCloseEvent& event);
00057
00059
00061
00062 public:
00072 void setNickList(wxString);
00073 void addUser(wxString);
00074 void removeUser(wxString);
00075
00089 bool changeNick(wxString, wxString);
00090
00099 void opUser(wxString);
00100 void deopUser(wxString);
00101 void voiceUser(wxString);
00102 void devoiceUser(wxString);
00103 void halfopUser(wxString);
00104 void dehalfopUser(wxString);
00105
00114 wxString getTopic();
00115 void setTopic(wxString);
00116
00132 void setModes(wxString);
00133 wxString getModes();
00134 bool getMode(int);
00135
00136 protected:
00148 char modes[8];
00149 wxString Topic;
00150 bool active;
00151 };
00152
00153 enum
00154 {
00155 USERLIST
00156 };
00157
00158 #endif
00159