#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.5 on Tue Jun 12 19:31:26 2007 from /home/ncq/Projekte/gm-cvs/branches/HEAD/gnumed/gnumed/client/wxg/wxgGenericListSelectorDlg.wxg

import wx

class wxgGenericListSelectorDlg(wx.Dialog):
    def __init__(self, *args, **kwds):

        from Gnumed.wxpython import gmListWidgets

        # begin wxGlade: wxgGenericListSelectorDlg.__init__
        kwds["style"] = wx.CAPTION|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME
        wx.Dialog.__init__(self, *args, **kwds)
        self._LBL_message = wx.StaticText(self, -1, "")
        self._LCTRL_items = gmListWidgets.cReportListCtrl(self, -1, style=wx.LC_REPORT|wx.NO_BORDER)
        self._BTN_ok = wx.Button(self, wx.ID_OK, "")
        self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
        self._BTN_new = wx.Button(self, wx.ID_ADD, "", style=wx.BU_EXACTFIT)
        self._BTN_edit = wx.Button(self, -1, _("&Edit"), style=wx.BU_EXACTFIT)
        self._BTN_delete = wx.Button(self, wx.ID_DELETE, "", style=wx.BU_EXACTFIT)
        self._BTN_extra_left = wx.Button(self, -1, _("1"), style=wx.BU_EXACTFIT)
        self._BTN_extra_middle = wx.Button(self, -1, _("2"), style=wx.BU_EXACTFIT)
        self._BTN_extra_right = wx.Button(self, -1, _("3"), style=wx.BU_EXACTFIT)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self._on_list_item_deselected, self._LCTRL_items)
        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_items)
        self.Bind(wx.EVT_BUTTON, self._on_new_button_pressed, self._BTN_new)
        self.Bind(wx.EVT_BUTTON, self._on_edit_button_pressed, self._BTN_edit)
        self.Bind(wx.EVT_BUTTON, self._on_delete_button_pressed, self._BTN_delete)
        self.Bind(wx.EVT_BUTTON, self._on_left_extra_button_pressed, self._BTN_extra_left)
        self.Bind(wx.EVT_BUTTON, self._on_middle_extra_button_pressed, self._BTN_extra_middle)
        self.Bind(wx.EVT_BUTTON, self._on_right_extra_button_pressed, self._BTN_extra_right)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: wxgGenericListSelectorDlg.__set_properties
        self.SetSize((640, 500))
        self._LCTRL_items.SetToolTipString(_("Select the items you want to work on.\n\nA discontinuous selection may depend on your holding down a platform-dependent modifier key (<ctrl>, <alt>, etc) or key combination (eg. <ctrl-shift> or <ctrl-alt>) while clicking."))
        self._LCTRL_items.SetFocus()
        self._BTN_ok.SetToolTipString(_("Act on the items selected in the above list."))
        self._BTN_ok.Enable(False)
        self._BTN_cancel.SetToolTipString(_("Cancel this dialog."))
        self._BTN_cancel.SetDefault()
        self._BTN_new.SetToolTipString(_("Add a new item to the list above."))
        self._BTN_new.Enable(False)
        self._BTN_edit.SetToolTipString(_("Edit the (first or only) item selected in the list above."))
        self._BTN_edit.Enable(False)
        self._BTN_delete.SetToolTipString(_("Delete - if possible - the (first or only) item selected in the list above."))
        self._BTN_delete.Enable(False)
        self._BTN_extra_left.Enable(False)
        self._BTN_extra_middle.Enable(False)
        self._BTN_extra_right.Enable(False)
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: wxgGenericListSelectorDlg.__do_layout
        __szr_main = wx.BoxSizer(wx.VERTICAL)
        __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
        __szr_main.Add(self._LBL_message, 0, wx.LEFT|wx.RIGHT|wx.TOP|wx.EXPAND, 3)
        __szr_main.Add(self._LCTRL_items, 1, wx.ALL|wx.EXPAND, 3)
        __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
        __szr_buttons.Add(self._BTN_ok, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
        __szr_buttons.Add(self._BTN_cancel, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
        __szr_buttons.Add(self._BTN_new, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
        __szr_buttons.Add(self._BTN_edit, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
        __szr_buttons.Add(self._BTN_delete, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
        __szr_buttons.Add(self._BTN_extra_left, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
        __szr_buttons.Add(self._BTN_extra_middle, 0, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
        __szr_buttons.Add(self._BTN_extra_right, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5)
        __szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)
        __szr_main.Add(__szr_buttons, 0, wx.ALL|wx.EXPAND, 3)
        self.SetSizer(__szr_main)
        self.Layout()
        self.Centre()
        # end wxGlade

    def _on_list_item_deselected(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_list_item_deselected' not implemented!"
        event.Skip()

    def _on_list_item_selected(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_list_item_selected' not implemented!"
        event.Skip()

    def _on_ok_button_pressed(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_ok_button_pressed' not implemented!"
        event.Skip()

    def _on_edit_button_pressed(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_edit_button_pressed' not implemented"
        event.Skip()

    def _on_new_button_pressed(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_new_button_pressed' not implemented"
        event.Skip()

    def _on_delete_button_pressed(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_delete_button_pressed' not implemented"
        event.Skip()

    def _on_left_extra_button_pressed(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_left_extra_button_pressed' not implemented"
        event.Skip()

    def _on_middle_extra_button_pressed(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_middle_extra_button_pressed' not implemented"
        event.Skip()

    def _on_right_extra_button_pressed(self, event): # wxGlade: wxgGenericListSelectorDlg.<event_handler>
        print "Event handler `_on_right_extra_button_pressed' not implemented"
        event.Skip()

# end of class wxgGenericListSelectorDlg


if __name__ == "__main__":
    import gettext
    gettext.install("app") # replace with the appropriate catalog name

    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    dialog_1 = wxgGenericListSelectorDlg(None, -1, "")
    app.SetTopWindow(dialog_1)
    dialog_1.Show()
    app.MainLoop()
