Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Right click menu support added for the contact list and search results.
[xestiaab/.git] / source / widgets / XABContactMenu.h
1 #ifndef __WIDGETS_XABCONTACTMENU__
2 #define __WIDGETS_XABCONTACTMENU__
4 #include <map>
5 #include <string>
6 #include <wx/wx.h>
7 #include <wx/listctrl.h>
8 #include <wx/app.h>
10 enum {
11         XABCONTACTMENU_MAIN,
12         XABCONTACTMENU_SEARCH
13 };
15 class XABContactMenuADT : public wxMenu
16 {
18         private:
19                 
20         protected:
21                 virtual void ProcessMenuItemClick(wxCommandEvent& event) {event.Skip();};
22         public:
23                 XABContactMenuADT(){};
24                 ~XABContactMenuADT(){};
26 };
28 class XABContactMenu : public XABContactMenuADT
29 {
30         private:
31                 std::map<std::string, wxMenuItem*> MenuItems = {};
32                 int MenuType = XABCONTACTMENU_MAIN;
33                 wxListCtrl *ContactListCtrl = NULL;
34                 wxWindow *WindowPtr = NULL;
35                 bool EnableAccountSettings = FALSE;
36                 void AppendMenuItem(wxString ObjectName,
37                         wxString MenuName, 
38                         wxString MenuDescription,
39                         int ItemID,
40                         wxItemKind ItemType);
41         protected:
42                 void ProcessMenuItemClick(wxCommandEvent& event);
43         public:
44                 XABContactMenu(int MenuType);
45                 ~XABContactMenu();
46                 void SetupPointers(wxWindow* WindowPtrIn,
47                         wxListCtrl* ContactListCtrlIn);
48                 void SetupPointers(wxWindow* WindowPtrIn,
49                         wxListCtrl* ContactListCtrlIn, 
50                         bool EnableAccountSettingsIn);
51                 wxMenu* MenuPointer();
52                 
53 };
55 #endif
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy