Class: Microstation::OLE_CadInputMessage

Inherits:
Object
  • Object
show all
Includes:
WIN32OLE::VARIANT
Defined in:
lib/microstation/ole_cad_input_message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ole, app) ⇒ OLE_CadInputMessage

Returns a new instance of OLE_CadInputMessage.



14
15
16
17
# File 'lib/microstation/ole_cad_input_message.rb', line 14

def initialize(ole, app)
  @ole_obj = ole
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



12
13
14
# File 'lib/microstation/ole_cad_input_message.rb', line 12

def app
  @app
end

#lastargsObject (readonly)

Returns the value of attribute lastargs.



12
13
14
# File 'lib/microstation/ole_cad_input_message.rb', line 12

def lastargs
  @lastargs
end

#ole_objObject (readonly)

Returns the value of attribute ole_obj.



12
13
14
# File 'lib/microstation/ole_cad_input_message.rb', line 12

def ole_obj
  @ole_obj
end

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/microstation/ole_cad_input_message.rb', line 35

def any?
  input_type == InputType::ANY
end

#command?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/microstation/ole_cad_input_message.rb', line 23

def command?
  input_type == InputType::COMMAND
end

#data_point?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/microstation/ole_cad_input_message.rb', line 27

def data_point?
  input_type == InputType::DATA_POINT
end

#get_command_keyinObject

BSTR CommandKeyin



65
66
67
68
69
# File 'lib/microstation/ole_cad_input_message.rb', line 65

def get_command_keyin
  ret = ole_obj._getproperty(1_610_743_811, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#get_cursor_buttonObject

I4 CursorButton



86
87
88
89
90
# File 'lib/microstation/ole_cad_input_message.rb', line 86

def get_cursor_button
  ret = ole_obj._getproperty(1_610_743_814, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#get_input_typeObject

MsdCadInputType InputType



48
49
50
# File 'lib/microstation/ole_cad_input_message.rb', line 48

def get_input_type
  ole_obj.InputType
end

#get_keyinObject

BSTR Keyin



53
54
55
56
57
# File 'lib/microstation/ole_cad_input_message.rb', line 53

def get_keyin
  ret = ole_obj._getproperty(1_610_743_809, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#get_pointObject

Point3d Point



60
61
62
# File 'lib/microstation/ole_cad_input_message.rb', line 60

def get_point
  app.to_point3d(ole_obj.Point)
end

#get_screen_pointObject

Point3d ScreenPoint



79
80
81
82
83
# File 'lib/microstation/ole_cad_input_message.rb', line 79

def get_screen_point
  ret = ole_obj._getproperty(1_610_743_813, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#get_viewObject

_View View



72
73
74
75
76
# File 'lib/microstation/ole_cad_input_message.rb', line 72

def get_view
  ret = ole_obj._getproperty(1_610_743_812, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#input_typeObject



43
44
45
# File 'lib/microstation/ole_cad_input_message.rb', line 43

def input_type
  @input_type ||= get_input_type
end

#key_in?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/microstation/ole_cad_input_message.rb', line 31

def key_in?
  input_type == InputType::KEYIN
end

#reset?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/microstation/ole_cad_input_message.rb', line 19

def reset?
  input_type == InputType::Reset
end

#unassigned?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/microstation/ole_cad_input_message.rb', line 39

def unassigned?
  input_type == InputType::UNASSIGNED
end