Class: RETerm::Components::Histogram
- Inherits:
-
RETerm::Component
- Object
- RETerm::Component
- RETerm::Components::Histogram
- Includes:
- RETerm::CDKComponent
- Defined in:
- lib/reterm/components/histogram.rb
Overview
CDK Histogram Widget
Constant Summary
Constants included from LogHelpers
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from RETerm::Component
#activatable, #activate_focus, #highlight_focus, #window
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Histogram
constructor
Initialize the Histogram component.
- #requested_cols ⇒ Object
- #requested_rows ⇒ Object
Methods included from RETerm::CDKComponent
#activatable?, #activate!, #bind_key, #cdk?, #colors=, #component, #deactivate!, #draw!, #early_exit?, #erase, #escape_hit?, #init?, #init_cdk, #normal_exit?, #strip_formatting, #title_attrib=
Methods inherited from RETerm::Component
#activatable?, #activate!, #activate_focus?, #cdk?, #colored?, #colors=, #deactivate!, #deactivate?, #distance_from, #extra_padding, #finalize!, #highlight_focus?, #reactivate!, #resize, #sync!, #sync_getch
Methods included from KeyBindings
#bind_key, #invoke_key_bindings, #key_bindings, #key_bound?
Methods included from LogHelpers
Methods included from EventDispatcher
Constructor Details
#initialize(args = {}) ⇒ Histogram
Initialize the Histogram component
27 28 29 30 31 32 |
# File 'lib/reterm/components/histogram.rb', line 27 def initialize(args={}) super @title = args[:title] || "" @min = args[:min] || 0 @max = args[:max] || 10 end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/reterm/components/histogram.rb', line 7 def value @value end |
Instance Method Details
#requested_cols ⇒ Object
38 39 40 |
# File 'lib/reterm/components/histogram.rb', line 38 def requested_cols 50 end |
#requested_rows ⇒ Object
34 35 36 |
# File 'lib/reterm/components/histogram.rb', line 34 def requested_rows 4 end |