From 0d7325311151e11b78f42984f273b69407ecf928 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 19 Feb 2017 15:47:01 +0100 Subject: [PATCH] Support proportions for wxFlexGridSizer growables in XRC schema The value of "growablerows" and "growablecols" elements is not just a list of numbers, but a list of numbers with optional weights, specified after a colon. Update the XRC schema to account for the weights too. Closes #17802. --- misc/schema/xrc_schema.rnc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/misc/schema/xrc_schema.rnc b/misc/schema/xrc_schema.rnc index b290ec057a..c890724b9f 100644 --- a/misc/schema/xrc_schema.rnc +++ b/misc/schema/xrc_schema.rnc @@ -478,6 +478,8 @@ t_imagelist = ( t_list_of_numbers = xsd:string { pattern = "\d+(,\d+)*" } +t_list_of_numbers_with_weights = xsd:string { pattern = "\d+(:\d+)?(,\d+(:\d+)?)*" } + # # Handlers for non- content: @@ -1899,8 +1901,8 @@ wxFlexGridSizer = [xrc:p="o"] element nonflexiblegrowmode {_, ("wxFLEX_GROWMODE_NONE" | "wxFLEX_GROWMODE_SPECIFIED" | "wxFLEX_GROWMODE_ALL") }* & - [xrc:p="o"] element growablerows {_, t_list_of_numbers }* & - [xrc:p="o"] element growablecols {_, t_list_of_numbers }* & + [xrc:p="o"] element growablerows {_, t_list_of_numbers_with_weights }* & + [xrc:p="o"] element growablecols {_, t_list_of_numbers_with_weights }* & (wxGridSizer_item | objectRef)* } @@ -1915,8 +1917,8 @@ wxGridBagSizer = [xrc:p="o"] element nonflexiblegrowmode {_, ("wxFLEX_GROWMODE_NONE" | "wxFLEX_GROWMODE_SPECIFIED" | "wxFLEX_GROWMODE_ALL") }* & - [xrc:p="o"] element growablerows {_, t_list_of_numbers }* & - [xrc:p="o"] element growablecols {_, t_list_of_numbers }* & + [xrc:p="o"] element growablerows {_, t_list_of_numbers_with_weights }* & + [xrc:p="o"] element growablecols {_, t_list_of_numbers_with_weights }* & (wxSizerGB_item | objectRef)* }