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
|
#pragma once
#include <vector>
enum
{
NSM_FIRST = WM_USER + 100,
// wParam = fist item
// lParam = iLast item
// result = number of total selected items
NSM_SELECTITEMS = NSM_FIRST,
// wParam = (MCONTACT)hContact = database contact
// lParam = (MEVENT)hDbEvent = database event
NSM_ADDEVENT,
//
NSM_SEEKTIME,
//
NSM_SET_OPTIONS, // options were changed
NSM_LAST
};
/////////////////////////////////////////////////////////////////////////////////////////
// NS get SRMM dialog
// returns a pointer to the parent SRMM dialog, if used as a log window, or nullptr otherwise
__forceinline CSrmmBaseDialog* NS_GetSrmm(HANDLE hwnd)
{
return (CSrmmBaseDialog *)CallService("NewStory/GetSrmm", WPARAM(hwnd), 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
// NS get current event
__forceinline MEVENT NS_GetCurrent(HANDLE hwnd)
{
return (MEVENT)CallService("NewStory/GetCurrent", WPARAM(hwnd), 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
// NS get selection
__forceinline std::vector<MEVENT> NS_GetSelection(HANDLE hwnd)
{
std::vector<MEVENT> ret;
CallService("NewStory/GetSelection", WPARAM(hwnd), LPARAM(&ret));
return ret;
}
/////////////////////////////////////////////////////////////////////////////////////////
// NS menu item
struct NSMenuExecParam
{
char *szServiceName;
int iParam;
};
__forceinline HGENMENU Menu_AddNewStoryMenuItem(TMO_MenuItem *pmi, int param)
{
return (HGENMENU)CallService("NSMenu/AddService", (WPARAM)pmi, param);
}
/////////////////////////////////////////////////////////////////////////////////////////
// event for changing NewStory menu items
// wparam = (MCONTACT)hContact - contact id
// lparam = (DB::EventInfo*)dbei - event
#define ME_NS_PREBUILDMENU "NewStory/PreBuildMenu"
|