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

# Source Code for Module Gnumed.wxGladeWidgets.wxgItemPickerDlg

      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 wxgItemPickerDlg(wx.Dialog):
     17 -        def __init__(self, *args, **kwds):
     18                  # begin wxGlade: wxgItemPickerDlg.__init__
     19                  kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER
     20                  wx.Dialog.__init__(self, *args, **kwds)
     21                  self.SetSize((735, 350))
     22                  self._LBL_msg = wx.StaticText(self, wx.ID_ANY, _("label_1"))
     23                  from Gnumed.wxpython.gmListWidgets import cReportListCtrl
     24                  self._LCTRL_left = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
     25                  self._BTN_left2right = wx.Button(self, wx.ID_ANY, _(u"\u2192"), style=wx.BU_EXACTFIT)
     26                  self._BTN_right2left = wx.Button(self, wx.ID_ANY, _(u"\u2190"), style=wx.BU_EXACTFIT)
     27                  self._LCTRL_right = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
     28                  self._BTN_ok = wx.Button(self, wx.ID_OK, "")
     29                  self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
     30                  self._BTN_extra = wx.Button(self, wx.ID_ANY, _("Extra"), style=wx.BU_EXACTFIT)
     31
     32                  self.__set_properties()
     33                  self.__do_layout()
     34
     35                  self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self._on_left_list_item_deselected, self._LCTRL_left)
     36                  self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_left_list_item_selected, self._LCTRL_left)
     37                  self.Bind(wx.EVT_BUTTON, self._on_button_left2right_pressed, self._BTN_left2right)
     38                  self.Bind(wx.EVT_BUTTON, self._on_button_right2left_pressed, self._BTN_right2left)
     39                  self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self._on_right_list_item_deselected, self._LCTRL_right)
     40                  self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_right_list_item_selected, self._LCTRL_right)
     41                  self.Bind(wx.EVT_BUTTON, self._on_extra_button_pressed, self._BTN_extra)
     42                  # end wxGlade
     43
     44 -        def __set_properties(self):
     45                  # begin wxGlade: wxgItemPickerDlg.__set_properties
     46                  self.SetSize((735, 350))
     47                  self._BTN_left2right.SetFont(wx.Font(16, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
     48                  self._BTN_left2right.SetToolTip(_("Move selected items from left to right."))
     49                  self._BTN_left2right.Enable(False)
     50                  self._BTN_right2left.SetFont(wx.Font(16, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
     51                  self._BTN_right2left.SetToolTip(_("Move selected items from right to left."))
     52                  self._BTN_right2left.Enable(False)
     53                  self._BTN_cancel.SetToolTip(_("Cancel picking items."))
     54                  self._BTN_extra.Enable(False)
     55                  self._BTN_extra.Hide()
     56                  # end wxGlade
     57
     58 -        def __do_layout(self):
     59                  # begin wxGlade: wxgItemPickerDlg.__do_layout
     60                  __szr_main = wx.BoxSizer(wx.VERTICAL)
     61                  __szr_action_buttons = wx.BoxSizer(wx.HORIZONTAL)
     62                  __szr_lists = wx.BoxSizer(wx.HORIZONTAL)
     63                  __szr_move_buttons = wx.BoxSizer(wx.VERTICAL)
     64                  __szr_main.Add(self._LBL_msg, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
     65                  __szr_lists.Add(self._LCTRL_left, 1, wx.EXPAND, 0)
     66                  __szr_move_buttons.Add((20, 20), 2, wx.EXPAND, 0)
     67                  __szr_move_buttons.Add(self._BTN_left2right, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
     68                  __szr_move_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     69                  __szr_move_buttons.Add(self._BTN_right2left, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
     70                  __szr_move_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     71                  __szr_lists.Add(__szr_move_buttons, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 5)
     72                  __szr_lists.Add(self._LCTRL_right, 1, wx.EXPAND, 0)
     73                  __szr_main.Add(__szr_lists, 1, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
     74                  __szr_action_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     75                  __szr_action_buttons.Add(self._BTN_ok, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     76                  __szr_action_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     77                  __szr_action_buttons.Add(self._BTN_cancel, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     78                  __szr_action_buttons.Add((20, 20), 1, wx.EXPAND, 0)
     79                  __szr_action_buttons.Add(self._BTN_extra, 0, wx.ALIGN_CENTER_VERTICAL, 0)
     80                  __szr_action_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
     81                  __szr_main.Add(__szr_action_buttons, 0, wx.ALL | wx.EXPAND, 3)
     82                  self.SetSizer(__szr_main)
     83                  self.Layout()
     84                  # end wxGlade
     85
     86 -        def _on_left_list_item_deselected(self, event):  # wxGlade: wxgItemPickerDlg.<event_handler>
     87                  print("Event handler '_on_left_list_item_deselected' not implemented!")
     88                  event.Skip()
     89
     90 -        def _on_left_list_item_selected(self, event):  # wxGlade: wxgItemPickerDlg.<event_handler>
     91                  print("Event handler '_on_left_list_item_selected' not implemented!")
     92                  event.Skip()
     93
     94 -        def _on_button_left2right_pressed(self, event):  # wxGlade: wxgItemPickerDlg.<event_handler>
     95                  print("Event handler '_on_button_left2right_pressed' not implemented!")
     96                  event.Skip()
     97
     98 -        def _on_button_right2left_pressed(self, event):  # wxGlade: wxgItemPickerDlg.<event_handler>
     99                  print("Event handler '_on_button_right2left_pressed' not implemented!")
    100                  event.Skip()
    101
    102 -        def _on_right_list_item_deselected(self, event):  # wxGlade: wxgItemPickerDlg.<event_handler>
    103                  print("Event handler '_on_right_list_item_deselected' not implemented!")
    104                  event.Skip()
    105
    106 -        def _on_right_list_item_selected(self, event):  # wxGlade: wxgItemPickerDlg.<event_handler>
    107                  print("Event handler '_on_right_list_item_selected' not implemented!")
    108                  event.Skip()
    109
    110 -        def _on_extra_button_pressed(self, event):  # wxGlade: wxgItemPickerDlg.<event_handler>
    111                  print("Event handler '_on_extra_button_pressed' not implemented!")
    112                  event.Skip()
    113
    114  # end of class wxgItemPickerDlg
    115