include('wintools') include("wincontrolworks") func _create(_data) var(ctlr) println(spectrum, ' = new SpectrumRender(' + lng.to_color(BackColor, 255) + ',' + lng.to_color(Pen, 255) + ', ' + ColWidth + ',' + lng.to_color(Peak, 255) + ',' + PeakFallOff + ',' + LineFallOff + ', this);') if(isndef(DrawPeak)) println(spectrum + '->drawPeak = false;') end if(isndef(Transparent)) println(spectrum + '->transparent = true;') end ctlr = spectrum include("wincontrol") end func initFree() _create('') end func init() lng.include('spectrum.h') HEADERS += " spectrum.h" SOURCES += " spectrum.cpp" lng.decl_priv_var(spectrum, 'SpectrumRender*') if(not linked(doCreate)) fvar(old) old = block.select(BLK_BODY) _create('') block.select(old) end end func doDraw(_data) println(spectrum + '->draw(' + lng.get_linked_obj('SoundChannel') + ');') end