Added classes to manage simple tabular data of known structure using a

popup containing a wxGrid object.

BasePicker : Abstract class adding a popup to wxPickerBase  styled with
a wxTextCtrl.
BaseGridPicker : Abstract class adding a wxGrid in the popup.

JsonGridPickerCtrl : UI control storing the tabular data in a JSON
array.
LBoundJsonGridPicker : connect JsonGridPicker to database.
LGridJsonCellEditor : use LBoundJsonGridPicker in other wxGrid objects.
LGridJsonCellRenderer : render cell JSON data.

XmlGridPickerCtrl : UI control storing the tabular data in as XML
document.
LBoundXmlGridPicker : connect XmlGridPicker to database.
LGridXmlCellEditor : grid editor for LBoundXmlGridPicker.
LGridXmlCellRenderer : grid renderer for LBoundXmlGridPicker.

JsonHelper and XmlHelper : for applications to quickly get intent value
from database data..

The structure of managed tabular data :

Column 1 : Intent - this is what we want to store/edit. This can be
telephone numbers, email addresses, instant messaging addresses...
any single line piece of information that can exist many times for one
entity (person, company...).
Column 2 : Type - A short description of the intent : 'Home, Work,
Mobile, Fax, Other...'. It is displayed in a non editable wxComboBox.
Column 3 : Preferred - One line of data can be selected as the preferred
one. It is not mandatory, but it must be a single choice.
Column 4 : Notes - single line notes.

Adjust sql scripts and L7.dox.
Applied ANSI formatting style to all files.

Other changes :

Work around a nasty misbehavior.
Grid columns edited by a translated combobox expect full string
data as cell values. LResultSet::BEData() will report these mapped strings,
instead of database real data. LBoundComboBox::IsDirty() will always be
true even if the editor is unchanged once created.
Simplest workaround : disconnect m_BoundComboBox if unchanged.

LGridTextEditor::ProvideFormEditor() : set the form editor's value
explicitely.; wxTextCtrl does not interpret data it receives

LBoundControl::SetNull must be void.

LBoundGrid : Unbind:: instructions should limit to the widget's id, like Bind::

LConnection::GetReturnedKeys should return NULL.
LConnection::SetData should return void.

Notes : wxJSON must be configured with the same prefix as wxWidgets,
here /usr/local/{wxWidgets,wxWidgets-Release}.
This commit is contained in:
SET
2019-12-22 16:35:16 +01:00
parent 1ec23950c0
commit aaacf88071
82 changed files with 3368 additions and 595 deletions

5
L7/.dep.inc Normal file
View File

@@ -0,0 +1,5 @@
# This code depends on make tool being used
DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
ifneq (${DEPFILES},)
include ${DEPFILES}
endif

View File

@@ -831,7 +831,7 @@ FILE_PATTERNS = *.c \
# be searched for input files as well. # be searched for input files as well.
# The default value is: NO. # The default value is: NO.
RECURSIVE = NO RECURSIVE = YES
# The EXCLUDE tag can be used to specify files and/or directories that should be # The EXCLUDE tag can be used to specify files and/or directories that should be
# excluded from the INPUT source files. This way you can easily exclude a # excluded from the INPUT source files. This way you can easily exclude a

View File

