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

Source Code for Module Gnumed.wxGladeWidgets.wxgEditDocumentTypesPnl

  1  #!/usr/bin/env python 
  2  # -*- coding: ISO-8859-15 -*- 
  3  # generated by wxGlade 0.4.1 on Thu Dec  7 16:01:45 2006 
  4   
  5  import wx 
  6   
7 -class wxgEditDocumentTypesPnl(wx.ScrolledWindow):
8 - def __init__(self, *args, **kwds):
9 10 from Gnumed.wxpython import gmListWidgets 11 12 # begin wxGlade: wxgEditDocumentTypesPnl.__init__ 13 kwds["style"] = wx.TAB_TRAVERSAL 14 wx.ScrolledWindow.__init__(self, *args, **kwds) 15 self._LCTRL_doc_type = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.SIMPLE_BORDER) 16 self._TCTRL_type = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER) 17 self._TCTRL_l10n_type = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER) 18 self._BTN_set_translation = wx.Button(self, -1, _("Set &translation")) 19 self._BTN_add = wx.Button(self, wx.ID_ADD, "") 20 self._BTN_delete = wx.Button(self, wx.ID_DELETE, "") 21 self._BTN_reassign = wx.Button(self, -1, _("&Reassign")) 22 self._BTN_dismiss = wx.Button(self, wx.ID_CANCEL, _("&Close")) 23 24 self.__set_properties() 25 self.__do_layout() 26 27 self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_doc_type) 28 self.Bind(wx.EVT_TEXT, self._on_type_modified, self._TCTRL_type) 29 self.Bind(wx.EVT_BUTTON, self._on_set_translation_button_pressed, self._BTN_set_translation) 30 self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add) 31 self.Bind(wx.EVT_BUTTON, self._on_delete_button_pressed, self._BTN_delete) 32 self.Bind(wx.EVT_BUTTON, self._on_reassign_button_pressed, self._BTN_reassign)
33 # end wxGlade 34
35 - def __set_properties(self):
36 # begin wxGlade: wxgEditDocumentTypesPnl.__set_properties 37 self.SetScrollRate(10, 10) 38 self._LCTRL_doc_type.SetToolTipString(_("This lists the available document types.")) 39 self._LCTRL_doc_type.SetFocus() 40 self._TCTRL_type.SetToolTipString(_("The document type, usually in English.")) 41 self._TCTRL_l10n_type.SetToolTipString(_("The document type in the local language.")) 42 self._BTN_set_translation.SetToolTipString(_("Change translation of selected document type for your local language.")) 43 self._BTN_set_translation.Enable(False) 44 self._BTN_add.SetToolTipString(_("Add above input as a new document type.")) 45 self._BTN_add.Enable(False) 46 self._BTN_delete.SetToolTipString(_("Delete selected document type. Note that you can only delete document types that are not in use.")) 47 self._BTN_delete.Enable(False) 48 self._BTN_reassign.SetToolTipString(_("Change the type of all documents currently having the selected document type.")) 49 self._BTN_reassign.Enable(False) 50 self._BTN_dismiss.SetDefault()
51 # end wxGlade 52
53 - def __do_layout(self):
54 # begin wxGlade: wxgEditDocumentTypesPnl.__do_layout 55 _szr_main = wx.BoxSizer(wx.VERTICAL) 56 _szr_buttons = wx.BoxSizer(wx.HORIZONTAL) 57 _gszr_editor = wx.FlexGridSizer(2, 2, 2, 2) 58 _szr_main.Add(self._LCTRL_doc_type, 1, wx.EXPAND, 5) 59 _lbl_name = wx.StaticText(self, -1, _("Type (English)")) 60 _gszr_editor.Add(_lbl_name, 0, wx.ALIGN_CENTER_VERTICAL, 0) 61 _gszr_editor.Add(self._TCTRL_type, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 62 _lbl_local_name = wx.StaticText(self, -1, _("Local language")) 63 _gszr_editor.Add(_lbl_local_name, 0, wx.ALIGN_CENTER_VERTICAL, 0) 64 _gszr_editor.Add(self._TCTRL_l10n_type, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0) 65 _gszr_editor.AddGrowableCol(1) 66 _szr_main.Add(_gszr_editor, 0, wx.TOP|wx.BOTTOM|wx.EXPAND, 5) 67 _szr_buttons.Add(self._BTN_set_translation, 0, wx.RIGHT, 3) 68 _szr_buttons.Add(self._BTN_add, 0, wx.RIGHT, 3) 69 _szr_buttons.Add(self._BTN_delete, 0, wx.RIGHT, 3) 70 _szr_buttons.Add(self._BTN_reassign, 0, 0, 3) 71 _szr_buttons.Add((5, 5), 1, wx.EXPAND, 0) 72 _szr_buttons.Add(self._BTN_dismiss, 0, 0, 0) 73 _szr_main.Add(_szr_buttons, 0, wx.EXPAND, 0) 74 self.SetSizer(_szr_main) 75 _szr_main.Fit(self)
76 # end wxGlade 77
78 - def _on_list_item_selected(self, event): # wxGlade: wxgEditDocumentTypesPnl.<event_handler>
79 print "Event handler `_on_list_item_selected' not implemented!" 80 event.Skip()
81
82 - def _on_add_button_pressed(self, event): # wxGlade: wxgEditDocumentTypesPnl.<event_handler>
83 print "Event handler `_on_add_button_pressed' not implemented!" 84 event.Skip() 85
86 - def _on_delete_button_pressed(self, event): # wxGlade: wxgEditDocumentTypesPnl.<event_handler>
87 print "Event handler `_on_delete_button_pressed' not implemented!" 88 event.Skip() 89
90 - def _on_type_modified(self, event): # wxGlade: wxgEditDocumentTypesPnl.<event_handler>
91 print "Event handler `_on_type_modified' not implemented" 92 event.Skip() 93
94 - def _on_set_translation_button_pressed(self, event): # wxGlade: wxgEditDocumentTypesPnl.<event_handler>
95 print "Event handler `_on_set_translation_button_pressed' not implemented" 96 event.Skip() 97
98 - def _on_reassign_button_pressed(self, event): # wxGlade: wxgEditDocumentTypesPnl.<event_handler>
99 print "Event handler `_on_reassign_button_pressed' not implemented" 100 event.Skip() 101 102 # end of class wxgEditDocumentTypesPnl 103