Class: CDK::CDKOBJS
- Inherits:
-
Object
- Object
- CDK::CDKOBJS
- Includes:
- Alignments, Bindings, Borders, Converters, ExitConditions, Focusable, HasScreen, HasTitle, Justifications, Movement, WindowHooks, WindowInput
- Defined in:
- lib/cdk/cdk_objs.rb
Direct Known Subclasses
ALPHALIST, BUTTON, BUTTONBOX, CALENDAR, DIALOG, ENTRY, FSELECT, GRAPH, HISTOGRAM, ITEMLIST, LABEL, MARQUEE, MATRIX, MENTRY, MENU, SCALE, SCROLLER, SLIDER, SWINDOW, TEMPLATE, VIEWER
Constant Summary collapse
- @@g_paste_buffer =
''
Instance Attribute Summary
Attributes included from HasTitle
Attributes included from HasScreen
#is_visible, #screen, #screen_index
Attributes included from ExitConditions
Attributes included from Bindings
Attributes included from Focusable
Attributes included from Borders
#BXAttr, #HZChar, #LLChar, #LRChar, #ULChar, #URChar, #VTChar, #border_size, #box
Instance Method Summary collapse
-
#initialize ⇒ CDKOBJS
constructor
A new instance of CDKOBJS.
- #object_type ⇒ Object
-
#setBackgroundColor(color) ⇒ Object
This sets the background color of the widget.
- #timeout(v) ⇒ Object
- #validCDKObject ⇒ Object
- #validObjType(type) ⇒ Object
Methods included from WindowHooks
#destroy, #draw, #erase, #refreshData, #saveData
Methods included from WindowInput
#getc, #getch, #inject, #setPostProcess, #setPreProcess
Methods included from HasTitle
#cleanTitle, #drawTitle, #init_title, #setTitle
Methods included from HasScreen
#SCREEN_XPOS, #SCREEN_YPOS, #init_screen, #wrefresh
Methods included from ExitConditions
#init_exit_conditions, #resetExitType, #setExitType
Methods included from Bindings
#bind, #bindableObject, #checkBind, #cleanBindings, #init_bindings, #isBind, #unbind
Methods included from Focusable
Methods included from Borders
#getBox, #init_borders, #setBXattr, #setBox, #setHZchar, #setLLchar, #setLRchar, #setULchar, #setURchar, #setVTchar
Methods included from Movement
#move, #move_specific, #position
Methods included from Converters
#char2Chtype, #charOf, #chtype2Char, #chtype2String, #decode_attribute, #encode_attribute
Methods included from Justifications
Methods included from Alignments
Constructor Details
#initialize ⇒ CDKOBJS
Returns a new instance of CDKOBJS.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/cdk/cdk_objs.rb', line 33 def initialize CDK::ALL_OBJECTS << self init_title init_borders init_focus init_bindings init_exit_conditions init_screen end |
Instance Method Details
#object_type ⇒ Object
52 53 54 55 |
# File 'lib/cdk/cdk_objs.rb', line 52 def object_type # no type by default :NULL end |
#setBackgroundColor(color) ⇒ Object
This sets the background color of the widget.
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/cdk/cdk_objs.rb', line 73 def setBackgroundColor(color) return if color.nil? || color == '' junk1 = [] junk2 = [] # Convert the value of the environment variable to a chtype holder = char2Chtype(color, junk1, junk2) # Set the widget's background color self.setBKattr(holder[0]) end |
#timeout(v) ⇒ Object
46 47 48 |
# File 'lib/cdk/cdk_objs.rb', line 46 def timeout(v) @input_window.timeout(v) if @input_window end |
#validCDKObject ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/cdk/cdk_objs.rb', line 62 def validCDKObject result = false if CDK::ALL_OBJECTS.include?(self) result = self.validObjType(self.object_type) end return result end |
#validObjType(type) ⇒ Object
57 58 59 60 |
# File 'lib/cdk/cdk_objs.rb', line 57 def validObjType(type) # dummy version for now true end |