From 9b00feaa475fa3bca08336bc26050256da8807f3 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 13 Nov 2016 12:58:26 +0000 Subject: [PATCH] Added code to setup toolbar in frmMain --- source/frmMain.cpp | 35 ++++++++++++++++++++++++++++++++++- source/frmMain.h | 6 ++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/source/frmMain.cpp b/source/frmMain.cpp index 0986e18..ffa99d2 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -190,7 +190,40 @@ frmMainADT( parent ) wxImage icons_nossl_png(nosslstream, wxBITMAP_TYPE_PNG); imgNoSSL = new wxBitmap(icons_nossl_png, -1); - + + // Toolbar icons. + + wxMemoryInputStream addaddressbook(toolbar_addaddressbook_png, sizeof(toolbar_addaddressbook_png)); + wxMemoryInputStream preferences(toolbar_preferences_png, sizeof(toolbar_preferences_png)); + wxMemoryInputStream searchcontacts(toolbar_searchcontacts_png, sizeof(toolbar_searchcontacts_png)); + wxMemoryInputStream addcontact(toolbar_addcontact_png, sizeof(toolbar_addcontact_png)); + wxMemoryInputStream editcontact(toolbar_editcontact_png, sizeof(toolbar_editcontact_png)); + wxMemoryInputStream deletecontact(toolbar_deletecontact_png, sizeof(toolbar_deletecontact_png)); + + wxImage toolbar_addaddressbook_png(addaddressbook, wxBITMAP_TYPE_PNG); + imgAddAddressBook = new wxBitmap (toolbar_addaddressbook_png, -1); + tblMain->SetToolNormalBitmap(tbtNewAccount->GetId(), *imgAddAddressBook); + + wxImage toolbar_preferences_png(preferences, wxBITMAP_TYPE_PNG); + imgPreferences = new wxBitmap (toolbar_preferences_png, -1); + tblMain->SetToolNormalBitmap(tbtPreferences->GetId(), *imgPreferences); + + wxImage toolbar_searchcontacts_png(searchcontacts, wxBITMAP_TYPE_PNG); + imgSearchContacts = new wxBitmap (toolbar_searchcontacts_png, -1); + tblMain->SetToolNormalBitmap(tbtSearch->GetId(), *imgSearchContacts); + + wxImage toolbar_addcontact_png(addcontact, wxBITMAP_TYPE_PNG); + imgAddContact = new wxBitmap (toolbar_addcontact_png, -1); + tblMain->SetToolNormalBitmap(tbtAddContact->GetId(), *imgAddContact); + + wxImage toolbar_editcontact_png(editcontact, wxBITMAP_TYPE_PNG); + imgEditContact = new wxBitmap (toolbar_editcontact_png, -1); + tblMain->SetToolNormalBitmap(tbtEditContact->GetId(), *imgEditContact); + + wxImage toolbar_deletecontact_png(deletecontact, wxBITMAP_TYPE_PNG); + imgDeleteContact = new wxBitmap (toolbar_deletecontact_png, -1); + tblMain->SetToolNormalBitmap(tbtDeleteContact->GetId(), *imgDeleteContact); + // Activity Icon. wxMemoryInputStream act1(icons_act1_png, sizeof(icons_act1_png)); diff --git a/source/frmMain.h b/source/frmMain.h index 744bf32..24f4032 100644 --- a/source/frmMain.h +++ b/source/frmMain.h @@ -190,6 +190,12 @@ class frmMain : public frmMainADT wxBitmap *imgSSLWarning = NULL; wxBitmap *imgOnline = NULL; wxBitmap *imgOffline = NULL; + wxBitmap *imgAddAddressBook = NULL; + wxBitmap *imgPreferences = NULL; + wxBitmap *imgSearchContacts = NULL; + wxBitmap *imgAddContact = NULL; + wxBitmap *imgEditContact = NULL; + wxBitmap *imgDeleteContact = NULL; int ActivityIconStatus = 0; int SearchUID = 0; int ContactUID = 0; -- 2.39.2