@@ -10,16 +10,15 @@
#include "LBoundCheckBox.h" #include "LBoundCheckBox.h"
LBoundCheckBox::LBoundCheckBox(wxWindow* parent, wxWindowID id, long style) LBoundCheckBox::LBoundCheckBox(wxWindow* parent, wxWindowID id, long style)
: wxCheckBox(parent, id, _T("LCheckBox"), wxDefaultPosition, wxDefaultSize, style) : wxCheckBox(parent, id, _T("LCheckBox"), wxDefaultPosition, wxDefaultSize, style) {
{
m_sqlQuote = wxEmptyString; m_sqlQuote = wxEmptyString;
SetNull(); SetNull();
} }
LBoundCheckBox::~LBoundCheckBox() LBoundCheckBox::~LBoundCheckBox() {
{
if (m_rs) m_rs->UnRegisterControl(this); if (m_rs) m_rs->UnRegisterControl(this);
} }
const wxAny LBoundCheckBox::GetData() { const wxAny LBoundCheckBox::GetData() {
if (Is3State()) { if (Is3State()) {
if (Get3StateValue() == wxCHK_UNDETERMINED) return L_SQLNULL; if (Get3StateValue() == wxCHK_UNDETERMINED) return L_SQLNULL;
@@ -30,7 +29,8 @@ const wxAny LBoundCheckBox::GetData() {
if (GetValue() == wxCHK_CHECKED) return 1; if (GetValue() == wxCHK_CHECKED) return 1;
} }
} }
bool LBoundCheckBox::SetData(const wxAny& newData) {
void LBoundCheckBox::SetData(const wxAny& newData) {
/* The interpretation of literal non is not documented /* The interpretation of literal non is not documented
* as it's for internal use. * as it's for internal use.
*/ */
@@ -40,7 +40,7 @@ bool LBoundCheckBox::SetData(const wxAny& newData) {
if (snewData.IsEmpty() if (snewData.IsEmpty()
|| snewData == L_SQLNULL) { || snewData == L_SQLNULL) {
Set3StateValue(wxCHK_UNDETERMINED); Set3StateValue(wxCHK_UNDETERMINED);
return true; return;
} }
if (snewData == _T("0") if (snewData == _T("0")
|| snewData.Lower() == _T("no")) { || snewData.Lower() == _T("no")) {
@@ -48,7 +48,7 @@ bool LBoundCheckBox::SetData(const wxAny& newData) {
} else { } else {
Set3StateValue(wxCHK_CHECKED); Set3StateValue(wxCHK_CHECKED);
} }
return true; return;
} else { } else {
if (snewData == _T("0") if (snewData == _T("0")
|| snewData.IsEmpty() || snewData.IsEmpty()
@@ -58,14 +58,14 @@ bool LBoundCheckBox::SetData(const wxAny& newData) {
SetValue(wxCHK_CHECKED); SetValue(wxCHK_CHECKED);
} }
} }
return false;
} }
void LBoundCheckBox::SetResultSet(LResultSet* newResultSet)
{ void LBoundCheckBox::SetResultSet(LResultSet* newResultSet) {
m_rs = newResultSet; m_rs = newResultSet;
if (m_rs == NULL) return; if (m_rs == NULL) return;
m_rs->RegisterControl(this); m_rs->RegisterControl(this);
} }
bool LBoundCheckBox::IsNull() { bool LBoundCheckBox::IsNull() {
if (Is3State()) { if (Is3State()) {
return (Get3StateValue() == wxCHK_UNDETERMINED); return (Get3StateValue() == wxCHK_UNDETERMINED);
@@ -73,25 +73,28 @@ bool LBoundCheckBox::IsNull() {
return false; return false;
} }
} }
bool LBoundCheckBox::SetNull() {
return SetData(wxEmptyString); void LBoundCheckBox::SetNull() {
SetData(wxEmptyString);
} }
bool LBoundCheckBox::IsDirty() { bool LBoundCheckBox::IsDirty() {
wxASSERT_MSG(m_rs != NULL, "m_rs est NULL."); wxASSERT_MSG(m_rs != NULL, "m_rs est NULL.");
wxAny ctrlData = GetData(); // 0, 1 or L_SQLNULL wxAny ctrlData = GetData(); // 0, 1 or L_SQLNULL
wxAny BEData = m_rs->GetData(m_columnName); wxAny BEData = m_rs->GetData(m_columnName);
int iBEData; BEData.GetAs(&iBEData); int iBEData;
BEData.GetAs(&iBEData);
if (Is3State()) { if (Is3State()) {
if (BEData.IsNull() if (BEData.IsNull()
|| BEData.As<wxString>().IsEmpty()) { || BEData.As<wxString>().IsEmpty()) {
BEData = L_SQLNULL; BEData = L_SQLNULL;
} else if (iBEData != 0) { } else if (iBEData != 0) {
BEData = 1; BEData = 1;
} }
} else { } else {
if (BEData.IsNull() if (BEData.IsNull()
|| iBEData == 0 || iBEData == 0
|| BEData.As<wxString>().IsEmpty()) { || BEData.As<wxString>().IsEmpty()) {
BEData = 0; BEData = 0;
} else { } else {
BEData = 1; BEData = 1;
@@ -99,6 +102,7 @@ bool LBoundCheckBox::IsDirty() {
} }
return (ctrlData.As<wxString>() != BEData.As<wxString>()); return (ctrlData.As<wxString>() != BEData.As<wxString>());
} }
const wxString LBoundCheckBox::GetDisplayedData() { const wxString LBoundCheckBox::GetDisplayedData() {
if (Is3State()) { if (Is3State()) {
if (Get3StateValue() == wxCHK_UNDETERMINED) return L_SQLNULL; if (Get3StateValue() == wxCHK_UNDETERMINED) return L_SQLNULL;

View File

@@ -8,14 +8,13 @@
*/ */
#ifndef LBOUNDCHECKBOX_H #ifndef LBOUNDCHECKBOX_H
#define LBOUNDCHECKBOX_H #define LBOUNDCHECKBOX_H
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include "LBoundControl.h" #include "LBoundControl.h"
#include "LResultSet.h" #include "LResultSet.h"
class LBoundCheckBox : public wxCheckBox, public LBoundControl class LBoundCheckBox : public wxCheckBox, public LBoundControl {
{
public: public:
LBoundCheckBox(wxWindow* parent, wxWindowID id = wxID_ANY, long style = 0); LBoundCheckBox(wxWindow* parent, wxWindowID id = wxID_ANY, long style = 0);
virtual ~LBoundCheckBox(); virtual ~LBoundCheckBox();
@@ -32,9 +31,8 @@ public:
* and any other value to checked status. * and any other value to checked status.
* *
* @param newData * @param newData
* @return
*/ */
bool SetData(const wxAny& newData); void SetData(const wxAny& newData);
/** /**
* Sets the resultset member and registers the control in the resultset. * Sets the resultset member and registers the control in the resultset.
* @param newResultSet * @param newResultSet
@@ -49,7 +47,7 @@ public:
* If control is tristate, it is set to undetermined state. Else, it is set to unchecked state. * If control is tristate, it is set to undetermined state. Else, it is set to unchecked state.
* @return * @return
*/ */
bool SetNull(); void SetNull();
bool IsDirty(); bool IsDirty();
/** /**
* If the control is checked, returns literal Oui * If the control is checked, returns literal Oui
@@ -64,5 +62,5 @@ private:
}; };
#endif /* LBOUNDCHECKBOX_H */ #endif /* LBOUNDCHECKBOX_H */

View File

@@ -163,17 +163,17 @@ void LBoundComboBox::Clear()
SetWindowStyleFlag(wsflags); SetWindowStyleFlag(wsflags);
} }
bool LBoundComboBox::SetData(const wxAny& data) void LBoundComboBox::SetData(const wxAny& data)
{ {
const wxString sData = data.As<wxString>(); const wxString sData = data.As<wxString>();
if (IsTranslated()) if (IsTranslated())
{ {
if (data.IsNull() if (data.IsNull()
|| sData.IsEmpty() || sData.IsEmpty()
|| sData == L_SQLNULL) || sData == L_SQLNULL)
{ {
SetNull(); SetNull();
return (GetSelection() != wxNOT_FOUND); // ? return;
} }
for (unsigned int i = 0; i < GetCount(); i++) for (unsigned int i = 0; i < GetCount(); i++)
{ {
@@ -183,18 +183,16 @@ bool LBoundComboBox::SetData(const wxAny& data)
if (x->GetData().As<wxString>() == sData) if (x->GetData().As<wxString>() == sData)
{ {
SetSelection(i); SetSelection(i);
return true; return;
} }
} }
} }
} }
else else
{ {
bool hasData = FindString(sData, true); //bool hasData = FindString(sData, true);
SetValue(sData); SetValue(sData);
return hasData;
} }
return false;
} }
const wxAny LBoundComboBox::GetData() const wxAny LBoundComboBox::GetData()
@@ -245,7 +243,7 @@ bool LBoundComboBox::IsNull()
} }
} }
bool LBoundComboBox::SetNull() void LBoundComboBox::SetNull()
{ {
if (IsTranslated()) if (IsTranslated())
{ {
@@ -255,17 +253,16 @@ bool LBoundComboBox::SetNull()
if (x == NULL) if (x == NULL)
{ {
SetSelection(i); SetSelection(i);
return true; return;
} }
} }
return false; return;
} }
long wsflags = GetWindowStyleFlag(); long wsflags = GetWindowStyleFlag();
SetWindowStyleFlag(0); SetWindowStyleFlag(0);
SetSelection(wxNOT_FOUND); SetSelection(wxNOT_FOUND);
SetValue(wxEmptyString); SetValue(wxEmptyString);
SetWindowStyleFlag(wsflags); SetWindowStyleFlag(wsflags);
return true;
} }
bool LBoundComboBox::IsDirty() bool LBoundComboBox::IsDirty()

View File

@@ -8,11 +8,12 @@
*/ */
#ifndef LBOUNDCOMBOBOX_H #ifndef LBOUNDCOMBOBOX_H
#define LBOUNDCOMBOBOX_H #define LBOUNDCOMBOBOX_H
#include <wx/combobox.h> #include <wx/combobox.h>
#include "LBoundControl.h" #include "LBoundControl.h"
#include "LResultSet.h" #include "LResultSet.h"
/** /**
* The control is called 'translated' if its items have associated client data that are instances of LItemData. * The control is called 'translated' if its items have associated client data that are instances of LItemData.
* The item strings are then only descriptive. * The item strings are then only descriptive.
@@ -93,9 +94,8 @@ public:
* If newData is empty or literal NULL, calls SetNull(). * If newData is empty or literal NULL, calls SetNull().
* Else, selects the first item whose associated client data equals newData. * Else, selects the first item whose associated client data equals newData.
* @param newData * @param newData
* @return false if no item can be matched with newData, true otherwise.
*/ */
bool SetData(const wxAny& newData); void SetData(const wxAny& newData);
/** /**
* Sets the resultset member and registers the control in the resultset. * Sets the resultset member and registers the control in the resultset.
* @param newResultSet * @param newResultSet
@@ -114,7 +114,7 @@ public:
* Else, selects the first item that does not have an associated client data. * Else, selects the first item that does not have an associated client data.
* @return * @return
*/ */
bool SetNull(); void SetNull();
bool IsDirty(); bool IsDirty();
/** /**
* Alias for GetValue(). * Alias for GetValue().
@@ -125,5 +125,5 @@ private:
}; };
#endif /* LBOUNDCOMBOBOX_H */ #endif /* LBOUNDCOMBOBOX_H */

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LBOUNDCONTROL_H #ifndef LBOUNDCONTROL_H
#define LBOUNDCONTROL_H #define LBOUNDCONTROL_H
#include <wx/wx.h> #include <wx/wx.h>
#include "LResultSet.h" #include "LResultSet.h"
@@ -16,6 +16,7 @@
#define L_SQLNULL wxString(_T("NULL")) #define L_SQLNULL wxString(_T("NULL"))
class LResultSet; class LResultSet;
/** /**
* Abstract base class for controls interacting with database table columns. * Abstract base class for controls interacting with database table columns.
* *
@@ -26,6 +27,7 @@ class LBoundControl
public: public:
LBoundControl(); LBoundControl();
virtual ~LBoundControl(); virtual ~LBoundControl();
/** /**
* Do not use column aliases. * Do not use column aliases.
* @param newColName * @param newColName
@@ -45,14 +47,16 @@ public:
* @return * @return
*/ */
virtual const wxAny GetData() = 0; virtual const wxAny GetData() = 0;
virtual bool SetData(const wxAny& newData) = 0; virtual void SetData(const wxAny& newData) = 0;
virtual void SetResultSet(LResultSet * newResultSet) = 0; virtual void SetResultSet(LResultSet * newResultSet) = 0;
LResultSet* GetResultSet() const LResultSet* GetResultSet() const
{ {
return m_rs; return m_rs;
} }
virtual bool IsNull() = 0; virtual bool IsNull() = 0;
virtual bool SetNull() = 0; virtual void SetNull() = 0;
/** /**
* If the database column is numeric, use wxEmptystring, else, use a single quote ' . * If the database column is numeric, use wxEmptystring, else, use a single quote ' .
* *
@@ -86,5 +90,5 @@ private:
}; };
#endif /* LBOUNDCONTROL_H */ #endif /* LBOUNDCONTROL_H */

View File

@@ -10,8 +10,8 @@
#include "LBoundDatePickerCtrl.h" #include "LBoundDatePickerCtrl.h"
#include <wx/tokenzr.h> #include <wx/tokenzr.h>
LBoundDatePickerCtrl::LBoundDatePickerCtrl(wxWindow* parent, wxWindowID id) LBoundDatePickerCtrl::LBoundDatePickerCtrl(wxWindow* parent, wxWindowID id)
: wxDatePickerCtrl(parent, id, wxInvalidDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_ALLOWNONE|wxDP_SHOWCENTURY) : wxDatePickerCtrl(parent, id, wxInvalidDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT | wxDP_ALLOWNONE | wxDP_SHOWCENTURY)
{ {
m_sqlQuote = _T("'"); m_sqlQuote = _T("'");
SetValue(wxInvalidDateTime); SetValue(wxInvalidDateTime);
@@ -22,59 +22,70 @@ LBoundDatePickerCtrl::~LBoundDatePickerCtrl()
if (m_rs) m_rs->UnRegisterControl(this); if (m_rs) m_rs->UnRegisterControl(this);
} }
const wxAny LBoundDatePickerCtrl::GetData() { const wxAny LBoundDatePickerCtrl::GetData()
{
if (IsNull()) return L_SQLNULL; if (IsNull()) return L_SQLNULL;
return GetValue().GetDateOnly().FormatISODate(); return GetValue().GetDateOnly().FormatISODate();
} }
bool LBoundDatePickerCtrl::SetData(const wxAny& newData) { void LBoundDatePickerCtrl::SetData(const wxAny& newData)
if (newData.IsNull()) { {
if (newData.IsNull())
{
SetValue(wxInvalidDateTime); SetValue(wxInvalidDateTime);
return false; return;
} }
if (newData.As<wxString>() == L_SQLNULL || newData.As<wxString>().IsEmpty()) { if (newData.As<wxString>() == L_SQLNULL || newData.As<wxString>().IsEmpty())
{
SetValue(wxInvalidDateTime); SetValue(wxInvalidDateTime);
return true; return;
} }
wxString s; newData.GetAs(&s); wxString s;
newData.GetAs(&s);
const wxDateTime dt = BuildDate(s); const wxDateTime dt = BuildDate(s);
if (!dt.IsValid()) {
SetValue(wxInvalidDateTime);
return false;
}
SetValue(dt); SetValue(dt);
return true;
} }
void LBoundDatePickerCtrl::SetResultSet(LResultSet* newResultSet) void LBoundDatePickerCtrl::SetResultSet(LResultSet* newResultSet)
{ {
m_rs = newResultSet; m_rs = newResultSet;
if (m_rs == NULL) return; if (m_rs == NULL) return;
m_rs->RegisterControl(this); m_rs->RegisterControl(this);
} }
bool LBoundDatePickerCtrl::IsNull() {
bool LBoundDatePickerCtrl::IsNull()
{
return !(GetValue().IsValid()); return !(GetValue().IsValid());
} }
bool LBoundDatePickerCtrl::SetNull() {
return SetData(L_SQLNULL); void LBoundDatePickerCtrl::SetNull()
{
SetData(L_SQLNULL);
} }
bool LBoundDatePickerCtrl::IsDirty() {
bool LBoundDatePickerCtrl::IsDirty()
{
wxASSERT_MSG(m_rs != NULL, "m_rs est NULL."); wxASSERT_MSG(m_rs != NULL, "m_rs est NULL.");
wxAny BEData = m_rs->GetData(m_columnName); wxAny BEData = m_rs->GetData(m_columnName);
if (BEData.As<wxString>().IsEmpty()) BEData = L_SQLNULL; if (BEData.As<wxString>().IsEmpty()) BEData = L_SQLNULL;
return (GetData().As<wxString>() != BEData.As<wxString>()); return (GetData().As<wxString>() != BEData.As<wxString>());
} }
const wxString LBoundDatePickerCtrl::GetDisplayedData() {
const wxString LBoundDatePickerCtrl::GetDisplayedData()
{
if (IsNull()) return wxEmptyString; if (IsNull()) return wxEmptyString;
return GetValue().GetDateOnly().FormatDate(); return GetValue().GetDateOnly().FormatDate();
} }
wxDateTime LBoundDatePickerCtrl::BuildDate(const wxString& ISODate) {
wxDateTime LBoundDatePickerCtrl::BuildDate(const wxString& ISODate)
{
wxDateTime dt = wxDateTime::Today(); wxDateTime dt = wxDateTime::Today();
if (!dt.ParseISODate(ISODate)) return wxInvalidDateTime; if (!dt.ParseISODate(ISODate)) return wxInvalidDateTime;
unsigned int * res = new unsigned int[3]; unsigned int * res = new unsigned int[3];
unsigned int i = 0; unsigned int i = 0;
wxAny token; wxAny token;
wxStringTokenizer tkz(ISODate, _T("-")); wxStringTokenizer tkz(ISODate, _T("-"));
while ( tkz.HasMoreTokens() ) while (tkz.HasMoreTokens())
{ {
token = tkz.GetNextToken(); token = tkz.GetNextToken();
token.GetAs(&res[i]); token.GetAs(&res[i]);

View File

@@ -8,11 +8,12 @@
*/ */
#ifndef LBOUNDDATEPICKERCTRL_H #ifndef LBOUNDDATEPICKERCTRL_H
#define LBOUNDDATEPICKERCTRL_H #define LBOUNDDATEPICKERCTRL_H
#include <wx/datectrl.h> #include <wx/datectrl.h>
#include "LBoundControl.h" #include "LBoundControl.h"
#include "LResultSet.h" #include "LResultSet.h"
/** /**
* Initialised with wxInvalidDateTime. The underlying toolkit must allow wxDP_ALLOWNONE. * Initialised with wxInvalidDateTime. The underlying toolkit must allow wxDP_ALLOWNONE.
* *
@@ -32,10 +33,8 @@ public:
/** /**
* *
* @param newData * @param newData
* @return false if newData is not a valid ISO date string.
* True if newData is empty, or literal NULL, or a valid ISO date string.
*/ */
bool SetData(const wxAny& newData); void SetData(const wxAny& newData);
/** /**
* Sets the resultset member and registers the control in the resultset. * Sets the resultset member and registers the control in the resultset.
* @param newResultSet * @param newResultSet
@@ -50,7 +49,7 @@ public:
* Sets the control to invalid date. * Sets the control to invalid date.
* @return * @return
*/ */
bool SetNull(); void SetNull();
bool IsDirty(); bool IsDirty();
/** /**
* If IsNull() is true, returns wxEmptyString. * If IsNull() is true, returns wxEmptyString.
@@ -68,10 +67,10 @@ public:
* @return * @return
*/ */
static wxDateTime BuildDate(const wxString& ISODate); static wxDateTime BuildDate(const wxString& ISODate);
private: private:
}; };
#endif /* LBOUNDDATEPICKERCTRL_H */ #endif /* LBOUNDDATEPICKERCTRL_H */

View File

@@ -18,6 +18,10 @@
#include "LGridTextRenderer.h" #include "LGridTextRenderer.h"
#include "LGridSpinEditor.h" #include "LGridSpinEditor.h"
#include "LGridSpinRenderer.h" #include "LGridSpinRenderer.h"
#include "special/LGridJsonCellRenderer.h"
#include "special/LGridJsonCellEditor.h"
#include "special/LGridXmlCellRenderer.h"
#include "special/LGridXmlCellEditor.h"
LBoundGrid::LBoundGrid(wxWindow* parent, wxWindowID id) LBoundGrid::LBoundGrid(wxWindow* parent, wxWindowID id)
: wxGrid(parent, id, wxDefaultPosition, wxDefaultSize, wxHSCROLL | wxVSCROLL) : wxGrid(parent, id, wxDefaultPosition, wxDefaultSize, wxHSCROLL | wxVSCROLL)
@@ -34,9 +38,10 @@ LBoundGrid::LBoundGrid(wxWindow* parent, wxWindowID id)
SetTable(m_stringTable); SetTable(m_stringTable);
SetSelectionMode(wxGridSelectRows); SetSelectionMode(wxGridSelectRows);
CreateMenu(); CreateMenu();
Bind(wxEVT_GRID_RANGE_SELECT, &LBoundGrid::ForceSingleLineRange, this); // These bindings must not propagate to the grid of BaseGridPicker !!!
Bind(wxEVT_GRID_SELECT_CELL, &LBoundGrid::CellSelected, this); Bind(wxEVT_GRID_RANGE_SELECT, &LBoundGrid::ForceSingleLineRange, this, GetId(), GetId());
Bind(wxEVT_GRID_CELL_RIGHT_CLICK, &LBoundGrid::ShowMenu, this); Bind(wxEVT_GRID_SELECT_CELL, &LBoundGrid::CellSelected, this, GetId(), GetId());
Bind(wxEVT_GRID_CELL_RIGHT_CLICK, &LBoundGrid::ShowMenu, this, GetId(), GetId());
} }
LBoundGrid::~LBoundGrid() LBoundGrid::~LBoundGrid()
@@ -66,8 +71,8 @@ void LBoundGrid::SetResultSet(LResultSet* newResultSet)
void LBoundGrid::ClearGrid() void LBoundGrid::ClearGrid()
{ {
Unbind(wxEVT_GRID_RANGE_SELECT, &LBoundGrid::ForceSingleLineRange, this); Unbind(wxEVT_GRID_RANGE_SELECT, &LBoundGrid::ForceSingleLineRange, this, GetId(), GetId());
Unbind(wxEVT_GRID_SELECT_CELL, &LBoundGrid::CellSelected, this); Unbind(wxEVT_GRID_SELECT_CELL, &LBoundGrid::CellSelected, this, GetId(), GetId());
if (GetNumberRows()) DeleteRows(0, GetNumberRows()); if (GetNumberRows()) DeleteRows(0, GetNumberRows());
if (GetNumberCols()) DeleteCols(0, GetNumberCols()); if (GetNumberCols()) DeleteCols(0, GetNumberCols());
} }
@@ -79,8 +84,8 @@ void LBoundGrid::FillGrid()
wxGridUpdateLocker locker(this); wxGridUpdateLocker locker(this);
// Starting again, the grid's resultset must free itself from any registered controls. // Starting again, the grid's resultset must free itself from any registered controls.
RestoreEditorControls(); RestoreEditorControls();
Unbind(wxEVT_GRID_RANGE_SELECT, &LBoundGrid::ForceSingleLineRange, this); Unbind(wxEVT_GRID_RANGE_SELECT, &LBoundGrid::ForceSingleLineRange, this, GetId(), GetId());
Unbind(wxEVT_GRID_SELECT_CELL, &LBoundGrid::CellSelected, this); Unbind(wxEVT_GRID_SELECT_CELL, &LBoundGrid::CellSelected, this, GetId(), GetId());
// Remember some states // Remember some states
const wxGridSizesInfo colSizes = GetColSizes(); const wxGridSizesInfo colSizes = GetColSizes();
const int col = GetGridCursorCol() > -1 ? GetGridCursorCol() : 0; const int col = GetGridCursorCol() > -1 ? GetGridCursorCol() : 0;
@@ -112,8 +117,8 @@ void LBoundGrid::FillGrid()
m_stringTable->SetValue(r, c, (m_rs->GetData(r, c)).As<wxString>()); m_stringTable->SetValue(r, c, (m_rs->GetData(r, c)).As<wxString>());
} }
} }
Bind(wxEVT_GRID_SELECT_CELL, &LBoundGrid::CellSelected, this); Bind(wxEVT_GRID_SELECT_CELL, &LBoundGrid::CellSelected, this, GetId(), GetId());
Bind(wxEVT_GRID_RANGE_SELECT, &LBoundGrid::ForceSingleLineRange, this); Bind(wxEVT_GRID_RANGE_SELECT, &LBoundGrid::ForceSingleLineRange, this, GetId(), GetId());
// Restore // Restore
SetColSizes(colSizes); SetColSizes(colSizes);
// synchronize with the resultset // synchronize with the resultset
@@ -234,6 +239,54 @@ void LBoundGrid::CreateSpinColumn(const wxString& newColName,
SetColSize(col, width); SetColSize(col, width);
} }
void LBoundGrid::CreateJsonGridColumn(const wxString& newColName,
const wxString& newLabel,
unsigned int width,
const wxString& intentLabel,
const wxArrayString& types,
wxSize popupSize,
bool readOnly)
{
wxASSERT_MSG(m_rs != NULL, _("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridJsonCellEditor * ed = new LGridJsonCellEditor(newColName, intentLabel, types, popupSize);
colAtt->SetEditor(ed);
LGridJsonCellRenderer * rn = new LGridJsonCellRenderer();
colAtt->SetRenderer(rn);
colAtt->SetReadOnly(readOnly);
colAtt->SetAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
m_stringTable->SetColAttr(colAtt, col);
m_stringTable->SetColLabelValue(col, newLabel);
SetColSize(col, width);
}
void LBoundGrid::CreateXmlGridColumn(const wxString& newColName,
const wxString& newLabel,
unsigned int width,
const wxString& intentLabel,
const wxArrayString& types,
wxSize popupSize,
bool readOnly)
{
wxASSERT_MSG(m_rs != NULL, _("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridXmlCellEditor * ed = new LGridXmlCellEditor(newColName, intentLabel, types, popupSize);
colAtt->SetEditor(ed);
LGridXmlCellRenderer * rn = new LGridXmlCellRenderer();
colAtt->SetRenderer(rn);
colAtt->SetReadOnly(readOnly);
colAtt->SetAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
m_stringTable->SetColAttr(colAtt, col);
m_stringTable->SetColLabelValue(col, newLabel);
SetColSize(col, width);
}
const wxString LBoundGrid::GetColName(const unsigned int col) const wxString LBoundGrid::GetColName(const unsigned int col)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _("RS = NULL"));
@@ -427,7 +480,7 @@ void LBoundGrid::ForceSingleLineRange(wxGridRangeSelectEvent& evt)
{ {
wxASSERT_MSG(GetSelectionMode() == wxGridSelectRows, "Selection mode is not wxGridSelectRows."); wxASSERT_MSG(GetSelectionMode() == wxGridSelectRows, "Selection mode is not wxGridSelectRows.");
if (evt.ControlDown() == true if (evt.ControlDown() == true
|| evt.GetTopRow() != evt.GetBottomRow()) || evt.GetTopRow() != evt.GetBottomRow())
{ {
SelectRow(GetGridCursorRow()); SelectRow(GetGridCursorRow());
evt.Veto(); evt.Veto();
@@ -527,7 +580,8 @@ void LBoundGrid::ShowMenu(wxGridEvent& evt)
void LBoundGrid::MenuAction(wxCommandEvent& evt) void LBoundGrid::MenuAction(wxCommandEvent& evt)
{ {
switch (evt.GetId()) { switch (evt.GetId())
{
case ID_MNU_SAVE: case ID_MNU_SAVE:
if (m_rs) if (m_rs)
{ {
@@ -650,7 +704,8 @@ void LBoundGrid::ShowFormView()
wxControl * fEditor = NULL; wxControl * fEditor = NULL;
// One more pointer to a text control // One more pointer to a text control
wxTextCtrl * txtCtrl = NULL; wxTextCtrl * txtCtrl = NULL;
switch (type) { switch (type)
{
case LGridColEditor::TEXT: case LGridColEditor::TEXT:
fEditor = static_cast<wxTextCtrl*> (gce->ProvideFormEditor(pan0)); fEditor = static_cast<wxTextCtrl*> (gce->ProvideFormEditor(pan0));
txtCtrl = static_cast<wxTextCtrl*> (fEditor); txtCtrl = static_cast<wxTextCtrl*> (fEditor);
@@ -667,6 +722,12 @@ void LBoundGrid::ShowFormView()
case LGridColEditor::SPIN: case LGridColEditor::SPIN:
fEditor = static_cast<wxSpinCtrl*> (gce->ProvideFormEditor(pan0)); fEditor = static_cast<wxSpinCtrl*> (gce->ProvideFormEditor(pan0));
break; break;
case LGridColEditor::JSON_GRID:
fEditor = static_cast<JsonGridPickerCtrl*> (gce->ProvideFormEditor(pan0));
break;
case LGridColEditor::XML_GRID:
fEditor = static_cast<XmlGridPickerCtrl*> (gce->ProvideFormEditor(pan0));
break;
} }
// A label corresponding to the grid column header // A label corresponding to the grid column header
wxStaticText * lbl = new wxStaticText(pan0, wxID_ANY, m_stringTable->GetColLabelValue(col), wxDefaultPosition, wxDefaultSize, 0); wxStaticText * lbl = new wxStaticText(pan0, wxID_ANY, m_stringTable->GetColLabelValue(col), wxDefaultPosition, wxDefaultSize, 0);

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LBOUNDGRID_H #ifndef LBOUNDGRID_H
#define LBOUNDGRID_H #define LBOUNDGRID_H
#include <wx/grid.h> #include <wx/grid.h>
#include "LResultSet.h" #include "LResultSet.h"
@@ -119,6 +119,20 @@ public:
int newMax = 100, int newMax = 100,
int newInitial = 0, int newInitial = 0,
bool readOnly = false); bool readOnly = false);
void CreateJsonGridColumn(const wxString& newColName,
const wxString& newLabel,
unsigned int width,
const wxString& intentLabel,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize,
bool readOnly = false);
void CreateXmlGridColumn(const wxString& newColName,
const wxString& newLabel,
unsigned int width,
const wxString& intentLabel,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize,
bool readOnly = false);
/** /**
* *
* @param col the grid column index * @param col the grid column index
@@ -316,5 +330,5 @@ private:
}; };
#endif /* LBOUNDGRID_H */ #endif /* LBOUNDGRID_H */

View File

@@ -34,9 +34,9 @@ void LBoundSpinCtrl::SetResultSet(LResultSet* newResultSet)
m_rs->RegisterControl(this); m_rs->RegisterControl(this);
} }
bool LBoundSpinCtrl::SetData(const wxAny& newData) void LBoundSpinCtrl::SetData(const wxAny& newData)
{ {
if (newData.IsNull() || newData.As<wxString>().IsEmpty() ) if (newData.IsNull() || newData.As<wxString>().IsEmpty())
{ {
SetValue(m_initialValue); SetValue(m_initialValue);
} }
@@ -46,7 +46,6 @@ bool LBoundSpinCtrl::SetData(const wxAny& newData)
newData.GetAs<int>(&iData); newData.GetAs<int>(&iData);
SetValue(iData); SetValue(iData);
} }
return true;
} }
bool LBoundSpinCtrl::IsDirty() bool LBoundSpinCtrl::IsDirty()

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LBOUNDSPINCTRL_H #ifndef LBOUNDSPINCTRL_H
#define LBOUNDSPINCTRL_H #define LBOUNDSPINCTRL_H
#include <wx/spinctrl.h> #include <wx/spinctrl.h>
#include "LBoundControl.h" #include "LBoundControl.h"
@@ -48,9 +48,8 @@ public:
/** /**
* If newData is null or empty, sets the control to its initial value. * If newData is null or empty, sets the control to its initial value.
* @param newData * @param newData
* @return
*/ */
bool SetData(const wxAny& newData); void SetData(const wxAny& newData);
/** /**
* This control is never empty. * This control is never empty.
@@ -65,7 +64,7 @@ public:
* Sets the control to its initial value. * Sets the control to its initial value.
* @return * @return
*/ */
bool SetNull() void SetNull()
{ {
SetData(m_initialValue); SetData(m_initialValue);
} }
@@ -84,5 +83,5 @@ private:
int m_initialValue; int m_initialValue;
}; };
#endif /* LBOUNDSPINCTRL_H */ #endif /* LBOUNDSPINCTRL_H */

View File

@@ -33,10 +33,9 @@ const wxAny LBoundTextCtrl::GetData()
return GetValue(); return GetValue();
} }
bool LBoundTextCtrl::SetData(const wxAny& newData) void LBoundTextCtrl::SetData(const wxAny& newData)
{ {
ChangeValue(newData.As<wxString>()); ChangeValue(newData.As<wxString>());
return true;
} }
bool LBoundTextCtrl::IsDirty() bool LBoundTextCtrl::IsDirty()

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LBOUNDTEXTCTRL_H #ifndef LBOUNDTEXTCTRL_H
#define LBOUNDTEXTCTRL_H #define LBOUNDTEXTCTRL_H
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include "LBoundControl.h" #include "LBoundControl.h"
@@ -32,9 +32,9 @@ public:
/** /**
* Calls ChangeValue(). * Calls ChangeValue().
* @param newData * @param newData
* @return
*/ */
bool SetData(const wxAny& newData); void SetData(const wxAny& newData);
/** /**
* Alias for IsEmpty(). * Alias for IsEmpty().
* @return * @return
@@ -43,15 +43,17 @@ public:
{ {
return IsEmpty(); return IsEmpty();
} }
/** /**
* Alias for Clear(). * Alias for Clear().
* @return * @return
*/ */
bool SetNull() void SetNull()
{ {
Clear(); Clear();
} }
bool IsDirty(); bool IsDirty();
/** /**
* Alias for GetValue(). * Alias for GetValue().
* @return * @return
@@ -64,5 +66,5 @@ public:
private: private:
}; };
#endif /* LBOUNDTEXTCTRL_H */ #endif /* LBOUNDTEXTCTRL_H */

View File

@@ -53,12 +53,15 @@ LConnectionEvent::LConnectionEvent()
LConnectionEvent::~LConnectionEvent() LConnectionEvent::~LConnectionEvent()
{ {
} }
void LConnectionEvent::BeforeExecute(const LConnection* caller) void LConnectionEvent::BeforeExecute(const LConnection* caller)
{ {
} }
void LConnectionEvent::AfterExecute(const LConnection* caller) void LConnectionEvent::AfterExecute(const LConnection* caller)
{ {
} }
void LConnectionEvent::Inform(const LConnection* caller, const LInformation& msg) const void LConnectionEvent::Inform(const LConnection* caller, const LInformation& msg) const
{ {
} }

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LCONNECTION_H #ifndef LCONNECTION_H
#define LCONNECTION_H #define LCONNECTION_H
#include <wx/wx.h> #include <wx/wx.h>
#include "LInformation.h" #include "LInformation.h"
@@ -116,6 +116,7 @@ public:
*/ */
virtual void * GetReturnedKeys() const virtual void * GetReturnedKeys() const
{ {
return NULL;
}; };
/** /**
@@ -134,6 +135,7 @@ public:
* @param evh : an LConnectionEvent derived class. * @param evh : an LConnectionEvent derived class.
*/ */
void UnRegisterEventHandler(LConnectionEvent * evh); void UnRegisterEventHandler(LConnectionEvent * evh);
/** /**
* Returns registered derived classes of LConnectionEvent. * Returns registered derived classes of LConnectionEvent.
* @return A reference to a wxArrayPtrVoid object. * @return A reference to a wxArrayPtrVoid object.
@@ -185,5 +187,5 @@ private:
}; };
#endif /* LCONNECTION_H */ #endif /* LCONNECTION_H */

View File

@@ -13,12 +13,15 @@
LGridCheckEditor::LGridCheckEditor(const wxString& newColName, bool isDualstate, const wxString& newNullLabel) LGridCheckEditor::LGridCheckEditor(const wxString& newColName, bool isDualstate, const wxString& newNullLabel)
{ {
m_triState = !isDualstate; m_triState = !isDualstate;
m_style = wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER; m_style = wxCHK_3STATE | wxCHK_ALLOW_3RD_STATE_FOR_USER;
if (!m_triState) m_style = wxCHK_2STATE; if (!m_triState) m_style = wxCHK_2STATE;
m_colName = newColName; m_colName = newColName;
if (newNullLabel.IsEmpty()) { if (newNullLabel.IsEmpty())
{
m_nullLabel = _T("?"); m_nullLabel = _T("?");
} else { }
else
{
m_nullLabel = newNullLabel; m_nullLabel = newNullLabel;
} }
m_type = LGridColEditor::CHECK; m_type = LGridColEditor::CHECK;
@@ -32,7 +35,8 @@ LGridCheckEditor::~LGridCheckEditor()
wxDELETE(m_control); wxDELETE(m_control);
} }
void LGridCheckEditor::Create (wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler) { void LGridCheckEditor::Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler)
{
m_control = new LBoundCheckBox(parent, id, m_style); m_control = new LBoundCheckBox(parent, id, m_style);
m_BoundCheckBox = static_cast<LBoundCheckBox*> (m_control); m_BoundCheckBox = static_cast<LBoundCheckBox*> (m_control);
m_BoundCheckBox->SetColumnName(m_colName); m_BoundCheckBox->SetColumnName(m_colName);
@@ -41,59 +45,86 @@ void LGridCheckEditor::Create (wxWindow *parent, wxWindowID id, wxEvtHandler *ev
m_control->Show(false); m_control->Show(false);
} }
void LGridCheckEditor::BeginEdit (int row, int col, wxGrid *grid) { void LGridCheckEditor::BeginEdit(int row, int col, wxGrid *grid)
if (m_control == NULL) { {
if (m_control == NULL)
{
Create(grid->GetGridWindow(), wxID_ANY, NULL); Create(grid->GetGridWindow(), wxID_ANY, NULL);
} }
m_BoundCheckBox->SetResultSet(((LBoundGrid *) grid)->GetResultSet()); m_BoundCheckBox->SetResultSet(((LBoundGrid *) grid)->GetResultSet());
const wxAny val = grid->GetTable()->GetValue(row, col); const wxAny val = grid->GetTable()->GetValue(row, col);
if (m_triState && val.As<wxString>() == m_nullLabel) { if (m_triState && val.As<wxString>() == m_nullLabel)
{
m_BoundCheckBox->SetNull(); m_BoundCheckBox->SetNull();
} else { }
else
{
m_BoundCheckBox->SetData(val); m_BoundCheckBox->SetData(val);
} }
m_control->Show(true); m_control->Show(true);
} }
wxGridCellEditor* LGridCheckEditor::Clone () const {
wxGridCellEditor* LGridCheckEditor::Clone() const
{
return new LGridCheckEditor(m_colName, !m_triState, m_nullLabel); return new LGridCheckEditor(m_colName, !m_triState, m_nullLabel);
} }
bool LGridCheckEditor::EndEdit (int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval) {
bool LGridCheckEditor::EndEdit(int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval)
{
// What do we do here ? // What do we do here ?
return true; return true;
} }
void LGridCheckEditor::ApplyEdit (int row, int col, wxGrid *grid) {
void LGridCheckEditor::ApplyEdit(int row, int col, wxGrid *grid)
{
const wxAny val = m_BoundCheckBox->GetData(); const wxAny val = m_BoundCheckBox->GetData();
if (m_triState && val.As<wxString>() == L_SQLNULL) { if (m_triState && val.As<wxString>() == L_SQLNULL)
{
grid->GetTable()->SetValue(row, col, m_nullLabel); grid->GetTable()->SetValue(row, col, m_nullLabel);
} else { }
else
{
grid->GetTable()->SetValue(row, col, val.As<wxString>()); grid->GetTable()->SetValue(row, col, val.As<wxString>());
} }
} }
void LGridCheckEditor::Reset () {
void LGridCheckEditor::Reset()
{
wxDELETE(m_control); wxDELETE(m_control);
m_BoundControl = NULL; m_BoundControl = NULL;
m_BoundCheckBox = NULL; m_BoundCheckBox = NULL;
} }
wxString LGridCheckEditor::GetValue() const { wxString LGridCheckEditor::GetValue() const
{
return m_control == NULL ? wxString(wxEmptyString) : m_BoundControl->GetData().As<wxString>(); return m_control == NULL ? wxString(wxEmptyString) : m_BoundControl->GetData().As<wxString>();
} }
wxControl* LGridCheckEditor::ProvideFormEditor(wxWindow * parent) {
wxControl* LGridCheckEditor::ProvideFormEditor(wxWindow * parent)
{
if (!m_formEditor) m_formEditor = new wxCheckBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_style); if (!m_formEditor) m_formEditor = new wxCheckBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_style);
if (m_triState) { if (m_triState)
{
m_formEditor->Set3StateValue(m_BoundCheckBox->Get3StateValue()); m_formEditor->Set3StateValue(m_BoundCheckBox->Get3StateValue());
} else { }
else
{
m_formEditor->SetValue(m_BoundCheckBox->GetValue()); m_formEditor->SetValue(m_BoundCheckBox->GetValue());
} }
m_formEditor->SetName(m_BoundCheckBox->GetName()); m_formEditor->SetName(m_BoundCheckBox->GetName());
if (m_BoundCheckBox->GetValidator()) m_formEditor->SetValidator(*(m_BoundCheckBox->GetValidator())); if (m_BoundCheckBox->GetValidator()) m_formEditor->SetValidator(*(m_BoundCheckBox->GetValidator()));
return m_formEditor; return m_formEditor;
} }
void LGridCheckEditor::SyncBack(const int row, const int col, wxGrid * grid) {
void LGridCheckEditor::SyncBack(const int row, const int col, wxGrid * grid)
{
if (!m_formEditor) return; if (!m_formEditor) return;
if (m_triState) { if (m_triState)
{
m_BoundCheckBox->Set3StateValue(m_formEditor->Get3StateValue()); m_BoundCheckBox->Set3StateValue(m_formEditor->Get3StateValue());
} else { }
else
{
m_BoundCheckBox->SetValue(m_formEditor->GetValue()); m_BoundCheckBox->SetValue(m_formEditor->GetValue());
} }
ApplyEdit(row, col, grid); ApplyEdit(row, col, grid);

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LGRIDCHECKEDITOR_H #ifndef LGRIDCHECKEDITOR_H
#define LGRIDCHECKEDITOR_H #define LGRIDCHECKEDITOR_H
#include "LBoundCheckBox.h" #include "LBoundCheckBox.h"
#include "LGridColEditor.h" #include "LGridColEditor.h"
@@ -93,5 +93,5 @@ private:
LBoundCheckBox * m_BoundCheckBox; LBoundCheckBox * m_BoundCheckBox;
}; };
#endif /* LGRIDCHECKEDITOR_H */ #endif /* LGRIDCHECKEDITOR_H */

View File

@@ -42,14 +42,14 @@ void LGridCheckRenderer::Draw(wxGrid & grid,
if (m_triState) if (m_triState)
{ {
if (val.IsEmpty() if (val.IsEmpty()
|| val == m_nullLabel) || val == m_nullLabel)
{ {
grid.GetTable()->SetValue(row, col, m_nullLabel); grid.GetTable()->SetValue(row, col, m_nullLabel);
wxGridCellStringRenderer::Draw(grid, attr, dc, rect, row, col, isSelected); wxGridCellStringRenderer::Draw(grid, attr, dc, rect, row, col, isSelected);
return; return;
} }
if (val == _T("0") if (val == _T("0")
|| val.Lower() == _("no")) || val.Lower() == _("no"))
{ {
grid.GetTable()->SetValue(row, col, _T("No")); grid.GetTable()->SetValue(row, col, _T("No"));
} }
@@ -61,8 +61,8 @@ void LGridCheckRenderer::Draw(wxGrid & grid,
else else
{ {
if (val == _T("0") if (val == _T("0")
|| val.IsEmpty() || val.IsEmpty()
|| val.Lower() == _("no")) || val.Lower() == _("no"))
{ {
grid.GetTable()->SetValue(row, col, _T("No")); grid.GetTable()->SetValue(row, col, _T("No"));
} }

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LGRIDCHECKRENDERER_H #ifndef LGRIDCHECKRENDERER_H
#define LGRIDCHECKRENDERER_H #define LGRIDCHECKRENDERER_H
#include "wx/grid.h" #include "wx/grid.h"
@@ -52,5 +52,5 @@ private:
bool m_triState; bool m_triState;
}; };
#endif /* LGRIDCHECKRENDERER_H */ #endif /* LGRIDCHECKRENDERER_H */

View File

@@ -12,7 +12,8 @@
#include "LBoundControl.h" #include "LBoundControl.h"
#ifndef LGRIDCOLEDITOR_H #ifndef LGRIDCOLEDITOR_H
#define LGRIDCOLEDITOR_H #define LGRIDCOLEDITOR_H
/** /**
* Abstract class defining methods data bound grid cell editors must implement. * Abstract class defining methods data bound grid cell editors must implement.
*/ */
@@ -24,8 +25,9 @@ public:
enum COL_TYPE enum COL_TYPE
{ {
TEXT, COMBO, DATE, CHECK, SPIN TEXT, COMBO, DATE, CHECK, SPIN, JSON_GRID, XML_GRID
}; };
/** /**
* *
* @return the database table column name. * @return the database table column name.
@@ -34,7 +36,7 @@ public:
{ {
return m_colName; return m_colName;
} }
int GetType() const int GetType() const
{ {
return m_type; return m_type;
@@ -74,5 +76,5 @@ private:
}; };
#endif /* LGRIDCOLEDITOR_H */ #endif /* LGRIDCOLEDITOR_H */

View File

@@ -59,7 +59,19 @@ wxGridCellEditor* LGridComboEditor::Clone() const
bool LGridComboEditor::EndEdit(int row, int col, const wxGrid* grid, const wxString& oldval, wxString* newval) bool LGridComboEditor::EndEdit(int row, int col, const wxGrid* grid, const wxString& oldval, wxString* newval)
{ {
// What do we do here ? /*
* Work around a nasty misbehavior.
* Grid columns edited by a translated combobox expect full string
* data as cell values. LResultSet::BEData() will report these mapped strings,
* instead of database real data. LBoundComboBox::IsDirty() will always be
* true even if m_BoundComboBox is unchanged once created.
* Simplest workaround : disconnect m_BoundComboBox if unchanged.
*/
if (m_BoundComboBox->GetStringSelection() == oldval && m_BoundComboBox->IsTranslated())
{
LResultSet * rs = ((LBoundGrid *) grid)->GetResultSet();
rs->UnRegisterControl(m_BoundComboBox);
}
return true; return true;
} }

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LGRIDCOMBOEDITOR_H #ifndef LGRIDCOMBOEDITOR_H
#define LGRIDCOMBOEDITOR_H #define LGRIDCOMBOEDITOR_H
#include "LGridColEditor.h" #include "LGridColEditor.h"
#include "LBoundComboBox.h" #include "LBoundComboBox.h"
@@ -85,5 +85,5 @@ private:
LBoundComboBox * m_BoundComboBox; LBoundComboBox * m_BoundComboBox;
}; };
#endif /* LGRIDCOMBOEDITOR_H */ #endif /* LGRIDCOMBOEDITOR_H */

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LGRIDCOMBORENDERER_H #ifndef LGRIDCOMBORENDERER_H
#define LGRIDCOMBORENDERER_H #define LGRIDCOMBORENDERER_H
#include "wx/grid.h" #include "wx/grid.h"
@@ -21,5 +21,5 @@ private:
}; };
#endif /* LGRIDCOMBORENDERER_H */ #endif /* LGRIDCOMBORENDERER_H */

View File

@@ -35,7 +35,8 @@ void LGridDateEditor::Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtH
void LGridDateEditor::BeginEdit(int row, int col, wxGrid* grid) void LGridDateEditor::BeginEdit(int row, int col, wxGrid* grid)
{ {
if (m_control == NULL) { if (m_control == NULL)
{
Create(grid->GetGridWindow(), wxID_ANY, NULL); Create(grid->GetGridWindow(), wxID_ANY, NULL);
} }
m_BoundDatePicker->SetResultSet(((LBoundGrid *) grid)->GetResultSet()); m_BoundDatePicker->SetResultSet(((LBoundGrid *) grid)->GetResultSet());

View File

@@ -8,14 +8,16 @@
*/ */
#ifndef LGRIDDATEEDITOR_H #ifndef LGRIDDATEEDITOR_H
#define LGRIDDATEEDITOR_H #define LGRIDDATEEDITOR_H
#include "LGridColEditor.h" #include "LGridColEditor.h"
#include "LBoundDatePickerCtrl.h" #include "LBoundDatePickerCtrl.h"
/** /**
* Edits table data using an LBoundDatePickerCtrl. * Edits table data using an LBoundDatePickerCtrl.
*/ */
class LGridDateEditor : public wxGridCellEditor, public LGridColEditor { class LGridDateEditor : public wxGridCellEditor, public LGridColEditor
{
public: public:
/** /**
* *
@@ -32,16 +34,16 @@ public:
* @param id * @param id
* @param evtHandler * @param evtHandler
*/ */
void Create (wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler); void Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler);
/** /**
* Creates m_control if necessary. Registers the editor in the grid's resultset. * Creates m_control if necessary. Registers the editor in the grid's resultset.
* @param row * @param row
* @param col * @param col
* @param grid * @param grid
*/ */
void BeginEdit (int row, int col, wxGrid *grid); void BeginEdit(int row, int col, wxGrid *grid);
wxGridCellEditor* Clone () const; wxGridCellEditor* Clone() const;
bool EndEdit (int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval); bool EndEdit(int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval);
/** /**
* Applies the editor value as returned by GetData() to the grid cell. * Applies the editor value as returned by GetData() to the grid cell.
* If the editor contains wxInvalidDateTime, the grid cell is set to an empty string. * If the editor contains wxInvalidDateTime, the grid cell is set to an empty string.
@@ -49,11 +51,11 @@ public:
* @param col * @param col
* @param grid * @param grid
*/ */
void ApplyEdit (int row, int col, wxGrid *grid); void ApplyEdit(int row, int col, wxGrid *grid);
/** /**
* Deletes the editor, all pointers to the editor are set to NULL. * Deletes the editor, all pointers to the editor are set to NULL.
*/ */
void Reset (); void Reset();
/** /**
* *
* @return GetData(), or wxEmptyString if the editor control has not been created. * @return GetData(), or wxEmptyString if the editor control has not been created.
@@ -63,7 +65,11 @@ public:
* Creates a wxDatePickerCtrl to be used as editor in form view. * Creates a wxDatePickerCtrl to be used as editor in form view.
*/ */
wxControl* ProvideFormEditor(wxWindow * parent); wxControl* ProvideFormEditor(wxWindow * parent);
wxControl* GetFormEditor() const {return m_formEditor;}
wxControl* GetFormEditor() const
{
return m_formEditor;
}
/** /**
* Updates the grid cell and the editor. m_formEditor is deleted and set to NULL. * Updates the grid cell and the editor. m_formEditor is deleted and set to NULL.
* @param row * @param row
@@ -71,7 +77,7 @@ public:
* @param grid * @param grid
*/ */
void SyncBack(const int row, const int col, wxGrid * grid); void SyncBack(const int row, const int col, wxGrid * grid);
private: private:
wxDatePickerCtrl * m_formEditor; wxDatePickerCtrl * m_formEditor;
/** /**
@@ -80,5 +86,5 @@ private:
LBoundDatePickerCtrl * m_BoundDatePicker; LBoundDatePickerCtrl * m_BoundDatePicker;
}; };
#endif /* LGRIDDATEEDITOR_H */ #endif /* LGRIDDATEEDITOR_H */

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LGRIDDATERENDERER_H #ifndef LGRIDDATERENDERER_H
#define LGRIDDATERENDERER_H #define LGRIDDATERENDERER_H
#include <wx/grid.h> #include <wx/grid.h>
@@ -21,5 +21,5 @@ private:
}; };
#endif /* LGRIDDATERENDERER_H */ #endif /* LGRIDDATERENDERER_H */

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LGRIDSPINEDITOR_H #ifndef LGRIDSPINEDITOR_H
#define LGRIDSPINEDITOR_H #define LGRIDSPINEDITOR_H
#include "LGridColEditor.h" #include "LGridColEditor.h"
#include "LBoundSpinCtrl.h" #include "LBoundSpinCtrl.h"
@@ -93,5 +93,5 @@ private:
int m_min, m_max, m_initial; int m_min, m_max, m_initial;
}; };
#endif /* LGRIDSPINEDITOR_H */ #endif /* LGRIDSPINEDITOR_H */

