Gnumed.wxGladeWidgets.wxgRequest

Package Gnumed :: Package wxGladeWidgets :: Module wxgRequest |
[frames] | no frames]

# Source Code for Module Gnumed.wxGladeWidgets.wxgRequest

      1  #!/usr/bin/env python
      2  # -*- coding: UTF-8 -*-
      3  # generated by wxGlade 0.4cvs on Sat Dec  3 16:15:53 2005
      4
      5  import wx
      6
      7  from Gnumed.wxpython import gmPhraseWheel
      8
      9
     10 -class wxgRequest(wx.Dialog):
     11 -    def __init__(self, *args, **kwds):
     12          # begin wxGlade: wxgRequest.__init__
     13          kwds["style"] = wx.DEFAULT_DIALOG_STYLE
     14          wx.Dialog.__init__(self, *args, **kwds)
     15          self.label_1 = wx.StaticText(self, -1, _("To"))
     16          self.lab = gmPhraseWheel.cPhraseWheel(self, -1, "")
     17          self.label_5 = wx.StaticText(self, -1, _("Form"))
     18          self.form = wx.Choice(self, -1, choices=[])
     19          self.label_2 = wx.StaticText(self, -1, _("Request"))
     20          self.request = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER|wx.TE_MULTILINE|wx.TE_WORDWRAP|wx.NO_BORDER)
     21          self.label_3 = wx.StaticText(self, -1, _("Clinical Notes"))
     22          self.clinical_notes = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER|wx.TE_MULTILINE|wx.TE_WORDWRAP|wx.NO_BORDER)
     23          self.label_4 = wx.StaticText(self, -1, _("Instructions"))
     24          self.patient_instructions = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_WORDWRAP)
     25          self.urgent = wx.CheckBox(self, -1, _("Urgent"))
     26          self.with_sample = wx.CheckBox(self, -1, _("With Sample"))
     27          self.print_btn = wx.Button(self, -1, _("Print"))
     28          self.close_btn = wx.Button(self, -1, _("Close"))
     29          self.cancel_btn = wx.Button(self, -1, _("Cancel"))
     30
     31          self.__set_properties()
     32          self.__do_layout()
     33
     34          self.Bind(wx.EVT_BUTTON, self.OnPrint, self.print_btn)
     35          self.Bind(wx.EVT_BUTTON, self.OnClose, self.close_btn)
     36          self.Bind(wx.EVT_BUTTON, self.OnCancel, self.cancel_btn)
     37          # end wxGlade
     38
     39 -    def __set_properties(self):
     40          # begin wxGlade: wxgRequest.__set_properties
     41          self.SetTitle(_("Request"))
     42          self.form.SetSelection(0)
     43          # end wxGlade
     44
     45 -    def __do_layout(self):
     46          # begin wxGlade: wxgRequest.__do_layout
     47          grid_sizer_1 = wx.FlexGridSizer(7, 2, 0, 0)
     48          sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
     49          sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
     50          grid_sizer_1.Add(self.label_1, 0, wx.ADJUST_MINSIZE, 0)
     51          grid_sizer_1.Add(self.lab, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
     52          grid_sizer_1.Add(self.label_5, 0, wx.ADJUST_MINSIZE, 0)
     53          grid_sizer_1.Add(self.form, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
     54          grid_sizer_1.Add(self.label_2, 0, wx.ADJUST_MINSIZE, 0)
     55          grid_sizer_1.Add(self.request, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
     56          grid_sizer_1.Add(self.label_3, 0, wx.ADJUST_MINSIZE, 0)
     57          grid_sizer_1.Add(self.clinical_notes, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
     58          grid_sizer_1.Add(self.label_4, 0, wx.ADJUST_MINSIZE, 0)
     59          grid_sizer_1.Add(self.patient_instructions, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
     60          sizer_1.Add(self.urgent, 0, wx.ADJUST_MINSIZE, 0)
     61          sizer_1.Add(self.with_sample, 0, wx.ADJUST_MINSIZE, 0)
     62          grid_sizer_1.Add(sizer_1, 1, wx.EXPAND, 0)
     63          sizer_2.Add(self.print_btn, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 30)
     64          sizer_2.Add(self.close_btn, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 30)
     65          sizer_2.Add(self.cancel_btn, 0, wx.ADJUST_MINSIZE, 0)
     66          grid_sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
     67          self.SetAutoLayout(True)
     68          self.SetSizer(grid_sizer_1)
     69          grid_sizer_1.Fit(self)
     70          grid_sizer_1.SetSizeHints(self)
     71          grid_sizer_1.AddGrowableRow(2)
     72          grid_sizer_1.AddGrowableRow(3)
     73          grid_sizer_1.AddGrowableRow(4)
     74          grid_sizer_1.AddGrowableCol(1)
     75          self.Layout()
     76          # end wxGlade
     77
     78 -    def OnPrint(self, event): # wxGlade: wxgRequest.<event_handler>
     79          print "Event handler `OnPrint' not implemented!"
     80          event.Skip()
     81
     82 -    def OnClose(self, event): # wxGlade: wxgRequest.<event_handler>
     83          print "Event handler `OnClose' not implemented!"
     84          event.Skip()
     85
     86 -    def OnCancel(self, event): # wxGlade: wxgRequest.<event_handler>
     87          print "Event handler `OnCancel' not implemented!"
     88          event.Skip()
     89
     90  # end of class wxgRequest
     91
     92
     93  if __name__ == "__main__":
     94      import gettext
     95      gettext.install("app") # replace with the appropriate catalog name
     96
     97      app = wx.PySimpleApp(0)
     98      wx.InitAllImageHandlers()
     99      request = wxTextCtrl(None, -1, "")
    100      app.SetTopWindow(request)
    101      request.Show()
    102      app.MainLoop()
    103