Class: VRButton

Inherits:
VRStdControl show all
Defined in:
lib/vr/vrcontrol.rb

Overview

Standard Controls

Minimum definition for a Standard Control is

class VRSampleControl <VRStdControl WINCLASSINFO = ["ControlClass",additionalStyle,exStyle] def vrinit() super addCommandHandler(message,eventname,type,argparsestr]) end end

message -> [eventname, argtype, unpackstr] WMsg::BN_CLICKED=>["clicked",MSGTYPE::ARGNONE,nil], WMsg::LBN_SELCHANGE=>["selchange",MSGTYPE::ARGNONE,nil] } ############################################################

Direct Known Subclasses

VRCheckbox, VROwnerDrawButton

Constant Summary collapse

WINCLASSINFO =

VRButton

Button. Button's caption can be set/got by caption/caption= method of SWin::Window.

Event handlers

Buttons invoke the following method of parent window. --- ????_clicked This parent's method is fired when button is pushed. --- ????_dblclicked This parent's method is fired when button is double clicked.

["BUTTON",WStyle::BS_PUSHBUTTON]

Instance Attribute Summary

Attributes inherited from VRControl

#handlers, #name, #parent

Attributes inherited from VRWinComponent

#parent, #screen

Instance Method Summary collapse

Methods inherited from VRStdControl

#_vr_cmdhandlers, #addCommandHandler, #deleteCommandHandler

Methods inherited from VRControl

Controltype, #add_parentcall, #call_parenthandler, #create, #setFont

Methods inherited from VRWinComponent

#_init, #create, #exwinstyle, #hide, #maximizebox, #maximizebox=, #minimizebox, #minimizebox=, #setscreen, #sizebox, #sizebox=, #tabstop, #tabstop=, #winstyle

Instance Method Details

#vrinit ⇒ Object



239
240
241
242
243
# File 'lib/vr/vrcontrol.rb', line 239

def vrinit
  super
  addCommandHandler(WMsg::BN_CLICKED,    "clicked",   MSGTYPE::ARGNONE,nil)
  addCommandHandler(WMsg::BN_DBLCLICKED, "dblclicked",MSGTYPE::ARGNONE,nil)
end