View File

@@ -8,11 +8,12 @@
*/ */
#ifndef LGRIDSPINRENDERER_H #ifndef LGRIDSPINRENDERER_H
#define LGRIDSPINRENDERER_H #define LGRIDSPINRENDERER_H
#include <wx/grid.h> #include <wx/grid.h>
class LGridSpinRenderer : public wxGridCellNumberRenderer { class LGridSpinRenderer : public wxGridCellNumberRenderer
{
public: public:
LGridSpinRenderer(); LGridSpinRenderer();
virtual ~LGridSpinRenderer(); virtual ~LGridSpinRenderer();
@@ -20,5 +21,5 @@ private:
}; };
#endif /* LGRIDSPINRENDERER_H */ #endif /* LGRIDSPINRENDERER_H */

View File

@@ -11,7 +11,7 @@
#include "LBoundGrid.h" #include "LBoundGrid.h"
LGridTextEditor::LGridTextEditor(const wxString& newColName, bool newMultiline) LGridTextEditor::LGridTextEditor(const wxString& newColName, bool newMultiline)
: wxGridCellAutoWrapStringEditor() : wxGridCellAutoWrapStringEditor()
{ {
m_multiline = newMultiline; m_multiline = newMultiline;
m_style = 0; m_style = 0;
@@ -28,15 +28,19 @@ LGridTextEditor::~LGridTextEditor()
wxDELETE(m_control); wxDELETE(m_control);
} }
void LGridTextEditor::Create (wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler) { void LGridTextEditor::Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler)
m_control = new LBoundTextCtrl( parent, id, m_style); {
m_control = new LBoundTextCtrl(parent, id, m_style);
m_BoundTextCtrl = (static_cast<LBoundTextCtrl*> (m_control)); m_BoundTextCtrl = (static_cast<LBoundTextCtrl*> (m_control));
m_BoundTextCtrl->SetColumnName(m_colName); m_BoundTextCtrl->SetColumnName(m_colName);
m_BoundControl = m_BoundTextCtrl; m_BoundControl = m_BoundTextCtrl;
m_control->Show(false); m_control->Show(false);
} }
void LGridTextEditor::BeginEdit (int row, int col, wxGrid *grid) {
if (m_control == NULL) { void LGridTextEditor::BeginEdit(int row, int col, wxGrid *grid)
{
if (m_control == NULL)
{
Create(grid->GetGridWindow(), wxID_ANY, NULL); Create(grid->GetGridWindow(), wxID_ANY, NULL);
} }
m_BoundTextCtrl->SetResultSet(((LBoundGrid *) grid)->GetResultSet()); m_BoundTextCtrl->SetResultSet(((LBoundGrid *) grid)->GetResultSet());
@@ -44,32 +48,46 @@ void LGridTextEditor::BeginEdit (int row, int col, wxGrid *grid) {
m_BoundTextCtrl->SetData(sText); m_BoundTextCtrl->SetData(sText);
m_control->Show(true); m_control->Show(true);
} }
wxGridCellEditor* LGridTextEditor::Clone () const {
wxGridCellEditor* LGridTextEditor::Clone() const
{
return new LGridTextEditor(m_colName, m_multiline); return new LGridTextEditor(m_colName, m_multiline);
} }
bool LGridTextEditor::EndEdit (int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval) {
bool LGridTextEditor::EndEdit(int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval)
{
// What do we do here ? // What do we do here ?
return true; return true;
} }
void LGridTextEditor::ApplyEdit (int row, int col, wxGrid *grid) {
void LGridTextEditor::ApplyEdit(int row, int col, wxGrid *grid)
{
grid->GetTable()->SetValue(row, col, m_BoundTextCtrl->GetValue()); grid->GetTable()->SetValue(row, col, m_BoundTextCtrl->GetValue());
} }
void LGridTextEditor::Reset () {
void LGridTextEditor::Reset()
{
wxDELETE(m_control); wxDELETE(m_control);
m_BoundControl = NULL; m_BoundControl = NULL;
m_BoundTextCtrl = NULL; m_BoundTextCtrl = NULL;
} }
wxString LGridTextEditor::GetValue() const {
wxString LGridTextEditor::GetValue() const
{
return m_control == NULL ? wxString(wxEmptyString) : m_BoundControl->GetData().As<wxString>(); return m_control == NULL ? wxString(wxEmptyString) : m_BoundControl->GetData().As<wxString>();
} }
wxControl* LGridTextEditor::ProvideFormEditor(wxWindow * parent) {
wxControl* LGridTextEditor::ProvideFormEditor(wxWindow * parent)
{
if (!m_formEditor) m_formEditor = new wxTextCtrl(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_style); if (!m_formEditor) m_formEditor = new wxTextCtrl(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_style);
m_formEditor->SetValue(GetValue()); m_formEditor->SetValue(m_BoundTextCtrl->GetValue());
m_formEditor->SetName(m_BoundTextCtrl->GetName()); m_formEditor->SetName(m_BoundTextCtrl->GetName());
if (m_BoundTextCtrl->GetValidator()) m_formEditor->SetValidator(*(m_BoundTextCtrl->GetValidator())); if (m_BoundTextCtrl->GetValidator()) m_formEditor->SetValidator(*(m_BoundTextCtrl->GetValidator()));
return m_formEditor; return m_formEditor;
} }
void LGridTextEditor::SyncBack(const int row, const int col, wxGrid * grid) {
void LGridTextEditor::SyncBack(const int row, const int col, wxGrid * grid)
{
if (!m_formEditor) return; if (!m_formEditor) return;
m_BoundTextCtrl->SetValue(m_formEditor->GetValue()); m_BoundTextCtrl->SetValue(m_formEditor->GetValue());
ApplyEdit(row, col, grid); ApplyEdit(row, col, grid);

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LGRIDTEXTEDITOR_H #ifndef LGRIDTEXTEDITOR_H
#define LGRIDTEXTEDITOR_H #define LGRIDTEXTEDITOR_H
#include "LGridColEditor.h" #include "LGridColEditor.h"
#include "LBoundTextCtrl.h" #include "LBoundTextCtrl.h"
@@ -88,5 +88,5 @@ private:
LBoundTextCtrl * m_BoundTextCtrl; LBoundTextCtrl * m_BoundTextCtrl;
}; };
#endif /* LGRIDTEXTEDITOR_H */ #endif /* LGRIDTEXTEDITOR_H */

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LGRIDTEXTRENDERER_H #ifndef LGRIDTEXTRENDERER_H
#define LGRIDTEXTRENDERER_H #define LGRIDTEXTRENDERER_H
#include "wx/grid.h" #include "wx/grid.h"
@@ -21,5 +21,5 @@ private:
}; };
#endif /* LGRIDTEXTRENDERER_H */ #endif /* LGRIDTEXTRENDERER_H */

View File

@@ -9,7 +9,7 @@
#include "LInformation.h" #include "LInformation.h"
LInformation::LInformation(const wxString& newCode, LInformation::LInformation(const wxString& newCode,
const wxString& newMsg) const wxString& newMsg)
{ {
m_code = newCode; m_code = newCode;

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LINFORMATION_H #ifndef LINFORMATION_H
#define LINFORMATION_H #define LINFORMATION_H
#include <wx/wx.h> #include <wx/wx.h>
@@ -33,6 +33,7 @@ public:
{ {
return m_msg; return m_msg;
} }
/** /**
* *
* @return Both the code and the message concatenated. * @return Both the code and the message concatenated.
@@ -46,5 +47,5 @@ private:
wxString m_msg; wxString m_msg;
}; };
#endif /* LINFORMATION_H */ #endif /* LINFORMATION_H */

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LITEMDATA_H #ifndef LITEMDATA_H
#define LITEMDATA_H #define LITEMDATA_H
#include <wx/wx.h> #include <wx/wx.h>
@@ -39,5 +39,5 @@ private:
wxAny m_data; wxAny m_data;
}; };
#endif /* LITEMDATA_H */ #endif /* LITEMDATA_H */

View File

@@ -9,7 +9,7 @@
#ifdef USE_LIBPQ #ifdef USE_LIBPQ
#ifndef LLIGHTPQRESULTSET_H #ifndef LLIGHTPQRESULTSET_H
#define LLIGHTPQRESULTSET_H #define LLIGHTPQRESULTSET_H
#include <wx/wx.h> #include <wx/wx.h>
#include <libpq-fe.h> #include <libpq-fe.h>
@@ -21,49 +21,50 @@
*/ */
namespace PQ namespace PQ
{ {
/**
* Scrollable minimal resultset for the PostgreSQL backend.
*
* This class does not allow data modification and does not output any messages.
* The underlying SQL query may contain table and/or column aliases.
*/
class LLightPQResultSet : public LLightResultSet
{
public:
LLightPQResultSet();
LLightPQResultSet(LConnection * newConnection);
virtual ~LLightPQResultSet();
/** /**
* Scrollable minimal resultset for the PostgreSQL backend. * Updates and runs the SQL string.
* * @param newSql
* This class does not allow data modification and does not output any messages. * @return
* The underlying SQL query may contain table and/or column aliases.
*/ */
class LLightPQResultSet : public LLightResultSet bool SetSQL(const wxString& newSql);
{ bool HasData() const;
public: bool Absolute(const unsigned int newRowIndex);
LLightPQResultSet(); bool IsFirst() const;
LLightPQResultSet(LConnection * newConnection); bool IsLast() const;
virtual ~LLightPQResultSet(); bool First();
/** bool Next();
* Updates and runs the SQL string. bool Previous();
* @param newSql bool Last();
* @return const unsigned int GetRowCount() const;
*/ const unsigned int GetColumnCount() const;
bool SetSQL(const wxString& newSql); const wxString GetColumnName(const unsigned int colIndex) const;
bool HasData() const; const int GetColumnIndex(const wxString& colName) const;
bool Absolute(const unsigned int newRowIndex); const wxAny GetData(const int unsigned rowIdx, const unsigned int colIdx) const;
bool IsFirst() const; /**
bool IsLast() const; * At current row.
bool First(); * @param colName
bool Next(); * @return database table value or wxEmptyString.
bool Previous(); */
bool Last(); const wxAny GetData(const wxString& colName) const;
const unsigned int GetRowCount() const;
const unsigned int GetColumnCount() const;
const wxString GetColumnName(const unsigned int colIndex) const;
const int GetColumnIndex(const wxString& colName) const;
const wxAny GetData(const int unsigned rowIdx, const unsigned int colIdx) const;
/**
* At current row.
* @param colName
* @return database table value or wxEmptyString.
*/
const wxAny GetData(const wxString& colName) const;
private: private:
bool RunSQL(); bool RunSQL();
}; };
} }
#endif /* LLIGHTPQRESULTSET_H */ #endif /* LLIGHTPQRESULTSET_H */
#endif #endif

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LLIGHTRESULTSET_H #ifndef LLIGHTRESULTSET_H
#define LLIGHTRESULTSET_H #define LLIGHTRESULTSET_H
/* Added to be able to use derived classes independantly /* Added to be able to use derived classes independantly
* If xConnection and xResultSet classes are included in some project, * If xConnection and xResultSet classes are included in some project,
@@ -27,7 +27,8 @@
* *
* Does not modify data. * Does not modify data.
*/ */
class LLightResultSet : public wxTrackable { class LLightResultSet : public wxTrackable
{
public: public:
LLightResultSet(); LLightResultSet();
LLightResultSet(LConnection * newConnection); LLightResultSet(LConnection * newConnection);
@@ -39,19 +40,23 @@ public:
* Updates the SQL statement without running it. * Updates the SQL statement without running it.
* @param newSql * @param newSql
*/ */
void UpdateSQL(const wxString& newSql) { void UpdateSQL(const wxString& newSql)
{
m_curSql = newSql; m_curSql = newSql;
} }
const wxString& GetSQL() const { const wxString& GetSQL() const
{
return m_curSql; return m_curSql;
} }
void SetConnection(LConnection * newConnection) { void SetConnection(LConnection * newConnection)
{
m_conn = newConnection; m_conn = newConnection;
} }
const LConnection * GetConnection() const { const LConnection * GetConnection() const
{
return m_conn; return m_conn;
} }
virtual bool HasData() const = 0; virtual bool HasData() const = 0;
@@ -68,7 +73,8 @@ public:
* *
* Returns -1 if there's no data. * Returns -1 if there's no data.
*/ */
const int GetRow() const { const int GetRow() const
{
return m_cursor; return m_cursor;
} }
virtual const unsigned int GetRowCount() const = 0; virtual const unsigned int GetRowCount() const = 0;
@@ -89,5 +95,5 @@ private:
}; };
#endif /* LLIGHTRESULTSET_H */ #endif /* LLIGHTRESULTSET_H */

View File

@@ -25,7 +25,8 @@ LLightSQResultSet::~LLightSQResultSet()
{ {
SQresult * srs = static_cast<SQresult*> (m_rs); SQresult * srs = static_cast<SQresult*> (m_rs);
sqlite3_free_table(srs->m_data); sqlite3_free_table(srs->m_data);
delete srs; m_rs = NULL; delete srs;
m_rs = NULL;
} }
} }
@@ -44,12 +45,14 @@ bool LLightSQResultSet::RunSQL()
{ {
SQresult * srs = static_cast<SQresult*> (m_rs); SQresult * srs = static_cast<SQresult*> (m_rs);
sqlite3_free_table(srs->m_data); sqlite3_free_table(srs->m_data);
wxDELETE(srs);; wxDELETE(srs);
;
m_rs = NULL; m_rs = NULL;
} }
m_rs = m_conn->ExecuteSQL(m_curSql); m_rs = m_conn->ExecuteSQL(m_curSql);
SQresult * srs = static_cast<SQresult*> (m_rs); SQresult * srs = static_cast<SQresult*> (m_rs);
if (!RetrieveColNames(srs)) { // No columns returned if no data ! if (!RetrieveColNames(srs))
{ // No columns returned if no data !
m_rs = NULL; m_rs = NULL;
return false; return false;
} }
@@ -199,12 +202,14 @@ bool LLightSQResultSet::RetrieveColNames(SQresult * emptyResult)
emptyResult->m_nbCols = m_colNames.GetCount(); emptyResult->m_nbCols = m_colNames.GetCount();
sqlite3_finalize(ppStmt); sqlite3_finalize(ppStmt);
return true; return true;
} else { }
else
{
int errCode = sqlite3_errcode(db); int errCode = sqlite3_errcode(db);
const char * errMsg = sqlite3_errmsg(db); const char * errMsg = sqlite3_errmsg(db);
const char * errStr = sqlite3_errstr(errCode); const char * errStr = sqlite3_errstr(errCode);
const wxString msg(wxAny(errCode).As<wxString>() + _T(" ") + const wxString msg(wxAny(errCode).As<wxString>() + _T(" ") +
wxString(errMsg) + _T("\n") + wxString(errStr)); wxString(errMsg) + _T("\n") + wxString(errStr));
wxPrintf("%s\n", msg); wxPrintf("%s\n", msg);
wxFAIL_MSG(msg); wxFAIL_MSG(msg);
} }

View File

