COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
plotData.BoundControlBox Class Reference
Inheritance diagram for plotData.BoundControlBox:
Collaboration diagram for plotData.BoundControlBox:

Public Member Functions

def __init__ (self, parent, ID, label, initval)
 
def on_update_manual_text (self, event)
 
def on_text_enter (self, event)
 
def is_auto (self)
 
def manual_value (self)
 

Public Attributes

 value
 
 radio_auto
 
 radio_manual
 
 manual_text
 

Detailed Description

A static box with a couple of radio buttons and a text
    box. Allows to switch between an automatic mode and a 
    manual mode with an associated value.

Constructor & Destructor Documentation

def plotData.BoundControlBox.__init__ (   self,
  parent,
  ID,
  label,
  initval 
)
75  def __init__(self, parent, ID, label, initval):
76  wx.Panel.__init__(self, parent, ID)
77 
78  self.value = initval
79 
80  box = wx.StaticBox(self, -1, label)
81  sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
82 
83  self.radio_auto = wx.RadioButton(self, -1,
84  label="Auto", style=wx.RB_GROUP)
85  self.radio_manual = wx.RadioButton(self, -1,
86  label="Manual")
87  self.manual_text = wx.TextCtrl(self, -1,
88  size=(35,-1),
89  value=str(initval),
90  style=wx.TE_PROCESS_ENTER)
91 
92  self.Bind(wx.EVT_UPDATE_UI, self.on_update_manual_text, self.manual_text)
93  self.Bind(wx.EVT_TEXT_ENTER, self.on_text_enter, self.manual_text)
94 
95  manual_box = wx.BoxSizer(wx.HORIZONTAL)
96  manual_box.Add(self.radio_manual, flag=wx.ALIGN_CENTER_VERTICAL)
97  manual_box.Add(self.manual_text, flag=wx.ALIGN_CENTER_VERTICAL)
98 
99  sizer.Add(self.radio_auto, 0, wx.ALL, 10)
100  sizer.Add(manual_box, 0, wx.ALL, 10)
101 
102  self.SetSizer(sizer)
103  sizer.Fit(self)
104 
const string & str
Definition: json11.cpp:360

Member Function Documentation

def plotData.BoundControlBox.on_update_manual_text (   self,
  event 
)
105  def on_update_manual_text(self, event):
106  self.manual_text.Enable(self.radio_manual.GetValue())
107 
def plotData.BoundControlBox.on_text_enter (   self,
  event 
)
108  def on_text_enter(self, event):
109  self.value = self.manual_text.GetValue()
110 
def plotData.BoundControlBox.is_auto (   self)
111  def is_auto(self):
112  return self.radio_auto.GetValue()
113 
def plotData.BoundControlBox.manual_value (   self)
114  def manual_value(self):
115  return self.value
116 
117 

Member Data Documentation

plotData.BoundControlBox.value
plotData.BoundControlBox.radio_auto
plotData.BoundControlBox.radio_manual
plotData.BoundControlBox.manual_text

The documentation for this class was generated from the following file: