Class: Cliptic::Interface::Top_Bar
- Inherits:
-
Windows::Bar
- Object
- Curses::Window
- Windows::Window
- Windows::Bar
- Cliptic::Interface::Top_Bar
- Defined in:
- lib/cliptic/interface.rb
Direct Known Subclasses
Constant Summary
Constants included from Chars
Chars::Block, Chars::HL, Chars::LL, Chars::LS, Chars::LU, Chars::MS, Chars::Nums, Chars::RL, Chars::RS, Chars::RU, Chars::TD, Chars::TL, Chars::TR, Chars::TU, Chars::Tick, Chars::VL, Chars::XX
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
Attributes inherited from Windows::Bar
Attributes inherited from Windows::Window
#centered_x, #centered_y, #col, #line, #x, #y
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(date: Date.today) ⇒ Top_Bar
constructor
A new instance of Top_Bar.
- #reset_pos ⇒ Object
- #title ⇒ Object
Methods inherited from Windows::Bar
Methods inherited from Windows::Window
#add_str, #bold, #clear, #color, #move, #refresh, #reset_attrs, #setpos, #standend, #standout, #time_str, #wrap_str
Methods included from Chars
Constructor Details
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
4 5 6 |
# File 'lib/cliptic/interface.rb', line 4 def date @date end |
Instance Method Details
#draw ⇒ Object
9 10 11 12 13 |
# File 'lib/cliptic/interface.rb', line 9 def draw super add_str(x:1, str:title, bold:true) add_str(x:title.length+2, str:date.to_long) end |
#reset_pos ⇒ Object
17 18 19 |
# File 'lib/cliptic/interface.rb', line 17 def reset_pos move(line:0, col:0) end |
#title ⇒ Object
14 15 16 |
# File 'lib/cliptic/interface.rb', line 14 def title "cliptic:" end |