Class: VRToolbar::VRToolbarButton

Inherits:
Object
  • Object
show all
Defined in:
lib/vr/contrib/toolbar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(i, toolbar) ⇒ VRToolbarButton

Returns a new instance of VRToolbarButton.



237
238
239
# File 'lib/vr/contrib/toolbar.rb', line 237

def initialize(i,toolbar)
  @index,@toolbar = i,toolbar
end

Instance Attribute Details

#etcObject (readonly)

Returns the value of attribute etc.



229
230
231
# File 'lib/vr/contrib/toolbar.rb', line 229

def etc
  @etc
end

#indexObject (readonly)

Returns the value of attribute index.



230
231
232
# File 'lib/vr/contrib/toolbar.rb', line 230

def index
  @index
end

#nameObject (readonly)

Returns the value of attribute name.



228
229
230
# File 'lib/vr/contrib/toolbar.rb', line 228

def name
  @name
end

#toolbarObject (readonly)

Returns the value of attribute toolbar.



231
232
233
# File 'lib/vr/contrib/toolbar.rb', line 231

def toolbar
  @toolbar
end

Instance Method Details

#_vr_cmdhandlersObject



233
234
235
# File 'lib/vr/contrib/toolbar.rb', line 233

def _vr_cmdhandlers
{0=>[["clicked",MSGTYPE::ARGNONE,nil]]}
end

#checked?Boolean

Returns:

  • (Boolean)


245
246
247
# File 'lib/vr/contrib/toolbar.rb', line 245

def checked?
  (state&1)==1
end

#stateObject



241
242
243
# File 'lib/vr/contrib/toolbar.rb', line 241

def state
  @toolbar.getButtonStateOf(@etc)
end