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

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
from Gnumed.wxpython.gmListWidgets import cReportListCtrl
# end wxGlade


class wxgMeasurementsByDayPnl(wx.Panel):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgMeasurementsByDayPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL
		wx.Panel.__init__(self, *args, **kwds)
		self._LCTRL_days = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
		self._LCTRL_results = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
		self._TCTRL_measurements = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_AUTO_URL | wx.TE_MULTILINE | wx.TE_READONLY)
		self._LBL_no_of_docs = wx.StaticText(self, wx.ID_ANY, _("Related documents: XX"))
		self._BTN_list_docs = wx.Button(self, wx.ID_ANY, _("List"))
		self._BTN_select_lab_doc_types = wx.Button(self, wx.ID_ANY, _("Select types"))

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days)
		self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_result_selected, self._LCTRL_results)
		self.Bind(wx.EVT_BUTTON, self._on_list_docs_button_pressed, self._BTN_list_docs)
		self.Bind(wx.EVT_BUTTON, self._on_select_lab_doc_types_pressed, self._BTN_select_lab_doc_types)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgMeasurementsByDayPnl.__set_properties
		self._TCTRL_measurements.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
		self._BTN_list_docs.SetToolTipString(_("List lab documents within the episode of the selected measurement."))
		self._BTN_list_docs.Enable(False)
		self._BTN_select_lab_doc_types.SetToolTipString(_("Select the document types expected to contain lab results."))
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgMeasurementsByDayPnl.__do_layout
		__szr_main = wx.BoxSizer(wx.HORIZONTAL)
		__szr_details = wx.BoxSizer(wx.VERTICAL)
		__szr_show_docs = wx.BoxSizer(wx.HORIZONTAL)
		__szr_main.Add(self._LCTRL_days, 2, wx.EXPAND | wx.RIGHT, 5)
		__szr_main.Add(self._LCTRL_results, 8, wx.EXPAND | wx.RIGHT, 5)
		__szr_details.Add(self._TCTRL_measurements, 1, wx.EXPAND, 0)
		__szr_show_docs.Add(self._LBL_no_of_docs, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_show_docs.Add(self._BTN_list_docs, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_show_docs.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__szr_show_docs.Add(self._BTN_select_lab_doc_types, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_details.Add(__szr_show_docs, 0, wx.EXPAND | wx.TOP, 3)
		__szr_main.Add(__szr_details, 10, wx.EXPAND, 0)
		self.SetSizer(__szr_main)
		__szr_main.Fit(self)
		self.Layout()
		# end wxGlade

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

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

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

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

# end of class wxgMeasurementsByDayPnl
