From 65715453e70ec2050dd0d4524aad612bcb6e80ea Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Nov 2023 21:10:46 +0100 Subject: [PATCH] Add minimal support for wxPropertyGrid to the XRC schema This is too lax and might also not cover everything but it better than nothing. --- misc/schema/xrc_schema.rnc | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/misc/schema/xrc_schema.rnc b/misc/schema/xrc_schema.rnc index e48d707586..49be3927e0 100644 --- a/misc/schema/xrc_schema.rnc +++ b/misc/schema/xrc_schema.rnc @@ -202,6 +202,8 @@ builtinWindowClasses = | wxNotebook | wxOwnerDrawnComboBox | wxPanel + | wxPropertyGrid + | wxPropertyGridManager | wxPropertySheetDialog | wxRadioButton | wxRadioBox @@ -305,6 +307,8 @@ builtinClassesNames = | "wxNotebook" | "wxOwnerDrawnComboBox" | "wxPanel" + | "wxPropertyGrid" + | "wxPropertyGridManager" | "wxPropertySheetDialog" | "wxRadioButton" | "wxRadioBox" @@ -1276,6 +1280,62 @@ wxPanel = } +wxPropertyGrid = + element object { + attribute class { "wxPropertyGrid" } & + stdObjectNodeAttributes & + stdWindowProperties & + [xrc:p="o"] element virtualwidth {_, t_integer }* & + (wxPropertyGridProperty | objectRef)* + } + +wxPropertyGridManager = + element object { + attribute class { "wxPropertyGridManager" } & + stdObjectNodeAttributes & + stdWindowProperties & + [xrc:p="o"] element virtualwidth {_, t_integer }* & + (wxPropertyGridPage | objectRef)* + } + +wxPropertyGridPage = + element page { + [xrc:p="o"] element label {_, t_text }* & + [xrc:p="o"] element columns {_, t_integer}* & + [xrc:p="o"] element splitterpos { + attribute index { t_integer }* & + # Too lax: it should be t_integer with optional "%", not text. + t_text + }* & + [xrc:p="o"] element choices { + attribute id { t_identifier } & + t_text + }* & + (wxPropertyGridProperty | objectRef)* + } + +wxPropertyGridProperty = + element property { + attribute class { t_identifier } & + [xrc:p="o"] element label {_, t_text }* & + [xrc:p="o"] element value {_, t_text }* & + [xrc:p="o"] element attribute{ + attribute name { t_identifier } & + t_text + }* & + # Too lax: choices should either have an id attribute or start with "@" + # referencing an ID defined elsewhere. + [xrc:p="o"] element choices { + attribute id { t_identifier }* & + t_text + }* & + [xrc:p="o"] element tip {_, t_text }* & + [xrc:p="o"] element expanded {_, t_bool }* & + [xrc:p="o"] element flags {_, t_text }* & + (wxPropertyGridProperty | objectRef)* + } + + wxPropertySheetDialog = element object { attribute class { "wxPropertySheetDialog" } &