8 #include "../../lib/cpoint.h" 10 #if VSTGUI_LIVE_EDITING 17 class UIGrid :
public NonAtomicReferenceCounted
20 UIGrid (
const CPoint& size = CPoint (10, 10)) : size (size) {}
22 virtual void process (CPoint& p)
26 int32_t x = (int32_t) std::floor (p.x / size.x + 0.5);
28 int32_t y = (int32_t) std::floor (p.y / size.y + 0.5);
32 virtual void setSize (
const CPoint& p) { size = p; }
33 const CPoint& getSize ()
const {
return size; }
40 #endif // VSTGUI_LIVE_EDITING Definition: customcontrols.cpp:8