Modified Source Code

The heat of battle caused me to produce ugly code with multiple hard coded references to the Konqueror web browser.  The change all command was not sufficent for making changes because the problem was too sophiscated for change all.  The code in question is in the sample below.

[codesyntax lang=”cpp”]

    Xqt("/usr/bin/konqueror https://youtube.com/archman007");

[/codesyntax]

The desired source code is pictured below.

[codesyntax lang=”cpp”]

    Xqt(defBro + "https://youtube.com/archman007");

[/codesyntax]

The definition of the variable defBro which depects default browser follows:

[codesyntax lang=”cpp-qt”]

    string defBro = "/usr/bin/konqueror ";

[/codesyntax]

Below lists the c++ source code prior to modificatoins.

[codesyntax lang=”cpp”]

/***************************************************************
 * Name:      DlgTstMain.cpp
 * Purpose:   Code for Application Frame
 * Author:    Mr. Arch Brooks (arch@archman.com)
 * Created:   2019-08-28
 * Copyright: Mr. Arch Brooks (archman.us/b4)
 * License:
 **************************************************************/

#include "DlgTstMain.h"
#include <wx/msgdlg.h>
#include <wx/textdlg.h>
#include <wx/filedlg.h>
#include <wx/dirdlg.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <wx/msgdlg.h>

#include <wx/dirdlg.h>
#include <wx/fontdlg.h>
//#include "kwSearch.h"
#include <wx/colordlg.h>
#include <wx/brush.h>
#include "bcswebtools_lk1_io.h"
#include "bcswebtools_lk2_io.h"
#include "bcswebtools_lk3_io.h"
#include "dlgGetProj.h"
#include <wx/clipbrd.h>
#include <curl/curl.h>
#include <curl/easy.h>

#include "kwSearch.h"
#include <iomanip>
#include <wx/printdlg.h>
#include "freqCats.h"



bcswebtools_lk1_io ca;
bcswebtools_lk2_io li;

//(*InternalHeaders(DlgTstFrame)
#include <wx/intl.h>
#include <wx/settings.h>
#include <wx/string.h>
//*)

//helper functions
enum wxbuildinfoformat
{
    short_f, long_f
};

wxString wxbuildinfo(wxbuildinfoformat format)
{
    wxString wxbuild(wxVERSION_STRING);

    if (format == long_f )
    {
#if defined(__WXMSW__)
        wxbuild << _T("-Windows");
#elif defined(__UNIX__)
        wxbuild << _T("-Linux");
#endif

#if wxUSE_UNICODE
        wxbuild << _T("-Unicode build");
#else
        wxbuild << _T("-ANSI build");
#endif // wxUSE_UNICODE
    }

    return wxbuild;
}

//(*IdInit(DlgTstFrame)
const long DlgTstFrame::ID_LISTBOX1 = wxNewId();
const long DlgTstFrame::ID_PANEL2 = wxNewId();
const long DlgTstFrame::ID_LISTBOX2 = wxNewId();
const long DlgTstFrame::ID_PANEL3 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL6 = wxNewId();
const long DlgTstFrame::ID_PANEL6 = wxNewId();
const long DlgTstFrame::ID_NOTEBOOK1 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL7 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL8 = wxNewId();
const long DlgTstFrame::ID_BUTTON5 = wxNewId();
const long DlgTstFrame::ID_BUTTON6 = wxNewId();
const long DlgTstFrame::ID_PANEL7 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL1 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL2 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL3 = wxNewId();
const long DlgTstFrame::ID_BUTTON1 = wxNewId();
const long DlgTstFrame::ID_BUTTON2 = wxNewId();
const long DlgTstFrame::ID_PANEL8 = wxNewId();
const long DlgTstFrame::ID_NOTEBOOK3 = wxNewId();
const long DlgTstFrame::ID_PANEL1 = wxNewId();
const long DlgTstFrame::ID_MENUITEM23 = wxNewId();
const long DlgTstFrame::idMenCpX = wxNewId();
const long DlgTstFrame::idMenPD = wxNewId();
const long DlgTstFrame::ID_MENUITEM33 = wxNewId();
const long DlgTstFrame::ID_MENUITEM43 = wxNewId();
const long DlgTstFrame::ID_MENUITEM27 = wxNewId();
const long DlgTstFrame::idMenucpp = wxNewId();
const long DlgTstFrame::idMenFort = wxNewId();
const long DlgTstFrame::idMenCob = wxNewId();
const long DlgTstFrame::ID_MENUITEM44 = wxNewId();
const long DlgTstFrame::ID_MENUITEM62 = wxNewId();
const long DlgTstFrame::ID_MENUITEM64 = wxNewId();
const long DlgTstFrame::ID_MENUITEM26 = wxNewId();
const long DlgTstFrame::idCBX = wxNewId();
const long DlgTstFrame::ID_MENUITEM42 = wxNewId();
const long DlgTstFrame::ID_MENUITEM57 = wxNewId();
const long DlgTstFrame::ID_MENUITEM29 = wxNewId();
const long DlgTstFrame::ID_MENUITEM31 = wxNewId();
const long DlgTstFrame::idMenWP = wxNewId();
const long DlgTstFrame::ID_MENUITEM32 = wxNewId();
const long DlgTstFrame::ID_MENUITEM67 = wxNewId();
const long DlgTstFrame::ID_MENUITEM34 = wxNewId();
const long DlgTstFrame::ID_MENUITEM49 = wxNewId();
const long DlgTstFrame::ID_MENUITEM69 = wxNewId();
const long DlgTstFrame::ID_MENUITEM40 = wxNewId();
const long DlgTstFrame::ID_MENUITEM41 = wxNewId();
const long DlgTstFrame::ID_MENUITEM39 = wxNewId();
const long DlgTstFrame::ID_MENUITEM28 = wxNewId();
const long DlgTstFrame::ID_MENUITEM36 = wxNewId();
const long DlgTstFrame::ID_MENUITEM37 = wxNewId();
const long DlgTstFrame::ID_MENUITEM38 = wxNewId();
const long DlgTstFrame::ID_MENUITEM68 = wxNewId();
const long DlgTstFrame::ID_MENUITEM35 = wxNewId();
const long DlgTstFrame::ID_MENUITEM46 = wxNewId();
const long DlgTstFrame::ID_MENUITEM47 = wxNewId();
const long DlgTstFrame::ID_MENUITEM50 = wxNewId();
const long DlgTstFrame::ID_MENUITEM51 = wxNewId();
const long DlgTstFrame::ID_MENUITEM48 = wxNewId();
const long DlgTstFrame::ID_MENUITEM45 = wxNewId();
const long DlgTstFrame::ID_MENUITEM53 = wxNewId();
const long DlgTstFrame::ID_MENUITEM54 = wxNewId();
const long DlgTstFrame::ID_MENUITEM55 = wxNewId();
const long DlgTstFrame::ID_MENUITEM56 = wxNewId();
const long DlgTstFrame::ID_MENUITEM52 = wxNewId();
const long DlgTstFrame::ID_MENUITEM59 = wxNewId();
const long DlgTstFrame::ID_MENUITEM60 = wxNewId();
const long DlgTstFrame::ID_MENUITEM61 = wxNewId();
const long DlgTstFrame::ID_MENUITEM63 = wxNewId();
const long DlgTstFrame::ID_MENUITEM65 = wxNewId();
const long DlgTstFrame::ID_MENUITEM66 = wxNewId();
const long DlgTstFrame::ID_MENUITEM58 = wxNewId();
const long DlgTstFrame::ID_MENUITEM24 = wxNewId();
const long DlgTstFrame::ID_MENUITEM30 = wxNewId();
const long DlgTstFrame::idMenuQuit = wxNewId();
const long DlgTstFrame::ID_MENUITEM2 = wxNewId();
const long DlgTstFrame::ID_MENUITEM3 = wxNewId();
const long DlgTstFrame::idMenuAbout = wxNewId();
const long DlgTstFrame::ID_STATUSBAR1 = wxNewId();
const long DlgTstFrame::ID_MENUITEM4 = wxNewId();
const long DlgTstFrame::ID_MENUITEM5 = wxNewId();
const long DlgTstFrame::ID_MENUITEM6 = wxNewId();
const long DlgTstFrame::ID_MENUITEM25 = wxNewId();
const long DlgTstFrame::ID_MENUITEM7 = wxNewId();
const long DlgTstFrame::ID_MENUITEM17 = wxNewId();
const long DlgTstFrame::ID_MENUITEM20 = wxNewId();
const long DlgTstFrame::ID_MENUITEM21 = wxNewId();
const long DlgTstFrame::ID_MENUITEM19 = wxNewId();
const long DlgTstFrame::ID_MENUITEM18 = wxNewId();
const long DlgTstFrame::ID_MENUITEM8 = wxNewId();
const long DlgTstFrame::ID_MENUITEM9 = wxNewId();
const long DlgTstFrame::ID_MENUITEM10 = wxNewId();
const long DlgTstFrame::ID_MENUITEM11 = wxNewId();
const long DlgTstFrame::ID_MENUITEM12 = wxNewId();
const long DlgTstFrame::ID_MENUITEM13 = wxNewId();
const long DlgTstFrame::ID_MENUITEM14 = wxNewId();
const long DlgTstFrame::ID_MENUITEM15 = wxNewId();
const long DlgTstFrame::ID_MENUITEM16 = wxNewId();
const long DlgTstFrame::ID_MENUITEM1 = wxNewId();
const long DlgTstFrame::ID_MENUITEM22 = wxNewId();
//*)

BEGIN_EVENT_TABLE(DlgTstFrame,wxFrame)
    //(*EventTable(DlgTstFrame)
    //*)
END_EVENT_TABLE()