@@ -9,7 +9,7 @@
#ifdef USE_LIBSQ #ifdef USE_LIBSQ
#ifndef LLIGHTSQRESULTSET_H #ifndef LLIGHTSQRESULTSET_H
#define LLIGHTSQRESULTSET_H #define LLIGHTSQRESULTSET_H
#include <wx/wx.h> #include <wx/wx.h>
#include <sqlite3.h> #include <sqlite3.h>
@@ -22,50 +22,51 @@
*/ */
namespace SQ namespace SQ
{ {
/**
* Scrollable minimal resultset for the SQLite backend.
*
* This object does not allow data modification and does not output any messages.
* The underlying SQL query may contain table and/or column aliases
*/
class LLightSQResultSet : public LLightResultSet
{
public:
LLightSQResultSet();
LLightSQResultSet(LConnection * newConnection);
virtual ~LLightSQResultSet();
/**
* Updates and runs the SQL string.
* @param newSql
* @return
*/
bool SetSQL(const wxString& newSql);
bool HasData() const;
bool Absolute(const unsigned int newRowIndex);
bool IsFirst() const;
bool IsLast() const;
bool First();
bool Next();
bool Previous();
bool Last();
const unsigned int GetRowCount() const;
const unsigned int GetColumnCount() const;
const wxString GetColumnName(const unsigned int colIndex) const;
const int GetColumnIndex(const wxString& colName) const;
const wxAny GetData(const int unsigned rowIdx, const unsigned int colIdx) const;
/**
* At current row.
* @param colName
* @return database table value or wxEmptyString.
*/
const wxAny GetData(const wxString& colName) const;
private: /**
bool RunSQL(); * Scrollable minimal resultset for the SQLite backend.
wxArrayString m_colNames; *
bool RetrieveColNames(SQresult * emptyResult); * This object does not allow data modification and does not output any messages.
}; * The underlying SQL query may contain table and/or column aliases
*/
class LLightSQResultSet : public LLightResultSet
{
public:
LLightSQResultSet();
LLightSQResultSet(LConnection * newConnection);
virtual ~LLightSQResultSet();
/**
* Updates and runs the SQL string.
* @param newSql
* @return
*/
bool SetSQL(const wxString& newSql);
bool HasData() const;
bool Absolute(const unsigned int newRowIndex);
bool IsFirst() const;
bool IsLast() const;
bool First();
bool Next();
bool Previous();
bool Last();
const unsigned int GetRowCount() const;
const unsigned int GetColumnCount() const;
const wxString GetColumnName(const unsigned int colIndex) const;
const int GetColumnIndex(const wxString& colName) const;
const wxAny GetData(const int unsigned rowIdx, const unsigned int colIdx) const;
/**
* At current row.
* @param colName
* @return database table value or wxEmptyString.
*/
const wxAny GetData(const wxString& colName) const;
private:
bool RunSQL();
wxArrayString m_colNames;
bool RetrieveColNames(SQresult * emptyResult);
};
} }
#endif /* LLIGHTSQRESULTSET_H */ #endif /* LLIGHTSQRESULTSET_H */
#endif #endif

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LNAVIGATOR_H #ifndef LNAVIGATOR_H
#define LNAVIGATOR_H #define LNAVIGATOR_H
#include <wx/wx.h> #include <wx/wx.h>
#include "LResultSet.h" #include "LResultSet.h"
@@ -74,6 +74,7 @@ private:
}; };
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
/** /**
* A private resultset event handler for LNavigator. All functions are declared private. * A private resultset event handler for LNavigator. All functions are declared private.
* Don't use it. * Don't use it.
@@ -91,5 +92,5 @@ private:
void UpdateLocation(const LResultSet* caller); void UpdateLocation(const LResultSet* caller);
}; };
#endif /* LNAVIGATOR_H */ #endif /* LNAVIGATOR_H */

View File

@@ -9,7 +9,7 @@
#ifdef USE_LIBPQ #ifdef USE_LIBPQ
#ifndef LPQCONNECTION_H #ifndef LPQCONNECTION_H
#define LPQCONNECTION_H #define LPQCONNECTION_H
#include <wx/wx.h> #include <wx/wx.h>
#include <libpq-fe.h> #include <libpq-fe.h>
@@ -130,5 +130,5 @@ private:
}; };
} }
#endif /* LPQCONNECTION_H */ #endif /* LPQCONNECTION_H */
#endif #endif

View File

@@ -15,7 +15,6 @@ using namespace PQ;
LPQResultSet::LPQResultSet() : LResultSet() LPQResultSet::LPQResultSet() : LResultSet()
{ {
} }
LPQResultSet::LPQResultSet(LConnection* newConnection) : LResultSet(newConnection) LPQResultSet::LPQResultSet(LConnection* newConnection) : LResultSet(newConnection)
@@ -197,9 +196,9 @@ const wxAny LPQResultSet::GetData(const wxString& columnName) const
{ {
PGresult * prs = static_cast<PGresult*> (m_rs); PGresult * prs = static_cast<PGresult*> (m_rs);
if (m_cursor < 0 if (m_cursor < 0
|| IsInserting() || IsInserting()
|| !HasData() || !HasData()
|| m_cursor > PQntuples(prs) - 1) || m_cursor > PQntuples(prs) - 1)
return wxEmptyString; return wxEmptyString;
const char* colName = columnName.c_str(); const char* colName = columnName.c_str();
int colIdx = PQfnumber(prs, colName); int colIdx = PQfnumber(prs, colName);

View File

@@ -9,7 +9,7 @@
#ifdef USE_LIBPQ #ifdef USE_LIBPQ
#ifndef LPQRESULTSET_H #ifndef LPQRESULTSET_H
#define LPQRESULTSET_H #define LPQRESULTSET_H
#include "LResultSet.h" #include "LResultSet.h"
#include <libpq-fe.h> #include <libpq-fe.h>
@@ -33,86 +33,86 @@ namespace PQ
#define RS004C wxString(_T("RS004")) #define RS004C wxString(_T("RS004"))
#define RS004M wxString(_("Invalid column name :\n")) #define RS004M wxString(_("Invalid column name :\n"))
/**
* Scrollable resultset for the PostgreSQL backend.
*
* This class allows data modification through GUI elements.
* The underlying SQL query must not contain table aliases.
*
* A column alias must still be a real column name of the table specified in SetTableName.
*
* Ex : SELECT tbl1.pk1, tbl1.text1, list2.text2 AS num1 FROM tbl1 LEFT JOIN list2 ON tbl1.num1 = list2.pk2
*/
class LPQResultSet : public LResultSet
{
public:
LPQResultSet();
LPQResultSet(LConnection * newConnection);
virtual ~LPQResultSet();
/** /**
* Scrollable resultset for the PostgreSQL backend. * Updates and runs the SQL string.
* * @param newSql
* This class allows data modification through GUI elements. * @return
* The underlying SQL query must not contain table aliases.
*
* A column alias must still be a real column name of the table specified in SetTableName.
*
* Ex : SELECT tbl1.pk1, tbl1.text1, list2.text2 AS num1 FROM tbl1 LEFT JOIN list2 ON tbl1.num1 = list2.pk2
*/ */
class LPQResultSet : public LResultSet bool SetSQL(const wxString& newSql);
bool HasData() const;
bool Absolute(const unsigned int newRowIndex);
bool IsFirst() const;
bool IsLast() const;
bool First();
bool Next();
bool Previous();
bool Last();
const unsigned int GetRowCount() const;
const unsigned int GetColumnCount() const;
const wxString GetColumnName(const unsigned int colIndex) const;
const int GetColumnIndex(const wxString& colName) const;
const wxAny GetData(const unsigned int rowIdx, const unsigned int colIdx) const;
/**
* At current row.
* @param colName
* @return database table value or wxEmptyString.
*/
const wxAny GetData(const wxString& colName) const;
/**
* Updates registered controls on screen.
*/
void Display();
bool Save();
inline void InformInserting() const
{ {
public: InformLibMessage(LInformation(RS001C, RS001M));
LPQResultSet(); }
LPQResultSet(LConnection * newConnection);
virtual ~LPQResultSet();
/** inline void InformDirty() const
* Updates and runs the SQL string. {
* @param newSql InformLibMessage(LInformation(RS003C, RS003M));
* @return
*/
bool SetSQL(const wxString& newSql);
bool HasData() const;
bool Absolute(const unsigned int newRowIndex);
bool IsFirst() const;
bool IsLast() const;
bool First();
bool Next();
bool Previous();
bool Last();
const unsigned int GetRowCount() const;
const unsigned int GetColumnCount() const;
const wxString GetColumnName(const unsigned int colIndex) const;
const int GetColumnIndex(const wxString& colName) const;
const wxAny GetData(const unsigned int rowIdx, const unsigned int colIdx) const;
/**
* At current row.
* @param colName
* @return database table value or wxEmptyString.
*/
const wxAny GetData(const wxString& colName) const;
/**
* Updates registered controls on screen.
*/
void Display();
bool Save();
inline void InformInserting() const
{
InformLibMessage(LInformation(RS001C, RS001M));
}
inline void InformDirty() const
{
InformLibMessage(LInformation(RS003C, RS003M));
};
/**
* Replaces a single quote ' by two single quotes '' .
* @param literal
* @return the number of single quotes replaced
*/
static int EscapeChar(wxString& literal)
{
return literal.Replace(_T("'"), _T("''"));
}
private:
bool RunSQL();
const wxString MakeUpdateSQL() const;
const wxString MakeDeleteSQL() const;
/**
* Locates a row by the primary key value and returns its index.
* @param pkValue
* @return row index or -1 if not found.
*/
const int GetRowByPKValue(const wxAny& pkValue) const;
}; };
/**
* Replaces a single quote ' by two single quotes '' .
* @param literal
* @return the number of single quotes replaced
*/
static int EscapeChar(wxString& literal)
{
return literal.Replace(_T("'"), _T("''"));
}
private:
bool RunSQL();
const wxString MakeUpdateSQL() const;
const wxString MakeDeleteSQL() const;
/**
* Locates a row by the primary key value and returns its index.
* @param pkValue
* @return row index or -1 if not found.
*/
const int GetRowByPKValue(const wxAny& pkValue) const;
};
} }
#endif /* LPQRESULTSET_H */ #endif /* LPQRESULTSET_H */
#endif #endif

View File

@@ -8,7 +8,7 @@
*/ */
#ifndef LRESULTSET_H #ifndef LRESULTSET_H
#define LRESULTSET_H #define LRESULTSET_H
#include "LInformation.h" #include "LInformation.h"
#include "LBoundControl.h" #include "LBoundControl.h"
@@ -271,5 +271,5 @@ private:
}; };
#endif /* LRESULTSET_H */ #endif /* LRESULTSET_H */

View File

@@ -9,7 +9,7 @@
#ifdef USE_LIBSQ #ifdef USE_LIBSQ
#ifndef LSQCONNECTION_H #ifndef LSQCONNECTION_H
#define LSQCONNECTION_H #define LSQCONNECTION_H
#include <sqlite3.h> #include <sqlite3.h>
#include <vector> #include <vector>
@@ -73,7 +73,7 @@ public:
* @param newSql a valid SQL statement. * @param newSql a valid SQL statement.
* @return an untyped pointer to an SQresult referencing the data, or NULL if error. * @return an untyped pointer to an SQresult referencing the data, or NULL if error.
*/ */
void * ExecuteSQL (const wxString& newSql); void * ExecuteSQL(const wxString& newSql);
/** /**
* Intended for database actions that do not fetch table rows. Calls sqlite3_exec. * Intended for database actions that do not fetch table rows. Calls sqlite3_exec.
* @param newSql : : a valid SQL statement. * @param newSql : : a valid SQL statement.
@@ -104,5 +104,5 @@ private:
}; };
} }
#endif /* LSQCONNECTION_H */ #endif /* LSQCONNECTION_H */
#endif #endif

View File

@@ -208,9 +208,9 @@ const wxAny LSQResultSet::GetData(const wxString &columnName) const
{ {
SQresult * srs = static_cast<SQresult*> (m_rs); SQresult * srs = static_cast<SQresult*> (m_rs);
if (m_cursor < 0 if (m_cursor < 0
|| IsInserting() || IsInserting()
|| !HasData() || !HasData()
|| m_cursor > srs->m_nbRows - 1) || m_cursor > srs->m_nbRows - 1)
return wxEmptyString; return wxEmptyString;
for (unsigned int c = 0; c < srs->m_nbCols; c++) for (unsigned int c = 0; c < srs->m_nbCols; c++)
{ {

View File

@@ -8,7 +8,7 @@
*/ */
#ifdef USE_LIBSQ #ifdef USE_LIBSQ
#ifndef LSQRESULTSET_H #ifndef LSQRESULTSET_H
#define LSQRESULTSET_H #define LSQRESULTSET_H
#include "LResultSet.h" #include "LResultSet.h"
#include <sqlite3.h> #include <sqlite3.h>
@@ -32,88 +32,88 @@ namespace SQ
#define RSSQ004C wxString(_T("RS004")) #define RSSQ004C wxString(_T("RS004"))
#define RSSQ004M wxString(_("Invalid column name :\n")) #define RSSQ004M wxString(_("Invalid column name :\n"))
/**
* Scrollable resultset for the SQLite backend.
*
* This class allows data modification through GUI elements.
* The underlying SQL query must not contain table aliases.
*
* A column alias must still be a real column name of the table specified in SetTableName.
*
* Ex : SELECT tbl1.pk1, tbl1.text1, list2.text2 AS num1 FROM tbl1 LEFT JOIN list2 ON tbl1.num1 = list2.pk2
*/
class LSQResultSet : public LResultSet
{
public:
LSQResultSet();
LSQResultSet(LConnection * newConnection);
virtual ~LSQResultSet();
/** /**
* Scrollable resultset for the SQLite backend. * Updates and runs the SQL string.
* * @param newSql
* This class allows data modification through GUI elements. * @return
* The underlying SQL query must not contain table aliases.
*
* A column alias must still be a real column name of the table specified in SetTableName.
*
* Ex : SELECT tbl1.pk1, tbl1.text1, list2.text2 AS num1 FROM tbl1 LEFT JOIN list2 ON tbl1.num1 = list2.pk2
*/ */
class LSQResultSet : public LResultSet bool SetSQL(const wxString& newSql);
bool HasData() const;
bool Absolute(const unsigned int newRowIndex);
bool IsFirst() const;
bool IsLast() const;
bool First();
bool Next();
bool Previous();
bool Last();
const unsigned int GetRowCount() const;
const unsigned int GetColumnCount() const;
const wxString GetColumnName(const unsigned int colIndex) const;
const int GetColumnIndex(const wxString& colName) const;
const wxAny GetData(const unsigned int rowIdx, const unsigned int colIdx) const;
/**
* At current row.
* @param colName
* @return database table value or wxEmptyString.
*/
const wxAny GetData(const wxString& colName) const;
/**
* Updates registered controls on screen.
*/
void Display();
bool Save();
inline void InformInserting() const
{ {
public: InformLibMessage(LInformation(RSSQ001C, RSSQ001M));
LSQResultSet(); }
LSQResultSet(LConnection * newConnection);
virtual ~LSQResultSet();
/**
* Updates and runs the SQL string.
* @param newSql
* @return
*/
bool SetSQL(const wxString& newSql);
bool HasData() const;
bool Absolute(const unsigned int newRowIndex);
bool IsFirst() const;
bool IsLast() const;
bool First();
bool Next();
bool Previous();
bool Last();
const unsigned int GetRowCount() const;
const unsigned int GetColumnCount() const;
const wxString GetColumnName(const unsigned int colIndex) const;
const int GetColumnIndex(const wxString& colName) const;
const wxAny GetData(const unsigned int rowIdx, const unsigned int colIdx) const;
/**
* At current row.
* @param colName
* @return database table value or wxEmptyString.
*/
const wxAny GetData(const wxString& colName) const;
/**
* Updates registered controls on screen.
*/
void Display();
bool Save();
inline void InformInserting() const inline void InformDirty() const
{ {
InformLibMessage(LInformation(RSSQ001C, RSSQ001M)); InformLibMessage(LInformation(RSSQ003C, RSSQ003M));
}
inline void InformDirty() const
{
InformLibMessage(LInformation(RSSQ003C, RSSQ003M));
};
/**
* Replaces a single quote ' by two single quotes '' .
* @param literal
* @return the number of single quotes replaced
*/
static int EscapeChar(wxString& literal)
{
return literal.Replace(_T("'"), _T("''"));
}
private:
bool RunSQL();
const wxString MakeUpdateSQL() const;
const wxString MakeDeleteSQL() const;
/**
* Locates a row by the primary key value and returns its index.
* @param pkValue
* @return row index or -1 if not found.
*/
const int GetRowByPKValue(const wxAny& pkValue) const;
wxArrayString m_colNames;
bool RetrieveColNames(SQresult * emptyResult);
}; };
/**
* Replaces a single quote ' by two single quotes '' .
* @param literal
* @return the number of single quotes replaced
*/
static int EscapeChar(wxString& literal)
{
return literal.Replace(_T("'"), _T("''"));
}
private:
bool RunSQL();
const wxString MakeUpdateSQL() const;
const wxString MakeDeleteSQL() const;
/**
* Locates a row by the primary key value and returns its index.
* @param pkValue
* @return row index or -1 if not found.
*/
const int GetRowByPKValue(const wxAny& pkValue) const;
wxArrayString m_colNames;
bool RetrieveColNames(SQresult * emptyResult);
};
} }
#endif /* LSQRESULTSET_H */ #endif /* LSQRESULTSET_H */
#endif #endif

View File

@@ -9,7 +9,7 @@
#ifdef USE_LIBSQ #ifdef USE_LIBSQ
#ifndef LSQRESULT_H #ifndef LSQRESULT_H
#define LSQRESULT_H #define LSQRESULT_H
/** /**
* SQLite namespace. * SQLite namespace.
* *
@@ -18,32 +18,32 @@
namespace SQ namespace SQ
{ {
class SQresult class SQresult
{ {
/** /**
* This class is used to reference the data obtained by LSQConnection::ExecuteSQL. * This class is used to reference the data obtained by LSQConnection::ExecuteSQL.
* *
* If no rows are returned, m_data is NULL and does not even provide the column names. * If no rows are returned, m_data is NULL and does not even provide the column names.
*/ */
public: public:
SQresult(); SQresult();
virtual ~SQresult(); virtual ~SQresult();
/** /**
* Pointer to the array of column names and data. * Pointer to the array of column names and data.
*/ */
char ** m_data; char ** m_data;
/** /**
* Number of rows. * Number of rows.
*/ */
int m_nbRows; int m_nbRows;
/** /**
* Number of columns * Number of columns
*/ */
int m_nbCols; int m_nbCols;
private: private:
}; };
} }
#endif /* LSQRESULT_H */ #endif /* LSQRESULT_H */
#endif #endif

View File

@@ -8,9 +8,9 @@
*/ */
#ifndef LVERSION_H #ifndef LVERSION_H
#define LVERSION_H #define LVERSION_H
#define L7_VERSION_STR "4" #define L7_VERSION_STR "5"
#endif /* LVERSION_H */ #endif /* LVERSION_H */

View File

@@ -1,6 +1,11 @@
2019-12-23
Added pickers to manage simple tabular data in a grid shown in a popup.
The grid's content is stored as JSON or XML data.
2018-04-25 2018-04-25
1. Controls in 'Form View' inherit the grid cell's editor validator. 1. Controls in 'Form View' inherit the grid cell's editor validator.
2. Corrected a bug in LGridSpinEditor::ProvideFormEditor, where the form editor was created without the style parameter. 2. Corrected a bug in LGridSpinEditor::ProvideFormEditor, where the form editor
was created without the style parameter.
3. Rename the project to L7. 3. Rename the project to L7.
4. Change versioning pattern to running integers. 4. Change versioning pattern to running integers.
5. Moved to github.com. 5. Moved to github.com.

View File

