annotate arrows/@auinum/construct.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 672052bd81f8
children
rev   line source
samer@0 1 function u=construct(s,sizes_in)
samer@0 2 fg=fig(s);
samer@0 3 current_value = s.x0;
samer@0 4 ht=uitext('parent',fg,tostring(current_value),'left');
samer@0 5
samer@0 6 u=mkunit(s);
samer@0 7 u.process=@proc;
samer@0 8 u.sizes_out = {[1,1]};
samer@0 9 u.dispose = @dispose;
samer@0 10 u.starting = @starting;
samer@0 11 u.stopping = @stopping;
samer@0 12
samer@0 13 function starting
samer@0 14 set(fg,'ButtonDownFcn',@btndown);
samer@0 15 set(fg,'WindowButtonMotionFcn',[]);
samer@0 16 end
samer@0 17
samer@0 18 function stopping
samer@0 19 set(fg,'ButtonDownFcn',[]);
samer@0 20 set(fg,'WindowButtonMotionFcn',[]);
samer@0 21 end
samer@0 22
samer@0 23 function x=proc,
samer@0 24 pos=get(ax,'CurrentPoint');
samer@0 25 x=pos(1,1:2)';
samer@0 26 end
samer@0 27
samer@0 28 function btndown(a,b), set(fg,'WindowButtonMotionFcn',@nop); end
samer@0 29 function btnup(a,b), set(fg,'WindowButtonMotionFcn',[]); end
samer@0 30
samer@0 31 function dispose
samer@0 32 set(fg,'ButtonDownFcn',[]);
samer@0 33 set(fg,'WindowButtonMotionFcn',[]);
samer@0 34 end
samer@0 35 end