# Extract the property name, type
property = $propertyStruct.new;
+ #First strip out any comments at the end of the macro, some have text like // deprecated
+ commentIndex = propertyMacro.index("//");
+
+ if( commentIndex )
+ propertyMacro = propertyMacro.slice(0..commentIndex-1)
+ end
+
+
# Split the macro definition by comma and quotes, close bracket and delete any empty segments
data = propertyMacro.split(/[\s,")]/).reject { |s| s.empty? }
property.type = data[4]
end
+ # last item should be property enum, e.g. INPUT_POINT_SIZE
property.enum = data[data.length-1]
end
next
end
+ #exception case <<<
+ #Tooltip gives swig build error
+ if( property.name == "Tooltip" )
+ next
+ end
+ #exception case >>>
+
$totalProperties+=1 # keep track of total
propertyType = propertyInfo[1] # e.g. bool or int
hasChildProperties = true
end
- property.csharpGetter =" public #{propertyType} #{property.name} \n"\
- " { \n"\
- " get \n" \
+ property.csharpGetter =" public #{propertyType} #{property.name}\n"\
+ " {\n"\
+ " get\n" \
" {\n"\
" #{tempDeclaration}\n"\
" GetProperty( #{propertyName}).Get( #{propertyArg} temp );\n"\
if property.writable
#text.SetProperty(TextLabel.Property.HORIZONTAL_ALIGNMENT, new Property.Value("CENTER"));
- property.csharpSetter = " set \n" \
- " { \n"\
+ property.csharpSetter = " set\n" \
+ " {\n"\
" SetProperty( #{propertyName}, new Dali.Property.Value( value ) );\n" \
" }\n"\
" }\n"
else
property.csharpSetter = "}" # close the opening property declaration
end
+
+ #exception case <<<
+ if( property.name == "Behavior" )
+ property.csharpGetter =" public Layer.LayerBehavior #{property.name} \n"\
+ " { \n"\
+ " get \n" \
+ " {\n"\
+ " return GetBehavior();\n"\
+ " }\n"
+
+ property.csharpSetter = " set \n" \
+ " { \n"\
+ " SetBehavior( value );\n" \
+ " }\n"\
+ " }\n"
+ end
+ #exception case >>>
end
# write normal properties to the class's own csharp file
writePropertiesToCSharpFile( daliClass )