Module: CDK::Borders

Included in:
CDKOBJS
Defined in:
lib/cdk/mixins/borders.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#border_sizeObject (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

#boxObject

Returns the value of attribute box.



3
4
5
# File 'lib/cdk/mixins/borders.rb', line 3

def box
  @box
end

#BXAttrObject

Returns the value of attribute BXAttr.



4
5
6
# File 'lib/cdk/mixins/borders.rb', line 4

def BXAttr
  @BXAttr
end

#HZCharObject

Returns the value of attribute HZChar.



4
5
6
# File 'lib/cdk/mixins/borders.rb', line 4

def HZChar
  @HZChar
end

#LLCharObject

Returns the value of attribute LLChar.



4
5
6
# File 'lib/cdk/mixins/borders.rb', line 4

def LLChar
  @LLChar
end

#LRCharObject

Returns the value of attribute LRChar.



4
5
6
# File 'lib/cdk/mixins/borders.rb', line 4

def LRChar
  @LRChar
end

#ULCharObject

Returns the value of attribute ULChar.



4
5
6
# File 'lib/cdk/mixins/borders.rb', line 4

def ULChar
  @ULChar
end

#URCharObject

Returns the value of attribute URChar.



4
5
6
# File 'lib/cdk/mixins/borders.rb', line 4

def URChar
  @URChar
end

#VTCharObject

Returns the value of attribute VTChar.



4
5
6
# File 'lib/cdk/mixins/borders.rb', line 4

def VTChar
  @VTChar
end

Instance Method Details

#getBoxObject



23
24
25
# File 'lib/cdk/mixins/borders.rb', line 23

def getBox
  return @box
end

#init_bordersObject



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