From ea0ec0099a6400a80a4bae0f726e8a1e6522ee86 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 12 Apr 2015 14:44:45 +0000 Subject: - 'Leave chat' button bar's menu item isn't shown for non-chat windows; - implementation of CustomButtonData became local for buttonsbar.cpp; - code cleaning; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@12776 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/buttonbar.h | 48 ++++++----------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) (limited to 'plugins/TabSRMM/src/buttonbar.h') diff --git a/plugins/TabSRMM/src/buttonbar.h b/plugins/TabSRMM/src/buttonbar.h index ada8201f1e..2c1e8ff78b 100644 --- a/plugins/TabSRMM/src/buttonbar.h +++ b/plugins/TabSRMM/src/buttonbar.h @@ -1,49 +1,10 @@ #ifndef _BUTTONSBAR_H #define _BUTTONSBAR_H - + #define MIN_CBUTTONID 4000 #define MAX_CBUTTONID 5000 -#define BBSF_IMBUTTON (1<<0) -#define BBSF_CHATBUTTON (1<<1) -#define BBSF_CANBEHIDDEN (1<<2) -#define BBSF_NTBSWAPED (1<<3) -#define BBSF_NTBDESTRUCT (1<<4) - -struct CustomButtonData : public MZeroedObject -{ - ~CustomButtonData() - { - mir_free(pszModuleName); - mir_free(ptszTooltip); - } - - DWORD dwPosition; // default order pos of button, counted from window edge (left or right) - - DWORD dwButtonOrigID; // id of button used while button creation and to store button info in DB - char *pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm") - - DWORD dwButtonCID; - DWORD dwArrowCID; // only use with BBBF_ISARROWBUTTON flag - - TCHAR *ptszTooltip; // button's tooltip - - int iButtonWidth; // must be 22 for regular button and 33 for button with arrow - HANDLE hIcon; // Handle to icolib registred icon - - bool bIMButton, bChatButton; - bool bCanBeHidden, bHidden, bAutoHidden, bSeparator, bDisabled, bPushButton; - bool bLSided, bRSided; - BYTE opFlags; -}; - -static INT_PTR CB_ModifyButton(WPARAM wParam, LPARAM lParam); -static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam); -static INT_PTR CB_AddButton(WPARAM wParam, LPARAM lParam); -static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam); -static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam); -static void CB_GetButtonSettings(MCONTACT hContact, CustomButtonData *cbd); - +struct CustomButtonData; void CB_WriteButtonSettings(MCONTACT hContact, CustomButtonData *cbd); void CB_DeInitCustomButtons(); @@ -51,9 +12,12 @@ void CB_InitCustomButtons(); void CB_InitDefaultButtons(); void CB_ReInitCustomButtons(); -/* MinGW doesn't like this struct declatations below */ void BB_UpdateIcons(HWND hdlg); void BB_RefreshTheme(const TWindowData *dat); +BOOL BB_SetButtonsPos(TWindowData *dat); +void BB_RedrawButtons(TWindowData *dat); +void BB_CustomButtonClick(TWindowData *dat, DWORD idFrom, HWND hwndFrom, BOOL code); + void CB_DestroyAllButtons(HWND hwndDlg); void CB_DestroyButton(HWND hwndDlg, TWindowData *dat, DWORD dwButtonCID, DWORD dwFlags); void CB_ChangeButton(HWND hwndDlg, TWindowData *dat, CustomButtonData* cbd); -- cgit v1.2.3