Gnumed.wxGladeWidgets.wxgEncounterEditAreaDlg

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

# Source Code for Module Gnumed.wxGladeWidgets.wxgEncounterEditAreaDlg

     1  # -*- coding: UTF-8 -*-
     2  #
     3  # generated by wxGlade
     4  #
     5
     6  import wx
     7
     8  # begin wxGlade: dependencies
     9  import gettext
    10  # end wxGlade
    11
    12  # begin wxGlade: extracode
    13  # end wxGlade
    14
    15
    16 -class wxgEncounterEditAreaDlg(wx.Dialog):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxgEncounterEditAreaDlg.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER | wx.STAY_ON_TOP
    20                  wx.Dialog.__init__(self, *args, **kwds)
    21                  from Gnumed.wxpython.gmEncounterWidgets import cEncounterEditAreaPnl
    22                  self._PNL_edit_area = cEncounterEditAreaPnl(self, wx.ID_ANY)
    23                  self._BTN_save = wx.Button(self, wx.ID_OK, _("&Save"))
    24                  self._BTN_close = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
    25
    26                  self.__set_properties()
    27                  self.__do_layout()
    28
    29                  self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, id=wx.ID_OK)
    30                  # end wxGlade
    31
    32 -        def __set_properties(self):
    33                  # begin wxGlade: wxgEncounterEditAreaDlg.__set_properties
    34                  self.SetTitle(_("edit encounter details"))
    35                  self._BTN_save.SetToolTip(_("Save the encounter details."))
    36                  self._BTN_save.SetDefault()
    37                  self._BTN_close.SetToolTip(_("Close this dialog."))
    38                  # end wxGlade
    39
    40 -        def __do_layout(self):
    41                  # begin wxGlade: wxgEncounterEditAreaDlg.__do_layout
    42                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    43                  __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    44                  __szr_main.Add(self._PNL_edit_area, 1, wx.ALL | wx.EXPAND, 5)
    45                  __szr_buttons.Add(self._BTN_save, 0, wx.EXPAND, 0)
    46                  __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    47                  __szr_buttons.Add(self._BTN_close, 0, wx.EXPAND, 0)
    48                  __szr_main.Add(__szr_buttons, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 5)
    49                  self.SetSizer(__szr_main)
    50                  __szr_main.Fit(self)
    51                  self.Layout()
    52                  self.Centre()
    53                  # end wxGlade
    54
    55 -        def _on_save_button_pressed(self, event):  # wxGlade: wxgEncounterEditAreaDlg.<event_handler>
    56                  print("Event handler '_on_save_button_pressed' not implemented!")
    57                  event.Skip()
    58
    59  # end of class wxgEncounterEditAreaDlg
    60