Class: YogaLayout::Config
Overview
Config changes the way the Yoga layout system works.
Yoga has the concept of experiments. An experiment is a feature which is not yet stable. To enable a feature use the #set_experimental_feature_enabled method. Once a feature has been tested and is ready to be released as a stable API we will remove its feature flag.
Instance Attribute Summary
Attributes inherited from Wrapper
Class Method Summary collapse
-
.default ⇒ Object
Use this to adjust the default settings.
- .unsafe_free_pointer(pointer) ⇒ Object private
- .unsafe_new_pointer ⇒ Object private
Instance Method Summary collapse
-
#new_node ⇒ YogaLayout::Node
Convinience method to create new nodes with this config.
Methods inherited from Wrapper
#==, auto_ptr, #initialize, #inspect, map_method
Constructor Details
This class inherits a constructor from YogaLayout::Wrapper
Class Method Details
.default ⇒ Object
Use this to adjust the default settings.
33 34 35 36 |
# File 'lib/yoga_layout/config.rb', line 33 def self.default # Not using auto_ptr, because you can't deallocate the default config @default ||= new(YogaLayout::Bindings.YGConfigGetDefault) end |
.unsafe_free_pointer(pointer) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/yoga_layout/config.rb', line 28 def self.unsafe_free_pointer(pointer) YogaLayout::Bindings.YGConfigFree(pointer) end |
.unsafe_new_pointer ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/yoga_layout/config.rb', line 22 def self.unsafe_new_pointer YogaLayout::Bindings.YGConfigNew end |
Instance Method Details
#new_node ⇒ YogaLayout::Node
Convinience method to create new nodes with this config.
41 42 43 |
# File 'lib/yoga_layout/config.rb', line 41 def new_node YogaLayout::Node.new_with_config(self) end |