Package pyjamas :: Package ui :: Module Controls
[hide private]
[frames] | no frames]

Source Code for Module pyjamas.ui.Controls

 1  """ Control Widgets.  Presently comprises a Vertical Slider Demo and derivatives. 
 2   
 3      HorizontalDemoSlider and HorizontalDemoSlider2 added by Bill Winder 
 4      AreaDemoSlider and AreaDemoSlider2 added by Bill Winder 
 5   
 6      Copyright (C) 2008, 2009, 2010 Luke Kenneth Casson Leighton <lkcl@lkcl.net> 
 7      Copyright (C) 2010 - Cedric Gestes <gestes@aldebaran-robotics.com> 
 8      Copyright (C) 2009, 2010 - Bill Winder <wgwinder@gmail.com> 
 9   
10   
11      To do: All controls with draggable=True do not fire the OnFocus methon on single click. 
12      the control does not activate the OnFocus method. Clicking the handle does fire OnFocus, however. 
13   
14  """ 
15   
16  print "WARNING: Controls.py is deprecated and split into AreaSlider, Control, etc." 
17   
18  from pyjamas.ui.Control import Control 
19  from pyjamas.ui.DoubleControl import DoubleControl as DControl 
20  from pyjamas.ui.VerticalSlider import VerticalSlider as VerticalDemoSlider 
21  from pyjamas.ui.InputControl import InputControl 
22  from pyjamas.ui.HorizontalSlider import HorizontalSlider as HorizontalDemoSlider 
23  from pyjamas.ui.AreaSlider import AreaSlider as AreaDemoSlider 
24   
25 -class VerticalDemoSlider2(VerticalDemoSlider):
26
27 - def __init__(self, min_value, max_value, start_value=None, **kwargs):
28 29 VerticalDemoSlider.__init__(self, min_value, max_value, start_value, 30 **kwargs) 31 self.setDragable(True)
32 33
34 -class HorizontalDemoSlider2(HorizontalDemoSlider):
35 - def __init__(self, min_value, max_value, start_value=None, **kwargs):
36 37 HorizontalDemoSlider.__init__(self, min_value, max_value, start_value, 38 **kwargs) 39 self.setDragable(True)
40
41 -class AreaDemoSlider2(AreaDemoSlider):
42 - def __init__(self, min_value, max_value, start_value=None, **kwargs):
43 44 AreaDemoSlider.__init__(self, min_value, max_value, start_value, 45 **kwargs) 46 self.setDragable(True)
47