# -*- coding: UTF-8 -*-
#
# generated by wxGlade
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class wxgPrintMgrPluginPnl(wx.Panel):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgPrintMgrPluginPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
		wx.Panel.__init__(self, *args, **kwds)
		self._RBTN_all_patients = wx.RadioButton(self, wx.ID_ANY, _("All patients"))
		self._RBTN_active_patient_only = wx.RadioButton(self, wx.ID_ANY, _("&Active patient only"))
		from Gnumed.wxpython.gmListWidgets import cReportListCtrl
		self._LCTRL_printouts = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
		self._BTN_view_printout = wx.Button(self, wx.ID_ANY, _("&View"), style=wx.BU_EXACTFIT)
		self._BTN_print_printouts = wx.Button(self, wx.ID_PRINT, "", style=wx.BU_EXACTFIT)
		self._BTN_export_printouts = wx.Button(self, wx.ID_ANY, _("&Export"), style=wx.BU_EXACTFIT)
		self._BTN_delete_printouts = wx.Button(self, wx.ID_DELETE, "", style=wx.BU_EXACTFIT)

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_RADIOBUTTON, self._on_all_patients_selected, self._RBTN_all_patients)
		self.Bind(wx.EVT_RADIOBUTTON, self._on_active_patient_only_selected, self._RBTN_active_patient_only)
		self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_printouts)
		self.Bind(wx.EVT_BUTTON, self._on_view_button_pressed, self._BTN_view_printout)
		self.Bind(wx.EVT_BUTTON, self._on_print_button_pressed, self._BTN_print_printouts)
		self.Bind(wx.EVT_BUTTON, self._on_export_button_pressed, self._BTN_export_printouts)
		self.Bind(wx.EVT_BUTTON, self._on_delete_button_pressed, self._BTN_delete_printouts)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgPrintMgrPluginPnl.__set_properties
		self._RBTN_all_patients.SetToolTip(_("Select here to show documents for all patients."))
		self._RBTN_all_patients.SetValue(1)
		self._RBTN_active_patient_only.SetToolTip(_("Select here to filter to the active patient (if any)."))
		self._RBTN_active_patient_only.Enable(False)
		self._BTN_view_printout.SetToolTip(_("Show the topmost selected printout."))
		self._BTN_print_printouts.SetToolTip(_("Print selected/all printouts."))
		self._BTN_export_printouts.SetToolTip(_("Store selected printouts in patient export area (if applicable)."))
		self._BTN_delete_printouts.SetToolTip(_("Delete the selected printouts"))
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgPrintMgrPluginPnl.__do_layout
		__szr_main = wx.BoxSizer(wx.VERTICAL)
		__szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
		__szr_top = wx.BoxSizer(wx.HORIZONTAL)
		__lbl_patient_filter = wx.StaticText(self, wx.ID_ANY, _("Show printouts for:"))
		__szr_top.Add(__lbl_patient_filter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_top.Add(self._RBTN_all_patients, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_top.Add(self._RBTN_active_patient_only, 0, wx.ALIGN_CENTER_VERTICAL, 5)
		__szr_top.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 3)
		__szr_main.Add(__szr_top, 0, wx.BOTTOM | wx.EXPAND, 3)
		__szr_main.Add(self._LCTRL_printouts, 1, wx.EXPAND, 5)
		__szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND, 0)
		__szr_buttons.Add(self._BTN_view_printout, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_print_printouts, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_export_printouts, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_delete_printouts, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 3)
		__szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND, 3)
		__szr_main.Add(__szr_buttons, 0, wx.EXPAND, 0)
		self.SetSizer(__szr_main)
		__szr_main.Fit(self)
		self.Layout()
		# end wxGlade

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

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

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

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

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

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

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

# end of class wxgPrintMgrPluginPnl
