Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmPreferences: Make the General tab be the first tab that is shown
[xestiacalendar/.git] / source / AppXestiaCalendar.cpp
index b2f65cc..66726f5 100644 (file)
@@ -1,3 +1,21 @@
+// AppXesitaCalendar.cpp - Xestia Calendar application form code
+//
+// (c) 2016-2017 Xestia Software Development.
+//
+// This file is part of Xestia Calendar.
+//
+// Xestia Calendar is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Calendar is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Calendar. If not, see <http://www.gnu.org/licenses/> 
+
 ///////////////////////////////////////////////////////////////////////////
 // C++ code generated with wxFormBuilder (version Nov 13 2016)
 // http://www.wxformbuilder.org/
 
 frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
 {
-       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+       this->SetSizeHints( wxSize( 800,600 ), wxDefaultSize );
        this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
        
-       wxBoxSizer* bSizer44;
-       bSizer44 = new wxBoxSizer( wxVERTICAL );
-       
-       
-       this->SetSizer( bSizer44 );
-       this->Layout();
-       m_statusBar2 = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
+       stbBottom = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
        menuBar = new wxMenuBar( 0 );
        mnuManage = new wxMenu();
        wxMenuItem* mnuManageNew;
@@ -36,21 +48,30 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title,
        mnuManage->AppendSeparator();
        
        wxMenuItem* mnuManageExit;
-       mnuManageExit = new wxMenuItem( mnuManage, wxID_EXIT, wxString( wxT("Exit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL );
+       mnuManageExit = new wxMenuItem( mnuManage, wxID_EXIT, wxString( wxT("Quit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL );
        mnuManage->Append( mnuManageExit );
        
        menuBar->Append( mnuManage, wxT("Manage") ); 
        
        mnuCreate = new wxMenu();
+       wxMenuItem* mnuCreateCalendar;
+       mnuCreateCalendar = new wxMenuItem( mnuCreate, wxID_ANY, wxString( wxT("Calendar...") ) , wxEmptyString, wxITEM_NORMAL );
+       mnuCreate->Append( mnuCreateCalendar );
+       
+       mnuCreate->AppendSeparator();
+       
        wxMenuItem* mnuCreateEvent;
        mnuCreateEvent = new wxMenuItem( mnuCreate, wxID_ANY, wxString( wxT("Event...") ) , wxEmptyString, wxITEM_NORMAL );
        mnuCreate->Append( mnuCreateEvent );
        
        menuBar->Append( mnuCreate, wxT("Create") ); 
        
+       mnuWindow = new wxMenu();
+       menuBar->Append( mnuWindow, wxT("Window") ); 
+       
        mnuHelp = new wxMenu();
        wxMenuItem* mnuHelpShow;
-       mnuHelpShow = new wxMenuItem( mnuHelp, wxID_ANY, wxString( wxT("Show Help...") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
+       mnuHelpShow = new wxMenuItem( mnuHelp, wxID_HELP, wxString( wxT("Show Help...") ) + wxT('\t') + wxT("F1"), wxEmptyString, wxITEM_NORMAL );
        mnuHelp->Append( mnuHelpShow );
        
        mnuHelp->AppendSeparator();
@@ -62,19 +83,46 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title,
        mnuHelp->AppendSeparator();
        
        wxMenuItem* mnuHelpAbout;
-       mnuHelpAbout = new wxMenuItem( mnuHelp, wxID_ANY, wxString( wxT("About Xestia Calendar...") ) + wxT('\t') + wxT("Shift+Ctrl+A"), wxEmptyString, wxITEM_NORMAL );
+       mnuHelpAbout = new wxMenuItem( mnuHelp, wxID_ABOUT, wxString( wxT("About Xestia Calendar...") ) + wxT('\t') + wxT("Shift+Ctrl+A"), wxEmptyString, wxITEM_NORMAL );
        mnuHelp->Append( mnuHelpAbout );
        
        menuBar->Append( mnuHelp, wxT("Help") ); 
        
        this->SetMenuBar( menuBar );
        
+       szrMain = new wxBoxSizer( wxVERTICAL );
+       
+       
+       this->SetSizer( szrMain );
+       this->Layout();
        
        this->Centre( wxBOTH );
+       
+       // Connect Events
+       this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) );
+       this->Connect( mnuManageNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewAccountDialog ) );
+       this->Connect( mnuManagePreferences->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowPreferencesWindow ) );
+       this->Connect( mnuManageExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
+       this->Connect( mnuCreateCalendar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CreateNewCalendar ) );
+       this->Connect( mnuCreateEvent->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CreateNewEvent ) );
+       this->Connect( mnuHelpShow->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowHelp ) );
+       this->Connect( mnuHelpUpdate->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowUpdateWindow ) );
+       this->Connect( mnuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowAboutWindow ) );
 }
 
 frmMainADT::~frmMainADT()
 {
+       // Disconnect Events
+       this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) );
+       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewAccountDialog ) );
+       this->Disconnect( wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowPreferencesWindow ) );
+       this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
+       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CreateNewCalendar ) );
+       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::CreateNewEvent ) );
+       this->Disconnect( wxID_HELP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowHelp ) );
+       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowUpdateWindow ) );
+       this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowAboutWindow ) );
+       
 }
 
 frmUpdateADT::frmUpdateADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
