XABContactMenu::XABContactMenu(int MenuTypeIn){
+ // Setup the XABContactMenu control.
+
MenuType = MenuTypeIn;
// Setup the menu items.
XABContactMenu::~XABContactMenu(){
+ // Destory the XABContactMenu object.
+
// Delete the menu items.
for (std::map<std::string, wxMenuItem*>::iterator MenuItemIter = MenuItems.begin();
int ItemID,
wxItemKind ItemType){
+ // Append a menu item to the XABContactMenu control.
+
wxMenuItem *menuitem = new wxMenuItem(
NULL,
ItemID,
wxListCtrl* ContactListCtrlIn,
bool SearchModeOnlyIn){
+ // Setup the pointers when being used in the search window.
+
WindowPtr = WindowPtrIn;
ContactListCtrl = ContactListCtrlIn;
SearchModeOnly = SearchModeOnlyIn;
wxListCtrl* ContactListCtrlIn,
bool EnableAccountSettingsIn){
+ // Setup the pointers.
+
WindowPtr = WindowPtrIn;
ContactListCtrl = ContactListCtrlIn;
EnableAccountSettings = EnableAccountSettingsIn;
wxMenu* XABContactMenu::MenuPointer(){
+ // Process the menu pointer.
+
// Check for the following before passing the pointer:
// If an account has been selected.
// - Disable Refresh Address Book if not.
void XABContactMenu::ProcessMenuItemClick( wxCommandEvent& event){
+ // Process an action when a menu item in the XABContactMenu
+ // control is selected.
+
int ItemID = event.GetId();
if (MenuType == XABCONTACTMENU_MAIN){