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

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
from Gnumed.wxpython.gmEMRTimelineWidgets import cEMRTimelinePnl
# end wxGlade


class wxgEMRTimelinePluginPnl(wx.ScrolledWindow):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgEMRTimelinePluginPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
		wx.ScrolledWindow.__init__(self, *args, **kwds)
		self._PNL_timeline = cEMRTimelinePnl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.TAB_TRAVERSAL)
		self._BTN_refresh = wx.Button(self, wx.ID_REFRESH, "")
		self._BTN_save = wx.Button(self, wx.ID_SAVEAS, "")
		self._BTN_export_area = wx.Button(self, wx.ID_ANY, _("E&xport area"))
		self._BTN_print = wx.Button(self, wx.ID_PRINT, "")
		self._BTN_zoom_in = wx.Button(self, wx.ID_ZOOM_IN, "", style=wx.BU_EXACTFIT)
		self._BTN_zoom_out = wx.Button(self, wx.ID_ZOOM_OUT, "", style=wx.BU_EXACTFIT)
		self._BTN_fit_care_period = wx.Button(self, wx.ID_ANY, _("Care"), style=wx.BU_EXACTFIT)
		self._BTN_fit_last_year = wx.Button(self, wx.ID_ANY, _("12 mo"), style=wx.BU_EXACTFIT)
		self._BTN_go2day = wx.Button(self, wx.ID_ANY, _("Today"), style=wx.BU_EXACTFIT)
		self._BTN_fit_all = wx.Button(self, wx.ID_ANY, _("All"), style=wx.BU_EXACTFIT)

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_BUTTON, self._on_refresh_button_pressed, self._BTN_refresh)
		self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
		self.Bind(wx.EVT_BUTTON, self._on_export_area_button_pressed, self._BTN_export_area)
		self.Bind(wx.EVT_BUTTON, self._on_print_button_pressed, self._BTN_print)
		self.Bind(wx.EVT_BUTTON, self._on_zoom_in_button_pressed, self._BTN_zoom_in)
		self.Bind(wx.EVT_BUTTON, self._on_zoom_out_button_pressed, self._BTN_zoom_out)
		self.Bind(wx.EVT_BUTTON, self._on_zoom_fit_care_period_button_pressed, self._BTN_fit_care_period)
		self.Bind(wx.EVT_BUTTON, self._on_zoom_fit_last_year_button_pressed, self._BTN_fit_last_year)
		self.Bind(wx.EVT_BUTTON, self._on_go2day_button_pressed, self._BTN_go2day)
		self.Bind(wx.EVT_BUTTON, self._on_zoom_fit_all_button_pressed, self._BTN_fit_all)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgEMRTimelinePluginPnl.__set_properties
		self.SetScrollRate(10, 10)
		self._BTN_refresh.SetToolTip(_("Refresh display from the patient's chart."))
		self._BTN_save.SetToolTip(_("Save timeline as images."))
		self._BTN_export_area.SetToolTip(_("Put timeline into export area."))
		self._BTN_print.SetToolTip(_("Print timeline."))
		self._BTN_fit_care_period.SetToolTip(_("Fit timeline to the Care Period."))
		self._BTN_fit_last_year.SetToolTip(_("Fit timeline to the the last 12 months."))
		self._BTN_go2day.SetToolTip(_("Center timeline on today."))
		self._BTN_fit_all.SetToolTip(_("Zoom to fit all events."))
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgEMRTimelinePluginPnl.__do_layout
		__szr_main = wx.BoxSizer(wx.VERTICAL)
		__szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
		__szr_main.Add(self._PNL_timeline, 1, wx.ALIGN_CENTER_VERTICAL | wx.BOTTOM | wx.EXPAND, 3)
		__szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__szr_buttons.Add(self._BTN_refresh, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_save, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_export_area, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_print, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__szr_buttons.Add(self._BTN_zoom_in, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_zoom_out, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		_lbl_fit = wx.StaticText(self, wx.ID_ANY, _("Show:"))
		__szr_buttons.Add(_lbl_fit, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_fit_care_period, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_fit_last_year, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_go2day, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)
		__szr_buttons.Add(self._BTN_fit_all, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__szr_main.Add(__szr_buttons, 0, wx.EXPAND, 0)
		self.SetSizer(__szr_main)
		__szr_main.Fit(self)
		self.Layout()
		# end wxGlade

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

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

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

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

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

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

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

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

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

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

# end of class wxgEMRTimelinePluginPnl
