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

import wx

# begin wxGlade: dependencies
import gettext
import wx.grid
# end wxGlade

# begin wxGlade: extracode
from Gnumed.wxpython.gmMedicationWidgets import cCurrentSubstancesGrid
# end wxGlade


class wxgCurrentSubstancesPnl(wx.ScrolledWindow):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgCurrentSubstancesPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
		wx.ScrolledWindow.__init__(self, *args, **kwds)
		self.SetScrollRate(10, 10)

		__szr_main = wx.BoxSizer(wx.VERTICAL)

		self._GSZR_lab = wx.GridSizer(0, 5, 2, 3)
		__szr_main.Add(self._GSZR_lab, 0, wx.EXPAND, 3)

		self._GSZR_lab.Add((0, 0), 0, 0, 0)

		self._GSZR_lab.Add((0, 0), 0, 0, 0)

		self._GSZR_lab.Add((0, 0), 0, 0, 0)

		self._HLINE_lab = wx.StaticLine(self, wx.ID_ANY)
		self._HLINE_lab.Hide()
		__szr_main.Add(self._HLINE_lab, 0, wx.BOTTOM | wx.EXPAND | wx.TOP, 2)

		__szr_grouping = wx.BoxSizer(wx.HORIZONTAL)
		__szr_main.Add(__szr_grouping, 0, wx.EXPAND, 0)

		__lbl_group = wx.StaticText(self, wx.ID_ANY, _("Sort by:"))
		__szr_grouping.Add(__lbl_group, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)

		self._CHCE_grouping = wx.Choice(self, wx.ID_ANY, choices=[_("einlangerstring einlangerstring")])
		self._CHCE_grouping.SetSelection(0)
		__szr_grouping.Add(self._CHCE_grouping, 0, wx.EXPAND, 0)

		__SLINE_grouping = wx.StaticLine(self, wx.ID_ANY, style=wx.LI_VERTICAL)
		__szr_grouping.Add(__SLINE_grouping, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 10)

		__lbl_filter = wx.StaticText(self, wx.ID_ANY, _("Include:"))
		__szr_grouping.Add(__lbl_filter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)

		self._CHBOX_show_inactive = wx.CheckBox(self, wx.ID_ANY, _("Inactive"))
		self._CHBOX_show_inactive.SetToolTip(_("Whether to show inactive substances, too, or only those which are assumed to currently be active."))
		self._CHBOX_show_inactive.SetValue(1)
		__szr_grouping.Add(self._CHBOX_show_inactive, 0, wx.EXPAND | wx.RIGHT, 5)

		self._CHBOX_show_unapproved = wx.CheckBox(self, wx.ID_ANY, _("Unapproved"))
		self._CHBOX_show_unapproved.SetToolTip(_("Whether to show all substances or only those the intake of which is approved of."))
		self._CHBOX_show_unapproved.SetValue(1)
		__szr_grouping.Add(self._CHBOX_show_unapproved, 0, wx.EXPAND, 5)

		__szr_grouping.Add((20, 20), 1, wx.EXPAND, 0)

		__szr_grid = wx.BoxSizer(wx.HORIZONTAL)
		__szr_main.Add(__szr_grid, 1, wx.EXPAND, 0)

		self._grid_substances = cCurrentSubstancesGrid(self, wx.ID_ANY, size=(1, 1))
		__szr_grid.Add(self._grid_substances, 1, wx.EXPAND | wx.TOP, 5)

		__szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
		__szr_main.Add(__szr_buttons, 0, wx.EXPAND | wx.TOP, 5)

		__szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)

		self._BTN_add = wx.Button(self, wx.ID_ADD, "", style=wx.BU_EXACTFIT)
		self._BTN_add.SetToolTip(_("Add a substance."))
		__szr_buttons.Add(self._BTN_add, 0, wx.EXPAND | wx.RIGHT, 5)

		self._BTN_edit = wx.Button(self, wx.ID_ANY, _("&Edit"), style=wx.BU_EXACTFIT)
		self._BTN_edit.SetToolTip(_("Edit the selected substance intake entry."))
		__szr_buttons.Add(self._BTN_edit, 0, wx.EXPAND | wx.RIGHT, 5)

		self._BTN_delete = wx.Button(self, wx.ID_DELETE, "", style=wx.BU_EXACTFIT)
		self._BTN_delete.SetToolTip(_("Remove a substance from the list."))
		__szr_buttons.Add(self._BTN_delete, 0, wx.EXPAND | wx.RIGHT, 5)

		self._BTN_allergy = wx.Button(self, wx.ID_ANY, _("Allergy"), style=wx.BU_EXACTFIT)
		self._BTN_allergy.SetToolTip(_("Discontinue selected entry due to an allergy or intolerance."))
		__szr_buttons.Add(self._BTN_allergy, 0, wx.EXPAND | wx.RIGHT, 5)

		self._BTN_info = wx.Button(self, wx.ID_ANY, _("Info"), style=wx.BU_EXACTFIT)
		self._BTN_info.SetToolTip(_("Show in-depth information on the selected substance if available."))
		__szr_buttons.Add(self._BTN_info, 0, wx.EXPAND, 5)

		__szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)

		self._BTN_heart = wx.Button(self, wx.ID_ANY, _(u"♥"), style=wx.BU_EXACTFIT)
		self._BTN_heart.SetFont(wx.Font(13, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
		self._BTN_heart.SetToolTip(_("Information on handling drugs in the presence of long Qt syndrome (%s)."))
		__szr_buttons.Add(self._BTN_heart, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)

		self._BTN_kidneys = wx.Button(self, wx.ID_ANY, _("Kidney"), style=wx.BU_EXACTFIT)
		self._BTN_kidneys.SetToolTip(_("Information on handling of drugs / the selected drug in the presence of renal insufficiency (%s)."))
		__szr_buttons.Add(self._BTN_kidneys, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)

		self._LBL_gfr = wx.StaticText(self, wx.ID_ANY, _("GFR: ?"))
		__szr_buttons.Add(self._LBL_gfr, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)

		self._BTN_interactions = wx.Button(self, wx.ID_ANY, _("&Interactions?"), style=wx.BU_EXACTFIT)
		self._BTN_interactions.SetToolTip(_("Check for interactions between selected drugs.\n\nIncludes all drugs if none selected."))
		__szr_buttons.Add(self._BTN_interactions, 0, wx.ALIGN_CENTER_VERTICAL, 5)

		__szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)

		self._BTN_rx = wx.Button(self, wx.ID_ANY, _(u"℞"), style=wx.BU_EXACTFIT)
		self._BTN_rx.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
		self._BTN_rx.SetToolTip(_("Write a prescription based on either of\n\n- the selected lines\n- a copy of the most recent prescription"))
		__szr_buttons.Add(self._BTN_rx, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)

		self._BTN_adr = wx.Button(self, wx.ID_ANY, _("ADR"), style=wx.BU_EXACTFIT)
		self._BTN_adr.SetToolTip(_("Report an Adverse Drug Reaction."))
		__szr_buttons.Add(self._BTN_adr, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)

		self._BTN_print = wx.Button(self, wx.ID_PRINT, "", style=wx.BU_EXACTFIT)
		self._BTN_print.SetToolTip(_("Print the medication list."))
		__szr_buttons.Add(self._BTN_print, 0, wx.ALIGN_CENTER_VERTICAL, 0)

		__szr_buttons.Add((20, 20), 1, wx.EXPAND, 0)

		self.SetSizer(__szr_main)
		__szr_main.Fit(self)

		self.Layout()

		self.Bind(wx.EVT_CHOICE, self._on_grouping_selected, self._CHCE_grouping)
		self.Bind(wx.EVT_CHECKBOX, self._on_show_inactive_checked, self._CHBOX_show_inactive)
		self.Bind(wx.EVT_CHECKBOX, self._on_show_unapproved_checked, self._CHBOX_show_unapproved)
		self.Bind(wx.EVT_BUTTON, self._on_add_button_pressed, self._BTN_add)
		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_allergy_button_pressed, self._BTN_allergy)
		self.Bind(wx.EVT_BUTTON, self._on_info_button_pressed, self._BTN_info)
		self.Bind(wx.EVT_BUTTON, self._on_button_heart_pressed, self._BTN_heart)
		self.Bind(wx.EVT_BUTTON, self._on_button_kidneys_pressed, self._BTN_kidneys)
		self.Bind(wx.EVT_BUTTON, self._on_interactions_button_pressed, self._BTN_interactions)
		self.Bind(wx.EVT_BUTTON, self._on_rx_button_pressed, self._BTN_rx)
		self.Bind(wx.EVT_BUTTON, self._on_adr_button_pressed, self._BTN_adr)
		self.Bind(wx.EVT_BUTTON, self._on_print_button_pressed, self._BTN_print)
		# end wxGlade

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# end of class wxgCurrentSubstancesPnl
