Top

pyMez.Code.FrontEnds.EndOfDayDialog module

#End of Day Application
#This is needs to be updated. It is Ryan's program that I have turned into a dialog.
# 

#Todo:FIx this !!! it is broken
import wx
import wx.stc
import wx.richtext
import time
#import Frame
from xml.dom.minidom import parse
from os.path import normpath
import os
import sys
# Add pyMez to sys.path (this allows imports that don't go through pyMez/__init__.py
sys.path.append(os.path.join(os.path.dirname( __file__ ), '..','..'))
try:
    import Code.DataHandlers.XMLModels
except:
    print("Cannot find  pyMez.Code.DataHandlers.Logs")

[wxID_EndOfDayDialog, wxID_EndOfDayDialogCLEAR_FILE, wxID_EndOfDayDialogDATA_FLAG, 
 wxID_EndOfDayDialogFILE_CHOOSER, wxID_EndOfDayDialogFILE_CHOOSER2,wxID_EndOfDayDialogFILE_DISP,wxID_EndOfDayDialogFILE_DISP2,wxID_EndOfDayDialogQUEST1, 
 wxID_EndOfDayDialogQUEST2, wxID_EndOfDayDialogQUEST3, wxID_EndOfDayDialogQUEST4, 
 wxID_EndOfDayDialogQUEST5, wxID_EndOfDayDialogQUEST6, wxID_EndOfDayDialogRESP1, 
 wxID_EndOfDayDialogRESP2, wxID_EndOfDayDialogRESP3, wxID_EndOfDayDialogRESP4, 
 wxID_EndOfDayDialogRESP5, wxID_EndOfDayDialogRESP6, wxID_EndOfDayDialogSTATICBOX, 
 wxID_EndOfDayDialogSTATICLINE1, wxID_EndOfDayDialogSUBMIT, 
] = [wx.NewId() for _init_ctrls in range(22)]

TESTS_DIRECTORY=os.path.join(os.path.dirname(os.path.realpath(__file__)),'Tests')

