diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-04-23 04:31:27 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-04-23 04:31:27 +0000 |
commit | 3892d0da37e70a6c0106e57dad835e9a67933b02 (patch) | |
tree | 4ae8600d4eb5acce08a42b68d1d218c4e47153cc /Plugins/extraicons/BaseExtraIcon.cpp | |
parent | d27127d44576580e3a0000590b6179f06cc67b8e (diff) |
extraicons: start of group code
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@168 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/extraicons/BaseExtraIcon.cpp')
-rw-r--r-- | Plugins/extraicons/BaseExtraIcon.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Plugins/extraicons/BaseExtraIcon.cpp b/Plugins/extraicons/BaseExtraIcon.cpp new file mode 100644 index 0000000..54a8a2b --- /dev/null +++ b/Plugins/extraicons/BaseExtraIcon.cpp @@ -0,0 +1,59 @@ +/*
+ Copyright (C) 2009 Ricardo Pescuma Domenecci
+
+ This is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this file; see the file license.txt. If
+ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+ */
+
+#include "commons.h"
+
+BaseExtraIcon::BaseExtraIcon(int id, const char *name, const char *description, const char *descIcon,
+ MIRANDAHOOKPARAM OnClick, LPARAM param) :
+ ExtraIcon(id, name), description(description), descIcon(descIcon), OnClick(OnClick), onClickParam(param)
+{
+}
+
+BaseExtraIcon::~BaseExtraIcon()
+{
+}
+
+const char *BaseExtraIcon::getDescription() const
+{
+ return description.c_str();
+}
+
+void BaseExtraIcon::setDescription(const char *desc)
+{
+ description = desc;
+}
+
+const char *BaseExtraIcon::getDescIcon() const
+{
+ return descIcon.c_str();
+}
+
+void BaseExtraIcon::setDescIcon(const char *icon)
+{
+ descIcon = icon;
+}
+
+void BaseExtraIcon::onClick(HANDLE hContact)
+{
+ if (OnClick == NULL)
+ return;
+
+ OnClick((WPARAM) hContact, (LPARAM) ConvertToClistSlot(slot), onClickParam);
+}
+
|