From 3892d0da37e70a6c0106e57dad835e9a67933b02 Mon Sep 17 00:00:00 2001 From: pescuma Date: Thu, 23 Apr 2009 04:31:27 +0000 Subject: extraicons: start of group code git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@168 c086bb3d-8645-0410-b8da-73a8550f86e7 --- Plugins/extraicons/BaseExtraIcon.cpp | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Plugins/extraicons/BaseExtraIcon.cpp (limited to 'Plugins/extraicons/BaseExtraIcon.cpp') 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); +} + -- cgit v1.2.3