DlgTstFrame::DlgTstFrame(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(DlgTstFrame)
    wxBoxSizer* BoxSizer1;
    wxBoxSizer* BoxSizer2;
    wxBoxSizer* BoxSizer3;
    wxBoxSizer* BoxSizer4;
    wxBoxSizer* BoxSizer5;
    wxBoxSizer* BoxSizer6;
    wxBoxSizer* BoxSizer7;
    wxBoxSizer* BoxSizer8;
    wxBoxSizer* BoxSizer9;
    wxMenu* Menu1;
    wxMenu* Menu2;
    wxMenuBar* MenuBar1;
    wxMenuItem* MenuItem1;
    wxMenuItem* MenuItem2;
    wxStaticBoxSizer* StaticBoxSizer1;
    wxStaticBoxSizer* StaticBoxSizer3;

    Create(parent, id, _("BCS Programmer\'s Workbench"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE, _T("id"));
    BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
    pan01 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
    BoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
    StaticBoxSizer1 = new wxStaticBoxSizer(wxHORIZONTAL, pan01, _("Traverse Categories"));
    Notebook1 = new wxNotebook(pan01, ID_NOTEBOOK1, wxDefaultPosition, wxSize(392,367), wxNB_BOTTOM, _T("ID_NOTEBOOK1"));
    Panel1 = new wxPanel(Notebook1, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL2"));
    Panel1->SetBackgroundColour(wxColour(0,163,255));
    BoxSizer3 = new wxBoxSizer(wxVERTICAL);
    lbxCats = new wxListBox(Panel1, ID_LISTBOX1, wxPoint(0,-8), wxSize(381,320), 0, 0, wxBORDER_SUNKEN|wxFULL_REPAINT_ON_RESIZE, wxDefaultValidator, _T("ID_LISTBOX1"));
    lbxCats->SetBackgroundColour(wxColour(0,163,255));
    BoxSizer3->Add(lbxCats, 1, wxALL|wxEXPAND, 5);
    Panel1->SetSizer(BoxSizer3);
    BoxSizer3->Fit(Panel1);
    BoxSizer3->SetSizeHints(Panel1);
    Panel2 = new wxPanel(Notebook1, ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL3"));
    Panel2->SetBackgroundColour(wxColour(0,0,0));
    BoxSizer4 = new wxBoxSizer(wxVERTICAL);
    lbxLinks = new wxListBox(Panel2, ID_LISTBOX2, wxDefaultPosition, wxSize(381,320), 0, 0, wxBORDER_SUNKEN|wxFULL_REPAINT_ON_RESIZE, wxDefaultValidator, _T("ID_LISTBOX2"));
    lbxLinks->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUHILIGHT));
    BoxSizer4->Add(lbxLinks, 1, wxALL|wxEXPAND, 5);
    Panel2->SetSizer(BoxSizer4);
    BoxSizer4->Fit(Panel2);
    BoxSizer4->SetSizeHints(Panel2);
    Panel5 = new wxPanel(Notebook1, ID_PANEL6, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL6"));
    BoxSizer5 = new wxBoxSizer(wxVERTICAL);
    textReport = new wxTextCtrl(Panel5, ID_TEXTCTRL6, _("Text"), wxDefaultPosition, wxSize(389,326), wxTE_MULTILINE|wxHSCROLL, wxDefaultValidator, _T("ID_TEXTCTRL6"));
    BoxSizer5->Add(textReport, 1, wxALL|wxEXPAND, 5);
    Panel5->SetSizer(BoxSizer5);
    BoxSizer5->Fit(Panel5);
    BoxSizer5->SetSizeHints(Panel5);
    Notebook1->AddPage(Panel1, _("Category"), false);
    Notebook1->AddPage(Panel2, _("Links"), false);
    Notebook1->AddPage(Panel5, _("Report"), false);
    StaticBoxSizer1->Add(Notebook1, 1, wxALL|wxEXPAND, 5);
    BoxSizer2->Add(StaticBoxSizer1, 3, wxEXPAND, 2);
    StaticBoxSizer3 = new wxStaticBoxSizer(wxHORIZONTAL, pan01, _("    Data Entry    "));
    Notebook2 = new wxNotebook(pan01, ID_NOTEBOOK3, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM, _T("ID_NOTEBOOK3"));
    Panel6 = new wxPanel(Notebook2, ID_PANEL7, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL7"));
    BoxSizer6 = new wxBoxSizer(wxVERTICAL);
    edtCat = new wxTextCtrl(Panel6, ID_TEXTCTRL7, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL7"));
    BoxSizer6->Add(edtCat, 0, wxALL|wxEXPAND, 2);
    edtDes = new wxTextCtrl(Panel6, ID_TEXTCTRL8, _("Text"), wxDefaultPosition, wxSize(378,123), wxTE_MULTILINE, wxDefaultValidator, _T("ID_TEXTCTRL8"));
    BoxSizer6->Add(edtDes, 1, wxALL|wxEXPAND, 2);
    BoxSizer8 = new wxBoxSizer(wxHORIZONTAL);
    btnCatUpd = new wxButton(Panel6, ID_BUTTON5, _("Update"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON5"));
    BoxSizer8->Add(btnCatUpd, 1, wxEXPAND, 2);
    btnCatCancel = new wxButton(Panel6, ID_BUTTON6, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON6"));
    BoxSizer8->Add(btnCatCancel, 1, wxEXPAND, 2);
    BoxSizer6->Add(BoxSizer8, 0, wxALL|wxEXPAND, 2);
    Panel6->SetSizer(BoxSizer6);
    BoxSizer6->Fit(Panel6);
    BoxSizer6->SetSizeHints(Panel6);
    Panel7 = new wxPanel(Notebook2, ID_PANEL8, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL8"));
    BoxSizer7 = new wxBoxSizer(wxVERTICAL);
    edtLinkName = new wxTextCtrl(Panel7, ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
    BoxSizer7->Add(edtLinkName, 0, wxALL|wxEXPAND, 2);
    edtUrl = new wxTextCtrl(Panel7, ID_TEXTCTRL2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
    BoxSizer7->Add(edtUrl, 0, wxALL|wxEXPAND, 2);
    edtMem = new wxTextCtrl(Panel7, ID_TEXTCTRL3, wxEmptyString, wxDefaultPosition, wxSize(396,228), wxTE_MULTILINE, wxDefaultValidator, _T("ID_TEXTCTRL3"));
    BoxSizer7->Add(edtMem, 1, wxALL|wxEXPAND, 2);
    BoxSizer9 = new wxBoxSizer(wxHORIZONTAL);
    btnLnkUpd = new wxButton(Panel7, ID_BUTTON1, _("Update"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
    BoxSizer9->Add(btnLnkUpd, 1, wxALL|wxEXPAND, 5);
    btnLnkCancel = new wxButton(Panel7, ID_BUTTON2, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
    BoxSizer9->Add(btnLnkCancel, 1, wxALL|wxEXPAND, 5);
    BoxSizer7->Add(BoxSizer9, 0, wxALL|wxEXPAND, 2);
    Panel7->SetSizer(BoxSizer7);
    BoxSizer7->Fit(Panel7);
    BoxSizer7->SetSizeHints(Panel7);
    Notebook2->AddPage(Panel6, _("Categories"), false);
    Notebook2->AddPage(Panel7, _("Links"), false);
    StaticBoxSizer3->Add(Notebook2, 1, wxEXPAND, 2);
    BoxSizer2->Add(StaticBoxSizer3, 2, wxEXPAND, 2);
    pan01->SetSizer(BoxSizer2);
    BoxSizer2->Fit(pan01);
    BoxSizer2->SetSizeHints(pan01);
    BoxSizer1->Add(pan01, 1, wxALL|wxEXPAND, 0);
    SetSizer(BoxSizer1);
    MenuBar1 = new wxMenuBar();
    Menu1 = new wxMenu();
    menReport = new wxMenuItem(Menu1, ID_MENUITEM23, _("Report"), wxEmptyString, wxITEM_NORMAL);
    Menu1->Append(menReport);
    MenuItem4 = new wxMenu();
    menCpGen = new wxMenuItem(MenuItem4, idMenCpX, _("Generate c++ Project"), _("Execute c++ Project Creation"), wxITEM_NORMAL);
    MenuItem4->Append(menCpGen);
    menPDoc = new wxMenuItem(MenuItem4, idMenPD, _("Programmer\'s Documentation System"), _("Invoke Program Documentation System"), wxITEM_NORMAL);
    MenuItem4->Append(menPDoc);
    menCobGen = new wxMenuItem(MenuItem4, ID_MENUITEM33, _("COBOL Program Generator"), wxEmptyString, wxITEM_NORMAL);
    MenuItem4->Append(menCobGen);
    MenuItem10 = new wxMenuItem(MenuItem4, ID_MENUITEM43, _("Visal Studio"), _("Visual Studio"), wxITEM_NORMAL);
    MenuItem4->Append(MenuItem10);
    Menu1->Append(ID_MENUITEM27, _("Development Tools"), MenuItem4, wxEmptyString);
    MenuItem3 = new wxMenu();
    menCppXqt = new wxMenuItem(MenuItem3, idMenucpp, _("c++ Compile"), _("Run CodeBlocks"), wxITEM_NORMAL);
    MenuItem3->Append(menCppXqt);
    menFortXqt = new wxMenuItem(MenuItem3, idMenFort, _("FORTRAN Compile"), _("Run Fortran Compiler"), wxITEM_NORMAL);
    MenuItem3->Append(menFortXqt);
    menCobXqt = new wxMenuItem(MenuItem3, idMenCob, _("COBOL Compile"), _("Invoke Cobol Compiler"), wxITEM_NORMAL);
    MenuItem3->Append(menCobXqt);
    manVisStud = new wxMenuItem(MenuItem3, ID_MENUITEM44, _("Visual Studio"), _("Run Visual Studio"), wxITEM_NORMAL);
    MenuItem3->Append(manVisStud);
    MenuItem14 = new wxMenu();
    menQtx = new wxMenuItem(MenuItem14, ID_MENUITEM62, _("QT Designer"), _("Run Cute"), wxITEM_NORMAL);
    MenuItem14->Append(menQtx);
    MenuItem3->Append(ID_MENUITEM64, _("QT"), MenuItem14, wxEmptyString);
    Menu1->Append(ID_MENUITEM26, _("Compilers"), MenuItem3, wxEmptyString);
    MenuItem6 = new wxMenu();
    menCBX = new wxMenuItem(MenuItem6, idCBX, _("Chromium Browser"), _("Launch Chromium Browser"), wxITEM_NORMAL);
    MenuItem6->Append(menCBX);
    menKonq = new wxMenuItem(MenuItem6, ID_MENUITEM42, _("Konqueror"), wxEmptyString, wxITEM_NORMAL);
    MenuItem6->Append(menKonq);
    menBrave = new wxMenuItem(MenuItem6, ID_MENUITEM57, _("Brave Browser"), _("Run Brave Browser"), wxITEM_NORMAL);
    MenuItem6->Append(menBrave);
    Menu1->Append(ID_MENUITEM29, _("Browsers"), MenuItem6, wxEmptyString);
    MenuItem5 = new wxMenu();
    menTBX = new wxMenuItem(MenuItem5, ID_MENUITEM31, _("Thunderbird"), _("Launch Mail System"), wxITEM_NORMAL);
    MenuItem5->Append(menTBX);
    menWP = new wxMenuItem(MenuItem5, idMenWP, _("Word Processor"), _("Invoke Word Processor"), wxITEM_NORMAL);
    MenuItem5->Append(menWP);
    MenuItem7 = new wxMenuItem(MenuItem5, ID_MENUITEM32, _("Putty"), wxEmptyString, wxITEM_NORMAL);
    MenuItem5->Append(MenuItem7);
    menMIP = new wxMenuItem(MenuItem5, ID_MENUITEM67, _("What\'s My IP Address"), _("Run What\'s My IP Address"), wxITEM_NORMAL);
    MenuItem5->Append(menMIP);
    menWebMin = new wxMenuItem(MenuItem5, ID_MENUITEM34, _("Webmin archbrooks.us"), wxEmptyString, wxITEM_NORMAL);
    MenuItem5->Append(menWebMin);
    menWPNew = new wxMenuItem(MenuItem5, ID_MENUITEM49, _("Word Press New Blog"), _("Create New WordPress Blog"), wxITEM_NORMAL);
    MenuItem5->Append(menWPNew);
    menGDWebMail = new wxMenuItem(MenuItem5, ID_MENUITEM69, _("Go Daddy Web Mail"), _("Run Go Daddy"), wxITEM_NORMAL);
    MenuItem5->Append(menGDWebMail);
    MenuItem9 = new wxMenu();
    menMACCws = new wxMenuItem(MenuItem9, ID_MENUITEM40, _("MACC Web Site"), _("MACC Web Site"), wxITEM_NORMAL);
    MenuItem9->Append(menMACCws);
    menMymacc = new wxMenuItem(MenuItem9, ID_MENUITEM41, _("My MACC"), _("My MACC"), wxITEM_NORMAL);
    MenuItem9->Append(menMymacc);
    MenuItem5->Append(ID_MENUITEM39, _("MACC"), MenuItem9, wxEmptyString);
    Menu1->Append(ID_MENUITEM28, _("Office Automation"), MenuItem5, wxEmptyString);
    MenuItem8 = new wxMenu();
    menKazam = new wxMenuItem(MenuItem8, ID_MENUITEM36, _("Screen Capture"), _("Begin Screen Capture"), wxITEM_NORMAL);
    MenuItem8->Append(menKazam);
    menKden = new wxMenuItem(MenuItem8, ID_MENUITEM37, _("Start Video Editor"), wxEmptyString, wxITEM_NORMAL);
    MenuItem8->Append(menKden);
    menYouTube = new wxMenuItem(MenuItem8, ID_MENUITEM38, _("Youtube"), wxEmptyString, wxITEM_NORMAL);
    MenuItem8->Append(menYouTube);
    menKodi = new wxMenuItem(MenuItem8, ID_MENUITEM68, _("Kodi"), _("Run Kodi"), wxITEM_NORMAL);
    MenuItem8->Append(menKodi);
    Menu1->Append(ID_MENUITEM35, _("Videos"), MenuItem8, wxEmptyString);
    MenuItem11 = new wxMenu();
    menWxWid = new wxMenuItem(MenuItem11, ID_MENUITEM46, _("wxWidgets"), wxEmptyString, wxITEM_NORMAL);
    MenuItem11->Append(menWxWid);
    menKDE = new wxMenuItem(MenuItem11, ID_MENUITEM47, _("KDE Forums"), _("Lde Forms"), wxITEM_NORMAL);
    MenuItem11->Append(menKDE);
    menCBForums = new wxMenuItem(MenuItem11, ID_MENUITEM50, _("Code Blocks"), _("CodeBlocks Forums"), wxITEM_NORMAL);
    MenuItem11->Append(menCBForums);
    menBForum = new wxMenuItem(MenuItem11, ID_MENUITEM51, _("Thunderbird"), _("Thunderbird"), wxITEM_NORMAL);
    MenuItem11->Append(menBForum);
    menStaOv = new wxMenuItem(MenuItem11, ID_MENUITEM48, _("Stack Overflow"), _("Stack Overflow"), wxITEM_NORMAL);
    MenuItem11->Append(menStaOv);
    Menu1->Append(ID_MENUITEM45, _("Forums"), MenuItem11, wxEmptyString);
    MenuItem12 = new wxMenu();
    menBB = new wxMenuItem(MenuItem12, ID_MENUITEM53, _("Bleach Bit"), _("Run BleachBit as Root"), wxITEM_NORMAL);
    MenuItem12->Append(menBB);
    menIntST = new wxMenuItem(MenuItem12, ID_MENUITEM54, _("Internet Speed Test"), _("Run Internet Speed Test"), wxITEM_NORMAL);
    MenuItem12->Append(menIntST);
    menPandora = new wxMenuItem(MenuItem12, ID_MENUITEM55, _("Pandora Radio"), _("Run Pandora Radio"), wxITEM_NORMAL);
    MenuItem12->Append(menPandora);
    menKIC = new wxMenuItem(MenuItem12, ID_MENUITEM56, _("Kubuntu Info Center"), _("Run Kubuntu Info Center"), wxITEM_NORMAL);
    MenuItem12->Append(menKIC);
    Menu1->Append(ID_MENUITEM52, _("System Tools"), MenuItem12, wxEmptyString);
    MenuItem13 = new wxMenu();
    menDelPop = new wxMenuItem(MenuItem13, ID_MENUITEM59, _("Delphi Popular Authors"), _("Run Popular Authors"), wxITEM_NORMAL);
    MenuItem13->Append(menDelPop);
    menFBX = new wxMenuItem(MenuItem13, ID_MENUITEM60, _("Facebook"), _("Invoke Facebook"), wxITEM_NORMAL);
    MenuItem13->Append(menFBX);
    menKubuntu = new wxMenuItem(MenuItem13, ID_MENUITEM61, _("Kubuntu"), _("Run Kubuntu"), wxITEM_NORMAL);
    MenuItem13->Append(menKubuntu);
    menWmMc = new wxMenuItem(MenuItem13, ID_MENUITEM63, _("Walmart Money Card"), _("run Walmart Money Card"), wxITEM_NORMAL);
    MenuItem13->Append(menWmMc);
    menNFL = new wxMenuItem(MenuItem13, ID_MENUITEM65, _("NFL"), _("Run NFL "), wxITEM_NORMAL);
    MenuItem13->Append(menNFL);
    menUFC = new wxMenuItem(MenuItem13, ID_MENUITEM66, _("UFC"), _("Run UFC"), wxITEM_NORMAL);
    MenuItem13->Append(menUFC);
    Menu1->Append(ID_MENUITEM58, _("Favorite Links"), MenuItem13, _("Invoke Faborite Links"));
    menTDlg = new wxMenuItem(Menu1, ID_MENUITEM24, _("Test Dialog"), wxEmptyString, wxITEM_NORMAL);
    Menu1->Append(menTDlg);
    menUpTab = new wxMenuItem(Menu1, ID_MENUITEM30, _("Update Table"), wxEmptyString, wxITEM_NORMAL);
    Menu1->Append(menUpTab);
    MenuItem1 = new wxMenuItem(Menu1, idMenuQuit, _("Quit\tAlt-F4"), _("Quit the application"), wxITEM_NORMAL);
    Menu1->Append(MenuItem1);
    MenuBar1->Append(Menu1, _("&File"));
    Menu3 = new wxMenu();
    menFonts = new wxMenuItem(Menu3, ID_MENUITEM2, _("Fonts"), wxEmptyString, wxITEM_NORMAL);
    Menu3->Append(menFonts);
    menColor = new wxMenuItem(Menu3, ID_MENUITEM3, _("Background Color"), wxEmptyString, wxITEM_NORMAL);
    Menu3->Append(menColor);
    MenuBar1->Append(Menu3, _("&Enviroment"));
    Menu2 = new wxMenu();
    MenuItem2 = new wxMenuItem(Menu2, idMenuAbout, _("About\tF1"), _("Show info about this application"), wxITEM_NORMAL);
    Menu2->Append(MenuItem2);
    MenuBar1->Append(Menu2, _("Help"));
    SetMenuBar(MenuBar1);
    StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
    int __wxStatusBarWidths_1[1] = { -1 };
    int __wxStatusBarStyles_1[1] = { wxSB_NORMAL };
    StatusBar1->SetFieldsCount(1,__wxStatusBarWidths_1);
    StatusBar1->SetStatusStyles(1,__wxStatusBarStyles_1);
    SetStatusBar(StatusBar1);
    	wxFontData fontData_1;
    	fontData_1.SetInitialFont(*wxNORMAL_FONT);
    FontDialog1 = new wxFontDialog(this, fontData_1);
    ColourDialog1 = new wxColourDialog(this);
    pumCatEdit = new wxMenuItem((&pumCategories), ID_MENUITEM4, _("Edit Category"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatEdit);
    pumCatNewCat = new wxMenuItem((&pumCategories), ID_MENUITEM5, _("New Category"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatNewCat);
    pumCatDelete = new wxMenuItem((&pumCategories), ID_MENUITEM6, _("Delete Caegory"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatDelete);
    pumCatKwd = new wxMenuItem((&pumCategories), ID_MENUITEM25, _("Keyword Search"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatKwd);
    pumCategories.AppendSeparator();
    pumCatMerge = new wxMenuItem((&pumCategories), ID_MENUITEM7, _("Merge Content"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatMerge);
    pumCategories.AppendSeparator();
    pum1Bkg = new wxMenuItem((&pumCategories), ID_MENUITEM17, _("Change Backgroun Color"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pum1Bkg);
    pumCategories.AppendSeparator();
    pumCatsRefresh = new wxMenuItem((&pumCategories), ID_MENUITEM20, _("Refresh Categories"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatsRefresh);
    menHome = new wxMenuItem((&pumCategories), ID_MENUITEM21, _("Home"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(menHome);
    pumLinksCompile = new wxMenuItem((&pumLinks), ID_MENUITEM19, _("Compile This Project"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLinksCompile);
    pumKwSearch = new wxMenuItem((&pumLinks), ID_MENUITEM18, _("Keyword Search"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumKwSearch);
    pumLnkExecute = new wxMenuItem((&pumLinks), ID_MENUITEM8, _("Execute"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkExecute);
    pumLnkNewCat = new wxMenuItem((&pumLinks), ID_MENUITEM9, _("New Category"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkNewCat);
    punLnkNewLink = new wxMenuItem((&pumLinks), ID_MENUITEM10, _("New Link"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(punLnkNewLink);
    pumLnkNPE = new wxMenuItem((&pumLinks), ID_MENUITEM11, _("New PDF\'s or Executables"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkNPE);
    pumLinks.AppendSeparator();
    pumLnkDelLink = new wxMenuItem((&pumLinks), ID_MENUITEM12, _("Delete Link"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkDelLink);
    pumLnkPrtRep = new wxMenuItem((&pumLinks), ID_MENUITEM13, _("Print Report"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkPrtRep);
    pumLinks.AppendSeparator();
    pumLnkMerge = new wxMenuItem((&pumLinks), ID_MENUITEM14, _("Merge Content"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkMerge);
    pubLnkELink = new wxMenuItem((&pumLinks), ID_MENUITEM15, _("Edit Link"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pubLnkELink);
    pumLnkNG = new wxMenuItem((&pumLinks), ID_MENUITEM16, _("Copy To New Group"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkNG);
    pumLinkBkg = new wxMenuItem((&pumLinks), ID_MENUITEM1, _("Select Background Color"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLinkBkg);
    pumRepPrint = new wxMenuItem((&pumReport), ID_MENUITEM22, _("Print Report"), wxEmptyString, wxITEM_NORMAL);
    pumReport.Append(pumRepPrint);
    	printDialogData_1 = new wxPrintDialogData;
    PrintDialog1 = new wxPrintDialog(this, printDialogData_1);
    BoxSizer1->Fit(this);
    BoxSizer1->SetSizeHints(this);
    Center();

    Connect(ID_LISTBOX1,wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,(wxObjectEventFunction)&DlgTstFrame::OnlbxCatsDClick);
    Connect(ID_LISTBOX2,wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,(wxObjectEventFunction)&DlgTstFrame::OnlbxLinksDClick);
    Connect(ID_TEXTCTRL6,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&DlgTstFrame::OntextReportText);
    Connect(ID_NOTEBOOK1,wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,(wxObjectEventFunction)&DlgTstFrame::OnNotebook1PageChanged2);
    Connect(ID_BUTTON5,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DlgTstFrame::OnbtnCatUpdClick);
    Connect(ID_BUTTON6,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DlgTstFrame::OnbtnCatCancelClick);
    Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DlgTstFrame::OnbtnLnkUpdClick);
    Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DlgTstFrame::OnbtnCancelClick);
    Connect(ID_MENUITEM23,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenReportSelected);
    Connect(idMenCpX,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCpGenSelected);
    Connect(idMenPD,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenPDocSelected);
    Connect(ID_MENUITEM33,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCobGenSelected);
    Connect(idMenucpp,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCppXqtSelected);
    Connect(idMenFort,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenFortXqtSelected);
    Connect(idMenCob,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCobXqtSelected);
    Connect(ID_MENUITEM44,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmanVisStudSelected);
    Connect(ID_MENUITEM62,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenQTDSelected);
    Connect(idCBX,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCBroSelected);
    Connect(ID_MENUITEM42,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKonqSelected);
    Connect(ID_MENUITEM57,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenBraveSelected);
    Connect(ID_MENUITEM31,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenTBSelected);
    Connect(idMenWP,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWPSelected);
    Connect(ID_MENUITEM32,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenPuttySelected);
    Connect(ID_MENUITEM67,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenMIPSelected);
    Connect(ID_MENUITEM34,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWebMinSelected);
    Connect(ID_MENUITEM49,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWPNewSelected);
    Connect(ID_MENUITEM69,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenGDWebMailSelected);
    Connect(ID_MENUITEM40,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenMACCwsSelected);
    Connect(ID_MENUITEM41,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenMymaccSelected);
    Connect(ID_MENUITEM36,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKazamSelected);
    Connect(ID_MENUITEM37,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKdenSelected);
    Connect(ID_MENUITEM38,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenYouTubeSelected);
    Connect(ID_MENUITEM68,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKodiSelected);
    Connect(ID_MENUITEM46,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWxWidSelected);
    Connect(ID_MENUITEM47,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKDESelected);
    Connect(ID_MENUITEM50,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCBForumsSelected);
    Connect(ID_MENUITEM51,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenBForumSelected);
    Connect(ID_MENUITEM48,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenStaOvSelected);
    Connect(ID_MENUITEM53,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenBBSelected);
    Connect(ID_MENUITEM54,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenIntSTSelected);
    Connect(ID_MENUITEM55,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenPandoraSelected);
    Connect(ID_MENUITEM56,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKICSelected);
    Connect(ID_MENUITEM59,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenDelPopSelected);
    Connect(ID_MENUITEM60,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenFBXSelected);
    Connect(ID_MENUITEM61,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKubuntuSelected);
    Connect(ID_MENUITEM63,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWmMcSelected);
    Connect(ID_MENUITEM65,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenNFLSelected);
    Connect(ID_MENUITEM66,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenUFCSelected);
    Connect(ID_MENUITEM24,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenTDlgSelected);
    Connect(ID_MENUITEM30,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenUpTabSelected);
    Connect(idMenuQuit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnQuit);
    Connect(ID_MENUITEM2,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenFontsSelected);
    Connect(ID_MENUITEM3,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenColorSelected);
    Connect(idMenuAbout,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnAbout);
    Connect(ID_MENUITEM4,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatEditSelected);
    Connect(ID_MENUITEM5,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatNewCatSelected);
    Connect(ID_MENUITEM6,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatDeleteSelected);
    Connect(ID_MENUITEM25,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatKwdSelected);
    Connect(ID_MENUITEM7,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatMergeSelected);
    Connect(ID_MENUITEM17,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::Onpum1BkgSelected);
    Connect(ID_MENUITEM20,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatsRefreshSelected);
    Connect(ID_MENUITEM21,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenHomeSelected);
    Connect(ID_MENUITEM19,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLinksCompileSelected);
    Connect(ID_MENUITEM18,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumKwSearchSelected);
    Connect(ID_MENUITEM8,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkExecuteSelected);
    Connect(ID_MENUITEM9,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkNewCatSelected);
    Connect(ID_MENUITEM10,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpunLnkNewLinkSelected);
    Connect(ID_MENUITEM11,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkNPESelected);
    Connect(ID_MENUITEM12,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkDelLinkSelected);
    Connect(ID_MENUITEM13,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkPrtRepSelected);
    Connect(ID_MENUITEM14,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkMergeSelected);
    Connect(ID_MENUITEM15,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpubLnkELinkSelected);
    Connect(ID_MENUITEM16,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkNGSelected);
    Connect(ID_MENUITEM1,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLinkBkgSelected);
    Connect(ID_MENUITEM22,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumRepPrintSelected);
    Connect(wxID_ANY,wxEVT_CLOSE_WINDOW,(wxObjectEventFunction)&DlgTstFrame::OnClose1);
    //*)

//    lbxCats.Add("cat1");
    listCats();
    StatusBar1->SetStatusText(L"Quality, Reliability & Service");

    lbxCats->Connect(lbxCats->GetId(), wxEVT_RIGHT_UP,
                     wxMouseEventHandler(DlgTstFrame::OnpanCatsRightUpCats), NULL, this);

    lbxLinks->Connect(lbxLinks->GetId(), wxEVT_RIGHT_UP,
                      wxMouseEventHandler(DlgTstFrame::OnLinksRightUp), NULL, this);

    textReport->Connect(textReport->GetId(), wxEVT_RIGHT_UP,
                        wxMouseEventHandler(DlgTstFrame::OnRepRightUp), NULL, this);


    lbxCats->SetSelection(lbxCats->FindString(L"56 Frequently Used Applications", true));

    edtCat->SetBackgroundColour(lbxCats->GetBackgroundColour());
    edtDes->SetBackgroundColour(lbxCats->GetBackgroundColour());
    edtLinkName->SetBackgroundColour(lbxLinks->GetBackgroundColour());
    edtMem->SetBackgroundColour(lbxLinks->GetBackgroundColour());
    edtUrl->SetBackgroundColour(lbxLinks->GetBackgroundColour());
    textReport->SetBackgroundColour(lbxLinks->GetBackgroundColour());

//    StaticBoxSizer2->Show(false);

    Panel5->Show(false);
//    StaticBoxSizer2->Show(false);

    hideDe();

}

freqCats fc;

void DlgTstFrame::OnmenXqtOneSelected(wxCommandEvent& event)
{
}

void DlgTstFrame::listCats()
{
    strings.clear();
    cCnt = ca.lk1_read();
    ii = 0;
    while (ii < cCnt)
    {
        strings.Add(to_string(ca.lk1a[ii].idlk1) + " " + ca.lk1a[ii].cat);
        ii++;
    }
    lbxCats->Clear();
    lbxCats->InsertItems(strings, 0);

}

DlgTstFrame::~DlgTstFrame()
{
    //(*Destroy(DlgTstFrame)
    //*)
}

void DlgTstFrame::OnQuit(wxCommandEvent& event)
{
    Close();
}

void DlgTstFrame::OnpanCatsRightUpCats(wxMouseEvent& event)
{
    PopupMenu( & pumCategories );
//   PopupMenu( & pumCategories);
}

void DlgTstFrame::OnLinksRightUp(wxMouseEvent& event)
{
    PopupMenu( & pumLinks );

}

void DlgTstFrame::OnRepRightUp(wxMouseEvent& event)
{
    string buf = "";
    PopupMenu( & pumReport );

}

void DlgTstFrame::OnAbout(wxCommandEvent& event)
{
    wxString msg = wxbuildinfo(long_f);
    wxMessageBox(msg, _("Welcome to..."));
}

string DlgTstFrame::GetText(bool memo, string initVal, string prompt, string caption)
{
    wxString wxInit;
    wxInit = initVal;
    string rval;
    if (memo)
    {
        wxTextEntryDialog dlg(this, prompt, caption, wxInit, (wxCANCEL | wxOK | wxTE_MULTILINE), wxPoint(50, 50));
        if (dlg.ShowModal() == wxID_OK)
        {
            // We can be certain that this string contains letters only.
            wxString value = dlg.GetValue();
            rval = value;
            return rval;
        }
        else
        {
            rval = "";
            return rval;
        }
    }
    else
    {
        wxTextEntryDialog dlg(this, prompt, caption, wxInit, (wxCANCEL | wxOK), wxPoint(50, 50));
        if (dlg.ShowModal() == wxID_OK)
        {
            // We can be certain that this string contains letters only.
            wxString value = dlg.GetValue();
            rval = value;
            return rval;
        }
        else
        {
            rval = "";
            return rval;
        }

    }
}

string DlgTstFrame::GetFileName(string fs)
{
    wxFileDialog openFileDialog(this, _("Open Any file"), defPath, fno, fs, wxFD_OPEN | wxFD_FILE_MUST_EXIST);
    if (openFileDialog.ShowModal() == wxID_CANCEL)
    {
        fileName = " ";
    }
    else
    {
        fileName = openFileDialog.GetPath();
    }

    return fileName;

}

std::string DlgTstFrame::SelDir(string initDir)
{
    string selDir;
    wxDirDialog dlg(NULL, "Choose input directory", initDir, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
    if (dlg.ShowModal() == wxID_OK)
    {
        selDir = dlg.GetPath().ToStdString();
        return selDir;

    }
    dlg.Destroy();

}

void DlgTstFrame::initField(string inputValue, wxTextCtrl * field)
{
    wxString dv = inputValue;
    field->Clear();
    field->SetEditable(true);
    field->ChangeValue(dv);
}

string DlgTstFrame::fieldToString(wxTextCtrl * field)
{
    string rstr;
    wxString s1 = field->GetValue();
    rstr = s1.ToStdString();
    return rstr;
}

void DlgTstFrame::Xqt(string cmd)
{
    cmd = cmd + " & ";
    int idet = -1;
    if ( boost::filesystem::exists( "/home/archman" ) )
    {
        string frst = "/archman/";
        idet = cmd.find(frst);
        if (idet != -1)
        {
            boost::replace_all(cmd, "/archman/", "/archman/");
        }
    }
    const char * c = cmd.c_str();
    int retval = -1;
    retval = system(c);
}

void DlgTstFrame::ListFilesRecursively(const char *dir, const char* ext)
{
    strings.Clear();
    boost::filesystem::recursive_directory_iterator rdi(dir);
    boost::filesystem::recursive_directory_iterator end_rdi;

    std::string buf = "";

    std::string ext_str0(ext);
    for (; rdi != end_rdi; rdi++)
    {
        //rdi++;

        if (ext_str0.compare((*rdi).path().extension().string()) == 0)
        {
            buf = (*rdi).path().string();
            strings.Add(buf);
            std::cout << (*rdi).path().string() << std::endl;
        }
    }
    strings.Sort();
}

int DlgTstFrame::yornQues(string caption, string prompt)
{
    int answer;
    answer = wxMessageBox(caption, prompt, wxYES_NO | wxCANCEL, NULL);
    return answer;
}


void DlgTstFrame::OnmenFontsSelected(wxCommandEvent& event)
{
    wxFontData fontData;
    wxFont     theFont;
    wxColour   colour;

// theFont = pan01->GetFont();
    fontData.SetInitialFont(theFont);
//    colour pan01->GetForegroundColour();
//    colour = lbxCats->GetForegroundColour();
    fontData.SetColour(colour);
    fontData.SetShowHelp(true);

    wxFontDialog *dialog = new wxFontDialog(this);
//	dlgFont *dialog = new dlgFont( this, &fontData );
    if ( dialog->ShowModal() == wxID_OK )
    {
        fontData = dialog->GetFontData();
        theFont = 	fontData.GetChosenFont();
//        pan01->SetFont(theFont);
        lbxCats->SetFont(theFont);
        lbxCats->SetForegroundColour(fontData.GetColour());
        lbxLinks->SetFont(theFont);
        lbxLinks->SetForegroundColour(fontData.GetColour());
        edtCat->SetFont(theFont);
        edtDes->SetFont(theFont);
        edtLinkName->SetFont(theFont);
        edtMem->SetFont(theFont);
        edtUrl->SetFont(theFont);

    }

}

void DlgTstFrame::OnmenColorSelected(wxCommandEvent& event)
{
    wxColourDialog dlgColour(this, &colour_data);

    if (dlgColour.ShowModal() == wxID_OK)
    {
        wxColourData retData = dlgColour.GetColourData();
        wxColour col = retData.GetColour();
        wxBrush brush(col, wxSOLID);
//        pan01->SetBackgroundColour(col);
        if (bkgCat)
        {
            lbxCats->SetBackgroundColour(col);
            edtCat->SetBackgroundColour(col);
            edtDes->SetBackgroundColour(col);
        }
        if (bkgLink)
        {
            lbxLinks->SetBackgroundColour(col);
            edtLinkName->SetBackgroundColour(col);
            edtMem->SetBackgroundColour(col);
            edtUrl->SetBackgroundColour(col);
            textReport->SetBackgroundColour(col);
        }
    }
}

void DlgTstFrame::OnPanel1Paint(wxPaintEvent& event)
{
}

void DlgTstFrame::OnClose(wxCloseEvent& event)
{
    Close();
}

void DlgTstFrame::OnClose1(wxCloseEvent& event)
{
    Close();
}

void DlgTstFrame::OnPanel2Paint3(wxPaintEvent& event)
{
}

void DlgTstFrame::OnlbxCatsSelect(wxCommandEvent& event)
{
}

void DlgTstFrame::OnNotebook1PageChanged2(wxNotebookEvent& event)
{
    if ((Notebook1->GetSelection() == 0) || (Notebook1->GetSelection() == 1))
    {
        Panel5->Show(false);

    }
}

void DlgTstFrame::OnListBox1Select2(wxCommandEvent& event)
{
}

void DlgTstFrame::OnListBox2Select1(wxCommandEvent& event)
{
}

void DlgTstFrame::getLinks()
{
    cCnt = li.lk2_read();
    ii = 0;
    strings.Clear();
    while (ii < cCnt)
    {
        strings.Add(to_string(li.lk2a[ii].idlk2) + " " + li.lk2a[ii].lkn);
        ii++;
    }
    lbxLinks->Clear();
    if (strings.Count() > 0)
    {
        lbxLinks->InsertItems(strings, 0);
    }

}

void DlgTstFrame::hideDe()
{
    edtUrl->Hide();
    edtMem->Hide();
    edtLinkName->Hide();
    btnLnkUpd->Hide();
    btnLnkCancel->Hide();
    edtCat->Hide();
    edtDes->Hide();
    btnCatCancel->Hide();
    btnCatUpd->Hide();

}

void DlgTstFrame::OnlbxCatsDClick(wxCommandEvent& event)
{
    hideDe();
    Notebook2->ChangeSelection(0);
    string zcat = event.GetString().ToStdString();
    li.catNo = zcat.substr(0, zcat.find(" "));
    curCat = std::stoi(li.catNo);
    getLinks();
    Notebook1->ChangeSelection(1);
    li.catNo = li.catNo;
    StatusBar1->SetStatusText(zcat);
}

void DlgTstFrame::XqtLinks()
{
    string sel;
    string bob;
    int i = 0;
//    sel = event.GetString();
    sel = lbxLinks->GetString(lbxLinks->GetSelection()).ToStdString();
    string pat = " ";
    std::size_t found = -1;
    found = sel.find(pat);
    char buffer[200] = { 0 };
    int fnd;
    fnd = found;
    sel.copy(buffer, fnd, 0);
    bob = buffer;
    bob = sel.substr(0, fnd - 0);
    curCat = std::stoi(bob);
    //select lnk from spl where id = 50
//	char * zcmd;
    char * rno;
//	rno = bob;
    string cmd;
//	cmd = "select lnk from spl where id = " + bob;
    cmd = "select lnk from lk2 where idlk2 = " + bob;
    char * zcmd = new char[cmd.size() + 1];
    std::copy(cmd.begin(), cmd.end(), zcmd);
    zcmd[cmd.size()] = '\0';
//	ut.mySqlOne(zcmd);
//	lbxLnk1->Set(ut.strings);
//	notebook->ChangeSelection(1);

    cmd = li.mySqlTwo(zcmd);
    string pref;
////	cmd = ut.mySqlTwo("select lnk from spl where id = " + bob);
    pat = "http";
    found = -1;
    found = cmd.find(pat);
    if (found == -1)
    {
        if (bob == "648")
        {
            string fna = "";
//           defPath = "/home/archman/workspace/cb/cpp/";
//           fna = GetFileName("Code Block Project Files (*.cbp)|*.cbp");

            dlgGetProj * dlg = new dlgGetProj(this, wxID_ANY);
            const char * tdir  = rDir.c_str();
            ListFilesRecursively(tdir, ".cbp");
            dlg->lbxSelProj->Set(strings);
            if (dlg->ShowModal() == wxID_OK)
            {
                fna = dlg->selItem;
                DlgTstFrame::Xqt(cmd + " " + fna);
            }
            dlg->Destroy();
        }
        else
        {
            if (bob == "735")
            {
                string fna = "";
                rDir = "/home/archman/workspace/cb/fort/";

                dlgGetProj * dlg = new dlgGetProj(this, wxID_ANY);
                const char * tdir  = rDir.c_str();
                ListFilesRecursively(tdir, ".cbp");
                dlg->lbxSelProj->Set(strings);
                if (dlg->ShowModal() == wxID_OK)
                {
                    fna = dlg->selItem;
                    DlgTstFrame::Xqt(cmd + " " + fna);
                }
                dlg->Destroy();
                rDir = "/home/archman/workspace/cb/cpp/";

            }
            else
            {
                DlgTstFrame::Xqt(cmd);
            }
        }
    }
    else
    {
        if (bob == "500")
        {
            int answer;
            answer = yornQues("Is This A New Word Press Document?",
                              "New Document?");
            if (answer == wxYES)
            {
                string tbuf;
                tbuf =
                    "<img src=\"https://archbrooks.us/images/usa_3a.gif\" alt=\"\" />\n\nMr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.";
                if (wxTheClipboard->Open())
                {
                    // This data objects are held by the clipboard,
                    // so do not delete them in the app.
                    c = tbuf.c_str();
                    wxTheClipboard->SetData(new wxTextDataObject(c));
                    wxTheClipboard->Close();
                }
            }
        }
        pref = "/usr/bin/konqueror ";
//        pref = "/usr/bin/brave-browser ";
//        pref = "/home/archman/apps/waterfox/waterfox ";
        delete[] zcmd;
        DlgTstFrame::Xqt(pref + cmd);

    }

    pat = "pdf";
    pref = "/usr/bin/okular ";
    found = -1;
    found = cmd.find(pat);
    int found2 = cmd.find("epub");
    if ((found == -1) && (found2 == -1))
    {

    }
    else
    {
        delete[] zcmd;
        DlgTstFrame::Xqt(pref + '\"' + cmd + '\"');
    }

}

void DlgTstFrame::OnlbxLinksDClick(wxCommandEvent& event)
{
    XqtLinks();
}

void DlgTstFrame::OnpumCatEditSelected(wxCommandEvent& event)
{
//    StaticBoxSizer2->Show(true);
    string buf = lbxCats->GetString(lbxCats->GetSelection()).ToStdString();
    string num = buf.substr(0, buf.find(" "));
    ca.tab_lk1.idlk1 = std::stoi(num);
    edtCat->Show();
    edtDes->Show();
    btnCatCancel->Show();
    btnCatUpd->Show();

    ca.rno = num;

    ca.lk1_read();

    li.lnkNo = num;
    li.lk2_read();
    li.lk2a[0];
    Notebook2->ChangeSelection(0);
    initField(ca.lk1a[0].cat, edtCat);
    initField(ca.lk1a[0].ddes, edtDes);
    buf = buf;

    ca.rno = "";

}

void DlgTstFrame::OnpumCatNewCatSelected(wxCommandEvent& event)
{
    //    	notebook->ChangeSelection(0);
    ca.tab_lk1.cat = DlgTstFrame::GetText(false, "", "Enter Category Now!", "New Category");
    ca.tab_lk1.ddes = DlgTstFrame::GetText(true, "Note.", "Enter Detailed Description Now!",
                                           "Detailed Description");
    ca.tab_lk1.idlk1 = 0;
    if ((ca.tab_lk1.cat.length() > 1) && (ca.tab_lk1.ddes.length() > 1))
    {
        ca.lk1_create();
        listCats();
        int ii = 0;
        string buf;

        while (ii < strings.Count())
        {
            buf = strings[ii];
            if (buf.find(ca.tab_lk1.cat) < ca.tab_lk1.cat.length())
            {
                lbxCats->SetFirstItem(ii);
                lbxCats->SetSelection(ii);
                ii = strings.Count() + 1;
                Notebook1->SetSelection(0);
            }
            ii++;
        }
    }
}

void DlgTstFrame::OnpumCatDeleteSelected(wxCommandEvent& event)
{
    wxMessageBox("This function is disable due to the possibility of stranding child records!", "Function Disabled");
}

void DlgTstFrame::OnpumCatMergeSelected(wxCommandEvent& event)
{
}

void DlgTstFrame::Onpum1BkgSelected(wxCommandEvent& event)
{
    bkgCat = true;
    DlgTstFrame::OnmenColorSelected(event);
    bkgCat = false;
}

void DlgTstFrame::OnpumLnkExecuteSelected(wxCommandEvent& event)
{
    XqtLinks();
}

void DlgTstFrame::OnpumLnkNewCatSelected(wxCommandEvent& event)
{
    wxCommandEvent& newevent = event;
    DlgTstFrame::OnpumCatNewCatSelected(newevent);
    Notebook1->ChangeSelection(0);
}

void DlgTstFrame::OnpunLnkNewLinkSelected(wxCommandEvent& event)
{
    if (curCat == -1)
    {
        wxMessageBox("Please Select A Category First!");

    }
    else
    {
        string buf;
        string title;
        buf = GetURL();
        li.tab_lk2.lnk = buf;
//        ut.ld.lnk = buf;
        title = getZTitle(buf);
        li.tab_lk2.lkn = title;
//        ut.ld.lkn = title;
        string cbuf = lbxCats->GetString(lbxCats->GetSelection()).ToStdString();
        curCat = std::stoi(cbuf.substr(0, cbuf.find(" ") - 0));
        li.tab_lk2.idlk1 = curCat;
//        ut.ld.idlk1 = curCat;
        string details;
        details = GetText(true, "Note", "Enter New Description",
                          "Description Data Entry");
        li.tab_lk2.ddes = details;
        li.tab_lk2.idlk2 = 0;
//        ut.ld.ddes = details;
        int i;
        i = 0;
//    ut.IQuery(1);
        li.lk2_dbc.catalog = "bcswebtools";
        li.lk2_create();
        getLinks();
    }

}

void DlgTstFrame::OnpumLnkNPESelected(wxCommandEvent& event)
{
    string buf;
    string title;
//		buf = GetURL();
    li.tab_lk2.lnk = GetFileName("Any files (*)|*");
    title = getZTitle(buf);
    li.tab_lk2.lkn = GetText(false, "", "Enter New Link Name",
                             "Link Name Data Entry");
//    li.tab_lk2.idlk1 = ut.curCat;
    string rno = lbxCats->GetString(lbxCats->GetSelection()).ToStdString();
    rno.erase(rno.find(" "), rno.length());
    li.tab_lk2.idlk1 = stoi(rno);
    string details;
    details = GetText(true, "Note", "Enter New Description",
                      "Description Data Entry");
    li.tab_lk2.ddes = details;
    li.lk2_create();
    getLinks();

}

void DlgTstFrame::OnpumLnkDelLinkSelected(wxCommandEvent& event)
{
    string buf = lbxLinks->GetString(lbxLinks->GetSelection()).ToStdString();
    string num = buf.substr(0, buf.find(" "));
    li.tab_lk2.idlk2 = std::stoi(num);
    if (yornQues("Delete this Record?", "Delete Record Now?") == 2)
    {
        li.lk2_delete();
        getLinks();

    }
}

void DlgTstFrame::OnpumLnkPrtRepSelected(wxCommandEvent& event)
{
    Panel5->Show(true);
    string fileName = "textfile.txt";
    sw.open(fileName);
    int i;
    int idet;
    std::size_t rnum;
    string numbuf;
    string buf;
    for (i = 0; i < strings.GetCount(); i++)
    {
        buf = strings[i].mb_str(wxConvUTF8);
        idet = buf.find(' ');
        numbuf = buf.substr(0, (idet -0));
        rnum = stoi (numbuf);
        buf.erase(0, idet);
        sw << setw(5) << numbuf << " " << setw(40) << setiosflags(ios::left)
           << buf
           << resetiosflags(ios::left)
           << std::endl;

        cout << buf << endl;
    }
    sw.close();
    textReport->LoadFile("textfile.txt", wxTEXT_TYPE_ANY);
    Notebook1->ChangeSelection(2);

}

void DlgTstFrame::OnpumLnkMergeSelected(wxCommandEvent& event)
{
}

void DlgTstFrame::OnpubLnkELinkSelected(wxCommandEvent& event)
{
//    StaticBoxSizer2->Show(true);
    string buf = lbxLinks->GetString(lbxLinks->GetSelection()).ToStdString();
    if (buf.length() > 0)
    {
        string num = buf.substr(0, buf.find(" "));
        li.tab_lk2.idlk2 = std::stoi(num);
        edtUrl->Show();
        edtMem->Show();
        edtLinkName->Show();
        btnLnkUpd->Show();
        btnLnkCancel->Show();
        li.lnkNo = num;
        li.lk2_read();
        li.lk2a[0];
        Notebook2->ChangeSelection(1);
        initField(li.lk2a[0].lkn, edtLinkName);
        initField(li.lk2a[0].lnk, edtUrl);
        initField(li.lk2a[0].ddes, edtMem);
    }
    buf = buf;
}

void DlgTstFrame::OnpumLnkNGSelected(wxCommandEvent& event)
{
}

void DlgTstFrame::OnPanel2Paint4(wxPaintEvent& event)
{
}

string DlgTstFrame::GetURL()   // @suppress("No return")
{
    /*
    string buf;
    if (wxTheClipboard->Open())
    {
        if (wxTheClipboard->IsSupported(wxDF_TEXT))
        {
            wxTextDataObject data;
            wxTheClipboard->GetData(data);
            buf = data.GetText();
    //	        wxMessageBox( data.GetText() );

        }
        wxTheClipboard->Close();
        return buf;
    //		type filter text
    }
    */
}

static size_t data_write(void* buf, size_t size, size_t nmemb, void* userp)
{
    if (userp)
    {
        std::ostream& os = *static_cast<std::ostream*>(userp);
        std::streamsize len = size * nmemb;
        if (os.write(static_cast<char*>(buf), len))
            return len;
    }

    return 0;
}

CURLcode curl_read(const std::string& url, std::ostream& os,
                   long timeout = 30)
{
    CURLcode code(CURLE_FAILED_INIT);
    CURL* curl = curl_easy_init();

    if (curl)
    {
        if (CURLE_OK
                == (code = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
                                            &data_write)) && CURLE_OK
                == (code = curl_easy_setopt(curl, CURLOPT_NOPROGRESS,
                                            1L)) && CURLE_OK
                == (code = curl_easy_setopt(curl,
                                            CURLOPT_SSL_VERIFYHOST, 0L))
                && CURLE_OK
                == (code = curl_easy_setopt(curl,
                                            CURLOPT_FOLLOWLOCATION, 1L))
                && CURLE_OK
                == (code = curl_easy_setopt(curl, CURLOPT_FILE, &os))
                && CURLE_OK
                == (code = curl_easy_setopt(curl, CURLOPT_TIMEOUT,
                                            timeout)) && CURLE_OK == (code =
                                                    curl_easy_setopt(curl, CURLOPT_URL, url.c_str())))
        {
//						curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, false);

            code = curl_easy_perform(curl);
        }
        curl_easy_cleanup(curl);
    }
    return code;
}

string DlgTstFrame::getZTitle(string url)
{
    string retVal;
    string rbuf;
    curl_global_init (CURL_GLOBAL_ALL);
    int ii;
    /*
     * We use Curl to fetch the web page per the URL.
     *
     * A string stream is used to hold the web page
     *
     */

    std::ostringstream oss;
    if (CURLE_OK == curl_read(url, oss))
    {
        // Web page successfully written to string
        int ista;
        int isto;
        string html;
        html = oss.str();
        std::ofstream file("filename.txt");
        file << oss.str();

        string sb;
        string se;
//		ista = html.find("TITLE");
//		if ((ista != -1) and (ista < html.length())) {
//			sb = "<TITLE>";
//			se = "</TITLE>";
//		} else {
        sb = "<title>";
        se = "</title>";
//		}
        ista = html.find(sb);
        int rest;
        rest = 0;
//		sb = "<title";
//		se = "</title>";
        ista = html.find(sb);
//		if (ista > -1) {
//			isto = html.find(">");
//			rest = (isto - (ista + 6));
//		}
//		ista = ista + sb.length() + rest;
        ista = ista + 7;
        isto = html.find(se);
        int ilen;
        ilen = isto - ista;
        char buffer[5000] = { 0 };
//		html.copy(html, ista, ilen);
        rbuf = html.substr(ista, ilen);
        string frs = "";
        string tos = "";
        frs = "&quot;";
        tos = '"';
        boost::replace_all(rbuf, frs, tos);
        frs = "&#39;";
        tos = "'";
        boost::replace_all(rbuf, frs, tos);
        if (ilen > 500)
        {
            rbuf = "Dummy Title";

        }
        else
        {
//			rbuf = html.substr(ista, ilen);
        }
        ilen = ilen; // @suppress("Assignment to itself")

        /*
         * The Boost tokenizer is used to parse the string stream into lines of code
         */
//		ii = strToLine(html);
//		lcnt = ii;
        /*
         * This routine reads the lines of code until the <Title> tag is encountered.
         *
         * The line containing the title tag is trimmed on both sides.
         *
         * The HTML tags are discarded leaving us with the title for the web page.
         *
         * Retval contains the web pate title.
         *
         */
//		retVal = getTitle(ii);

    }
    curl_global_cleanup();
    return rbuf;
}

void DlgTstFrame::OnbtnLnkUpdClick(wxCommandEvent& event)
{
    li.tab_lk2.ddes = fieldToString(edtMem);
    li.tab_lk2.idlk1 = li.lk2a[0].idlk1;
    li.tab_lk2.idlk2 = li.lk2a[0].idlk2;
    li.tab_lk2.lkn = fieldToString(edtLinkName);
    li.tab_lk2.lnk = fieldToString(edtUrl);
    li.lk2_update();
    initField("", edtLinkName);
    initField("", edtUrl);
    initField("", edtMem);
    edtLinkName->Hide();
    edtMem->Hide();
    edtUrl->Hide();
    btnLnkUpd->Hide();
    Notebook2->ChangeSelection(0);
    getLinks();
}

void DlgTstFrame::OnpumKwSearchSelected(wxCommandEvent& event)
{
    kwSearch dlg(this, wxID_ANY);
    dlg.catOpt = false;
    dlg.dlgInit();
    if (dlg.ShowModal() == wxID_OK)
    {

    }
    dlg.Destroy();
}

void DlgTstFrame::OnpumLinksCompileSelected(wxCommandEvent& event)
{
    string buf = lbxLinks->GetString(lbxLinks->GetSelection()).ToStdString();
    int idet = 0;
    idet = buf.find(" ");
    buf.erase(idet, buf.length());
    li.lk2_dbc.catalog = "bcswebtools";
    li.oneItem = true;
    li.cat = buf;
    li.lk2_read();
    buf = li.lk2a[0].lnk;
    li.oneItem = false;
    li.cat = "";
    idet = buf.find("bin/R");
    if (idet < buf.length())
    {
        std::size_t found = buf.find_last_of("/\\");
        string file = buf.substr(found+1);
        buf.erase(idet, buf.length());
        buf = "/usr/local/bin/codeblocks " + buf + file + ".cbp";
        Xqt(buf);
        buf = buf;

    }
    else
    {
        wxMessageBox("Your Selection Is Not c++ Source Code!");
    }
}

void DlgTstFrame::OnpumCatsRefreshSelected(wxCommandEvent& event)
{
    listCats();
    if (yornQues("Would you like to position categories to default position?", "Set To Default Position?") == 2)
    {
        DlgTstFrame::OnmenHomeSelected(event);
    }

}

void DlgTstFrame::OnmenHomeSelected(wxCommandEvent& event)
{
    wxString tpos = "";
    tpos = "56 Frequently Used Applications";
    tpos = fc.selCats();
    lbxCats->SetSelection(lbxCats->FindString(tpos, true));
    lbxCats->SetFirstItem(lbxCats->GetSelection());
}

void DlgTstFrame::OnbtnCancelClick(wxCommandEvent& event)
{
    initField("", edtLinkName);
    initField("", edtUrl);
    initField("", edtMem);
    edtLinkName->Hide();
    edtMem->Hide();
    edtUrl->Hide();
    btnLnkUpd->Hide();
    btnLnkCancel->Hide();
    Notebook2->ChangeSelection(0);
    getLinks();

}

void DlgTstFrame::OnbtnCatUpdClick(wxCommandEvent& event)
{
    ca.tab_lk1.cat = fieldToString(edtCat);
    ca.tab_lk1.ddes = fieldToString(edtDes);
    ca.lk1_update();
    hideDe();
    Notebook2->ChangeSelection(0);
    listCats();

}

void DlgTstFrame::OnbtnCatCancelClick(wxCommandEvent& event)
{
    initField("", edtCat);
    initField("", edtDes);
    hideDe();
    Notebook2->ChangeSelection(0);

}

void DlgTstFrame::OnpumLinkBkgSelected(wxCommandEvent& event)
{
    bkgLink = true;
    DlgTstFrame::OnmenColorSelected(event);
    bkgLink = false;
}

void DlgTstFrame::OnResize(wxSizeEvent& event)
{
    /*
     if( ! ( lbxCats && lbxLinks ) )
        return;
        wxRect frame_client = GetClientRect();
    wxSize min(frame_client.width/2,frame_client.height );
    lbxCats->SetMinSize(min);
    */

}

void DlgTstFrame::OnpumRepPrintSelected(wxCommandEvent& event)
{
    string buf2 = "";
    buf2 = buf2;
    string cmd = "print textfile.txt";
    Xqt(cmd);
    std::ifstream f("file.txt");

    if (f.is_open())
        std::cout << f.rdbuf();
    f.close();
    string buf = "";
    int i = textReport->GetNumberOfLines();
    int ii = 0;
    while (ii < i)
    {
        buf = textReport->GetLineText(ii).ToStdString();
        ii++;
    }
}

void DlgTstFrame::OntextReportText(wxCommandEvent& event)
{
    PopupMenu( & pumReport );
}

void DlgTstFrame::OnmenReportSelected(wxCommandEvent& event)
{
//    wxDC *dc = GetDC();

}

// A global object storing print settings
//wxPrintDialogData g_printDialogData;

// Handler for Print menu item
/*
void DlgTstFrame::OnPrint(wxCommandEvent& event)
{

    wxPrinter printer(& g_printDialogData);
    MyPrintout printout(wxT("My printout"));
//    wxPrintout printout(wxT("My printout"));

    if (!printer.Print(this, &printout, true))
    {
        if (wxPrinter::GetLastError() == wxPRINTER_ERROR)
            wxMessageBox(wxT("There was a problem printing.\nPerhaps your current printer is not set correctly?"), wxT("Printing"), wxOK);
        else
            wxMessageBox(wxT("You cancelled printing"),
                         wxT("Printing"), wxOK);
    }
    else
    {
        (*g_printDialogData) = printer.GetPrintDialogData();
    }
}
*/

//freqCats fc;
bcswebtools_lk3_io ct2;

void DlgTstFrame::OnmenTDlgSelected(wxCommandEvent& event)
{
    /*
    ct2.tab_lk3.cat = fc.showCats();
    ct2.tab_lk3.id = 0;
    if (ct2.tab_lk3.cat.length() > 0)
    {
        ct2.lk3_create();
    }
    */

    fc.selCats();

}

void DlgTstFrame::OnpumCatKwdSelected(wxCommandEvent& event)
{

    kwSearch dlg(this, wxID_ANY);
    dlg.catOpt = true;
    dlg.dlgInit();
    if (dlg.ShowModal() == wxID_OK)
    {
        wxString itemz;
        itemz = dlg.sel;
        lbxCats->SetSelection(lbxCats->FindString(itemz, false));
        lbxCats->SetFirstItem(lbxCats->FindString(itemz, false));

    }
//    dlg.catOpt = false;
    dlg.Destroy();
}

void DlgTstFrame::OnmenCppXqtSelected(wxCommandEvent& event)
{
    string cmd;
    cmd = "/usr/bin/codeblocks";
    string fna = "";
    rDir = "/home/archman/workspace/cb/cpp/";
    dlgGetProj * dlg = new dlgGetProj(this, wxID_ANY);
    const char * tdir  = rDir.c_str();
    ListFilesRecursively(tdir, ".cbp");
    dlg->lbxSelProj->Set(strings);
    if (dlg->ShowModal() == wxID_OK)
    {
        fna = dlg->selItem;
        DlgTstFrame::Xqt(cmd + " " + fna);
    }
    dlg->Destroy();

}

void DlgTstFrame::OnmenFortXqtSelected(wxCommandEvent& event)
{
    string cmd = "/usr/bin/codeblocks";
    string fna = "";
    rDir = "/home/archman/workspace/cb/fort/";

    dlgGetProj * dlg = new dlgGetProj(this, wxID_ANY);
    const char * tdir  = rDir.c_str();
    ListFilesRecursively(tdir, ".cbp");
    dlg->lbxSelProj->Set(strings);
    if (dlg->ShowModal() == wxID_OK)
    {
        fna = dlg->selItem;
        DlgTstFrame::Xqt(cmd + " " + fna);
    }
    dlg->Destroy();
    rDir = "/home/archman/workspace/cb/cpp/";

}

void DlgTstFrame::OnmenCobXqtSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/usr/bin/python3 /usr/local/bin/opencobolide");
}

void DlgTstFrame::OnmenWPSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/libreoffice --writer");
}

void DlgTstFrame::OnmenTBSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/usr/bin/thunderbird");
}

void DlgTstFrame::OnmenQTDSelected(wxCommandEvent& event)
{
    Xqt("/home/archman/apps/Qt5.9.7/Tools/QtCreator/bin/qtcreator");
}

void DlgTstFrame::OnmenCBroSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("chromium");
}

void DlgTstFrame::OnmenCppGenSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/home/archman/workspace/cb/cpp/cbpgen/bin/Release/cbpgen");
}

/*
void DlgTstFrame::OnmenWPSelected1(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/usr/bin/libreoffice --writer");
}
*/

void DlgTstFrame::OnmenCpGenSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/home/archman/workspace/cb/cpp/cbpgen/bin/Release/cbpgen");
}

void DlgTstFrame::OnmenPDocSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/home/archman/workspace/cb/cpp/pDoc2/bin/Release/pDoc2");
}

void DlgTstFrame::OnmenUpTabSelected(wxCommandEvent& event)
{
    /*
    li.lk2All = true;
    li.lnkNo = "";
    li.oneItem = false;
    size_t lRec;
    lRec = li.lk2_read();
    size_t cnt = 0;
    while (cnt < lRec-1)
    {
    //        li.lk2a[i]
        if (li.lk2a[cnt].lnk.find("archman") > 0)
        {
            boost::replace_all(li.lk2a[cnt].lnk, "archman", "archman");
            li.tab_lk2.idlk1 = li.lk2a[cnt].idlk1;
            li.tab_lk2.idlk2 = li.lk2a[cnt].idlk2;
            li.tab_lk2.ddes = li.lk2a[cnt].ddes;
            li.tab_lk2.lkn = li.lk2a[cnt].lkn;
            li.tab_lk2.lnk = li.lk2a[cnt].lnk;
            li.lk2_update();
        }
        cnt++;
    }
    li.lk2a[1].lnk = li.lk2a[1].lnk;
    lRec = lRec;
    li.lk2All = false;
    */
}

void DlgTstFrame::OnmenPuttySelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/putty ");
}

void DlgTstFrame::OnmenCobGenSelected(wxCommandEvent& event)
{
    Xqt("/home/archman/workspace/cb/cpp/gencobo/bin/Release/gencobo");
}

void DlgTstFrame::OnmenWebMinSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://archbrooks.us:10000");
}

void DlgTstFrame::OnmenKazamSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/kazam");
}

void DlgTstFrame::OnmenKdenSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/kdenlive");
}

void DlgTstFrame::OnmenYouTubeSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://youtube.com/archman007");
}

void DlgTstFrame::OnmenMACCwsSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://macc.edu");
}

void DlgTstFrame::OnmenMymaccSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://my.macc.edu");
}

void DlgTstFrame::OnmenKonqSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror");
}

void DlgTstFrame::OnmanVisStudSelected(wxCommandEvent& event)
{
    Xqt("/usr/share/code/code --no-sandbox --unity-launch");
}

void DlgTstFrame::OnmenWxWidSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://forums.wxwidgets.org/");
}

void DlgTstFrame::OnmenKDESelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://forum.kde.org/");
}

void DlgTstFrame::OnmenStaOvSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://stackoverflow.com/");
}

void DlgTstFrame::OnmenWPNewSelected(wxCommandEvent& event)
{
    int answer;
    answer = yornQues("Is This A New Word Press Document?",
                      "New Document?");
    if (answer == wxYES)
    {
        string tbuf;
        tbuf =
            "<img src=\"https://archbrooks.us/images/usa_3a.gif\" alt=\"\" />\n\nMr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.";
        if (wxTheClipboard->Open())
        {
            // This data objects are held by the clipboard,
            // so do not delete them in the app.
            c = tbuf.c_str();
            wxTheClipboard->SetData(new wxTextDataObject(c));
            wxTheClipboard->Close();
        }
        Xqt("/usr/bin/konqueror https://archbrooks.us/b4");
    }

}

void DlgTstFrame::OnmenCBForumsSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror http://forums.codeblocks.org/");
}

void DlgTstFrame::OnmenBForumSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://support.mozilla.org/en-US/products/thunderbird");
}

void DlgTstFrame::OnmenBBSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/pkexec /usr/bin/bleachbit");
}

void DlgTstFrame::OnmenIntSTSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://www.speedtest.net/");
}

void DlgTstFrame::OnmenPandoraSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/pithos");
}

void DlgTstFrame::OnmenKICSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/kinfocenter");
}

void DlgTstFrame::OnmenBraveSelected(wxCommandEvent& event)
{
    Xqt("/snap/bin/brave");
}

void DlgTstFrame::OnmenDelPopSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror http://cc.embarcadero.com/PopularAuthors.aspx");
}

void DlgTstFrame::OnmenFBXSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror http://www.facebook.com/arch.brooks");

}

void DlgTstFrame::OnmenKubuntuSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://kubuntu.org/");

}
// TODO (archman#1#): fix ldoncfig ...
//
//Set variable: LD_LIBRARY_PATH=.:/home/archman/apps/mysql-connector-c++-8.0.22-linux-glibc2.12-x86-64bit/lib64/:/usr/local/lib:

void DlgTstFrame::OnmenWmMcSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://secure.walmartmoneycard.com/login");
}

void DlgTstFrame::OnmenNFLSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://nfl.com");
}

void DlgTstFrame::OnmenUFCSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/konqueror https://ufc.com");
}

void DlgTstFrame::OnmenMIPSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://whatismyipaddress.com/");
}

void DlgTstFrame::OnmenKodiSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/kodi");
}

void DlgTstFrame::OnmenGDWebMailSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://email27.godaddy.com/webmail.php");
}

