// Rename TableEditor to TableControl and move to eda/src/gui/controls
public class TableEditor : public Window
{
- bool initialized;
public:
property Table table
{
DebugLn("TableEditor::table|set");
table = value;
}
+ get { return table; }
}
- Table table;
property Table index
{
index = value;
filterRow.tbl = index;
}
+ get { return index; }
}
- Table index;
bool OnPostCreate()
{
//ResetListFields();
}
}
- Field idField;
- Field stringField;
- Field indexFilterField;
-
- ListBox list;
property Array<ListField> listFields
{
set
//ResetListFields();
}
}
- Array<ListField> listFields;
- int listSortOrder;
- DataField listSortField;
- bool disabledFullListing;
+ property int listSortOrder
+ {
+ set { listSortOrder = value; }
+ get { return listSortOrder; }
+ }
+ property DataField listSortField
+ {
+ set { listSortField = value; }
+ get { return listSortField; }
+ }
+ property bool disabledFullListing
+ {
+ set { disabledFullListing = value; }
+ get { return disabledFullListing; }
+ }
property Array<StringSearchField> searchFields
{
searchTables = value;
}
}
- Array<StringSearchTable> searchTables;
property Array<SQLiteSearchTable> sqliteSearchTables
{
sqliteSearchTables = value;
}
}
- Array<SQLiteSearchTable> sqliteSearchTables;
property String searchString
{
}
}
}
- String searchString;
-
- Map<Table, Lookup> lookups;
-
- Array<LookupEditor> dynamicLookupEditors;
property Array<LookupEditor> dynamicLookupEditors
{
set
// Fields Editor
property Id selectedId { get { return selectedId; } }
- Array<FieldBox> fieldsBoxes { };
- Array<TableEditor> tableEditors { };
- Array<TableEditor> dynamicLookupTableEditors { };
+ property Field idField
+ {
+ set { idField = value; }
+ get { return idField; }
+ }
+ property Field stringField
+ {
+ set { stringField = value; }
+ get { return stringField; }
+ }
+ property Field indexFilterField
+ {
+ set { indexFilterField = value; }
+ get { return indexFilterField; }
+ }
- bool readOnly;
-
- public virtual void OnInitialize();
- public virtual void OnLoad();
- public virtual void OnStateChanged();
- bool internalModifications;
- public void NotifyModifiedDocument()
+ property bool readOnly
+ {
+ set { readOnly = value; }
+ get { return readOnly; }
+ }
+
+ virtual void OnInitialize();
+ virtual void OnLoad();
+ virtual void OnStateChanged();
+
+ void NotifyModifiedDocument()
{
DebugLn("TableEditor::NotifyModifiedDocument");
if(!internalModifications)
OnStateChanged();
}
- //public virtual bool Window::NotifyNew(AltListSection listSection, Row r);
+ //virtual bool Window::NotifyNew(AltListSection listSection, Row r);
//virtual void Window::NotifyInitFields(AltEditSection editSection);
- public virtual DialogResult OnLeavingModifiedDocument()
+ virtual DialogResult OnLeavingModifiedDocument()
{
DebugLn("TableEditor::OnLeavingModifiedDocument");
return MessageBox { master = this, type = yesNoCancel, text = text && text[0] ? text : $"Table Editor",
}.Modal();
}
- public virtual bool OnRemovalRequest()
+ virtual bool OnRemovalRequest()
{
DebugLn("TableEditor::OnRemovalRequest");
return MessageBox { master = this, type = yesNo, text = text && text[0] ? text : $"Table Editor",
}.Modal() == yes;
}
- //public virtual void Window::NotifyDeleting(ListSection listSection);
- //public virtual void Window::NotifyDeleted(ListSection listSection);
+ //virtual void Window::NotifyDeleting(ListSection listSection);
+ //virtual void Window::NotifyDeleted(ListSection listSection);
- public bool NotifyClosing()
+ bool NotifyClosing()
{
bool result = true;
DebugLn("TableEditor::NotifyClosing");
return result;
}
- //public void List() // this gets called out of nowhere by some constructor thing...
- public void Enumerate()
+ //void List() // this gets called out of nowhere by some constructor thing...
+ void Enumerate()
{
DebugLn("TableEditor::Enumerate");
if(list)
}
}
- TableEditor masterEditor;
-
- public property TableEditor masterEditor
+ property TableEditor masterEditor
{
set
{
value.AddTableEditor(this);
}
}
+ get { return masterEditor; }
}
watch(parent)
}
private:
+ Table table;
+ Table index;
+ Field idField;
+ Field stringField;
+ Field indexFilterField;
+
+ ListBox list;
+ Array<StringSearchTable> searchTables;
+ Array<SQLiteSearchTable> sqliteSearchTables;
+ String searchString;
+
+ Map<Table, Lookup> lookups;
+
+ Array<LookupEditor> dynamicLookupEditors;
+ Array<FieldBox> fieldsBoxes { };
+ Array<TableEditor> tableEditors { };
+ Array<TableEditor> dynamicLookupTableEditors { };
+
+ bool readOnly;
+ bool internalModifications;
+ TableEditor masterEditor;
+
Row editRow { };
DataRow listRow;
DataRow lastRow;
Row filterRow { };
bool filtered;
Array<char> searchCI { };
+ WordEntry letters[26];
+ WordEntry doubleLetters[26][26];
+ bool initialized;
+ Array<ListField> listFields;
+ int listSortOrder;
+ DataField listSortField;
+ bool disabledFullListing;
ListEnumerationTimer listEnumerationTimer
{
FreeKey = BinaryTree::FreeString;
};
- WordEntry letters[26];
- WordEntry doubleLetters[26][26];
-
void AddWord(char * word, int count, bool addAllSubstrings, Id id)
{
//DebugLn("TableEditor::AddWord");