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

import wx

# begin wxGlade: extracode
# end wxGlade



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

        from Gnumed.wxpython import gmDocumentWidgets

        # begin wxGlade: wxgSelectablySortedDocTreePnl.__init__
        kwds["style"] = wx.TAB_TRAVERSAL
        wx.ScrolledWindow.__init__(self, *args, **kwds)
        self._rbtn_sort_by_age = wx.RadioButton(self, -1, _("age"), style=wx.RB_GROUP)
        self._rbtn_sort_by_review = wx.RadioButton(self, -1, _("review status"))
        self._rbtn_sort_by_episode = wx.RadioButton(self, -1, _("episode"))
        self._rbtn_sort_by_issue = wx.RadioButton(self, -1, _("health issue"))
        self._rbtn_sort_by_type = wx.RadioButton(self, -1, _("type"))
        self._doc_tree = gmDocumentWidgets.cDocTree(self, -1)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_age_selected, self._rbtn_sort_by_age)
        self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_review_selected, self._rbtn_sort_by_review)
        self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_episode_selected, self._rbtn_sort_by_episode)
        self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_issue_selected, self._rbtn_sort_by_issue)
        self.Bind(wx.EVT_RADIOBUTTON, self._on_sort_by_type_selected, self._rbtn_sort_by_type)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: wxgSelectablySortedDocTreePnl.__set_properties
        self.SetScrollRate(10, 10)
        self._rbtn_sort_by_age.SetToolTipString(_("Sort newest documents to top of tree."))
        self._rbtn_sort_by_age.SetValue(1)
        self._rbtn_sort_by_review.SetToolTipString(_("Sort unreviewed documents to top of tree."))
        self._rbtn_sort_by_episode.SetToolTipString(_("Sort documents by the episode they belong to."))
        self._rbtn_sort_by_issue.SetToolTipString(_("Sort documents by the health issue they belong to."))
        self._rbtn_sort_by_type.SetToolTipString(_("Sort documents by their type."))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: wxgSelectablySortedDocTreePnl.__do_layout
        __szr_main = wx.BoxSizer(wx.VERTICAL)
        __szr_top_radio = wx.BoxSizer(wx.HORIZONTAL)
        __lbl_sort = wx.StaticText(self, -1, _("Sort documents by"))
        __szr_top_radio.Add(__lbl_sort, 0, wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
        __szr_top_radio.Add(self._rbtn_sort_by_age, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
        __szr_top_radio.Add(self._rbtn_sort_by_review, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
        __szr_top_radio.Add(self._rbtn_sort_by_episode, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
        __szr_top_radio.Add(self._rbtn_sort_by_issue, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
        __szr_top_radio.Add(self._rbtn_sort_by_type, 0, wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 10)
        __szr_main.Add(__szr_top_radio, 0, wx.EXPAND, 0)
        __hline_middle = wx.StaticLine(self, -1)
        __szr_main.Add(__hline_middle, 0, wx.EXPAND, 0)
        __szr_main.Add(self._doc_tree, 1, wx.EXPAND, 0)
        self.SetSizer(__szr_main)
        __szr_main.Fit(self)
        # end wxGlade

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

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

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

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

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

# end of class wxgSelectablySortedDocTreePnl


