1
2
3
4
5
6 import wx
7
8
9 import gettext
10
11
12
13 from Gnumed.wxpython.gmTextCtrl import cTextCtrl
14
15
16
19
20 kwds["style"] = kwds.get("style", 0) | wx.BORDER_NONE | wx.TAB_TRAVERSAL
21 wx.ScrolledWindow.__init__(self, *args, **kwds)
22 self._RBTN_by_encounter = wx.RadioButton(self, wx.ID_ANY, _("&Encounter"))
23 self._RBTN_by_last_modified = wx.RadioButton(self, wx.ID_ANY, _("&Last modification time"))
24 self._BTN_search = wx.Button(self, wx.ID_FIND, "", style=wx.BU_EXACTFIT)
25 self._SLINE_top = wx.StaticLine(self, wx.ID_ANY)
26 self._TCTRL_journal = cTextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
27
28 self.__set_properties()
29 self.__do_layout()
30
31 self.Bind(wx.EVT_RADIOBUTTON, self._on_order_by_encounter_selected, self._RBTN_by_encounter)
32 self.Bind(wx.EVT_RADIOBUTTON, self._on_order_by_last_mod_selected, self._RBTN_by_last_modified)
33 self.Bind(wx.EVT_BUTTON, self._on_button_find_pressed, self._BTN_search)
34
35
37
38 self.SetScrollRate(10, 10)
39 self._RBTN_by_encounter.SetToolTip(_("Show journal ordered by encounter."))
40 self._RBTN_by_encounter.SetValue(1)
41 self._RBTN_by_last_modified.SetToolTip(_("Show journal ordered by time of last modification."))
42 self._BTN_search.SetToolTip(_("Show search dialog."))
43 self._TCTRL_journal.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND))
44 self._TCTRL_journal.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, ""))
45 self._TCTRL_journal.SetFocus()
46
47
49
50 __szr_main = wx.BoxSizer(wx.VERTICAL)
51 __szr_top = wx.BoxSizer(wx.HORIZONTAL)
52 __lbl_mode = wx.StaticText(self, wx.ID_ANY, _("Order by:"))
53 __szr_top.Add(__lbl_mode, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
54 __szr_top.Add(self._RBTN_by_encounter, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 5)
55 __szr_top.Add(self._RBTN_by_last_modified, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
56 __szr_top.Add(self._BTN_search, 0, wx.ALIGN_CENTER_VERTICAL, 0)
57 __szr_main.Add(__szr_top, 0, wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, 3)
58 __szr_main.Add(self._SLINE_top, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.EXPAND, 0)
59 __szr_main.Add(self._TCTRL_journal, 1, wx.ALL | wx.EXPAND, 3)
60 self.SetSizer(__szr_main)
61 __szr_main.Fit(self)
62 self.Layout()
63
64
66 print("Event handler '_on_order_by_encounter_selected' not implemented!")
67 event.Skip()
68
70 print("Event handler '_on_order_by_last_mod_selected' not implemented!")
71 event.Skip()
72
74 print("Event handler '_on_button_find_pressed' not implemented!")
75 event.Skip()
76
77
78