BBjImageManager::getCacheSize

Description

In BBj 7.0 and higher, this method returns the size of the BBjImageManager's internal cache of images.

Syntax

Return Value

Method

int

getCacheSize()

Parameters

None.

Return Value

Returns the size of the BBjImageManager's internal cache of images.

Remarks

See BBjImageManager::setCacheSize.

Example

rem ' BBjImageManager::getCacheSize

sysgui! = bbjapi().openSysGui("X0")
window! = sysgui!.addWindow(50,50,500,750,"setCacheSize",$00090003$,$$)
window!.setCallback(window!.ON_CLOSE,"eoj")
imagemanager! = sysgui!.getImageManager()
print "BBjImageManager::getCacheSize",imagemanager!.getCacheSize()

rem ' Add two buttons that use the same image.
rem ' These will share the same image.
b1! = window!.addButton(101,25,25,450,200,"BITMAP = bbj.png")
b2! = window!.addMenuButton(102,25,250,450,200,"BITMAP = bbj.png")
print "BBjImageManager::getCacheSize",imagemanager!.getCacheSize()

rem ' Set the cache size to zero to clear the cache
imagemanager!.setCacheSize(0)
print "BBjImageManager::getCacheSize",imagemanager!.getCacheSize()

rem ' Use a distinct image on this button
b3! = window!.addToolButton(103,25,475,450,200,"BITMAP = bbj.png")
process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjImageManager

BBjImage

BBjImageManager::setCacheSize

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.