@@ -196,7 +244,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        tabGeneral->SetSizer( szrChecks );
        tabGeneral->Layout();
        szrChecks->Fit( tabGeneral );
-       NbtPreferences->AddPage( tabGeneral, wxT("General"), true );
+       NbtPreferences->AddPage( tabGeneral, wxT("General"), false );
        tabTheme = new wxPanel( NbtPreferences, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
        tabTheme->Hide();
        
@@ -272,7 +320,7 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        tabAccounts->SetSizer( szrAccounts );
        tabAccounts->Layout();
        szrAccounts->Fit( tabAccounts );
-       NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), false );
+       NbtPreferences->AddPage( tabAccounts, wxT("Accounts"), true );
        
        szrTabs->Add( NbtPreferences, 1, wxALL|wxEXPAND, 5 );
        
@@ -314,11 +362,11 @@ frmPreferencesADT::frmPreferencesADT( wxWindow* parent, wxWindowID id, const wxS
        btnThemeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
        btnThemeModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
        btnThemeDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
-       lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
-       lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
-       btnAccountAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
-       btnAccountModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
-       btnAccountDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+       lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableButtons ), NULL, this );
+       lstAccounts->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableButtons ), NULL, this );
+       btnAccountAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddAccount ), NULL, this );
+       btnAccountModify->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyAccount ), NULL, this );
+       btnAccountDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteAccount ), NULL, this );
        btnSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this );
        btnCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this );
 }
@@ -332,11 +380,11 @@ frmPreferencesADT::~frmPreferencesADT()
        btnThemeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
        btnThemeModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
        btnThemeDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
-       lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableABButtons ), NULL, this );
-       lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableABButtons ), NULL, this );
-       btnAccountAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddABAccount ), NULL, this );
-       btnAccountModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyABAccount ), NULL, this );
-       btnAccountDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteABAccount ), NULL, this );
+       lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( frmPreferencesADT::DisableButtons ), NULL, this );
+       lstAccounts->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmPreferencesADT::EnableButtons ), NULL, this );
+       btnAccountAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::AddAccount ), NULL, this );
+       btnAccountModify->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::ModifyAccount ), NULL, this );
+       btnAccountDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::DeleteAccount ), NULL, this );
        btnSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::SavePreferences ), NULL, this );
        btnCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmPreferencesADT::CloseWindow ), NULL, this );
        
