Class: VRScrollbar

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

Direct Known Subclasses

VRHScrollbar, VRVScrollbar

Constant Summary collapse

WINCLASSINFO =
["SCROLLBAR",0]

Instance Attribute Summary collapse

Attributes inherited from VRControl

#handlers, #name, #parent

Attributes inherited from VRWinComponent

#parent, #screen

Instance Method Summary collapse

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 Attribute Details

#longstepObject (readonly)

Returns the value of attribute longstep.



1129
1130
1131
# File 'lib/vr/vrcontrol.rb', line 1129

def longstep
  @longstep
end

#smallstepObject (readonly)

Returns the value of attribute smallstep.



1128
1129
1130
# File 'lib/vr/vrcontrol.rb', line 1128

def smallstep
  @smallstep
end

Instance Method Details

#pagesizeObject



1153
1154
1155
1156
1157
# File 'lib/vr/vrcontrol.rb', line 1153

def pagesize
  si=[4*7,2,0,0,0,0,0].pack WStruct::SCROLLINFO
  sendMessage 0xea,1,si  # SBM_GETSCROLLINFO
  si.unpack(WStruct::SCROLLINFO)[4]
end

#pagesize=(p) ⇒ Object



1149
1150
1151
1152
# File 'lib/vr/vrcontrol.rb', line 1149

def pagesize=(p)
  si=[4*7,2,0,0,p.to_i,0,0].pack WStruct::SCROLLINFO
  sendMessage 0xe9,1,si  # SBM_SETSCROLLINFO
end

#positionObject



1145
1146
1147
# File 'lib/vr/vrcontrol.rb', line 1145

def position
  sendMessage 0xe1,0,0
end

#position=(val) ⇒ Object



1142
1143
1144
# File 'lib/vr/vrcontrol.rb', line 1142

def position=(val)
  sendMessage 0xe0,val.to_i,1
end

#setRange(min, max) ⇒ Object



1138
1139
1140
# File 'lib/vr/vrcontrol.rb', line 1138

def setRange(min,max)
  sendMessage 0xe6,min.to_i,max.to_i
end

#vrinitObject



1131
1132
1133
1134
1135
1136
# File 'lib/vr/vrcontrol.rb', line 1131

def vrinit
  setRange(0,100)
  self.pagesize=10
  self.position=50
  @smallstep, @longstep = 1,10
end