Module: CDK::Borders
- Included in:
- CDKOBJS
- Defined in:
- lib/cdk/mixins/borders.rb
Instance Attribute Summary collapse
-
#border_size ⇒ Object
readonly
Returns the value of attribute border_size.
-
#box ⇒ Object
Returns the value of attribute box.
-
#BXAttr ⇒ Object
Returns the value of attribute BXAttr.
-
#HZChar ⇒ Object
Returns the value of attribute HZChar.
-
#LLChar ⇒ Object
Returns the value of attribute LLChar.
-
#LRChar ⇒ Object
Returns the value of attribute LRChar.
-
#ULChar ⇒ Object
Returns the value of attribute ULChar.
-
#URChar ⇒ Object
Returns the value of attribute URChar.
-
#VTChar ⇒ Object
Returns the value of attribute VTChar.
Instance Method Summary collapse
- #getBox ⇒ Object
- #init_borders ⇒ Object
- #setBox(box) ⇒ Object
-
#setBXattr(ch) ⇒ Object
Set the object’s box-attributes.
-
#setHZchar(ch) ⇒ Object
Set the object’s horizontal line-drawing character.
-
#setLLchar(ch) ⇒ Object
Set the object’s lower-left-corner line-drawing character.
-
#setLRchar(ch) ⇒ Object
Set the object’s upper-right-corner line-drawing character.
-
#setULchar(ch) ⇒ Object
Set the object’s upper-left-corner line-drawing character.
-
#setURchar(ch) ⇒ Object
Set the object’s upper-right-corner line-drawing character.
-
#setVTchar(ch) ⇒ Object
Set the object’s vertical line-drawing character.
Instance Attribute Details
#border_size ⇒ Object (readonly)
Returns the value of attribute border_size.
5 6 7 |
# File 'lib/cdk/mixins/borders.rb', line 5 def border_size @border_size end |
#box ⇒ Object
Returns the value of attribute box.
3 4 5 |
# File 'lib/cdk/mixins/borders.rb', line 3 def box @box end |
#BXAttr ⇒ Object
Returns the value of attribute BXAttr.
4 5 6 |
# File 'lib/cdk/mixins/borders.rb', line 4 def BXAttr @BXAttr end |
#HZChar ⇒ Object
Returns the value of attribute HZChar.
4 5 6 |
# File 'lib/cdk/mixins/borders.rb', line 4 def HZChar @HZChar end |
#LLChar ⇒ Object
Returns the value of attribute LLChar.
4 5 6 |
# File 'lib/cdk/mixins/borders.rb', line 4 def LLChar @LLChar end |
#LRChar ⇒ Object
Returns the value of attribute LRChar.
4 5 6 |
# File 'lib/cdk/mixins/borders.rb', line 4 def LRChar @LRChar end |
#ULChar ⇒ Object
Returns the value of attribute ULChar.
4 5 6 |
# File 'lib/cdk/mixins/borders.rb', line 4 def ULChar @ULChar end |
#URChar ⇒ Object
Returns the value of attribute URChar.
4 5 6 |
# File 'lib/cdk/mixins/borders.rb', line 4 def URChar @URChar end |
#VTChar ⇒ Object
Returns the value of attribute VTChar.
4 5 6 |
# File 'lib/cdk/mixins/borders.rb', line 4 def VTChar @VTChar end |
Instance Method Details
#getBox ⇒ Object
23 24 25 |
# File 'lib/cdk/mixins/borders.rb', line 23 def getBox return @box end |
#init_borders ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cdk/mixins/borders.rb', line 7 def init_borders # set default line-drawing characters @ULChar = Ncurses::ACS_ULCORNER @URChar = Ncurses::ACS_URCORNER @LLChar = Ncurses::ACS_LLCORNER @LRChar = Ncurses::ACS_LRCORNER @HZChar = Ncurses::ACS_HLINE @VTChar = Ncurses::ACS_VLINE @BXAttr = Ncurses::A_NORMAL end |
#setBox(box) ⇒ Object
18 19 20 21 |
# File 'lib/cdk/mixins/borders.rb', line 18 def setBox(box) @box = box @border_size = if @box then 1 else 0 end end |
#setBXattr(ch) ⇒ Object
Set the object’s box-attributes.
58 59 60 |
# File 'lib/cdk/mixins/borders.rb', line 58 def setBXattr(ch) @BXAttr = ch end |
#setHZchar(ch) ⇒ Object
Set the object’s horizontal line-drawing character
48 49 50 |
# File 'lib/cdk/mixins/borders.rb', line 48 def setHZchar(ch) @HZChar = ch end |
#setLLchar(ch) ⇒ Object
Set the object’s lower-left-corner line-drawing character.
38 39 40 |
# File 'lib/cdk/mixins/borders.rb', line 38 def setLLchar(ch) @LLChar = ch end |
#setLRchar(ch) ⇒ Object
Set the object’s upper-right-corner line-drawing character.
43 44 45 |
# File 'lib/cdk/mixins/borders.rb', line 43 def setLRchar(ch) @LRChar = ch end |
#setULchar(ch) ⇒ Object
Set the object’s upper-left-corner line-drawing character.
28 29 30 |
# File 'lib/cdk/mixins/borders.rb', line 28 def setULchar(ch) @ULChar = ch end |
#setURchar(ch) ⇒ Object
Set the object’s upper-right-corner line-drawing character.
33 34 35 |
# File 'lib/cdk/mixins/borders.rb', line 33 def setURchar(ch) @URChar = ch end |
#setVTchar(ch) ⇒ Object
Set the object’s vertical line-drawing character
53 54 55 |
# File 'lib/cdk/mixins/borders.rb', line 53 def setVTchar(ch) @VTChar = ch end |