blob: d3649bdc7f66f9da0ab0119f2be94864c883ce34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
{$IFNDEF M_MSG_BUTTONSBAR}
{$DEFINE M_MSG_BUTTONSBAR}
const
BBSF_HIDDEN = 1;
BBSF_DISABLED = 2;
BBSF_PUSHED = 4;
BBSF_RELEASED = 8;
////////////////////////////////////////////////////////////////
//Events
//
///////////////////////////////////////////////////
// ToolBar loaded event
// wParam = 0;
// lParam = 0;
// This event will be send after module loaded and after each toolbar reset
// You should add your buttons on this event
ME_MSG_TOOLBARLOADED:PAnsiChar = 'SRMM/ButtonsBar/ModuleLoaded';
///////////////////////////////////////////////////
// ButtonClicked event
// wParam = (HANDLE)hContact;
// lParam = (CustomButtonClickData *)&CustomButtonClickData;
// catch to show a popup menu, etc.
ME_MSG_BUTTONPRESSED:PAnsiChar = 'SRMM/ButtonsBar/ButtonPressed';
//event flags
BBCF_RIGHTBUTTON = 1;
BBCF_SHIFTPRESSED = 2;
BBCF_CONTROLPRESSED = 4;
BBCF_ARROWCLICKED = 8;
type
pCustomButtonClickData = ^tCustomButtonClickData;
tCustomButtonClickData = record
pszModule :PAnsiChar; // button owners name
pt :TPOINT; // screen coordinates for menus
dwButtonId:dword; // registered button ID
hwndFrom :HWND; // button parents HWND
hContact :TMCONTACT;
flags :dword; // BBCF_ flags
end;
const
//button flags
BBBF_DISABLED = $0001;
BBBF_HIDDEN = $0002;
BBBF_ISPUSHBUTTON = $0004;
BBBF_ISARROWBUTTON = $0008;
BBBF_ISCHATBUTTON = $0010;
BBBF_ISIMBUTTON = $0020;
BBBF_ISRSIDEBUTTON = $0080;
BBBF_CANBEHIDDEN = $0100;
BBBF_ISDUMMYBUTTON = $0200;
type
pBBButton = ^tBBButton;
tBBButton = record
pszModuleName:PAnsiChar; // module name without spaces and underline symbols (e.g. "tabsrmm")
dwButtonID :dword; // your button ID, will be combined with pszModuleName for storing settings, etc...
szText :PWideChar; // button's text
szTooltip :PWideChar; // button's tooltip
dwDefPos :dword; // default order pos of button, counted from window edge (left or right)
// use value >100, because internal buttons using 10,20,30... 80, etc
bbbFlags :dword; // combine of BBBF_ flags above
hIcon :HICON; // Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
end;
function Srmm_RemoveButton(bbdi:pBBButton) : integer; stdcall; external AppDll;
function Srmm_SetButtonState(hContact:TMCONTACT;bbdi:pBBButton) : integer; stdcall; external AppDll;
{$ENDIF}
|