Add missing wx.NumberEntryDialog

This commit is contained in:
Scott Talbert
2018-05-01 20:02:17 -04:00
parent 9f056497e4
commit 49af2f9fbf
6 changed files with 17 additions and 6 deletions

View File

@@ -72,6 +72,8 @@ Changes in this release include the following:
* Ensure that the page exists in book controls GetPage and RemovePage methods.
At least one of the wx ports do not do this. (#830)
* Added missing wx.NumberEntryDialog

View File

@@ -336,7 +336,6 @@ NotebookEvent :class:`wx.BookCtrl
NotebookPage ``MISSING``
NotificationMessage :class:`wx.adv.NotificationMessage`
NullFileTypeInfo ``MISSING``
NumberEntryDialog ``MISSING``
Panel_GetClassDefaultAttributes :meth:`wx.Panel.GetClassDefaultAttributes <Window.GetClassDefaultAttributes>`
PCXHandler ``MISSING``
PlatformInformation_GetOperatingSystemDirectory :meth:`wx.PlatformInfo.GetOperatingSystemDirectory`

View File

@@ -2373,6 +2373,7 @@
"NullPalette":"wx.",
"NullPen":"wx.",
"NullRegion":"wx.",
"NumberEntryDialog":"wx.",
"NumericPropertyValidator":"wx.propgrid.",
"NumericType":"wx.propgrid.NumericPropertyValidator.",
"ODCB_DCLICK_CYCLES":"wx.adv.",

View File

@@ -17,8 +17,7 @@ DOCSTRING = ""
# The classes and/or the basename of the Doxygen XML files to be processed by
# this script.
ITEMS = [ 'numdlg_8h.xml',
ITEMS = [ 'wxNumberEntryDialog',
]
#---------------------------------------------------------------------------
@@ -34,6 +33,9 @@ def run():
module.addHeaderCode('#include <wx/numdlg.h>')
c = module.find('wxNumberEntryDialog')
tools.fixTopLevelWindowClass(c)
c = module.find('wxGetNumberFromUser')
c.mustHaveApp()

View File

@@ -6,9 +6,16 @@ import wx
class numdlg_Tests(wtc.WidgetTestCase):
# TODO: Remove this test and add real ones.
def test_numdlg1(self):
self.fail("Unit tests for numdlg not implemented yet.")
dlg = wx.NumberEntryDialog(None, "Message", "Prompt", "Caption", 50, 0, 100)
wx.CallLater(250, dlg.EndModal, wx.ID_OK)
dlg.ShowModal()
self.assertEqual(dlg.GetValue(), 50)
dlg.Destroy()
def test_numdlg2(self):
# Ideally we would call this but don't know how to dismiss the dialog
wx.GetNumberFromUser
#---------------------------------------------------------------------------