Module: Shoes::Constants
- Included in:
- Kernel
- Defined in:
- lacci/lib/shoes/constants.rb
Constant Summary collapse
- LIB_DIR =
A temp dir for Shoes app files
find_lib_dir
- DIR =
the Shoes library dir
File.dirname(__FILE__, 4)
- RAD2PI =
Math constants from Shoes3
0.01745329251994329577
- TWO_PI =
6.28318530717958647693
- HALF_PI =
1.57079632679489661923
- PI =
3.14159265358979323846
- FONTS =
Fonts currently loaded and available
[]
- FEATURES =
Standard features available in this display service - see KNOWN_FEATURES. These may or may not require the Shoes.app requesting them per-app.
[]
- EXTENSIONS =
Nonstandard extensions, e.g. Scarpe extensions, supported by this display lib. An application may have to request the extensions for them to be available so that a casual reader can see Shoes.app(features: :scarpe) and realize why there are nonstandard styles or drawables.
[]
- KNOWN_FEATURES =
These are all known features supported by this version of Lacci. Features on this list are allowed to be in FEATURES. Anything else goes in EXTENSIONS and is nonstandard.
[ :html, # Supports .to_html on display objects, HTML classes on drawables, etc. :multi_app, # Supports multiple applications at once ].freeze
Class Method Summary collapse
Class Method Details
.find_lib_dir ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lacci/lib/shoes/constants.rb', line 6 def self.find_lib_dir begin require "tmpdir" rescue LoadError return nil end homes = [ [ENV["LOCALAPPDATA"], "Shoes"], [ENV["APPDATA"], "Shoes"], [ENV["HOME"], ".shoes"], ] top, file = homes.detect { |home_top, _| home_top && File.exist?(home_top) } return nil if top.nil? File.join(top, file) end |