Class: VRBitmapPanel

Inherits:
VRPanel show all
Includes:
VRDrawable
Defined in:
lib/vr/vrcontrol.rb

Overview

Control using VRPanel

Constant Summary

Constants included from VRMessageHandler

VRMessageHandler::PREHANDLERSTR

Constants inherited from VRPanel

VRPanel::WINCLASSINFO

Constants included from VRParent

VRParent::DEFAULT_FONT, VRParent::VR_ADDCONTROL_FEWARGS

Constants inherited from VRControl

VRControl::WINCLASSINFO

Instance Attribute Summary collapse

Attributes included from VRParent

#screen

Attributes inherited from VRControl

#handlers, #name, #parent

Attributes inherited from VRWinComponent

#parent, #screen

Instance Method Summary collapse

Methods included from VRDrawable

#drawableinit

Methods included from VRMessageHandler

#acceptEvents, #addHandler, #addNoRelayMessages, #controlmsg_dispatching, #deleteHandler, #msghandlerinit, #selfmsg_dispatching

Methods included from VRParent

#addArrayedControl, #addControl, #clearControls, #construct, #countControls, #create, #createControl, #deleteControl, #newControlID, #parentinit, #registerControl, #registerControlAsArrayed, #self_created, #send_parent

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

#bmpObject (readonly)

VRBitmapPanel

Bitmap panel that can display static bitmap.

Methods

— loadFile(filename)

Loads ((|filename|)) as bitmap file.

— createBitmap(info,bmp)

Creates an bitmap from ((|info|)) and ((|bmp|)).

— bmp

The instance of displaying SWin::Bitmap.


1266
1267
1268
# File 'lib/vr/vrcontrol.rb', line 1266

def bmp
  @bmp
end

Instance Method Details

#createBitmap(info, bmp) ⇒ Object



1279
1280
1281
1282
# File 'lib/vr/vrcontrol.rb', line 1279

def createBitmap(info,bmp)
  @bmp=SWin::Bitmap.createBitmap info,bmp
  self.refresh
end

#loadFile(fname) ⇒ Object



1274
1275
1276
1277
# File 'lib/vr/vrcontrol.rb', line 1274

def loadFile(fname)
  @bmp=SWin::Bitmap.loadFile fname
  self.refresh
end

#self_paintObject



1284
1285
1286
# File 'lib/vr/vrcontrol.rb', line 1284

def self_paint
  drawBitmap @bmp if @bmp.is_a?(SWin::Bitmap)
end

#vrinitObject



1269
1270
1271
1272
# File 'lib/vr/vrcontrol.rb', line 1269

def vrinit
  super
  @bmp=nil
end