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

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class wxgSoapPluginPnl(wx.Panel):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgSoapPluginPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
		wx.Panel.__init__(self, *args, **kwds)
		self._splitter_main = wx.SplitterWindow(self, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER | wx.SP_PERMIT_UNSPLIT)
		self.__splitter_main_left_pnl = wx.Panel(self._splitter_main, wx.ID_ANY, style=wx.BORDER_NONE)
		self._splitter_left = wx.SplitterWindow(self.__splitter_main_left_pnl, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER | wx.SP_PERMIT_UNSPLIT)
		self.__splitter_left_top_pnl = wx.Panel(self._splitter_left, wx.ID_ANY, style=wx.BORDER_NONE)
		self._CHBOX_show_closed_episodes = wx.CheckBox(self.__splitter_left_top_pnl, wx.ID_ANY, _("Closed episodes"))
		self._CHBOX_irrelevant_issues = wx.CheckBox(self.__splitter_left_top_pnl, wx.ID_ANY, _("Non-relevant issues"))
		from Gnumed.wxpython.gmListWidgets import cReportListCtrl
		self._LCTRL_active_problems = cReportListCtrl(self.__splitter_left_top_pnl, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
		self.__splitter_left_bottom_pnl = wx.Panel(self._splitter_left, wx.ID_ANY, style=wx.BORDER_NONE)
		self._RBTN_notes_only = wx.RadioButton(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("Notes only"))
		self._RBTN_full_encounter = wx.RadioButton(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("Everything"))
		self._TCTRL_recent_notes = wx.TextCtrl(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("In this area GNUmed will place the notes of the\nprevious encounter as well as notes by other\nstaff for the current encounter.\n\nNote that this may change depending on which\nactive problem is selected in the editor below."), style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_WORDWRAP)
		from Gnumed.wxpython.gmNarrativeWidgets import cFancySoapEditorPnl
		self._PNL_editors = cFancySoapEditorPnl(self._splitter_main, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_CHECKBOX, self._on_show_closed_episodes_checked, self._CHBOX_show_closed_episodes)
		self.Bind(wx.EVT_CHECKBOX, self._on_irrelevant_issues_checked, self._CHBOX_irrelevant_issues)
		self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self._on_problem_activated, self._LCTRL_active_problems)
		self.Bind(wx.EVT_LIST_ITEM_FOCUSED, self._on_problem_focused, self._LCTRL_active_problems)
		self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_problem_selected, self._LCTRL_active_problems)
		self.Bind(wx.EVT_RADIOBUTTON, self._on_notes_only_selected, self._RBTN_notes_only)
		self.Bind(wx.EVT_RADIOBUTTON, self._on_full_encounter_selected, self._RBTN_full_encounter)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgSoapPluginPnl.__set_properties
		self._CHBOX_show_closed_episodes.SetToolTip(_("Show closed episodes as pseudo-problems ?"))
		self._CHBOX_irrelevant_issues.SetToolTip(_("Show issues marked clinically NOT relevant."))
		self._LCTRL_active_problems.SetToolTip(_("This shows the list of active problems, They include open episodes as well as active health issues."))
		self._RBTN_notes_only.SetToolTip(_("Show notes only (regarding the above problem)"))
		self._RBTN_notes_only.SetValue(1)
		self._RBTN_full_encounter.SetToolTip(_("Show full information (regarding above problem)"))
		self._TCTRL_recent_notes.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DFACE))
		self._splitter_left.SetMinimumPaneSize(20)
		self._splitter_main.SetMinimumPaneSize(20)
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgSoapPluginPnl.__do_layout
		__szr_main = wx.BoxSizer(wx.HORIZONTAL)
		__szr_left = wx.BoxSizer(wx.HORIZONTAL)
		self._SZR_recent_notes = wx.StaticBoxSizer(wx.StaticBox(self.__splitter_left_bottom_pnl, wx.ID_ANY, _("Most recent info on above problem")), wx.VERTICAL)
		__szr_most_recent_info_options = wx.BoxSizer(wx.HORIZONTAL)
		self._SZR_problem_list = wx.StaticBoxSizer(wx.StaticBox(self.__splitter_left_top_pnl, wx.ID_ANY, _("Active problems")), wx.VERTICAL)
		__szr_problem_filter = wx.BoxSizer(wx.HORIZONTAL)
		__lbl_problem_filter = wx.StaticText(self.__splitter_left_top_pnl, wx.ID_ANY, _("Include:"))
		__szr_problem_filter.Add(__lbl_problem_filter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
		__szr_problem_filter.Add(self._CHBOX_show_closed_episodes, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_problem_filter.Add(self._CHBOX_irrelevant_issues, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_problem_filter.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		self._SZR_problem_list.Add(__szr_problem_filter, 0, wx.EXPAND, 0)
		self._SZR_problem_list.Add(self._LCTRL_active_problems, 1, wx.EXPAND, 0)
		self.__splitter_left_top_pnl.SetSizer(self._SZR_problem_list)
		__szr_most_recent_info_options.Add(self._RBTN_notes_only, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_most_recent_info_options.Add(self._RBTN_full_encounter, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		self._SZR_recent_notes.Add(__szr_most_recent_info_options, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		self._SZR_recent_notes.Add(self._TCTRL_recent_notes, 1, wx.EXPAND | wx.TOP, 2)
		self.__splitter_left_bottom_pnl.SetSizer(self._SZR_recent_notes)
		self._splitter_left.SplitHorizontally(self.__splitter_left_top_pnl, self.__splitter_left_bottom_pnl)
		__szr_left.Add(self._splitter_left, 1, wx.EXPAND, 0)
		self.__splitter_main_left_pnl.SetSizer(__szr_left)
		self._splitter_main.SplitVertically(self.__splitter_main_left_pnl, self._PNL_editors)
		__szr_main.Add(self._splitter_main, 1, wx.EXPAND, 0)
		self.SetSizer(__szr_main)
		__szr_main.Fit(self)
		self.Layout()
		# end wxGlade

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

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

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

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

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

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

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

# end of class wxgSoapPluginPnl
