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

# Source Code for Module Gnumed.wxGladeWidgets.wxgGenericListManagerPnl

     1  #!/usr/bin/env python
     2  # -*- coding: utf-8 -*-
     3  # generated by wxGlade 0.5 on Wed Nov 14 15:59:11 2007 from /home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgGenericListManagerPnl.wxg
     4
     5  import wx
     6
     7 -class wxgGenericListManagerPnl(wx.ScrolledWindow):
     8 -    def __init__(self, *args, **kwds):
     9
    10          from Gnumed.wxpython import gmListWidgets
    11
    12          # begin wxGlade: wxgGenericListManagerPnl.__init__
    13          kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
    14          wx.ScrolledWindow.__init__(self, *args, **kwds)
    15          self._LBL_message = wx.StaticText(self, -1, "", style=wx.ALIGN_CENTRE)
    16          self._LCTRL_items = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT|wx.LC_HRULES|wx.NO_BORDER)
    17          self._BTN_add = wx.Button(self, wx.ID_ADD, "")
    18          self._BTN_edit = wx.Button(self, -1, _("Edit"))
    19          self._BTN_remove = wx.Button(self, wx.ID_REMOVE, "")
    20
    21          self.__set_properties()
    22          self.__do_layout()
    23
    24          self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self._on_list_item_deselected, self._LCTRL_items)
    25          self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_items)
    26          self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_list_item_activated, self._LCTRL_items)
    27          self.Bind(wx.EVT_LIST_ITEM_FOCUSED, self._on_list_item_focused, self._LCTRL_items)
    28          self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add)
    29          self.Bind(wx.EVT_BUTTON, self._on_edit_button_pressed, self._BTN_edit)
    30          self.Bind(wx.EVT_BUTTON, self._on_remove_button_pressed, self._BTN_remove)
    31          # end wxGlade
    32
    33 -    def __set_properties(self):
    34          # begin wxGlade: wxgGenericListManagerPnl.__set_properties
    35          self.SetScrollRate(10, 10)
    36          self._BTN_add.SetToolTipString(_("Add a new item to the list."))
    37          self._BTN_add.Enable(False)
    38          self._BTN_edit.SetToolTipString(_("Edit the selected item."))
    39          self._BTN_edit.Enable(False)
    40          self._BTN_remove.SetToolTipString(_("Remove the selected item(s) from the list."))
    41          self._BTN_remove.Enable(False)
    42          # end wxGlade
    43
    44 -    def __do_layout(self):
    45          # begin wxGlade: wxgGenericListManagerPnl.__do_layout
    46          __szr_main = wx.BoxSizer(wx.VERTICAL)
    47          __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    48          __szr_main.Add(self._LBL_message, 0, wx.BOTTOM|wx.EXPAND, 3)
    49          __szr_main.Add(self._LCTRL_items, 1, wx.EXPAND, 0)
    50          __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0)
    51          __szr_buttons.Add(self._BTN_add, 0, 0, 0)
    52          __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    53          __szr_buttons.Add(self._BTN_edit, 0, 0, 0)
    54          __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
    55          __szr_buttons.Add(self._BTN_remove, 0, 0, 0)
    56          __szr_buttons.Add((20, 20), 2, wx.EXPAND, 0)
    57          __szr_main.Add(__szr_buttons, 0, wx.TOP|wx.EXPAND, 3)
    58          self.SetSizer(__szr_main)
    59          __szr_main.Fit(self)
    60          # end wxGlade
    61
    62 -    def _on_list_item_deselected(self, event): # wxGlade: wxgGenericListManagerPnl.<event_handler>
    63          print "Event handler `_on_list_item_deselected' not implemented!"
    64          event.Skip()
    65
    66 -    def _on_list_item_selected(self, event): # wxGlade: wxgGenericListManagerPnl.<event_handler>
    67          print "Event handler `_on_list_item_selected' not implemented!"
    68          event.Skip()
    69
    70 -    def _on_list_item_activated(self, event): # wxGlade: wxgGenericListManagerPnl.<event_handler>
    71          print "Event handler `_on_list_item_activated' not implemented!"
    72          event.Skip()
    73
    74 -    def _on_add_button_pressed(self, event): # wxGlade: wxgGenericListManagerPnl.<event_handler>
    75          print "Event handler `_on_add_button_pressed' not implemented!"
    76          event.Skip()
    77
    78 -    def _on_edit_button_pressed(self, event): # wxGlade: wxgGenericListManagerPnl.<event_handler>
    79          print "Event handler `_on_edit_button_pressed' not implemented!"
    80          event.Skip()
    81
    82 -    def _on_remove_button_pressed(self, event): # wxGlade: wxgGenericListManagerPnl.<event_handler>
    83          print "Event handler `_on_remove_button_pressed' not implemented!"
    84          event.Skip()
    85
    86 -    def _on_list_item_focused(self, event): # wxGlade: wxgGenericListManagerPnl.<event_handler>
    87          print "Event handler `_on_list_item_focused' not implemented"
    88          event.Skip()
    89
    90  # end of class wxgGenericListManagerPnl
    91