1 /* 2 * dxtabitem.h 3 * 4 * Copyright 2010 David Vachulka <arch_dvx@users.sourceforge.net> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * MA 02110-1301, USA. 20 */ 21 22 23 #ifndef DXTABITEM_H 24 #define DXTABITEM_H 25 26 #include "defs.h" 27 #include "dxtabbook.h" 28 #include "dxtextfield.h" 29 #include "fxext.h" 30 #ifndef DXTEXT_H 31 #include "dxtext.h" 32 #endif 33 34 class dxirc; 35 36 class dxTabItem: public dxEXTabItem 37 { 38 FXDECLARE(dxTabItem) 39 friend class dxirc; 40 public: 41 dxTabItem(dxTabBook *tab, const FXString &tabtext, FXIcon *icon=0, FXuint opts=TAB_TOP_NORMAL, FXint id=0); 42 virtual ~dxTabItem(); 43 createGeom()44 virtual void createGeom() {} clearChat()45 virtual void clearChat() {} hideUsers()46 virtual void hideUsers() {} showUsers()47 virtual void showUsers() {} getServerName()48 virtual FXString getServerName() { return ""; } getRealServerName()49 virtual FXString getRealServerName() { return ""; } getServerPort()50 virtual FXint getServerPort() { return 0; } getNickName()51 virtual FXString getNickName() { return "";} setType(const TYPE & typ,const FXString & tabtext)52 virtual void setType(const TYPE &typ, const FXString &tabtext) {} getType()53 virtual TYPE getType() { return OTHER; } getID()54 FXint getID() { return m_id; } reparentTab()55 virtual void reparentTab() {} preferencesUpdated()56 virtual void preferencesUpdated() {} setIrcFont(FXFont *)57 virtual void setIrcFont(FXFont*) {} setCommandFocus()58 virtual void setCommandFocus() {} setSmileys(FXbool smiley,dxSmileyArray nsmileys)59 virtual void setSmileys(FXbool smiley, dxSmileyArray nsmileys) {} showSpellComboUpdated()60 virtual void showSpellComboUpdated() {} removeSmileys()61 virtual void removeSmileys() {} makeLastRowVisible()62 virtual void makeLastRowVisible() {} getSpellLang()63 virtual FXString getSpellLang() {return ""; } 64 65 long onTextLink(FXObject *, FXSelector, void *); 66 long onTextRightMouse(FXObject *, FXSelector, void *); 67 long onTextMiddleMouse(FXObject *, FXSelector, void *); 68 long onOpenLink(FXObject *, FXSelector, void *); 69 long onCopyLink(FXObject *, FXSelector, void *); 70 long onClipboardRequest(FXObject *, FXSelector, void *); 71 protected: dxTabItem()72 dxTabItem():m_text(NULL),m_id(-1) 73 {} 74 75 dxText *m_text; 76 FXString m_link; 77 78 virtual void appendText(FXString msg, FXbool highlight, FXbool logLine=TRUE) {} 79 virtual void appendStyledText(FXString text, FXint style, FXbool highlight, FXbool disableStrip=FALSE, FXbool logLine=TRUE) {} processLine(const FXString &)80 virtual FXbool processLine(const FXString &) { return FALSE; } setHasAllCommand(FXbool)81 virtual void setHasAllCommand(FXbool) {} setHasOwnMsg(FXbool)82 virtual void setHasOwnMsg(FXbool) {} 83 84 private: 85 FXint m_id; 86 }; 87 88 #endif // DXTABITEM_H 89