From 0baf5ace93f6d77ab348728bc176e17f9f5163fa Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 1 Aug 2015 19:36:03 +0000 Subject: TopToolBar: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14790 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/TopToolBar.vcxproj | 28 +++ plugins/TopToolBar/TopToolBar.vcxproj.filters | 4 + plugins/TopToolBar/TopToolBar_10.vcxproj | 215 ---------------------- plugins/TopToolBar/TopToolBar_10.vcxproj.filters | 65 ------- plugins/TopToolBar/TopToolBar_12.vcxproj | 218 ----------------------- plugins/TopToolBar/TopToolBar_12.vcxproj.filters | 65 ------- plugins/TopToolBar/TopToolBar_14.vcxproj | 218 ----------------------- plugins/TopToolBar/TopToolBar_14.vcxproj.filters | 65 ------- plugins/TopToolBar/src/InternalButtons.cpp | 2 +- plugins/TopToolBar/src/common.h | 151 ---------------- plugins/TopToolBar/src/main.cpp | 2 +- plugins/TopToolBar/src/stdafx.cpp | 18 -- plugins/TopToolBar/src/stdafx.cxx | 18 ++ plugins/TopToolBar/src/stdafx.h | 149 ++++++++++++++++ plugins/TopToolBar/src/toolbar.cpp | 2 +- plugins/TopToolBar/src/toolbarwnd.cpp | 2 +- plugins/TopToolBar/src/topbutton.cpp | 2 +- plugins/TopToolBar/src/ttbopt.cpp | 2 +- 18 files changed, 205 insertions(+), 1021 deletions(-) create mode 100644 plugins/TopToolBar/TopToolBar.vcxproj create mode 100644 plugins/TopToolBar/TopToolBar.vcxproj.filters delete mode 100644 plugins/TopToolBar/TopToolBar_10.vcxproj delete mode 100644 plugins/TopToolBar/TopToolBar_10.vcxproj.filters delete mode 100644 plugins/TopToolBar/TopToolBar_12.vcxproj delete mode 100644 plugins/TopToolBar/TopToolBar_12.vcxproj.filters delete mode 100644 plugins/TopToolBar/TopToolBar_14.vcxproj delete mode 100644 plugins/TopToolBar/TopToolBar_14.vcxproj.filters delete mode 100644 plugins/TopToolBar/src/common.h delete mode 100644 plugins/TopToolBar/src/stdafx.cpp create mode 100644 plugins/TopToolBar/src/stdafx.cxx create mode 100644 plugins/TopToolBar/src/stdafx.h (limited to 'plugins/TopToolBar') diff --git a/plugins/TopToolBar/TopToolBar.vcxproj b/plugins/TopToolBar/TopToolBar.vcxproj new file mode 100644 index 0000000000..3edea1c46f --- /dev/null +++ b/plugins/TopToolBar/TopToolBar.vcxproj @@ -0,0 +1,28 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {ECE691D0-BFB3-483B-A699-084269EFCE89} + TopToolBar + + + + + \ No newline at end of file diff --git a/plugins/TopToolBar/TopToolBar.vcxproj.filters b/plugins/TopToolBar/TopToolBar.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/TopToolBar/TopToolBar.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/TopToolBar/TopToolBar_10.vcxproj b/plugins/TopToolBar/TopToolBar_10.vcxproj deleted file mode 100644 index f7d8b2a797..0000000000 --- a/plugins/TopToolBar/TopToolBar_10.vcxproj +++ /dev/null @@ -1,215 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {ECE691D0-BFB3-483B-A699-084269EFCE89} - TopToolBar - - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - true - true - true - - - - Disabled - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - EditAndContinue - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - MultiThreadedDebugDLL - Use - common.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - true - 0x1b200000 - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - Windows - false - - - - - Disabled - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - MultiThreadedDebugDLL - Use - common.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - true - 0x1b200000 - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - Windows - false - - - - - Full - OnlyExplicitInline - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - Size - Use - common.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - 0x1b200000 - $(IntDir)$(TargetName).lib - true - true - true - $(ProfileDir)..\..\bin10\lib - Windows - false - /PDBALTPATH:%_PDB% - - - - - Full - OnlyExplicitInline - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - Size - Use - common.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - 0x1b200000 - $(IntDir)$(TargetName).lib - true - true - true - $(ProfileDir)..\..\bin10\lib - Windows - false - /PDBALTPATH:%_PDB% - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/TopToolBar/TopToolBar_10.vcxproj.filters b/plugins/TopToolBar/TopToolBar_10.vcxproj.filters deleted file mode 100644 index 0e75aeb8e7..0000000000 --- a/plugins/TopToolBar/TopToolBar_10.vcxproj.filters +++ /dev/null @@ -1,65 +0,0 @@ - - - - - {7706e6ca-cf12-4f40-8864-82916b4669c8} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {872b8e16-3822-4f40-8957-4daf9343eb99} - h;hpp;hxx;hm;inl - - - {fbadd592-e14c-4abf-bf9e-5f2b3b808d64} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/plugins/TopToolBar/TopToolBar_12.vcxproj b/plugins/TopToolBar/TopToolBar_12.vcxproj deleted file mode 100644 index 8141c0e213..0000000000 --- a/plugins/TopToolBar/TopToolBar_12.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {ECE691D0-BFB3-483B-A699-084269EFCE89} - TopToolBar - - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - true - true - true - - - - Disabled - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - EditAndContinue - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - MultiThreadedDebugDLL - Use - common.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - true - 0x1b200000 - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - Windows - false - false - - - - - Disabled - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - MultiThreadedDebugDLL - Use - common.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - true - 0x1b200000 - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - Windows - false - - - - - Full - OnlyExplicitInline - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - Size - Use - common.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - 0x1b200000 - $(IntDir)$(TargetName).lib - true - true - true - $(ProfileDir)..\..\bin12\lib - Windows - false - - - - - Full - OnlyExplicitInline - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - Size - Use - common.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - 0x1b200000 - $(IntDir)$(TargetName).lib - true - true - true - $(ProfileDir)..\..\bin12\lib - Windows - false - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/TopToolBar/TopToolBar_12.vcxproj.filters b/plugins/TopToolBar/TopToolBar_12.vcxproj.filters deleted file mode 100644 index 0e75aeb8e7..0000000000 --- a/plugins/TopToolBar/TopToolBar_12.vcxproj.filters +++ /dev/null @@ -1,65 +0,0 @@ - - - - - {7706e6ca-cf12-4f40-8864-82916b4669c8} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {872b8e16-3822-4f40-8957-4daf9343eb99} - h;hpp;hxx;hm;inl - - - {fbadd592-e14c-4abf-bf9e-5f2b3b808d64} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/plugins/TopToolBar/TopToolBar_14.vcxproj b/plugins/TopToolBar/TopToolBar_14.vcxproj deleted file mode 100644 index b26bce308e..0000000000 --- a/plugins/TopToolBar/TopToolBar_14.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {ECE691D0-BFB3-483B-A699-084269EFCE89} - TopToolBar - - - - DynamicLibrary - Unicode - true - v140_xp - - - DynamicLibrary - Unicode - true - v140_xp - - - DynamicLibrary - Unicode - v140_xp - - - DynamicLibrary - Unicode - v140_xp - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - true - true - true - - - - Disabled - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - EditAndContinue - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - MultiThreadedDebugDLL - Use - common.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - true - 0x1b200000 - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - Windows - false - false - - - - - Disabled - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - MultiThreadedDebugDLL - Use - common.h - false - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - true - 0x1b200000 - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin14\lib - Windows - false - - - - - Full - OnlyExplicitInline - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - Size - Use - common.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - 0x1b200000 - $(IntDir)$(TargetName).lib - true - true - true - $(ProfileDir)..\..\bin14\lib - Windows - false - - - - - Full - OnlyExplicitInline - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - true - Level3 - ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - Size - Use - common.h - false - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - comctl32.lib;%(AdditionalDependencies) - 0x1b200000 - $(IntDir)$(TargetName).lib - true - true - true - $(ProfileDir)..\..\bin14\lib - Windows - false - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/TopToolBar/TopToolBar_14.vcxproj.filters b/plugins/TopToolBar/TopToolBar_14.vcxproj.filters deleted file mode 100644 index 0e75aeb8e7..0000000000 --- a/plugins/TopToolBar/TopToolBar_14.vcxproj.filters +++ /dev/null @@ -1,65 +0,0 @@ - - - - - {7706e6ca-cf12-4f40-8864-82916b4669c8} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {872b8e16-3822-4f40-8957-4daf9343eb99} - h;hpp;hxx;hm;inl - - - {fbadd592-e14c-4abf-bf9e-5f2b3b808d64} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 697b78ac27..c7b5f0a36f 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -1,5 +1,5 @@ -#include "common.h" +#include "stdafx.h" #define TTBI_GROUPSHOWHIDE "TTBInternal/GroupShowHide" #define TTBI_SOUNDSONOFF "TTBInternal/SoundsOnOFF" diff --git a/plugins/TopToolBar/src/common.h b/plugins/TopToolBar/src/common.h deleted file mode 100644 index a5f5666b77..0000000000 --- a/plugins/TopToolBar/src/common.h +++ /dev/null @@ -1,151 +0,0 @@ -#ifndef TTB_COMMON_H -#define TTB_COMMON_H - - -#define _CRT_SECURE_NO_WARNINGS - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "resource.h" -#include "version.h" -#include "BkgrCfg.h" - -#define TTB_BUTTON_CLASS _T("TopToolbarButtonClass") - -#define TTB_REPOSBUTTONS (WM_USER+10) -#define TTB_UPDATEFRAMEVISIBILITY (WM_USER+11) - -#define TTBDEFAULT_BKBMPUSE CLB_STRETCH -#define TTBDEFAULT_BKCOLOUR GetSysColor(COLOR_3DFACE) -#define TTBDEFAULT_USEBITMAP 0 -#define TTBDEFAULT_SELBKCOLOUR GetSysColor(COLOR_HIGHLIGHT) - -#define TTBBF_INTERNAL 0x1000000 -#define TTBBF_OPTIONAL 0x2000000 - -/////////////////////////////////////////////////////////////////////////////// -// TopButtonInt class - -struct TopButtonInt : public MZeroedObject -{ - ~TopButtonInt(); - - DWORD CheckFlags(DWORD Flags); - void CreateWnd(void); - void LoadSettings(void); - void SaveSettings(int *SepCnt, int *LaunchCnt); - void SetBitmap(void); - - __inline bool isSep() const - { return (dwFlags & TTBBF_ISSEPARATOR) != 0; - } - - __inline bool isVisible() const - { return (dwFlags & TTBBF_VISIBLE) != 0; - } - - HWND hwnd; - int id; - BOOL bPushed; - int dwFlags; - int x, y, arrangedpos; - HICON hIconUp, hIconDn; - HANDLE hIconHandleUp, hIconHandleDn; - - char *pszService; - TCHAR *ptszProgram; - char *pszName; - TCHAR *ptszTooltip; - - LPARAM lParamUp; - WPARAM wParamUp; - LPARAM lParamDown; - WPARAM wParamDown; - - int hLangpack; - TCHAR *ptszTooltipUp, *ptszTooltipDn; -}; - -/////////////////////////////////////////////////////////////////////////////// - -int TTBOptInit(WPARAM wParam, LPARAM lParam); -//append string -char __inline *AS(char *str, const char *setting, char *addstr); - -TopButtonInt* CreateButton(TTBButton* but); - -int LoadBackgroundOptions(); - -int ArrangeButtons(); - -#define DEFBUTTWIDTH 20 -#define DEFBUTTHEIGHT 20 -#define DEFBUTTGAP 1 - -#define SEPWIDTH 3 - -extern TTBCtrl* g_ctrl; - -extern LIST Buttons; -extern HINSTANCE hInst; -extern HBITMAP hBmpBackground, hBmpSeparator; -extern mir_cs csButtonsHook; -extern pfnCustomProc g_CustomProc; -extern LPARAM g_CustomProcParam; -extern HANDLE hTTBModuleLoaded; - -void AddToOptions(TopButtonInt* b); -void RemoveFromOptions(int id); - -//append string -char *AS(char *str, const char *setting, char *addstr) -{ - if (str != NULL) { - mir_strcpy(str, setting); - mir_strcat(str, addstr); - } - return str; -} - -#define TTB_LAUNCHSERVICE "TTB/LaunchService" - -TopButtonInt* idtopos(int id, int* pPos=NULL); - -INT_PTR TTBAddButton(WPARAM, LPARAM); -INT_PTR TTBRemoveButton(WPARAM, LPARAM); - -void InitInternalButtons(void); - -int LoadToolbarModule(void); -int UnloadToolbarModule(void); - -void SetAllBitmaps(void); -int SaveAllLButs(void); -int SaveAllButtonsOptions(void); - -void InsertSeparator( int i ); -void DeleteSeparator(int i); -void DeleteLBut(int i); -void InsertLBut(int i); - -int OnModulesLoad(WPARAM, LPARAM); - -#endif \ No newline at end of file diff --git a/plugins/TopToolBar/src/main.cpp b/plugins/TopToolBar/src/main.cpp index c30ee22557..4326704b39 100644 --- a/plugins/TopToolBar/src/main.cpp +++ b/plugins/TopToolBar/src/main.cpp @@ -1,5 +1,5 @@ -#include "common.h" +#include "stdafx.h" CLIST_INTERFACE *pcli; HINSTANCE hInst; diff --git a/plugins/TopToolBar/src/stdafx.cpp b/plugins/TopToolBar/src/stdafx.cpp deleted file mode 100644 index c5fe5abaad..0000000000 --- a/plugins/TopToolBar/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "common.h" \ No newline at end of file diff --git a/plugins/TopToolBar/src/stdafx.cxx b/plugins/TopToolBar/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/TopToolBar/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/plugins/TopToolBar/src/stdafx.h b/plugins/TopToolBar/src/stdafx.h new file mode 100644 index 0000000000..6c11502295 --- /dev/null +++ b/plugins/TopToolBar/src/stdafx.h @@ -0,0 +1,149 @@ +#ifndef TTB_COMMON_H +#define TTB_COMMON_H + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "resource.h" +#include "version.h" +#include "BkgrCfg.h" + +#define TTB_BUTTON_CLASS _T("TopToolbarButtonClass") + +#define TTB_REPOSBUTTONS (WM_USER+10) +#define TTB_UPDATEFRAMEVISIBILITY (WM_USER+11) + +#define TTBDEFAULT_BKBMPUSE CLB_STRETCH +#define TTBDEFAULT_BKCOLOUR GetSysColor(COLOR_3DFACE) +#define TTBDEFAULT_USEBITMAP 0 +#define TTBDEFAULT_SELBKCOLOUR GetSysColor(COLOR_HIGHLIGHT) + +#define TTBBF_INTERNAL 0x1000000 +#define TTBBF_OPTIONAL 0x2000000 + +/////////////////////////////////////////////////////////////////////////////// +// TopButtonInt class + +struct TopButtonInt : public MZeroedObject +{ + ~TopButtonInt(); + + DWORD CheckFlags(DWORD Flags); + void CreateWnd(void); + void LoadSettings(void); + void SaveSettings(int *SepCnt, int *LaunchCnt); + void SetBitmap(void); + + __inline bool isSep() const + { return (dwFlags & TTBBF_ISSEPARATOR) != 0; + } + + __inline bool isVisible() const + { return (dwFlags & TTBBF_VISIBLE) != 0; + } + + HWND hwnd; + int id; + BOOL bPushed; + int dwFlags; + int x, y, arrangedpos; + HICON hIconUp, hIconDn; + HANDLE hIconHandleUp, hIconHandleDn; + + char *pszService; + TCHAR *ptszProgram; + char *pszName; + TCHAR *ptszTooltip; + + LPARAM lParamUp; + WPARAM wParamUp; + LPARAM lParamDown; + WPARAM wParamDown; + + int hLangpack; + TCHAR *ptszTooltipUp, *ptszTooltipDn; +}; + +/////////////////////////////////////////////////////////////////////////////// + +int TTBOptInit(WPARAM wParam, LPARAM lParam); +//append string +char __inline *AS(char *str, const char *setting, char *addstr); + +TopButtonInt* CreateButton(TTBButton* but); + +int LoadBackgroundOptions(); + +int ArrangeButtons(); + +#define DEFBUTTWIDTH 20 +#define DEFBUTTHEIGHT 20 +#define DEFBUTTGAP 1 + +#define SEPWIDTH 3 + +extern TTBCtrl* g_ctrl; + +extern LIST Buttons; +extern HINSTANCE hInst; +extern HBITMAP hBmpBackground, hBmpSeparator; +extern mir_cs csButtonsHook; +extern pfnCustomProc g_CustomProc; +extern LPARAM g_CustomProcParam; +extern HANDLE hTTBModuleLoaded; + +void AddToOptions(TopButtonInt* b); +void RemoveFromOptions(int id); + +//append string +char *AS(char *str, const char *setting, char *addstr) +{ + if (str != NULL) { + mir_strcpy(str, setting); + mir_strcat(str, addstr); + } + return str; +} + +#define TTB_LAUNCHSERVICE "TTB/LaunchService" + +TopButtonInt* idtopos(int id, int* pPos=NULL); + +INT_PTR TTBAddButton(WPARAM, LPARAM); +INT_PTR TTBRemoveButton(WPARAM, LPARAM); + +void InitInternalButtons(void); + +int LoadToolbarModule(void); +int UnloadToolbarModule(void); + +void SetAllBitmaps(void); +int SaveAllLButs(void); +int SaveAllButtonsOptions(void); + +void InsertSeparator( int i ); +void DeleteSeparator(int i); +void DeleteLBut(int i); +void InsertLBut(int i); + +int OnModulesLoad(WPARAM, LPARAM); + +#endif \ No newline at end of file diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index c0c86131bf..e5697a5583 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -1,5 +1,5 @@ -#include "common.h" +#include "stdafx.h" pfnCustomProc g_CustomProc = NULL; LPARAM g_CustomProcParam = 0; diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp index bce16c1b42..96aa552252 100644 --- a/plugins/TopToolBar/src/toolbarwnd.cpp +++ b/plugins/TopToolBar/src/toolbarwnd.cpp @@ -1,5 +1,5 @@ -#include "common.h" +#include "stdafx.h" COLORREF bkColour; HBITMAP hBmpBackground, hBmpSeparator; diff --git a/plugins/TopToolBar/src/topbutton.cpp b/plugins/TopToolBar/src/topbutton.cpp index f0cb4ba82a..842553d2bb 100644 --- a/plugins/TopToolBar/src/topbutton.cpp +++ b/plugins/TopToolBar/src/topbutton.cpp @@ -1,5 +1,5 @@ -#include "common.h" +#include "stdafx.h" #define BitChanged(c) (dwFlags ^ Flags) & c diff --git a/plugins/TopToolBar/src/ttbopt.cpp b/plugins/TopToolBar/src/ttbopt.cpp index 6aa57f9d03..cddeaad2f6 100644 --- a/plugins/TopToolBar/src/ttbopt.cpp +++ b/plugins/TopToolBar/src/ttbopt.cpp @@ -1,4 +1,4 @@ -#include "common.h" +#include "stdafx.h" static HWND OptionshWnd; -- cgit v1.2.3