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

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class wxgMeasurementOrgEAPnl(wx.ScrolledWindow):
	def __init__(self, *args, **kwds):
		# begin wxGlade: wxgMeasurementOrgEAPnl.__init__
		kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
		wx.ScrolledWindow.__init__(self, *args, **kwds)
		from Gnumed.wxpython.gmOrganizationWidgets import cOrgUnitPhraseWheel
		self._PRW_org_unit = cOrgUnitPhraseWheel(self, wx.ID_ANY, "")
		self._BTN_manage_orgs = wx.Button(self, wx.ID_ANY, _("&Manage orgs"), style=wx.BU_EXACTFIT)
		self._TCTRL_contact = wx.TextCtrl(self, wx.ID_ANY, "")
		self._TCTRL_comment = wx.TextCtrl(self, wx.ID_ANY, "")

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_BUTTON, self._on_manage_orgs_button_pressed, self._BTN_manage_orgs)
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: wxgMeasurementOrgEAPnl.__set_properties
		self.SetScrollRate(10, 10)
		self._BTN_manage_orgs.SetToolTip(_("Manage all organizations."))
		self._TCTRL_contact.SetToolTip(_("A way of contacting this lab, ideally a direct clinical contact.\n\nThis will be shown in the tooltip of test results originating from this lab."))
		self._TCTRL_comment.SetToolTip(_("A comment on this lab."))
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: wxgMeasurementOrgEAPnl.__do_layout
		_gszr_main = wx.FlexGridSizer(3, 2, 1, 3)
		__szr_org_details = wx.BoxSizer(wx.HORIZONTAL)
		__lbl_org = wx.StaticText(self, wx.ID_ANY, _("Org.Unit"))
		__lbl_org.SetForegroundColour(wx.Colour(255, 0, 0))
		_gszr_main.Add(__lbl_org, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		__szr_org_details.Add(self._PRW_org_unit, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
		__szr_org_details.Add(self._BTN_manage_orgs, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(__szr_org_details, 1, wx.EXPAND, 0)
		__lbl_contact = wx.StaticText(self, wx.ID_ANY, _("Contact"))
		_gszr_main.Add(__lbl_contact, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._TCTRL_contact, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		__lbl_comment = wx.StaticText(self, wx.ID_ANY, _("Comment"))
		_gszr_main.Add(__lbl_comment, 0, wx.ALIGN_CENTER_VERTICAL, 0)
		_gszr_main.Add(self._TCTRL_comment, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
		self.SetSizer(_gszr_main)
		_gszr_main.Fit(self)
		_gszr_main.AddGrowableCol(1)
		self.Layout()
		# end wxGlade

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

# end of class wxgMeasurementOrgEAPnl