class EndOfDayDialog(wx.Dialog):
    # Variables and Constants for the XML file
    file_list = ["None"];
    log_file="End_Of_Day_Log.xml";
    
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wxID_EndOfDayDialog, name='EndOfDayDialog',
              parent=prnt, pos=wx.Point(420, 108), size=wx.Size(545, 842),
              style=wx.DEFAULT_FRAME_STYLE, title='End Of Day')
        self.SetClientSize(wx.Size(537, 808))
        self.SetToolTipString('')
        self.SetBackgroundColour(wx.Colour(192, 192, 192))

        self.quest1 = wx.StaticText(id=wxID_EndOfDayDialogQUEST1,
              label='What did you do today?', name='quest1', parent=self,
              pos=wx.Point(16, 48), size=wx.Size(115, 13), style=0)
        self.quest1.SetToolTipString('')

        self.quest2 = wx.StaticText(id=wxID_EndOfDayDialogQUEST2,
              label='Who was involved?', name='quest2', parent=self,
              pos=wx.Point(16, 168), size=wx.Size(92, 13), style=0)
        self.quest2.SetToolTipString('The people involved')

        self.quest3 = wx.StaticText(id=wxID_EndOfDayDialogQUEST3,
              label='Who suggested it?', name='quest3', parent=self,
              pos=wx.Point(16, 240), size=wx.Size(89, 13), style=0)
        self.quest3.SetToolTipString('')

        self.quest4 = wx.StaticText(id=wxID_EndOfDayDialogQUEST4,
              label='Why was it done?', name='quest4', parent=self,
              pos=wx.Point(16, 304), size=wx.Size(85, 13), style=0)
        self.quest4.SetToolTipString('')

        self.quest5 = wx.StaticText(id=wxID_EndOfDayDialogQUEST5,
              label='What was the conclusion?', name='quest5', parent=self,
              pos=wx.Point(16, 432), size=wx.Size(124, 13), style=0)
        self.quest5.SetToolTipString('')

        self.resp1 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP1,
              parent=self, pos=wx.Point(152, 48), size=wx.Size(368, 88),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp1.SetLabel('text')
        self.resp1.SetName('resp1')

        self.quest6 = wx.StaticText(id=wxID_EndOfDayDialogQUEST6,
              label='Where is the data located?', name='quest6', parent=self,
              pos=wx.Point(16, 528), size=wx.Size(129, 13), style=0)
        self.quest6.SetToolTipString('')

        self.resp2 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP2,
              parent=self, pos=wx.Point(152, 168), size=wx.Size(368, 40),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp2.SetLabel('text')
        self.resp2.SetName('resp2')

        self.resp3 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP3,
              parent=self, pos=wx.Point(152, 240), size=wx.Size(368, 32),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp3.SetLabel('text')
        self.resp3.SetName('resp3')

        self.resp5 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP5,
              parent=self, pos=wx.Point(152, 432), size=wx.Size(368, 72),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp5.SetLabel('text')
        self.resp5.SetName('resp5')

        self.resp4 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP4,
              parent=self, pos=wx.Point(152, 304), size=wx.Size(368, 104),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp4.SetLabel('text')
        self.resp4.SetName('resp4')

        self.resp6 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP6,
              parent=self, pos=wx.Point(152, 528), size=wx.Size(368, 48),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp6.SetLabel('text')
        self.resp6.SetName('resp6')

        self.data_flag = wx.CheckBox(id=wxID_EndOfDayDialogDATA_FLAG,
              label='New Data', name='data_flag', parent=self, pos=wx.Point(64,
              608), size=wx.Size(70, 13), style=0)
        self.data_flag.SetValue(False)
        self.data_flag.SetToolTipString('Are there new data files?')
        self.data_flag.Bind(wx.EVT_CHECKBOX, self.OnData_flagCheckbox,
              id=wxID_EndOfDayDialogDATA_FLAG)

        self.submit = wx.Button(id=wxID_EndOfDayDialogSUBMIT, label='Submit',
              name='submit', parent=self, pos=wx.Point(280, 608),
              size=wx.Size(240, 23), style=0)
        self.submit.SetToolTipString('Submit Jounral Entry')
        self.submit.Bind(wx.EVT_BUTTON, self.OnSubmitButton,
              id=wxID_EndOfDayDialogSUBMIT)

        self.file_chooser = wx.Button(id=wxID_EndOfDayDialogFILE_CHOOSER,
              label='Add Files', name='file_chooser', parent=self,
              pos=wx.Point(144, 608), size=wx.Size(75, 23), style=0)
        self.file_chooser.SetToolTipString('Add Files')
        self.file_chooser.Enable(False)
        self.file_chooser.Bind(wx.EVT_BUTTON, self.OnFile_chooserButton,
              id=wxID_EndOfDayDialogFILE_CHOOSER)
              
              
        self.file_chooser2 = wx.Button(id=wxID_EndOfDayDialogFILE_CHOOSER2,
              label='Choose Log File', name='file_chooser2', parent=self,
              pos=wx.Point(16, 8), size=wx.Size(120, 23), style=0)
        self.file_chooser2.SetToolTipString('Add Files')
        self.file_chooser2.Enable(True)
        self.file_chooser2.Bind(wx.EVT_BUTTON, self.OnFile_chooserButton2,
              id=wxID_EndOfDayDialogFILE_CHOOSER2)
              
              
        self.clear_file = wx.Button(id=wxID_EndOfDayDialogCLEAR_FILE, label='Clear',
              name='clear_file', parent=self, pos=wx.Point(144, 640),
              size=wx.Size(75, 23), style=0)
        self.clear_file.SetToolTipString('Clear File List')
        self.clear_file.Enable(False)
        self.clear_file.Bind(wx.EVT_BUTTON, self.OnClear_fileButton,
              id=wxID_EndOfDayDialogCLEAR_FILE)
              
        self.staticLine2 = wx.StaticLine(id=wxID_EndOfDayDialogSTATICLINE1,
              name='staticLine2', parent=self, pos=wx.Point(16, 648),
              size=wx.Size(504, 0), style=0)

        self.staticbox = wx.StaticBox(id=wxID_EndOfDayDialogSTATICBOX,
              label='Submit', name='staticbox', parent=self, pos=wx.Point(256,
              592), size=wx.Size(272, 48), style=0)
        self.staticbox.SetToolTipString('')

        self.file_disp = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogFILE_DISP,
              parent=self, pos=wx.Point(40, 672), size=wx.Size(480, 112),
              style=wx.richtext.RE_MULTILINE,
              value='Click New Data to Enable Adding Files')
        self.file_disp.SetName('file_disp')
        self.file_disp.SetToolTipString('')
        self.file_disp.SetEditable(False)
        self.file_disp.Enable(True)
        self.file_disp.SetLabel('text')
        
        
        self.file_disp2 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogFILE_DISP2,
              parent=self, pos=wx.Point(152, 8), size=wx.Size(368, 25),
              style=wx.richtext.RE_MULTILINE,
              value="".join(self.log_file))
        self.file_disp2.SetName('file_disp')
        self.file_disp2.SetToolTipString('')
        self.file_disp2.SetEditable(False)
        self.file_disp2.Enable(True)
        self.file_disp2.SetLabel('text')
        

    def __init__(self, parent):
        self._init_ctrls(parent)
        self.log_File=os.path.join(TESTS_DIRECTORY,"EndOfDay.xml")

    def OnData_flagCheckbox(self, event):
        if self.data_flag.Value == False:
            self.file_chooser.Enable(False)
            self.clear_file.Enable(False)
            self.file_disp.Value="Click New Data to Enable Adding Files"
        else:
            self.file_chooser.Enable(True)
            self.clear_file.Enable(True)
            self.file_disp.Value="Current File List:\n"+"\n".join(self.file_list)
            

    def OnSubmitButton(self, event):
        dbl_check = wx.MessageDialog(self,"Are you sure you want to submit?","Confirm",wx.OK|wx.CANCEL)
        if dbl_check.ShowModal() == wx.ID_OK:
            self.XML_processing(self.log_file)
            self.Destroy()
        dbl_check.Destroy()

    def OnFile_chooserButton(self, event):
        file_dia = wx.FileDialog(self,"Pick your files",".","","*.*",wx.FD_MULTIPLE)
        if file_dia.ShowModal()==wx.ID_OK:
            self.temp_list=file_dia.GetPaths()
        file_dia.Destroy()
        if self.file_list == ["None"]:
            self.file_list = self.temp_list
        else:
            self.file_list.extend(self.temp_list)
        if self.data_flag.Value == True:
            self.file_disp.Value="Current File List:\n" + "\n".join(self.file_list)
            
    def OnFile_chooserButton2(self, event):
        file_dia = wx.FileDialog(self,"Pick your log file",".","","*.*",wx.OPEN)
        if file_dia.ShowModal()==wx.ID_OK:
            self.temp_file=file_dia.GetPath()
        self.log_file=normpath(self.temp_file)
        #file_dia.Destroy()
        self.file_disp2.Value=" ".join(self.log_file)
            
    def OnClear_fileButton(self, event):
        self.file_list = ["None"]
        self.file_disp.Value="Current File List:\n" + "\n".join(self.file_list)
        
    def XML_processing(self,xml_file):
        try:
            log=Code.DataHandlers.XMLModels.EndOfDayXMLLog(xml_file)
        except:
            options={"directory":TESTS_DIRECTORY,
                     "general_descriptor":"Log",
                     "specific_descriptor":"End_Of_Day"
                     }
            log=Code.DataHandlers.XMLModels.EndOfDayXMLLog(None,**options)
            log.path=os.path.join(TESTS_DIRECTORY,log.path)
        doc = log.document
        root = doc.documentElement
        log.add_entry()
        #print(log.path)
        Index=log.current_entry['Index']
        response={'Actions':self.resp1.Value,'Who_Did':self.resp2.Value
    ,'Who_Suggested':self.resp3.Value,'Why':self.resp4.Value,
    'Conclusion':self.resp5.Value,'Data_Location':self.resp6.Value}
        
        log.add_entry_information(Index,**response)
        # Take care of the files
        if self.data_flag.Value==True and self.file_list!=["None"]:
            for url in self.file_list:
                url="file:///"+url.replace('\\','/')
                log.add_entry_information(Index,**{'URL':url})
        
        log.save()

class BoaApp(wx.App):
    def OnInit(self):
        self.main =wx.Frame(None)
        dlg = EndOfDayDialog(self.main)
        try:
            if dlg.ShowModal() == wx.ID_OK:
                result = dlg.GetValue()
                 # Your code
        finally:
            dlg.Destroy()
        self.main.Show()
        self.SetTopWindow(self.main)
        return True

def main():
    application = BoaApp(0)
    application.MainLoop()

if __name__ == '__main__':
    main()

Functions

def main(

)

def main():
    application = BoaApp(0)
    application.MainLoop()

Classes

class BoaApp

The wx.App class represents the application and is used to:

  • bootstrap the wxPython system and initialize the underlying gui toolkit
  • set and get application-wide properties
  • implement the native windowing system main message or event loop, and to dispatch events to window instances
  • etc.

