8#include <wx/listctrl.h>
9#include <wx/notebook.h>
10#include <wx/scrolwin.h>
11#include <wx/spinctrl.h>
28 HelpDialog(wxWindow *parent,
const wxString &title,
const wxString &content)
29 : wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxSize(700, 600)) {
30 wxBoxSizer *mainSizer =
new wxBoxSizer(wxVERTICAL);
33 wxTextCtrl *textCtrl =
new wxTextCtrl(
this, wxID_ANY,
35 wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY);
38 textCtrl->SetBackgroundColour(wxColour(50, 50, 50));
39 textCtrl->SetForegroundColour(wxColour(255, 255, 255));
41 mainSizer->Add(textCtrl, 1, wxEXPAND | wxALL, 10);
44 wxButton *okBtn =
new wxButton(
this, wxID_OK,
"OK");
45 mainSizer->Add(okBtn, 0, wxALIGN_CENTER | wxALL, 10);
91 void OnSave(wxCommandEvent &event);
92 void OnSaveAs(wxCommandEvent &event);
93 void OnCancel(wxCommandEvent &event);
114 void LoadProfileData(std::shared_ptr<EmberCore::ParserProfile> profile);
233 wxColour
InterpolateColor(
const wxColour &color1,
const wxColour &color2,
float t);
Manages parser configuration profiles.
Configuration for XML parser behavior and element/attribute mappings.
NamingConvention
Naming convention strictness.
A named parser configuration profile with metadata.
DPI-aware dialog base class for scalable layouts.
HelpDialog(wxWindow *parent, const wxString &title, const wxString &content)
void OnSaveAs(wxCommandEvent &event)
wxCheckBox * m_allowUndefinedKeys
wxCheckBox * m_allowCustomAttrs
void OnAddControlType(wxCommandEvent &event)
wxTextCtrl * m_genericNodeElement
wxTextCtrl * m_mainTreeAttr
wxTextCtrl * m_blackboardParentAttr
wxButton * m_cloneProfileBtn
wxPanel * CreateNodeClassificationTab(wxNotebook *notebook)
void OnRemoveConditionType(wxCommandEvent &event)
wxTextCtrl * m_entryValueAttr
void SetUIFromConfig(const EmberCore::ParserConfig &config)
wxTextCtrl * m_subtreeRefAttr
wxChoice * m_classificationStrategy
wxButton * m_addControlTypeBtn
wxCheckBox * m_enableProgressReporting
wxTextCtrl * m_conditionElement
wxPanel * CreateNodeElementsTab(wxNotebook *notebook)
void OnRemoveActionType(wxCommandEvent &event)
wxTextCtrl * m_decoratorElement
void OnNewProfile(wxCommandEvent &event)
wxButton * m_addDecoratorTypeBtn
wxTextCtrl * m_blackboardElement
wxListBox * m_decoratorTypesList
void OnFieldChanged(wxCommandEvent &event)
wxTextCtrl * m_actionElement
wxCheckBox * m_caseSensitive
void SaveCurrentProfile()
void OnSetActiveProfile(wxCommandEvent &event)
wxTextCtrl * m_profileDescription
void OnAddActionType(wxCommandEvent &event)
wxTextCtrl * m_nodeNameAttr
wxCheckBox * m_preserveComments
wxPanel * CreateDocumentStructureTab(wxNotebook *notebook)
wxButton * m_resetDefaultsBtn
wxCheckBox * m_trackLineColumn
wxButton * m_removeActionTypeBtn
void OnExportProfile(wxCommandEvent &event)
wxString GetSelectedProfileName() const
wxTextCtrl * m_rootElement
wxCheckBox * m_namingConventionLoose
wxButton * m_testValidateBtn
wxCheckBox * m_requireRootNode
wxListBox * m_conditionTypesList
wxTextCtrl * m_controlElement
void OnCloneProfile(wxCommandEvent &event)
wxButton * m_removeControlTypeBtn
wxButton * m_removeConditionTypeBtn
wxCheckBox * m_namingConventionStrict
void OnAnyControlChanged(wxCommandEvent &event)
wxChoice * m_unknownBehavior
wxTextCtrl * m_entryElement
void OnDeleteProfile(wxCommandEvent &event)
wxButton * m_newProfileBtn
wxCheckBox * m_validateStructure
wxListBox * m_controlTypesList
wxCheckBox * m_allowMultipleTrees
wxTextCtrl * m_blackboardIdAttr
wxButton * m_removeMappingBtn
wxCheckBox * m_allowUnknownElements
void OnToggleCustomValidation(wxCommandEvent &event)
bool HasInvalidCharacters(wxTextCtrl *field)
void OnPreviewJSON(wxCommandEvent &event)
wxChoice * m_subtreeExpansion
wxGrid * m_typeMappingsGrid
void OnPulseTimer(wxTimerEvent &event)
wxTextCtrl * m_behaviorTreeElement
void OnCancel(wxCommandEvent &event)
void EnableProfileControls(bool enable)
bool IsValidXMLName(const wxString &name)
wxChoice * m_whitespaceHandling
wxButton * m_setActiveBtn
@ ID_TOGGLE_CUSTOM_VALIDATION
@ ID_REMOVE_CONDITION_TYPE
@ ID_REMOVE_DECORATOR_TYPE
void OnRemoveTypeMapping(wxCommandEvent &event)
wxButton * m_removeDecoratorTypeBtn
wxTextCtrl * m_entryKeyAttr
ParserConfigDialog(wxWindow *parent)
wxListCtrl * m_profileList
wxPanel * CreateBlackboardTab(wxNotebook *notebook)
wxButton * m_deleteProfileBtn
void OnAddTypeMapping(wxCommandEvent &event)
wxTextCtrl * m_typeAttrName
wxTextCtrl * m_nodeIdAttr
wxTextCtrl * m_xmlNamespace
wxButton * m_importProfileBtn
wxButton * m_addConditionTypeBtn
std::shared_ptr< EmberCore::ParserProfile > m_currentProfile
wxCheckBox * m_enableCustomValidation
wxCheckBox * m_preserveAttrOrder
wxListBox * m_actionTypesList
void OnAddConditionType(wxCommandEvent &event)
void SaveCurrentProfileIfModified()
bool IsFieldEmpty(wxTextCtrl *field)
void OnRemoveControlType(wxCommandEvent &event)
wxButton * m_addMappingBtn
void OnTestValidate(wxCommandEvent &event)
wxButton * m_exportProfileBtn
EmberCore::ParserConfig::NamingConvention GetCurrentNamingConvention() const
void OnAddDecoratorType(wxCommandEvent &event)
wxPanel * CreateLeftSidebar(wxWindow *parent)
wxTextCtrl * m_treeIdAttr
wxTextCtrl * m_subtreeElement
bool ValidateCurrentConfig(wxString &errorMsg)
wxTextCtrl * m_customValidation
wxCheckBox * m_namingConventionBalanced
void OnImportProfile(wxCommandEvent &event)
wxPanel * CreateTreeElementsTab(wxNotebook *notebook)
wxPanel * CreateBottomPanel(wxWindow *parent)
void OnNamingConventionChanged(wxCommandEvent &event)
void OnResetDefaults(wxCommandEvent &event)
wxSpinCtrl * m_maxRecursionDepth
wxColour InterpolateColor(const wxColour &color1, const wxColour &color2, float t)
wxTextCtrl * m_profileName
wxTextCtrl * m_entryTypeAttr
void OnRemoveDecoratorType(wxCommandEvent &event)
void LoadProfileData(std::shared_ptr< EmberCore::ParserProfile > profile)
void OnSave(wxCommandEvent &event)
wxPanel * CreateAdvancedTab(wxNotebook *notebook)
wxCheckBox * m_detailedErrors
void OnProfileSelected(wxListEvent &event)
wxButton * m_previewJSONBtn
wxButton * m_addActionTypeBtn
std::shared_ptr< EmberCore::ParserConfig > GetConfigFromUI()
wxPanel * CreateRightPanel(wxWindow *parent)
wxTextCtrl * m_nodeTypeAttr
Main types header for EmberCore.