- node = node->Next();
- }
-
- // Reset 'modified' flags for all property values
- propSheet->SetAllModified(FALSE);
-
- wxResourcePropertyListView *view = new wxResourcePropertyListView(this, NULL,
- wxPROP_BUTTON_OK | // wxPROP_BUTTON_CANCEL |
- wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES);
-
- wxDialogEditorPropertyListFrame *propWin = new wxDialogEditorPropertyListFrame(view,
- wxResourceManager::GetCurrentResourceManager()->GetEditorFrame(), title, wxPoint(x, y),
- wxSize(width, height), wxDEFAULT_FRAME_STYLE);
- sm_propertyWindow = propWin;
-
- propWin->m_registry.RegisterValidator(wxString("real"), new wxRealListValidator);
- propWin->m_registry.RegisterValidator(wxString("string"), new wxStringListValidator);
- propWin->m_registry.RegisterValidator(wxString("integer"), new wxIntegerListValidator);
- propWin->m_registry.RegisterValidator(wxString("bool"), new wxBoolListValidator);
- propWin->m_registry.RegisterValidator(wxString("filename"), new wxFilenameListValidator);
- propWin->m_registry.RegisterValidator(wxString("stringlist"), new wxListOfStringsListValidator);
- propWin->m_registry.RegisterValidator(wxString("window_id"), new wxResourceSymbolValidator);
-
- propWin->m_propInfo = this;
- propWin->m_propSheet = propSheet;
-
-// view->m_propertyWindow = propWin;
- view->AddRegistry(&(propWin->m_registry));
-
- propWin->Initialize();
- view->ShowView(propSheet, propWin->GetPropertyPanel());
-
- propWin->Show(TRUE);
-
- // Otherwise doesn't show itself
+
+ int width = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().width;
+ int height = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().height;
+ int x = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().x;
+ int y = wxResourceManager::GetCurrentResourceManager()->GetPropertyWindowSize().y;
+
+ wxPropertySheet *propSheet = new wxPropertySheet;
+
+ wxStringList propNames;
+ GetPropertyNames(propNames);
+
+ wxNode *node = propNames.First();
+ while (node)
+ {
+ wxString name((char *)node->Data());
+ wxProperty *prop = GetProperty(name);
+ if (prop)
+ {
+ propSheet->AddProperty(prop);
+ }
+ node = node->Next();
+ }
+
+ // Reset 'modified' flags for all property values
+ propSheet->SetAllModified(FALSE);
+
+ wxResourcePropertyListView *view = new wxResourcePropertyListView(this, NULL,
+ wxPROP_BUTTON_OK | // wxPROP_BUTTON_CANCEL |
+ wxPROP_BUTTON_CHECK_CROSS|wxPROP_DYNAMIC_VALUE_FIELD|wxPROP_PULLDOWN|wxPROP_SHOWVALUES);
+
+ wxDialogEditorPropertyListFrame *propWin = new wxDialogEditorPropertyListFrame(view,
+ wxResourceManager::GetCurrentResourceManager()->GetEditorFrame(), title, wxPoint(x, y),
+ wxSize(width, height), wxDEFAULT_FRAME_STYLE);
+ sm_propertyWindow = propWin;
+
+ propWin->m_registry.RegisterValidator(wxString("real"), new wxRealListValidator);
+ propWin->m_registry.RegisterValidator(wxString("string"), new wxStringListValidator);
+ propWin->m_registry.RegisterValidator(wxString("integer"), new wxIntegerListValidator);
+ propWin->m_registry.RegisterValidator(wxString("bool"), new wxBoolListValidator);
+ propWin->m_registry.RegisterValidator(wxString("filename"), new wxFilenameListValidator);
+ propWin->m_registry.RegisterValidator(wxString("stringlist"), new wxListOfStringsListValidator);
+ propWin->m_registry.RegisterValidator(wxString("window_id"), new wxResourceSymbolValidator);
+
+ propWin->m_propInfo = this;
+ propWin->m_propSheet = propSheet;
+
+ // view->m_propertyWindow = propWin;
+ view->AddRegistry(&(propWin->m_registry));
+
+ propWin->Initialize();
+ view->ShowView(propSheet, propWin->GetPropertyPanel());
+
+ propWin->Show(TRUE);
+
+ // Otherwise doesn't show itself