[/codesyntax]

The updated c++ souce code is below.

[codesyntax lang=”cpp”]

/***************************************************************
 * Name:      DlgTstMain.cpp
 * Purpose:   Code for Application Frame
 * Author:    Mr. Arch Brooks (arch@archman.com)
 * Created:   2019-08-28
 * Copyright: Mr. Arch Brooks (archman.us/b4)
 * License:
 **************************************************************/

#include "DlgTstMain.h"
#include <wx/msgdlg.h>
#include <wx/textdlg.h>
#include <wx/filedlg.h>
#include <wx/dirdlg.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <wx/msgdlg.h>

#include <wx/dirdlg.h>
#include <wx/fontdlg.h>
//#include "kwSearch.h"
#include <wx/colordlg.h>
#include <wx/brush.h>
#include "bcswebtools_lk1_io.h"
#include "bcswebtools_lk2_io.h"
#include "bcswebtools_lk3_io.h"
#include "dlgGetProj.h"
#include <wx/clipbrd.h>
#include <curl/curl.h>
#include <curl/easy.h>

#include "kwSearch.h"
#include <iomanip>
#include <wx/printdlg.h>
#include "freqCats.h"



bcswebtools_lk1_io ca;
bcswebtools_lk2_io li;

//(*InternalHeaders(DlgTstFrame)
#include <wx/intl.h>
#include <wx/settings.h>
#include <wx/string.h>
//*)

