Sha256: 614aa5c46240af4031b579a4382fb6c6ceb5627c2b2f0df632d9bcaa84ae353e
Contents?: true
Size: 1.31 KB
Versions: 3
Compression:
Stored size: 1.31 KB
Contents
module Vedeu module Geometry # Allows the storing of interface/view geometry independent of the # interface instance. # class Repository < Vedeu::Repositories::Repository singleton_class.send(:alias_method, :geometries, :repository) null Vedeu::Geometry::Null real Vedeu::Geometry::Geometry end # Repository end # Geometry # Manipulate the repository of geometries. # # @example # Vedeu.geometries # # @!method geometries # @return [Vedeu::Geometry::Repository] def_delegators Vedeu::Geometry::Repository, :geometries # :nocov: # See {file:docs/events/view.md#\_maximise_} Vedeu.bind(:_maximise_) do |name| Vedeu.geometries.by_name(name).maximise end # See {file:docs/events/view.md#\_unmaximise_} Vedeu.bind(:_unmaximise_) do |name| Vedeu.geometries.by_name(name).unmaximise end %w(down left right up).each do |direction| Vedeu.bind(:"_view_#{direction}_") do |name| Vedeu.geometries.by_name(name).send("move_#{direction}") Vedeu.trigger(:_clear_) Vedeu.trigger(:_refresh_) Vedeu.trigger(:_clear_view_, name) Vedeu.trigger(:_refresh_view_, name) end end %w(down left right up).each do |direction| Vedeu.bind_alias(:"_geometry_#{direction}_", :"_view_#{direction}_") end # :nocov: end # Vedeu
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.6.33 | lib/vedeu/geometry/repository.rb |
vedeu-0.6.32 | lib/vedeu/geometry/repository.rb |
vedeu-0.6.31 | lib/vedeu/geometry/repository.rb |