Home | History | Annotate | Download | only in JetCreator

Lines Matching defs:wx

23 import wx

26 from wx.lib.mixins.listctrl import CheckListCtrlMixin, ListCtrlAutoWidthMixin, ColumnSorterMixin
30 class JetSpin(wx.SpinCtrl):
32 def __init__(self, parent, id=-1,value=wx.EmptyString,pos=wx.DefaultPosition,size=wx.DefaultSize,style=wx.SP_ARROW_KEYS,min=0,max=100,initial=0):
33 wx.SpinCtrl.__init__(self, parent, id=id,value=value,pos=(pos[0]-MacOffset(),pos[1]),size=size,style=style,min=min,max=max,initial=initial)
38 wx.SpinCtrl.SetValue(self, int(val))
40 wx.SpinCtrl.SetValue(self, val)
42 wx.SpinCtrl.SetValue(self, 0)
46 def __init__(self, parent, id=-1,value=wx.EmptyString,pos=wx.DefaultPosition,size=wx.DefaultSize,style=wx.SP_ARROW_KEYS,min=0,max=100,initial=0):
47 wx.SpinCtrl.__init__(self, parent, id=id,value=value,pos=(pos[0]-MacOffset(),pos[1]),size=size,style=style,min=min,max=max,initial=initial)
52 wx.SpinCtrl.SetValue(self, int(val) + 1)
54 wx.SpinCtrl.SetValue(self, val + 1)
56 wx.SpinCtrl.SetValue(self, 1)
59 val = wx.SpinCtrl.GetValue(self)
63 class JetCheckBox(wx.CheckBox):
65 def __init__(self, parent, id=-1,label=wx.EmptyString,pos=wx.DefaultPosition,size=wx.DefaultSize):
66 wx.CheckBox.__init__(self, parent, id=id, label=label, pos=pos, size=size)
75 wx.CheckBox.SetValue(self, val)
77 wx.CheckBox.SetValue(self, val)
79 wx.CheckBox.SetValue(self, False)
81 class JetRadioButton(wx.RadioButton):
83 def __init__(self, parent, id=-1,label=wx.EmptyString,pos=wx.DefaultPosition,size=wx.DefaultSize):
84 wx.RadioButton.__init__(self, parent, id=id, label=label, pos=pos, size=size)
93 wx.RadioButton.SetValue(self, val)
95 wx.RadioButton.SetValue(self, val)
97 wx.RadioButton.SetValue(self, False)
99 class JetListCtrl(wx.ListCtrl, ListCtrlAutoWidthMixin, ColumnSorterMixin):
101 def __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize):
102 wx.ListCtrl.__init__(self, parent, id, pos=pos, size=size, style=wx.LC_REPORT | wx.SUNKEN_BORDER)
129 # Used by the ColumnSorterMixin, see wx/lib/mixins/listctrl.py
148 class JetCheckListCtrl(wx.ListCtrl, CheckListCtrlMixin, ListCtrlAutoWidthMixin, ColumnSorterMixin):
150 def __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.LC_REPORT | wx.SUNKEN_BORDER):
151 wx.ListCtrl.__init__(self, parent, id, pos=pos, size=size, style=style)
187 # Used by the ColumnSorterMixin, see wx/lib/mixins/listctrl.py
208 def __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.LC_REPORT | wx.SUNKEN_BORDER):
209 wx.ListCtrl.__init__(self, parent, id, pos=pos, size=size, style=style)
249 self.cmb = wx.ComboBox(parent, id, "", pos=(pos[0]-MacOffset(),pos[1]), size=(w, -1), style=wx.CB_DROPDOWN)
250 self.btn = wx.Button(parent, -1, "...", pos=(col, pos[1]+MacOffset()), size=(BUTWIDTH,self.cmb.GetSize()[1]))
251 self.btn.Bind(wx.EVT_BUTTON, self.OnBrowse, self.btn)
261 dlg = wx.FileDialog(None, self.title, defDir, '', self.spec, wx.FD_OPEN)
263 if ret == wx.ID_OK:
271 SendEvent(self.cmb, wx.EVT_COMBOBOX.evtType[0])
316 self.txt = wx.TextCtrl(parent, id, "", pos=(pos[0]-MacOffset(),pos[1]), size=(w, -1))
317 self.btn = wx.Button(parent, -1, "...", pos=(col, pos[1]), size=(BUTWIDTH,self.txt.GetSize()[1]))
318 self.btn.Bind(wx.EVT_BUTTON, self.OnBrowse, self.btn)
328 dlg = wx.FileDialog(None, self.title, defDir, '', self.spec, wx.FD_OPEN)
330 if ret == wx.ID_OK:
364 dlg = wx.MessageDialog(None, question, title, wx.YES_NO | wx.ICON_QUESTION)
365 if dlg.ShowModal() == wx.ID_YES:
374 dlg = wx.MessageDialog(None, question, title, wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
381 dlg = wx.MessageDialog(None, message, title, wx.ICON_ERROR)
387 dlg = wx.MessageDialog(None, message, title, wx.ICON_INFORMATION)
391 class TimeCtrl(wx.Frame):
394 wx.Frame.__init__(self, parent, -1)
405 self.time = (wx.TextCtrl(parent, -1, str(value[0]), pos=(p1, top), size=(w1, -1), style=wx.TE_NOHIDESEL),
406 wx.TextCtrl(parent, -1, str(value[1]), pos=(p1 + (w1 + 3), top), size=(w1, -1), style=wx.TE_NOHIDESEL),
407 wx.TextCtrl(parent, -1, str(value[2]), pos=(p1 + (w1 + 3) *2, top), size=(w1, -1), style=wx.TE_NOHIDESEL),
412 self.spin = wx.SpinButton(parent, -1, (w, top), (h*2/3, h), wx.SP_VERTICAL)
416 self.spin.Bind(wx.EVT_SPIN_UP, self.OnSpinUp, self.spin)
417 self.spin.Bind(wx.EVT_SPIN_DOWN, self.OnSpinDown, self.spin)
419 self.time[0].Bind(wx.EVT_SET_FOCUS, self.OnFocusMeasure, self.time[0] )
420 self.time[1].Bind(wx.EVT_SET_FOCUS, self.OnFocusBeat, self.time[1] )
421 self.time[2].Bind(wx.EVT_SET_FOCUS, self.OnFocusTick, self.time[2] )
423 self.time[0].Bind(wx.EVT_KILL_FOCUS, self.OnChangeVal, self.time[0] )
424 self.time[1].Bind(wx.EVT_KILL_FOCUS, self.OnChangeVal, self.time[1] )
425 self.time[2].Bind(wx.EVT_KILL_FOCUS, self.OnChangeVal, self.time[2] )
430 self.time[0].Unbind(wx.EVT_KILL_FOCUS, self.time[0])
431 self.time[1].Unbind(wx.EVT_KILL_FOCUS, self.time[1])
432 self.time[2].Unbind(wx.EVT_KILL_FOCUS, self.time[2])
536 class TestFrame(wx.Frame):
538 wx.Frame.__init__(self, parent, id, title, size=(350, 220))
540 panel = wx.Panel(self, -1)
554 wx.EVT_CLOSE(self, self.OnClose)
563 app = wx.App(None)