@@ -65,7 +65,19 @@ OBJECTFILES= \
${OBJECTDIR}/LResultSet.o \ ${OBJECTDIR}/LResultSet.o \
${OBJECTDIR}/LSQConnection.o \ ${OBJECTDIR}/LSQConnection.o \
${OBJECTDIR}/LSQResultSet.o \ ${OBJECTDIR}/LSQResultSet.o \
${OBJECTDIR}/LSQresult.o ${OBJECTDIR}/LSQresult.o \
${OBJECTDIR}/special/BaseGridPicker.o \
${OBJECTDIR}/special/BasePicker.o \
${OBJECTDIR}/special/JsonGridPickerCtrl.o \
${OBJECTDIR}/special/JsonHelper.o \
${OBJECTDIR}/special/LBoundJsonGridPicker.o \
${OBJECTDIR}/special/LBoundXmlGridPicker.o \
${OBJECTDIR}/special/LGridJsonCellEditor.o \
${OBJECTDIR}/special/LGridJsonCellRenderer.o \
${OBJECTDIR}/special/LGridXmlCellEditor.o \
${OBJECTDIR}/special/LGridXmlCellRenderer.o \
${OBJECTDIR}/special/XmlGridPickerCtrl.o \
${OBJECTDIR}/special/XmlHelper.o
# C Compiler Flags # C Compiler Flags
@@ -82,7 +94,7 @@ FFLAGS=
ASFLAGS= ASFLAGS=
# Link Libraries and Options # Link Libraries and Options
LDLIBSOPTIONS=-L/usr/local/wxWidgets/lib -lwx_baseu-3.1 -lwx_gtk2u_core-3.1 LDLIBSOPTIONS=-L/usr/local/wxWidgets/lib -lwx_baseu-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwxcode_gtk2ud_wxjson-3.1
# Build Targets # Build Targets
.build-conf: ${BUILD_SUBPROJECTS} .build-conf: ${BUILD_SUBPROJECTS}
@@ -95,157 +107,217 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libL7.${CND_DLIB_EXT}: ${OBJECTFILES}
${OBJECTDIR}/LBoundCheckBox.o: LBoundCheckBox.cpp ${OBJECTDIR}/LBoundCheckBox.o: LBoundCheckBox.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundCheckBox.o LBoundCheckBox.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundCheckBox.o LBoundCheckBox.cpp
${OBJECTDIR}/LBoundComboBox.o: LBoundComboBox.cpp ${OBJECTDIR}/LBoundComboBox.o: LBoundComboBox.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundComboBox.o LBoundComboBox.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundComboBox.o LBoundComboBox.cpp
${OBJECTDIR}/LBoundControl.o: LBoundControl.cpp ${OBJECTDIR}/LBoundControl.o: LBoundControl.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundControl.o LBoundControl.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundControl.o LBoundControl.cpp
${OBJECTDIR}/LBoundDatePickerCtrl.o: LBoundDatePickerCtrl.cpp ${OBJECTDIR}/LBoundDatePickerCtrl.o: LBoundDatePickerCtrl.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundDatePickerCtrl.o LBoundDatePickerCtrl.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundDatePickerCtrl.o LBoundDatePickerCtrl.cpp
${OBJECTDIR}/LBoundGrid.o: LBoundGrid.cpp ${OBJECTDIR}/LBoundGrid.o: LBoundGrid.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundGrid.o LBoundGrid.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundGrid.o LBoundGrid.cpp
${OBJECTDIR}/LBoundSpinCtrl.o: LBoundSpinCtrl.cpp ${OBJECTDIR}/LBoundSpinCtrl.o: LBoundSpinCtrl.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundSpinCtrl.o LBoundSpinCtrl.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundSpinCtrl.o LBoundSpinCtrl.cpp
${OBJECTDIR}/LBoundTextCtrl.o: LBoundTextCtrl.cpp ${OBJECTDIR}/LBoundTextCtrl.o: LBoundTextCtrl.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundTextCtrl.o LBoundTextCtrl.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundTextCtrl.o LBoundTextCtrl.cpp
${OBJECTDIR}/LConnection.o: LConnection.cpp ${OBJECTDIR}/LConnection.o: LConnection.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LConnection.o LConnection.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LConnection.o LConnection.cpp
${OBJECTDIR}/LGridCheckEditor.o: LGridCheckEditor.cpp ${OBJECTDIR}/LGridCheckEditor.o: LGridCheckEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridCheckEditor.o LGridCheckEditor.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridCheckEditor.o LGridCheckEditor.cpp
${OBJECTDIR}/LGridCheckRenderer.o: LGridCheckRenderer.cpp ${OBJECTDIR}/LGridCheckRenderer.o: LGridCheckRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridCheckRenderer.o LGridCheckRenderer.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridCheckRenderer.o LGridCheckRenderer.cpp
${OBJECTDIR}/LGridColEditor.o: LGridColEditor.cpp ${OBJECTDIR}/LGridColEditor.o: LGridColEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridColEditor.o LGridColEditor.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridColEditor.o LGridColEditor.cpp
${OBJECTDIR}/LGridComboEditor.o: LGridComboEditor.cpp ${OBJECTDIR}/LGridComboEditor.o: LGridComboEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridComboEditor.o LGridComboEditor.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridComboEditor.o LGridComboEditor.cpp
${OBJECTDIR}/LGridComboRenderer.o: LGridComboRenderer.cpp ${OBJECTDIR}/LGridComboRenderer.o: LGridComboRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridComboRenderer.o LGridComboRenderer.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridComboRenderer.o LGridComboRenderer.cpp
${OBJECTDIR}/LGridDateEditor.o: LGridDateEditor.cpp ${OBJECTDIR}/LGridDateEditor.o: LGridDateEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridDateEditor.o LGridDateEditor.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridDateEditor.o LGridDateEditor.cpp
${OBJECTDIR}/LGridDateRenderer.o: LGridDateRenderer.cpp ${OBJECTDIR}/LGridDateRenderer.o: LGridDateRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridDateRenderer.o LGridDateRenderer.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridDateRenderer.o LGridDateRenderer.cpp
${OBJECTDIR}/LGridSpinEditor.o: LGridSpinEditor.cpp ${OBJECTDIR}/LGridSpinEditor.o: LGridSpinEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridSpinEditor.o LGridSpinEditor.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridSpinEditor.o LGridSpinEditor.cpp
${OBJECTDIR}/LGridSpinRenderer.o: LGridSpinRenderer.cpp ${OBJECTDIR}/LGridSpinRenderer.o: LGridSpinRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridSpinRenderer.o LGridSpinRenderer.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridSpinRenderer.o LGridSpinRenderer.cpp
${OBJECTDIR}/LGridTextEditor.o: LGridTextEditor.cpp ${OBJECTDIR}/LGridTextEditor.o: LGridTextEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridTextEditor.o LGridTextEditor.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridTextEditor.o LGridTextEditor.cpp
${OBJECTDIR}/LGridTextRenderer.o: LGridTextRenderer.cpp ${OBJECTDIR}/LGridTextRenderer.o: LGridTextRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridTextRenderer.o LGridTextRenderer.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridTextRenderer.o LGridTextRenderer.cpp
${OBJECTDIR}/LInformation.o: LInformation.cpp ${OBJECTDIR}/LInformation.o: LInformation.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LInformation.o LInformation.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LInformation.o LInformation.cpp
${OBJECTDIR}/LItemData.o: LItemData.cpp ${OBJECTDIR}/LItemData.o: LItemData.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LItemData.o LItemData.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LItemData.o LItemData.cpp
${OBJECTDIR}/LLightPQResultSet.o: LLightPQResultSet.cpp ${OBJECTDIR}/LLightPQResultSet.o: LLightPQResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightPQResultSet.o LLightPQResultSet.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightPQResultSet.o LLightPQResultSet.cpp
${OBJECTDIR}/LLightResultSet.o: LLightResultSet.cpp ${OBJECTDIR}/LLightResultSet.o: LLightResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightResultSet.o LLightResultSet.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightResultSet.o LLightResultSet.cpp
${OBJECTDIR}/LLightSQResultSet.o: LLightSQResultSet.cpp ${OBJECTDIR}/LLightSQResultSet.o: LLightSQResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightSQResultSet.o LLightSQResultSet.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightSQResultSet.o LLightSQResultSet.cpp
${OBJECTDIR}/LNavigator.o: LNavigator.cpp ${OBJECTDIR}/LNavigator.o: LNavigator.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LNavigator.o LNavigator.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LNavigator.o LNavigator.cpp
${OBJECTDIR}/LPQConnection.o: LPQConnection.cpp ${OBJECTDIR}/LPQConnection.o: LPQConnection.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LPQConnection.o LPQConnection.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LPQConnection.o LPQConnection.cpp
${OBJECTDIR}/LPQResultSet.o: LPQResultSet.cpp ${OBJECTDIR}/LPQResultSet.o: LPQResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LPQResultSet.o LPQResultSet.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LPQResultSet.o LPQResultSet.cpp
${OBJECTDIR}/LResultSet.o: LResultSet.cpp ${OBJECTDIR}/LResultSet.o: LResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LResultSet.o LResultSet.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LResultSet.o LResultSet.cpp
${OBJECTDIR}/LSQConnection.o: LSQConnection.cpp ${OBJECTDIR}/LSQConnection.o: LSQConnection.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQConnection.o LSQConnection.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQConnection.o LSQConnection.cpp
${OBJECTDIR}/LSQResultSet.o: LSQResultSet.cpp ${OBJECTDIR}/LSQResultSet.o: LSQResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQResultSet.o LSQResultSet.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQResultSet.o LSQResultSet.cpp
${OBJECTDIR}/LSQresult.o: LSQresult.cpp ${OBJECTDIR}/LSQresult.o: LSQresult.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQresult.o LSQresult.cpp $(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQresult.o LSQresult.cpp
${OBJECTDIR}/special/BaseGridPicker.o: special/BaseGridPicker.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/BaseGridPicker.o special/BaseGridPicker.cpp
${OBJECTDIR}/special/BasePicker.o: special/BasePicker.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/BasePicker.o special/BasePicker.cpp
${OBJECTDIR}/special/JsonGridPickerCtrl.o: special/JsonGridPickerCtrl.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/JsonGridPickerCtrl.o special/JsonGridPickerCtrl.cpp
${OBJECTDIR}/special/JsonHelper.o: special/JsonHelper.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/JsonHelper.o special/JsonHelper.cpp
${OBJECTDIR}/special/LBoundJsonGridPicker.o: special/LBoundJsonGridPicker.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LBoundJsonGridPicker.o special/LBoundJsonGridPicker.cpp
${OBJECTDIR}/special/LBoundXmlGridPicker.o: special/LBoundXmlGridPicker.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LBoundXmlGridPicker.o special/LBoundXmlGridPicker.cpp
${OBJECTDIR}/special/LGridJsonCellEditor.o: special/LGridJsonCellEditor.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LGridJsonCellEditor.o special/LGridJsonCellEditor.cpp
${OBJECTDIR}/special/LGridJsonCellRenderer.o: special/LGridJsonCellRenderer.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LGridJsonCellRenderer.o special/LGridJsonCellRenderer.cpp
${OBJECTDIR}/special/LGridXmlCellEditor.o: special/LGridXmlCellEditor.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LGridXmlCellEditor.o special/LGridXmlCellEditor.cpp
${OBJECTDIR}/special/LGridXmlCellRenderer.o: special/LGridXmlCellRenderer.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LGridXmlCellRenderer.o special/LGridXmlCellRenderer.cpp
${OBJECTDIR}/special/XmlGridPickerCtrl.o: special/XmlGridPickerCtrl.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/XmlGridPickerCtrl.o special/XmlGridPickerCtrl.cpp
${OBJECTDIR}/special/XmlHelper.o: special/XmlHelper.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -g -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets/include/wx-3.1 -I/usr/local/wxWidgets/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/XmlHelper.o special/XmlHelper.cpp
# Subprojects # Subprojects
.build-subprojects: .build-subprojects:

View File

@@ -65,7 +65,19 @@ OBJECTFILES= \
${OBJECTDIR}/LResultSet.o \ ${OBJECTDIR}/LResultSet.o \
${OBJECTDIR}/LSQConnection.o \ ${OBJECTDIR}/LSQConnection.o \
${OBJECTDIR}/LSQResultSet.o \ ${OBJECTDIR}/LSQResultSet.o \
${OBJECTDIR}/LSQresult.o ${OBJECTDIR}/LSQresult.o \
${OBJECTDIR}/special/BaseGridPicker.o \
${OBJECTDIR}/special/BasePicker.o \
${OBJECTDIR}/special/JsonGridPickerCtrl.o \
${OBJECTDIR}/special/JsonHelper.o \
${OBJECTDIR}/special/LBoundJsonGridPicker.o \
${OBJECTDIR}/special/LBoundXmlGridPicker.o \
${OBJECTDIR}/special/LGridJsonCellEditor.o \
${OBJECTDIR}/special/LGridJsonCellRenderer.o \
${OBJECTDIR}/special/LGridXmlCellEditor.o \
${OBJECTDIR}/special/LGridXmlCellRenderer.o \
${OBJECTDIR}/special/XmlGridPickerCtrl.o \
${OBJECTDIR}/special/XmlHelper.o
# C Compiler Flags # C Compiler Flags
@@ -82,7 +94,7 @@ FFLAGS=
ASFLAGS= ASFLAGS=
# Link Libraries and Options # Link Libraries and Options
LDLIBSOPTIONS=-L/usr/local/wxWidgets-Release/lib -lwx_baseu-3.1 -lwx_gtk2u_core-3.1 LDLIBSOPTIONS=-L/usr/local/wxWidgets-Release/lib -lwx_baseu-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwxcode_gtk2u_wxjson-3.1
# Build Targets # Build Targets
.build-conf: ${BUILD_SUBPROJECTS} .build-conf: ${BUILD_SUBPROJECTS}
@@ -95,157 +107,217 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libL7.${CND_DLIB_EXT}: ${OBJECTFILES}
${OBJECTDIR}/LBoundCheckBox.o: LBoundCheckBox.cpp ${OBJECTDIR}/LBoundCheckBox.o: LBoundCheckBox.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundCheckBox.o LBoundCheckBox.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundCheckBox.o LBoundCheckBox.cpp
${OBJECTDIR}/LBoundComboBox.o: LBoundComboBox.cpp ${OBJECTDIR}/LBoundComboBox.o: LBoundComboBox.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundComboBox.o LBoundComboBox.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundComboBox.o LBoundComboBox.cpp
${OBJECTDIR}/LBoundControl.o: LBoundControl.cpp ${OBJECTDIR}/LBoundControl.o: LBoundControl.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundControl.o LBoundControl.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundControl.o LBoundControl.cpp
${OBJECTDIR}/LBoundDatePickerCtrl.o: LBoundDatePickerCtrl.cpp ${OBJECTDIR}/LBoundDatePickerCtrl.o: LBoundDatePickerCtrl.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundDatePickerCtrl.o LBoundDatePickerCtrl.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundDatePickerCtrl.o LBoundDatePickerCtrl.cpp
${OBJECTDIR}/LBoundGrid.o: LBoundGrid.cpp ${OBJECTDIR}/LBoundGrid.o: LBoundGrid.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundGrid.o LBoundGrid.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundGrid.o LBoundGrid.cpp
${OBJECTDIR}/LBoundSpinCtrl.o: LBoundSpinCtrl.cpp ${OBJECTDIR}/LBoundSpinCtrl.o: LBoundSpinCtrl.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundSpinCtrl.o LBoundSpinCtrl.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundSpinCtrl.o LBoundSpinCtrl.cpp
${OBJECTDIR}/LBoundTextCtrl.o: LBoundTextCtrl.cpp ${OBJECTDIR}/LBoundTextCtrl.o: LBoundTextCtrl.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundTextCtrl.o LBoundTextCtrl.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LBoundTextCtrl.o LBoundTextCtrl.cpp
${OBJECTDIR}/LConnection.o: LConnection.cpp ${OBJECTDIR}/LConnection.o: LConnection.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LConnection.o LConnection.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LConnection.o LConnection.cpp
${OBJECTDIR}/LGridCheckEditor.o: LGridCheckEditor.cpp ${OBJECTDIR}/LGridCheckEditor.o: LGridCheckEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridCheckEditor.o LGridCheckEditor.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridCheckEditor.o LGridCheckEditor.cpp
${OBJECTDIR}/LGridCheckRenderer.o: LGridCheckRenderer.cpp ${OBJECTDIR}/LGridCheckRenderer.o: LGridCheckRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridCheckRenderer.o LGridCheckRenderer.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridCheckRenderer.o LGridCheckRenderer.cpp
${OBJECTDIR}/LGridColEditor.o: LGridColEditor.cpp ${OBJECTDIR}/LGridColEditor.o: LGridColEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridColEditor.o LGridColEditor.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridColEditor.o LGridColEditor.cpp
${OBJECTDIR}/LGridComboEditor.o: LGridComboEditor.cpp ${OBJECTDIR}/LGridComboEditor.o: LGridComboEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridComboEditor.o LGridComboEditor.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridComboEditor.o LGridComboEditor.cpp
${OBJECTDIR}/LGridComboRenderer.o: LGridComboRenderer.cpp ${OBJECTDIR}/LGridComboRenderer.o: LGridComboRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridComboRenderer.o LGridComboRenderer.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridComboRenderer.o LGridComboRenderer.cpp
${OBJECTDIR}/LGridDateEditor.o: LGridDateEditor.cpp ${OBJECTDIR}/LGridDateEditor.o: LGridDateEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridDateEditor.o LGridDateEditor.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridDateEditor.o LGridDateEditor.cpp
${OBJECTDIR}/LGridDateRenderer.o: LGridDateRenderer.cpp ${OBJECTDIR}/LGridDateRenderer.o: LGridDateRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridDateRenderer.o LGridDateRenderer.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridDateRenderer.o LGridDateRenderer.cpp
${OBJECTDIR}/LGridSpinEditor.o: LGridSpinEditor.cpp ${OBJECTDIR}/LGridSpinEditor.o: LGridSpinEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridSpinEditor.o LGridSpinEditor.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridSpinEditor.o LGridSpinEditor.cpp
${OBJECTDIR}/LGridSpinRenderer.o: LGridSpinRenderer.cpp ${OBJECTDIR}/LGridSpinRenderer.o: LGridSpinRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridSpinRenderer.o LGridSpinRenderer.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridSpinRenderer.o LGridSpinRenderer.cpp
${OBJECTDIR}/LGridTextEditor.o: LGridTextEditor.cpp ${OBJECTDIR}/LGridTextEditor.o: LGridTextEditor.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridTextEditor.o LGridTextEditor.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridTextEditor.o LGridTextEditor.cpp
${OBJECTDIR}/LGridTextRenderer.o: LGridTextRenderer.cpp ${OBJECTDIR}/LGridTextRenderer.o: LGridTextRenderer.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridTextRenderer.o LGridTextRenderer.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LGridTextRenderer.o LGridTextRenderer.cpp
${OBJECTDIR}/LInformation.o: LInformation.cpp ${OBJECTDIR}/LInformation.o: LInformation.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LInformation.o LInformation.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LInformation.o LInformation.cpp
${OBJECTDIR}/LItemData.o: LItemData.cpp ${OBJECTDIR}/LItemData.o: LItemData.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LItemData.o LItemData.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LItemData.o LItemData.cpp
${OBJECTDIR}/LLightPQResultSet.o: LLightPQResultSet.cpp ${OBJECTDIR}/LLightPQResultSet.o: LLightPQResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightPQResultSet.o LLightPQResultSet.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightPQResultSet.o LLightPQResultSet.cpp
${OBJECTDIR}/LLightResultSet.o: LLightResultSet.cpp ${OBJECTDIR}/LLightResultSet.o: LLightResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightResultSet.o LLightResultSet.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightResultSet.o LLightResultSet.cpp
${OBJECTDIR}/LLightSQResultSet.o: LLightSQResultSet.cpp ${OBJECTDIR}/LLightSQResultSet.o: LLightSQResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightSQResultSet.o LLightSQResultSet.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LLightSQResultSet.o LLightSQResultSet.cpp
${OBJECTDIR}/LNavigator.o: LNavigator.cpp ${OBJECTDIR}/LNavigator.o: LNavigator.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LNavigator.o LNavigator.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LNavigator.o LNavigator.cpp
${OBJECTDIR}/LPQConnection.o: LPQConnection.cpp ${OBJECTDIR}/LPQConnection.o: LPQConnection.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LPQConnection.o LPQConnection.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LPQConnection.o LPQConnection.cpp
${OBJECTDIR}/LPQResultSet.o: LPQResultSet.cpp ${OBJECTDIR}/LPQResultSet.o: LPQResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LPQResultSet.o LPQResultSet.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LPQResultSet.o LPQResultSet.cpp
${OBJECTDIR}/LResultSet.o: LResultSet.cpp ${OBJECTDIR}/LResultSet.o: LResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LResultSet.o LResultSet.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LResultSet.o LResultSet.cpp
${OBJECTDIR}/LSQConnection.o: LSQConnection.cpp ${OBJECTDIR}/LSQConnection.o: LSQConnection.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQConnection.o LSQConnection.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQConnection.o LSQConnection.cpp
${OBJECTDIR}/LSQResultSet.o: LSQResultSet.cpp ${OBJECTDIR}/LSQResultSet.o: LSQResultSet.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQResultSet.o LSQResultSet.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQResultSet.o LSQResultSet.cpp
${OBJECTDIR}/LSQresult.o: LSQresult.cpp ${OBJECTDIR}/LSQresult.o: LSQresult.cpp
${MKDIR} -p ${OBJECTDIR} ${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d" ${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQresult.o LSQresult.cpp $(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/LSQresult.o LSQresult.cpp
${OBJECTDIR}/special/BaseGridPicker.o: special/BaseGridPicker.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/BaseGridPicker.o special/BaseGridPicker.cpp
${OBJECTDIR}/special/BasePicker.o: special/BasePicker.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/BasePicker.o special/BasePicker.cpp
${OBJECTDIR}/special/JsonGridPickerCtrl.o: special/JsonGridPickerCtrl.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/JsonGridPickerCtrl.o special/JsonGridPickerCtrl.cpp
${OBJECTDIR}/special/JsonHelper.o: special/JsonHelper.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/JsonHelper.o special/JsonHelper.cpp
${OBJECTDIR}/special/LBoundJsonGridPicker.o: special/LBoundJsonGridPicker.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LBoundJsonGridPicker.o special/LBoundJsonGridPicker.cpp
${OBJECTDIR}/special/LBoundXmlGridPicker.o: special/LBoundXmlGridPicker.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LBoundXmlGridPicker.o special/LBoundXmlGridPicker.cpp
${OBJECTDIR}/special/LGridJsonCellEditor.o: special/LGridJsonCellEditor.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LGridJsonCellEditor.o special/LGridJsonCellEditor.cpp
${OBJECTDIR}/special/LGridJsonCellRenderer.o: special/LGridJsonCellRenderer.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LGridJsonCellRenderer.o special/LGridJsonCellRenderer.cpp
${OBJECTDIR}/special/LGridXmlCellEditor.o: special/LGridXmlCellEditor.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LGridXmlCellEditor.o special/LGridXmlCellEditor.cpp
${OBJECTDIR}/special/LGridXmlCellRenderer.o: special/LGridXmlCellRenderer.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/LGridXmlCellRenderer.o special/LGridXmlCellRenderer.cpp
${OBJECTDIR}/special/XmlGridPickerCtrl.o: special/XmlGridPickerCtrl.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/XmlGridPickerCtrl.o special/XmlGridPickerCtrl.cpp
${OBJECTDIR}/special/XmlHelper.o: special/XmlHelper.cpp
${MKDIR} -p ${OBJECTDIR}/special
${RM} "$@.d"
$(COMPILE.cc) -O2 -s -DUSE_LIBPQ -DUSE_LIBSQ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -DwxDEBUG_LEVEL=0 -I/usr/local/wxWidgets-Release/include/wx-3.1 -I/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/wxWidgets-Release/include -fPIC -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/special/XmlHelper.o special/XmlHelper.cpp
# Subprojects # Subprojects
.build-subprojects: .build-subprojects:

View File

@@ -4,6 +4,20 @@
<logicalFolder name="HeaderFiles" <logicalFolder name="HeaderFiles"
displayName="Header Files" displayName="Header Files"
projectFiles="true"> projectFiles="true">
<logicalFolder name="f1" displayName="special" projectFiles="true">
<itemPath>special/BaseGridPicker.h</itemPath>
<itemPath>special/BasePicker.h</itemPath>
<itemPath>special/JsonGridPickerCtrl.h</itemPath>
<itemPath>special/JsonHelper.h</itemPath>
<itemPath>special/LBoundJsonGridPicker.h</itemPath>
<itemPath>special/LBoundXmlGridPicker.h</itemPath>
<itemPath>special/LGridJsonCellEditor.h</itemPath>
<itemPath>special/LGridJsonCellRenderer.h</itemPath>
<itemPath>special/LGridXmlCellEditor.h</itemPath>
<itemPath>special/LGridXmlCellRenderer.h</itemPath>
<itemPath>special/XmlGridPickerCtrl.h</itemPath>
<itemPath>special/XmlHelper.h</itemPath>
</logicalFolder>
<itemPath>LBoundCheckBox.h</itemPath> <itemPath>LBoundCheckBox.h</itemPath>
<itemPath>LBoundComboBox.h</itemPath> <itemPath>LBoundComboBox.h</itemPath>
<itemPath>LBoundControl.h</itemPath> <itemPath>LBoundControl.h</itemPath>
@@ -44,6 +58,20 @@
<logicalFolder name="SourceFiles" <logicalFolder name="SourceFiles"
displayName="Source Files" displayName="Source Files"
projectFiles="true"> projectFiles="true">
<logicalFolder name="f1" displayName="special" projectFiles="true">
<itemPath>special/BaseGridPicker.cpp</itemPath>
<itemPath>special/BasePicker.cpp</itemPath>
<itemPath>special/JsonGridPickerCtrl.cpp</itemPath>
<itemPath>special/JsonHelper.cpp</itemPath>
<itemPath>special/LBoundJsonGridPicker.cpp</itemPath>
<itemPath>special/LBoundXmlGridPicker.cpp</itemPath>
<itemPath>special/LGridJsonCellEditor.cpp</itemPath>
<itemPath>special/LGridJsonCellRenderer.cpp</itemPath>
<itemPath>special/LGridXmlCellEditor.cpp</itemPath>
<itemPath>special/LGridXmlCellRenderer.cpp</itemPath>
<itemPath>special/XmlGridPickerCtrl.cpp</itemPath>
<itemPath>special/XmlHelper.cpp</itemPath>
</logicalFolder>
<itemPath>LBoundCheckBox.cpp</itemPath> <itemPath>LBoundCheckBox.cpp</itemPath>
<itemPath>LBoundComboBox.cpp</itemPath> <itemPath>LBoundComboBox.cpp</itemPath>
<itemPath>LBoundControl.cpp</itemPath> <itemPath>LBoundControl.cpp</itemPath>
@@ -101,6 +129,7 @@
<incDir> <incDir>
<pElem>/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1</pElem> <pElem>/usr/local/wxWidgets/lib/wx/include/gtk2-unicode-3.1</pElem>
<pElem>/usr/local/wxWidgets/include/wx-3.1</pElem> <pElem>/usr/local/wxWidgets/include/wx-3.1</pElem>
<pElem>/usr/local/wxWidgets/include</pElem>
</incDir> </incDir>
<preprocessorList> <preprocessorList>
<Elem>USE_LIBPQ</Elem> <Elem>USE_LIBPQ</Elem>
@@ -118,6 +147,8 @@
<linkerLibItems> <linkerLibItems>
<linkerLibLibItem>wx_baseu-3.1</linkerLibLibItem> <linkerLibLibItem>wx_baseu-3.1</linkerLibLibItem>
<linkerLibLibItem>wx_gtk2u_core-3.1</linkerLibLibItem> <linkerLibLibItem>wx_gtk2u_core-3.1</linkerLibLibItem>
<linkerLibLibItem>wx_baseu_xml-3.1</linkerLibLibItem>
<linkerLibLibItem>wxcode_gtk2ud_wxjson-3.1</linkerLibLibItem>
</linkerLibItems> </linkerLibItems>
</linkerTool> </linkerTool>
</compileType> </compileType>
@@ -247,6 +278,54 @@
</item> </item>
<item path="LVersion.h" ex="false" tool="3" flavor2="0"> <item path="LVersion.h" ex="false" tool="3" flavor2="0">
</item> </item>
<item path="special/BaseGridPicker.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/BaseGridPicker.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/BasePicker.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/BasePicker.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/JsonGridPickerCtrl.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/JsonGridPickerCtrl.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/JsonHelper.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/JsonHelper.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LBoundJsonGridPicker.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LBoundJsonGridPicker.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LBoundXmlGridPicker.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LBoundXmlGridPicker.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LGridJsonCellEditor.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LGridJsonCellEditor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LGridJsonCellRenderer.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LGridJsonCellRenderer.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LGridXmlCellEditor.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LGridXmlCellEditor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LGridXmlCellRenderer.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LGridXmlCellRenderer.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/XmlGridPickerCtrl.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/XmlGridPickerCtrl.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/XmlHelper.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/XmlHelper.h" ex="false" tool="3" flavor2="0">
</item>
</conf> </conf>
<conf name="Release" type="2"> <conf name="Release" type="2">
<toolsSet> <toolsSet>
@@ -264,6 +343,7 @@
<incDir> <incDir>
<pElem>/usr/local/wxWidgets-Release/include/wx-3.1</pElem> <pElem>/usr/local/wxWidgets-Release/include/wx-3.1</pElem>
<pElem>/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1</pElem> <pElem>/usr/local/wxWidgets-Release/lib/wx/include/gtk2-unicode-3.1</pElem>
<pElem>/usr/local/wxWidgets-Release/include</pElem>
</incDir> </incDir>
<preprocessorList> <preprocessorList>
<Elem>USE_LIBPQ</Elem> <Elem>USE_LIBPQ</Elem>
@@ -288,6 +368,8 @@
<linkerLibItems> <linkerLibItems>
<linkerLibLibItem>wx_baseu-3.1</linkerLibLibItem> <linkerLibLibItem>wx_baseu-3.1</linkerLibLibItem>
<linkerLibLibItem>wx_gtk2u_core-3.1</linkerLibLibItem> <linkerLibLibItem>wx_gtk2u_core-3.1</linkerLibLibItem>
<linkerLibLibItem>wx_baseu_xml-3.1</linkerLibLibItem>
<linkerLibLibItem>wxcode_gtk2u_wxjson-3.1</linkerLibLibItem>
</linkerLibItems> </linkerLibItems>
</linkerTool> </linkerTool>
</compileType> </compileType>
@@ -417,6 +499,54 @@
</item> </item>
<item path="LVersion.h" ex="false" tool="3" flavor2="0"> <item path="LVersion.h" ex="false" tool="3" flavor2="0">
</item> </item>
<item path="special/BaseGridPicker.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/BaseGridPicker.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/BasePicker.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/BasePicker.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/JsonGridPickerCtrl.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/JsonGridPickerCtrl.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/JsonHelper.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/JsonHelper.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LBoundJsonGridPicker.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LBoundJsonGridPicker.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LBoundXmlGridPicker.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LBoundXmlGridPicker.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LGridJsonCellEditor.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LGridJsonCellEditor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LGridJsonCellRenderer.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LGridJsonCellRenderer.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LGridXmlCellEditor.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LGridXmlCellEditor.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/LGridXmlCellRenderer.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/LGridXmlCellRenderer.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/XmlGridPickerCtrl.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/XmlGridPickerCtrl.h" ex="false" tool="3" flavor2="0">
</item>
<item path="special/XmlHelper.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="special/XmlHelper.h" ex="false" tool="3" flavor2="0">
</item>
</conf> </conf>
</confs> </confs>
</configurationDescriptor> </configurationDescriptor>

View File

@@ -40,21 +40,21 @@
// List of standard headers was taken in http://en.cppreference.com/w/c/header // List of standard headers was taken in http://en.cppreference.com/w/c/header
#include <assert.h> // Conditionally compiled macro that compares its argument to zero #include <assert.h> // Conditionally compiled macro that compares its argument to zero
#include <ctype.h> // Functions to determine the type contained in character data #include <ctype.h> // Functions to determine the type contained in character data
#include <errno.h> // Macros reporting error conditions #include <errno.h> // Macros reporting error conditions
#include <float.h> // Limits of float types #include <float.h> // Limits of float types
#include <limits.h> // Sizes of basic types #include <limits.h> // Sizes of basic types
#include <locale.h> // Localization utilities #include <locale.h> // Localization utilities
#include <math.h> // Common mathematics functions #include <math.h> // Common mathematics functions
#include <setjmp.h> // Nonlocal jumps #include <setjmp.h> // Nonlocal jumps
#include <signal.h> // Signal handling #include <signal.h> // Signal handling
#include <stdarg.h> // Variable arguments #include <stdarg.h> // Variable arguments
#include <stddef.h> // Common macro definitions #include <stddef.h> // Common macro definitions
#include <stdio.h> // Input/output #include <stdio.h> // Input/output
#include <string.h> // String handling #include <string.h> // String handling
#include <stdlib.h> // General utilities: memory management, program utilities, string conversions, random numbers #include <stdlib.h> // General utilities: memory management, program utilities, string conversions, random numbers
#include <time.h> // Time/date utilities #include <time.h> // Time/date utilities
#include <iso646.h> // (since C95) Alternative operator spellings #include <iso646.h> // (since C95) Alternative operator spellings
#include <wchar.h> // (since C95) Extended multibyte and wide character utilities #include <wchar.h> // (since C95) Extended multibyte and wide character utilities
#include <wctype.h> // (since C95) Wide character classification and mapping utilities #include <wctype.h> // (since C95) Wide character classification and mapping utilities

View File

@@ -40,39 +40,39 @@
// List of standard headers was taken in http://en.cppreference.com/w/cpp/header // List of standard headers was taken in http://en.cppreference.com/w/cpp/header
#include <cstdlib> // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search #include <cstdlib> // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search
#include <csignal> // Functions and macro constants for signal management #include <csignal> // Functions and macro constants for signal management
#include <csetjmp> // Macro (and function) that saves (and jumps) to an execution context #include <csetjmp> // Macro (and function) that saves (and jumps) to an execution context
#include <cstdarg> // Handling of variable length argument lists #include <cstdarg> // Handling of variable length argument lists
#include <typeinfo> // Runtime type information utilities #include <typeinfo> // Runtime type information utilities
#include <bitset> // std::bitset class template #include <bitset> // std::bitset class template
#include <functional> // Function objects, designed for use with the standard algorithms #include <functional> // Function objects, designed for use with the standard algorithms
#include <utility> // Various utility components #include <utility> // Various utility components
#include <ctime> // C-style time/date utilites #include <ctime> // C-style time/date utilites
#include <cstddef> // typedefs for types such as size_t, NULL and others #include <cstddef> // typedefs for types such as size_t, NULL and others
#include <new> // Low-level memory management utilities #include <new> // Low-level memory management utilities
#include <memory> // Higher level memory management utilities #include <memory> // Higher level memory management utilities
#include <climits> // limits of integral types #include <climits> // limits of integral types
#include <cfloat> // limits of float types #include <cfloat> // limits of float types
#include <limits> // standardized way to query properties of arithmetic types #include <limits> // standardized way to query properties of arithmetic types
#include <exception> // Exception handling utilities #include <exception> // Exception handling utilities
#include <stdexcept> // Standard exception objects #include <stdexcept> // Standard exception objects
#include <cassert> // Conditionally compiled macro that compares its argument to zero #include <cassert> // Conditionally compiled macro that compares its argument to zero
#include <cerrno> // Macro containing the last error number #include <cerrno> // Macro containing the last error number
#include <cctype> // functions to determine the type contained in character data #include <cctype> // functions to determine the type contained in character data
#include <cwctype> // functions for determining the type of wide character data #include <cwctype> // functions for determining the type of wide character data
#include <cstring> // various narrow character string handling functions #include <cstring> // various narrow character string handling functions
#include <cwchar> // various wide and multibyte string handling functions #include <cwchar> // various wide and multibyte string handling functions
#include <string> // std::basic_string class template #include <string> // std::basic_string class template
#include <vector> // std::vector container #include <vector> // std::vector container
#include <deque> // std::deque container #include <deque> // std::deque container
#include <list> // std::list container #include <list> // std::list container
#include <set> // std::set and std::multiset associative containers #include <set> // std::set and std::multiset associative containers
#include <map> // std::map and std::multimap associative containers #include <map> // std::map and std::multimap associative containers
#include <stack> // std::stack container adaptor #include <stack> // std::stack container adaptor
#include <queue> // std::queue and std::priority_queue container adaptors #include <queue> // std::queue and std::priority_queue container adaptors
#include <algorithm> // Algorithms that operate on containers #include <algorithm> // Algorithms that operate on containers
#include <iterator> // Container iterators #include <iterator> // Container iterators
#include <cmath> // Common mathematics functions #include <cmath> // Common mathematics functions
#include <complex> // Complex number type #include <complex> // Complex number type
#include <valarray> // Class for representing and manipulating arrays of values #include <valarray> // Class for representing and manipulating arrays of values

View File

@@ -2,10 +2,13 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<data xmlns="http://www.netbeans.org/ns/make-project-private/1"> <data xmlns="http://www.netbeans.org/ns/make-project-private/1">
<activeConfTypeElem>2</activeConfTypeElem> <activeConfTypeElem>2</activeConfTypeElem>
<activeConfIndexElem>0</activeConfIndexElem> <activeConfIndexElem>1</activeConfIndexElem>
</data> </data>
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/> <group>
<file>file:/home/user/Documents/published/L7/L7/special/LGridJsonCellRenderer.h</file>
<file>file:/home/user/Documents/published/L7/L7/special/LGridJsonCellRenderer.cpp</file>
</group>
</open-files> </open-files>
</project-private> </project-private>

View File

@@ -22,9 +22,9 @@
</confList> </confList>
<formatting> <formatting>
<project-formatting-style>true</project-formatting-style> <project-formatting-style>true</project-formatting-style>
<c-style>Apache|Apache</c-style> <c-style>ANSI|ANSI</c-style>
<cpp-style>Apache|Apache</cpp-style> <cpp-style>ANSI|ANSI</cpp-style>
<header-style>Apache|Apache</header-style> <header-style>ANSI|ANSI</header-style>
</formatting> </formatting>
</data> </data>
</configuration> </configuration>

View File

@@ -0,0 +1,211 @@
/*
* File: BaseGridPicker.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 7, 2019, 9:40 PM
*/
#include "BaseGridPicker.h"
IMPLEMENT_CLASS(BaseGridPicker, BasePicker)
BaseGridPicker::BaseGridPicker(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize,
const wxString& text,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name)
: BasePicker(parent, id, popupSize, text, pos, size, style, validator, name)
{
m_grid = NULL;
m_stringTable = NULL;
m_editable = true;
m_intentLabel = _T("Intent");
m_nbInsertRows = 3;
m_colTypeChoices = types;
m_PrefEditor = NULL;
wxButton * btn = static_cast<wxButton*> (GetPickerCtrl());
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &BaseGridPicker::ShowPopup, this);
}
BaseGridPicker::~BaseGridPicker()
{
delete m_grid;
}
void BaseGridPicker::UpdatePickerFromTextCtrl()
{
// Gets called when TextCtrl is changed
}
void BaseGridPicker::UpdateTextCtrlFromPicker()
{
// Gets called when TextCtrl loses focus
}
void BaseGridPicker::CreateGrid()
{
wxDELETE(m_grid);
BasePicker::CreatePopup();
m_grid = new wxGrid(m_popup, wxID_ANY);
m_popup->GetSizer()->Add(m_grid, 1, wxGROW | wxALL, 0);
m_grid->SetSize(m_popup->GetSize());
m_grid->SetDefaultCellAlignment(wxALIGN_LEFT, wxALIGN_CENTRE);
m_stringTable = new wxGridStringTable();
m_stringTable->CanHaveAttributes();
m_grid->HideRowLabels();
m_grid->SetUseNativeColLabels();
m_grid->SetTable(m_stringTable);
m_grid->SetSelectionMode(wxGrid::wxGridSelectionModes::wxGridSelectRows);
PrepareGrid();
FillGrid();
}
void BaseGridPicker::SetIntentLabel(const wxString& intent)
{
m_intentLabel = intent;
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL"));
m_stringTable->SetColLabelValue(0, m_intentLabel);
}
wxString BaseGridPicker::GetIntent() const
{
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL"));
for (uint row = 0; row < m_stringTable->GetRowsCount(); row++)
{
if (m_stringTable->GetValue(row, 2) != _T("0")
&& !m_stringTable->GetValue(row, 2).IsEmpty()
&& !m_stringTable->GetValue(row, 0).IsEmpty())
{
return m_stringTable->GetValue(row, 0);
}
}
return wxEmptyString;
}
void BaseGridPicker::EnableEditing(bool editable)
{
m_editable = editable;
m_nbInsertRows = editable ? 3 : 0;
}
void BaseGridPicker::OnPopupHidden(wxShowEvent& evt)
{
if (evt.IsShown())
{
evt.Skip();
return;
}
m_grid->SaveEditControlValue();
/*
* Workaround an unexpected behavior :
* If cell is edited to empty, SaveEditControlValue() above does not
* save the empty string in the string table.
* It still contains the old non-empty value.
* GoToCell() below effectively ends editing.
* But this does not happen if cell is edited from empty to any non-empty
* value.
*/
m_grid->GoToCell(m_grid->GetGridCursorRow(), m_grid->GetGridCursorCol());
DumpGrid();
for (uint row = 0; row < m_stringTable->GetRowsCount(); row++)
{
if (m_stringTable->GetValue(row, 2) != _T("0")
&& !m_stringTable->GetValue(row, 2).IsEmpty())
{
const wxString intent = m_stringTable->GetValue(row, 0);
if (!intent.IsEmpty())
{
GetTextCtrl()->SetValue(intent);
}
else
{
GetTextCtrl()->SetValue(INVALID_INTENT);
}
evt.Skip();
return;
}
}
GetTextCtrl()->SetValue(INVALID_INTENT);
evt.Skip();
}
void BaseGridPicker::PreparePreferredCol()
{
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL"));
wxGridCellAttr * colAtt = m_stringTable->GetAttr(m_grid->GetGridCursorRow(), 2, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr();
wxGridCellBoolEditor * ed = new wxGridCellBoolEditor();
colAtt->SetEditor(ed);
wxGridCellBoolRenderer * rn = new wxGridCellBoolRenderer();
colAtt->SetRenderer(rn);
colAtt->SetAlignment(wxALIGN_CENTER, wxALIGN_CENTRE);
m_stringTable->SetColAttr(colAtt, 2);
}
void BaseGridPicker::PrepareTypeCol()
{
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL"));
wxGridCellAttr * colAtt = m_stringTable->GetAttr(m_grid->GetGridCursorRow(), 1, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr();
wxGridCellChoiceEditor* ed = new wxGridCellChoiceEditor(m_colTypeChoices);
colAtt->SetEditor(ed);
m_stringTable->SetColAttr(colAtt, 1);
}
void BaseGridPicker::PrepareGrid()
{
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL"));
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL"));
m_grid->AppendCols(4);
m_grid->AppendRows(m_nbInsertRows);
PreparePreferredCol();
PrepareTypeCol();
m_grid->SetColSize(0, 170);
m_grid->SetColSize(1, 100);
m_grid->SetColSize(3, 200);
m_stringTable->SetColLabelValue(0, m_intentLabel);
m_stringTable->SetColLabelValue(1, _T("Type"));
m_stringTable->SetColLabelValue(2, _T("Preferred"));
m_stringTable->SetColLabelValue(3, _T("Notes"));
m_grid->Bind(wxEVT_GRID_EDITOR_CREATED, &BaseGridPicker::OnEditorCreated, this);
m_grid->Bind(wxEVT_GRID_EDITOR_HIDDEN, &BaseGridPicker::OnEditorHidden, this);
}
void BaseGridPicker::OnEditorCreated(wxGridEditorCreatedEvent& evt)
{
if (evt.GetCol() == 2)
{
m_PrefEditor = static_cast<wxCheckBox*> (evt.GetControl());
}
evt.Skip();
}
void BaseGridPicker::OnEditorHidden(wxGridEvent& evt)
{
if (evt.GetCol() == 2 && m_PrefEditor && m_PrefEditor->IsChecked())
{
for (uint row = 0; row < m_stringTable->GetRowsCount(); row++)
{
if (row != evt.GetRow())
{
m_stringTable->SetValue(row, evt.GetCol(), _T("0"));
}
}
m_grid->ForceRefresh();
}
evt.Skip();
}
void BaseGridPicker::ShowPopup(wxCommandEvent& evt)
{
BasePicker::DoShowPopup();
evt.Skip();
}

181
L7/special/BaseGridPicker.h Normal file
View File

@@ -0,0 +1,181 @@
/*
* File: BaseGridPicker.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 7, 2019, 9:40 PM
*/
#ifndef BASEGRIDPICKER_H
#define BASEGRIDPICKER_H
#include "BasePicker.h"
#include <wx/grid.h>
#define INVALID_INTENT _("[Invalid]")
/**
* Abstract class adding a wxGrid to BasePicker.
* <br/>The grid is contained in the popup. It has 4 columns :
* <br/><br/> Column 0 : The intent : phone, email..., in single line
* <br/> Column 1 : Type : Home, Work...
* <br/> Column 2 : Preferred : one entry should be preferred
* <br/> Column 3 : Short notes in single line
* <br/><br/>
* The label of the Intent column can be changed by an application. The other
* columns have fixed labels.
* <br/>
* The Type column is edited with a combobox. Its values are set by
* SetColTypeChoices().
* <br/>
* The Preferred column allows selecting one single entry as preferred. If none
* is selected, the dataset persists but considered invalid.
* <br/>
* Selection mode is wxGridSelectRows. Row labels are hidden.
* <br/>
* Three empty rows are available for quick multiple inputs.
* @return
*/
class BaseGridPicker : public BasePicker
{
DECLARE_CLASS(BaseGridPicker)
public:
BaseGridPicker(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize,
const wxString& text = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxPB_USE_TEXTCTRL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual ~BaseGridPicker();
/**
* Unused, empty implementation.
*/
virtual void UpdatePickerFromTextCtrl();
/**
* Unused, empty implementation.
*/
virtual void UpdateTextCtrlFromPicker();
virtual void SetValue(const wxString& value) = 0;
virtual wxString GetValue() = 0;
/**
* Sets the values of the Type column in a combobox.
* @param choices
*/
void SetColTypeChoices(const wxArrayString& choices)
{
m_colTypeChoices = choices;
}
/**
* Gets the values of the Type column.
* @return
*/
wxArrayString GetColTypeChoices() const
{
return m_colTypeChoices;
}
/**
* Sets the label of the Intent column.
* @param intent
*/
void SetIntentLabel(const wxString& intent);
/**
* Gets the label of the Intent column.
* @return
*/
wxString GetIntentLabel() const
{
return m_intentLabel;
}
/**
* Gets the Intent value, the one that is marked as preferred.
* It may return an empty string if no item is preferred.
* @return
*/
wxString GetIntent() const;
/**
* Can we modify data ?
* @return
*/
bool IsEditable() const
{
return m_editable;
}
/**
* Grid data may be editable or not. In the latter case, no empty rows are
* shown.
* @param editable
*/
void EnableEditing(bool editable);
protected:
/**
* Saves the grid's content internally and updates the wxTextCtrl's value.
* @param evt
*/
virtual void OnPopupHidden(wxShowEvent& evt);
virtual void FillGrid() = 0;
virtual void DumpGrid() = 0;
/**
* Creates, configures and fills the grid by calling FillGrid(). A previous
* grid is deleted.
*/
void CreateGrid();
wxGrid * m_grid;
wxGridStringTable * m_stringTable;
bool m_editable;
private:
wxArrayString m_colTypeChoices;
wxString m_intentLabel;
uint m_nbInsertRows;
wxCheckBox * m_PrefEditor;
/**
* Configures the Preferred column for editing and rendering using a
* checkbox.
*/
void PreparePreferredCol();
/**
* Configures the Type column for editing using a combobox.
*/
void PrepareTypeCol();
/**
* Adds rows and columns, configures the columns, further setting sizes
* and labels.
* <br/>
* Binds the grid to editor creation and hidden events.
*/
void PrepareGrid();
/**
* References the wxCheckBox editor.
* <br/>
* Does nothing for the other columns.
*
* @param evt
*/
void OnEditorCreated(wxGridEditorCreatedEvent& evt);
/**
* Concerns the Preferred column only. When the editor is checked, ensures
* the other rows are unchecked.
* @param evt
*/
void OnEditorHidden(wxGridEvent& evt);
/**
* Just calls BasePicker::DoShowPopup().
* @param evt
*/
virtual void ShowPopup(wxCommandEvent& evt);
};
#endif /* BASEGRIDPICKER_H */

74
L7/special/BasePicker.cpp Normal file
View File

@@ -0,0 +1,74 @@
/*
* File: BasePicker.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 7, 2019, 9:24 PM
*/
#include "BasePicker.h"
IMPLEMENT_CLASS(BasePicker, wxPickerBase)
BasePicker::BasePicker(wxWindow *parent,
wxWindowID id,
wxSize popupSize,
const wxString& text,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name)
: wxPickerBase()
{
m_popup = NULL;
m_popupSize = popupSize;
wxPickerBase::CreateBase(parent, id, text, pos, size, style, validator, name);
wxButton * btn = new wxButton(this, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
SetPickerCtrl(btn);
wxPickerBase::PostCreation();
GetTextCtrl()->SetEditable(false);
SetTextCtrlGrowable(true);
SetPickerCtrlGrowable(true);
}
BasePicker::~BasePicker()
{
delete m_popup;
}
void BasePicker::CreatePopup()
{
wxDELETE(m_popup);
m_popup = new wxPopupTransientWindow(this);
wxBoxSizer * sz = new wxBoxSizer(wxVERTICAL);
m_popup->SetSizer(sz);
m_popup->Bind(wxEVT_SHOW, &BasePicker::OnPopupHidden, this);
}
void BasePicker::DoShowPopup()
{
if (m_popupSize.GetWidth() < 0)
m_popupSize.SetWidth(GetClientSize().GetWidth());
if (m_popupSize.GetHeight() < 0)
m_popupSize.SetHeight(300);
m_popup->SetClientSize(m_popupSize);
m_popup->GetSizer()->Layout();
wxScreenDC dc;
const int screenWidth = dc.GetSize().GetWidth();
const int screenHeight = dc.GetSize().GetHeight();
const wxPoint oriPos = GetScreenPosition() + GetClientRect().GetBottomLeft();
wxPoint dest(oriPos.x, oriPos.y);
if (oriPos.x > (screenWidth - m_popupSize.GetWidth())) dest.x = (screenWidth - m_popupSize.GetWidth());
if (oriPos.x < 0) dest.x = 0;
if (oriPos.y > (screenHeight - m_popupSize.GetHeight())) dest.y = (screenHeight - m_popupSize.GetHeight());
if (oriPos.y < 0) dest.y = 0;
if (m_popupSize.GetWidth() > screenWidth) dest.x = 0;
if (m_popupSize.GetHeight() > screenHeight) dest.y = 0;
m_popup->SetPosition(dest);
m_popup->Popup();
}

63
L7/special/BasePicker.h Normal file
View File

@@ -0,0 +1,63 @@
/*
* File: BasePicker.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 7, 2019, 9:24 PM
*/
#ifndef BASEPICKER_H
#define BASEPICKER_H
#include <wx/wx.h>
#include <wx/pickerbase.h>
#include <wx/popupwin.h>
/**
* Abstract class adding a popup to wxPickerBase styled with
* a non-editable wxTextCtrl. It manages the popup's position and size also.
* The picker control is a wxButton that shows the popup.
*/
class BasePicker : public wxPickerBase
{
DECLARE_CLASS(BasePicker)
public:
BasePicker(wxWindow *parent,
wxWindowID id,
wxSize popupSize = wxDefaultSize,
const wxString& text = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxPB_USE_TEXTCTRL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual ~BasePicker();
virtual void UpdatePickerFromTextCtrl() = 0;
virtual void UpdateTextCtrlFromPicker() = 0;
private:
protected:
wxPopupTransientWindow * m_popup;
wxSize m_popupSize;
/**
* A new popup is always created. Any previous popup is deleted.
* It binds to OnPopupHidden().
*/
virtual void CreatePopup();
/**
* Shows the popup managing its position and size.
* <br/><br/>
* If m_popupSize.GetWidth() < 0, the popup's width is set to the control's
* width.
* <br/>
* If m_popupSize.GetHeight() < 0, it defaults to 300.
*/
virtual void DoShowPopup();
virtual void OnPopupHidden(wxShowEvent& evt) = 0;
};
#endif /* BASEPICKER_H */

View File

@@ -0,0 +1,171 @@
/*
* File: JsonGridPickerCtrl.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 7, 2019, 10:01 PM
*/
/*
* [
{
"Intent" : "a@b.com",
"Type" : "Home",
"Preferred" : 0,
"Notes" : "Do not use"
},
{
"Intent" : "c@d.com",
"Type" : "Work",
"Preferred" : 1,
"Notes" : "Neither"
}
]
*/
#include "JsonGridPickerCtrl.h"
#include <wx/jsonreader.h>
#include <wx/jsonwriter.h>
IMPLEMENT_CLASS(JsonGridPickerCtrl, BaseGridPicker)
#define EMPTY_ARR _T("[]")
JsonGridPickerCtrl::JsonGridPickerCtrl(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize,
const wxString& text,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name)
: BaseGridPicker(parent, id, types, popupSize, text, pos, size, style, validator, name)
{
/*
* Don't create the grid here. Let SetValue() do it, deleting the previous
* one every time new data is fed in.
*/
SetValue(wxEmptyString);
}
JsonGridPickerCtrl::~JsonGridPickerCtrl()
{
}
void JsonGridPickerCtrl::SetValue(const wxString& value)
{
if (value.IsEmpty())
{
m_value = EMPTY_ARR;
BaseGridPicker::CreateGrid(); // +++
GetTextCtrl()->SetValue(INVALID_INTENT);
return;
}
m_value = value;
BaseGridPicker::CreateGrid(); // +++
GetTextCtrl()->SetValue(INVALID_INTENT);
wxJSONReader reader(wxJSONREADER_STRICT);
wxJSONValue root;
uint nbErr = reader.Parse(m_value, &root);
if (nbErr > 0)
{
const wxArrayString& errors = reader.GetErrors();
for (int i = 0; i < nbErr; i++)
{
wxASSERT_MSG(nbErr == 0, errors[i]);
}
return;
}
if (!root.IsArray())
{
wxASSERT_MSG(root.IsArray(), _("JSON data is not an array"));
return;
}
for (uint row = 0; row < root.Size(); row++)
{
if (root[row]["Preferred"].IsValid()
&& !root[row]["Preferred"].AsString().IsEmpty()
&& root[row]["Preferred"].AsInt() != 0)
{
GetTextCtrl()->SetValue(root[row]["Intent"].AsString());
return;
}
}
GetTextCtrl()->SetValue(INVALID_INTENT);
}
wxString JsonGridPickerCtrl::GetValue()
{
DumpGrid();
/*
* wxJSONWriter adds quotes and line breaks to EMPTY_ARR !
* m_value is set in DumpGrid(). If there is no grid data, m_value is set
* to \"[]\"\n
*/
wxJSONValue empty(EMPTY_ARR);
wxJSONWriter writer;
wxString sempty;
writer.Write(empty, sempty);
if (m_value == sempty)
return wxEmptyString;
return m_value;
}
void JsonGridPickerCtrl::FillGrid()
{
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL"));
wxJSONReader reader(wxJSONREADER_STRICT);
wxJSONValue root;
uint nbErr = reader.Parse(m_value, &root);
if (nbErr > 0)
{
const wxArrayString& errors = reader.GetErrors();
for (int i = 0; i < nbErr; i++)
{
wxASSERT_MSG(nbErr == 0, errors[i]);
}
return;
}
if (!root.IsArray())
{
wxASSERT_MSG(root.IsArray(), _("JSON data is not an array"));
return;
}
for (uint row = 0; row < root.Size(); row++)
{
m_grid->InsertRows(row);
m_grid->SetCellValue(row, 0, root[row]["Intent"].AsString());
m_grid->SetCellValue(row, 1, root[row]["Type"].AsString());
m_grid->SetCellValue(row, 2, root[row]["Preferred"].AsString());
m_grid->SetCellValue(row, 3, root[row]["Notes"].AsString());
}
}
void JsonGridPickerCtrl::DumpGrid()
{
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL"));
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL"));
if (!m_editable || !m_stringTable || !m_grid)
return;
wxJSONWriter writer;
wxJSONValue root(EMPTY_ARR);
uint row = 0;
uint jrow = 0;
for (row; row < m_stringTable->GetRowsCount(); row++)
{
if (m_stringTable->GetValue(row, 0).IsEmpty())
continue;
root[jrow]["Intent"] = m_stringTable->GetValue(row, 0);
root[jrow]["Type"] = m_stringTable->GetValue(row, 1);
root[jrow]["Preferred"] = (m_stringTable->GetValue(row, 2) == _T("0")
|| m_stringTable->GetValue(row, 2).IsEmpty()) ? 0 : 1;
root[jrow]["Notes"] = m_stringTable->GetValue(row, 3);
jrow++;
}
writer.Write(root, m_value); // May be EMPTY_ARR
}

View File

@@ -0,0 +1,70 @@
/*
* File: JsonGridPickerCtrl.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 7, 2019, 10:01 PM
*/
#ifndef JSONGRIDPICKERCTRL_H
#define JSONGRIDPICKERCTRL_H
#include "BaseGridPicker.h"
/**
* The grid content is stored in a JSON array.
* @return
*/
class JsonGridPickerCtrl : public BaseGridPicker
{
DECLARE_CLASS(JsonGridPickerCtrl)
public:
JsonGridPickerCtrl(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize,
const wxString& text = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxPB_USE_TEXTCTRL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual ~JsonGridPickerCtrl();
/**
* Creates a new grid deleting the previous one and fills it with the JSON
* data.
* @param value
*/
virtual void SetValue(const wxString& value);
/**
* Dumps the grid content and returns it as a JSON array. But returns empty
* string if JSON array is empty.
* @return
*/
virtual wxString GetValue();
protected:
/**
* Parses the JSON data and fills the grid. It should be pure JSON, without
* any extension like comments.
*/
virtual void FillGrid();
/**
* Translates the grid content to a JSON array.
* If the Intent column is empty, this row is ignored.
*/
virtual void DumpGrid();
/**
* Is the JSON array.
*/
wxString m_value;
private:
};
#endif /* JSONGRIDPICKERCTRL_H */

53
L7/special/JsonHelper.cpp Normal file
View File

@@ -0,0 +1,53 @@
/*
* File: JsonHelper.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 16, 2019, 8:25 PM
*/
#include "JsonHelper.h"
#include <wx/jsonreader.h>
JsonHelper::JsonHelper()
{
}
JsonHelper::~JsonHelper()
{
}
wxString JsonHelper::GetIntent(const wxString& jsonData)
{
if (jsonData.IsEmpty())
return wxEmptyString;
wxJSONReader reader(wxJSONREADER_STRICT);
wxJSONValue root;
uint nbErr = reader.Parse(jsonData, &root);
if (nbErr > 0)
{
const wxArrayString& errors = reader.GetErrors();
for (int i = 0; i < nbErr; i++)
{
wxASSERT_MSG(nbErr == 0, errors[i]);
}
return wxEmptyString;
}
if (!root.IsArray())
{
wxASSERT_MSG(root.IsArray(), _("JSON data is not an array"));
return wxEmptyString;
}
for (uint row = 0; row < root.Size(); row++)
{
if (root[row]["Preferred"].IsValid()
&& !root[row]["Preferred"].AsString().IsEmpty()
&& root[row]["Preferred"].AsInt() != 0)
{
return root[row]["Intent"].AsString();
}
}
return wxEmptyString;
}

36
L7/special/JsonHelper.h Normal file
View File

@@ -0,0 +1,36 @@
/*
* File: JsonHelper.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 16, 2019, 8:25 PM
*/
#ifndef JSONHELPER_H
#define JSONHELPER_H
#include <wx/wx.h>
/**
* Application helper to quickly get the Intent value.
* @param jsonData
* @return
*/
class JsonHelper
{
public:
/**
* Returns a valid Intent value or an empty string.
* @param jsonData
* @return
*/
static wxString GetIntent(const wxString& jsonData);
private:
JsonHelper();
virtual ~JsonHelper();
};
#endif /* JSONHELPER_H */

View File

@@ -0,0 +1,113 @@
/*
* File: LBoundJsonGridPicker.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 8, 2019, 9:23 AM
*/
#include "LBoundJsonGridPicker.h"
#include <wx/jsonreader.h>
IMPLEMENT_CLASS(LBoundJsonGridPicker, JsonGridPickerCtrl)
LBoundJsonGridPicker::LBoundJsonGridPicker(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize,
const wxString& text,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name)
: JsonGridPickerCtrl(parent, id, types, popupSize, text, pos, size, style, validator, name)
{
m_sqlQuote = _T("'");
}
LBoundJsonGridPicker::~LBoundJsonGridPicker()
{
if (m_rs) m_rs->UnRegisterControl(this);
}
void LBoundJsonGridPicker::SetResultSet(LResultSet* newResultSet)
{
m_rs = newResultSet;
if (m_rs == NULL) return;
m_rs->RegisterControl(this);
}
const wxAny LBoundJsonGridPicker::GetData()
{
// If m_value == EMPTY_ARR, GetValue() returns empty string
if (GetValue().IsEmpty()) return L_SQLNULL;
return GetValue();
}
void LBoundJsonGridPicker::SetData(const wxAny& newData)
{
SetValue(newData.As<wxString>());
}
void LBoundJsonGridPicker::SetNull()
{
// m_value is set to EMPTY_ARR
SetValue(wxEmptyString);
}
bool LBoundJsonGridPicker::IsDirty()
{
wxASSERT_MSG(m_rs != NULL, _("RS = NULL"));
wxAny BEData = m_rs->GetData(m_columnName);
const wxString ctrlValue = GetValue();
/*
* Make JSON objects from backend and control values, and compare them.
* Postgresql : jsonb columns contain single line values. Can't compare strings.
*/
const wxString beValue = BEData.As<wxString>();
if (ctrlValue.IsEmpty() || beValue.IsEmpty())
return (ctrlValue != beValue);
wxJSONReader beReader(wxJSONREADER_STRICT);
wxJSONValue beRoot;
uint nbErr = beReader.Parse(beValue, &beRoot);
if (nbErr > 0)
{
const wxArrayString& errors = beReader.GetErrors();
for (int i = 0; i < nbErr; i++)
{
wxASSERT_MSG(nbErr == 0, errors[i]);
}
// Backend value is not what we expect. Declare dirty to overwrite it.
return true;
}
if (!beRoot.IsArray())
{
wxASSERT_MSG(beRoot.IsArray(), _("Back end JSON data is not an array"));
return true;
}
wxJSONReader ctrlReader(wxJSONREADER_STRICT);
wxJSONValue ctrlRoot;
nbErr = beReader.Parse(ctrlValue, &ctrlRoot);
// Should not happen as we wrote the data.
if (nbErr > 0)
{
const wxArrayString& errors = ctrlReader.GetErrors();
for (int i = 0; i < nbErr; i++)
{
wxASSERT_MSG(nbErr == 0, errors[i]);
}
// Control value is not what we expect. Don't overwrite in backend.
return false;
}
if (!ctrlRoot.IsArray())
{
wxASSERT_MSG(ctrlRoot.IsArray(), _("Control JSON data is not an array"));
return false;
}
return (!ctrlRoot.IsSameAs(beRoot));
}

View File

@@ -0,0 +1,81 @@
/*
* File: LBoundJsonGridPicker.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 8, 2019, 9:23 AM
*/
#ifndef LBOUNDJSONGRIDPICKER_H
#define LBOUNDJSONGRIDPICKER_H
#include "JsonGridPickerCtrl.h"
#include "../LBoundControl.h"
#include "../LResultSet.h"
/**
* Saves a JSON array in database.
* Data type of database column should be TEXT for sqlite, and can be TEXT or
* JSONB for postgresql.
* @return
*/
class LBoundJsonGridPicker : public JsonGridPickerCtrl, public LBoundControl
{
DECLARE_CLASS(LBoundJsonGridPicker)
public:
LBoundJsonGridPicker(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize,
const wxString& text = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxPB_USE_TEXTCTRL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual ~LBoundJsonGridPicker();
/**
* Sets the resultset member and registers the control in the resultset.
* @param newResultSet
*/
void SetResultSet(LResultSet * newResultSet);
/**
*
* @return If the control is empty, returns literal NULL.
* Else, returns GetValue().
*/
const wxAny GetData();
void SetData(const wxAny& newData);
bool IsNull()
{
return (GetData().As<wxString>() == L_SQLNULL);
}
void SetNull();
/**
* Is control data same as backend data?
* <br/><br/>
* If backend data cannot be parsed, will always return true, because
* GetValue() returns empty control data.
* @return
*/
bool IsDirty();
/**
* Alias for GetValue().
* Not really the displayed informative value in the picker's wxTextCtrl.
* @return
*/
const wxString GetDisplayedData()
{
return GetValue();
}
private:
};
#endif /* LBOUNDJSONGRIDPICKER_H */

View File

@@ -0,0 +1,72 @@
/*
* File: LBoundXmlGridPicker.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 14, 2019, 10:12 PM
*/
#include "LBoundXmlGridPicker.h"
IMPLEMENT_CLASS(LBoundXmlGridPicker, XmlGridPickerCtrl)
LBoundXmlGridPicker::LBoundXmlGridPicker(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize,
const wxString& text,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name)
: XmlGridPickerCtrl(parent, id, types, popupSize, text, pos, size, style, validator, name)
{
m_sqlQuote = _T("'");
}
LBoundXmlGridPicker::~LBoundXmlGridPicker()
{
if (m_rs) m_rs->UnRegisterControl(this);
}
void LBoundXmlGridPicker::SetResultSet(LResultSet* newResultSet)
{
m_rs = newResultSet;
if (m_rs == NULL) return;
m_rs->RegisterControl(this);
}
const wxAny LBoundXmlGridPicker::GetData()
{
// If m_value is EMPTY_DOC, GetValue() returns empty string
if (GetValue().IsEmpty()) return L_SQLNULL;
return GetValue();
}
void LBoundXmlGridPicker::SetData(const wxAny& newData)
{
SetValue(newData.As<wxString>());
}
void LBoundXmlGridPicker::SetNull()
{
// m_value is set to EMPTY_DOC
SetValue(wxEmptyString);
}
bool LBoundXmlGridPicker::IsDirty()
{
/*
* String compare backend and control values.
* Database column data type is TEXT, hence data is saved verbatim.
* On the other hand, comparing XML documents is not trivial.
* wxWidgets does not have this functionality, not does it write
* canonical XML, AFAIK.
* Linking to other libraries for this would be an overkill.
*/
wxASSERT_MSG(m_rs != NULL, _("RS = NULL"));
wxAny BEData = m_rs->GetData(m_columnName);
return (GetValue() != BEData.As<wxString>());
}

View File

@@ -0,0 +1,80 @@
/*
* File: LBoundXmlGridPicker.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 14, 2019, 10:12 PM
*/
#ifndef LBOUNDXMLGRIDPICKER_H
#define LBOUNDXMLGRIDPICKER_H
#include "XmlGridPickerCtrl.h"
#include "../LBoundControl.h"
#include "../LResultSet.h"
/**
* Saves an XML document in database.
* Data type of database column should be TEXT for both sqlite and postgresql.
* @return
*/
class LBoundXmlGridPicker : public XmlGridPickerCtrl, public LBoundControl
{
DECLARE_CLASS(LBoundXmlGridPicker)
public:
LBoundXmlGridPicker(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize,
const wxString& text = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxPB_USE_TEXTCTRL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual ~LBoundXmlGridPicker();
/**
* Sets the resultset member and registers the control in the resultset.
* @param newResultSet
*/
void SetResultSet(LResultSet * newResultSet);
/**
*
* @return If the control is empty, returns literal NULL.
* Else, returns GetValue().
*/
const wxAny GetData();
void SetData(const wxAny& newData);
bool IsNull()
{
return (GetData().As<wxString>() == L_SQLNULL);
}
void SetNull();
/**
* Is control data same as backend data?
* <br/><br/>
* If backend data is cannot be parsed, will always return true, because
* GetValue() returns empty control data.
* @return
*/
bool IsDirty();
/**
* Alias for GetValue().
* Not really the displayed informative value in the picker'swxTextCtrl.
* @return
*/
const wxString GetDisplayedData()
{
return GetValue();
}
private:
};
#endif /* LBOUNDXMLGRIDPICKER_H */

View File

@@ -0,0 +1,144 @@
/*
* File: LGridJsonCellEditor.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
* Author: user
*
* Created on December 9, 2019, 10:36 AM
*/
#include "LGridJsonCellEditor.h"
#include "../LBoundGrid.h"
LGridJsonCellEditor::LGridJsonCellEditor(const wxString& newColName,
const wxString& intentLabel,
const wxArrayString& types,
wxSize popupSize)
: wxGridCellEditor(), LGridColEditor()
{
m_intentLabel = intentLabel;
m_choices = types;
m_popupSize = popupSize;
m_colName = newColName;
m_type = LGridColEditor::JSON_GRID;
m_formEditor = NULL;
m_BoundControl = NULL;
m_BoundJsonGridPicker = NULL;
m_editRow = wxNOT_FOUND;
m_rsEVH = NULL;
}
LGridJsonCellEditor::~LGridJsonCellEditor()
{
delete m_rsEVH;
wxDELETE(m_control);
}
void LGridJsonCellEditor::Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler)
{
m_control = new LBoundJsonGridPicker(parent, id, m_choices, m_popupSize);
m_BoundJsonGridPicker = (static_cast<LBoundJsonGridPicker*> (m_control));
m_BoundJsonGridPicker->SetColumnName(m_colName);
if (!m_intentLabel.IsEmpty())
m_BoundJsonGridPicker->SetIntentLabel(m_intentLabel);
m_BoundControl = m_BoundJsonGridPicker;
m_rsEVH = new JsonGridEditorRsEVH(this);
m_control->Show(false);
}
void LGridJsonCellEditor::BeginEdit(int row, int col, wxGrid *grid)
{
if (m_editRow != row)
m_jsonBuffer.MakeNull();
m_editRow = row;
if (m_control == NULL)
{
Create(grid->GetGridWindow(), wxID_ANY, NULL);
}
LResultSet * rs = ((LBoundGrid *) grid)->GetResultSet();
m_rsEVH->SetResultSet(rs);
rs->RegisterEventHandler(m_rsEVH);
m_BoundJsonGridPicker->SetResultSet(rs);
if (m_jsonBuffer.IsNull() && row < rs->GetRowCount())
m_jsonBuffer = rs->GetData(row, col);
m_BoundJsonGridPicker->SetData(m_jsonBuffer);
m_control->Show(true);
}
wxGridCellEditor* LGridJsonCellEditor::Clone() const
{
return new LGridJsonCellEditor(m_colName, m_intentLabel, m_choices, m_popupSize);
}
bool LGridJsonCellEditor::EndEdit(int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval)
{
// What do we do here ?
return true;
}
void LGridJsonCellEditor::ApplyEdit(int row, int col, wxGrid *grid)
{
m_jsonBuffer = m_BoundJsonGridPicker->GetValue();
grid->GetTable()->SetValue(row, col, m_jsonBuffer.As<wxString>());
}
void LGridJsonCellEditor::Reset()
{
delete m_rsEVH;
m_rsEVH = NULL;
wxDELETE(m_control);
m_BoundControl = NULL;
m_BoundJsonGridPicker = NULL;
m_jsonBuffer.MakeNull();
m_editRow = wxNOT_FOUND;
}
wxString LGridJsonCellEditor::GetValue() const
{
return m_control == NULL ? wxString(wxEmptyString) : m_BoundControl->GetData().As<wxString>();
}
wxControl* LGridJsonCellEditor::ProvideFormEditor(wxWindow * parent)
{
if (!m_formEditor) m_formEditor = new JsonGridPickerCtrl(parent, wxID_ANY, m_choices);
m_formEditor->SetValue(GetValue());
m_formEditor->SetName(m_BoundJsonGridPicker->GetName());
m_formEditor->SetIntentLabel(m_BoundJsonGridPicker->GetIntentLabel());
if (m_BoundJsonGridPicker->GetValidator()) m_formEditor->SetValidator(*(m_BoundJsonGridPicker->GetValidator()));
return m_formEditor;
}
void LGridJsonCellEditor::SyncBack(const int row, const int col, wxGrid * grid)
{
if (!m_formEditor) return;
m_BoundJsonGridPicker->SetValue(m_formEditor->GetValue());
ApplyEdit(row, col, grid);
wxDELETE(m_formEditor);
}
///////////////////////////////////////////////////////////////////////////////
JsonGridEditorRsEVH::JsonGridEditorRsEVH(LGridJsonCellEditor * owner)
: LResultSetEvent()
{
m_owner = owner;
m_rs = NULL;
}
JsonGridEditorRsEVH::~JsonGridEditorRsEVH()
{
if (m_rs)
m_rs->UnRegisterEventHandler(this);
}
void JsonGridEditorRsEVH::AfterAction(LResultSet * caller, ACTIONS action)
{
m_rs = caller;
if (action == ACTIONS::ACTION_CANCEL)
{
m_owner->m_jsonBuffer.MakeNull();
}
}

View File

@@ -0,0 +1,124 @@
/*
* File: LGridJsonCellEditor.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 9, 2019, 10:36 AM
*/
#ifndef LGRIDJSONCELLEDITOR_H
#define LGRIDJSONCELLEDITOR_H
#include "../LGridColEditor.h"
#include "LBoundJsonGridPicker.h"
class JsonGridEditorRsEVH;
class LGridJsonCellEditor;
/**
* A grid cell editor using LBoundJsonGridPicker
* @param newColName
* @param intentLabel
* @param types
* @param popupSize
*/
class LGridJsonCellEditor : public wxGridCellEditor, public LGridColEditor
{
friend class JsonGridEditorRsEVH;
public:
LGridJsonCellEditor(const wxString& newColName,
const wxString& intentLabel,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize);
virtual ~LGridJsonCellEditor();
/**
* Creates m_control as LBoundJsonGridPicker.
* @param parent
* @param id
* @param evtHandler
*/
void Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler);
/**
* Creates m_control if necessary. Registers the editor in the grid's resultset.
* @param row
* @param col
* @param grid
*/
void BeginEdit(int row, int col, wxGrid *grid);
wxGridCellEditor* Clone() const;
bool EndEdit(int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval);
/**
* Applies the editor value as returned by GetValue() to the grid cell.
* @param row
* @param col
* @param grid
*/
void ApplyEdit(int row, int col, wxGrid *grid);
/**
* Deletes the editor, all pointers to the editor are set to NULL.
*/
void Reset();
/**
*
* @return GetData(), or wxEmptyString if the editor control has not been created.
*/
wxString GetValue() const;
/**
* Creates a wxTextCtrl to be used as editor in form view.
*/
wxControl* ProvideFormEditor(wxWindow * parent);
wxControl* GetFormEditor() const
{
return m_formEditor;
}
/**
* Updates the grid cell and the editor. m_formEditor is deleted and set to NULL.
* @param row
* @param col
* @param grid
*/
void SyncBack(const int row, const int col, wxGrid * grid);
private:
wxString m_intentLabel;
wxArrayString m_choices;
wxSize m_popupSize;
JsonGridPickerCtrl * m_formEditor;
wxAny m_jsonBuffer;
int m_editRow;
/**
* Fully typed alias to m_control.
*/
LBoundJsonGridPicker * m_BoundJsonGridPicker;
wxWeakRef<JsonGridEditorRsEVH> m_rsEVH;
};
/**
* Clears LGridJsonGridEditor::m_jsonBuffer on LBoundGrid::Cancel.
* Must be trackable. If it is deleted by an application, avoid crash in
* destructor of LGridJsonGridEditor.
*/
class JsonGridEditorRsEVH : public LResultSetEvent, public wxTrackable
{
friend class LGridJsonCellEditor;
public:
private:
JsonGridEditorRsEVH(LGridJsonCellEditor * owner);
virtual ~JsonGridEditorRsEVH();
virtual void AfterAction(LResultSet * caller, ACTIONS action);
void SetResultSet(LResultSet * caller)
{
m_rs = caller;
}
LResultSet * m_rs;
LGridJsonCellEditor * m_owner;
};
#endif /* LGRIDJSONCELLEDITOR_H */

View File

@@ -0,0 +1,73 @@
/*
* File: LGridJsonCellRenderer.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 9, 2019, 1:55 PM
*/
#include "LGridJsonCellRenderer.h"
#include "BaseGridPicker.h"
#include <wx/jsonreader.h>
LGridJsonCellRenderer::LGridJsonCellRenderer()
{
}
LGridJsonCellRenderer::~LGridJsonCellRenderer()
{
}
void LGridJsonCellRenderer::Draw(wxGrid & grid,
wxGridCellAttr & attr,
wxDC & dc,
const wxRect & rect,
int row,
int col,
bool isSelected)
{
const wxString intent = ProcessJsonValue(grid.GetCellValue(row, col));
grid.SetCellValue(row, col, intent);
wxGridCellStringRenderer::Draw(grid, attr, dc, rect, row, col, isSelected);
}
const wxString LGridJsonCellRenderer::ProcessJsonValue(const wxString& cellValue)
{
if (cellValue.IsEmpty())
return INVALID_INTENT;
wxJSONReader reader(wxJSONREADER_STRICT);
wxJSONValue root;
uint nbErr = reader.Parse(cellValue, &root);
if (nbErr > 0)
{
const wxArrayString& errors = reader.GetErrors();
for (int i = 0; i < nbErr; i++)
{
wxASSERT_MSG(nbErr == 0, errors[i]);
}
// Show raw data.
return cellValue;
}
if (!root.IsArray())
{
wxASSERT_MSG(root.IsArray(), _("JSON data is not an array"));
return cellValue;
}
for (uint row = 0; row < root.Size(); row++)
{
if (root[row]["Preferred"].IsValid()
&& !root[row]["Preferred"].AsString().IsEmpty()
&& root[row]["Preferred"].AsInt() != 0)
{
return root[row]["Intent"].AsString();
}
}
/*
* Don't show raw data if there's no preferred item.
* The data will still be in the editor and saved.
*/
return INVALID_INTENT;
}

View File

@@ -0,0 +1,38 @@
/*
* File: LGridJsonCellRenderer.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 9, 2019, 1:55 PM
*/
#ifndef LGRIDJSONCELLRENDERER_H
#define LGRIDJSONCELLRENDERER_H
#include "wx/grid.h"
/**
* A grid cell renderer for json stored data.
* It show the selected Intent value, or INVALID_INTENT.
*/
class LGridJsonCellRenderer : public wxGridCellStringRenderer
{
public:
LGridJsonCellRenderer();
virtual ~LGridJsonCellRenderer();
void Draw(wxGrid & grid,
wxGridCellAttr & attr,
wxDC & dc,
const wxRect & rect,
int row,
int col,
bool isSelected);
private:
const wxString ProcessJsonValue(const wxString& cellValue);
};
#endif /* LGRIDJSONCELLRENDERER_H */

View File

@@ -0,0 +1,143 @@
/*
* File: LGridXmlCellEditor.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 15, 2019, 6:32 PM
*/
#include "LGridXmlCellEditor.h"
#include "../LBoundGrid.h"
LGridXmlCellEditor::LGridXmlCellEditor(const wxString& newColName,
const wxString& intentLabel,
const wxArrayString& types,
wxSize popupSize)
: wxGridCellEditor(), LGridColEditor()
{
m_intentLabel = intentLabel;
m_choices = types;
m_popupSize = popupSize;
m_colName = newColName;
m_type = LGridColEditor::XML_GRID;
m_formEditor = NULL;
m_BoundControl = NULL;
m_BoundXmlGridPicker = NULL;
m_editRow = wxNOT_FOUND;
m_rsEVH = NULL;
}
LGridXmlCellEditor::~LGridXmlCellEditor()
{
delete m_rsEVH;
wxDELETE(m_control);
}
void LGridXmlCellEditor::Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler)
{
m_control = new LBoundXmlGridPicker(parent, id, m_choices, m_popupSize);
m_BoundXmlGridPicker = (static_cast<LBoundXmlGridPicker*> (m_control));
m_BoundXmlGridPicker->SetColumnName(m_colName);
if (!m_intentLabel.IsEmpty())
m_BoundXmlGridPicker->SetIntentLabel(m_intentLabel);
m_BoundControl = m_BoundXmlGridPicker;
m_rsEVH = new XmlGridEditorRsEVH(this);
m_control->Show(false);
}
void LGridXmlCellEditor::BeginEdit(int row, int col, wxGrid *grid)
{
if (m_editRow != row)
m_xmlBuffer.MakeNull();
m_editRow = row;
if (m_control == NULL)
{
Create(grid->GetGridWindow(), wxID_ANY, NULL);
}
LResultSet * rs = ((LBoundGrid *) grid)->GetResultSet();
m_rsEVH->SetResultSet(rs);
rs->RegisterEventHandler(m_rsEVH);
m_BoundXmlGridPicker->SetResultSet(rs);
if (m_xmlBuffer.IsNull() && row < rs->GetRowCount())
m_xmlBuffer = rs->GetData(row, col);
m_BoundXmlGridPicker->SetData(m_xmlBuffer);
m_control->Show(true);
}
wxGridCellEditor* LGridXmlCellEditor::Clone() const
{
return new LGridXmlCellEditor(m_colName, m_intentLabel, m_choices, m_popupSize);
}
bool LGridXmlCellEditor::EndEdit(int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval)
{
// What do we do here ?
return true;
}
void LGridXmlCellEditor::ApplyEdit(int row, int col, wxGrid *grid)
{
m_xmlBuffer = m_BoundXmlGridPicker->GetValue();
grid->GetTable()->SetValue(row, col, m_xmlBuffer.As<wxString>());
}
void LGridXmlCellEditor::Reset()
{
delete m_rsEVH;
m_rsEVH = NULL;
wxDELETE(m_control);
m_BoundControl = NULL;
m_BoundXmlGridPicker = NULL;
m_xmlBuffer.MakeNull();
m_editRow = wxNOT_FOUND;
}
wxString LGridXmlCellEditor::GetValue() const
{
return m_control == NULL ? wxString(wxEmptyString) : m_BoundControl->GetData().As<wxString>();
}
wxControl* LGridXmlCellEditor::ProvideFormEditor(wxWindow * parent)
{
if (!m_formEditor) m_formEditor = new XmlGridPickerCtrl(parent, wxID_ANY, m_choices);
m_formEditor->SetValue(GetValue());
m_formEditor->SetName(m_BoundXmlGridPicker->GetName());
m_formEditor->SetIntentLabel(m_BoundXmlGridPicker->GetIntentLabel());
if (m_BoundXmlGridPicker->GetValidator()) m_formEditor->SetValidator(*(m_BoundXmlGridPicker->GetValidator()));
return m_formEditor;
}
void LGridXmlCellEditor::SyncBack(const int row, const int col, wxGrid * grid)
{
if (!m_formEditor) return;
m_BoundXmlGridPicker->SetValue(m_formEditor->GetValue());
ApplyEdit(row, col, grid);
wxDELETE(m_formEditor);
}
///////////////////////////////////////////////////////////////////////////////
XmlGridEditorRsEVH::XmlGridEditorRsEVH(LGridXmlCellEditor * owner)
: LResultSetEvent()
{
m_owner = owner;
m_rs = NULL;
}
XmlGridEditorRsEVH::~XmlGridEditorRsEVH()
{
if (m_rs)
m_rs->UnRegisterEventHandler(this);
}
void XmlGridEditorRsEVH::AfterAction(LResultSet * caller, ACTIONS action)
{
m_rs = caller;
if (action == ACTIONS::ACTION_CANCEL)
{
m_owner->m_xmlBuffer.MakeNull();
}
}

View File

@@ -0,0 +1,123 @@
/*
* File: LGridXmlCellEditor.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 15, 2019, 6:32 PM
*/
#ifndef LGRIDXMLCELLEDITOR_H
#define LGRIDXMLCELLEDITOR_H
#include "../LGridColEditor.h"
#include "LBoundXmlGridPicker.h"
class XmlGridEditorRsEVH;
class LGridXmlCellEditor;
/**
* A grid cell editor using LBoundXmlGridPicker
* @param newColName
* @param intentLabel
* @param types
* @param popupSize
*/
class LGridXmlCellEditor : public wxGridCellEditor, public LGridColEditor
{
friend class XmlGridEditorRsEVH;
public:
LGridXmlCellEditor(const wxString& newColName,
const wxString& intentLabel,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize);
virtual ~LGridXmlCellEditor();
/**
* Creates m_control as LBoundJsonGridPicker.
* @param parent
* @param id
* @param evtHandler
*/
void Create(wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler);
/**
* Creates m_control if necessary. Registers the editor in the grid's resultset.
* @param row
* @param col
* @param grid
*/
void BeginEdit(int row, int col, wxGrid *grid);
wxGridCellEditor* Clone() const;
bool EndEdit(int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval);
/**
* Applies the editor value as returned by GetValue() to the grid cell.
* @param row
* @param col
* @param grid
*/
void ApplyEdit(int row, int col, wxGrid *grid);
/**
* Deletes the editor, all pointers to the editor are set to NULL.
*/
void Reset();
/**
*
* @return GetData(), or wxEmptyString if the editor control has not been created.
*/
wxString GetValue() const;
/**
* Creates a wxTextCtrl to be used as editor in form view.
*/
wxControl* ProvideFormEditor(wxWindow * parent);
wxControl* GetFormEditor() const
{
return m_formEditor;
}
/**
* Updates the grid cell and the editor. m_formEditor is deleted and set to NULL.
* @param row
* @param col
* @param grid
*/
void SyncBack(const int row, const int col, wxGrid * grid);
private:
wxString m_intentLabel;
wxArrayString m_choices;
wxSize m_popupSize;
XmlGridPickerCtrl * m_formEditor;
wxAny m_xmlBuffer;
int m_editRow;
/**
* Fully typed alias to m_control.
*/
LBoundXmlGridPicker * m_BoundXmlGridPicker;
wxWeakRef<XmlGridEditorRsEVH> m_rsEVH;
};
/**
* Clears LGridXmlGridEditor::m_jsonBuffer on LBoundGrid::Cancel.
* Must be trackable. If it is deleted by an application, avoid crash in
* destructor of LGridXmlGridEditor.
*/
class XmlGridEditorRsEVH : public LResultSetEvent, public wxTrackable
{
friend class LGridXmlCellEditor;
public:
private:
XmlGridEditorRsEVH(LGridXmlCellEditor * owner);
virtual ~XmlGridEditorRsEVH();
virtual void AfterAction(LResultSet * caller, ACTIONS action);
void SetResultSet(LResultSet * caller)
{
m_rs = caller;
}
LResultSet * m_rs;
LGridXmlCellEditor * m_owner;
};
#endif /* LGRIDXMLCELLEDITOR_H */

View File

@@ -0,0 +1,58 @@
/*
* File: LGridXmlCellRenderer.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 15, 2019, 6:18 PM
*/
#include "LGridXmlCellRenderer.h"
#include "XmlHelper.h"
#include "BaseGridPicker.h"
LGridXmlCellRenderer::LGridXmlCellRenderer()
{
}
LGridXmlCellRenderer::~LGridXmlCellRenderer()
{
}
void LGridXmlCellRenderer::Draw(wxGrid & grid,
wxGridCellAttr & attr,
wxDC & dc,
const wxRect & rect,
int row,
int col,
bool isSelected)
{
const wxString intent = ProcessXmlValue(grid.GetCellValue(row, col));
grid.SetCellValue(row, col, intent);
wxGridCellStringRenderer::Draw(grid, attr, dc, rect, row, col, isSelected);
}
const wxString LGridXmlCellRenderer::ProcessXmlValue(const wxString& cellValue)
{
if (cellValue.IsEmpty())
return INVALID_INTENT;
wxXmlDocument doc;
wxXmlNode * root = XmlHelper::ValidateXmlValue(doc, cellValue);
if (root == NULL)
// Show raw data.
return cellValue;
wxXmlNode * row = root->GetChildren();
while (row)
{
const wxString pref = row->GetAttribute(XML_ATTR_PREF);
if (!pref.IsEmpty() && pref != _T("0"))
return row->GetNodeContent();
row = row->GetNext();
}
/*
* Don't show raw data if there's no preferred item.
* The data will still be in the editor and saved.
*/
return INVALID_INTENT;
}

View File

@@ -0,0 +1,39 @@
/*
* File: LGridXmlCellRenderer.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 15, 2019, 6:18 PM
*/
#ifndef LGRIDXMLCELLRENDERER_H
#define LGRIDXMLCELLRENDERER_H
#include "wx/grid.h"
/**
* A grid cell renderer for xml stored data.
* It show the selected Intent value, or INVALID_INTENT.
*/
class LGridXmlCellRenderer : public wxGridCellStringRenderer
{
public:
LGridXmlCellRenderer();
virtual ~LGridXmlCellRenderer();
void Draw(wxGrid & grid,
wxGridCellAttr & attr,
wxDC & dc,
const wxRect & rect,
int row,
int col,
bool isSelected);
private:
const wxString ProcessXmlValue(const wxString& cellValue);
};
#endif /* LGRIDXMLCELLRENDERER_H */

View File

@@ -0,0 +1,167 @@
/*
* File: XmlGridPickerCtrl.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 14, 2019, 3:28 PM
*/
#include "XmlGridPickerCtrl.h"
#include <wx/sstream.h>
#include "XmlHelper.h"
/*
* <?xml version="1.0" encoding="UTF-8"?>
<TABLE>
<ROW Type="Work" Preferred="1" Notes="Do not use">+33 1 23 45 67 89</ROW>
<ROW Type="Home" Preferred="0" Notes="Neither">+33 9 87 65 43 21</ROW>
</TABLE>
*/
IMPLEMENT_CLASS(XmlGridPickerCtrl, BaseGridPicker)
XmlGridPickerCtrl::XmlGridPickerCtrl(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize,
const wxString& text,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
const wxString& name)
: BaseGridPicker(parent, id, types, popupSize, text, pos, size, style, validator, name)
{
/*
* Don't create the grid here. Let SetValue() do it, deleting the previous
* one every time new data is fed in.
*/
SetValue(wxEmptyString);
}
XmlGridPickerCtrl::~XmlGridPickerCtrl()
{
}
void XmlGridPickerCtrl::SetValue(const wxString& value)
{
if (value.IsEmpty())
{
m_value = EMPTY_DOC;
BaseGridPicker::CreateGrid(); // +++
GetTextCtrl()->SetValue(INVALID_INTENT);
return;
}
m_value = value;
BaseGridPicker::CreateGrid(); // +++
GetTextCtrl()->SetValue(INVALID_INTENT);
wxXmlDocument doc;
wxXmlNode * root = XmlHelper::ValidateXmlValue(doc, m_value);
if (root == NULL)
{
GetTextCtrl()->SetValue(INVALID_INTENT);
return;
}
// Look for preferred
wxXmlNode * row = root->GetChildren();
while (row)
{
const wxString pref = row->GetAttribute(XML_ATTR_PREF);
if (!pref.IsEmpty()
&& pref != _T("0"))
{
GetTextCtrl()->SetValue(row->GetNodeContent());
return;
}
row = row->GetNext();
}
GetTextCtrl()->SetValue(INVALID_INTENT);
}
wxString XmlGridPickerCtrl::GetValue()
{
DumpGrid();
wxXmlDocument doc;
wxXmlNode * root = new wxXmlNode(wxXML_ELEMENT_NODE, XML_ROOT_NAME);
doc.SetRoot(root);
wxString emptyXmlData;
wxStringOutputStream sos(&emptyXmlData);
doc.Save(sos);
if (m_value == emptyXmlData)
return wxEmptyString;
return m_value;
}
void XmlGridPickerCtrl::FillGrid()
{
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL"));
wxXmlDocument doc;
wxXmlNode * root = XmlHelper::ValidateXmlValue(doc, m_value);
if (root == NULL)
{
GetTextCtrl()->SetValue(INVALID_INTENT);
return;
}
wxXmlNode * row = root->GetChildren();
int idx = 0;
while (row)
{
m_grid->InsertRows(idx);
m_grid->SetCellValue(idx, 0, row->GetNodeContent());
m_grid->SetCellValue(idx, 1, row->GetAttribute(XML_ATTR_TYPE));
m_grid->SetCellValue(idx, 2, row->GetAttribute(XML_ATTR_PREF));
m_grid->SetCellValue(idx, 3, row->GetAttribute(XML_ATTR_NOTES));
idx++;
row = row->GetNext();
}
}
void XmlGridPickerCtrl::DumpGrid()
{
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL"));
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL"));
if (!m_editable || !m_stringTable || !m_grid)
return;
wxXmlDocument doc;
// This is EMPTY_DOC
wxXmlNode * root = new wxXmlNode(wxXML_ELEMENT_NODE, XML_ROOT_NAME);
doc.SetRoot(root);
for (uint grow = 0; grow < m_stringTable->GetRowsCount(); grow++)
{
if (m_stringTable->GetValue(grow, 0).IsEmpty())
continue;
/*
* Don't use the other constructor :
* wxXmlNode(wxXmlNode *parent, wxXmlNodeType type ...
* The row order will be reversed each time.
* Explicitly add independent nodes to root.
*/
wxXmlNode * row = new wxXmlNode(wxXML_ELEMENT_NODE, XML_ROW_NAME);
wxXmlAttribute * attr = new wxXmlAttribute(XML_ATTR_TYPE, m_stringTable->GetValue(grow, 1));
row->AddAttribute(attr);
attr = new wxXmlAttribute(XML_ATTR_PREF, (m_stringTable->GetValue(grow, 2) == _T("0")
|| m_stringTable->GetValue(grow, 2).IsEmpty()) ? _T("0") : _T("1"));
row->AddAttribute(attr);
attr = new wxXmlAttribute(XML_ATTR_NOTES, m_stringTable->GetValue(grow, 3));
row->AddAttribute(attr);
new wxXmlNode(row, wxXML_TEXT_NODE, _T("irrelevant_name"), m_stringTable->GetValue(grow, 0));
root->AddChild(row);
}
wxString xmlData;
wxStringOutputStream sos(&xmlData);
bool res = doc.Save(sos);
if (!res)
{
wxASSERT_MSG(res, _T("Error dumping to XML"));
// Let's not empty m_value.
}
else
{
m_value = xmlData; // May be empty XML with XML_ROOT_NAME tag only
}
}

View File

@@ -0,0 +1,66 @@
/*
* File: XmlGridPickerCtrl.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 14, 2019, 3:28 PM
*/
#ifndef XMLGRIDPICKERCTRL_H
#define XMLGRIDPICKERCTRL_H
#include "BaseGridPicker.h"
#include <wx/xml/xml.h>
/**
* The grid content is stored in an XML document.
* @return
*/
class XmlGridPickerCtrl : public BaseGridPicker
{
DECLARE_CLASS(XmlGridPickerCtrl)
public:
XmlGridPickerCtrl(wxWindow *parent,
wxWindowID id,
const wxArrayString& types,
wxSize popupSize = wxDefaultSize,
const wxString& text = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxPB_USE_TEXTCTRL,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
virtual ~XmlGridPickerCtrl();
/**
* Creates a new grid deleting the previous one and fills it with the XML
* data.
* @param value
*/
virtual void SetValue(const wxString& value);
/**
* Dumps the grid content and returns it as an XML document. But returns
* empty string if XML document is empty.
* @return
*/
virtual wxString GetValue();
private:
/**
* Parses the XML document and fills the grid.
*/
virtual void FillGrid();
/**
* Translates the grid content to an XML document.
* If the Intent column is empty, this row is ignored.
*/
virtual void DumpGrid();
/**
* Is the XML document.
*/
wxString m_value;
};
#endif /* XMLGRIDPICKERCTRL_H */

75
L7/special/XmlHelper.cpp Normal file
View File

@@ -0,0 +1,75 @@
/*
* File: XmlHelper.cpp
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 15, 2019, 4:13 PM
*/
#include "XmlHelper.h"
#include <wx/sstream.h>
XmlHelper::XmlHelper()
{
}
XmlHelper::~XmlHelper()
{
}
// if doc is declared with local scope, root elements are empty in caller
wxXmlNode* XmlHelper::ValidateXmlValue(wxXmlDocument& doc, const wxString& value)
{
// Avoid 'XML parsing error' message box.
wxLogNull lognull;
wxStringInputStream sis(value);
bool res = doc.Load(sis);
if (!res)
{
wxASSERT_MSG(res == true, _T("Can't load XML data.\n") + value);
return NULL;
}
wxXmlNode * root = doc.GetRoot();
if (root->GetName() != XML_ROOT_NAME)
{
wxASSERT_MSG(root->GetName() != XML_ROOT_NAME, _T("Bad XML data.\n") + value);
return NULL;
}
// Check all rows and attributes
wxXmlNode * row = root->GetChildren();
while (row)
{
if (row->GetName() != XML_ROW_NAME
|| !row->HasAttribute(XML_ATTR_TYPE)
|| !row->HasAttribute(XML_ATTR_PREF)
|| !row->HasAttribute(XML_ATTR_NOTES)
|| row->GetNodeContent().IsEmpty())
{
wxASSERT_MSG(root->GetName() != XML_ROOT_NAME, _T("Unexpected XML data.\n") + value);
return NULL;
}
row = row->GetNext();
}
return root;
}
wxString XmlHelper::GetIntent(const wxString& xmlData)
{
if (xmlData.IsEmpty())
return wxEmptyString;
wxXmlDocument doc;
wxXmlNode * root = ValidateXmlValue(doc, xmlData);
if (root == NULL)
return wxEmptyString;
wxXmlNode * row = root->GetChildren();
while (row)
{
const wxString pref = row->GetAttribute(XML_ATTR_PREF);
if (!pref.IsEmpty() && pref != _T("0"))
return row->GetNodeContent();
row = row->GetNext();
}
return wxEmptyString;
}

54
L7/special/XmlHelper.h Normal file
View File

@@ -0,0 +1,54 @@
/*
* File: XmlHelper.h
* Author: SET - nmset@netcourrier.com
* License : LGPL version 2.1
* Copyright SET, M. D. - © 2014
*
* Created on December 15, 2019, 4:13 PM
*/
#ifndef XMLHELPER_H
#define XMLHELPER_H
#include <wx/wx.h>
#include <wx/xml/xml.h>
#define XML_ROOT_NAME _T("TABLE")
#define XML_ROW_NAME _T("ROW")
#define XML_ATTR_TYPE _T("Type")
#define XML_ATTR_PREF _T("Preferred")
#define XML_ATTR_NOTES _T("Notes")
#define EMPTY_DOC _T("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<TABLE/>")
/**
* Application helper to quickly get the Intent value.
* @param doc
* @param value
* @return
*/
class XmlHelper
{
public:
/**
* Parses value which is XML data and returns the XML root node, while
* loading the XML data in doc.
* If value does not have the expected tags defined above, returns NULL.
* @param doc
* @param value
* @return
*/
static wxXmlNode * ValidateXmlValue(wxXmlDocument& doc, const wxString& value);
/**
* Returns a valid Intent value or an empty string.
* @param xmlData
* @return
*/
static wxString GetIntent(const wxString& xmlData);
private:
XmlHelper();
virtual ~XmlHelper();
};
#endif /* XMLHELPER_H */