source: golgotha/src/max_plugin/sdk_inc/rtclick.h @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1/*********************************************************************
2 *<
3        FILE: rtclick.h
4
5        DESCRIPTION: Right-click menu functionality
6
7        CREATED BY:     Tom Hudson
8
9        HISTORY: Created 14 June 1995
10
11 *>     Copyright (c) 1995, All Rights Reserved.
12 **********************************************************************/
13
14#ifndef __RTCLICK__
15#define __RTCLICK__
16
17class RightClickMenuManager;
18
19class RightClickMenu {
20        public:
21                virtual void Init(RightClickMenuManager* manager, HWND hWnd, IPoint2 m)=0;
22                virtual void Selected(UINT id)=0;
23        };
24
25typedef RightClickMenu* PRightClickMenu;
26typedef Tab<PRightClickMenu> PRightClickMenuTab;
27
28class RCMData {
29        public:
30                RightClickMenu *menu;
31                UINT menuId;
32                UINT managerId;
33                RCMData() { menu = NULL; menuId = managerId = 0; };
34                RCMData(RightClickMenu *menu, UINT menuId, UINT managerID);
35        };
36
37typedef Tab<RCMData> RCMDataTab;
38
39class RightClickMenuManager {
40        private:
41                HMENU theMenu;
42                PRightClickMenuTab menuTab;
43                RCMDataTab dataTab;
44                int index;
45                int limit;
46                int startId;
47        public:
48                CoreExport void Register(RightClickMenu *menu);
49                CoreExport void Unregister(RightClickMenu *menu);
50                CoreExport void Init(HMENU menu, int startId, int limit, HWND hWnd, IPoint2 m);
51                CoreExport int AddMenu(RightClickMenu *menu, UINT flags, UINT id, LPCTSTR data);
52                CoreExport void Process(UINT id);
53        };
54
55#endif // __RTCLICK__
Note: See TracBrowser for help on using the repository browser.