#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.4 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgSimpleSoapPluginPnl.wxg"

import wx

# begin wxGlade: extracode
# end wxGlade


class wxgSimpleSoapPluginPnl(wx.ScrolledWindow):
    def __init__(self, *args, **kwds):

        from Gnumed.wxpython.gmListWidgets import cReportListCtrl
        from Gnumed.wxpython.gmTextCtrl import cTextCtrl

        # begin wxGlade: wxgSimpleSoapPluginPnl.__init__
        kwds["style"] = wx.NO_BORDER | wx.TAB_TRAVERSAL
        wx.ScrolledWindow.__init__(self, *args, **kwds)
        self._splitter_main = wx.SplitterWindow(self, -1, style=wx.SP_3D | wx.SP_BORDER)
        self.__pnl_left = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER | wx.TAB_TRAVERSAL)
        self._LCTRL_problems = cReportListCtrl(self.__pnl_left, -1, style=wx.LC_REPORT | wx.LC_NO_HEADER | wx.LC_SINGLE_SEL | wx.NO_BORDER)
        self._BTN_add_problem = wx.Button(self.__pnl_left, -1, _("&Add"), style=wx.BU_EXACTFIT)
        self._BTN_edit_problem = wx.Button(self.__pnl_left, -1, _("&Edit"), style=wx.BU_EXACTFIT)
        self._BTN_delete_problem = wx.Button(self.__pnl_left, -1, _("&Delete"), style=wx.BU_EXACTFIT)
        self._TCTRL_soap_problem = wx.TextCtrl(self.__pnl_left, -1, _("<above, double-click problem to start entering SOAP note>"), style=wx.TE_READONLY | wx.NO_BORDER)
        self._TCTRL_soap = cTextCtrl(self.__pnl_left, -1, "", style=wx.TE_MULTILINE | wx.TE_WORDWRAP | wx.NO_BORDER)
        self._BTN_save_soap = wx.Button(self.__pnl_left, -1, _("&Save"), style=wx.BU_EXACTFIT)
        self._BTN_clear_soap = wx.Button(self.__pnl_left, -1, _("&Clear"), style=wx.BU_EXACTFIT)
        self.__pnl_right = wx.Panel(self._splitter_main, -1, style=wx.NO_BORDER | wx.TAB_TRAVERSAL)
        self._CHBOX_filter_by_problem = wx.CheckBox(self.__pnl_right, -1, _("&Filter by problem"))
        self._TCTRL_journal = wx.TextCtrl(self.__pnl_right, -1, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.NO_BORDER)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_list_item_selected, self._LCTRL_problems)
        self.Bind(wx.EVT_BUTTON, self._on_add_problem_button_pressed, self._BTN_add_problem)
        self.Bind(wx.EVT_BUTTON, self._on_edit_problem_button_pressed, self._BTN_edit_problem)
        self.Bind(wx.EVT_BUTTON, self._on_delete_problem_button_pressed, self._BTN_delete_problem)
        self.Bind(wx.EVT_BUTTON, self._on_save_soap_button_pressed, self._BTN_save_soap)
        self.Bind(wx.EVT_BUTTON, self._on_clear_soap_button_pressed, self._BTN_clear_soap)
        self.Bind(wx.EVT_CHECKBOX, self._on_filter_by_problem_checked, self._CHBOX_filter_by_problem)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: wxgSimpleSoapPluginPnl.__set_properties
        self.SetScrollRate(10, 10)
        self._BTN_add_problem.SetToolTipString(_("Add a problem to the problem list."))
        self._BTN_edit_problem.SetToolTipString(_("Edit the selected problem."))
        self._BTN_delete_problem.SetToolTipString(_("Delete the selected problem (only possible as long as there are no SOAP notes for it)."))
        self._TCTRL_soap_problem.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
        self._TCTRL_soap_problem.SetFont(wx.Font(8, wx.DEFAULT, wx.ITALIC, wx.NORMAL, 0, ""))
        self._TCTRL_soap.SetToolTipString(_("Enter your SOAP note here."))
        self._BTN_save_soap.SetToolTipString(_("Save the current SOAP note."))
        self._BTN_clear_soap.SetToolTipString(_("Clear the SOAP note."))
        self._CHBOX_filter_by_problem.SetToolTipString(_("Check this if you want to filter the journal by the problem selected on the left."))
        self._CHBOX_filter_by_problem.SetValue(1)
        self._TCTRL_journal.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: wxgSimpleSoapPluginPnl.__do_layout
        __szr_main = wx.BoxSizer(wx.VERTICAL)
        __szr_right = wx.BoxSizer(wx.VERTICAL)
        __szr_right_top = wx.BoxSizer(wx.HORIZONTAL)
        __szr_left = wx.BoxSizer(wx.VERTICAL)
        __szr_left_bottom_buttons = wx.BoxSizer(wx.HORIZONTAL)
        __szr_left_middle_buttons = wx.BoxSizer(wx.HORIZONTAL)
        __szr_left.Add(self._LCTRL_problems, 2, wx.RIGHT | wx.BOTTOM | wx.EXPAND, 2)
        __szr_left_middle_buttons.Add((20, 20), 1, wx.EXPAND, 0)
        __szr_left_middle_buttons.Add(self._BTN_add_problem, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
        __szr_left_middle_buttons.Add(self._BTN_edit_problem, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
        __szr_left_middle_buttons.Add(self._BTN_delete_problem, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_left_middle_buttons.Add((20, 20), 1, wx.EXPAND, 0)
        __szr_left.Add(__szr_left_middle_buttons, 0, wx.RIGHT | wx.BOTTOM | wx.EXPAND, 2)
        __szr_left.Add(self._TCTRL_soap_problem, 0, wx.RIGHT | wx.BOTTOM | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 2)
        __szr_left.Add(self._TCTRL_soap, 3, wx.RIGHT | wx.BOTTOM | wx.EXPAND, 2)
        __szr_left_bottom_buttons.Add((20, 20), 1, wx.EXPAND, 0)
        __szr_left_bottom_buttons.Add(self._BTN_save_soap, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
        __szr_left_bottom_buttons.Add(self._BTN_clear_soap, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_left_bottom_buttons.Add((20, 20), 1, wx.EXPAND, 0)
        __szr_left.Add(__szr_left_bottom_buttons, 0, wx.RIGHT | wx.EXPAND, 2)
        self.__pnl_left.SetSizer(__szr_left)
        __szr_right_top.Add(self._CHBOX_filter_by_problem, 1, wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_right.Add(__szr_right_top, 0, wx.LEFT | wx.BOTTOM | wx.EXPAND, 2)
        __szr_right.Add(self._TCTRL_journal, 1, wx.LEFT | wx.BOTTOM | wx.EXPAND, 2)
        self.__pnl_right.SetSizer(__szr_right)
        self._splitter_main.SplitVertically(self.__pnl_left, self.__pnl_right)
        __szr_main.Add(self._splitter_main, 1, wx.ALL | wx.EXPAND, 2)
        self.SetSizer(__szr_main)
        __szr_main.Fit(self)
        # end wxGlade

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

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

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

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

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

    def _on_list_item_selected(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
        print "Event handler `_on_list_item_selected' not implemented"
        event.Skip()

    def _on_delete_problem_button_pressed(self, event):  # wxGlade: wxgSimpleSoapPluginPnl.<event_handler>
        print "Event handler `_on_delete_problem_button_pressed' not implemented"
        event.Skip()

# end of class wxgSimpleSoapPluginPnl
