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

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class wxgSplittedEMRTreeBrowserPnl(wx.Panel):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgSplittedEMRTreeBrowserPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL
		wx.Panel.__init__(self, *args, **kwds)
		self._splitter_browser = wx.SplitterWindow(self, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER)
		self.__pnl_left_side = wx.Panel(self._splitter_browser, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
		from Gnumed.wxpython.gmEMRBrowser import cScrolledEMRTreePnl
		self._pnl_emr_tree = cScrolledEMRTreePnl(self.__pnl_left_side, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
		self._PNL_right_side = wx.Panel(self._splitter_browser, wx.ID_ANY, style=wx.BORDER_NONE)
		self._RBTN_details = wx.RadioButton(self._PNL_right_side, wx.ID_ANY, _("S&ynopsis"))
		self._RBTN_journal = wx.RadioButton(self._PNL_right_side, wx.ID_ANY, _("&Journal"))
		self._RBTN_revisions = wx.RadioButton(self._PNL_right_side, wx.ID_ANY, _("Revisions"))
		self._BTN_switch_browse_edit = wx.Button(self._PNL_right_side, wx.ID_ANY, _("&Edit"), style=wx.BU_EXACTFIT)
		self._PNL_browse = wx.Panel(self._PNL_right_side, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
		self._TCTRL_item_details = wx.TextCtrl(self._PNL_browse, wx.ID_ANY, "", style=wx.HSCROLL | wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_WORDWRAP)
		from Gnumed.wxpython.gmVisualProgressNoteWidgets import cVisualSoapPresenterPnl
		self._PNL_visual_soap = cVisualSoapPresenterPnl(self._PNL_browse, wx.ID_ANY, style=wx.BORDER_NONE)
		from Gnumed.wxpython.gmNarrativeWidgets import cFancySoapEditorPnl
		self._PNL_edit = cFancySoapEditorPnl(self._PNL_right_side, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_RADIOBUTTON, self._on_show_details_selected, self._RBTN_details)
		self.Bind(wx.EVT_RADIOBUTTON, self._on_show_journal_selected, self._RBTN_journal)
		self.Bind(wx.EVT_RADIOBUTTON, self._on_show_revisions_selected, self._RBTN_revisions)
		self.Bind(wx.EVT_BUTTON, self._on_switch_browse_edit_button_pressed, self._BTN_switch_browse_edit)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgSplittedEMRTreeBrowserPnl.__set_properties
		self._pnl_emr_tree.SetScrollRate(10, 10)
		self._RBTN_details.SetToolTip(_("Show succinct item synopsis."))
		self._RBTN_details.SetValue(1)
		self._RBTN_journal.SetToolTip(_("Show item journal."))
		self._RBTN_revisions.SetToolTip(_("Show item revisions."))
		self._BTN_switch_browse_edit.SetToolTip(_("Press this button to switch back and forth between browsing and entering SOAP notes."))
		self._PNL_edit.Hide()
		self._splitter_browser.SetMinimumPaneSize(20)
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgSplittedEMRTreeBrowserPnl.__do_layout
		__szr_main = wx.BoxSizer(wx.HORIZONTAL)
		__szr_right_side = wx.BoxSizer(wx.VERTICAL)
		__szr_browse = wx.BoxSizer(wx.VERTICAL)
		__szr_item_details_options = wx.BoxSizer(wx.HORIZONTAL)
		__szr_left_side = wx.BoxSizer(wx.VERTICAL)
		__szr_left_side.Add(self._pnl_emr_tree, 1, wx.EXPAND, 0)
		self.__pnl_left_side.SetSizer(__szr_left_side)
		__lbl_show_mode = wx.StaticText(self._PNL_right_side, wx.ID_ANY, _("Show:"))
		__szr_item_details_options.Add(__lbl_show_mode, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_item_details_options.Add(self._RBTN_details, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_item_details_options.Add(self._RBTN_journal, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_item_details_options.Add(self._RBTN_revisions, 0, wx.ALIGN_CENTER_VERTICAL, 5)
		__szr_item_details_options.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__szr_item_details_options.Add(self._BTN_switch_browse_edit, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_right_side.Add(__szr_item_details_options, 0, wx.EXPAND, 0)
		__szr_browse.Add(self._TCTRL_item_details, 1, wx.EXPAND | wx.TOP, 3)
		__szr_browse.Add(self._PNL_visual_soap, 0, wx.EXPAND, 0)
		self._PNL_browse.SetSizer(__szr_browse)
		__szr_right_side.Add(self._PNL_browse, 1, wx.EXPAND, 0)
		__szr_right_side.Add(self._PNL_edit, 1, wx.EXPAND, 0)
		self._PNL_right_side.SetSizer(__szr_right_side)
		self._splitter_browser.SplitVertically(self.__pnl_left_side, self._PNL_right_side)
		__szr_main.Add(self._splitter_browser, 1, wx.EXPAND, 0)
		self.SetSizer(__szr_main)
		__szr_main.Fit(self)
		self.Layout()
		# end wxGlade

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

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

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

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

# end of class wxgSplittedEMRTreeBrowserPnl