@@ -441,10 +489,10 @@ frmNewAccountADT::frmNewAccountADT( wxWindow* parent, wxWindowID id, const wxStr
        lblType->Wrap( -1 );
        fgSizer33->Add( lblType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
        
-       wxString cmbServerTypeChoices[] = { wxT("Local"), wxT("CardDAV") };
+       wxString cmbServerTypeChoices[] = { wxT("Local") };
        int cmbServerTypeNChoices = sizeof( cmbServerTypeChoices ) / sizeof( wxString );
        cmbServerType = new wxChoice( tabType, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbServerTypeNChoices, cmbServerTypeChoices, 0 );
-       cmbServerType->SetSelection( 1 );
+       cmbServerType->SetSelection( 0 );
        fgSizer33->Add( cmbServerType, 0, wxALL, 5 );
        
        lblServerAddress = new wxStaticText( tabType, wxID_ANY, wxT("Server Address:"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -1254,3 +1302,241 @@ frmInvalidSSLCertificateADT::~frmInvalidSSLCertificateADT()
        btnViewCert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmInvalidSSLCertificateADT::ViewCertificates ), NULL, this );
        
 }
+
+frmCalendarEditorADT::frmCalendarEditorADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+       
+       wxBoxSizer* bSizer44;
+       bSizer44 = new wxBoxSizer( wxVERTICAL );
+       
+       wxFlexGridSizer* fgSizer12;
+       fgSizer12 = new wxFlexGridSizer( 4, 2, 0, 0 );
+       fgSizer12->AddGrowableCol( 1 );
+       fgSizer12->AddGrowableRow( 3 );
+       fgSizer12->SetFlexibleDirection( wxBOTH );
+       fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+       
+       lblAccount = new wxStaticText( this, wxID_ANY, wxT("Account:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblAccount->Wrap( -1 );
+       fgSizer12->Add( lblAccount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       wxArrayString cmbAccountChoices;
+       cmbAccount = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbAccountChoices, 0 );
+       cmbAccount->SetSelection( 0 );
+       fgSizer12->Add( cmbAccount, 0, wxALL|wxEXPAND, 5 );
+       
+       lblName = new wxStaticText( this, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblName->Wrap( -1 );
+       fgSizer12->Add( lblName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       txtName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+       fgSizer12->Add( txtName, 1, wxALL|wxEXPAND, 5 );
+       
+       lblColour = new wxStaticText( this, wxID_ANY, wxT("Colour:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblColour->Wrap( -1 );
+       fgSizer12->Add( lblColour, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       clpColour = new wxColourPickerCtrl( this, wxID_ANY, wxColour( 0, 0, 0 ), wxDefaultPosition, wxSize( 50,24 ), wxCLRP_DEFAULT_STYLE );
+       fgSizer12->Add( clpColour, 0, wxALL, 5 );
+       
+       lblDescription = new wxStaticText( this, wxID_ANY, wxT("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblDescription->Wrap( -1 );
+       fgSizer12->Add( lblDescription, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       txtDescription = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+       fgSizer12->Add( txtDescription, 1, wxALL|wxEXPAND, 5 );
+       
+       
+       bSizer44->Add( fgSizer12, 1, wxEXPAND, 5 );
+       
+       wxBoxSizer* bSizer46;
+       bSizer46 = new wxBoxSizer( wxHORIZONTAL );
+       
+       
+       bSizer46->Add( 0, 0, 1, wxEXPAND, 5 );
+       
+       btnCreate = new wxButton( this, wxID_ANY, wxT("Create"), wxDefaultPosition, wxDefaultSize, 0 );
+       btnCreate->SetDefault(); 
+       bSizer46->Add( btnCreate, 0, wxALL, 5 );
+       
+       btnClose = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+       bSizer46->Add( btnClose, 0, wxALL, 5 );
+       
+       
+       bSizer44->Add( bSizer46, 0, wxEXPAND, 5 );
+       
+       
+       this->SetSizer( bSizer44 );
+       this->Layout();
+       
+       this->Centre( wxBOTH );
+       
+       // Connect Events
+       btnCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmCalendarEditorADT::ProcessCalendar ), NULL, this );
+       btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmCalendarEditorADT::CloseWindow ), NULL, this );
+}
+
+frmCalendarEditorADT::~frmCalendarEditorADT()
+{
+       // Disconnect Events
+       btnCreate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmCalendarEditorADT::ProcessCalendar ), NULL, this );
+       btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmCalendarEditorADT::CloseWindow ), NULL, this );
+       
+}
+
+frmEventEditorADT::frmEventEditorADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+       this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+       this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
+       
+       menuBar = new wxMenuBar( 0 );
+       mnuEvent = new wxMenu();
+       wxMenuItem* mnuEventSave;
+       mnuEventSave = new wxMenuItem( mnuEvent, wxID_ANY, wxString( wxT("Save") ) , wxEmptyString, wxITEM_NORMAL );
+       mnuEvent->Append( mnuEventSave );
+       
+       wxMenuItem* mnuEventSaveNew;
+       mnuEventSaveNew = new wxMenuItem( mnuEvent, wxID_ANY, wxString( wxT("Save and New") ) , wxEmptyString, wxITEM_NORMAL );
+       mnuEvent->Append( mnuEventSaveNew );
+       
+       mnuEvent->AppendSeparator();
+       
+       wxMenuItem* mnuEventClose;
+       mnuEventClose = new wxMenuItem( mnuEvent, wxID_ANY, wxString( wxT("Close") ) , wxEmptyString, wxITEM_NORMAL );
+       mnuEvent->Append( mnuEventClose );
+       
+       menuBar->Append( mnuEvent, wxT("Event") ); 
+       
+       mnuEdit = new wxMenu();
+       wxMenuItem* mnuEditCut;
+       mnuEditCut = new wxMenuItem( mnuEdit, wxID_CUT, wxString( wxT("Cut") ) , wxEmptyString, wxITEM_NORMAL );
+       mnuEdit->Append( mnuEditCut );
+       
+       wxMenuItem* mnuEditCopy;
+       mnuEditCopy = new wxMenuItem( mnuEdit, wxID_COPY, wxString( wxT("Copy") ) , wxEmptyString, wxITEM_NORMAL );
+       mnuEdit->Append( mnuEditCopy );
+       
+       wxMenuItem* mnuEditPaste;
+       mnuEditPaste = new wxMenuItem( mnuEdit, wxID_PASTE, wxString( wxT("Paste") ) , wxEmptyString, wxITEM_NORMAL );
+       mnuEdit->Append( mnuEditPaste );
+       
+       menuBar->Append( mnuEdit, wxT("Edit") ); 
+       
+       this->SetMenuBar( menuBar );
+       
+       wxBoxSizer* bSizer46;
+       bSizer46 = new wxBoxSizer( wxVERTICAL );
+       
+       nbkNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+       tabProperties = new wxScrolledWindow( nbkNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+       tabProperties->SetScrollRate( 5, 5 );
+       szrList = new wxBoxSizer( wxVERTICAL );
+       
+       szrDetails = new wxFlexGridSizer( 3, 2, 0, 0 );
+       szrDetails->AddGrowableCol( 1 );
+       szrDetails->SetFlexibleDirection( wxBOTH );
+       szrDetails->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+       
+       lblCalendar = new wxStaticText( tabProperties, wxID_ANY, wxT("Calendar:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblCalendar->Wrap( -1 );
+       szrDetails->Add( lblCalendar, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       wxArrayString cmbCalendarChoices;
+       cmbCalendar = new wxChoice( tabProperties, wxID_ANY, wxDefaultPosition, wxDefaultSize, cmbCalendarChoices, 0 );
+       cmbCalendar->SetSelection( 0 );
+       szrDetails->Add( cmbCalendar, 1, wxALL|wxEXPAND, 5 );
+       
+       lblEventName = new wxStaticText( tabProperties, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblEventName->Wrap( -1 );
+       szrDetails->Add( lblEventName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       txtEventName = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+       szrDetails->Add( txtEventName, 1, wxALL|wxEXPAND, 5 );
+       
+       lblDescription = new wxStaticText( tabProperties, wxID_ANY, wxT("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblDescription->Wrap( -1 );
+       szrDetails->Add( lblDescription, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       txtEventDescription = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+       txtEventDescription->SetMinSize( wxSize( -1,50 ) );
+       
+       szrDetails->Add( txtEventDescription, 0, wxALL|wxEXPAND, 5 );
+       
+       
+       szrList->Add( szrDetails, 0, wxEXPAND, 5 );
+       
+       szrTime = new wxFlexGridSizer( 3, 3, 0, 0 );
+       szrTime->SetFlexibleDirection( wxBOTH );
+       szrTime->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+       
+       lblStartTime = new wxStaticText( tabProperties, wxID_ANY, wxT("Start Time:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblStartTime->Wrap( -1 );
+       szrTime->Add( lblStartTime, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       dapStartDate = new wxDatePickerCtrl( tabProperties, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN|wxDP_SHOWCENTURY );
+       szrTime->Add( dapStartDate, 0, wxALL, 5 );
+       
+       txtStartTime = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+       szrTime->Add( txtStartTime, 0, wxALL, 5 );
+       
+       lblEndTime = new wxStaticText( tabProperties, wxID_ANY, wxT("End Time:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblEndTime->Wrap( -1 );
+       szrTime->Add( lblEndTime, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       dapEndDate = new wxDatePickerCtrl( tabProperties, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY );
+       szrTime->Add( dapEndDate, 0, wxALL, 5 );
+       
+       txtEndTime = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+       szrTime->Add( txtEndTime, 0, wxALL, 5 );
+       
+       lblDuration = new wxStaticText( tabProperties, wxID_ANY, wxT("Duration:"), wxDefaultPosition, wxDefaultSize, 0 );
+       lblDuration->Wrap( -1 );
+       szrTime->Add( lblDuration, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+       
+       m_textCtrl20 = new wxTextCtrl( tabProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+       szrTime->Add( m_textCtrl20, 0, wxALL, 5 );
+       
+       
+       szrList->Add( szrTime, 1, wxEXPAND, 5 );
+       
+       
+       tabProperties->SetSizer( szrList );
+       tabProperties->Layout();
+       szrList->Fit( tabProperties );
+       nbkNotebook->AddPage( tabProperties, wxT("Properties"), false );
+       
+       bSizer46->Add( nbkNotebook, 1, wxEXPAND | wxALL, 5 );
+       
+       
+       this->SetSizer( bSizer46 );
+       this->Layout();
+       
+       this->Centre( wxBOTH );
+       
+       // Connect Events
+       this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmEventEditorADT::CloseWindow ) );
+       this->Connect( mnuEventSave->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::SaveContact ) );
+       this->Connect( mnuEventSaveNew->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::SaveNewContact ) );
+       this->Connect( mnuEventClose->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CloseWindow ) );
+       this->Connect( mnuEditCut->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CutText ) );
+       this->Connect( mnuEditCopy->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CopyText ) );
+       this->Connect( mnuEditPaste->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::PasteText ) );
+       cmbCalendar->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmEventEditorADT::ProcessCalendarControl ), NULL, this );
+       txtEventName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmEventEditorADT::ProcessEventName ), NULL, this );
+}
+
+frmEventEditorADT::~frmEventEditorADT()
+{
+       // Disconnect Events
+       this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmEventEditorADT::CloseWindow ) );
+       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::SaveContact ) );
+       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::SaveNewContact ) );
+       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CloseWindow ) );
+       this->Disconnect( wxID_CUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CutText ) );
+       this->Disconnect( wxID_COPY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::CopyText ) );
+       this->Disconnect( wxID_PASTE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmEventEditorADT::PasteText ) );
+       cmbCalendar->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( frmEventEditorADT::ProcessCalendarControl ), NULL, this );
+       txtEventName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( frmEventEditorADT::ProcessEventName ), NULL, this );
+       
+}
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy