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

import wx

# begin wxGlade: extracode
# end wxGlade


class wxgGenericEditAreaDlg2(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: wxgGenericEditAreaDlg2.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.THICK_FRAME
        wx.Dialog.__init__(self, *args, **kwds)
        self._PNL_ea = wx.ScrolledWindow(self, -1, style=wx.NO_BORDER | wx.TAB_TRAVERSAL)
        self._TCTRL_status = wx.TextCtrl(self, -1, _("Info"), style=wx.TE_READONLY | wx.NO_BORDER)
        self._BTN_save = wx.Button(self, wx.ID_OK, "")
        self._BTN_extra_left = wx.Button(self, -1, _("left extra"), style=wx.BU_EXACTFIT)
        self._BTN_forward = wx.Button(self, -1, _("Add &another"))
        self._BTN_revert = wx.Button(self, wx.ID_REVERT_TO_SAVED, "")
        self._BTN_clear = wx.Button(self, wx.ID_CLEAR, "")
        self._BTN_cancel = wx.Button(self, wx.ID_CANCEL, "")
        self._BTN_lucky = wx.Button(self, -1, _("Lala !"), style=wx.BU_EXACTFIT)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self._on_save_button_pressed, self._BTN_save)
        self.Bind(wx.EVT_BUTTON, self._on_left_extra_button_pressed, self._BTN_extra_left)
        self.Bind(wx.EVT_BUTTON, self._on_forward_button_pressed, self._BTN_forward)
        self.Bind(wx.EVT_BUTTON, self._on_revert_button_pressed, self._BTN_revert)
        self.Bind(wx.EVT_BUTTON, self._on_clear_button_pressed, self._BTN_clear)
        self.Bind(wx.EVT_BUTTON, self._on_lucky_button_pressed, self._BTN_lucky)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: wxgGenericEditAreaDlg2.__set_properties
        self.SetTitle(_("GNUmed generic EditArea dialog"))
        self.SetSize(wx.DLG_SZE(self, (393, 201)))
        self.SetMinSize((450, 300))
        self._PNL_ea.SetScrollRate(10, 10)
        self._TCTRL_status.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
        self._TCTRL_status.SetForegroundColour(wx.Colour(255, 127, 0))
        self._BTN_save.SetToolTipString(_("Save the entered data into the database and close the dialog."))
        self._BTN_extra_left.SetToolTipString(_("Programmer forgot tooltip for left extra button."))
        self._BTN_extra_left.Hide()
        self._BTN_forward.SetToolTipString(_("Save data into database and clear fields for another value."))
        self._BTN_revert.SetToolTipString(_("Reset all fields to their previous values."))
        self._BTN_revert.Enable(False)
        self._BTN_revert.Hide()
        self._BTN_clear.SetToolTipString(_("Clear all fields."))
        self._BTN_cancel.SetToolTipString(_("Cancel editing the data and discard changes."))
        self._BTN_lucky.SetToolTipString(_("Press me !\n\n(This will NOT endanger any data.)"))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: wxgGenericEditAreaDlg2.__do_layout
        _szr_main = wx.BoxSizer(wx.VERTICAL)
        __szr_buttons = wx.BoxSizer(wx.HORIZONTAL)
        __szr_pnl_ea = wx.BoxSizer(wx.HORIZONTAL)
        __szr_pnl_ea.Add(self._PNL_ea, 1, wx.EXPAND, 0)
        _szr_main.Add(__szr_pnl_ea, 1, wx.ALL | wx.EXPAND, 5)
        _szr_main.Add(self._TCTRL_status, 0, wx.LEFT | wx.RIGHT | wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 10)
        __szr_buttons.Add(self._BTN_save, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
        __szr_buttons.Add(self._BTN_extra_left, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 3)
        __szr_buttons.Add(self._BTN_forward, 0, wx.ALIGN_CENTER_VERTICAL, 3)
        __szr_buttons.Add((20, 20), 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_buttons.Add(self._BTN_revert, 0, 0, 0)
        __szr_buttons.Add(self._BTN_clear, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_buttons.Add((20, 20), 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_buttons.Add(self._BTN_cancel, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_buttons.Add(self._BTN_lucky, 0, wx.LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
        _szr_main.Add(__szr_buttons, 0, wx.ALL | wx.EXPAND, 5)
        self.SetSizer(_szr_main)
        self.Layout()
        self.Centre()
        # end wxGlade

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

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

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

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

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

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

# end of class wxgGenericEditAreaDlg2
if __name__ == "__main__":
    import gettext
    gettext.install("app") # replace with the appropriate catalog name

    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    dialog_1 = wxgGenericEditAreaDlg2(None, -1, "")
    app.SetTopWindow(dialog_1)
    dialog_1.Show()
    app.MainLoop()
