Class: VRStatusbar
Constant Summary
collapse
- WINCLASSINFO =
VRStatusbar
Statusbar.
Methods
--- setparts(p,width=[-1])
Devides the statusbar into ((|p|)) parts with the widths specified by
((|width|)) which is an Integer array. If the width is -1, the right edge
of the part is to be at the right edge of the statusbar.
--- parts
Returns the number of parts.
--- getTextOf(idx)
Returns the text of the parts.
--- setTextOf(idx,text,style=0)
Sets the text of the parts whose index is ((|idx|)) to ((|text|))
--- getRectOf(idx)
Returns the position and size of the parts as an array [x,y,w,h].
--- minheight=(minh)
Sets the minimum height of the statusbar.
["msctls_statusbar32",0]
Instance Attribute Summary
#_vr_notifyarg
Attributes inherited from VRControl
#handlers, #name, #parent
#parent, #screen
Instance Method Summary
collapse
#_vr_ntfyhandlers, #addFilterArg, #addNotifyHandler, #deleteFilterArg, #deleteNotifyHandler, #notifycontrolinit, #vrinit
Methods inherited from VRControl
Controltype, #add_parentcall, #call_parenthandler, #create, #setFont
#_init, #create, #exwinstyle, #hide, #maximizebox, #maximizebox=, #minimizebox, #minimizebox=, #setscreen, #sizebox, #sizebox=, #tabstop, #tabstop=, #vrinit, #winstyle
Instance Method Details
#getRectOf(idx) ⇒ Object
1328
1329
1330
1331
1332
|
# File 'lib/vr/vrcomctl.rb', line 1328
def getRectOf(idx)
r=@screen.application.arg2cstructStr("UUUU",0,0,0,0)
sendMessage WMsg::SB_GETRECT,idx.to_i,r
@screen.application.cstruct2array(r,"UUUU")
end
|
#getTextOf=(idx) ⇒ Object
1309
1310
1311
1312
1313
1314
|
# File 'lib/vr/vrcomctl.rb', line 1309
def getTextOf=(idx)
len = 1+LOWORD(sendMessage(Wmsg::SB_GETTEXTLENGTH,idx,0))
r="\0"*len
sendMessage WMsg::SB_GETTEXT,idx,r
r
end
|
#minheight=(h) ⇒ Object
1333
1334
1335
|
# File 'lib/vr/vrcomctl.rb', line 1333
def minheight=(h)
sendMessage WMsg::SB_SETMINHEIGHT,h.to_i,0
end
|
1318
1319
1320
|
# File 'lib/vr/vrcomctl.rb', line 1318
def parts
sendMessage WMsg::SB_GETPARTS,0,0
end
|
#setparts(p, widths = [-1]) ⇒ Object
1321
1322
1323
1324
1325
1326
1327
|
# File 'lib/vr/vrcomctl.rb', line 1321
def setparts(p,widths=[-1])
if widths then
raise(ArgumentError,"width illegal") unless widths.is_a?(Array)
end
r=@screen.application.arg2cstructStr("I"*p,*widths)
sendMessage WMsg::SB_SETPARTS,p.to_i,r
end
|
#setTextOf(idx, text, style = 0) ⇒ Object
1315
1316
1317
|
# File 'lib/vr/vrcomctl.rb', line 1315
def setTextOf(idx,text,style=0)
sendMessage WMsg::SB_SETTEXT,(idx|(style&0xff00)),text.to_s
end
|