Gnumed.wxGladeWidgets.wxg3ButtonQuestionDlg

Package Gnumed :: Package wxGladeWidgets :: Module wxg3ButtonQuestionDlg |
[frames] | no frames]

# Source Code for Module Gnumed.wxGladeWidgets.wxg3ButtonQuestionDlg

     1  # -*- coding: UTF-8 -*-
     2  #
     3  # generated by wxGlade
     4  #
     5
     6  import wx
     7
     8  # begin wxGlade: dependencies
     9  import gettext
    10  # end wxGlade
    11
    12  # begin wxGlade: extracode
    13  # end wxGlade
    14
    15
    16 -class wxg3ButtonQuestionDlg(wx.Dialog):
    17 -        def __init__(self, *args, **kwds):
    18                  # begin wxGlade: wxg3ButtonQuestionDlg.__init__
    19                  kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER | wx.STAY_ON_TOP
    20                  wx.Dialog.__init__(self, *args, **kwds)
    21                  self._LBL_question = wx.StaticText(self, wx.ID_ANY, _("Put question here."))
    22                  self._CHBOX_dont_ask_again = wx.CheckBox(self, wx.ID_ANY, _("Remember and don't ask again."))
    23                  self._BTN_1 = wx.Button(self, wx.ID_YES, "")
    24                  self._BTN_2 = wx.Button(self, wx.ID_NO, "")
    25                  self._BTN_3 = wx.Button(self, wx.ID_CANCEL, "")
    26
    27                  self.__set_properties()
    28                  self.__do_layout()
    29
    30                  self.Bind(wx.EVT_BUTTON, self._on_BTN_1_pressed, self._BTN_1)
    31                  self.Bind(wx.EVT_BUTTON, self._on_BTN_2_pressed, self._BTN_2)
    32                  # end wxGlade
    33
    34 -        def __set_properties(self):
    35                  # begin wxGlade: wxg3ButtonQuestionDlg.__set_properties
    36                  self.SetTitle(_("Put caption here."))
    37                  self._CHBOX_dont_ask_again.SetToolTip(_("Check this if you want GNUmed to remember your decision and not ask you again."))
    38                  self._BTN_1.SetDefault()
    39                  # end wxGlade
    40
    41 -        def __do_layout(self):
    42                  # begin wxGlade: wxg3ButtonQuestionDlg.__do_layout
    43                  __szr_main = wx.BoxSizer(wx.VERTICAL)
    44                  __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
    45                  __szr_main.Add(self._LBL_question, 1, wx.ALL | wx.EXPAND, 10)
    46                  top_bottom_separator = wx.StaticLine(self, wx.ID_ANY)
    47                  __szr_main.Add(top_bottom_separator, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.LEFT | wx.RIGHT, 5)
    48                  __szr_main.Add(self._CHBOX_dont_ask_again, 0, wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT | wx.TOP, 10)
    49                  __szr_buttons.Add(self._BTN_1, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 3)
    50                  __szr_buttons.Add(self._BTN_2, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    51                  __szr_buttons.Add((20, 20), 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    52                  __szr_buttons.Add(self._BTN_3, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND, 0)
    53                  __szr_main.Add(__szr_buttons, 0, wx.ALL | wx.EXPAND, 10)
    54                  self.SetSizer(__szr_main)
    55                  __szr_main.Fit(self)
    56                  self.Layout()
    57                  self.Centre()
    58                  # end wxGlade
    59
    60 -        def _on_BTN_1_pressed(self, event):  # wxGlade: wxg3ButtonQuestionDlg.<event_handler>
    61                  print("Event handler '_on_BTN_1_pressed' not implemented!")
    62                  event.Skip()
    63
    64 -        def _on_BTN_2_pressed(self, event):  # wxGlade: wxg3ButtonQuestionDlg.<event_handler>
    65                  print("Event handler '_on_BTN_2_pressed' not implemented!")
    66                  event.Skip()
    67
    68  # end of class wxg3ButtonQuestionDlg
    69