X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;ds=inline;f=source%2Fsearch%2FXABSearchPanel.cpp;h=7a22155af51f763d34b274f42ea65d0bb4e92f49;hb=11ef2657965b20690ccbf15f1efcf224315ce794;hp=d15fc363fac8ec3ee70619350206537ab6a1c9d0;hpb=45729fca56479bd9158486e0cda0c4a94b4dd1dc;p=xestiaab%2F.git
diff --git a/source/search/XABSearchPanel.cpp b/source/search/XABSearchPanel.cpp
index d15fc36..7a22155 100644
--- a/source/search/XABSearchPanel.cpp
+++ b/source/search/XABSearchPanel.cpp
@@ -1,3 +1,21 @@
+// XABSearchPanel.cpp - XABSearchPanel widget.
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book 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 Address Book 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 Address Book. If not, see
+
#include "XABSearchPanel.h"
#include "../bitmaps.h"
@@ -18,6 +36,8 @@ XABSearchPanel::XABSearchPanel( wxWindow* parent )
XABSearchPanelADT( parent )
{
+ // Setup the search panel.
+
// Setup the images for the add and delete buttons.
wxMemoryInputStream astream(buttons_add_png, sizeof(buttons_add_png));
@@ -61,6 +81,8 @@ XABSearchPanelADT( parent )
void XABSearchPanel::UpdateOptions( wxCommandEvent& event )
{
+ // Update the options in the search panel.
+
if (choOption->GetSelection() == 12 ||
choOption->GetSelection() == 13 ||
choOption->GetSelection() == 14 ){
@@ -84,6 +106,8 @@ void XABSearchPanel::UpdateOptions( wxCommandEvent& event )
void XABSearchPanel::AddSearchWidget( wxCommandEvent& event )
{
+ // Add the search panel.
+
frmSearch *SCHWin = static_cast(SCHWinPtr);
wxCommandEvent eventsend(SE_ADDSEARCHSETTING);
@@ -94,6 +118,8 @@ void XABSearchPanel::AddSearchWidget( wxCommandEvent& event )
void XABSearchPanel::RemoveSearchWidget( wxCommandEvent& event )
{
+ // Remove the search panel.
+
frmSearch *SCHWin = static_cast(SCHWinPtr);
wxCommandEvent eventsend(SE_REMOVESEARCHSETTING);
@@ -105,6 +131,8 @@ void XABSearchPanel::RemoveSearchWidget( wxCommandEvent& event )
void XABSearchPanel::EnableButtons(bool AddButton, bool DeleteButton)
{
+ // Enable the buttons for the search panel.
+
if (AddButton == TRUE){
btnAdd->Enable();
} else {
@@ -121,24 +149,32 @@ void XABSearchPanel::EnableButtons(bool AddButton, bool DeleteButton)
void XABSearchPanel::SetupPointers(void* SCHWinPtrInc){
+ // Setup the pointers for the search panel.
+
SCHWinPtr = SCHWinPtrInc;
}
void XABSearchPanel::SetupInteger(int IntInc){
+ // Set the ID of the search panel.
+
SCHInt = IntInc;
}
int XABSearchPanel::GetInteger(){
+ // Get the ID of the search panel.
+
return SCHInt;
}
void XABSearchPanel::DisableControls(wxCommandEvent &event){
+ // Disable the search controls.
+
choOption->Disable();
chkActive->Disable();
txtSearch->Disable();
@@ -149,6 +185,8 @@ void XABSearchPanel::DisableControls(wxCommandEvent &event){
void XABSearchPanel::EnableControls(wxCommandEvent &event){
+ // Enable the search controls.
+
choOption->Enable();
chkActive->Enable();
txtSearch->Enable();
@@ -159,18 +197,24 @@ void XABSearchPanel::EnableControls(wxCommandEvent &event){
int XABSearchPanel::GetSelectionOption(){
+ // Get the selection option.
+
return choOption->GetSelection();
}
bool XABSearchPanel::GetCheckboxSetting(){
+ // Get the checkbox setting.
+
return chkActive->IsChecked();
}
wxString XABSearchPanel::GetStringSetting(){
+ // Get the search string setting.
+
return txtSearch->GetValue();
}
\ No newline at end of file