//helper functions
enum wxbuildinfoformat
{
    short_f, long_f
};

wxString wxbuildinfo(wxbuildinfoformat format)
{
    wxString wxbuild(wxVERSION_STRING);

    if (format == long_f )
    {
#if defined(__WXMSW__)
        wxbuild << _T("-Windows");
#elif defined(__UNIX__)
        wxbuild << _T("-Linux");
#endif

#if wxUSE_UNICODE
        wxbuild << _T("-Unicode build");
#else
        wxbuild << _T("-ANSI build");
#endif // wxUSE_UNICODE
    }

    return wxbuild;
}

//(*IdInit(DlgTstFrame)
const long DlgTstFrame::ID_LISTBOX1 = wxNewId();
const long DlgTstFrame::ID_PANEL2 = wxNewId();
const long DlgTstFrame::ID_LISTBOX2 = wxNewId();
const long DlgTstFrame::ID_PANEL3 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL6 = wxNewId();
const long DlgTstFrame::ID_PANEL6 = wxNewId();
const long DlgTstFrame::ID_NOTEBOOK1 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL7 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL8 = wxNewId();
const long DlgTstFrame::ID_BUTTON5 = wxNewId();
const long DlgTstFrame::ID_BUTTON6 = wxNewId();
const long DlgTstFrame::ID_PANEL7 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL1 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL2 = wxNewId();
const long DlgTstFrame::ID_TEXTCTRL3 = wxNewId();
const long DlgTstFrame::ID_BUTTON1 = wxNewId();
const long DlgTstFrame::ID_BUTTON2 = wxNewId();
const long DlgTstFrame::ID_PANEL8 = wxNewId();
const long DlgTstFrame::ID_NOTEBOOK3 = wxNewId();
const long DlgTstFrame::ID_PANEL1 = wxNewId();
const long DlgTstFrame::ID_MENUITEM23 = wxNewId();
const long DlgTstFrame::idMenCpX = wxNewId();
const long DlgTstFrame::idMenPD = wxNewId();
const long DlgTstFrame::ID_MENUITEM33 = wxNewId();
const long DlgTstFrame::ID_MENUITEM43 = wxNewId();
const long DlgTstFrame::ID_MENUITEM27 = wxNewId();
const long DlgTstFrame::idMenucpp = wxNewId();
const long DlgTstFrame::idMenFort = wxNewId();
const long DlgTstFrame::idMenCob = wxNewId();
const long DlgTstFrame::ID_MENUITEM44 = wxNewId();
const long DlgTstFrame::ID_MENUITEM62 = wxNewId();
const long DlgTstFrame::ID_MENUITEM64 = wxNewId();
const long DlgTstFrame::ID_MENUITEM26 = wxNewId();
const long DlgTstFrame::idCBX = wxNewId();
const long DlgTstFrame::ID_MENUITEM42 = wxNewId();
const long DlgTstFrame::ID_MENUITEM57 = wxNewId();
const long DlgTstFrame::ID_MENUITEM29 = wxNewId();
const long DlgTstFrame::ID_MENUITEM31 = wxNewId();
const long DlgTstFrame::idMenWP = wxNewId();
const long DlgTstFrame::ID_MENUITEM32 = wxNewId();
const long DlgTstFrame::ID_MENUITEM67 = wxNewId();
const long DlgTstFrame::ID_MENUITEM34 = wxNewId();
const long DlgTstFrame::ID_MENUITEM49 = wxNewId();
const long DlgTstFrame::ID_MENUITEM69 = wxNewId();
const long DlgTstFrame::ID_MENUITEM40 = wxNewId();
const long DlgTstFrame::ID_MENUITEM41 = wxNewId();
const long DlgTstFrame::ID_MENUITEM39 = wxNewId();
const long DlgTstFrame::ID_MENUITEM28 = wxNewId();
const long DlgTstFrame::ID_MENUITEM36 = wxNewId();
const long DlgTstFrame::ID_MENUITEM37 = wxNewId();
const long DlgTstFrame::ID_MENUITEM38 = wxNewId();
const long DlgTstFrame::ID_MENUITEM68 = wxNewId();
const long DlgTstFrame::ID_MENUITEM35 = wxNewId();
const long DlgTstFrame::ID_MENUITEM46 = wxNewId();
const long DlgTstFrame::ID_MENUITEM47 = wxNewId();
const long DlgTstFrame::ID_MENUITEM50 = wxNewId();
const long DlgTstFrame::ID_MENUITEM51 = wxNewId();
const long DlgTstFrame::ID_MENUITEM48 = wxNewId();
const long DlgTstFrame::SlashDot = wxNewId();
const long DlgTstFrame::ID_MENUITEM45 = wxNewId();
const long DlgTstFrame::ID_MENUITEM53 = wxNewId();
const long DlgTstFrame::ID_MENUITEM54 = wxNewId();
const long DlgTstFrame::ID_MENUITEM55 = wxNewId();
const long DlgTstFrame::ID_MENUITEM56 = wxNewId();
const long DlgTstFrame::ID_MENUITEM52 = wxNewId();
const long DlgTstFrame::ID_MENUITEM59 = wxNewId();
const long DlgTstFrame::ID_MENUITEM60 = wxNewId();
const long DlgTstFrame::ID_MENUITEM61 = wxNewId();
const long DlgTstFrame::ID_MENUITEM63 = wxNewId();
const long DlgTstFrame::ID_MENUITEM65 = wxNewId();
const long DlgTstFrame::ID_MENUITEM66 = wxNewId();
const long DlgTstFrame::ID_MENUITEM70 = wxNewId();
const long DlgTstFrame::ID_MENUITEM58 = wxNewId();
const long DlgTstFrame::ID_MENUITEM24 = wxNewId();
const long DlgTstFrame::ID_MENUITEM30 = wxNewId();
const long DlgTstFrame::idMenuQuit = wxNewId();
const long DlgTstFrame::ID_MENUITEM2 = wxNewId();
const long DlgTstFrame::ID_MENUITEM3 = wxNewId();
const long DlgTstFrame::idMenuAbout = wxNewId();
const long DlgTstFrame::ID_STATUSBAR1 = wxNewId();
const long DlgTstFrame::ID_MENUITEM4 = wxNewId();
const long DlgTstFrame::ID_MENUITEM5 = wxNewId();
const long DlgTstFrame::ID_MENUITEM6 = wxNewId();
const long DlgTstFrame::ID_MENUITEM25 = wxNewId();
const long DlgTstFrame::ID_MENUITEM7 = wxNewId();
const long DlgTstFrame::ID_MENUITEM17 = wxNewId();
const long DlgTstFrame::ID_MENUITEM20 = wxNewId();
const long DlgTstFrame::ID_MENUITEM21 = wxNewId();
const long DlgTstFrame::ID_MENUITEM19 = wxNewId();
const long DlgTstFrame::ID_MENUITEM18 = wxNewId();
const long DlgTstFrame::ID_MENUITEM8 = wxNewId();
const long DlgTstFrame::ID_MENUITEM9 = wxNewId();
const long DlgTstFrame::ID_MENUITEM10 = wxNewId();
const long DlgTstFrame::ID_MENUITEM11 = wxNewId();
const long DlgTstFrame::ID_MENUITEM12 = wxNewId();
const long DlgTstFrame::ID_MENUITEM13 = wxNewId();
const long DlgTstFrame::ID_MENUITEM14 = wxNewId();
const long DlgTstFrame::ID_MENUITEM15 = wxNewId();
const long DlgTstFrame::ID_MENUITEM16 = wxNewId();
const long DlgTstFrame::ID_MENUITEM1 = wxNewId();
const long DlgTstFrame::ID_MENUITEM22 = wxNewId();
//*)

BEGIN_EVENT_TABLE(DlgTstFrame,wxFrame)
    //(*EventTable(DlgTstFrame)
    //*)
END_EVENT_TABLE()

DlgTstFrame::DlgTstFrame(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(DlgTstFrame)
    wxBoxSizer* BoxSizer1;
    wxBoxSizer* BoxSizer2;
    wxBoxSizer* BoxSizer3;
    wxBoxSizer* BoxSizer4;
    wxBoxSizer* BoxSizer5;
    wxBoxSizer* BoxSizer6;
    wxBoxSizer* BoxSizer7;
    wxBoxSizer* BoxSizer8;
    wxBoxSizer* BoxSizer9;
    wxMenu* Menu1;
    wxMenu* Menu2;
    wxMenuBar* MenuBar1;
    wxMenuItem* MenuItem1;
    wxMenuItem* MenuItem2;
    wxStaticBoxSizer* StaticBoxSizer1;
    wxStaticBoxSizer* StaticBoxSizer3;

    Create(parent, id, _("BCS Programmer\'s Workbench"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE, _T("id"));
    BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
    pan01 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
    BoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
    StaticBoxSizer1 = new wxStaticBoxSizer(wxHORIZONTAL, pan01, _("Traverse Categories"));
    Notebook1 = new wxNotebook(pan01, ID_NOTEBOOK1, wxDefaultPosition, wxSize(392,367), wxNB_BOTTOM, _T("ID_NOTEBOOK1"));
    Panel1 = new wxPanel(Notebook1, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL2"));
    Panel1->SetBackgroundColour(wxColour(0,163,255));
    BoxSizer3 = new wxBoxSizer(wxVERTICAL);
    lbxCats = new wxListBox(Panel1, ID_LISTBOX1, wxPoint(0,-8), wxSize(381,320), 0, 0, wxBORDER_SUNKEN|wxFULL_REPAINT_ON_RESIZE, wxDefaultValidator, _T("ID_LISTBOX1"));
    lbxCats->SetBackgroundColour(wxColour(0,163,255));
    BoxSizer3->Add(lbxCats, 1, wxALL|wxEXPAND, 5);
    Panel1->SetSizer(BoxSizer3);
    BoxSizer3->Fit(Panel1);
    BoxSizer3->SetSizeHints(Panel1);
    Panel2 = new wxPanel(Notebook1, ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL3"));
    Panel2->SetBackgroundColour(wxColour(0,0,0));
    BoxSizer4 = new wxBoxSizer(wxVERTICAL);
    lbxLinks = new wxListBox(Panel2, ID_LISTBOX2, wxDefaultPosition, wxSize(381,320), 0, 0, wxBORDER_SUNKEN|wxFULL_REPAINT_ON_RESIZE, wxDefaultValidator, _T("ID_LISTBOX2"));
    lbxLinks->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUHILIGHT));
    BoxSizer4->Add(lbxLinks, 1, wxALL|wxEXPAND, 5);
    Panel2->SetSizer(BoxSizer4);
    BoxSizer4->Fit(Panel2);
    BoxSizer4->SetSizeHints(Panel2);
    Panel5 = new wxPanel(Notebook1, ID_PANEL6, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL6"));
    BoxSizer5 = new wxBoxSizer(wxVERTICAL);
    textReport = new wxTextCtrl(Panel5, ID_TEXTCTRL6, _("Text"), wxDefaultPosition, wxSize(389,326), wxTE_MULTILINE|wxHSCROLL, wxDefaultValidator, _T("ID_TEXTCTRL6"));
    BoxSizer5->Add(textReport, 1, wxALL|wxEXPAND, 5);
    Panel5->SetSizer(BoxSizer5);
    BoxSizer5->Fit(Panel5);
    BoxSizer5->SetSizeHints(Panel5);
    Notebook1->AddPage(Panel1, _("Category"), false);
    Notebook1->AddPage(Panel2, _("Links"), false);
    Notebook1->AddPage(Panel5, _("Report"), false);
    StaticBoxSizer1->Add(Notebook1, 1, wxALL|wxEXPAND, 5);
    BoxSizer2->Add(StaticBoxSizer1, 3, wxEXPAND, 2);
    StaticBoxSizer3 = new wxStaticBoxSizer(wxHORIZONTAL, pan01, _("    Data Entry    "));
    Notebook2 = new wxNotebook(pan01, ID_NOTEBOOK3, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM, _T("ID_NOTEBOOK3"));
    Panel6 = new wxPanel(Notebook2, ID_PANEL7, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL7"));
    BoxSizer6 = new wxBoxSizer(wxVERTICAL);
    edtCat = new wxTextCtrl(Panel6, ID_TEXTCTRL7, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL7"));
    BoxSizer6->Add(edtCat, 0, wxALL|wxEXPAND, 2);
    edtDes = new wxTextCtrl(Panel6, ID_TEXTCTRL8, _("Text"), wxDefaultPosition, wxSize(378,123), wxTE_MULTILINE, wxDefaultValidator, _T("ID_TEXTCTRL8"));
    BoxSizer6->Add(edtDes, 1, wxALL|wxEXPAND, 2);
    BoxSizer8 = new wxBoxSizer(wxHORIZONTAL);
    btnCatUpd = new wxButton(Panel6, ID_BUTTON5, _("Update"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON5"));
    BoxSizer8->Add(btnCatUpd, 1, wxEXPAND, 2);
    btnCatCancel = new wxButton(Panel6, ID_BUTTON6, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON6"));
    BoxSizer8->Add(btnCatCancel, 1, wxEXPAND, 2);
    BoxSizer6->Add(BoxSizer8, 0, wxALL|wxEXPAND, 2);
    Panel6->SetSizer(BoxSizer6);
    BoxSizer6->Fit(Panel6);
    BoxSizer6->SetSizeHints(Panel6);
    Panel7 = new wxPanel(Notebook2, ID_PANEL8, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL8"));
    BoxSizer7 = new wxBoxSizer(wxVERTICAL);
    edtLinkName = new wxTextCtrl(Panel7, ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
    BoxSizer7->Add(edtLinkName, 0, wxALL|wxEXPAND, 2);
    edtUrl = new wxTextCtrl(Panel7, ID_TEXTCTRL2, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
    BoxSizer7->Add(edtUrl, 0, wxALL|wxEXPAND, 2);
    edtMem = new wxTextCtrl(Panel7, ID_TEXTCTRL3, wxEmptyString, wxDefaultPosition, wxSize(396,228), wxTE_MULTILINE, wxDefaultValidator, _T("ID_TEXTCTRL3"));
    BoxSizer7->Add(edtMem, 1, wxALL|wxEXPAND, 2);
    BoxSizer9 = new wxBoxSizer(wxHORIZONTAL);
    btnLnkUpd = new wxButton(Panel7, ID_BUTTON1, _("Update"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
    BoxSizer9->Add(btnLnkUpd, 1, wxALL|wxEXPAND, 5);
    btnLnkCancel = new wxButton(Panel7, ID_BUTTON2, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
    BoxSizer9->Add(btnLnkCancel, 1, wxALL|wxEXPAND, 5);
    BoxSizer7->Add(BoxSizer9, 0, wxALL|wxEXPAND, 2);
    Panel7->SetSizer(BoxSizer7);
    BoxSizer7->Fit(Panel7);
    BoxSizer7->SetSizeHints(Panel7);
    Notebook2->AddPage(Panel6, _("Categories"), false);
    Notebook2->AddPage(Panel7, _("Links"), false);
    StaticBoxSizer3->Add(Notebook2, 1, wxEXPAND, 2);
    BoxSizer2->Add(StaticBoxSizer3, 2, wxEXPAND, 2);
    pan01->SetSizer(BoxSizer2);
    BoxSizer2->Fit(pan01);
    BoxSizer2->SetSizeHints(pan01);
    BoxSizer1->Add(pan01, 1, wxALL|wxEXPAND, 0);
    SetSizer(BoxSizer1);
    MenuBar1 = new wxMenuBar();
    Menu1 = new wxMenu();
    menReport = new wxMenuItem(Menu1, ID_MENUITEM23, _("Report"), wxEmptyString, wxITEM_NORMAL);
    Menu1->Append(menReport);
    MenuItem4 = new wxMenu();
    menCpGen = new wxMenuItem(MenuItem4, idMenCpX, _("Generate c++ Project"), _("Execute c++ Project Creation"), wxITEM_NORMAL);
    MenuItem4->Append(menCpGen);
    menPDoc = new wxMenuItem(MenuItem4, idMenPD, _("Programmer\'s Documentation System"), _("Invoke Program Documentation System"), wxITEM_NORMAL);
    MenuItem4->Append(menPDoc);
    menCobGen = new wxMenuItem(MenuItem4, ID_MENUITEM33, _("COBOL Program Generator"), wxEmptyString, wxITEM_NORMAL);
    MenuItem4->Append(menCobGen);
    MenuItem10 = new wxMenuItem(MenuItem4, ID_MENUITEM43, _("Visal Studio"), _("Visual Studio"), wxITEM_NORMAL);
    MenuItem4->Append(MenuItem10);
    Menu1->Append(ID_MENUITEM27, _("Development Tools"), MenuItem4, wxEmptyString);
    MenuItem3 = new wxMenu();
    menCppXqt = new wxMenuItem(MenuItem3, idMenucpp, _("c++ Compile"), _("Run CodeBlocks"), wxITEM_NORMAL);
    MenuItem3->Append(menCppXqt);
    menFortXqt = new wxMenuItem(MenuItem3, idMenFort, _("FORTRAN Compile"), _("Run Fortran Compiler"), wxITEM_NORMAL);
    MenuItem3->Append(menFortXqt);
    menCobXqt = new wxMenuItem(MenuItem3, idMenCob, _("COBOL Compile"), _("Invoke Cobol Compiler"), wxITEM_NORMAL);
    MenuItem3->Append(menCobXqt);
    manVisStud = new wxMenuItem(MenuItem3, ID_MENUITEM44, _("Visual Studio"), _("Run Visual Studio"), wxITEM_NORMAL);
    MenuItem3->Append(manVisStud);
    MenuItem14 = new wxMenu();
    menQtx = new wxMenuItem(MenuItem14, ID_MENUITEM62, _("QT Designer"), _("Run Cute"), wxITEM_NORMAL);
    MenuItem14->Append(menQtx);
    MenuItem3->Append(ID_MENUITEM64, _("QT"), MenuItem14, wxEmptyString);
    Menu1->Append(ID_MENUITEM26, _("Compilers"), MenuItem3, wxEmptyString);
    MenuItem6 = new wxMenu();
    menCBX = new wxMenuItem(MenuItem6, idCBX, _("Chromium Browser"), _("Launch Chromium Browser"), wxITEM_NORMAL);
    MenuItem6->Append(menCBX);
    menKonq = new wxMenuItem(MenuItem6, ID_MENUITEM42, _("Konqueror"), wxEmptyString, wxITEM_NORMAL);
    MenuItem6->Append(menKonq);
    menBrave = new wxMenuItem(MenuItem6, ID_MENUITEM57, _("Brave Browser"), _("Run Brave Browser"), wxITEM_NORMAL);
    MenuItem6->Append(menBrave);
    Menu1->Append(ID_MENUITEM29, _("Browsers"), MenuItem6, wxEmptyString);
    MenuItem5 = new wxMenu();
    menTBX = new wxMenuItem(MenuItem5, ID_MENUITEM31, _("Thunderbird"), _("Launch Mail System"), wxITEM_NORMAL);
    MenuItem5->Append(menTBX);
    menWP = new wxMenuItem(MenuItem5, idMenWP, _("Word Processor"), _("Invoke Word Processor"), wxITEM_NORMAL);
    MenuItem5->Append(menWP);
    MenuItem7 = new wxMenuItem(MenuItem5, ID_MENUITEM32, _("Putty"), wxEmptyString, wxITEM_NORMAL);
    MenuItem5->Append(MenuItem7);
    menMIP = new wxMenuItem(MenuItem5, ID_MENUITEM67, _("What\'s My IP Address"), _("Run What\'s My IP Address"), wxITEM_NORMAL);
    MenuItem5->Append(menMIP);
    menWebMin = new wxMenuItem(MenuItem5, ID_MENUITEM34, _("Webmin archbrooks.us"), wxEmptyString, wxITEM_NORMAL);
    MenuItem5->Append(menWebMin);
    menWPNew = new wxMenuItem(MenuItem5, ID_MENUITEM49, _("Word Press New Blog"), _("Create New WordPress Blog"), wxITEM_NORMAL);
    MenuItem5->Append(menWPNew);
    menGDWebMail = new wxMenuItem(MenuItem5, ID_MENUITEM69, _("Go Daddy Web Mail"), _("Run Go Daddy"), wxITEM_NORMAL);
    MenuItem5->Append(menGDWebMail);
    MenuItem9 = new wxMenu();
    menMACCws = new wxMenuItem(MenuItem9, ID_MENUITEM40, _("MACC Web Site"), _("MACC Web Site"), wxITEM_NORMAL);
    MenuItem9->Append(menMACCws);
    menMymacc = new wxMenuItem(MenuItem9, ID_MENUITEM41, _("My MACC"), _("My MACC"), wxITEM_NORMAL);
    MenuItem9->Append(menMymacc);
    MenuItem5->Append(ID_MENUITEM39, _("MACC"), MenuItem9, wxEmptyString);
    Menu1->Append(ID_MENUITEM28, _("Office Automation"), MenuItem5, wxEmptyString);
    MenuItem8 = new wxMenu();
    menKazam = new wxMenuItem(MenuItem8, ID_MENUITEM36, _("Screen Capture"), _("Begin Screen Capture"), wxITEM_NORMAL);
    MenuItem8->Append(menKazam);
    menKden = new wxMenuItem(MenuItem8, ID_MENUITEM37, _("Start Video Editor"), wxEmptyString, wxITEM_NORMAL);
    MenuItem8->Append(menKden);
    menYouTube = new wxMenuItem(MenuItem8, ID_MENUITEM38, _("Youtube"), wxEmptyString, wxITEM_NORMAL);
    MenuItem8->Append(menYouTube);
    menKodi = new wxMenuItem(MenuItem8, ID_MENUITEM68, _("Kodi"), _("Run Kodi"), wxITEM_NORMAL);
    MenuItem8->Append(menKodi);
    Menu1->Append(ID_MENUITEM35, _("Videos"), MenuItem8, wxEmptyString);
    MenuItem11 = new wxMenu();
    menWxWid = new wxMenuItem(MenuItem11, ID_MENUITEM46, _("wxWidgets"), wxEmptyString, wxITEM_NORMAL);
    MenuItem11->Append(menWxWid);
    menKDE = new wxMenuItem(MenuItem11, ID_MENUITEM47, _("KDE Forums"), _("Lde Forms"), wxITEM_NORMAL);
    MenuItem11->Append(menKDE);
    menCBForums = new wxMenuItem(MenuItem11, ID_MENUITEM50, _("Code Blocks"), _("CodeBlocks Forums"), wxITEM_NORMAL);
    MenuItem11->Append(menCBForums);
    menBForum = new wxMenuItem(MenuItem11, ID_MENUITEM51, _("Thunderbird"), _("Thunderbird"), wxITEM_NORMAL);
    MenuItem11->Append(menBForum);
    menStaOv = new wxMenuItem(MenuItem11, ID_MENUITEM48, _("Stack Overflow"), _("Stack Overflow"), wxITEM_NORMAL);
    MenuItem11->Append(menStaOv);
    MenuItem15 = new wxMenuItem(MenuItem11, SlashDot, _("New Menu"), _("Run Slash Dot"), wxITEM_NORMAL);
    MenuItem11->Append(MenuItem15);
    Menu1->Append(ID_MENUITEM45, _("Forums"), MenuItem11, wxEmptyString);
    MenuItem12 = new wxMenu();
    menBB = new wxMenuItem(MenuItem12, ID_MENUITEM53, _("Bleach Bit"), _("Run BleachBit as Root"), wxITEM_NORMAL);
    MenuItem12->Append(menBB);
    menIntST = new wxMenuItem(MenuItem12, ID_MENUITEM54, _("Internet Speed Test"), _("Run Internet Speed Test"), wxITEM_NORMAL);
    MenuItem12->Append(menIntST);
    menPandora = new wxMenuItem(MenuItem12, ID_MENUITEM55, _("Pandora Radio"), _("Run Pandora Radio"), wxITEM_NORMAL);
    MenuItem12->Append(menPandora);
    menKIC = new wxMenuItem(MenuItem12, ID_MENUITEM56, _("Kubuntu Info Center"), _("Run Kubuntu Info Center"), wxITEM_NORMAL);
    MenuItem12->Append(menKIC);
    Menu1->Append(ID_MENUITEM52, _("System Tools"), MenuItem12, wxEmptyString);
    MenuItem13 = new wxMenu();
    menDelPop = new wxMenuItem(MenuItem13, ID_MENUITEM59, _("Delphi Popular Authors"), _("Run Popular Authors"), wxITEM_NORMAL);
    MenuItem13->Append(menDelPop);
    menFBX = new wxMenuItem(MenuItem13, ID_MENUITEM60, _("Facebook"), _("Invoke Facebook"), wxITEM_NORMAL);
    MenuItem13->Append(menFBX);
    menKubuntu = new wxMenuItem(MenuItem13, ID_MENUITEM61, _("Kubuntu"), _("Run Kubuntu"), wxITEM_NORMAL);
    MenuItem13->Append(menKubuntu);
    menWmMc = new wxMenuItem(MenuItem13, ID_MENUITEM63, _("Walmart Money Card"), _("run Walmart Money Card"), wxITEM_NORMAL);
    MenuItem13->Append(menWmMc);
    menNFL = new wxMenuItem(MenuItem13, ID_MENUITEM65, _("NFL"), _("Run NFL "), wxITEM_NORMAL);
    MenuItem13->Append(menNFL);
    menUFC = new wxMenuItem(MenuItem13, ID_MENUITEM66, _("UFC"), _("Run UFC"), wxITEM_NORMAL);
    MenuItem13->Append(menUFC);
    menSlaDot = new wxMenuItem(MenuItem13, ID_MENUITEM70, _("Slash Dot"), _("Run Slash Dot"), wxITEM_NORMAL);
    MenuItem13->Append(menSlaDot);
    Menu1->Append(ID_MENUITEM58, _("Favorite Links"), MenuItem13, _("Invoke Faborite Links"));
    menTDlg = new wxMenuItem(Menu1, ID_MENUITEM24, _("Test Dialog"), wxEmptyString, wxITEM_NORMAL);
    Menu1->Append(menTDlg);
    menUpTab = new wxMenuItem(Menu1, ID_MENUITEM30, _("Update Table"), wxEmptyString, wxITEM_NORMAL);
    Menu1->Append(menUpTab);
    MenuItem1 = new wxMenuItem(Menu1, idMenuQuit, _("Quit\tAlt-F4"), _("Quit the application"), wxITEM_NORMAL);
    Menu1->Append(MenuItem1);
    MenuBar1->Append(Menu1, _("&File"));
    Menu3 = new wxMenu();
    menFonts = new wxMenuItem(Menu3, ID_MENUITEM2, _("Fonts"), wxEmptyString, wxITEM_NORMAL);
    Menu3->Append(menFonts);
    menColor = new wxMenuItem(Menu3, ID_MENUITEM3, _("Background Color"), wxEmptyString, wxITEM_NORMAL);
    Menu3->Append(menColor);
    MenuBar1->Append(Menu3, _("&Enviroment"));
    Menu2 = new wxMenu();
    MenuItem2 = new wxMenuItem(Menu2, idMenuAbout, _("About\tF1"), _("Show info about this application"), wxITEM_NORMAL);
    Menu2->Append(MenuItem2);
    MenuBar1->Append(Menu2, _("Help"));
    SetMenuBar(MenuBar1);
    StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
    int __wxStatusBarWidths_1[1] = { -1 };
    int __wxStatusBarStyles_1[1] = { wxSB_NORMAL };
    StatusBar1->SetFieldsCount(1,__wxStatusBarWidths_1);
    StatusBar1->SetStatusStyles(1,__wxStatusBarStyles_1);
    SetStatusBar(StatusBar1);
    	wxFontData fontData_1;
    	fontData_1.SetInitialFont(*wxNORMAL_FONT);
    FontDialog1 = new wxFontDialog(this, fontData_1);
    ColourDialog1 = new wxColourDialog(this);
    pumCatEdit = new wxMenuItem((&pumCategories), ID_MENUITEM4, _("Edit Category"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatEdit);
    pumCatNewCat = new wxMenuItem((&pumCategories), ID_MENUITEM5, _("New Category"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatNewCat);
    pumCatDelete = new wxMenuItem((&pumCategories), ID_MENUITEM6, _("Delete Caegory"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatDelete);
    pumCatKwd = new wxMenuItem((&pumCategories), ID_MENUITEM25, _("Keyword Search"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatKwd);
    pumCategories.AppendSeparator();
    pumCatMerge = new wxMenuItem((&pumCategories), ID_MENUITEM7, _("Merge Content"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatMerge);
    pumCategories.AppendSeparator();
    pum1Bkg = new wxMenuItem((&pumCategories), ID_MENUITEM17, _("Change Backgroun Color"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pum1Bkg);
    pumCategories.AppendSeparator();
    pumCatsRefresh = new wxMenuItem((&pumCategories), ID_MENUITEM20, _("Refresh Categories"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(pumCatsRefresh);
    menHome = new wxMenuItem((&pumCategories), ID_MENUITEM21, _("Home"), wxEmptyString, wxITEM_NORMAL);
    pumCategories.Append(menHome);
    pumLinksCompile = new wxMenuItem((&pumLinks), ID_MENUITEM19, _("Compile This Project"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLinksCompile);
    pumKwSearch = new wxMenuItem((&pumLinks), ID_MENUITEM18, _("Keyword Search"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumKwSearch);
    pumLnkExecute = new wxMenuItem((&pumLinks), ID_MENUITEM8, _("Execute"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkExecute);
    pumLnkNewCat = new wxMenuItem((&pumLinks), ID_MENUITEM9, _("New Category"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkNewCat);
    punLnkNewLink = new wxMenuItem((&pumLinks), ID_MENUITEM10, _("New Link"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(punLnkNewLink);
    pumLnkNPE = new wxMenuItem((&pumLinks), ID_MENUITEM11, _("New PDF\'s or Executables"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkNPE);
    pumLinks.AppendSeparator();
    pumLnkDelLink = new wxMenuItem((&pumLinks), ID_MENUITEM12, _("Delete Link"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkDelLink);
    pumLnkPrtRep = new wxMenuItem((&pumLinks), ID_MENUITEM13, _("Print Report"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkPrtRep);
    pumLinks.AppendSeparator();
    pumLnkMerge = new wxMenuItem((&pumLinks), ID_MENUITEM14, _("Merge Content"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkMerge);
    pubLnkELink = new wxMenuItem((&pumLinks), ID_MENUITEM15, _("Edit Link"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pubLnkELink);
    pumLnkNG = new wxMenuItem((&pumLinks), ID_MENUITEM16, _("Copy To New Group"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLnkNG);
    pumLinkBkg = new wxMenuItem((&pumLinks), ID_MENUITEM1, _("Select Background Color"), wxEmptyString, wxITEM_NORMAL);
    pumLinks.Append(pumLinkBkg);
    pumRepPrint = new wxMenuItem((&pumReport), ID_MENUITEM22, _("Print Report"), wxEmptyString, wxITEM_NORMAL);
    pumReport.Append(pumRepPrint);
    	printDialogData_1 = new wxPrintDialogData;
    PrintDialog1 = new wxPrintDialog(this, printDialogData_1);
    BoxSizer1->Fit(this);
    BoxSizer1->SetSizeHints(this);
    Center();

    Connect(ID_LISTBOX1,wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,(wxObjectEventFunction)&DlgTstFrame::OnlbxCatsDClick);
    Connect(ID_LISTBOX2,wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,(wxObjectEventFunction)&DlgTstFrame::OnlbxLinksDClick);
    Connect(ID_TEXTCTRL6,wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&DlgTstFrame::OntextReportText);
    Connect(ID_NOTEBOOK1,wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,(wxObjectEventFunction)&DlgTstFrame::OnNotebook1PageChanged2);
    Connect(ID_BUTTON5,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DlgTstFrame::OnbtnCatUpdClick);
    Connect(ID_BUTTON6,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DlgTstFrame::OnbtnCatCancelClick);
    Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DlgTstFrame::OnbtnLnkUpdClick);
    Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DlgTstFrame::OnbtnCancelClick);
    Connect(ID_MENUITEM23,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenReportSelected);
    Connect(idMenCpX,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCpGenSelected);
    Connect(idMenPD,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenPDocSelected);
    Connect(ID_MENUITEM33,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCobGenSelected);
    Connect(idMenucpp,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCppXqtSelected);
    Connect(idMenFort,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenFortXqtSelected);
    Connect(idMenCob,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCobXqtSelected);
    Connect(ID_MENUITEM44,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmanVisStudSelected);
    Connect(ID_MENUITEM62,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenQTDSelected);
    Connect(idCBX,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCBroSelected);
    Connect(ID_MENUITEM42,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKonqSelected);
    Connect(ID_MENUITEM57,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenBraveSelected);
    Connect(ID_MENUITEM31,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenTBSelected);
    Connect(idMenWP,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWPSelected);
    Connect(ID_MENUITEM32,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenPuttySelected);
    Connect(ID_MENUITEM67,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenMIPSelected);
    Connect(ID_MENUITEM34,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWebMinSelected);
    Connect(ID_MENUITEM49,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWPNewSelected);
    Connect(ID_MENUITEM69,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenGDWebMailSelected);
    Connect(ID_MENUITEM40,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenMACCwsSelected);
    Connect(ID_MENUITEM41,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenMymaccSelected);
    Connect(ID_MENUITEM36,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKazamSelected);
    Connect(ID_MENUITEM37,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKdenSelected);
    Connect(ID_MENUITEM38,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenYouTubeSelected);
    Connect(ID_MENUITEM68,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKodiSelected);
    Connect(ID_MENUITEM46,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWxWidSelected);
    Connect(ID_MENUITEM47,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKDESelected);
    Connect(ID_MENUITEM50,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenCBForumsSelected);
    Connect(ID_MENUITEM51,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenBForumSelected);
    Connect(ID_MENUITEM48,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenStaOvSelected);
    Connect(ID_MENUITEM53,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenBBSelected);
    Connect(ID_MENUITEM54,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenIntSTSelected);
    Connect(ID_MENUITEM55,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenPandoraSelected);
    Connect(ID_MENUITEM56,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKICSelected);
    Connect(ID_MENUITEM59,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenDelPopSelected);
    Connect(ID_MENUITEM60,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenFBXSelected);
    Connect(ID_MENUITEM61,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenKubuntuSelected);
    Connect(ID_MENUITEM63,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenWmMcSelected);
    Connect(ID_MENUITEM65,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenNFLSelected);
    Connect(ID_MENUITEM66,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenUFCSelected);
    Connect(ID_MENUITEM70,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenSlaDotSelected);
    Connect(ID_MENUITEM24,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenTDlgSelected);
    Connect(ID_MENUITEM30,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenUpTabSelected);
    Connect(idMenuQuit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnQuit);
    Connect(ID_MENUITEM2,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenFontsSelected);
    Connect(ID_MENUITEM3,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenColorSelected);
    Connect(idMenuAbout,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnAbout);
    Connect(ID_MENUITEM4,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatEditSelected);
    Connect(ID_MENUITEM5,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatNewCatSelected);
    Connect(ID_MENUITEM6,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatDeleteSelected);
    Connect(ID_MENUITEM25,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatKwdSelected);
    Connect(ID_MENUITEM7,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatMergeSelected);
    Connect(ID_MENUITEM17,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::Onpum1BkgSelected);
    Connect(ID_MENUITEM20,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumCatsRefreshSelected);
    Connect(ID_MENUITEM21,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnmenHomeSelected);
    Connect(ID_MENUITEM19,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLinksCompileSelected);
    Connect(ID_MENUITEM18,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumKwSearchSelected);
    Connect(ID_MENUITEM8,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkExecuteSelected);
    Connect(ID_MENUITEM9,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkNewCatSelected);
    Connect(ID_MENUITEM10,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpunLnkNewLinkSelected);
    Connect(ID_MENUITEM11,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkNPESelected);
    Connect(ID_MENUITEM12,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkDelLinkSelected);
    Connect(ID_MENUITEM13,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkPrtRepSelected);
    Connect(ID_MENUITEM14,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkMergeSelected);
    Connect(ID_MENUITEM15,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpubLnkELinkSelected);
    Connect(ID_MENUITEM16,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLnkNGSelected);
    Connect(ID_MENUITEM1,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumLinkBkgSelected);
    Connect(ID_MENUITEM22,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&DlgTstFrame::OnpumRepPrintSelected);
    Connect(wxID_ANY,wxEVT_CLOSE_WINDOW,(wxObjectEventFunction)&DlgTstFrame::OnClose1);
    //*)

//    lbxCats.Add("cat1");
    listCats();
    StatusBar1->SetStatusText(L"Quality, Reliability & Service");

    lbxCats->Connect(lbxCats->GetId(), wxEVT_RIGHT_UP,
                     wxMouseEventHandler(DlgTstFrame::OnpanCatsRightUpCats), NULL, this);

    lbxLinks->Connect(lbxLinks->GetId(), wxEVT_RIGHT_UP,
                      wxMouseEventHandler(DlgTstFrame::OnLinksRightUp), NULL, this);

    textReport->Connect(textReport->GetId(), wxEVT_RIGHT_UP,
                        wxMouseEventHandler(DlgTstFrame::OnRepRightUp), NULL, this);


    lbxCats->SetSelection(lbxCats->FindString(L"56 Frequently Used Applications", true));

    edtCat->SetBackgroundColour(lbxCats->GetBackgroundColour());
    edtDes->SetBackgroundColour(lbxCats->GetBackgroundColour());
    edtLinkName->SetBackgroundColour(lbxLinks->GetBackgroundColour());
    edtMem->SetBackgroundColour(lbxLinks->GetBackgroundColour());
    edtUrl->SetBackgroundColour(lbxLinks->GetBackgroundColour());
    textReport->SetBackgroundColour(lbxLinks->GetBackgroundColour());

//    StaticBoxSizer2->Show(false);

    Panel5->Show(false);
//    StaticBoxSizer2->Show(false);

    hideDe();

}

freqCats fc;

void DlgTstFrame::OnmenXqtOneSelected(wxCommandEvent& event)
{
}

void DlgTstFrame::listCats()
{
    strings.clear();
    cCnt = ca.lk1_read();
    ii = 0;
    while (ii < cCnt)
    {
        strings.Add(to_string(ca.lk1a[ii].idlk1) + " " + ca.lk1a[ii].cat);
        ii++;
    }
    lbxCats->Clear();
    lbxCats->InsertItems(strings, 0);

}

DlgTstFrame::~DlgTstFrame()
{
    //(*Destroy(DlgTstFrame)
    //*)
}

void DlgTstFrame::OnQuit(wxCommandEvent& event)
{
    Close();
}

void DlgTstFrame::OnpanCatsRightUpCats(wxMouseEvent& event)
{
    PopupMenu( & pumCategories );
//   PopupMenu( & pumCategories);
}

void DlgTstFrame::OnLinksRightUp(wxMouseEvent& event)
{
    PopupMenu( & pumLinks );

}

void DlgTstFrame::OnRepRightUp(wxMouseEvent& event)
{
    string buf = "";
    PopupMenu( & pumReport );

}

void DlgTstFrame::OnAbout(wxCommandEvent& event)
{
    wxString msg = wxbuildinfo(long_f);
    wxMessageBox(msg, _("Welcome to..."));
}

string DlgTstFrame::GetText(bool memo, string initVal, string prompt, string caption)
{
    wxString wxInit;
    wxInit = initVal;
    string rval;
    if (memo)
    {
        wxTextEntryDialog dlg(this, prompt, caption, wxInit, (wxCANCEL | wxOK | wxTE_MULTILINE), wxPoint(50, 50));
        if (dlg.ShowModal() == wxID_OK)
        {
            // We can be certain that this string contains letters only.
            wxString value = dlg.GetValue();
            rval = value;
            return rval;
        }
        else
        {
            rval = "";
            return rval;
        }
    }
    else
    {
        wxTextEntryDialog dlg(this, prompt, caption, wxInit, (wxCANCEL | wxOK), wxPoint(50, 50));
        if (dlg.ShowModal() == wxID_OK)
        {
            // We can be certain that this string contains letters only.
            wxString value = dlg.GetValue();
            rval = value;
            return rval;
        }
        else
        {
            rval = "";
            return rval;
        }

    }
}

string DlgTstFrame::GetFileName(string fs)
{
    wxFileDialog openFileDialog(this, _("Open Any file"), defPath, fno, fs, wxFD_OPEN | wxFD_FILE_MUST_EXIST);
    if (openFileDialog.ShowModal() == wxID_CANCEL)
    {
        fileName = " ";
    }
    else
    {
        fileName = openFileDialog.GetPath();
    }

    return fileName;

}

std::string DlgTstFrame::SelDir(string initDir)
{
    string selDir;
    wxDirDialog dlg(NULL, "Choose input directory", initDir, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
    if (dlg.ShowModal() == wxID_OK)
    {
        selDir = dlg.GetPath().ToStdString();
        return selDir;

    }
    dlg.Destroy();

}

void DlgTstFrame::initField(string inputValue, wxTextCtrl * field)
{
    wxString dv = inputValue;
    field->Clear();
    field->SetEditable(true);
    field->ChangeValue(dv);
}

string DlgTstFrame::fieldToString(wxTextCtrl * field)
{
    string rstr;
    wxString s1 = field->GetValue();
    rstr = s1.ToStdString();
    return rstr;
}

void DlgTstFrame::Xqt(string cmd)
{
    cmd = cmd + " & ";
    int idet = -1;
    if ( boost::filesystem::exists( "/home/archman" ) )
    {
        string frst = "/archman/";
        idet = cmd.find(frst);
        if (idet != -1)
        {
            boost::replace_all(cmd, "/archman/", "/archman/");
        }
    }
    const char * c = cmd.c_str();
    int retval = -1;
    retval = system(c);
}

void DlgTstFrame::ListFilesRecursively(const char *dir, const char* ext)
{
    strings.Clear();
    boost::filesystem::recursive_directory_iterator rdi(dir);
    boost::filesystem::recursive_directory_iterator end_rdi;

    std::string buf = "";

    std::string ext_str0(ext);
    for (; rdi != end_rdi; rdi++)
    {
        //rdi++;

        if (ext_str0.compare((*rdi).path().extension().string()) == 0)
        {
            buf = (*rdi).path().string();
            strings.Add(buf);
            std::cout << (*rdi).path().string() << std::endl;
        }
    }
    strings.Sort();
}

int DlgTstFrame::yornQues(string caption, string prompt)
{
    int answer;
    answer = wxMessageBox(caption, prompt, wxYES_NO | wxCANCEL, NULL);
    return answer;
}


void DlgTstFrame::OnmenFontsSelected(wxCommandEvent& event)
{
    wxFontData fontData;
    wxFont     theFont;
    wxColour   colour;

// theFont = pan01->GetFont();
    fontData.SetInitialFont(theFont);
//    colour pan01->GetForegroundColour();
//    colour = lbxCats->GetForegroundColour();
    fontData.SetColour(colour);
    fontData.SetShowHelp(true);

    wxFontDialog *dialog = new wxFontDialog(this);
//	dlgFont *dialog = new dlgFont( this, &fontData );
    if ( dialog->ShowModal() == wxID_OK )
    {
        fontData = dialog->GetFontData();
        theFont = 	fontData.GetChosenFont();
//        pan01->SetFont(theFont);
        lbxCats->SetFont(theFont);
        lbxCats->SetForegroundColour(fontData.GetColour());
        lbxLinks->SetFont(theFont);
        lbxLinks->SetForegroundColour(fontData.GetColour());
        edtCat->SetFont(theFont);
        edtDes->SetFont(theFont);
        edtLinkName->SetFont(theFont);
        edtMem->SetFont(theFont);
        edtUrl->SetFont(theFont);

    }

}

void DlgTstFrame::OnmenColorSelected(wxCommandEvent& event)
{
    wxColourDialog dlgColour(this, &colour_data);

    if (dlgColour.ShowModal() == wxID_OK)
    {
        wxColourData retData = dlgColour.GetColourData();
        wxColour col = retData.GetColour();
        wxBrush brush(col, wxSOLID);
//        pan01->SetBackgroundColour(col);
        if (bkgCat)
        {
            lbxCats->SetBackgroundColour(col);
            edtCat->SetBackgroundColour(col);
            edtDes->SetBackgroundColour(col);
        }
        if (bkgLink)
        {
            lbxLinks->SetBackgroundColour(col);
            edtLinkName->SetBackgroundColour(col);
            edtMem->SetBackgroundColour(col);
            edtUrl->SetBackgroundColour(col);
            textReport->SetBackgroundColour(col);
        }
    }
}

void DlgTstFrame::OnPanel1Paint(wxPaintEvent& event)
{
}

void DlgTstFrame::OnClose(wxCloseEvent& event)
{
    Close();
}

void DlgTstFrame::OnClose1(wxCloseEvent& event)
{
    Close();
}

void DlgTstFrame::OnPanel2Paint3(wxPaintEvent& event)
{
}

void DlgTstFrame::OnlbxCatsSelect(wxCommandEvent& event)
{
}

void DlgTstFrame::OnNotebook1PageChanged2(wxNotebookEvent& event)
{
    if ((Notebook1->GetSelection() == 0) || (Notebook1->GetSelection() == 1))
    {
        Panel5->Show(false);

    }
}

void DlgTstFrame::OnListBox1Select2(wxCommandEvent& event)
{
}

void DlgTstFrame::OnListBox2Select1(wxCommandEvent& event)
{
}

void DlgTstFrame::getLinks()
{
    cCnt = li.lk2_read();
    ii = 0;
    strings.Clear();
    while (ii < cCnt)
    {
        strings.Add(to_string(li.lk2a[ii].idlk2) + " " + li.lk2a[ii].lkn);
        ii++;
    }
    lbxLinks->Clear();
    if (strings.Count() > 0)
    {
        lbxLinks->InsertItems(strings, 0);
    }

}

void DlgTstFrame::hideDe()
{
    edtUrl->Hide();
    edtMem->Hide();
    edtLinkName->Hide();
    btnLnkUpd->Hide();
    btnLnkCancel->Hide();
    edtCat->Hide();
    edtDes->Hide();
    btnCatCancel->Hide();
    btnCatUpd->Hide();

}

void DlgTstFrame::OnlbxCatsDClick(wxCommandEvent& event)
{
    hideDe();
    Notebook2->ChangeSelection(0);
    string zcat = event.GetString().ToStdString();
    li.catNo = zcat.substr(0, zcat.find(" "));
    curCat = std::stoi(li.catNo);
    getLinks();
    Notebook1->ChangeSelection(1);
    li.catNo = li.catNo;
    StatusBar1->SetStatusText(zcat);
}

void DlgTstFrame::XqtLinks()
{
    string sel;
    string bob;
    int i = 0;
//    sel = event.GetString();
    sel = lbxLinks->GetString(lbxLinks->GetSelection()).ToStdString();
    string pat = " ";
    std::size_t found = -1;
    found = sel.find(pat);
    char buffer[200] = { 0 };
    int fnd;
    fnd = found;
    sel.copy(buffer, fnd, 0);
    bob = buffer;
    bob = sel.substr(0, fnd - 0);
    curCat = std::stoi(bob);
    //select lnk from spl where id = 50
//	char * zcmd;
    char * rno;
//	rno = bob;
    string cmd;
//	cmd = "select lnk from spl where id = " + bob;
    cmd = "select lnk from lk2 where idlk2 = " + bob;
    char * zcmd = new char[cmd.size() + 1];
    std::copy(cmd.begin(), cmd.end(), zcmd);
    zcmd[cmd.size()] = '\0';
//	ut.mySqlOne(zcmd);
//	lbxLnk1->Set(ut.strings);
//	notebook->ChangeSelection(1);

    cmd = li.mySqlTwo(zcmd);
    string pref;
////	cmd = ut.mySqlTwo("select lnk from spl where id = " + bob);
    pat = "http";
    found = -1;
    found = cmd.find(pat);
    if (found == -1)
    {
        if (bob == "648")
        {
            string fna = "";
//           defPath = "/home/archman/workspace/cb/cpp/";
//           fna = GetFileName("Code Block Project Files (*.cbp)|*.cbp");

            dlgGetProj * dlg = new dlgGetProj(this, wxID_ANY);
            const char * tdir  = rDir.c_str();
            ListFilesRecursively(tdir, ".cbp");
            dlg->lbxSelProj->Set(strings);
            if (dlg->ShowModal() == wxID_OK)
            {
                fna = dlg->selItem;
                DlgTstFrame::Xqt(cmd + " " + fna);
            }
            dlg->Destroy();
        }
        else
        {
            if (bob == "735")
            {
                string fna = "";
                rDir = "/home/archman/workspace/cb/fort/";

                dlgGetProj * dlg = new dlgGetProj(this, wxID_ANY);
                const char * tdir  = rDir.c_str();
                ListFilesRecursively(tdir, ".cbp");
                dlg->lbxSelProj->Set(strings);
                if (dlg->ShowModal() == wxID_OK)
                {
                    fna = dlg->selItem;
                    DlgTstFrame::Xqt(cmd + " " + fna);
                }
                dlg->Destroy();
                rDir = "/home/archman/workspace/cb/cpp/";

            }
            else
            {
                DlgTstFrame::Xqt(cmd);
            }
        }
    }
    else
    {
        if (bob == "500")
        {
            int answer;
            answer = yornQues("Is This A New Word Press Document?",
                              "New Document?");
            if (answer == wxYES)
            {
                string tbuf;
                tbuf =
                    "<img src=\"https://archbrooks.us/images/usa_3a.gif\" alt=\"\" />\n\nMr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.";
                if (wxTheClipboard->Open())
                {
                    // This data objects are held by the clipboard,
                    // so do not delete them in the app.
                    c = tbuf.c_str();
                    wxTheClipboard->SetData(new wxTextDataObject(c));
                    wxTheClipboard->Close();
                }
            }
        }
        pref = "/usr/bin/konqueror ";
//        pref = "/usr/bin/brave-browser ";
//        pref = "/home/archman/apps/waterfox/waterfox ";
        delete[] zcmd;
        DlgTstFrame::Xqt(pref + cmd);

    }

    pat = "pdf";
    pref = "/usr/bin/okular ";
    found = -1;
    found = cmd.find(pat);
    int found2 = cmd.find("epub");
    if ((found == -1) && (found2 == -1))
    {

    }
    else
    {
        delete[] zcmd;
        DlgTstFrame::Xqt(pref + '\"' + cmd + '\"');
    }

}

void DlgTstFrame::OnlbxLinksDClick(wxCommandEvent& event)
{
    XqtLinks();
}

void DlgTstFrame::OnpumCatEditSelected(wxCommandEvent& event)
{
//    StaticBoxSizer2->Show(true);
    string buf = lbxCats->GetString(lbxCats->GetSelection()).ToStdString();
    string num = buf.substr(0, buf.find(" "));
    ca.tab_lk1.idlk1 = std::stoi(num);
    edtCat->Show();
    edtDes->Show();
    btnCatCancel->Show();
    btnCatUpd->Show();

    ca.rno = num;

    ca.lk1_read();

    li.lnkNo = num;
    li.lk2_read();
    li.lk2a[0];
    Notebook2->ChangeSelection(0);
    initField(ca.lk1a[0].cat, edtCat);
    initField(ca.lk1a[0].ddes, edtDes);
    buf = buf;

    ca.rno = "";

}

void DlgTstFrame::OnpumCatNewCatSelected(wxCommandEvent& event)
{
    //    	notebook->ChangeSelection(0);
    ca.tab_lk1.cat = DlgTstFrame::GetText(false, "", "Enter Category Now!", "New Category");
    ca.tab_lk1.ddes = DlgTstFrame::GetText(true, "Note.", "Enter Detailed Description Now!",
                                           "Detailed Description");
    ca.tab_lk1.idlk1 = 0;
    if ((ca.tab_lk1.cat.length() > 1) && (ca.tab_lk1.ddes.length() > 1))
    {
        ca.lk1_create();
        listCats();
        int ii = 0;
        string buf;

        while (ii < strings.Count())
        {
            buf = strings[ii];
            if (buf.find(ca.tab_lk1.cat) < ca.tab_lk1.cat.length())
            {
                lbxCats->SetFirstItem(ii);
                lbxCats->SetSelection(ii);
                ii = strings.Count() + 1;
                Notebook1->SetSelection(0);
            }
            ii++;
        }
    }
}

void DlgTstFrame::OnpumCatDeleteSelected(wxCommandEvent& event)
{
    wxMessageBox("This function is disable due to the possibility of stranding child records!", "Function Disabled");
}

void DlgTstFrame::OnpumCatMergeSelected(wxCommandEvent& event)
{
}

void DlgTstFrame::Onpum1BkgSelected(wxCommandEvent& event)
{
    bkgCat = true;
    DlgTstFrame::OnmenColorSelected(event);
    bkgCat = false;
}

void DlgTstFrame::OnpumLnkExecuteSelected(wxCommandEvent& event)
{
    XqtLinks();
}

void DlgTstFrame::OnpumLnkNewCatSelected(wxCommandEvent& event)
{
    wxCommandEvent& newevent = event;
    DlgTstFrame::OnpumCatNewCatSelected(newevent);
    Notebook1->ChangeSelection(0);
}

void DlgTstFrame::OnpunLnkNewLinkSelected(wxCommandEvent& event)
{
    if (curCat == -1)
    {
        wxMessageBox("Please Select A Category First!");

    }
    else
    {
        string buf;
        string title;
        buf = GetURL();
        li.tab_lk2.lnk = buf;
//        ut.ld.lnk = buf;
        title = getZTitle(buf);
        li.tab_lk2.lkn = title;
//        ut.ld.lkn = title;
        string cbuf = lbxCats->GetString(lbxCats->GetSelection()).ToStdString();
        curCat = std::stoi(cbuf.substr(0, cbuf.find(" ") - 0));
        li.tab_lk2.idlk1 = curCat;
//        ut.ld.idlk1 = curCat;
        string details;
        details = GetText(true, "Note", "Enter New Description",
                          "Description Data Entry");
        li.tab_lk2.ddes = details;
        li.tab_lk2.idlk2 = 0;
//        ut.ld.ddes = details;
        int i;
        i = 0;
//    ut.IQuery(1);
        li.lk2_dbc.catalog = "bcswebtools";
        li.lk2_create();
        getLinks();
    }

}

void DlgTstFrame::OnpumLnkNPESelected(wxCommandEvent& event)
{
    string buf;
    string title;
//		buf = GetURL();
    li.tab_lk2.lnk = GetFileName("Any files (*)|*");
    title = getZTitle(buf);
    li.tab_lk2.lkn = GetText(false, "", "Enter New Link Name",
                             "Link Name Data Entry");
//    li.tab_lk2.idlk1 = ut.curCat;
    string rno = lbxCats->GetString(lbxCats->GetSelection()).ToStdString();
    rno.erase(rno.find(" "), rno.length());
    li.tab_lk2.idlk1 = stoi(rno);
    string details;
    details = GetText(true, "Note", "Enter New Description",
                      "Description Data Entry");
    li.tab_lk2.ddes = details;
    li.lk2_create();
    getLinks();

}

void DlgTstFrame::OnpumLnkDelLinkSelected(wxCommandEvent& event)
{
    string buf = lbxLinks->GetString(lbxLinks->GetSelection()).ToStdString();
    string num = buf.substr(0, buf.find(" "));
    li.tab_lk2.idlk2 = std::stoi(num);
    if (yornQues("Delete this Record?", "Delete Record Now?") == 2)
    {
        li.lk2_delete();
        getLinks();

    }
}

void DlgTstFrame::OnpumLnkPrtRepSelected(wxCommandEvent& event)
{
    Panel5->Show(true);
    string fileName = "textfile.txt";
    sw.open(fileName);
    int i;
    int idet;
    std::size_t rnum;
    string numbuf;
    string buf;
    for (i = 0; i < strings.GetCount(); i++)
    {
        buf = strings[i].mb_str(wxConvUTF8);
        idet = buf.find(' ');
        numbuf = buf.substr(0, (idet -0));
        rnum = stoi (numbuf);
        buf.erase(0, idet);
        sw << setw(5) << numbuf << " " << setw(40) << setiosflags(ios::left)
           << buf
           << resetiosflags(ios::left)
           << std::endl;

        cout << buf << endl;
    }
    sw.close();
    textReport->LoadFile("textfile.txt", wxTEXT_TYPE_ANY);
    Notebook1->ChangeSelection(2);

}

void DlgTstFrame::OnpumLnkMergeSelected(wxCommandEvent& event)
{
}

void DlgTstFrame::OnpubLnkELinkSelected(wxCommandEvent& event)
{
//    StaticBoxSizer2->Show(true);
    string buf = lbxLinks->GetString(lbxLinks->GetSelection()).ToStdString();
    if (buf.length() > 0)
    {
        string num = buf.substr(0, buf.find(" "));
        li.tab_lk2.idlk2 = std::stoi(num);
        edtUrl->Show();
        edtMem->Show();
        edtLinkName->Show();
        btnLnkUpd->Show();
        btnLnkCancel->Show();
        li.lnkNo = num;
        li.lk2_read();
        li.lk2a[0];
        Notebook2->ChangeSelection(1);
        initField(li.lk2a[0].lkn, edtLinkName);
        initField(li.lk2a[0].lnk, edtUrl);
        initField(li.lk2a[0].ddes, edtMem);
    }
    buf = buf;
}

void DlgTstFrame::OnpumLnkNGSelected(wxCommandEvent& event)
{
}

void DlgTstFrame::OnPanel2Paint4(wxPaintEvent& event)
{
}

string DlgTstFrame::GetURL()   // @suppress("No return")
{
    /*
    string buf;
    if (wxTheClipboard->Open())
    {
        if (wxTheClipboard->IsSupported(wxDF_TEXT))
        {
            wxTextDataObject data;
            wxTheClipboard->GetData(data);
            buf = data.GetText();
    //	        wxMessageBox( data.GetText() );

        }
        wxTheClipboard->Close();
        return buf;
    //		type filter text
    }
    */
}

static size_t data_write(void* buf, size_t size, size_t nmemb, void* userp)
{
    if (userp)
    {
        std::ostream& os = *static_cast<std::ostream*>(userp);
        std::streamsize len = size * nmemb;
        if (os.write(static_cast<char*>(buf), len))
            return len;
    }

    return 0;
}

CURLcode curl_read(const std::string& url, std::ostream& os,
                   long timeout = 30)
{
    CURLcode code(CURLE_FAILED_INIT);
    CURL* curl = curl_easy_init();

    if (curl)
    {
        if (CURLE_OK
                == (code = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
                                            &data_write)) && CURLE_OK
                == (code = curl_easy_setopt(curl, CURLOPT_NOPROGRESS,
                                            1L)) && CURLE_OK
                == (code = curl_easy_setopt(curl,
                                            CURLOPT_SSL_VERIFYHOST, 0L))
                && CURLE_OK
                == (code = curl_easy_setopt(curl,
                                            CURLOPT_FOLLOWLOCATION, 1L))
                && CURLE_OK
                == (code = curl_easy_setopt(curl, CURLOPT_FILE, &os))
                && CURLE_OK
                == (code = curl_easy_setopt(curl, CURLOPT_TIMEOUT,
                                            timeout)) && CURLE_OK == (code =
                                                    curl_easy_setopt(curl, CURLOPT_URL, url.c_str())))
        {
//						curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, false);

            code = curl_easy_perform(curl);
        }
        curl_easy_cleanup(curl);
    }
    return code;
}

string DlgTstFrame::getZTitle(string url)
{
    string retVal;
    string rbuf;
    curl_global_init (CURL_GLOBAL_ALL);
    int ii;
    /*
     * We use Curl to fetch the web page per the URL.
     *
     * A string stream is used to hold the web page
     *
     */

    std::ostringstream oss;
    if (CURLE_OK == curl_read(url, oss))
    {
        // Web page successfully written to string
        int ista;
        int isto;
        string html;
        html = oss.str();
        std::ofstream file("filename.txt");
        file << oss.str();

        string sb;
        string se;
//		ista = html.find("TITLE");
//		if ((ista != -1) and (ista < html.length())) {
//			sb = "<TITLE>";
//			se = "</TITLE>";
//		} else {
        sb = "<title>";
        se = "</title>";
//		}
        ista = html.find(sb);
        int rest;
        rest = 0;
//		sb = "<title";
//		se = "</title>";
        ista = html.find(sb);
//		if (ista > -1) {
//			isto = html.find(">");
//			rest = (isto - (ista + 6));
//		}
//		ista = ista + sb.length() + rest;
        ista = ista + 7;
        isto = html.find(se);
        int ilen;
        ilen = isto - ista;
        char buffer[5000] = { 0 };
//		html.copy(html, ista, ilen);
        rbuf = html.substr(ista, ilen);
        string frs = "";
        string tos = "";
        frs = "&quot;";
        tos = '"';
        boost::replace_all(rbuf, frs, tos);
        frs = "&#39;";
        tos = "'";
        boost::replace_all(rbuf, frs, tos);
        if (ilen > 500)
        {
            rbuf = "Dummy Title";

        }
        else
        {
//			rbuf = html.substr(ista, ilen);
        }
        ilen = ilen; // @suppress("Assignment to itself")

        /*
         * The Boost tokenizer is used to parse the string stream into lines of code
         */
//		ii = strToLine(html);
//		lcnt = ii;
        /*
         * This routine reads the lines of code until the <Title> tag is encountered.
         *
         * The line containing the title tag is trimmed on both sides.
         *
         * The HTML tags are discarded leaving us with the title for the web page.
         *
         * Retval contains the web pate title.
         *
         */
//		retVal = getTitle(ii);

    }
    curl_global_cleanup();
    return rbuf;
}

void DlgTstFrame::OnbtnLnkUpdClick(wxCommandEvent& event)
{
    li.tab_lk2.ddes = fieldToString(edtMem);
    li.tab_lk2.idlk1 = li.lk2a[0].idlk1;
    li.tab_lk2.idlk2 = li.lk2a[0].idlk2;
    li.tab_lk2.lkn = fieldToString(edtLinkName);
    li.tab_lk2.lnk = fieldToString(edtUrl);
    li.lk2_update();
    initField("", edtLinkName);
    initField("", edtUrl);
    initField("", edtMem);
    edtLinkName->Hide();
    edtMem->Hide();
    edtUrl->Hide();
    btnLnkUpd->Hide();
    Notebook2->ChangeSelection(0);
    getLinks();
}

void DlgTstFrame::OnpumKwSearchSelected(wxCommandEvent& event)
{
    kwSearch dlg(this, wxID_ANY);
    dlg.catOpt = false;
    dlg.dlgInit();
    if (dlg.ShowModal() == wxID_OK)
    {

    }
    dlg.Destroy();
}

void DlgTstFrame::OnpumLinksCompileSelected(wxCommandEvent& event)
{
    string buf = lbxLinks->GetString(lbxLinks->GetSelection()).ToStdString();
    int idet = 0;
    idet = buf.find(" ");
    buf.erase(idet, buf.length());
    li.lk2_dbc.catalog = "bcswebtools";
    li.oneItem = true;
    li.cat = buf;
    li.lk2_read();
    buf = li.lk2a[0].lnk;
    li.oneItem = false;
    li.cat = "";
    idet = buf.find("bin/R");
    if (idet < buf.length())
    {
        std::size_t found = buf.find_last_of("/\\");
        string file = buf.substr(found+1);
        buf.erase(idet, buf.length());
        buf = "/usr/local/bin/codeblocks " + buf + file + ".cbp";
        Xqt(buf);
        buf = buf;

    }
    else
    {
        wxMessageBox("Your Selection Is Not c++ Source Code!");
    }
}

void DlgTstFrame::OnpumCatsRefreshSelected(wxCommandEvent& event)
{
    listCats();
    if (yornQues("Would you like to position categories to default position?", "Set To Default Position?") == 2)
    {
        DlgTstFrame::OnmenHomeSelected(event);
    }

}

void DlgTstFrame::OnmenHomeSelected(wxCommandEvent& event)
{
    wxString tpos = "";
    tpos = "56 Frequently Used Applications";
    tpos = fc.selCats();
    lbxCats->SetSelection(lbxCats->FindString(tpos, true));
    lbxCats->SetFirstItem(lbxCats->GetSelection());
}

void DlgTstFrame::OnbtnCancelClick(wxCommandEvent& event)
{
    initField("", edtLinkName);
    initField("", edtUrl);
    initField("", edtMem);
    edtLinkName->Hide();
    edtMem->Hide();
    edtUrl->Hide();
    btnLnkUpd->Hide();
    btnLnkCancel->Hide();
    Notebook2->ChangeSelection(0);
    getLinks();

}

void DlgTstFrame::OnbtnCatUpdClick(wxCommandEvent& event)
{
    ca.tab_lk1.cat = fieldToString(edtCat);
    ca.tab_lk1.ddes = fieldToString(edtDes);
    ca.lk1_update();
    hideDe();
    Notebook2->ChangeSelection(0);
    listCats();

}

void DlgTstFrame::OnbtnCatCancelClick(wxCommandEvent& event)
{
    initField("", edtCat);
    initField("", edtDes);
    hideDe();
    Notebook2->ChangeSelection(0);

}

void DlgTstFrame::OnpumLinkBkgSelected(wxCommandEvent& event)
{
    bkgLink = true;
    DlgTstFrame::OnmenColorSelected(event);
    bkgLink = false;
}

void DlgTstFrame::OnResize(wxSizeEvent& event)
{
    /*
     if( ! ( lbxCats && lbxLinks ) )
        return;
        wxRect frame_client = GetClientRect();
    wxSize min(frame_client.width/2,frame_client.height );
    lbxCats->SetMinSize(min);
    */

}

void DlgTstFrame::OnpumRepPrintSelected(wxCommandEvent& event)
{
    string buf2 = "";
    buf2 = buf2;
    string cmd = "print textfile.txt";
    Xqt(cmd);
    std::ifstream f("file.txt");

    if (f.is_open())
        std::cout << f.rdbuf();
    f.close();
    string buf = "";
    int i = textReport->GetNumberOfLines();
    int ii = 0;
    while (ii < i)
    {
        buf = textReport->GetLineText(ii).ToStdString();
        ii++;
    }
}

void DlgTstFrame::OntextReportText(wxCommandEvent& event)
{
    PopupMenu( & pumReport );
}

void DlgTstFrame::OnmenReportSelected(wxCommandEvent& event)
{
//    wxDC *dc = GetDC();

}

// A global object storing print settings
//wxPrintDialogData g_printDialogData;

// Handler for Print menu item
/*
void DlgTstFrame::OnPrint(wxCommandEvent& event)
{

    wxPrinter printer(& g_printDialogData);
    MyPrintout printout(wxT("My printout"));
//    wxPrintout printout(wxT("My printout"));

    if (!printer.Print(this, &printout, true))
    {
        if (wxPrinter::GetLastError() == wxPRINTER_ERROR)
            wxMessageBox(wxT("There was a problem printing.\nPerhaps your current printer is not set correctly?"), wxT("Printing"), wxOK);
        else
            wxMessageBox(wxT("You cancelled printing"),
                         wxT("Printing"), wxOK);
    }
    else
    {
        (*g_printDialogData) = printer.GetPrintDialogData();
    }
}
*/

//freqCats fc;
bcswebtools_lk3_io ct2;

void DlgTstFrame::OnmenTDlgSelected(wxCommandEvent& event)
{
    /*
    ct2.tab_lk3.cat = fc.showCats();
    ct2.tab_lk3.id = 0;
    if (ct2.tab_lk3.cat.length() > 0)
    {
        ct2.lk3_create();
    }
    */

    fc.selCats();

}

void DlgTstFrame::OnpumCatKwdSelected(wxCommandEvent& event)
{

    kwSearch dlg(this, wxID_ANY);
    dlg.catOpt = true;
    dlg.dlgInit();
    if (dlg.ShowModal() == wxID_OK)
    {
        wxString itemz;
        itemz = dlg.sel;
        lbxCats->SetSelection(lbxCats->FindString(itemz, false));
        lbxCats->SetFirstItem(lbxCats->FindString(itemz, false));

    }
//    dlg.catOpt = false;
    dlg.Destroy();
}

void DlgTstFrame::OnmenCppXqtSelected(wxCommandEvent& event)
{
    string cmd;
    cmd = "/usr/bin/codeblocks";
    string fna = "";
    rDir = "/home/archman/workspace/cb/cpp/";
    dlgGetProj * dlg = new dlgGetProj(this, wxID_ANY);
    const char * tdir  = rDir.c_str();
    ListFilesRecursively(tdir, ".cbp");
    dlg->lbxSelProj->Set(strings);
    if (dlg->ShowModal() == wxID_OK)
    {
        fna = dlg->selItem;
        DlgTstFrame::Xqt(cmd + " " + fna);
    }
    dlg->Destroy();

}

void DlgTstFrame::OnmenFortXqtSelected(wxCommandEvent& event)
{
    string cmd = "/usr/bin/codeblocks";
    string fna = "";
    rDir = "/home/archman/workspace/cb/fort/";

    dlgGetProj * dlg = new dlgGetProj(this, wxID_ANY);
    const char * tdir  = rDir.c_str();
    ListFilesRecursively(tdir, ".cbp");
    dlg->lbxSelProj->Set(strings);
    if (dlg->ShowModal() == wxID_OK)
    {
        fna = dlg->selItem;
        DlgTstFrame::Xqt(cmd + " " + fna);
    }
    dlg->Destroy();
    rDir = "/home/archman/workspace/cb/cpp/";

}

void DlgTstFrame::OnmenCobXqtSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/usr/bin/python3 /usr/local/bin/opencobolide");
}

void DlgTstFrame::OnmenWPSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/libreoffice --writer");
}

void DlgTstFrame::OnmenTBSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/snap/bin/thunderbird");
}

void DlgTstFrame::OnmenQTDSelected(wxCommandEvent& event)
{
    Xqt("/home/archman/apps/Qt5.9.7/Tools/QtCreator/bin/qtcreator");
}

void DlgTstFrame::OnmenCBroSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("chromium");
}

void DlgTstFrame::OnmenCppGenSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/home/archman/workspace/cb/cpp/cbpgen/bin/Release/cbpgen");
}

/*
void DlgTstFrame::OnmenWPSelected1(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/usr/bin/libreoffice --writer");
}
*/

void DlgTstFrame::OnmenCpGenSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/home/archman/workspace/cb/cpp/cbpgen/bin/Release/cbpgen");
}

void DlgTstFrame::OnmenPDocSelected(wxCommandEvent& event)
{
    DlgTstFrame::Xqt("/home/archman/workspace/cb/cpp/pDoc2/bin/Release/pDoc2");
}

void DlgTstFrame::OnmenUpTabSelected(wxCommandEvent& event)
{
    /*
    li.lk2All = true;
    li.lnkNo = "";
    li.oneItem = false;
    size_t lRec;
    lRec = li.lk2_read();
    size_t cnt = 0;
    while (cnt < lRec-1)
    {
    //        li.lk2a[i]
        if (li.lk2a[cnt].lnk.find("archman") > 0)
        {
            boost::replace_all(li.lk2a[cnt].lnk, "archman", "archman");
            li.tab_lk2.idlk1 = li.lk2a[cnt].idlk1;
            li.tab_lk2.idlk2 = li.lk2a[cnt].idlk2;
            li.tab_lk2.ddes = li.lk2a[cnt].ddes;
            li.tab_lk2.lkn = li.lk2a[cnt].lkn;
            li.tab_lk2.lnk = li.lk2a[cnt].lnk;
            li.lk2_update();
        }
        cnt++;
    }
    li.lk2a[1].lnk = li.lk2a[1].lnk;
    lRec = lRec;
    li.lk2All = false;
    */
}

void DlgTstFrame::OnmenPuttySelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/putty ");
}

void DlgTstFrame::OnmenCobGenSelected(wxCommandEvent& event)
{
    Xqt("/home/archman/workspace/cb/cpp/gencobo/bin/Release/gencobo");
}

void DlgTstFrame::OnmenWebMinSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://archbrooks.us:10000");
}

void DlgTstFrame::OnmenKazamSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/kazam");
}

void DlgTstFrame::OnmenKdenSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/kdenlive");
}

void DlgTstFrame::OnmenYouTubeSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://youtube.com/archman007");
}

void DlgTstFrame::OnmenMACCwsSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://macc.edu");
}

void DlgTstFrame::OnmenMymaccSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://my.macc.edu");
}

void DlgTstFrame::OnmenKonqSelected(wxCommandEvent& event)
{
    Xqt(defBro);
}

void DlgTstFrame::OnmanVisStudSelected(wxCommandEvent& event)
{
    Xqt("/usr/share/code/code --no-sandbox --unity-launch");
}

void DlgTstFrame::OnmenWxWidSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://forums.wxwidgets.org/");
}

void DlgTstFrame::OnmenKDESelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://forum.kde.org/");
}

void DlgTstFrame::OnmenStaOvSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://stackoverflow.com/");
}

void DlgTstFrame::OnmenWPNewSelected(wxCommandEvent& event)
{
    int answer;
    answer = yornQues("Is This A New Word Press Document?",
                      "New Document?");
    if (answer == wxYES)
    {
        string tbuf;
        tbuf =
            "<img src=\"https://archbrooks.us/images/usa_3a.gif\" alt=\"\" />\n\nMr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.";
        if (wxTheClipboard->Open())
        {
            // This data objects are held by the clipboard,
            // so do not delete them in the app.
            c = tbuf.c_str();
            wxTheClipboard->SetData(new wxTextDataObject(c));
            wxTheClipboard->Close();
        }
        Xqt(defBro + "https://archbrooks.us/b4");
    }

}

void DlgTstFrame::OnmenCBForumsSelected(wxCommandEvent& event)
{
    Xqt(defBro + "http://forums.codeblocks.org/");
}

void DlgTstFrame::OnmenBForumSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://support.mozilla.org/en-US/products/thunderbird");
}

void DlgTstFrame::OnmenBBSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/pkexec /usr/bin/bleachbit");
}

void DlgTstFrame::OnmenIntSTSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://www.speedtest.net/");
}

void DlgTstFrame::OnmenPandoraSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/pithos");
}

void DlgTstFrame::OnmenKICSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/kinfocenter");
}

void DlgTstFrame::OnmenBraveSelected(wxCommandEvent& event)
{
    Xqt("/snap/bin/brave");
}

void DlgTstFrame::OnmenDelPopSelected(wxCommandEvent& event)
{
    Xqt(defBro + "http://cc.embarcadero.com/PopularAuthors.aspx");
}

void DlgTstFrame::OnmenFBXSelected(wxCommandEvent& event)
{
    Xqt(defBro + "http://www.facebook.com/arch.brooks");

}

void DlgTstFrame::OnmenKubuntuSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://kubuntu.org/");

}
// TODO (archman#1#): fix ldoncfig ...
//
//Set variable: LD_LIBRARY_PATH=.:/home/archman/apps/mysql-connector-c++-8.0.22-linux-glibc2.12-x86-64bit/lib64/:/usr/local/lib:

void DlgTstFrame::OnmenWmMcSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://secure.walmartmoneycard.com/login");
}

void DlgTstFrame::OnmenNFLSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://nfl.com");
}

void DlgTstFrame::OnmenUFCSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://ufc.com");
}

void DlgTstFrame::OnmenMIPSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://whatismyipaddress.com/");
}

void DlgTstFrame::OnmenKodiSelected(wxCommandEvent& event)
{
    Xqt("/usr/bin/kodi");
}

void DlgTstFrame::OnmenGDWebMailSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://email27.godaddy.com/webmail.php");
}

void DlgTstFrame::OnmenSlaDotSelected(wxCommandEvent& event)
{
    Xqt(defBro + "https://slashdot.org");
}

[/codesyntax]

The description of the c++ application begins here.  The initial task is to load the source code int a wxArrayString.

[codesyntax lang=”cpp”]

void usc01Frame::loadSC(string fs, wxArrayString & sc, int & ix)
{
    ifstream ips;
    ips.open(fs);
    string line;
    while (getline (ips, line))
    {
        ix++;
        sc.Add(line);
    }

}

[/codesyntax]

The code that makes the changes is listed below.

[codesyntax lang=”cpp”]

    cnt = sc.Count();
    cnt--;
    int i = 0;
    while (i < cnt)
    {
        buf = sc[i].c_str(); // Each record is store in the buf variable
        //    Xqt("/usr/bin/konqueror https://secure.walmartmoneycard.com/login");
        if (buf.find("Xqt(\"/usr/bin/konqueror") < buf.length()) // Check to see if the target is detected
        {
            buf.replace(buf.find("/"), 19, ""); // Delete the /usr/bin/konqueror
            buf.insert(buf.find("(\"") + 1, "defBro \+ "); // Insert the defBro variable reference.
            sc[i] = buf; // Update the string array
            buf = buf;
        }
        i++;
    }

[/codesyntax]

The remaining task is to create the output file that reflects the updates.

[codesyntax lang=”cpp”]

    i = 0;
    std::ofstream myfile;
    myfile.open (otf);
    while (i < cnt)
    {
        myfile << sc[i].c_str() << endl;
        i++;
    }
    myfile.close();

[/codesyntax]

This software updated the c++ software effortlessly.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

Leave a Reply

Your email address will not be published. Required fields are marked *