Every wx application must have a single wx.App instance, and all creation of UI objects should be delayed until after the wx.App object has been created in order to ensure that the gui platform and wxWidgets have been fully initialized.

Normally you would derive from this class and implement an OnInit method that creates a frame and then calls self.SetTopWindow(frame), however wx.App is also usable on it's own without derivation.

class BoaApp(wx.App):
    def OnInit(self):
        self.main =wx.Frame(None)
        dlg = EndOfDayDialog(self.main)
        try:
            if dlg.ShowModal() == wx.ID_OK:
                result = dlg.GetValue()
                 # Your code
        finally:
            dlg.Destroy()
        self.main.Show()
        self.SetTopWindow(self.main)
        return True

Ancestors (in MRO)

  • BoaApp
  • wx.core.App
  • wx._core.PyApp
  • wx._core.AppConsole
  • wx._core.EvtHandler
  • wx._core.Object
  • wx._core.Trackable
  • wx._core.EventFilter
  • sip.wrapper
  • sip.simplewrapper
  • builtins.object

Class variables

var Event_Ignore

var Event_Processed

var Event_Skip

var outputWindowClass

Static methods

def __init__(

self, redirect=False, filename=None, useBestVisual=False, clearSigInt=True)

Construct a wx.App object.

:param redirect: Should sys.stdout and sys.stderr be redirected? Defaults to False. If filename is None then output will be redirected to a window that pops up as needed. (You can control what kind of window is created for the output by resetting the class variable outputWindowClass to a class of your choosing.)

:param filename: The name of a file to redirect output to, if redirect is True.

:param useBestVisual: Should the app try to use the best available visual provided by the system (only relevant on systems that have more than one visual.) This parameter must be used instead of calling SetUseBestVisual later on because it must be set before the underlying GUI toolkit is initialized.

:param clearSigInt: Should SIGINT be cleared? This allows the app to terminate upon a Ctrl-C in the console like other GUI apps will.

:note: You should override OnInit to do application initialization to ensure that the system, toolkit and wxWidgets are fully initialized.

def __init__(self, redirect=False, filename=None, useBestVisual=False, clearSigInt=True):
    """
    Construct a ``wx.App`` object.
    
    :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
        redirected?  Defaults to False. If ``filename`` is None
        then output will be redirected to a window that pops up
        as needed.  (You can control what kind of window is created
        for the output by resetting the class variable
        ``outputWindowClass`` to a class of your choosing.)
    
    :param filename: The name of a file to redirect output to, if
        redirect is True.
    
    :param useBestVisual: Should the app try to use the best
        available visual provided by the system (only relevant on
        systems that have more than one visual.)  This parameter
        must be used instead of calling `SetUseBestVisual` later
        on because it must be set before the underlying GUI
        toolkit is initialized.
    
    :param clearSigInt: Should SIGINT be cleared?  This allows the
        app to terminate upon a Ctrl-C in the console like other
        GUI apps will.
    
    :note: You should override OnInit to do application
        initialization to ensure that the system, toolkit and
        wxWidgets are fully initialized.
    """
    PyApp.__init__(self)
    
    # make sure we can create a GUI
    if not self.IsDisplayAvailable():
    
        if wx.Port == "__WXMAC__":
            msg = "This program needs access to the screen. Please run with a\n" \
                  "Framework build of python, and only when you are logged in\n" \
                  "on the main display of your Mac."
    
        elif wx.Port == "__WXGTK__":
            msg ="Unable to access the X Display, is $DISPLAY set properly?"
    
        else:
            msg = "Unable to create GUI"
            # TODO: more description is needed for wxMSW...
    
        raise SystemExit(msg)
    
    # This has to be done before OnInit
    self.SetUseBestVisual(useBestVisual)
    
    # Set the default handler for SIGINT.  This fixes a problem
    # where if Ctrl-C is pressed in the console that started this
    # app then it will not appear to do anything, (not even send
    # KeyboardInterrupt???)  but will later segfault on exit.  By
    # setting the default handler then the app will exit, as
    # expected (depending on platform.)
    if clearSigInt:
        try:
            import signal
            signal.signal(signal.SIGINT, signal.SIG_DFL)
        except:
            pass
    
    # Save and redirect the stdio to a window?
    self.stdioWin = None
    self.saveStdio = (_sys.stdout, _sys.stderr)
    if redirect:
        self.RedirectStdio(filename)
    
    # Use Python's install prefix as the default
    prefix = _sys.prefix
    if isinstance(prefix, (bytes, bytearray)):
        prefix = prefix.decode(_sys.getfilesystemencoding())
    wx.StandardPaths.Get().SetInstallPrefix(prefix)
    
    # Until the new native control for wxMac is up to par, still use the generic one.
    wx.SystemOptions.SetOption("mac.listctrl.always_use_generic", 1)
    
    # This finishes the initialization of wxWindows and then calls
    # the OnInit that should be present in the derived class
    self._BootstrapApp()

def Bind(

self, event, handler, source=None, id=-1, id2=-1)

Bind an event to an event handler.

:param event: One of the EVT_* event binder objects that specifies the type of event to bind.

:param handler: A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler.

:param source: Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls.

:param id: Used to spcify the event source by ID instead of instance.

:param id2: Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.

def _EvtHandler_Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
    """
    Bind an event to an event handler.
    
    :param event: One of the ``EVT_*`` event binder objects that
                  specifies the type of event to bind.
    
    :param handler: A callable object to be invoked when the
                    event is delivered to self.  Pass ``None`` to
                    disconnect an event handler.
    
    :param source: Sometimes the event originates from a
                   different window than self, but you still
                   want to catch it in self.  (For example, a
                   button event delivered to a frame.)  By
                   passing the source of the event, the event
                   handling system is able to differentiate
                   between the same event type from different
                   controls.
    
    :param id: Used to spcify the event source by ID instead
               of instance.
    
    :param id2: Used when it is desirable to bind a handler
                to a range of IDs, such as with EVT_MENU_RANGE.
    """
    assert isinstance(event, wx.PyEventBinder)
    assert callable(handler) or handler is None
    assert source is None or hasattr(source, 'GetId')
    if source is not None:
        id  = source.GetId()
    event.Bind(self, id, id2, handler)

def Get(

)

A staticmethod returning the currently active application object. Essentially just a more pythonic version of :meth:GetApp.

@staticmethod
def Get():
    """
    A staticmethod returning the currently active application object.
    Essentially just a more pythonic version of :meth:`GetApp`.
    """
    return GetApp()

def MainLoop(

self)

Execute the main GUI event loop

def MainLoop(self):
    """
    Execute the main GUI event loop
    """
    rv = wx.PyApp.MainLoop(self)
    self.RestoreStdio()
    return rv

def OnInit(

self)

OnInit(self) -> bool

def OnInit(self):
    self.main =wx.Frame(None)
    dlg = EndOfDayDialog(self.main)
    try:
        if dlg.ShowModal() == wx.ID_OK:
            result = dlg.GetValue()
             # Your code
    finally:
        dlg.Destroy()
    self.main.Show()
    self.SetTopWindow(self.main)
    return True

def OnPreInit(

self)

Things that must be done after _BootstrapApp has done its thing, but would be nice if they were already done by the time that OnInit is called. This can be overridden in derived classes, but be sure to call this method from there.

def OnPreInit(self):
    """
    Things that must be done after _BootstrapApp has done its thing, but
    would be nice if they were already done by the time that OnInit is
    called.  This can be overridden in derived classes, but be sure to call
    this method from there.
    """
    wx.StockGDI._initStockObjects()

def RedirectStdio(

self, filename=None)

Redirect sys.stdout and sys.stderr to a file or a popup window.

def RedirectStdio(self, filename=None):
    """
    Redirect sys.stdout and sys.stderr to a file or a popup window.
    """
    if filename:
        _sys.stdout = _sys.stderr = open(filename, 'a')
    else:
        self.stdioWin = self.outputWindowClass()
        _sys.stdout = _sys.stderr = self.stdioWin

def RestoreStdio(

self)

def RestoreStdio(self):
    try:
        _sys.stdout, _sys.stderr = self.saveStdio
    except:
        pass

def SetOutputWindowAttributes(

self, title=None, pos=None, size=None)

Set the title, position and/or size of the output window if the stdio has been redirected. This should be called before any output would cause the output window to be created.

def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
    """
    Set the title, position and/or size of the output window if the stdio
    has been redirected. This should be called before any output would
    cause the output window to be created.
    """
    if self.stdioWin:
        if title is not None:
            self.stdioWin.title = title
        if pos is not None:
            self.stdioWin.pos = pos
        if size is not None:
            self.stdioWin.size = size

def SetTopWindow(

self, frame)

Set the "main" top level window, which will be used for the parent of the on-demand output window as well as for dialogs that do not have an explicit parent set.

def SetTopWindow(self, frame):
    """
    Set the "main" top level window, which will be used for the parent of
    the on-demand output window as well as for dialogs that do not have
    an explicit parent set.
    """
    if self.stdioWin:
        self.stdioWin.SetParent(frame)
    wx.PyApp.SetTopWindow(self, frame)

def Unbind(

self, event, source=None, id=-1, id2=-1, handler=None)

Disconnects the event handler binding for event from self. Returns True if successful.

def _EvtHandler_Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY, handler=None):
    """
    Disconnects the event handler binding for event from `self`.
    Returns ``True`` if successful.
    """
    if source is not None:
        id  = source.GetId()
    return event.Unbind(self, id, id2, handler)

Instance variables

var AppDisplayName

GetAppDisplayName() -> String

Returns the user-readable application name.

var AppName

GetAppName() -> String

Returns the application name.

var AssertMode

GetAssertMode() -> AppAssertMode

Returns the current mode for how the application responds to wx asserts.

var ClassInfo

GetClassInfo() -> ClassInfo

This virtual function is redefined for every class that requires run- time type information, when using the wxDECLARE_CLASS macro (or similar).

var ClassName

GetClassName() -> String

Gets the class name of the application.

var DisplayMode

GetDisplayMode() -> VideoMode

Get display mode that is used use.

var EvtHandlerEnabled

GetEvtHandlerEnabled() -> bool

Returns true if the event handler is enabled, false otherwise.

var ExitOnFrameDelete

GetExitOnFrameDelete() -> bool

Returns true if the application will exit when the top-level frame is deleted.

var LayoutDirection

GetLayoutDirection() -> LayoutDirection

Return the layout direction for the current locale or wxLayout_Default if it's unknown.

var NextHandler

GetNextHandler() -> EvtHandler

Returns the pointer to the next handler in the chain.

var PreviousHandler

GetPreviousHandler() -> EvtHandler

Returns the pointer to the previous handler in the chain.

var RefData

GetRefData() -> ObjectRefData

Returns the wxObject::m_refData pointer, i.e. the data referenced by this object.

var TopWindow

GetTopWindow() -> Window

Returns a pointer to the top window.

var Traits

GetTraits() -> AppTraits

Returns a pointer to the wxAppTraits object for the application.

var UseBestVisual

GetUseBestVisual() -> bool

Returns true if the application will use the best visual on systems that support different visuals, false otherwise.

var VendorDisplayName

GetVendorDisplayName() -> String

Returns the user-readable vendor name.

var VendorName

GetVendorName() -> String

Returns the application's vendor name.

class EndOfDayDialog

Dialog() Dialog(parent, id=ID_ANY, title=EmptyString, pos=DefaultPosition, size=DefaultSize, style=DEFAULT_DIALOG_STYLE, name=DialogNameStr)

A dialog box is a window with a title bar and sometimes a system menu, which can be moved around the screen.

class EndOfDayDialog(wx.Dialog):
    # Variables and Constants for the XML file
    file_list = ["None"];
    log_file="End_Of_Day_Log.xml";
    
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wxID_EndOfDayDialog, name='EndOfDayDialog',
              parent=prnt, pos=wx.Point(420, 108), size=wx.Size(545, 842),
              style=wx.DEFAULT_FRAME_STYLE, title='End Of Day')
        self.SetClientSize(wx.Size(537, 808))
        self.SetToolTipString('')
        self.SetBackgroundColour(wx.Colour(192, 192, 192))

        self.quest1 = wx.StaticText(id=wxID_EndOfDayDialogQUEST1,
              label='What did you do today?', name='quest1', parent=self,
              pos=wx.Point(16, 48), size=wx.Size(115, 13), style=0)
        self.quest1.SetToolTipString('')

        self.quest2 = wx.StaticText(id=wxID_EndOfDayDialogQUEST2,
              label='Who was involved?', name='quest2', parent=self,
              pos=wx.Point(16, 168), size=wx.Size(92, 13), style=0)
        self.quest2.SetToolTipString('The people involved')

        self.quest3 = wx.StaticText(id=wxID_EndOfDayDialogQUEST3,
              label='Who suggested it?', name='quest3', parent=self,
              pos=wx.Point(16, 240), size=wx.Size(89, 13), style=0)
        self.quest3.SetToolTipString('')

        self.quest4 = wx.StaticText(id=wxID_EndOfDayDialogQUEST4,
              label='Why was it done?', name='quest4', parent=self,
              pos=wx.Point(16, 304), size=wx.Size(85, 13), style=0)
        self.quest4.SetToolTipString('')

        self.quest5 = wx.StaticText(id=wxID_EndOfDayDialogQUEST5,
              label='What was the conclusion?', name='quest5', parent=self,
              pos=wx.Point(16, 432), size=wx.Size(124, 13), style=0)
        self.quest5.SetToolTipString('')

        self.resp1 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP1,
              parent=self, pos=wx.Point(152, 48), size=wx.Size(368, 88),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp1.SetLabel('text')
        self.resp1.SetName('resp1')

        self.quest6 = wx.StaticText(id=wxID_EndOfDayDialogQUEST6,
              label='Where is the data located?', name='quest6', parent=self,
              pos=wx.Point(16, 528), size=wx.Size(129, 13), style=0)
        self.quest6.SetToolTipString('')

        self.resp2 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP2,
              parent=self, pos=wx.Point(152, 168), size=wx.Size(368, 40),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp2.SetLabel('text')
        self.resp2.SetName('resp2')

        self.resp3 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP3,
              parent=self, pos=wx.Point(152, 240), size=wx.Size(368, 32),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp3.SetLabel('text')
        self.resp3.SetName('resp3')

        self.resp5 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP5,
              parent=self, pos=wx.Point(152, 432), size=wx.Size(368, 72),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp5.SetLabel('text')
        self.resp5.SetName('resp5')

        self.resp4 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP4,
              parent=self, pos=wx.Point(152, 304), size=wx.Size(368, 104),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp4.SetLabel('text')
        self.resp4.SetName('resp4')

        self.resp6 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogRESP6,
              parent=self, pos=wx.Point(152, 528), size=wx.Size(368, 48),
              style=wx.richtext.RE_MULTILINE, value='')
        self.resp6.SetLabel('text')
        self.resp6.SetName('resp6')

        self.data_flag = wx.CheckBox(id=wxID_EndOfDayDialogDATA_FLAG,
              label='New Data', name='data_flag', parent=self, pos=wx.Point(64,
              608), size=wx.Size(70, 13), style=0)
        self.data_flag.SetValue(False)
        self.data_flag.SetToolTipString('Are there new data files?')
        self.data_flag.Bind(wx.EVT_CHECKBOX, self.OnData_flagCheckbox,
              id=wxID_EndOfDayDialogDATA_FLAG)

        self.submit = wx.Button(id=wxID_EndOfDayDialogSUBMIT, label='Submit',
              name='submit', parent=self, pos=wx.Point(280, 608),
              size=wx.Size(240, 23), style=0)
        self.submit.SetToolTipString('Submit Jounral Entry')
        self.submit.Bind(wx.EVT_BUTTON, self.OnSubmitButton,
              id=wxID_EndOfDayDialogSUBMIT)

        self.file_chooser = wx.Button(id=wxID_EndOfDayDialogFILE_CHOOSER,
              label='Add Files', name='file_chooser', parent=self,
              pos=wx.Point(144, 608), size=wx.Size(75, 23), style=0)
        self.file_chooser.SetToolTipString('Add Files')
        self.file_chooser.Enable(False)
        self.file_chooser.Bind(wx.EVT_BUTTON, self.OnFile_chooserButton,
              id=wxID_EndOfDayDialogFILE_CHOOSER)
              
              
        self.file_chooser2 = wx.Button(id=wxID_EndOfDayDialogFILE_CHOOSER2,
              label='Choose Log File', name='file_chooser2', parent=self,
              pos=wx.Point(16, 8), size=wx.Size(120, 23), style=0)
        self.file_chooser2.SetToolTipString('Add Files')
        self.file_chooser2.Enable(True)
        self.file_chooser2.Bind(wx.EVT_BUTTON, self.OnFile_chooserButton2,
              id=wxID_EndOfDayDialogFILE_CHOOSER2)
              
              
        self.clear_file = wx.Button(id=wxID_EndOfDayDialogCLEAR_FILE, label='Clear',
              name='clear_file', parent=self, pos=wx.Point(144, 640),
              size=wx.Size(75, 23), style=0)
        self.clear_file.SetToolTipString('Clear File List')
        self.clear_file.Enable(False)
        self.clear_file.Bind(wx.EVT_BUTTON, self.OnClear_fileButton,
              id=wxID_EndOfDayDialogCLEAR_FILE)
              
        self.staticLine2 = wx.StaticLine(id=wxID_EndOfDayDialogSTATICLINE1,
              name='staticLine2', parent=self, pos=wx.Point(16, 648),
              size=wx.Size(504, 0), style=0)

        self.staticbox = wx.StaticBox(id=wxID_EndOfDayDialogSTATICBOX,
              label='Submit', name='staticbox', parent=self, pos=wx.Point(256,
              592), size=wx.Size(272, 48), style=0)
        self.staticbox.SetToolTipString('')

        self.file_disp = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogFILE_DISP,
              parent=self, pos=wx.Point(40, 672), size=wx.Size(480, 112),
              style=wx.richtext.RE_MULTILINE,
              value='Click New Data to Enable Adding Files')
        self.file_disp.SetName('file_disp')
        self.file_disp.SetToolTipString('')
        self.file_disp.SetEditable(False)
        self.file_disp.Enable(True)
        self.file_disp.SetLabel('text')
        
        
        self.file_disp2 = wx.richtext.RichTextCtrl(id=wxID_EndOfDayDialogFILE_DISP2,
              parent=self, pos=wx.Point(152, 8), size=wx.Size(368, 25),
              style=wx.richtext.RE_MULTILINE,
              value="".join(self.log_file))
        self.file_disp2.SetName('file_disp')
        self.file_disp2.SetToolTipString('')
        self.file_disp2.SetEditable(False)
        self.file_disp2.Enable(True)
        self.file_disp2.SetLabel('text')
        

    def __init__(self, parent):
        self._init_ctrls(parent)
        self.log_File=os.path.join(TESTS_DIRECTORY,"EndOfDay.xml")

    def OnData_flagCheckbox(self, event):
        if self.data_flag.Value == False:
            self.file_chooser.Enable(False)
            self.clear_file.Enable(False)
            self.file_disp.Value="Click New Data to Enable Adding Files"
        else:
            self.file_chooser.Enable(True)
            self.clear_file.Enable(True)
            self.file_disp.Value="Current File List:\n"+"\n".join(self.file_list)
            

    def OnSubmitButton(self, event):
        dbl_check = wx.MessageDialog(self,"Are you sure you want to submit?","Confirm",wx.OK|wx.CANCEL)
        if dbl_check.ShowModal() == wx.ID_OK:
            self.XML_processing(self.log_file)
            self.Destroy()
        dbl_check.Destroy()

    def OnFile_chooserButton(self, event):
        file_dia = wx.FileDialog(self,"Pick your files",".","","*.*",wx.FD_MULTIPLE)
        if file_dia.ShowModal()==wx.ID_OK:
            self.temp_list=file_dia.GetPaths()
        file_dia.Destroy()
        if self.file_list == ["None"]:
            self.file_list = self.temp_list
        else:
            self.file_list.extend(self.temp_list)
        if self.data_flag.Value == True:
            self.file_disp.Value="Current File List:\n" + "\n".join(self.file_list)
            
    def OnFile_chooserButton2(self, event):
        file_dia = wx.FileDialog(self,"Pick your log file",".","","*.*",wx.OPEN)
        if file_dia.ShowModal()==wx.ID_OK:
            self.temp_file=file_dia.GetPath()
        self.log_file=normpath(self.temp_file)
        #file_dia.Destroy()
        self.file_disp2.Value=" ".join(self.log_file)
            
    def OnClear_fileButton(self, event):
        self.file_list = ["None"]
        self.file_disp.Value="Current File List:\n" + "\n".join(self.file_list)
        
    def XML_processing(self,xml_file):
        try:
            log=Code.DataHandlers.XMLModels.EndOfDayXMLLog(xml_file)
        except:
            options={"directory":TESTS_DIRECTORY,
                     "general_descriptor":"Log",
                     "specific_descriptor":"End_Of_Day"
                     }
            log=Code.DataHandlers.XMLModels.EndOfDayXMLLog(None,**options)
            log.path=os.path.join(TESTS_DIRECTORY,log.path)
        doc = log.document
        root = doc.documentElement
        log.add_entry()
        #print(log.path)
        Index=log.current_entry['Index']
        response={'Actions':self.resp1.Value,'Who_Did':self.resp2.Value
    ,'Who_Suggested':self.resp3.Value,'Why':self.resp4.Value,
    'Conclusion':self.resp5.Value,'Data_Location':self.resp6.Value}
        
        log.add_entry_information(Index,**response)
        # Take care of the files
        if self.data_flag.Value==True and self.file_list!=["None"]:
            for url in self.file_list:
                url="file:///"+url.replace('\\','/')
                log.add_entry_information(Index,**{'URL':url})
        
        log.save()

Ancestors (in MRO)

  • EndOfDayDialog
  • wx._core.Dialog
  • wx._core.TopLevelWindow
  • wx._core.NonOwnedWindow
  • wx._core.Window
  • wx._core.WindowBase
  • wx._core.EvtHandler
  • wx._core.Object
  • wx._core.Trackable
  • sip.wrapper
  • sip.simplewrapper
  • builtins.object

Class variables

var ChildrenRepositioningGuard

var file_list

var log_file

Static methods

def __init__(

self, parent)

Initialize self. See help(type(self)) for accurate signature.

def __init__(self, parent):
    self._init_ctrls(parent)
    self.log_File=os.path.join(TESTS_DIRECTORY,"EndOfDay.xml")

def Bind(

self, event, handler, source=None, id=-1, id2=-1)

Bind an event to an event handler.

:param event: One of the EVT_* event binder objects that specifies the type of event to bind.

:param handler: A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler.

:param source: Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls.

:param id: Used to spcify the event source by ID instead of instance.

:param id2: Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.

def _EvtHandler_Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
    """
    Bind an event to an event handler.
    
    :param event: One of the ``EVT_*`` event binder objects that
                  specifies the type of event to bind.
    
    :param handler: A callable object to be invoked when the
                    event is delivered to self.  Pass ``None`` to
                    disconnect an event handler.
    
    :param source: Sometimes the event originates from a
                   different window than self, but you still
                   want to catch it in self.  (For example, a
                   button event delivered to a frame.)  By
                   passing the source of the event, the event
                   handling system is able to differentiate
                   between the same event type from different
                   controls.
    
    :param id: Used to spcify the event source by ID instead
               of instance.
    
    :param id2: Used when it is desirable to bind a handler
                to a range of IDs, such as with EVT_MENU_RANGE.
    """
    assert isinstance(event, wx.PyEventBinder)
    assert callable(handler) or handler is None
    assert source is None or hasattr(source, 'GetId')
    if source is not None:
        id  = source.GetId()
    event.Bind(self, id, id2, handler)

def ConvertDialogPointToPixels(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def ConvertDialogSizeToPixels(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def DLG_UNIT(

self, dlg_unit)

A convenience wrapper for :meth:ConvertDialogToPixels.

def _Window_DLG_UNIT(self, dlg_unit):
    """
    A convenience wrapper for :meth:`ConvertDialogToPixels`.
    """
    is_wxType = isinstance(dlg_unit, (wx.Size, wx.Point))
    pix = self.ConvertDialogToPixels(dlg_unit)
    if not is_wxType:
        pix = tuple(pix)
    return pix

def DestroyLater(

self)

Schedules the window to be destroyed in the near future.

This should be used whenever Destroy could happen too soon, such as when there may still be events for this window or its children waiting in the event queue.

def _Window_DestroyLater(self):
    """
    Schedules the window to be destroyed in the near future.
    
    This should be used whenever Destroy could happen too soon, such
    as when there may still be events for this window or its children
    waiting in the event queue.
    """
    self.Hide()
    wx.GetApp().ScheduleForDestruction(self)

def GetPositionTuple(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def GetSizeTuple(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def GetVirtualSizeTuple(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def MoveXY(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def OnClear_fileButton(

self, event)

def OnClear_fileButton(self, event):
    self.file_list = ["None"]
    self.file_disp.Value="Current File List:\n" + "\n".join(self.file_list)

def OnData_flagCheckbox(

self, event)

def OnData_flagCheckbox(self, event):
    if self.data_flag.Value == False:
        self.file_chooser.Enable(False)
        self.clear_file.Enable(False)
        self.file_disp.Value="Click New Data to Enable Adding Files"
    else:
        self.file_chooser.Enable(True)
        self.clear_file.Enable(True)
        self.file_disp.Value="Current File List:\n"+"\n".join(self.file_list)

def OnFile_chooserButton(

self, event)

def OnFile_chooserButton(self, event):
    file_dia = wx.FileDialog(self,"Pick your files",".","","*.*",wx.FD_MULTIPLE)
    if file_dia.ShowModal()==wx.ID_OK:
        self.temp_list=file_dia.GetPaths()
    file_dia.Destroy()
    if self.file_list == ["None"]:
        self.file_list = self.temp_list
    else:
        self.file_list.extend(self.temp_list)
    if self.data_flag.Value == True:
        self.file_disp.Value="Current File List:\n" + "\n".join(self.file_list)

def OnFile_chooserButton2(

self, event)

def OnFile_chooserButton2(self, event):
    file_dia = wx.FileDialog(self,"Pick your log file",".","","*.*",wx.OPEN)
    if file_dia.ShowModal()==wx.ID_OK:
        self.temp_file=file_dia.GetPath()
    self.log_file=normpath(self.temp_file)
    #file_dia.Destroy()
    self.file_disp2.Value=" ".join(self.log_file)

def OnSubmitButton(

self, event)

def OnSubmitButton(self, event):
    dbl_check = wx.MessageDialog(self,"Are you sure you want to submit?","Confirm",wx.OK|wx.CANCEL)
    if dbl_check.ShowModal() == wx.ID_OK:
        self.XML_processing(self.log_file)
        self.Destroy()
    dbl_check.Destroy()

def PostCreate(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def SetClientRect(

self, rect)

def _Window_SetClientRect(self, rect):
    return self.SetClientSize(rect)

def SetDimensions(

*args, **kw)

SetDimensions(x, y, width, height, sizeFlags=SIZE_AUTO)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def SetRect(

self, rect)

def _Window_SetRect(self, rect):
    return self.SetSize(rect)

def SetSizeHintsSz(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def SetSizeWH(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def SetToolTipString(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def SetVirtualSizeWH(

*args, **kw)

def deprecated_func(*args, **kw):
    warnings.warn("Call to deprecated item%s. %s" % (name, msg),
                  wxPyDeprecationWarning, stacklevel=2)
    if not kw:
        return item(*args)
    return item(*args, **kw)

def Unbind(

self, event, source=None, id=-1, id2=-1, handler=None)

Disconnects the event handler binding for event from self. Returns True if successful.

def _EvtHandler_Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY, handler=None):
    """
    Disconnects the event handler binding for event from `self`.
    Returns ``True`` if successful.
    """
    if source is not None:
        id  = source.GetId()
    return event.Unbind(self, id, id2, handler)

def XML_processing(

self, xml_file)

def XML_processing(self,xml_file):
    try:
        log=Code.DataHandlers.XMLModels.EndOfDayXMLLog(xml_file)
    except:
        options={"directory":TESTS_DIRECTORY,
                 "general_descriptor":"Log",
                 "specific_descriptor":"End_Of_Day"
                 }
        log=Code.DataHandlers.XMLModels.EndOfDayXMLLog(None,**options)
        log.path=os.path.join(TESTS_DIRECTORY,log.path)
    doc = log.document
    root = doc.documentElement
    log.add_entry()
    #print(log.path)
    Index=log.current_entry['Index']
    response={'Actions':self.resp1.Value,'Who_Did':self.resp2.Value
,'Who_Suggested':self.resp3.Value,'Why':self.resp4.Value,
'Conclusion':self.resp5.Value,'Data_Location':self.resp6.Value}
    
    log.add_entry_information(Index,**response)
    # Take care of the files
    if self.data_flag.Value==True and self.file_list!=["None"]:
        for url in self.file_list:
            url="file:///"+url.replace('\\','/')
            log.add_entry_information(Index,**{'URL':url})
    
    log.save()

Instance variables

var AcceleratorTable

GetAcceleratorTable() -> AcceleratorTable

Gets the accelerator table for this window.

var AffirmativeId

GetAffirmativeId() -> int

Gets the identifier of the button which works like standard OK button in this dialog.

var AutoLayout

GetAutoLayout() -> bool

Returns the sizer of which this window is a member, if any, otherwise NULL.

var BackgroundColour

GetBackgroundColour() -> Colour

Returns the background colour of the window.

var BackgroundStyle

GetBackgroundStyle() -> BackgroundStyle

Returns the background style of the window.

var BestSize

GetBestSize() -> Size

This functions returns the best acceptable minimal size for the window.

var BestVirtualSize

GetBestVirtualSize() -> Size

Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)

var Border

GetBorder(flags) -> Border GetBorder() -> Border

Get the window border style from the given flags: this is different from simply doing flags & wxBORDER_MASK because it uses GetDefaultBorder() to translate wxBORDER_DEFAULT to something reasonable.

var Caret

GetCaret() -> Caret

Returns the caret() associated with the window.

var CharHeight

GetCharHeight() -> int

Returns the character height for this window.

var CharWidth

GetCharWidth() -> int

Returns the average character width for this window.

var Children

GetChildren() -> WindowList

Returns a reference to the list of the window's children.

var ClassInfo

GetClassInfo() -> ClassInfo

This virtual function is redefined for every class that requires run- time type information, when using the wxDECLARE_CLASS macro (or similar).

var ClassName

GetClassName() -> Char

Returns the class name of the C++ class using wxRTTI.

var ClientAreaOrigin

GetClientAreaOrigin() -> Point

Get the origin of the client area of the window relative to the window top left corner (the client area may be shifted because of the borders, scrollbars, other decorations...)

var ClientRect

GetClientRect() -> Rect

Get the client rectangle in window (i.e. client) coordinates.

var ClientSize

GetClientSize() -> Size

Returns the size of the window 'client area' in pixels.

var Constraints

GetConstraints() -> LayoutConstraints

Returns a pointer to the window's layout constraints, or NULL if there are none.

var ContainingSizer

GetContainingSizer() -> Sizer

Returns the sizer of which this window is a member, if any, otherwise NULL.

var ContentWindow

GetContentWindow() -> Window

Override this to return a window containing the main content of the dialog.

var Cursor

GetCursor() -> Cursor

Return the cursor associated with this window.

var DefaultAttributes

GetDefaultAttributes() -> VisualAttributes

Currently this is the same as calling wxWindow::GetClassDefaultAttributes(wxWindow::GetWindowVariant()).

var DefaultItem

GetDefaultItem() -> Window

Returns a pointer to the button which is the default for this window, or NULL.

var DropTarget

GetDropTarget() -> DropTarget

Returns the associated drop target, which may be NULL.

var EffectiveMinSize

GetEffectiveMinSize() -> Size

Merges the window's best size into the min size and returns the result.

var Enabled

IsEnabled() -> bool

Returns true if the window is enabled, i.e. if it accepts user input, false otherwise.

var EscapeId

GetEscapeId() -> int

Gets the identifier of the button to map presses of ESC button to.

var EventHandler

GetEventHandler() -> EvtHandler

Returns the event handler for this window.

var EvtHandlerEnabled

GetEvtHandlerEnabled() -> bool

Returns true if the event handler is enabled, false otherwise.

var ExtraStyle

GetExtraStyle() -> long

Returns the extra style bits for the window.

var Font

GetFont() -> Font

Returns the font for this window.

var ForegroundColour

GetForegroundColour() -> Colour

Returns the foreground colour of the window.

var GrandParent

GetGrandParent() -> Window

Returns the grandparent of a window, or NULL if there isn't one.

var Handle

GetHandle() -> UIntPtr

Returns the platform-specific handle of the physical window.

var HelpText

GetHelpText() -> String

Gets the help text to be used as context-sensitive help for this window.

var Icon

GetIcon() -> Icon

Returns the standard icon of the window.

var Id

GetId() -> WindowID

Returns the identifier of the window.

var Label

GetLabel() -> String

Generic way of getting a label from any window, for identification purposes.

var LayoutAdaptationDone

GetLayoutAdaptationDone() -> bool

Returns true if the dialog has been adapted, usually by making it scrollable to work with a small display.

var LayoutAdaptationLevel

GetLayoutAdaptationLevel() -> int

Gets a value representing the aggressiveness of search for buttons and sizers to be in the non-scrolling part of a layout-adapted dialog.

var LayoutAdaptationMode

GetLayoutAdaptationMode() -> DialogLayoutAdaptationMode

Gets the adaptation mode, overriding the global adaptation flag.

var LayoutDirection

GetLayoutDirection() -> LayoutDirection

Returns the layout direction for this window, Note that wxLayout_Default is returned if layout direction is not supported.

var MacMetalAppearance

MacGetMetalAppearance() -> bool

var MainButtonIds

GetMainButtonIds() -> ArrayInt

Returns an array of identifiers to be regarded as the main buttons for the non-scrolling area of a dialog.

var MaxClientSize

GetMaxClientSize() -> Size

Returns the maximum size of window's client area.

var MaxHeight

GetMaxHeight() -> int

Returns the vertical component of window maximal size.

var MaxSize

GetMaxSize() -> Size

Returns the maximum size of the window.

var MaxWidth

GetMaxWidth() -> int

Returns the horizontal component of window maximal size.

var MinClientSize

GetMinClientSize() -> Size

Returns the minimum size of window's client area, an indication to the sizer layout mechanism that this is the minimum required size of its client area.

var MinHeight

GetMinHeight() -> int

Returns the vertical component of window minimal size.

var MinSize

GetMinSize() -> Size

Returns the minimum size of the window, an indication to the sizer layout mechanism that this is the minimum required size.

var MinWidth

GetMinWidth() -> int

Returns the horizontal component of window minimal size.

var Name

GetName() -> String

Returns the window's name.

var NextHandler

GetNextHandler() -> EvtHandler

Returns the pointer to the next handler in the chain.

var OSXModified

OSXIsModified() -> bool

Returns the current modified state of the wxTopLevelWindow on OS X.

var Parent

GetParent() -> Window

Returns the parent of the window, or NULL if there is no parent.

var Position

GetPosition() -> Point

This gets the position of the window in pixels, relative to the parent window for the child windows or relative to the display origin for the top level windows.

var PreviousHandler

GetPreviousHandler() -> EvtHandler

Returns the pointer to the previous handler in the chain.

var Rect

GetRect() -> Rect

Returns the position and size of the window as a wxRect object.

var RefData

GetRefData() -> ObjectRefData

Returns the wxObject::m_refData pointer, i.e. the data referenced by this object.

var ReturnCode

GetReturnCode() -> int

Gets the return code for this window.

var ScreenPosition

GetScreenPosition() -> Point

Returns the window position in screen coordinates, whether the window is a child window or a top level one.

var ScreenRect

GetScreenRect() -> Rect

Returns the position and size of the window on the screen as a wxRect object.

var Shown

IsShown() -> bool

Returns true if the window is shown, false if it has been hidden.

var Size

GetSize() -> Size

Returns the size of the entire window in pixels, including title bar, border, scrollbars, etc.

var Sizer

GetSizer() -> Sizer

Returns the sizer associated with the window by a previous call to SetSizer(), or NULL.

var ThemeEnabled

GetThemeEnabled() -> bool

Clears the window by filling it with the current background colour.

var Title

GetTitle() -> String

Gets a string containing the window title.

var TmpDefaultItem

GetTmpDefaultItem() -> Window

var ToolTip

GetToolTip() -> ToolTip

Get the associated tooltip or NULL if none.

var TopLevel

IsTopLevel() -> bool

Returns true if the given window is a top-level one.

var TopLevelParent

GetTopLevelParent() -> Window

Returns the first ancestor of this window which is a top-level window.

var UpdateClientRect

GetUpdateClientRect() -> Rect

Get the update rectangle bounding box in client coords.

var UpdateRegion

GetUpdateRegion() -> Region

Returns the region specifying which parts of the window have been damaged.

var Validator

GetValidator() -> Validator

Validator functions.

var VirtualSize

GetVirtualSize() -> Size

This gets the virtual size of the window in pixels.

var WindowStyle

GetWindowStyle() -> long

See GetWindowStyleFlag() for more info.

var WindowStyleFlag

GetWindowStyleFlag() -> long

Gets the window style that was passed to the constructor or Create() method.

var WindowVariant

GetWindowVariant() -> WindowVariant

Returns the value previously passed to SetWindowVariant().

var log_File

Module variables

var TESTS_DIRECTORY

var wxID_EndOfDayDialog

var wxID_EndOfDayDialogCLEAR_FILE

var wxID_EndOfDayDialogDATA_FLAG

var wxID_EndOfDayDialogFILE_CHOOSER

var wxID_EndOfDayDialogFILE_CHOOSER2

var wxID_EndOfDayDialogFILE_DISP

var wxID_EndOfDayDialogFILE_DISP2

var wxID_EndOfDayDialogQUEST1

var wxID_EndOfDayDialogQUEST2

var wxID_EndOfDayDialogQUEST3

var wxID_EndOfDayDialogQUEST4

var wxID_EndOfDayDialogQUEST5

var wxID_EndOfDayDialogQUEST6

var wxID_EndOfDayDialogRESP1

var wxID_EndOfDayDialogRESP2

var wxID_EndOfDayDialogRESP3

var wxID_EndOfDayDialogRESP4

var wxID_EndOfDayDialogRESP5

var wxID_EndOfDayDialogRESP6

var wxID_EndOfDayDialogSTATICBOX

var wxID_EndOfDayDialogSTATICLINE1

var wxID_EndOfDayDialogSUBMIT