From 95d83b736560df015c7dda58edff8a2fd3a1bc14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 19 May 2013 12:04:30 +0000 Subject: YAPP: forgotten icons git-svn-id: http://svn.miranda-ng.org/main/trunk@4727 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAPP/src/icons.cpp | 30 ++++++++++++++++++++++++++++++ plugins/YAPP/src/icons.h | 17 +++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 plugins/YAPP/src/icons.cpp create mode 100644 plugins/YAPP/src/icons.h diff --git a/plugins/YAPP/src/icons.cpp b/plugins/YAPP/src/icons.cpp new file mode 100644 index 0000000000..97a4290406 --- /dev/null +++ b/plugins/YAPP/src/icons.cpp @@ -0,0 +1,30 @@ +#include "common.h" + +static IconItem iconList[] = +{ + // toolbar + { LPGEN("Popups are enabled"), ICO_TB_POPUP_ON, IDI_POPUP }, + { LPGEN("Popups are disabled"), ICO_TB_POPUP_OFF, IDI_NOPOPUP }, + + // common + { LPGEN("Popups are enabled"), ICO_POPUP_ON, IDI_POPUP }, + { LPGEN("Popups are disabled"), ICO_POPUP_OFF, IDI_NOPOPUP }, + { LPGEN("Popup History"), ICO_HISTORY, IDI_HISTORY }, +}; + +/** + * Returns a icon, identified by a name + * @param pszIcon - name of the icon + * @param big - bool big icon (default = false) + * @return: HICON if the icon is loaded, NULL otherwise + **/ +HICON IcoLib_GetIcon(LPCSTR pszIcon, bool big) +{ + return (pszIcon) ? Skin_GetIcon(pszIcon, big) : NULL; +} + +void InitIcons() +{ + Icon_Register(hInst, SECT_TOLBAR, iconList, 2); + Icon_Register(hInst, SECT_POPUP, iconList+2, 3); +} diff --git a/plugins/YAPP/src/icons.h b/plugins/YAPP/src/icons.h new file mode 100644 index 0000000000..d759ab5e78 --- /dev/null +++ b/plugins/YAPP/src/icons.h @@ -0,0 +1,17 @@ +#ifndef __icons_h__ +#define __icons_h__ + +//ICONS +#define SECT_TOLBAR "Toolbar" +#define SECT_POPUP MODULE + +#define ICO_TB_POPUP_ON "TBButton_popup_ToogleUp" +#define ICO_TB_POPUP_OFF "TBButton_popup_ToogleDOWN" +#define ICO_POPUP_ON MODULE"_enabled" +#define ICO_POPUP_OFF MODULE"_disabled" +#define ICO_HISTORY MODULE"_history" + +void InitIcons(); +HICON IcoLib_GetIcon(LPCSTR pszIcon, bool big=false); + +#endif // __icons_h__ -- cgit v1.2.3