#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.7.0
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
from Gnumed.wxpython.gmTextCtrl import cTextCtrl
# end wxGlade


class wxgEMRJournalPluginPnl(wx.ScrolledWindow):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgEMRJournalPluginPnl.__init__
		kwds["style"] = wx.BORDER_NONE | wx.TAB_TRAVERSAL
		wx.ScrolledWindow.__init__(self, *args, **kwds)
		self._RBTN_by_encounter = wx.RadioButton(self, wx.ID_ANY, _("&Encounter"))
		self._RBTN_by_last_modified = wx.RadioButton(self, wx.ID_ANY, _("&Last modification time"))
		self._BTN_search = wx.Button(self, wx.ID_FIND, "", style=wx.BU_EXACTFIT)
		self._SLINE_top = wx.StaticLine(self, wx.ID_ANY)
		self._TCTRL_journal = cTextCtrl(self, wx.ID_ANY, "", style=wx.BORDER_NONE | wx.TE_MULTILINE | wx.TE_READONLY)

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_RADIOBUTTON, self._on_order_by_encounter_selected, self._RBTN_by_encounter)
		self.Bind(wx.EVT_RADIOBUTTON, self._on_order_by_last_mod_selected, self._RBTN_by_last_modified)
		self.Bind(wx.EVT_BUTTON, self._on_button_find_pressed, self._BTN_search)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgEMRJournalPluginPnl.__set_properties
		self.SetScrollRate(10, 10)
		self._RBTN_by_encounter.SetToolTipString(_("Show journal ordered by encounter."))
		self._RBTN_by_encounter.SetValue(1)
		self._RBTN_by_last_modified.SetToolTipString(_("Show journal ordered by time of last modification."))
		self._BTN_search.SetToolTipString(_("Show search dialog."))
		self._TCTRL_journal.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
		self._TCTRL_journal.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, ""))
		self._TCTRL_journal.SetFocus()
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgEMRJournalPluginPnl.__do_layout
		__szr_main = wx.BoxSizer(wx.VERTICAL)
		__szr_top = wx.BoxSizer(wx.HORIZONTAL)
		__lbl_mode = wx.StaticText(self, wx.ID_ANY, _("Order by:"))
		__szr_top.Add(__lbl_mode, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_top.Add(self._RBTN_by_encounter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
		__szr_top.Add(self._RBTN_by_last_modified, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
		__szr_top.Add(self._BTN_search, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_main.Add(__szr_top, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
		__szr_main.Add(self._SLINE_top, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.EXPAND, 0)
		__szr_main.Add(self._TCTRL_journal, 1, wx.ALL | wx.EXPAND, 3)
		self.SetSizer(__szr_main)
		__szr_main.Fit(self)
		self.Layout()
		# end wxGlade

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

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

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

# end of class wxgEMRJournalPluginPnl
