def __init__(self, parent): ToolGUI.__init__(self, parent, 'PortraitTool') # gui components: labels state_x_label = Widgets.LabelText(self, "Select State for x-Axis:") state_y_label = Widgets.LabelText(self, "Select State for y-Axis:") state_z_label = Widgets.LabelText(self, "Select State for z-Axis:") mode_label = Widgets.LabelText(self, "Select Visualization Mode:") # gui components: selection self.state_x_choice = Widgets.ChoiceList(self) self.state_y_choice = Widgets.ChoiceList(self) self.state_z_choice = Widgets.ChoiceList(self) self.mode_check = Widgets.Checkbox(self, "Draw Lines") sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(state_x_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.state_x_choice, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 4) sizer.AddSpacer(2) sizer.Add(state_y_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.state_y_choice, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 4) sizer.AddSpacer(2) sizer.Add(state_z_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.state_z_choice, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 4) sizer.AddSpacer(2) sizer.Add(mode_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.mode_check, 0, wx.LEFT, 30) sizer.AddStretchSpacer(1) # register event handling wx.EVT_CHOICE(self, self.state_x_choice.GetId(), self.on_state_x_selected) wx.EVT_CHOICE(self, self.state_y_choice.GetId(), self.on_state_y_selected) wx.EVT_CHOICE(self, self.state_z_choice.GetId(), self.on_state_z_selected) wx.EVT_CHECKBOX(self, self.mode_check.GetId(), self.on_mode_selected) self.SetSizerAndFit(sizer) dypy.debug("PortraitToolGUI", "Initialized.")
def __init__(self, parent): ToolGUI.__init__(self, parent, 'CobwebTool')
def __init__(self, parent): ToolGUI.__init__(self, parent, 'OrbitTool') # gui components: labels state_label = Widgets.LabelText(self, "Select State Axis:") param_label = Widgets.LabelText(self, "Select Varying Parameter:") density_label = Widgets.LabelText(self, "Select Maximum Point Density:") age_label = Widgets.LabelText(self, "Select Maximum Point Age:") mode_label = Widgets.LabelText(self, "Select Visualization Mode:") # gui components: selection self.state_choice = Widgets.ChoiceList(self) self.param_choice = Widgets.ChoiceList(self) self.density_slider = Widgets.SimpleSlider(self, 4, 1, 10) self.age_slider = Widgets.SimpleSlider(self, 1000, 1, 10000) self.mode_check = Widgets.Checkbox(self, "Show History") sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(state_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.state_choice, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 4) sizer.AddSpacer(2) sizer.Add(param_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.param_choice, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 4) sizer.AddSpacer(10) sizer.Add(density_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.density_slider, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 4) sizer.AddSpacer(2) sizer.Add(age_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.age_slider, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 4) sizer.AddSpacer(10) sizer.Add(mode_label, 0, wx.ALIGN_LEFT | wx.ALL, 4) sizer.Add(self.mode_check, 0, wx.LEFT, 30) sizer.AddStretchSpacer(1) note = wx.StaticText(self, wx.ID_ANY, \ "* Minimum values used for fixed parameters in orbit display.") note.SetFont(Widgets.ItalicFont(8)) sizer.Add(note, 0, wx.ALIGN_RIGHT | wx.ALL, 4) # register event handling wx.EVT_CHOICE(self, self.state_choice.GetId(), self.on_state_selected) wx.EVT_CHOICE(self, self.param_choice.GetId(), self.on_param_selected) wx.EVT_COMMAND_SCROLL(self, self.density_slider.GetId(), self.on_density_changed) wx.EVT_COMMAND_SCROLL(self, self.age_slider.GetId(), self.on_age_changed) wx.EVT_CHECKBOX(self, self.mode_check.GetId(), self.on_mode_selected) # trigger event handling for visualization settings self.on_density_changed() self.on_age_changed() self.on_mode_selected() self.SetSizerAndFit(sizer) dypy.debug("OrbitToolGUI", "Initialized.")