wxLua 2.8.10.0 Reference Manual for wxWidgets 2.8.10

Classes

Class Name In wxWidgets Manual Wrapped by wxLua Notes
wxANIHandler   X  
wxAboutDialogInfo X X  
wxAcceleratorEntry X X  
wxAcceleratorTable X X  
wxAccessible X   MS Windows only and disabled by default in wxWidgets
wxActivateEvent X X  
wxActiveXContainer X    
wxActiveXEvent X    
wxAnimation X X  
wxAnimationCtrl X X  
wxApp X X  
wxAppTraits X   Most functions are available elsewhere
wxArchiveClassFactory X    
wxArchiveEntry X    
wxArchiveFSHandler   X  
wxArchiveInputStream X    
wxArchiveIterator X    
wxArchiveNotifier X    
wxArchiveOutputStream X    
wxArray X   Not a real class, see implementations (wxArrayInt)
wxArrayInt   X Interchangeable with a numeric indexed Lua table
wxArrayString X X Interchangeable with a numeric indexed Lua table
wxArrayVideoModes   X  
wxArtProvider X X  
wxAuiDefaultDockArt   X  
wxAuiDefaultTabArt   X  
wxAuiDockArt X X  
wxAuiDockInfo   X  
wxAuiDockUIPart   X  
wxAuiFloatingFrame   X  
wxAuiMDIChildFrame   X  
wxAuiMDIClientWindow   X  
wxAuiMDIParentFrame   X  
wxAuiManager X X  
wxAuiManagerEvent   X  
wxAuiNotebook X X  
wxAuiNotebookEvent   X  
wxAuiNotebookPage   X  
wxAuiNotebookPageArray   X  
wxAuiPaneButton   X  
wxAuiPaneInfo X X  
wxAuiPaneInfoArray   X  
wxAuiSimpleTabArt   X  
wxAuiTabArt X X  
wxAuiTabContainerButton   X  
wxAuiTabCtrl   X  
wxAutoBufferedPaintDC X X  
wxAutomationObject X    
wxBMPHandler   X  
wxBestHelpController   X  
wxBitmap X X  
wxBitmapButton X X  
wxBitmapComboBox X X  
wxBitmapDataObject X X  
wxBitmapHandler X   Base class for bitmap loaders, not needed
wxBookCtrlBase   X  
wxBookCtrlBaseEvent   X  
wxBoxSizer X X  
wxBrush X X  
wxBrushList X X  
wxBufferedDC X X  
wxBufferedInputStream X    
wxBufferedOutputStream X    
wxBufferedPaintDC X X  
wxBusyCursor X X  
wxBusyInfo X X  
wxButton X X  
wxCSConv X   Lua uses ANSI 8-bit strings
wxCURHandler   X  
wxCalculateLayoutEvent X X  
wxCalendarCtrl X X  
wxCalendarDateAttr X X  
wxCalendarEvent X X  
wxCaret X X  
wxCaretSuspend   X  
wxCheckBox X X  
wxCheckListBox X X  
wxChildFocusEvent X X  
wxChoice X X  
wxChoicebook X X  
wxChoicebookEvent   X  
wxClassInfo X X  
wxClient X    
wxClientDC X X  
wxClientData X X  
wxClientDataContainer X X  
wxClipboard X X  
wxClipboardLocker   X  
wxClipboardTextEvent X X  
wxCloseEvent X X  
wxCmdLineParser X   Easier to implement in Lua
wxCollapsiblePane X X  
wxCollapsiblePaneEvent X X  
wxColour X X  
wxColourData X X  
wxColourDatabase X X  
wxColourDialog X X  
wxColourPickerCtrl X X  
wxColourPickerEvent X X  
wxComboBox X X  
wxComboCtrl X    
wxComboPopup X    
wxCommand X X  
wxCommandEvent X X  
wxCommandProcessor X X  
wxCondition X   For threading in C
wxConfig   X  
wxConfigBase X X  
wxConfigPathChanger   X  
wxConnection X    
wxContextHelp X X  
wxContextHelpButton X X  
wxContextMenuEvent X X  
wxControl X X  
wxControlWithItems X X  
wxCountingOutputStream X    
wxCriticalSection X X  
wxCriticalSectionLocker X X  
wxCursor X X  
wxCustomDataObject X    
wxDC X X  
wxDCClipper X X  
wxDDEClient X    
wxDDEConnection X    
wxDDEServer X    
wxDataFormat X X  
wxDataInputStream X X  
wxDataObject X X  
wxDataObjectComposite X X  
wxDataObjectSimple X X  
wxDataOutputStream X X  
wxDataViewBitmapRenderer X    
wxDataViewColumn X    
wxDataViewCtrl X    
wxDataViewCustomRenderer X    
wxDataViewDateRenderer X    
wxDataViewEvent X    
wxDataViewListModel X    
wxDataViewListModelNotifier X    
wxDataViewModel X    
wxDataViewProgressRenderer X    
wxDataViewRenderer X    
wxDataViewSortedListModel X    
wxDataViewTextRenderer X    
wxDataViewToggleRenderer X    
wxDatagramSocket X    
wxDateEvent X X  
wxDatePickerCtrl X X  
wxDateSpan X X  
wxDateTime X X  
wxDateTimeArray   X  
wxDateTimeHolidayAuthority X X  
wxDateTimeWorkDays X X  
wxDb X   Deprecated and will not be in wxWidgets 3.0
wxDbColDataPtr X   Deprecated and will not be in wxWidgets 3.0
wxDbColDef X   Deprecated and will not be in wxWidgets 3.0
wxDbColFor X   Deprecated and will not be in wxWidgets 3.0
wxDbColInf X   Deprecated and will not be in wxWidgets 3.0
wxDbConnectInf X   Deprecated and will not be in wxWidgets 3.0
wxDbGridColInfo X   Deprecated and will not be in wxWidgets 3.0
wxDbGridTableBase X   Deprecated and will not be in wxWidgets 3.0
wxDbIdxDef X   Deprecated and will not be in wxWidgets 3.0
wxDbInf X   Deprecated and will not be in wxWidgets 3.0
wxDbTable X   Deprecated and will not be in wxWidgets 3.0
wxDbTableInf X   Deprecated and will not be in wxWidgets 3.0
wxDebugContext X    
wxDebugReport X    
wxDebugReportCompress X    
wxDebugReportPreview X    
wxDebugReportPreviewStd X    
wxDebugReportUpload X    
wxDebugStreamBuf X    
wxDelegateRendererNative X    
wxDialUpEvent X    
wxDialUpManager X    
wxDialog X X  
wxDir X X  
wxDirDialog X X  
wxDirPickerCtrl X X  
wxDirTraverser X   Use wxDir::GetFirst() and GetNext()
wxDisplay X X  
wxDisplayChangedEvent   X  
wxDllLoader X   Deprecated since version 2.4, see wxDynamicLibrary
wxDocChildFrame X X  
wxDocMDIChildFrame X X  
wxDocMDIParentFrame X X  
wxDocManager X X  
wxDocParentFrame X X  
wxDocTemplate X X  
wxDocument X X  
wxDragImage X    
wxDropFilesEvent X X  
wxDropSource X X  
wxDropTarget X X  
wxDynamicLibrary X X  
wxDynamicLibraryDetails X X  
wxDynamicLibraryDetailsArray   X  
wxEffects   X  
wxEncodingConverter X   Lua uses ANSI 8-bit strings
wxEraseEvent X X  
wxEvent X X  
wxEvtHandler X X  
wxExtHelpController   X  
wxFFile X    
wxFFileInputStream X    
wxFFileOutputStream X    
wxFFileStream X    
wxFSFile X X  
wxFTP X X  
wxFile X X  
wxFileConfig X X  
wxFileDataObject X X  
wxFileDialog X X  
wxFileDirPickerCtrlBase   X  
wxFileDirPickerEvent X X  
wxFileDropTarget X    
wxFileHistory X X  
wxFileInputStream X X  
wxFileName X X  
wxFileOutputStream X X  
wxFilePickerCtrl X X  
wxFileStream X    
wxFileSystem X X  
wxFileSystemHandler X X  
wxFileType X X  
wxFileType::MessageParameters   X  
wxFileTypeInfo   X  
wxFilterClassFactory X    
wxFilterFSHandler   X  
wxFilterInputStream X    
wxFilterOutputStream X    
wxFindDialogEvent X X  
wxFindReplaceData X X  
wxFindReplaceDialog X X  
wxFlexGridSizer X X  
wxFocusEvent X X  
wxFont X X  
wxFontData X X  
wxFontDialog X X  
wxFontEnumerator X X  
wxFontList X X  
wxFontMapper X X  
wxFontPickerCtrl X X  
wxFontPickerEvent X X  
wxFrame X X  
wxGBPosition X X  
wxGBSizerItem X X  
wxGBSpan X X  
wxGDIObject X X  
wxGIFHandler   X  
wxGLCanvas X X  
wxGLContext X X  
wxGauge X X  
wxGenericDirCtrl X X  
wxGenericValidator X X  
wxGraphicsBrush X    
wxGraphicsContext X    
wxGraphicsFont X    
wxGraphicsMatrix X    
wxGraphicsObject X    
wxGraphicsPath X    
wxGraphicsPen X    
wxGraphicsRenderer X    
wxGrid X X  
wxGridBagSizer X X  
wxGridCellAttr X X  
wxGridCellAttrProvider   X  
wxGridCellAutoWrapStringEditor   X  
wxGridCellAutoWrapStringRenderer   X  
wxGridCellBoolEditor X X  
wxGridCellBoolRenderer X X  
wxGridCellChoiceEditor X X  
wxGridCellCoords   X  
wxGridCellCoordsArray   X  
wxGridCellDateTimeRenderer   X  
wxGridCellEditor X X  
wxGridCellEnumEditor   X  
wxGridCellEnumRenderer   X  
wxGridCellFloatEditor X X  
wxGridCellFloatRenderer X X  
wxGridCellNumberEditor X X  
wxGridCellNumberRenderer X X  
wxGridCellRenderer X X  
wxGridCellStringRenderer X X  
wxGridCellTextEditor X X  
wxGridCellWorker   X  
wxGridEditorCreatedEvent X X  
wxGridEvent X X  
wxGridRangeSelectEvent X X  
wxGridSizeEvent X X  
wxGridSizer X X  
wxGridStringTable   X  
wxGridTableBase X X  
wxGridTableMessage   X  
wxHTTP X X  
wxHashMap X   Lua tables are hash tables
wxHashSet X   Lua tables are hash tables
wxHashTable X   Lua tables are hash tables
wxHeaderButtonParams   X  
wxHelpController X X  
wxHelpControllerBase   X  
wxHelpControllerHelpProvider X X  
wxHelpEvent X X  
wxHelpProvider X X  
wxHtmlCell X X  
wxHtmlCellEvent X X  
wxHtmlColourCell X X  
wxHtmlContainerCell X X  
wxHtmlDCRenderer X X  
wxHtmlEasyPrinting X X  
wxHtmlFilter X    
wxHtmlFontCell   X  
wxHtmlHelpController X X  
wxHtmlHelpData X X  
wxHtmlHelpDialog X    
wxHtmlHelpFrame X    
wxHtmlHelpWindow X    
wxHtmlLinkEvent X    
wxHtmlLinkInfo X X  
wxHtmlListBox X    
wxHtmlModalHelp X    
wxHtmlParser X X  
wxHtmlPrintout X X  
wxHtmlTag X X  
wxHtmlTagHandler X    
wxHtmlTagsModule X    
wxHtmlWidgetCell X X  
wxHtmlWinParser X X  
wxHtmlWinTagHandler X    
wxHtmlWindow X X  
wxHtmlWindowInterface   X  
wxHyperlinkCtrl X X  
wxHyperlinkEvent X X  
wxICOHandler   X  
wxIFFHandler   X  
wxIPV4address X X  
wxIPaddress X X  
wxIcon X X  
wxIconBundle X X  
wxIconLocation X X  
wxIconizeEvent X X  
wxIdleEvent X X  
wxImage X X  
wxImageHandler X X  
wxImageHistogram   X  
wxImageHistogram::iterator   X  
wxImageHistogramEntry   X  
wxImageList X X  
wxIndividualLayoutConstraint X X  
wxInitDialogEvent X X  
wxInputStream X X  
wxInternetFSHandler   X  
wxJPEGHandler   X  
wxJoystick X X  
wxJoystickEvent X X  
wxKeyEvent X X  
wxLanguageInfo   X  
wxLayoutAlgorithm X X  
wxLayoutConstraints X X  
wxList X X  
wxListBox X X  
wxListCtrl X X  
wxListEvent X X  
wxListItem X X  
wxListItemAttr X X  
wxListView X X  
wxListbook X X  
wxListbookEvent   X  
wxLocalFSHandler   X  
wxLocale X X  
wxLog X X  
wxLogBuffer   X  
wxLogChain X X  
wxLogGui X X  
wxLogNull X X  
wxLogPassThrough X X  
wxLogStderr X    
wxLogStream X    
wxLogTextCtrl X X  
wxLogWindow X X  
wxLongLong X X  
wxLuaArtProvider   X  
wxLuaDebuggerEvent   X  
wxLuaDebuggerServer   X  
wxLuaGridTableBase   X  
wxLuaHtmlWinTagEvent   X  
wxLuaHtmlWindow   X  
wxLuaObject   X  
wxLuaPrintout   X  
wxLuaState   X  
wxLuaTreeItemData   X  
wxMBConv X   Lua uses ANSI 8-bit strings
wxMBConvFile X   Lua uses ANSI 8-bit strings
wxMBConvUTF16 X   Lua uses ANSI 8-bit strings
wxMBConvUTF32 X   Lua uses ANSI 8-bit strings
wxMBConvUTF7 X   Lua uses ANSI 8-bit strings
wxMBConvUTF8 X   Lua uses ANSI 8-bit strings
wxMDIChildFrame X X  
wxMDIClientWindow X X  
wxMDIParentFrame X X  
wxMask X X  
wxMaximizeEvent X X  
wxMediaCtrl X X  
wxMediaEvent X X  
wxMemoryBuffer X    
wxMemoryConfig   X  
wxMemoryDC X X  
wxMemoryFSHandler X X  
wxMemoryInputStream X X  
wxMemoryOutputStream X    
wxMenu X X  
wxMenuBar X X  
wxMenuEvent X X  
wxMenuItem X X  
wxMenuItemList   X  
wxMessageDialog X X  
wxMetafile X X  
wxMetafileDC X X  
wxMimeTypesManager X X  
wxMiniFrame X X  
wxMirrorDC X X  
wxModule X   Useable in C++ only
wxMouseCaptureChangedEvent X X  
wxMouseCaptureLostEvent X X  
wxMouseEvent X X  
wxMouseState   X  
wxMoveEvent X X  
wxMultiChoiceDialog X X  
wxMutex X   For threading in C
wxMutexLocker X   For threading in C
wxNativeFontInfo   X  
wxNavigationKeyEvent   X  
wxNode X X  
wxNotebook X X  
wxNotebookEvent X X  
wxNotebookPage   X  
wxNotebookSizer X X  
wxNotifyEvent X X  
wxObject X X  
wxObjectRefData X X  
wxOutputStream X X  
wxOwnerDrawnComboBox X    
wxPCXHandler   X  
wxPNGHandler   X  
wxPNMHandler   X  
wxPageSetupDialog X X  
wxPageSetupDialogData X X  
wxPaintDC X X  
wxPaintEvent X X  
wxPalette X X  
wxPaletteChangedEvent   X  
wxPanel X X  
wxPasswordEntryDialog X X  
wxPathList X X  
wxPen X X  
wxPenList X X  
wxPickerBase X X  
wxPlatformInfo X X  
wxPoint X X  
wxPoint2DDouble   X  
wxPoint2DInt   X  
wxPostScriptDC X X  
wxPowerEvent X X  
wxPreviewCanvas X X  
wxPreviewControlBar X X  
wxPreviewFrame X X  
wxPrintData X X  
wxPrintDialog X X  
wxPrintDialogData X X  
wxPrintPreview X X  
wxPrinter X X  
wxPrinterDC X X  
wxPrintout X X  
wxProcess X X  
wxProcessEvent X X  
wxProgressDialog X X  
wxPropagateOnce   X  
wxPropagationDisabler   X  
wxPropertySheetDialog X    
wxProtocol X X  
wxQuantize X X  
wxQueryLayoutInfoEvent X X  
wxQueryNewPaletteEvent   X  
wxRadioBox X X  
wxRadioButton X X  
wxRealPoint X   Not used anywhere in wxWidgets
wxRect X X  
wxRect2DDouble   X  
wxRect2DInt   X  
wxRecursionGuard X   Easier to implement in Lua
wxRecursionGuardFlag X   Easier to implement in Lua
wxRegEx X X  
wxRegKey X    
wxRegion X X  
wxRegionIterator X X  
wxRendererNative X X  
wxRendererVersion X X  
wxRichTextAttr X    
wxRichTextBuffer X    
wxRichTextCharacterStyleDefinition X    
wxRichTextCtrl X    
wxRichTextEvent X    
wxRichTextFileHandler X    
wxRichTextFormattingDialog X    
wxRichTextFormattingDialogFactory X    
wxRichTextHTMLHandler X    
wxRichTextHeaderFooterData X    
wxRichTextListStyleDefinition X    
wxRichTextParagraphStyleDefinition X    
wxRichTextPrinting X    
wxRichTextPrintout X    
wxRichTextRange X    
wxRichTextStyleComboCtrl X    
wxRichTextStyleDefinition X    
wxRichTextStyleListBox X    
wxRichTextStyleListCtrl X    
wxRichTextStyleOrganiserDialog X    
wxRichTextStyleSheet X    
wxRichTextXMLHandler X    
wxSashEvent X X  
wxSashLayoutWindow X X  
wxSashWindow X X  
wxScopedArray X   Useable in C++ only (unnecessary in Lua)
wxScopedPtr X   Useable in C++ only (unnecessary in Lua)
wxScopedTiedPtr X   Useable in C++ only (unnecessary in Lua)
wxScreenDC X X  
wxScrollBar X X  
wxScrollEvent X X  
wxScrollWinEvent X X  
wxScrolledWindow X X  
wxSearchCtrl X    
wxSemaphore X   For threading in C
wxServer X    
wxSetCursorEvent X X  
wxShowEvent   X  
wxSimpleHelpProvider X X  
wxSimpleHtmlListBox X X  
wxSingleChoiceDialog X X  
wxSingleInstanceChecker X X  
wxSize X X  
wxSizeEvent X X  
wxSizer X X  
wxSizerFlags X X  
wxSizerItem X X  
wxSlider X X  
wxSockAddress X X  
wxSocketBase X X  
wxSocketClient X X  
wxSocketEvent X X  
wxSocketInputStream X    
wxSocketOutputStream X    
wxSocketServer X X  
wxSortedArrayString   X Interchangeable with a numeric indexed Lua table
wxSound X X  
wxSpinButton X X  
wxSpinCtrl X X  
wxSpinEvent X X  
wxSplashScreen X X  
wxSplashScreenWindow   X  
wxSplitterEvent X X  
wxSplitterRenderParams X X  
wxSplitterWindow X X  
wxStackFrame X    
wxStackWalker X    
wxStandardPaths X X  
wxStaticBitmap X X  
wxStaticBox X X  
wxStaticBoxSizer X X  
wxStaticLine X X  
wxStaticText X X  
wxStatusBar X X  
wxStdDialogButtonSizer X X  
wxStockGDI   X  
wxStopWatch X X  
wxStreamBase X X  
wxStreamBuffer X    
wxStreamToTextRedirector X    
wxString X X Interchangeable with a Lua string
wxStringBuffer X   Useable in C++ only (unnecessary in Lua)
wxStringBufferLength X   Useable in C++ only (unnecessary in Lua)
wxStringClientData X X  
wxStringInputStream X    
wxStringOutputStream X    
wxStringTokenizer X X  
wxStyledTextCtrl   X  
wxStyledTextEvent   X  
wxSymbolPickerDialog X    
wxSysColourChangedEvent X X  
wxSystemOptions X X  
wxSystemSettings X X  
wxTCPClient X    
wxTCPConnection X    
wxTCPServer X    
wxTGAHandler   X  
wxTIFFHandler   X  
wxTabCtrl   X  
wxTabEvent   X  
wxTarClassFactory X    
wxTarEntry X    
wxTarInputStream X    
wxTarOutputStream X    
wxTaskBarIcon X X  
wxTaskBarIconEvent   X  
wxTempFile X X  
wxTempFileOutputStream X    
wxTextAttr X X  
wxTextAttrEx X    
wxTextCtrl X X  
wxTextDataObject X X  
wxTextDropTarget X    
wxTextEntryDialog X X  
wxTextFile X    
wxTextInputStream X    
wxTextOutputStream X    
wxTextUrlEvent   X  
wxTextValidator X X  
wxThread X    
wxThreadHelper X    
wxTimeSpan X X  
wxTimer X X  
wxTimerEvent X X  
wxTipProvider X    
wxTipWindow X    
wxToggleButton X X  
wxToolBar X X  
wxToolBarBase   X  
wxToolBarSimple   X  
wxToolBarTool   X  
wxToolBarToolBase   X  
wxToolTip X X  
wxToolbook X X  
wxToolbookEvent   X  
wxTopLevelWindow X X  
wxTreeCtrl X X  
wxTreeEvent X X  
wxTreeItemData X X  
wxTreeItemId X X  
wxTreebook X X  
wxTreebookEvent X X  
wxULongLong   X  
wxURI X X  
wxURL X X  
wxURLDataObject X X  
wxUpdateUIEvent X X  
wxVListBox X    
wxVScrolledWindow X    
wxValidator X X  
wxVariant X   Unnecessary in Lua
wxVariantData X   Unnecessary in Lua
wxVideoMode   X  
wxView X X  
wxVisualAttributes   X  
wxWave   X  
wxWinHelpController   X  
wxWindow X X  
wxWindowCreateEvent X X  
wxWindowDC X X  
wxWindowDestroyEvent X X  
wxWindowDisabler X X  
wxWindowList   X  
wxWindowUpdateLocker X X  
wxWizard X X  
wxWizardEvent X X  
wxWizardPage X X  
wxWizardPageSimple X X  
wxXPMHandler   X  
wxXmlDocument X X  
wxXmlNode X X  
wxXmlProperty X X  
wxXmlResource X X  
wxXmlResourceHandler X    
wxZipClassFactory X    
wxZipEntry X    
wxZipInputStream X    
wxZipNotifier X    
wxZipOutputStream X    
wxZlibInputStream X    
wxZlibOutputStream X    



Enums

Propagation_state
wxAlignment
wxAnimationType
wxArchitecture
wxAuiButtonId
wxAuiDockUIPart::dummy
wxAuiManagerDock
wxAuiManagerOption
wxAuiNotebookOption
wxAuiPaneButtonState
wxAuiPaneDockArtGradients
wxAuiPaneDockArtSetting
wxAuiPaneInfo::wxAuiPaneState
wxAuiPaneInsertLevel
wxBackgroundStyle
wxBatteryState
wxBitmapType
wxBorder
wxCalendarDateBorder
wxCalendarHitTestResult
wxCheckBoxState
wxConfigBase::EntryType
wxDLFlags
wxDataFormatId
wxDataObject::Direction
wxDateTime::Calendar
wxDateTime::Country
wxDateTime::Month
wxDateTime::TZ
wxDateTime::WeekDay
wxDirection
wxDragResult
wxDuplexMode
wxDynamicLibraryCategory
wxEOL
wxEdge
wxEndianness
wxFTP::TransferMode
wxFile::OpenMode
wxFile::dummy
wxFileKind
wxFindReplaceDialogStyles
wxFindReplaceFlags
wxFlexSizerGrowMode
wxFontEncoding
wxFontFamily
wxFontStyle
wxFontWeight
wxGrid::wxGridSelectionModes
wxGridCellAttr::wxAttrKind
wxGridTableRequest
wxHeaderSortIconType
wxHelpEvent::Origin
wxHelpSearchMode
wxHotkeyModifier
wxHtmlWindowInterface::HTMLCursor
wxIdleMode
wxItemKind
wxKeyCode
wxKeyType
wxKillError
wxKillFlags
wxLanguage
wxLayoutAlignment
wxLayoutDirection
wxLayoutOrientation
wxListColumnFormat
wxLocaleCategory
wxLocaleInfo
wxLocaleInitFlags
wxLuaMethod_Type
wxLuaObject_Type
wxMediaCtrlPlayerControls
wxMediaState
wxNavigationKeyEvent::dummy
wxOperatingSystemId
wxOrientation
wxOutCode
wxPaperSize
wxPathFormat
wxPathNormalize
wxPluginCategory
wxPortId
wxPowerType
wxPrintBin
wxPrintMode
wxPrintQuality
wxPrinterError
wxProtocolError
wxRegionContain
wxRegionOp
wxRelationship
wxRendererVersion::dummy
wxSashDragStatus
wxSashEdgePosition
wxSeekMode
wxShutdownFlags
wxSignal
wxSocketError
wxSocketEventFlags
wxSocketFlags
wxSocketNotify
wxSocketType
wxStandardPaths::ResourceCat
wxStockCursor
wxStockGDI::Item
wxStreamError
wxStretch
wxStringTokenizerMode
wxSystemColour
wxSystemFeature
wxSystemFont
wxSystemMetric
wxSystemScreenType
wxTextAttrAlignment
wxTextCtrlHitTestResult
wxToolBarToolStyle
wxTreeItemIcon
wxTreeItemIdValue
wxURIFieldType
wxURIFlags
wxURIHostType
wxURLError
wxUpdateUI
wxUpdateUIMode
wxWindowVariant
wxXmlNodeType
wxXmlResourceFlags


Colours used to denote types

Comments - //
Block Comments - /* ... */
Enums - %enum
Defines - %define [_string] [_object] [_pointer]
Events - %define_event
Functions - %function
Classes - %class
Class Members - %member
Renamed Functions - %rename
Overridden Functions - %override
Operator Functions - %operator


Interface files

wxwidgets/wxbase_base.i
wxwidgets/wxbase_config.i
wxwidgets/wxbase_data.i
wxwidgets/wxbase_datetime.i
wxwidgets/wxbase_file.i
wxwidgets/wxcore_appframe.i
wxwidgets/wxcore_clipdrag.i
wxwidgets/wxcore_controls.i
wxwidgets/wxcore_core.i
wxwidgets/wxcore_defsutils.i
wxwidgets/wxcore_dialogs.i
wxwidgets/wxcore_event.i
wxwidgets/wxcore_gdi.i
wxwidgets/wxcore_geometry.i
wxwidgets/wxcore_help.i
wxwidgets/wxcore_image.i
wxwidgets/wxcore_mdi.i
wxwidgets/wxcore_menutool.i
wxwidgets/wxcore_picker.i
wxwidgets/wxcore_print.i
wxwidgets/wxcore_sizer.i
wxwidgets/wxcore_windows.i
wxwidgets/wxadv_adv.i
wxwidgets/wxadv_grid.i
wxwidgets/wxnet_net.i
wxwidgets/wxmedia_media.i
wxwidgets/wxgl_gl.i
wxwidgets/wxxml_xml.i
wxwidgets/wxxrc_xrc.i
wxwidgets/wxaui_aui.i
wxwidgets/wxhtml_html.i
wxwidgets/wxstc_stc.i
wxlua/wxlua.i
wxluasocket/wxluasocket.i


wxwidgets/wxbase_base.i - Lua table = 'wx'


// ===========================================================================
// Purpose: Various wxBase classes
// Author: Ray Gilbert, John Labenski
// Created: July 2004
// Copyright: (c) Ray Gilbert
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

// ---------------------------------------------------------------------------
// wxWidgets version defines

%define wxMAJOR_VERSION
%define wxMINOR_VERSION
%define wxRELEASE_NUMBER
%define wxSUBRELEASE_NUMBER
%define_string wxVERSION_STRING

%function bool wxCHECK_VERSION(int major, int minor, int release) // actually a define
%function bool wxCHECK_VERSION_FULL(int major, int minor, int release, int subrel) // actually a define

%define wxABI_VERSION

// ---------------------------------------------------------------------------
// wxWidgets platform defines

%__WINDOWS__ %define __WINDOWS__ 1
%__WIN16__ %define __WIN16__ 1
%__WIN32__ %define __WIN32__ 1
%__WIN95__ %define __WIN95__ 1
%__WXBASE__ %define __WXBASE__ 1
%__WXCOCOA__ %define __WXCOCOA__ 1
%__WXWINCE__ %define __WXWINCE__ 1
%__WXGTK__ %define __WXGTK__ 1
%__WXGTK12__ %define __WXGTK12__ 1
%__WXGTK20__ %define __WXGTK20__ 1
%__WXMOTIF__ %define __WXMOTIF__ 1
%__WXMOTIF20__ %define __WXMOTIF20__ 1
%__WXMAC__ %define __WXMAC__ 1
%__WXMAC_CLASSIC__ %define __WXMAC_CLASSIC__ 1
%__WXMAC_CARBON__ %define __WXMAC_CARBON__ 1
%__WXMAC_OSX__ %define __WXMAC_OSX__ 1
%__WXMGL__ %define __WXMGL__ 1
%__WXMSW__ %define __WXMSW__ 1
%__WXOS2__ %define __WXOS2__ 1
%__WXOSX__ %define __WXOSX__ 1
%__WXPALMOS__ %define __WXPALMOS__ 1
%__WXPM__ %define __WXPM__ 1
%__WXSTUBS__ %define __WXSTUBS__ 1
%__WXXT__ %define __WXXT__ 1
%__WXX11__ %define __WXX11__ 1
%__WXWINE__ %define __WXWINE__ 1
%__WXUNIVERSAL__ %define __WXUNIVERSAL__ 1
%__X__ %define __X__ 1

// ---------------------------------------------------------------------------

%if wxUSE_ON_FATAL_EXCEPTION
%function bool wxHandleFatalExceptions(bool doIt = true)
%endif // wxUSE_ON_FATAL_EXCEPTION

// ---------------------------------------------------------------------------
// Network, user, and OS functions

%if !%wxchkver_2_8
%enum
wxUNKNOWN_PLATFORM
wxCURSES
wxXVIEW_X
wxMOTIF_X
wxCOSE_X
wxNEXTSTEP
wxMAC
wxMAC_DARWIN
wxBEOS
wxGTK
wxGTK_WIN32
wxGTK_OS2
wxGTK_BEOS
wxGEOS
wxOS2_PM
wxWINDOWS
wxMICROWINDOWS
wxPENWINDOWS
wxWINDOWS_NT
wxWIN32S
wxWIN95
wxWIN386
wxWINDOWS_CE
wxWINDOWS_POCKETPC
wxWINDOWS_SMARTPHONE
wxMGL_UNIX
wxMGL_X
wxMGL_WIN32
wxMGL_OS2
wxMGL_DOS
wxWINDOWS_OS2
wxUNIX
wxX11
wxPALMOS
wxDOS
%endenum
%endif // !%wxchkver_2_8

%function wxString wxGetEmailAddress()
%function wxLongLong wxGetFreeMemory()
%function wxString wxGetFullHostName()
%function wxString wxGetHomeDir()
%function wxString wxGetHostName()
%function wxString wxGetOsDescription()
// %override [int version, int major, int minor] wxGetOsVersion()
// int wxGetOsVersion(int *major = NULL, int *minor = NULL)
%function int wxGetOsVersion()

%function wxString wxGetUserHome(const wxString& user = "")
%function wxString wxGetUserId()
%function wxString wxGetUserName()

// ---------------------------------------------------------------------------
// Environmental access functions

%function bool wxGetEnv(const wxString& var, wxString *value)
%function bool wxSetEnv(const wxString& var, const wxString& value)
%function bool wxUnsetEnv(const wxString& var)


// ---------------------------------------------------------------------------
// wxSystemOptions

%if wxLUA_USE_wxSystemOptions

%include "wx/sysopt.h"

%class %noclassinfo wxSystemOptions, wxObject
//wxSystemOptions() // No constructor, all member functions static

static wxString GetOption(const wxString& name) const
static int GetOptionInt(const wxString& name) const
static bool HasOption(const wxString& name) const
static bool IsFalse(const wxString& name) const

%if wxUSE_SYSTEM_OPTIONS
static void SetOption(const wxString& name, const wxString& value)
static void SetOption(const wxString& name, int value)
%endif //wxUSE_SYSTEM_OPTIONS
%endclass

%endif //wxLUA_USE_wxSystemOptions


// ---------------------------------------------------------------------------
// wxPlatformInfo

%enum wxOperatingSystemId
wxOS_UNKNOWN // returned on error

wxOS_MAC_OS // Apple Mac OS 8/9/X with Mac paths
wxOS_MAC_OSX_DARWIN // Apple Mac OS X with Unix paths
wxOS_MAC // wxOS_MAC_OS|wxOS_MAC_OSX_DARWIN,

wxOS_WINDOWS_9X // Windows 9x family (95/98/ME)
wxOS_WINDOWS_NT // Windows NT family (NT/2000/XP)
wxOS_WINDOWS_MICRO // MicroWindows
wxOS_WINDOWS_CE // Windows CE (Window Mobile)
wxOS_WINDOWS // wxOS_WINDOWS_9X|wxOS_WINDOWS_NT|wxOS_WINDOWS_MICRO|wxOS_WINDOWS_CE,

wxOS_UNIX_LINUX // Linux
wxOS_UNIX_FREEBSD // FreeBSD
wxOS_UNIX_OPENBSD // OpenBSD
wxOS_UNIX_NETBSD // NetBSD
wxOS_UNIX_SOLARIS // SunOS
wxOS_UNIX_AIX // AIX
wxOS_UNIX_HPUX // HP/UX
wxOS_UNIX // wxOS_UNIX_LINUX|wxOS_UNIX_FREEBSD|wxOS_UNIX_OPENBSD|wxOS_UNIX_NETBSD|wxOS_UNIX_SOLARIS|wxOS_UNIX_AIX|wxOS_UNIX_HPUX,

wxOS_DOS // Microsoft DOS
wxOS_OS2 // OS/2
%endenum

%enum wxPortId
wxPORT_UNKNOWN // returned on error

wxPORT_BASE // wxBase, no native toolkit used

wxPORT_MSW // wxMSW, native toolkit is Windows API
wxPORT_MOTIF // wxMotif, using [Open]Motif or Lesstif
wxPORT_GTK // wxGTK, using GTK+ 1.x, 2.x, GPE or Maemo
wxPORT_MGL // wxMGL, using wxUniversal
wxPORT_X11 // wxX11, using wxUniversal
wxPORT_PM // wxOS2, using OS/2 Presentation Manager
wxPORT_OS2 // wxOS2, using OS/2 Presentation Manager
wxPORT_MAC // wxMac, using Carbon or Classic Mac API
wxPORT_COCOA // wxCocoa, using Cocoa NextStep/Mac API
wxPORT_WINCE // wxWinCE, toolkit is WinCE SDK API
wxPORT_PALMOS // wxPalmOS, toolkit is PalmOS API
wxPORT_DFB // wxDFB, using wxUniversal
%endenum

%enum wxArchitecture
wxARCH_INVALID // returned on error

wxARCH_32 // 32 bit
wxARCH_64

wxARCH_MAX
%endenum

%enum wxEndianness
wxENDIAN_INVALID // returned on error

wxENDIAN_BIG // 4321
wxENDIAN_LITTLE // 1234
wxENDIAN_PDP // 3412

wxENDIAN_MAX
%endenum

%class %noclassinfo wxPlatformInfo
// No constructor, use static Get() function
//wxPlatformInfo();
//wxPlatformInfo(wxPortId pid, int tkMajor = -1, int tkMinor = -1, wxOperatingSystemId id = wxOS_UNKNOWN, int osMajor = -1, int osMinor = -1, wxArchitecture arch = wxARCH_INVALID, wxEndianness endian = wxENDIAN_INVALID, bool usingUniversal = false)

// Gets a wxPlatformInfo already initialized with the values for
// the currently running platform.
//static const wxPlatformInfo& Get();
static const wxPlatformInfo& Get()

static wxOperatingSystemId GetOperatingSystemId(const wxString &name);
static wxPortId GetPortId(const wxString &portname);

static wxArchitecture GetArch(const wxString &arch);
static wxEndianness GetEndianness(const wxString &end);

static wxString GetOperatingSystemFamilyName(wxOperatingSystemId os);
static wxString GetOperatingSystemIdName(wxOperatingSystemId os);
static wxString GetPortIdName(wxPortId port, bool usingUniversal);
static wxString GetPortIdShortName(wxPortId port, bool usingUniversal);

static wxString GetArchName(wxArchitecture arch);
static wxString GetEndiannessName(wxEndianness end);

int GetOSMajorVersion() const
int GetOSMinorVersion() const

bool CheckOSVersion(int major, int minor) const

int GetToolkitMajorVersion() const
int GetToolkitMinorVersion() const

bool CheckToolkitVersion(int major, int minor) const
bool IsUsingUniversalWidgets() const

wxOperatingSystemId GetOperatingSystemId() const
wxPortId GetPortId() const
wxArchitecture GetArchitecture() const
wxEndianness GetEndianness() const

wxString GetOperatingSystemFamilyName() const
wxString GetOperatingSystemIdName() const
wxString GetPortIdName() const
wxString GetPortIdShortName() const
wxString GetArchName() const
wxString GetEndiannessName() const

void SetOSVersion(int major, int minor)
void SetToolkitVersion(int major, int minor)
void SetOperatingSystemId(wxOperatingSystemId n)
void SetPortId(wxPortId n)
void SetArchitecture(wxArchitecture n)
void SetEndianness(wxEndianness n)

bool IsOk() const

//bool operator==(const wxPlatformInfo &t) const; // we only use the wxWidget's wxPlatformInfo
//bool operator!=(const wxPlatformInfo &t) const
%endclass


// ---------------------------------------------------------------------------
// wxSingleInstanceChecker

%if wxUSE_SNGLINST_CHECKER

%include "wx/snglinst.h"

%class %delete %noclassinfo %encapsulate wxSingleInstanceChecker
wxSingleInstanceChecker() // default ctor, use Create() after it
// like Create() but no error checking (dangerous!)
//wxSingleInstanceChecker(const wxString& name, const wxString& path = "")

// name must be given and be as unique as possible, it is used as the mutex
// name under Win32 and the lock file name under Unix -
// wxTheApp->GetAppName() may be a good value for this parameter
//
// path is optional and is ignored under Win32 and used as the directory to
// create the lock file in under Unix (default is wxGetHomeDir())
//
// returns false if initialization failed, it doesn't mean that another
// instance is running - use IsAnotherRunning() to check it
bool Create(const wxString& name, const wxString& path = "")

bool IsAnotherRunning() const // is another copy of this program already running?

%endclass

%endif // wxUSE_SNGLINST_CHECKER


// ---------------------------------------------------------------------------
// wxLog - See GUI log bindings in wxcore_core.i

%if wxLUA_USE_wxLog && wxUSE_LOG

%include "wx/log.h"

// These functions are in log.h
%function unsigned long wxSysErrorCode()
%function wxString wxSysErrorMsg(unsigned long nErrCode = 0)

%function void wxSafeShowMessage(const wxString& title, const wxString& text)

// All of the wxLogXXX functions take only a single string,
// use string.format(...) to format the string in Lua.

// C++ Func: void wxLogError(const char *formatString, ...)
%function void wxLogError(const wxString& message)
// C++ Func: void wxLogFatalError(const char *formatString, ...)
%function void wxLogFatalError(const wxString& message)
// C++ Func: void wxLogWarning(const char *formatString, ...)
%function void wxLogWarning(const wxString& message)
// C++ Func: void wxLogMessage(const char *formatString, ...)
%function void wxLogMessage(const wxString& message)
// C++ Func: void wxLogVerbose(const char *formatString, ...)
%function void wxLogVerbose(const wxString& message)
// C++ Func: void wxLogStatus(wxFrame *frame, const char *formatString, ...)
// void wxLogStatus(const char *formatString, ...) // this just uses the toplevel frame, use wx.NULL for the frame
// IN wxCore %function void wxLogStatus(wxFrame *frame, const wxString& message)

// C++ Func: void wxLogSysError(const char *formatString, ...)
%function void wxLogSysError(const wxString& message)
// C++ Func: void wxLogDebug(const char *formatString, ...)
%function void wxLogDebug(const wxString& message)
// C++ Func: void wxLogTrace(const char *mask, const char *formatString, ...)
%function void wxLogTrace(const wxString& mask, const wxString& message)
// void wxLogTrace(const char *formatString, ...)
// void wxLogTrace(wxTraceMask mask, const char *formatString, ...) - deprecated

%typedef unsigned long wxTraceMask
%typedef unsigned long wxLogLevel

%enum // wxLogLevel - uses these enums
wxLOG_FatalError, // program can't continue, abort immediately
wxLOG_Error, // a serious error, user must be informed about it
wxLOG_Warning, // user is normally informed about it but may be ignored
wxLOG_Message, // normal message (i.e. normal output of a non GUI app)
wxLOG_Status, // informational: might go to the status line of GUI app
wxLOG_Info, // informational message (a.k.a. 'Verbose')
wxLOG_Debug, // never shown to the user, disabled in release mode
wxLOG_Trace, // trace messages are also only enabled in debug mode
wxLOG_Progress, // used for progress indicator (not yet)

wxLOG_User, // user defined levels start here
wxLOG_Max
%endenum

// symbolic trace masks - wxLogTrace("foo", "some trace message...") will be
// discarded unless the string "foo" has been added to the list of allowed
// ones with AddTraceMask()
%define_string wxTRACE_MemAlloc //wxT("memalloc") // trace memory allocation (new/delete)
%define_string wxTRACE_Messages //wxT("messages") // trace window messages/X callbacks
%define_string wxTRACE_ResAlloc //wxT("resalloc") // trace GDI resource allocation
%define_string wxTRACE_RefCount //wxT("refcount") // trace various ref counting operations
%msw %define_string wxTRACE_OleCalls //wxT("ole") // OLE interface calls

%class %delete %noclassinfo %encapsulate wxLog
//wxLog() - No constructor, a base class, use one of the derived classes.

static bool IsEnabled()
static bool EnableLogging(bool doIt = true)
virtual void Flush()
static void FlushActive()
// Don't delete the active target until you set a new one or set it to wx.NULL
// Note, a new wxLog is created unless DontCreateOnDemand() is called.
static wxLog *GetActiveTarget()
// When you create a new wxLog and call "oldLog = SetActiveTarget(MyLog)"
// the returned oldLog will be garbage collected or you can delete() the
// oldLog unless you want to reuse it by calling "myLog = SetActiveTarget(oldLog)"
// which releases myLog to be garbage collected or delete()ed by you.
// Basicly, wxWidgets 'owns' the log you pass to SetActiveTarget() and
// wxLua 'owns' the returned log.
static %gc wxLog *SetActiveTarget(%ungc wxLog *pLogger)
static void Suspend()
static void Resume()
static void SetVerbose(bool bVerbose = true)
static void SetLogLevel(wxLogLevel logLevel)
static void DontCreateOnDemand()
%wxchkver_2_8 static void SetRepetitionCounting(bool bRepetCounting = true)
%wxchkver_2_8 static bool GetRepetitionCounting()
static void SetTraceMask(wxTraceMask ulMask)
static void AddTraceMask(const wxString& str)
static void RemoveTraceMask(const wxString& str)
static void ClearTraceMasks()
static const wxArrayString GetTraceMasks()

// %override static void wxLog::SetTimestamp(const wxString& ts)
// Allows an input of "nil" or no value to disable time stamping.
// C++ Func: static void wxLog::SetTimestamp(const wxChar* ts)
static void SetTimestamp(const wxString& ts)

static bool GetVerbose()
static wxTraceMask GetTraceMask()
static bool IsAllowedTraceMask(const wxString& mask)
static wxLogLevel GetLogLevel()
static wxString GetTimestamp()
%endclass

// ---------------------------------------------------------------------------
// wxLogBuffer

%class %delete %noclassinfo %encapsulate wxLogBuffer, wxLog
wxLogBuffer()

const wxString& GetBuffer() const // get the string contents with all messages logged
%endclass

// ---------------------------------------------------------------------------
// wxLogChain

%class %delete %noclassinfo %encapsulate wxLogChain, wxLog
wxLogChain(wxLog *logger)

void SetLog(wxLog *logger) // change the new log target
// this can be used to temporarily disable (and then reenable) passing
// messages to the old logger (by default we do pass them)
void PassMessages(bool bDoPass)
// are we passing the messages to the previous log target?
bool IsPassingMessages() const
// return the previous log target (may be NULL)
wxLog *GetOldLog() const
%endclass

// ---------------------------------------------------------------------------
// wxLogNull

%class %delete %noclassinfo %encapsulate wxLogNull, wxLog
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxLogNull()

%endclass

// ---------------------------------------------------------------------------
// wxLogPassThrough - a chain log target which uses itself as the new logger

%class %delete %noclassinfo %encapsulate wxLogPassThrough, wxLogChain
wxLogPassThrough()

%endclass

// ---------------------------------------------------------------------------
// wxLogStderr - FIXME need to implement FILE*

/*
%class %delete %noclassinfo %encapsulate wxLogStderr, wxLog
wxLogStderr(FILE *fp = (FILE *) NULL) // redirect log output to a FILE

%endclass
*/


// ---------------------------------------------------------------------------
// wxLogStream - FIXME need to implement wxSTD ostream* (just use wxLogBuffer)

/*
%if wxUSE_STD_IOSTREAM

%class %delete %noclassinfo %encapsulate wxLogStream, wxLog
wxLogStream(wxSTD ostream *ostr = NULL); // redirect log output to an ostream

%endclass

%endif // wxUSE_STD_IOSTREAM
*/


%endif // wxLUA_USE_wxLog && wxUSE_LOG

// ---------------------------------------------------------------------------
// wxDynamicLibrary - No a lot you can do with this, but it might make
// testing or debugging a C++ program easier to test thing
// out in wxLua first.

%if // wxLUA_USE_wxDynamicLibrary && wxUSE_DYNLIB_CLASS

%include "wx/dynlib.h"

%enum wxDLFlags
wxDL_LAZY // resolve undefined symbols at first use
// (only works on some Unix versions)
wxDL_NOW // resolve undefined symbols on load
// (default, always the case under Win32)
wxDL_GLOBAL // export extern symbols to subsequently
// loaded libs.
wxDL_VERBATIM // attempt to load the supplied library
// name without appending the usual dll
// filename extension.
wxDL_NOSHARE // load new DLL, don't reuse already loaded
// (only for wxPluginManager)

wxDL_DEFAULT // = wxDL_NOW // default flags correspond to Win32
%endenum

%enum wxDynamicLibraryCategory
wxDL_LIBRARY, // standard library
wxDL_MODULE // loadable module/plugin
%endenum

%enum wxPluginCategory
wxDL_PLUGIN_GUI, // plugin that uses GUI classes
wxDL_PLUGIN_BASE // wxBase-only plugin
%endenum


%class %delete %noclassinfo %encapsulate wxDynamicLibraryDetails
// ctor, normally never used as these objects are only created by wxDynamicLibrary
// wxDynamicLibrary::ListLoaded()
//wxDynamicLibraryDetails() { m_address = NULL; m_length = 0; }

wxString GetName() const // get the (base) name
wxString GetPath() const // get the full path of this object

// get the load address and the extent, return true if this information is available
//bool GetAddress(void **addr, size_t *len) const

wxString GetVersion() const // return the version of the DLL (may be empty if no version info)
%endclass

%class %delete %noclassinfo %encapsulate wxDynamicLibraryDetailsArray
//wxDynamicLibraryDetailsArray() // Get this from wxDynamicLibrary::ListLoaded

int GetCount() const
wxDynamicLibraryDetails Item( int n )
%endclass


%class %delete %noclassinfo %encapsulate wxDynamicLibrary
wxDynamicLibrary()
wxDynamicLibrary(const wxString& libname, int flags = wxDL_DEFAULT)

// return a valid handle for the main program itself or NULL if back
// linking is not supported by the current platform (e.g. Win32)
//static wxDllType GetProgramHandle();

// return the platform standard DLL extension (with leading dot)
//static const wxChar *GetDllExt()
static wxString GetDllExt()

// return true if the library was loaded successfully
bool IsLoaded() const

// load the library with the given name (full or not), return true if ok
bool Load(const wxString& libname, int flags = wxDL_DEFAULT);

// raw function for loading dynamic libs: always behaves as if
// wxDL_VERBATIM were specified and doesn't log error message if the
// library couldn't be loaded but simply returns NULL
//static wxDllType RawLoad(const wxString& libname, int flags = wxDL_DEFAULT);

// detach the library object from its handle, i.e. prevent the object from
// unloading the library in its dtor -- the caller is now responsible for doing this
//wxDllType Detach()

// unload the given library handle (presumably returned by Detach() before)
//static void Unload(wxDllType handle);

// unload the library, also done automatically in dtor
void Unload()

// Return the raw handle from dlopen and friends.
//wxDllType GetLibHandle() const { return m_handle; }

// check if the given symbol is present in the library, useful to verify if
// a loadable module is our plugin, for example, without provoking error
// messages from GetSymbol()
bool HasSymbol(const wxString& name) const

// resolve a symbol in a loaded DLL, such as a variable or function name.
// 'name' is the (possibly mangled) name of the symbol. (use extern "C" to
// export unmangled names)
// Since it is perfectly valid for the returned symbol to actually be NULL,
// that is not always indication of an error. Pass and test the parameter
// 'success' for a true indication of success or failure to load the symbol.
// Returns a pointer to the symbol on success, or NULL if an error occurred
// or the symbol wasn't found.
//void *GetSymbol(const wxString& name, bool *success = NULL) const;

// low-level version of GetSymbol()
//static void *RawGetSymbol(wxDllType handle, const wxString& name);
//void *RawGetSymbol(const wxString& name) const

//#ifdef __WXMSW__
// this function is useful for loading functions from the standard Windows
// DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or
// wide character build) suffix if they take string parameters
//static void *RawGetSymbolAorW(wxDllType handle, const wxString& name)
//void *GetSymbolAorW(const wxString& name) const
//#endif // __WXMSW__

// return all modules/shared libraries in the address space of this process
// returns an empty array if not implemented or an error occurred
static wxDynamicLibraryDetailsArray ListLoaded();

// return platform-specific name of dynamic library with proper extension
// and prefix (e.g. "foo.dll" on Windows or "libfoo.so" on Linux)
static wxString CanonicalizeName(const wxString& name, wxDynamicLibraryCategory cat = wxDL_LIBRARY);

// return name of wxWidgets plugin (adds compiler and version info
// to the filename):
static wxString CanonicalizePluginName(const wxString& name, wxPluginCategory cat = wxDL_PLUGIN_GUI);

// return plugin directory on platforms where it makes sense and empty string on others:
static wxString GetPluginsDirectory()
%endclass

// ---------------------------------------------------------------------------
// wxPluginLibrary - You cannot use this within wxLua

// ---------------------------------------------------------------------------
// wxPluginManager - You cannot use this within wxLua

%endif // wxLUA_USE_wxDynamicLibrary && wxUSE_DYNLIB_CLASS


// ---------------------------------------------------------------------------
// wxCriticalSection

%if wxLUA_USE_wxCriticalSection && wxUSE_THREADS

%include "wx/thread.h"

%class %delete %encapsulate %noclassinfo wxCriticalSection
wxCriticalSection()
void Enter()
void Leave()
%endclass

%endif // wxLUA_USE_wxCriticalSection


// ---------------------------------------------------------------------------
// wxCriticalSectionLocker

%if wxLUA_USE_wxCriticalSectionLocker

%include "wx/thread.h"

%class %delete %encapsulate %noclassinfo wxCriticalSectionLocker
wxCriticalSectionLocker(wxCriticalSection& cs);
%endclass

%endif // wxLUA_USE_wxCriticalSectionLocker && wxUSE_THREADS


// ---------------------------------------------------------------------------
// wxRegEx - Regular expression support

%if wxLUA_USE_wxRegEx && wxUSE_REGEX

%include "wx/regex.h"

%enum
wxRE_EXTENDED
wxRE_BASIC
wxRE_ICASE
wxRE_NOSUB
wxRE_NEWLINE
wxRE_DEFAULT
%endenum

%enum
wxRE_NOTBOL
wxRE_NOTEOL
%endenum

%class %delete %noclassinfo %encapsulate wxRegEx
wxRegEx()
wxRegEx(const wxString& expr, int flags = wxRE_DEFAULT)

bool Compile(const wxString& pattern, int flags = wxRE_DEFAULT)
bool IsValid() const
wxString GetMatch(const wxString& text, size_t index = 0) const

// %override [bool, size_t start, size_t len] wxRegEx::GetMatch(size_t index = 0) const
// C++ Func: bool GetMatch(size_t* start, size_t* len, size_t index = 0) const
%override_name wxLua_wxRegEx_GetMatchIndexes bool GetMatch(size_t index = 0) const

size_t GetMatchCount() const
// Note: only need this form of Matches
bool Matches(const wxString &text, int flags = 0) const

// %override [int, string text] wxRegEx::Replace(const wxString& text, const wxString& replacement, size_t maxMatches = 0) const
// C++ Func: int Replace(wxString* text, const wxString& replacement, size_t maxMatches = 0) const
int Replace(const wxString& text, const wxString& replacement, size_t maxMatches = 0) const

// %override [int, string text] wxRegEx::ReplaceAll(const wxString& text, const wxString& replacement) const
// C++ Func: int ReplaceAll(wxString* text, const wxString& replacement) const
int ReplaceAll(const wxString& text, const wxString& replacement) const

// %override [int, string text] wxRegEx::ReplaceFirst(const wxString& text, const wxString& replacement) const
// C++ Func: int ReplaceFirst(wxString* text, const wxString& replacement) const
int ReplaceFirst(const wxString& text, const wxString& replacement) const

%endclass

%endif //wxLUA_USE_wxRegEx && wxUSE_REGEX



wxwidgets/wxbase_config.i - Lua table = 'wx'


// ===========================================================================
// Purpose: wxConfig and wxConfigBase classes
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

// TODO - add wxConfigFile and Reg

// ---------------------------------------------------------------------------
// wxConfigBase

%if wxLUA_USE_wxConfig && wxUSE_CONFIG

%include "wx/confbase.h"
%include "wx/config.h"
%include "wx/fileconf.h"

%enum
wxCONFIG_USE_LOCAL_FILE
wxCONFIG_USE_GLOBAL_FILE
wxCONFIG_USE_RELATIVE_PATH
wxCONFIG_USE_NO_ESCAPE_CHARACTERS
%wxchkver_2_8_1 wxCONFIG_USE_SUBDIR
%endenum

%enum wxConfigBase::EntryType
Type_Unknown
Type_String
Type_Boolean
Type_Integer
Type_Float
%endenum

%class %delete %noclassinfo %encapsulate wxConfigBase
// No constructor since this is a base class

// %override wxConfigBase::delete() - this is a wxLua provided function to
// delete the config (or derived class). Created wxConfigs are NOT tracked
// in memory since you MUST call wxConfigBase::Set(NULL) before
// deleting them. This is because the wxConfig you install using
// wxConfigBase::Set may need to exist outside of the scope it was created
// in and we don't want Lua to garbage collect it.
//void delete()

// Note: the return wxConfig cannot be deleted.
// You must call "config = Set(wx.NULL); config:delete()"
static wxConfigBase* Create()
static void DontCreateOnDemand()

bool DeleteAll()
bool DeleteEntry(const wxString& key, bool bDeleteGroupIfEmpty = true)
bool DeleteGroup(const wxString& key)
bool Exists(wxString& strName) const
bool Flush(bool bCurrentOnly = false)
static wxConfigBase* Get(bool CreateOnDemand = true)
wxString GetAppName() const
wxConfigBase::EntryType GetEntryType(const wxString& name) const

// %override [bool, string, index] wxConfigBase::GetFirstGroup()
// C++ Func: bool GetFirstGroup(wxString& str, long& index) const
bool GetFirstGroup() const

// %override [bool, string, index] wxConfigBase::GetFirstEntry()
// C++ Func: bool GetFirstEntry(wxString& str, long& index) const
bool GetFirstEntry() const

// %override [bool, string, index] wxConfigBase::GetNextGroup(index)
// C++ Func: bool GetNextGroup(wxString& str, long& index) const
bool GetNextGroup() const

// %override [bool, string, index] wxConfigBase::GetNextEntry(index)
// C++ Func: bool GetNextEntry(wxString& str, long& index) const
bool GetNextEntry(long index) const

unsigned int GetNumberOfEntries(bool bRecursive = false) const
unsigned int GetNumberOfGroups(bool bRecursive = false) const
const wxString& GetPath() const
wxString GetVendorName() const
bool HasEntry(wxString& strName) const
bool HasGroup(const wxString& strName) const
bool IsExpandingEnvVars() const
bool IsRecordingDefaults() const

// %override [bool, string] wxConfigBase::Read(const wxString& key, const wxString& defaultVal = "")
// C++ Func: bool Read(const wxString& key, wxString* str, const wxString& defaultVal) const
bool Read(const wxString& key, const wxString& defaultVal = "") const

// Since Lua uses double as it's number type, we only read/write doubles

// %override [bool, double] wxConfigBase::Read(const wxString& key, double defaultVal = 0)
// C++ Func: bool Read(const wxString& key, double* d, double defaultVal = 0) const
%override_name wxLua_wxConfigBase_ReadFloat bool Read(const wxString& key, double defaultVal) const

// // %override [bool, int] wxConfigBase::ReadInt(const wxString& key, long defaultVal = 0)
// // C++ Func: bool Read(const wxString& key, long* l, long defaultVal = 0) const
// %rename ReadInt bool Read(const wxString& key, long defaultVal = 0) const
// // %override [bool, double] wxConfigBase::ReadFloat(const wxString& key, double defaultVal = 0)
// // C++ Func: bool Read(const wxString& key, double* d, double defaultVal = 0) const
// %rename ReadFloat bool Read(const wxString& key, double defaultVal = 0) const

bool RenameEntry(const wxString& oldName, const wxString& newName)
bool RenameGroup(const wxString& oldName, const wxString& newName)
static %gc wxConfigBase* Set(%ungc wxConfigBase *pConfig = NULL)
void SetExpandEnvVars(bool bDoIt = true)
void SetPath(const wxString& strPath)
void SetRecordDefaults(bool bDoIt = true)


bool Write(const wxString& key, wxString &value)
// Since Lua uses double as it's number type, we only read/write doubles
bool Write(const wxString &key, double value)

// %rename WriteInt bool Write(const wxString &key, long value)
// %rename WriteFloat bool Write(const wxString &key, double value)
%endclass

// ---------------------------------------------------------------------------
// wxConfig

%class %delete %noclassinfo %encapsulate wxConfig, wxConfigBase
wxConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = 0)

%endclass

// ---------------------------------------------------------------------------
// wxFileConfig

%class %delete %noclassinfo %encapsulate wxFileConfig, wxConfigBase
wxFileConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE) //, wxMBConv& conv = wxConvUTF8)

void SetUmask(int mode)
%endclass

// ---------------------------------------------------------------------------
// wxMemoryConfig

%include "wx/memconf.h"

%class %delete %noclassinfo %encapsulate wxMemoryConfig, wxFileConfig
wxMemoryConfig()

%endclass

// ---------------------------------------------------------------------------
// wxConfigPathChanger

// a handy little class which changes current path to the path of given entry
// and restores it in dtor: so if you declare a local variable of this type,
// you work in the entry directory and the path is automatically restored
// when the function returns

%class %delete %noclassinfo %encapsulate wxConfigPathChanger
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry)

wxString Name() const
%wxchkver_2_8 void UpdateIfDeleted()
%endclass

%endif //wxLUA_USE_wxConfig && wxUSE_CONFIG


wxwidgets/wxbase_data.i - Lua table = 'wx'


// ===========================================================================
// Purpose: data classes, wxObject, arrays, lists, hash
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

// ---------------------------------------------------------------------------
// wxString - A stub class for people who absolutely need wxStrings
//
// wxLua uses Lua strings for almost everything and any function that takes
// a wxString can take a Lua string. All functions that return a wxString
// actually return Lua string unless otherwise noted.

%class %delete %noclassinfo %encapsulate wxString
wxString(const wxString& str = "")

wxString GetData() const

%endclass

// ---------------------------------------------------------------------------
// wxStringTokenizer

%include "wx/tokenzr.h"

%enum wxStringTokenizerMode
wxTOKEN_INVALID // set by def ctor until SetString() is called
wxTOKEN_DEFAULT // strtok() for whitespace delims, RET_EMPTY else
wxTOKEN_RET_EMPTY // return empty token in the middle of the string
wxTOKEN_RET_EMPTY_ALL // return trailing empty tokens too
wxTOKEN_RET_DELIMS // return the delim with token (implies RET_EMPTY)
wxTOKEN_STRTOK // behave exactly like strtok(3)
%endenum

%class %delete %noclassinfo wxStringTokenizer, wxObject
wxStringTokenizer()
wxStringTokenizer(const wxString& str, const wxString& delims = wxDEFAULT_DELIMITERS, wxStringTokenizerMode mode = wxTOKEN_DEFAULT);

void SetString(const wxString& str, const wxString& delims = wxDEFAULT_DELIMITERS, wxStringTokenizerMode mode = wxTOKEN_DEFAULT);

void Reinit(const wxString& str);
size_t CountTokens() const;
bool HasMoreTokens() const;
wxString GetNextToken();
//wxChar GetLastDelimiter() const

wxString GetString() const
size_t GetPosition() const

wxStringTokenizerMode GetMode() const
bool AllowEmpty() const
%endclass

// ---------------------------------------------------------------------------
// wxClientData
//
// No %delete since the container will delete it and you should only create one
// of these if you plan on attaching it to a container to avoid a memory leak.

//%enum wxClientDataType - used internally so we don't need it
// wxClientData_None
// wxClientData_Object
// wxClientData_Void
//%endenum

%class %noclassinfo wxClientData
// declare this as a datatype, but there is nothing we can do with this as
// it must be derived, see wxStringClientData
%endclass

// ---------------------------------------------------------------------------
// wxStringClientData
//
// No %delete since the container will delete it and you should only create one
// of these if you plan on attaching it to a container to avoid a memory leak.

%class %noclassinfo wxStringClientData, wxClientData
wxStringClientData(const wxString& data = "")

wxString GetData() const
void SetData(const wxString& data)
%endclass

// ---------------------------------------------------------------------------
// wxClientDataContainer

%class %noclassinfo wxClientDataContainer
wxClientDataContainer()

void SetClientObject( wxClientData *data )
wxClientData *GetClientObject() const

void SetClientData( voidptr_long data ) // C++ is (void *clientData) You can put a number here
// C++ Func: void *GetClientData() const
voidptr_long GetClientData() const // C++ returns (void *) You get a number here
%endclass

// ---------------------------------------------------------------------------
// wxObject

%if wxLUA_USE_wxObject

%include "wx/object.h"

%function wxObject* wxCreateDynamicObject(const wxString& className)

%class %delete wxObject
wxObject()

//void Dump(ostream& stream)

// %override [new class type] wxObject::DynamicCast() converts the wxObject
// to an object of type classname
void *DynamicCast(const wxString &classname)

wxClassInfo* GetClassInfo()
wxObjectRefData* GetRefData() const
bool IsKindOf(wxClassInfo *info)
bool IsSameAs(const wxObject& o) const
void Ref(const wxObject& clone)
void SetRefData(wxObjectRefData* data)
void UnRef()

//%operator wxObject& operator=(const wxObject& other)
%endclass

%class %noclassinfo wxObjectRefData // no %delete since this should be from a wxObject
int GetRefCount() const
%endclass

%endif //wxLUA_USE_wxObject

// ---------------------------------------------------------------------------
// wxClassInfo

%if wxLUA_USE_wxClassInfo

%include "wx/object.h"

%class %noclassinfo wxClassInfo // no %delete since we're always getting a static instance
// %override wxClassInfo() constructor creates an instance using wxClassInfo::FindClass
wxClassInfo(const wxString &name)

wxObject* CreateObject()
static wxClassInfo* FindClass(const wxString &name)
wxString GetBaseClassName1() const
wxString GetBaseClassName2() const
const wxClassInfo *GetBaseClass1() const
const wxClassInfo *GetBaseClass2() const
wxString GetClassName() const
int GetSize() const
bool IsDynamic()
bool IsKindOf(wxClassInfo* info)

static const wxClassInfo *GetFirst()
const wxClassInfo *GetNext() const

%endclass

%endif //wxLUA_USE_wxClassInfo


// ---------------------------------------------------------------------------
// wxList

%if wxLUA_USE_wxList && !wxUSE_STL

%include "wx/list.h"

%enum wxKeyType
wxKEY_NONE
wxKEY_INTEGER
wxKEY_STRING
%endenum

%class %delete wxList, wxObject
wxList()

wxNode *Append(wxObject *object)
wxNode *Append(long key, wxObject *object)
wxNode *Append(const wxString& key, wxObject *object)
void Clear()
void DeleteContents(bool destroy)
bool DeleteNode(wxNode *pNode)
bool DeleteObject(wxObject *pObject)
wxNode* Find(wxObject* pObject)
wxNode *Find(long key)
wxNode *Find(const wxString &key)
int GetCount() const
wxNode *GetFirst()
wxNode *GetLast()
int IndexOf(wxObject* pObject)
wxNode *Insert(wxObject *pObject)
wxNode *Insert(size_t position, wxObject *pObject)
wxNode *Insert(wxNode *pNode, wxObject *pObject)
bool IsEmpty() const
wxNode *Item(int iIndex) const
wxNode *Member(wxObject *pObject)
%endclass

// ---------------------------------------------------------------------------
// wxNode - wxList

%class %noclassinfo wxNode // no %delete since we get this from a wxList
// no constructor, just use this from a wxList

wxObject *GetData()
wxNode *GetNext()
wxNode *GetPrevious()
void SetData(wxObject *data)
//int IndexOf() - unfortunately a protected member of wxNodeBase

// To convert wxObject* GetData() to another type use wxObject::DynamicCast
// See wxPenList, wxBrushList, wxMenuItemList, wxWindowList

// Example: How to use a wxWindowList
// frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "Test");
// win = wx.wxWindow(frame, wx.wxID_ANY)
// frame:Show(true)
// wlist = frame:GetChildren()
// wlist:Item(0):GetData():DynamicCast("wxWindow"):SetBackgroundColour(wx.wxRED)

// Example: How to use a wxMenuItemList
// local fileMenu = wx.wxMenu()
// fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program")
// mList = fileMenu:GetMenuItems()
// print(mList:GetCount(), mList:GetFirst():GetData():DynamicCast("wxMenuItem"):GetLabel())

%endclass

%endif //wxLUA_USE_wxList && !wxUSE_STL

// ---------------------------------------------------------------------------
// wxArray - Can't implement this since it's not really a class.
// Here's the list of generic functions.

//%class %noclassinfo wxArray
// // no constructor since this class doesn't exist
// void Add(T &item, size_t copies = 1)
// void Alloc(size_t count)
// void Clear()
// void Empty()
// int GetCount() const
// void Insert(T &item, size_t n, size_t copies = 1)
// bool IsEmpty() const
// void RemoveAt(size_t index, size_t count = 1)
// void Shrink()
//%endclass

// ---------------------------------------------------------------------------
// wxArrayInt
//
// NOTE: Any function that takes a "const wxArrayInt& arr" or "wxArrayInt arr"
// can take a Lua table of integers with numeric indexes

%if wxLUA_USE_wxArrayInt

%include "wx/dynarray.h"

%class %delete %noclassinfo %encapsulate wxArrayInt
wxArrayInt()
wxArrayInt(const wxArrayInt& array)

// %override [Lua table] wxArrayInt::ToLuaTable() const
// returns a table array of the integers
int ToLuaTable() const

void Add( int num )
void Alloc(size_t count)
void Clear()
void Empty()
int GetCount() const
bool IsEmpty() const
int Index(int n, bool searchFromEnd = false)
void Insert( int num, int n, int copies = 1 )
int Item( int n )
void Remove(int n)
void RemoveAt(size_t index)
void Shrink()

%operator int operator[](size_t nIndex)

%endclass

%endif //wxLUA_USE_wxArrayInt

// ---------------------------------------------------------------------------
// wxArrayString
//
// NOTE: Any function that takes a "const wxArrayString& arr" or "wxArrayString arr"
// can take a Lua table of strings with numeric indexes

%if wxLUA_USE_wxArrayString

%include "wx/arrstr.h"

%class %delete %noclassinfo %encapsulate wxArrayString
wxArrayString()
wxArrayString(const wxArrayString& array)

// %override [Lua table] wxArrayString::ToLuaTable() const
// returns a table array of the strings
int ToLuaTable() const

size_t Add(const wxString& str, size_t copies = 1)
void Alloc(size_t nCount)
void Clear()
void Empty()
int GetCount() const
int Index(const wxString &sz, bool bCase = true, bool bFromEnd = false)
void Insert(const wxString& str, int nIndex, size_t copies = 1)
bool IsEmpty()
wxString Item(size_t nIndex) const
wxString Last()
void Remove(const wxString &sz)
void RemoveAt(size_t nIndex, size_t count = 1)
void Shrink()
void Sort(bool reverseOrder = false)

%operator wxString& operator[](size_t nIndex)

%endclass

// ---------------------------------------------------------------------------
// wxSortedArrayString
//
// NOTE: Any function that takes a "const wxSortedArrayString& arr" or "wxSortedArrayString arr"
// can take a Lua table of strings with numeric indexes
//
// Note: We cheat by saying that it's derived from a wxArrayString to not
// have to duplicate it's methods. The binder doesn't know any better.

%class %delete %noclassinfo %encapsulate wxSortedArrayString, wxArrayString
wxSortedArrayString()
wxSortedArrayString(const wxArrayString& src) // have to have this constructor since they're not actually derived
wxSortedArrayString(const wxSortedArrayString& src)

%endclass

%endif //wxLUA_USE_wxArrayString

// ---------------------------------------------------------------------------
// wxStringList - is deprecated in wxWidgets since 2.2

//%if wxLUA_USE_wxStringList
//%include "wx/list.h"
//%class %noclassinfo wxStringList, wxList
// wxStringList()
// wxNode *Add(const wxString& s)
// void Clear()
// void Delete(const wxString& s)
// bool Member(const wxString& s)
// void Sort()
//%endclass
//%endif wxLUA_USE_wxStringList

// ---------------------------------------------------------------------------
// wxHashTable - Lua tables are hashtables

//%if wxLUA_USE_wxHashTable

//%include "wx/hash.h"

//%if %wxchkver_2_6
//%class %noclassinfo wxHashTable::Node
//%endclass
//%endif

//%class %noclassinfo wxHashTable, wxObject
// !%wxchkver_2_6 wxHashTable(unsigned int key_type, int size = 1000)
// %wxchkver_2_6 wxHashTable(wxKeyType key_type, int size = 1000)
// void BeginFind()
// void Clear()
// wxObject * Delete(long key)
// void DeleteContents(bool flag)
// wxObject * Get(long key)
// wxObject * Get(const wxString &key)
// long MakeKey(const wxString& string)
// !%wxchkver_2_6 wxNode * Next()
// %wxchkver_2_6 wxHashTable::Node * Next()
// void Put(long key, wxObject *object)
// void Put(const wxString& key, wxObject *object)
// int GetCount() const
//%endclass

//%endif wxLUA_USE_wxHashTable

// ---------------------------------------------------------------------------
// wxLongLong

%if wxUSE_LONGLONG

%include "wx/longlong.h"

%class %delete %encapsulate %noclassinfo wxLongLong
wxLongLong(long hi = 0, unsigned long lo = 0)

wxLongLong Abs() const
wxLongLong& Assign(double d)
long GetHi() const
unsigned long GetLo() const
double ToDouble() const
long ToLong() const
wxString ToString() const

//%operator wxLongLong operator+(const wxLongLong& ll) const
//%operator wxLongLong& operator+(const wxLongLong& ll)
//%operator wxLongLong& operator++()
//%operator wxLongLong operator-() const
//%operator wxLongLong operator-(const wxLongLong& ll) const
%endclass

// ---------------------------------------------------------------------------
// wxULongLong

%class %delete %encapsulate %noclassinfo wxULongLong
wxULongLong(unsigned long hi = 0, unsigned long lo = 0)

unsigned long GetHi() const
unsigned long GetLo() const
long ToULong() const
wxString ToString() const
%endclass

%endif wxUSE_LONGLONG


wxwidgets/wxbase_datetime.i - Lua table = 'wx'


// ===========================================================================
// Purpose: wxDateTime and other time related classes and functions
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

%include "wx/utils.h"
%include "wx/timer.h"

%function wxString wxNow()
%function long wxGetLocalTime()
%function long wxGetUTCTime()
%function wxLongLong wxGetLocalTimeMillis()
%wxcompat_2_6 %function void wxStartTimer() // deprecated in 2.8 use wxStopWatch
%wxcompat_2_6 %function long wxGetElapsedTime(bool resetTimer = true) // deprecated in 2.8 use wxStopWatch
%function void wxSleep(int secs)
%wxchkver_2_6 %function void wxMilliSleep(unsigned long milliseconds)
%wxchkver_2_6 %function void wxMicroSleep(unsigned long microseconds)
!%wxchkver_2_6 %function void wxUsleep(unsigned long milliseconds)

// ---------------------------------------------------------------------------
// wxDateTime

%if wxLUA_USE_wxDateTime && wxUSE_DATETIME

%include "wx/datetime.h"

%enum wxDateTime::TZ
Local
GMT_12
GMT_11
GMT_10
GMT_9
GMT_8
GMT_7
GMT_6
GMT_5
GMT_4
GMT_3
GMT_2
GMT_1
GMT0
GMT1
GMT2
GMT3
GMT4
GMT5
GMT6
GMT7
GMT8
GMT9
GMT10
GMT11
GMT12
%wxchkver_2_8 GMT13
WET
WEST
CET
CEST
EET
EEST
MSK
MSD
AST
ADT
EST
EDT
CST
CDT
MST
MDT
PST
PDT
HST
AKST
AKDT
A_WST
A_CST
A_EST
A_ESST
%wxchkver_2_8 NZST
%wxchkver_2_8 NZDT
UTC
%endenum

%enum wxDateTime::Calendar
Gregorian
Julian
%endenum

%enum wxDateTime::Country
Country_Unknown
Country_Default
Country_WesternEurope_Start
Country_EEC
France
Germany
UK
Country_WesternEurope_End
Russia
USA
%endenum

%enum wxDateTime::Month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Inv_Month
%endenum

%enum wxDateTime::WeekDay
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Inv_WeekDay
%endenum

%typedef unsigned short wxDateTime::wxDateTime_t

%class %delete %noclassinfo %encapsulate wxDateTime
%define_object wxDefaultDateTime

wxDateTime()
wxDateTime(time_t dateTime) // use with Lua's os.time() on MSW, Linux, others?
%rename wxDateTimeFromJDN wxDateTime(double dateTime)
%rename wxDateTimeFromHMS wxDateTime(int hour, int minute, int second, int millisec)
%rename wxDateTimeFromDMY wxDateTime(int day, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year, int hour = 0, int minute = 0, int second = 0, int millisec = 0)

wxDateTime& SetToCurrent()
wxDateTime& Set(time_t time) // use with Lua's os.time() on MSW, Linux, others?
%rename SetToJDN wxDateTime& Set(double dateTime)
%rename SetToHMS wxDateTime& Set(int hour, int minute, int second, int millisec)
%rename SetToDMY wxDateTime& Set(int day, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year, int hour = 0, int minute = 0, int second = 0, int millisec = 0)
wxDateTime& ResetTime()
wxDateTime& SetDay(int day)
wxDateTime& SetMonth(wxDateTime::Month month)
wxDateTime& SetYear(int year)
wxDateTime& SetHour(int hour)
wxDateTime& SetMinute(int minute)
wxDateTime& SetSecond(int second)
wxDateTime& SetMillisecond(int millisecond)
bool IsWorkDay(wxDateTime::Country country = wxDateTime::Country_Default) const
bool IsEqualTo(const wxDateTime& datetime) const
bool IsEarlierThan(const wxDateTime& datetime) const
bool IsLaterThan(const wxDateTime& datetime) const
bool IsStrictlyBetween(const wxDateTime& t1, const wxDateTime& t2) const
bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const
bool IsSameDate(const wxDateTime& dt) const
bool IsSameTime(const wxDateTime& dt) const
bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const
bool IsValid()
long GetTicks()
wxDateTime& SetToWeekDayInSameWeek(wxDateTime::WeekDay weekday)
wxDateTime GetWeekDayInSameWeek(wxDateTime::WeekDay weekday) const
wxDateTime& SetToNextWeekDay(wxDateTime::WeekDay weekday)
wxDateTime GetNextWeekDay(wxDateTime::WeekDay weekday) const
wxDateTime& SetToPrevWeekDay(wxDateTime::WeekDay weekday)
wxDateTime GetPrevWeekDay(wxDateTime::WeekDay weekday) const
bool SetToWeekDay(wxDateTime::WeekDay weekday, int n = 1, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year)
wxDateTime GetWeekDay(wxDateTime::WeekDay weekday, int n = 1, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year) const
bool SetToLastWeekDay(wxDateTime::WeekDay weekday, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year)
wxDateTime GetLastWeekDay(wxDateTime::WeekDay weekday, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year)
!%wxchkver_2_6 bool SetToTheWeek(wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon)
!%wxchkver_2_6 wxDateTime GetWeek(wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon) const
%wxchkver_2_6 static wxDateTime SetToWeekOfYear(int year, wxDateTime::wxDateTime_t numWeek, wxDateTime::WeekDay weekday = wxDateTime::Mon)
wxDateTime& SetToLastMonthDay(wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year)
wxDateTime GetLastMonthDay(wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year) const
wxDateTime& SetToYearDay(wxDateTime::wxDateTime_t yday)
wxDateTime GetYearDay(wxDateTime::wxDateTime_t yday) const
double GetJulianDayNumber() const
double GetJDN() const
double GetModifiedJulianDayNumber() const
double GetMJD() const
double GetRataDie() const
wxDateTime ToGMT(bool noDST = false) const
wxDateTime& MakeGMT(bool noDST = false)
int IsDST(wxDateTime::Country country = wxDateTime::Country_Default) const
wxDateTime& Add(const wxTimeSpan& diff)
wxDateTime& Add(const wxDateSpan& diff)
wxDateTime& Subtract(const wxTimeSpan& diff)
wxDateTime& Subtract(const wxDateSpan& diff)
wxString ParseRfc822Date(wxString date)
wxString ParseFormat(wxString date, wxString format = "%c", const wxDateTime& dateDef = wxDefaultDateTime)
wxString ParseDateTime(wxString datetime)
wxString ParseDate(wxString date)
wxString ParseTime(wxString time)
wxString FormatDate() const
wxString FormatTime() const
wxString FormatISODate() const
wxString FormatISOTime() const
wxString Format(wxString format = "%c", wxDateTime::TZ tz = wxDateTime::Local) const
%endclass

// ---------------------------------------------------------------------------
// wxDateTimeArray

%class %delete %noclassinfo %encapsulate wxDateTimeArray
wxDateTimeArray()
wxDateTimeArray(const wxDateTimeArray& array)

void Add(const wxDateTime& dateTime, size_t copies = 1)
void Alloc(size_t nCount)
void Clear()
void Empty()
int GetCount() const
void Insert(const wxDateTime& dt, int nIndex, size_t copies = 1)
bool IsEmpty()
wxDateTime Item(size_t nIndex) const
wxDateTime Last()
void RemoveAt(size_t nIndex, size_t count = 1)
void Shrink()
%endclass

%endif //wxLUA_USE_wxDateTime && wxUSE_DATETIME

// ---------------------------------------------------------------------------
// wxTimeSpan

%if wxLUA_USE_wxTimeSpan && wxUSE_DATETIME

%include "wx/datetime.h"

%class %delete %noclassinfo %encapsulate wxTimeSpan
wxTimeSpan()
wxTimeSpan(long hours, long minutes = 0, long seconds = 0, long milliseconds = 0)

wxTimeSpan Abs()
wxTimeSpan Add(const wxTimeSpan& diff) const
static wxTimeSpan Days(long days)
static wxTimeSpan Day()
wxString Format(wxString format = "%H:%M:%S") const
int GetDays() const
int GetHours() const
wxLongLong GetMilliseconds() const
int GetMinutes() const
wxLongLong GetSeconds() const
wxLongLong GetValue() const
int GetWeeks() const
static wxTimeSpan Hours(long hours)
static wxTimeSpan Hour()
bool IsEqualTo(const wxTimeSpan& ts) const
bool IsLongerThan(const wxTimeSpan& ts) const
bool IsNegative() const
bool IsNull() const
bool IsPositive() const
bool IsShorterThan(const wxTimeSpan& ts) const
static wxTimeSpan Minutes(long min)
static wxTimeSpan Minute()
wxTimeSpan Multiply(int n) const
wxTimeSpan Negate() const
wxTimeSpan& Neg()
static wxTimeSpan Seconds(long sec)
static wxTimeSpan Second()
wxTimeSpan Subtract(const wxTimeSpan& diff) const
static wxTimeSpan Weeks(long weeks)
static wxTimeSpan Week()
%endclass

%endif //wxLUA_USE_wxTimeSpan && wxUSE_DATETIME

// ---------------------------------------------------------------------------
// wxDateSpan

%if wxLUA_USE_wxDateSpan && wxUSE_DATETIME

%include "wx/datetime.h"

%class %delete %noclassinfo %encapsulate wxDateSpan
wxDateSpan(int years = 0, int months = 0, int weeks = 0, int days = 0)

wxDateSpan Add(const wxDateSpan& other) const
static wxDateSpan Day()
static wxDateSpan Days(int days)
int GetDays() const
int GetMonths() const
int GetTotalDays() const
int GetWeeks() const
int GetYears() const
static wxDateSpan Month()
static wxDateSpan Months(int mon)
wxDateSpan Multiply(int factor) const
wxDateSpan Negate() const
wxDateSpan& Neg()
wxDateSpan& SetDays(int n)
wxDateSpan& SetMonths(int n)
wxDateSpan& SetWeeks(int n)
wxDateSpan& SetYears(int n)
wxDateSpan Subtract(const wxDateSpan& other) const
static wxDateSpan Week()
static wxDateSpan Weeks(int weeks)
static wxDateSpan Year()
static wxDateSpan Years(int years)

%operator bool operator==(wxDateSpan& other) const
%endclass

%endif //wxLUA_USE_wxDateSpan && wxUSE_DATETIME

// ---------------------------------------------------------------------------
// wxDateTimeHolidayAuthority

%if wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME

%class %noclassinfo %encapsulate wxDateTimeHolidayAuthority
// no constructor since this class has pure virtual functions

static bool IsHoliday(const wxDateTime& dt)
static size_t GetHolidaysInRange(const wxDateTime& dtStart, const wxDateTime& dtEnd, wxDateTimeArray& holidays)
static void ClearAllAuthorities()
static void AddAuthority(wxDateTimeHolidayAuthority *auth)

%endclass

// ---------------------------------------------------------------------------
// wxDateTimeWorkDays

%class %delete %noclassinfo %encapsulate wxDateTimeWorkDays, wxDateTimeHolidayAuthority
wxDateTimeWorkDays()
%endclass

%endif //wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME


// ---------------------------------------------------------------------------
// wxStopWatch

%if wxLUA_USE_wxStopWatch && wxUSE_STOPWATCH

%include "wx/stopwatch.h"

%class %delete %noclassinfo %encapsulate wxStopWatch
wxStopWatch() // ctor starts the stop watch

void Start(long t0 = 0) // start the stop watch at the moment t0
void Pause()
void Resume()
long Time() const
%endclass

%endif // wxLUA_USE_wxStopWatch && wxUSE_STOPWATCH


// ---------------------------------------------------------------------------
// wxLocale

%include "wx/intl.h"

%if wxUSE_INTL

%enum wxLanguage
// user's default/preffered language as got from OS:
wxLANGUAGE_DEFAULT,
// unknown language, if wxLocale::GetSystemLanguage fails:
wxLANGUAGE_UNKNOWN,

wxLANGUAGE_ABKHAZIAN,
wxLANGUAGE_AFAR,
wxLANGUAGE_AFRIKAANS,
wxLANGUAGE_ALBANIAN,
wxLANGUAGE_AMHARIC,
wxLANGUAGE_ARABIC,
wxLANGUAGE_ARABIC_ALGERIA,
wxLANGUAGE_ARABIC_BAHRAIN,
wxLANGUAGE_ARABIC_EGYPT,
wxLANGUAGE_ARABIC_IRAQ,
wxLANGUAGE_ARABIC_JORDAN,
wxLANGUAGE_ARABIC_KUWAIT,
wxLANGUAGE_ARABIC_LEBANON,
wxLANGUAGE_ARABIC_LIBYA,
wxLANGUAGE_ARABIC_MOROCCO,
wxLANGUAGE_ARABIC_OMAN,
wxLANGUAGE_ARABIC_QATAR,
wxLANGUAGE_ARABIC_SAUDI_ARABIA,
wxLANGUAGE_ARABIC_SUDAN,
wxLANGUAGE_ARABIC_SYRIA,
wxLANGUAGE_ARABIC_TUNISIA,
wxLANGUAGE_ARABIC_UAE,
wxLANGUAGE_ARABIC_YEMEN,
wxLANGUAGE_ARMENIAN,
wxLANGUAGE_ASSAMESE,
wxLANGUAGE_AYMARA,
wxLANGUAGE_AZERI,
wxLANGUAGE_AZERI_CYRILLIC,
wxLANGUAGE_AZERI_LATIN,
wxLANGUAGE_BASHKIR,
wxLANGUAGE_BASQUE,
wxLANGUAGE_BELARUSIAN,
wxLANGUAGE_BENGALI,
wxLANGUAGE_BHUTANI,
wxLANGUAGE_BIHARI,
wxLANGUAGE_BISLAMA,
wxLANGUAGE_BRETON,
wxLANGUAGE_BULGARIAN,
wxLANGUAGE_BURMESE,
wxLANGUAGE_CAMBODIAN,
wxLANGUAGE_CATALAN,
wxLANGUAGE_CHINESE,
wxLANGUAGE_CHINESE_SIMPLIFIED,
wxLANGUAGE_CHINESE_TRADITIONAL,
wxLANGUAGE_CHINESE_HONGKONG,
wxLANGUAGE_CHINESE_MACAU,
wxLANGUAGE_CHINESE_SINGAPORE,
wxLANGUAGE_CHINESE_TAIWAN,
wxLANGUAGE_CORSICAN,
wxLANGUAGE_CROATIAN,
wxLANGUAGE_CZECH,
wxLANGUAGE_DANISH,
wxLANGUAGE_DUTCH,
wxLANGUAGE_DUTCH_BELGIAN,
wxLANGUAGE_ENGLISH,
wxLANGUAGE_ENGLISH_UK,
wxLANGUAGE_ENGLISH_US,
wxLANGUAGE_ENGLISH_AUSTRALIA,
wxLANGUAGE_ENGLISH_BELIZE,
wxLANGUAGE_ENGLISH_BOTSWANA,
wxLANGUAGE_ENGLISH_CANADA,
wxLANGUAGE_ENGLISH_CARIBBEAN,
wxLANGUAGE_ENGLISH_DENMARK,
wxLANGUAGE_ENGLISH_EIRE,
wxLANGUAGE_ENGLISH_JAMAICA,
wxLANGUAGE_ENGLISH_NEW_ZEALAND,
wxLANGUAGE_ENGLISH_PHILIPPINES,
wxLANGUAGE_ENGLISH_SOUTH_AFRICA,
wxLANGUAGE_ENGLISH_TRINIDAD,
wxLANGUAGE_ENGLISH_ZIMBABWE,
wxLANGUAGE_ESPERANTO,
wxLANGUAGE_ESTONIAN,
wxLANGUAGE_FAEROESE,
wxLANGUAGE_FARSI,
wxLANGUAGE_FIJI,
wxLANGUAGE_FINNISH,
wxLANGUAGE_FRENCH,
wxLANGUAGE_FRENCH_BELGIAN,
wxLANGUAGE_FRENCH_CANADIAN,
wxLANGUAGE_FRENCH_LUXEMBOURG,
wxLANGUAGE_FRENCH_MONACO,
wxLANGUAGE_FRENCH_SWISS,
wxLANGUAGE_FRISIAN,
wxLANGUAGE_GALICIAN,
wxLANGUAGE_GEORGIAN,
wxLANGUAGE_GERMAN,
wxLANGUAGE_GERMAN_AUSTRIAN,
wxLANGUAGE_GERMAN_BELGIUM,
wxLANGUAGE_GERMAN_LIECHTENSTEIN,
wxLANGUAGE_GERMAN_LUXEMBOURG,
wxLANGUAGE_GERMAN_SWISS,
wxLANGUAGE_GREEK,
wxLANGUAGE_GREENLANDIC,
wxLANGUAGE_GUARANI,
wxLANGUAGE_GUJARATI,
wxLANGUAGE_HAUSA,
wxLANGUAGE_HEBREW,
wxLANGUAGE_HINDI,
wxLANGUAGE_HUNGARIAN,
wxLANGUAGE_ICELANDIC,
wxLANGUAGE_INDONESIAN,
wxLANGUAGE_INTERLINGUA,
wxLANGUAGE_INTERLINGUE,
wxLANGUAGE_INUKTITUT,
wxLANGUAGE_INUPIAK,
wxLANGUAGE_IRISH,
wxLANGUAGE_ITALIAN,
wxLANGUAGE_ITALIAN_SWISS,
wxLANGUAGE_JAPANESE,
wxLANGUAGE_JAVANESE,
wxLANGUAGE_KANNADA,
wxLANGUAGE_KASHMIRI,
wxLANGUAGE_KASHMIRI_INDIA,
wxLANGUAGE_KAZAKH,
wxLANGUAGE_KERNEWEK,
wxLANGUAGE_KINYARWANDA,
wxLANGUAGE_KIRGHIZ,
wxLANGUAGE_KIRUNDI,
wxLANGUAGE_KONKANI,
wxLANGUAGE_KOREAN,
wxLANGUAGE_KURDISH,
wxLANGUAGE_LAOTHIAN,
wxLANGUAGE_LATIN,
wxLANGUAGE_LATVIAN,
wxLANGUAGE_LINGALA,
wxLANGUAGE_LITHUANIAN,
wxLANGUAGE_MACEDONIAN,
wxLANGUAGE_MALAGASY,
wxLANGUAGE_MALAY,
wxLANGUAGE_MALAYALAM,
wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM,
wxLANGUAGE_MALAY_MALAYSIA,
wxLANGUAGE_MALTESE,
wxLANGUAGE_MANIPURI,
wxLANGUAGE_MAORI,
wxLANGUAGE_MARATHI,
wxLANGUAGE_MOLDAVIAN,
wxLANGUAGE_MONGOLIAN,
wxLANGUAGE_NAURU,
wxLANGUAGE_NEPALI,
wxLANGUAGE_NEPALI_INDIA,
wxLANGUAGE_NORWEGIAN_BOKMAL,
wxLANGUAGE_NORWEGIAN_NYNORSK,
wxLANGUAGE_OCCITAN,
wxLANGUAGE_ORIYA,
wxLANGUAGE_OROMO,
wxLANGUAGE_PASHTO,
wxLANGUAGE_POLISH,
wxLANGUAGE_PORTUGUESE,
wxLANGUAGE_PORTUGUESE_BRAZILIAN,
wxLANGUAGE_PUNJABI,
wxLANGUAGE_QUECHUA,
wxLANGUAGE_RHAETO_ROMANCE,
wxLANGUAGE_ROMANIAN,
wxLANGUAGE_RUSSIAN,
wxLANGUAGE_RUSSIAN_UKRAINE,
wxLANGUAGE_SAMOAN,
wxLANGUAGE_SANGHO,
wxLANGUAGE_SANSKRIT,
wxLANGUAGE_SCOTS_GAELIC,
wxLANGUAGE_SERBIAN,
wxLANGUAGE_SERBIAN_CYRILLIC,
wxLANGUAGE_SERBIAN_LATIN,
wxLANGUAGE_SERBO_CROATIAN,
wxLANGUAGE_SESOTHO,
wxLANGUAGE_SETSWANA,
wxLANGUAGE_SHONA,
wxLANGUAGE_SINDHI,
wxLANGUAGE_SINHALESE,
wxLANGUAGE_SISWATI,
wxLANGUAGE_SLOVAK,
wxLANGUAGE_SLOVENIAN,
wxLANGUAGE_SOMALI,
wxLANGUAGE_SPANISH,
wxLANGUAGE_SPANISH_ARGENTINA,
wxLANGUAGE_SPANISH_BOLIVIA,
wxLANGUAGE_SPANISH_CHILE,
wxLANGUAGE_SPANISH_COLOMBIA,
wxLANGUAGE_SPANISH_COSTA_RICA,
wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC,
wxLANGUAGE_SPANISH_ECUADOR,
wxLANGUAGE_SPANISH_EL_SALVADOR,
wxLANGUAGE_SPANISH_GUATEMALA,
wxLANGUAGE_SPANISH_HONDURAS,
wxLANGUAGE_SPANISH_MEXICAN,
wxLANGUAGE_SPANISH_MODERN,
wxLANGUAGE_SPANISH_NICARAGUA,
wxLANGUAGE_SPANISH_PANAMA,
wxLANGUAGE_SPANISH_PARAGUAY,
wxLANGUAGE_SPANISH_PERU,
wxLANGUAGE_SPANISH_PUERTO_RICO,
wxLANGUAGE_SPANISH_URUGUAY,
wxLANGUAGE_SPANISH_US,
wxLANGUAGE_SPANISH_VENEZUELA,
wxLANGUAGE_SUNDANESE,
wxLANGUAGE_SWAHILI,
wxLANGUAGE_SWEDISH,
wxLANGUAGE_SWEDISH_FINLAND,
wxLANGUAGE_TAGALOG,
wxLANGUAGE_TAJIK,
wxLANGUAGE_TAMIL,
wxLANGUAGE_TATAR,
wxLANGUAGE_TELUGU,
wxLANGUAGE_THAI,
wxLANGUAGE_TIBETAN,
wxLANGUAGE_TIGRINYA,
wxLANGUAGE_TONGA,
wxLANGUAGE_TSONGA,
wxLANGUAGE_TURKISH,
wxLANGUAGE_TURKMEN,
wxLANGUAGE_TWI,
wxLANGUAGE_UIGHUR,
wxLANGUAGE_UKRAINIAN,
wxLANGUAGE_URDU,
wxLANGUAGE_URDU_INDIA,
wxLANGUAGE_URDU_PAKISTAN,
wxLANGUAGE_UZBEK,
wxLANGUAGE_UZBEK_CYRILLIC,
wxLANGUAGE_UZBEK_LATIN,
wxLANGUAGE_VIETNAMESE,
wxLANGUAGE_VOLAPUK,
wxLANGUAGE_WELSH,
wxLANGUAGE_WOLOF,
wxLANGUAGE_XHOSA,
wxLANGUAGE_YIDDISH,
wxLANGUAGE_YORUBA,
wxLANGUAGE_ZHUANG,
wxLANGUAGE_ZULU,

// for custom, user-defined languages:
wxLANGUAGE_USER_DEFINED
%endenum

%enum wxFontEncoding
wxFONTENCODING_SYSTEM // system default
wxFONTENCODING_DEFAULT // current default encoding

// ISO8859 standard defines a number of single-byte charsets
wxFONTENCODING_ISO8859_1 // West European (Latin1)
wxFONTENCODING_ISO8859_2 // Central and East European (Latin2)
wxFONTENCODING_ISO8859_3 // Esperanto (Latin3)
wxFONTENCODING_ISO8859_4 // Baltic (old) (Latin4)
wxFONTENCODING_ISO8859_5 // Cyrillic
wxFONTENCODING_ISO8859_6 // Arabic
wxFONTENCODING_ISO8859_7 // Greek
wxFONTENCODING_ISO8859_8 // Hebrew
wxFONTENCODING_ISO8859_9 // Turkish (Latin5)
wxFONTENCODING_ISO8859_10 // Variation of Latin4 (Latin6)
wxFONTENCODING_ISO8859_11 // Thai
wxFONTENCODING_ISO8859_12 // doesn't exist currently, but put it
// here anyhow to make all ISO8859
// consecutive numbers
wxFONTENCODING_ISO8859_13 // Baltic (Latin7)
wxFONTENCODING_ISO8859_14 // Latin8
wxFONTENCODING_ISO8859_15 // Latin9 (a.k.a. Latin0, includes euro)
wxFONTENCODING_ISO8859_MAX

// Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html)
wxFONTENCODING_KOI8 // KOI8 Russian
wxFONTENCODING_KOI8_U // KOI8 Ukrainian
wxFONTENCODING_ALTERNATIVE // same as MS-DOS CP866
wxFONTENCODING_BULGARIAN // used under Linux in Bulgaria

// what would we do without Microsoft? They have their own encodings
// for DOS
wxFONTENCODING_CP437 // original MS-DOS codepage
wxFONTENCODING_CP850 // CP437 merged with Latin1
wxFONTENCODING_CP852 // CP437 merged with Latin2
wxFONTENCODING_CP855 // another cyrillic encoding
wxFONTENCODING_CP866 // and another one
// and for Windows
wxFONTENCODING_CP874 // WinThai
wxFONTENCODING_CP932 // Japanese (shift-JIS)
wxFONTENCODING_CP936 // Chinese simplified (GB)
wxFONTENCODING_CP949 // Korean (Hangul charset)
wxFONTENCODING_CP950 // Chinese (traditional - Big5)
wxFONTENCODING_CP1250 // WinLatin2
wxFONTENCODING_CP1251 // WinCyrillic
wxFONTENCODING_CP1252 // WinLatin1
wxFONTENCODING_CP1253 // WinGreek (8859-7)
wxFONTENCODING_CP1254 // WinTurkish
wxFONTENCODING_CP1255 // WinHebrew
wxFONTENCODING_CP1256 // WinArabic
wxFONTENCODING_CP1257 // WinBaltic (same as Latin 7)
wxFONTENCODING_CP12_MAX

wxFONTENCODING_UTF7 // UTF-7 Unicode encoding
wxFONTENCODING_UTF8 // UTF-8 Unicode encoding
wxFONTENCODING_EUC_JP // Extended Unix Codepage for Japanese
wxFONTENCODING_UTF16BE // UTF-16 Big Endian Unicode encoding
wxFONTENCODING_UTF16LE // UTF-16 Little Endian Unicode encoding
wxFONTENCODING_UTF32BE // UTF-32 Big Endian Unicode encoding
wxFONTENCODING_UTF32LE // UTF-32 Little Endian Unicode encoding

wxFONTENCODING_MACROMAN // the standard mac encodings
wxFONTENCODING_MACJAPANESE
wxFONTENCODING_MACCHINESETRAD
wxFONTENCODING_MACKOREAN
wxFONTENCODING_MACARABIC
wxFONTENCODING_MACHEBREW
wxFONTENCODING_MACGREEK
wxFONTENCODING_MACCYRILLIC
wxFONTENCODING_MACDEVANAGARI
wxFONTENCODING_MACGURMUKHI
wxFONTENCODING_MACGUJARATI
wxFONTENCODING_MACORIYA
wxFONTENCODING_MACBENGALI
wxFONTENCODING_MACTAMIL
wxFONTENCODING_MACTELUGU
wxFONTENCODING_MACKANNADA
wxFONTENCODING_MACMALAJALAM
wxFONTENCODING_MACSINHALESE
wxFONTENCODING_MACBURMESE
wxFONTENCODING_MACKHMER
wxFONTENCODING_MACTHAI
wxFONTENCODING_MACLAOTIAN
wxFONTENCODING_MACGEORGIAN
wxFONTENCODING_MACARMENIAN
wxFONTENCODING_MACCHINESESIMP
wxFONTENCODING_MACTIBETAN
wxFONTENCODING_MACMONGOLIAN
wxFONTENCODING_MACETHIOPIC
wxFONTENCODING_MACCENTRALEUR
wxFONTENCODING_MACVIATNAMESE
wxFONTENCODING_MACARABICEXT
wxFONTENCODING_MACSYMBOL
wxFONTENCODING_MACDINGBATS
wxFONTENCODING_MACTURKISH
wxFONTENCODING_MACCROATIAN
wxFONTENCODING_MACICELANDIC
wxFONTENCODING_MACROMANIAN
wxFONTENCODING_MACCELTIC
wxFONTENCODING_MACGAELIC
wxFONTENCODING_MACKEYBOARD

wxFONTENCODING_MAX // highest enumerated encoding value

wxFONTENCODING_MACMIN //= wxFONTENCODING_MACROMAN ,
wxFONTENCODING_MACMAX //= wxFONTENCODING_MACKEYBOARD ,

// aliases for endian-dependent UTF encodings
wxFONTENCODING_UTF16 // native UTF-16
wxFONTENCODING_UTF32 // native UTF-32

// alias for the native Unicode encoding on this platform
// (this is used by wxEncodingConverter and wxUTFFile only for now)
wxFONTENCODING_UNICODE

// alternative names for Far Eastern encodings
// Chinese
wxFONTENCODING_GB2312 // Simplified Chinese
wxFONTENCODING_BIG5 // Traditional Chinese

// Japanese (see http://zsigri.tripod.com/fontboard/cjk/jis.html)
wxFONTENCODING_SHIFT_JIS // Shift JIS
%endenum

%enum wxLocaleCategory
wxLOCALE_CAT_NUMBER, // (any) numbers
wxLOCALE_CAT_DATE, // date/time
wxLOCALE_CAT_MONEY, // monetary value
wxLOCALE_CAT_MAX
%endenum

%enum wxLocaleInfo
wxLOCALE_THOUSANDS_SEP, // the thounsands separator
wxLOCALE_DECIMAL_POINT // the character used as decimal point
%endenum

%enum wxLocaleInitFlags
wxLOCALE_LOAD_DEFAULT // load wxwin.mo?
wxLOCALE_CONV_ENCODING // convert encoding on the fly?
%endenum

%if %wxchkver_2_8
%enum wxLayoutDirection
wxLayout_Default
wxLayout_LeftToRight
wxLayout_RightToLeft
%endenum
%endif %wxchkver_2_8

%struct %delete %encapsulate wxLanguageInfo
wxLanguageInfo() // you must set all the values by hand

%member int Language; // wxLanguage id
%member wxString CanonicalName; // Canonical name, e.g. fr_FR
%member wxString Description; // human-readable name of the language
%wxchkver_2_8 %member wxLayoutDirection LayoutDirection;
%endstruct


%class %delete %noclassinfo %encapsulate wxLocale

// call Init() if you use this ctor
wxLocale()

// the ctor has a side effect of changing current locale
// name (for messages), dir prefix (for msg files), locale (for setlocale), preload wxstd.mo?, convert Win<->Unix if necessary?
wxLocale(const wxString& szName, const wxString& szShort = "", const wxString& szLocale = "", bool bLoadDefault = true, bool bConvertEncoding = false)

// wxLanguage id or custom language
wxLocale(int language, int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING)

// the same as a function (returns true on success)
//bool Init(const wxChar *szName, const wxChar *szShort = (const wxChar *) NULL, const wxChar *szLocale = (const wxChar *) NULL, bool bLoadDefault = true, bool bConvertEncoding = false)
bool Init(const wxString &szName, const wxString &szShort = "", const wxString &szLocale = "", bool bLoadDefault = true, bool bConvertEncoding = false)

// same as second ctor (returns true on success)
bool Init(int language = wxLANGUAGE_DEFAULT, int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);

// Try to get user's (or OS's) preferred language setting.
// Return wxLANGUAGE_UNKNOWN if language-guessing algorithm failed
static int GetSystemLanguage()

// get the encoding used by default for text on this system, returns
// wxFONTENCODING_SYSTEM if it couldn't be determined
static wxFontEncoding GetSystemEncoding();

// get the string describing the system encoding, return empty string if
// couldn't be determined
static wxString GetSystemEncodingName();

// get the values of the given locale-dependent datum: the current locale
// is used, the US default value is returned if everything else fails
static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat);

// return true if the locale was set successfully
bool IsOk() const

// returns locale name
wxString GetLocale() const

// return current locale wxLanguage value
int GetLanguage() const

// return locale name to be passed to setlocale()
wxString GetSysName() const;

// return 'canonical' name, i.e. in the form of xx[_YY], where xx is
// language code according to ISO 639 and YY is country name
// as specified by ISO 3166.
wxString GetCanonicalName() const

// add a prefix to the catalog lookup path: the message catalog files will be
// looked up under prefix/<lang>/LC_MESSAGES, prefix/LC_MESSAGES and prefix
// (in this order).
//
// This only applies to subsequent invocations of AddCatalog()!
static void AddCatalogLookupPathPrefix(const wxString& prefix);

// add a catalog: it's searched for in standard places (current directory
// first, system one after), but the you may prepend additional directories to
// the search path with AddCatalogLookupPathPrefix().
//
// The loaded catalog will be used for message lookup by GetString().
//
// Returns 'true' if it was successfully loaded
bool AddCatalog(const wxString& szDomain);
bool AddCatalog(const wxString& szDomain, wxLanguage msgIdLanguage, const wxString& msgIdCharset);

// check if the given locale is provided by OS and C run time
%wxchkver_2_8 static bool IsAvailable(int lang);

// check if the given catalog is loaded
bool IsLoaded(const wxString& szDomain) const;

// Retrieve the language info struct for the given language
//
// Returns NULL if no info found, pointer must *not* be deleted by caller
static const wxLanguageInfo *GetLanguageInfo(int lang);

// Returns language name in English or empty string if the language
// is not in database
static wxString GetLanguageName(int lang);

// Find the language for the given locale string which may be either a
// canonical ISO 2 letter language code ("xx"), a language code followed by
// the country code ("xx_XX") or a Windows full language name ("Xxxxx...")
//
// Returns NULL if no info found, pointer must *not* be deleted by caller
static const wxLanguageInfo *FindLanguageInfo(const wxString& locale);

// Add custom language to the list of known languages.
// Notes: 1) wxLanguageInfo contains platform-specific data
// 2) must be called before Init to have effect
static void AddLanguage(const wxLanguageInfo& info);

// retrieve the translation for a string in all loaded domains unless
// the szDomain parameter is specified (and then only this domain is
// searched)
// n - additional parameter for PluralFormsParser
//
// return original string if translation is not available
// (in this case an error message is generated the first time
// a string is not found; use wxLogNull to suppress it)
//
// domains are searched in the last to first order, i.e. catalogs
// added later override those added before.
virtual wxString GetString(const wxString& szOrigString, const wxChar* szDomain = NULL) const;
// plural form version of the same:
virtual wxString GetString(const wxString& szOrigString, const wxString& szOrigString2, size_t n, const wxChar* szDomain = NULL) const;

// Returns the current short name for the locale
const wxString& GetName() const

// return the contents of .po file header
wxString GetHeaderValue( const wxString& szHeader, const wxString& szDomain = "" ) const;
%endclass

%function wxLocale* wxGetLocale()

%wxchkver_2_8 %function wxString wxGetTranslation(const wxString& sz, const wxChar* domain=NULL)
!%wxchkver_2_8 %function wxString wxGetTranslation(const wxString& sz)

%wxchkver_2_8 %rename wxGetTranslationPlural %function wxString wxGetTranslation(const wxString& sz1, const wxString& sz2, size_t n, const wxChar* domain=NULL)
!%wxchkver_2_8 %rename wxGetTranslationPlural %function wxString wxGetTranslation(const wxString& sz1, const wxString& sz2, size_t n)

%endif //wxUSE_INTL


wxwidgets/wxbase_file.i - Lua table = 'wx'


// ===========================================================================
// Purpose: wxFile, wxDir, wxFileName and file functions
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

%include "wx/filefn.h"
%include "sys/stat.h"

// global functions from the wxWindow's functions docs

%function bool wxDirExists(const wxString& dirname)
%function bool wxFileExists(const wxString& filename)

// %override [new Lua string] wxDos2UnixFilename(Lua string)
// C++ Func: void wxDos2UnixFilename(wxChar *s)
%function wxString wxDos2UnixFilename(const wxString& s)
// %override wxDateTime wxFileModificationTime(const wxString& filename) (not overridden, just return wxDateTime)
// C++ Func: time_t wxFileModificationTime(const wxString& filename)
%function wxDateTime wxFileModificationTime(const wxString& filename)
//%function wxString wxFileNameFromPath(const wxString& path) // obsolete use wxFileName::SplitPath
%function wxString wxFindFirstFile(const wxString& spec, int flags = 0)
%function wxString wxFindNextFile()
// bool wxGetDiskSpace(const wxString& path, wxLongLong *total = NULL, wxLongLong *free = NULL)
//wxFileKind wxGetFileKind(FILE* fd)
%function wxString wxGetOSDirectory()
%function bool wxIsAbsolutePath(const wxString& filename)
%function wxString wxPathOnly(const wxString& path)
// %override [new Lua string] wxUnix2DosFilename(Lua string)
// C++ Func: void wxUnix2DosFilename(wxChar *s)
%function wxString wxUnix2DosFilename(const wxString& s)
%function bool wxConcatFiles(const wxString& file1, const wxString& file2,const wxString& file3)
%function bool wxCopyFile(const wxString& file1, const wxString& file2, bool overwrite = true)
%function wxString wxGetCwd()
//%function char* wxGetTempFileName(const wxString& prefix) // obsolete use wxFileName::CreateTempFileName
%function bool wxIsWild(const wxString& pattern)
%function bool wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special)
%function bool wxMkdir(const wxString& dir, int perm = 0777)
//int wxParseCommonDialogsFilter(const wxString& wildCard, wxArrayString& descriptions, wxArrayString& filters)
%wxchkver_2_8 %function wxString wxRealPath(const wxString& path)
%function bool wxRemoveFile(const wxString& file)
!%wxchkver_2_8 %function bool wxRenameFile(const wxString& file1, const wxString& file2)
%wxchkver_2_8 %function bool wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite = true)
%function bool wxRmdir(const wxString& dir, int flags=0)
%function bool wxSetWorkingDirectory(const wxString& dir)

%wxchkver_2_8 %function bool wxIsWritable(const wxString &path)
%wxchkver_2_8 %function bool wxIsReadable(const wxString &path)
%wxchkver_2_8 %function bool wxIsExecutable(const wxString &path)

// These two methods are for wxLua
// %override long wxFileSize(const wxString& fileName) - gets the filesize
%function long wxFileSize(const wxString& fileName)

// wxLua only has storage for wxChar* in bindings, wxFILE_SEP_XXX are #defined
// as wxChar wxT('.'), so we just redefine them to be wxT(".") or wxChar*
%define_string wxFILE_SEP_EXT wxT(".")
%define_string wxFILE_SEP_DSK wxT(":")
%define_string wxFILE_SEP_PATH_DOS wxT("\\")
%define_string wxFILE_SEP_PATH_UNIX wxT("/")
%define_string wxFILE_SEP_PATH_MAC wxT(":")
%define_string wxFILE_SEP_PATH_VMS wxT(".") // VMS also uses '[' and ']'

%define_string wxFILE_SEP_PATH wxLua_FILE_SEP_PATH // hack to convert from wxChar wxT('') to wxChar* wxT("")

%define_string wxPATH_SEP_DOS // wxT(";")
%define_string wxPATH_SEP_UNIX // wxT(":")
%define_string wxPATH_SEP_MAC // wxT(";")
%define_string wxPATH_SEP // wxPATH_SEP_XXX

%define wxARE_FILENAMES_CASE_SENSITIVE // bool 1/0

//%function bool wxIsPathSeparator(wxChar c) FIXME
%function bool wxEndsWithPathSeparator(const wxString& pszFileName)


// ---------------------------------------------------------------------------
// wxStandardPaths

%if %wxchkver_2_8 && wxLUA_USE_wxStandardPaths

%include "wx/stdpaths.h"

%enum wxStandardPaths::ResourceCat
ResourceCat_None // no special category
ResourceCat_Messages // message catalog resources
ResourceCat_Max // end of enum marker
%endenum


%class %noclassinfo wxStandardPaths // we ignore wxStandardPathsBase
// No constructor - use static Get() function

// return the global standard paths object
// %override static wxStandardPaths& Get();
// C++ Func: static wxStandardPathsBase& Get();
// We pretend that there is no wxStandardPathsBase and just use the wxStandardPaths name
static wxStandardPaths& Get();

// These are only for the generic version, probably not ever needed
//void SetInstallPrefix(const wxString& prefix)
//wxString GetInstallPrefix() const

virtual wxString GetExecutablePath() const
virtual wxString GetConfigDir() const
virtual wxString GetUserConfigDir() const
virtual wxString GetDataDir() const
virtual wxString GetLocalDataDir() const
virtual wxString GetUserDataDir() const
virtual wxString GetUserLocalDataDir() const
virtual wxString GetPluginsDir() const
virtual wxString GetResourcesDir() const
virtual wxString GetLocalizedResourcesDir(const wxString& lang, wxStandardPaths::ResourceCat category = wxStandardPaths::ResourceCat_None) const
virtual wxString GetDocumentsDir() const
virtual wxString GetTempDir() const;
%endclass

%endif // %wxchkver_2_8 && wxLUA_USE_wxStandardPaths


// ---------------------------------------------------------------------------
// wxPathList

%include "wx/filefn.h"

%class %delete %encapsulate %noclassinfo wxPathList, wxArrayString
wxPathList()
//wxPathList(const wxArrayString &arr)

// Adds all paths in environment variable
void AddEnvList(const wxString& envVariable)
// Adds given path to this list
!%wxchkver_2_8 void Add(const wxString& path)
%wxchkver_2_8 bool Add(const wxString& path)
%wxchkver_2_8 void Add(const wxArrayString& paths)
// Find the first full path for which the file exists
wxString FindValidPath(const wxString& filename) const
// Find the first full path for which the file exists; ensure it's an
// absolute path that gets returned.
wxString FindAbsoluteValidPath(const wxString& filename) const
// Given full path and filename, add path to list
%not_overload !%wxchkver_2_8 void EnsureFileAccessible(const wxString& path)
%not_overload %wxchkver_2_8 bool EnsureFileAccessible(const wxString& path)
%endclass

// ---------------------------------------------------------------------------
// wxFileName

%if wxLUA_USE_wxFileName

%include "wx/filename.h"

%define wxPATH_GET_VOLUME
%define wxPATH_GET_SEPARATOR
%define wxPATH_MKDIR_FULL

%define wxFILE
%define wxDIR

%enum wxPathFormat
wxPATH_NATIVE
wxPATH_UNIX
wxPATH_MAC
wxPATH_DOS
wxPATH_VMS
wxPATH_BEOS
wxPATH_WIN
wxPATH_OS2
wxPATH_MAX
%endenum

%enum wxPathNormalize
wxPATH_NORM_ENV_VARS
wxPATH_NORM_DOTS
wxPATH_NORM_TILDE
wxPATH_NORM_CASE
wxPATH_NORM_ABSOLUTE
wxPATH_NORM_LONG
wxPATH_NORM_SHORTCUT
wxPATH_NORM_ALL
%endenum

%class %delete %noclassinfo %encapsulate wxFileName
wxFileName()
wxFileName(const wxFileName& filename)
wxFileName(const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE)
wxFileName(const wxString& path, const wxString& name, wxPathFormat format = wxPATH_NATIVE)
wxFileName(const wxString& volume, const wxString& path, const wxString& name, const wxString& ext, wxPathFormat format = wxPATH_NATIVE)

void AppendDir(const wxString& dir)
void Assign(const wxFileName& filepath)
void Assign(const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE)
void Assign(const wxString& volume, const wxString& path, const wxString& name, const wxString& ext, wxPathFormat format = wxPATH_NATIVE)
void Assign(const wxString& path, const wxString& name, wxPathFormat format = wxPATH_NATIVE)
void Assign(const wxString& path, const wxString& name, const wxString& ext, wxPathFormat format = wxPATH_NATIVE)
void AssignCwd(const wxString& volume = "")
void AssignDir(const wxString& dir, wxPathFormat format = wxPATH_NATIVE)
void AssignHomeDir()
!%wxchkver_2_8 void AssignTempFileName(const wxString& prefix, wxFile *fileTemp = NULL)
%wxchkver_2_8&&(wxUSE_FILE||wxUSE_FFILE) void AssignTempFileName(const wxString& prefix)
%wxchkver_2_8&&wxUSE_FILE void AssignTempFileName(const wxString& prefix, wxFile *fileTemp)
//%wxchkver_2_8&&wxUSE_FFILE void AssignTempFileName(const wxString& prefix, wxFFile *fileTemp)
void Clear()
void ClearExt()

// Use AssignTempFileName(...) equivalents
//!%wxchkver_2_8 static wxString CreateTempFileName(const wxString& prefix, wxFile *fileTemp = NULL)
//%wxchkver_2_8&&(wxUSE_FILE||wxUSE_FFILE) static wxString CreateTempFileName(const wxString& prefix)
//%wxchkver_2_8&&wxUSE_FILE static wxString CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
//%wxchkver_2_8&&wxUSE_FFILE static wxString CreateTempFileName(const wxString& prefix, wxFFile *fileTemp);

bool DirExists()
static bool DirExists(const wxString& dir)
static wxFileName DirName(const wxString& dir)
bool FileExists()
static bool FileExists(const wxString& file)
static wxFileName FileName(const wxString& file)
static wxString GetCwd(const wxString& volume = "")
int GetDirCount() const

// %override [Lua string table] wxFileName::GetDirs()
// C++ Func: const wxArrayString& GetDirs() const
const wxArrayString& GetDirs() const

wxString GetExt() const
static wxString GetForbiddenChars(wxPathFormat format = wxPATH_NATIVE)
static wxPathFormat GetFormat(wxPathFormat format = wxPATH_NATIVE)
wxString GetFullName() const
wxString GetFullPath(wxPathFormat format = wxPATH_NATIVE) const
static wxString GetHomeDir()
%wxchkver_2_8 wxString GetHumanReadableSize(const wxString &nullsize = "Not available", int precision = 1) const
//%wxchkver_2_8 wxString GetHumanReadableSize(const wxString &nullsize = wxGetTranslation(_T("Not available")), int precision = 1) const
//%wxchkver_2_8 static wxString GetHumanReadableSize(const wxULongLong &sz, const wxString &nullsize = wxGetTranslation(_T("Not available")), int precision = 1)
wxString GetLongPath() const
wxDateTime GetModificationTime() const
wxString GetName() const
wxString GetPath(int flags = 0, wxPathFormat format = wxPATH_NATIVE) const
static int GetPathSeparator(wxPathFormat format = wxPATH_NATIVE)
static wxString GetPathSeparators(wxPathFormat format = wxPATH_NATIVE)
static wxString GetPathTerminators(wxPathFormat format = wxPATH_NATIVE)
wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const
wxString GetShortPath() const

%if %wxchkver_2_8
wxULongLong GetSize() const
static wxULongLong GetSize(const wxString &file)
%endif // %wxchkver_2_8

// %override [bool, wxDateTime dtAccess, wxDateTime dtMod, wxDateTime dtCreate] wxFileName::GetTimes()
// C++ Func: bool GetTimes(wxDateTime* dtAccess, wxDateTime* dtMod, wxDateTime* dtCreate) const
bool GetTimes() const

wxString GetVolume() const
static wxString GetVolumeSeparator(wxPathFormat format = wxPATH_NATIVE)
bool HasExt() const
bool HasName() const
bool HasVolume() const
void InsertDir(int before, const wxString& dir)
bool IsAbsolute(wxPathFormat format = wxPATH_NATIVE)
static bool IsCaseSensitive(wxPathFormat format = wxPATH_NATIVE)
bool IsOk() const
static bool IsPathSeparator(int ch, wxPathFormat format = wxPATH_NATIVE)
bool IsRelative(wxPathFormat format = wxPATH_NATIVE)
bool IsDir() const

%if %wxchkver_2_8
bool IsDirWritable() const
static bool IsDirWritable(const wxString &path)
bool IsDirReadable() const
static bool IsDirReadable(const wxString &path)
bool IsFileWritable() const
static bool IsFileWritable(const wxString &path)
bool IsFileReadable() const
static bool IsFileReadable(const wxString &path)
bool IsFileExecutable() const
static bool IsFileExecutable(const wxString &path)
%endif // %wxchkver_2_8

//static bool MacFindDefaultTypeAndCreator(const wxString& ext, wxUint32* type, wxUint32* creator)
//bool MacSetDefaultTypeAndCreator()
bool MakeAbsolute(const wxString& cwd = "", wxPathFormat format = wxPATH_NATIVE)
bool MakeRelativeTo(const wxString& pathBase = "", wxPathFormat format = wxPATH_NATIVE)
bool Mkdir(int perm = 4095, int flags = 0)
static bool Mkdir(const wxString& dir, int perm = 4095, int flags = 0)
bool Normalize(int flags = wxPATH_NORM_ALL, const wxString& cwd = wxEmptyString, wxPathFormat format = wxPATH_NATIVE)
void PrependDir(const wxString& dir)
void RemoveDir(int pos)
void RemoveLastDir()
bool Rmdir()
static bool Rmdir(const wxString& dir)
bool SameAs(const wxFileName& filepath, wxPathFormat format = wxPATH_NATIVE) const
bool SetCwd()
static bool SetCwd(const wxString& cwd)
void SetExt(const wxString& ext)
void SetEmptyExt()
void SetFullName(const wxString& fullname)
void SetName(const wxString& name)
bool SetTimes(const wxDateTime* dtAccess, const wxDateTime* dtMod, const wxDateTime* dtCreate)
void SetVolume(const wxString& volume)

// %override [wxString path, wxString name, wxString ext] wxFileName::SplitPath(const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE)
// C++ Func: static void SplitPath(const wxString& fullpath, wxString* path, wxString* name, wxString* ext, wxPathFormat format = wxPATH_NATIVE)
static void SplitPath(const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE)

// %override [wxString volume, wxString path, wxString name, wxString ext] wxFileName::SplitPathVolume(const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE)
// C++ Func: static void SplitPath(const wxString& fullpath, wxString* volume, wxString* path, wxString* name, wxString* ext, wxPathFormat format = wxPATH_NATIVE)
%rename SplitPathVolume static void SplitPath(const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE)

// %override [wxString volume, wxString path] wxFileName::SplitVolume(const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE)
// C++ Func: static void SplitVolume(const wxString& fullpath, wxString* volume, wxString* path, wxPathFormat format = wxPATH_NATIVE)
static void SplitVolume(const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE)

bool Touch()

%operator wxFileName& operator=(const wxFileName& filename)
%operator bool operator==(const wxFileName& filename) const
%endclass

%endif //wxLUA_USE_wxFileName

// ---------------------------------------------------------------------------
// wxFile

%if wxLUA_USE_wxFile && wxUSE_FILE

%include "wx/file.h"

%enum wxFile::OpenMode
read
write
read_write
write_append
write_excl
%endenum

%enum wxFile::dummy
fd_invalid // = -1
fd_stdin
fd_stdout
fd_stderr
%endenum

%enum wxSeekMode
wxFromStart
wxFromCurrent
wxFromEnd
wxInvalidOffset
%endenum

%enum wxFileKind
wxFILE_KIND_UNKNOWN
wxFILE_KIND_DISK
wxFILE_KIND_TERMINAL
wxFILE_KIND_PIPE
%endenum

%define wxS_IRUSR
%define wxS_IWUSR
%define wxS_IXUSR
%define wxS_IRGRP
%define wxS_IWGRP
%define wxS_IXGRP
%define wxS_IROTH
%define wxS_IWOTH
%define wxS_IXOTH
%define wxS_DEFAULT

%class %delete %noclassinfo %encapsulate wxFile
wxFile()
wxFile(const wxString& filename, wxFile::OpenMode mode = wxFile::read)

static bool Access(const wxString& name, wxFile::OpenMode mode)
void Attach(int fd)
void Close()
bool Create(const wxString& filename, bool overwrite = false, int access = wxS_DEFAULT)
void Detach()
int fd() const
bool Eof() const
static bool Exists(const wxString& name)
bool Flush()
wxFileKind GetKind() const
bool IsOpened() const
wxFileOffset Length() const
bool Open(const wxString& filename, wxFile::OpenMode mode = wxFile::read)

// %override [size_t count, Lua string] wxFile::Read(unsigned int count)
// C++ Func: size_t Read(void* buffer, unsigned int count)
size_t Read(unsigned int count)

wxFileOffset Seek(wxFileOffset offset, wxSeekMode mode = wxFromStart)
wxFileOffset SeekEnd(wxFileOffset offset = 0)
wxFileOffset Tell() const

// %override size_t wxFile::Write(Lua string, unsigned int count)
// C++ Func: size_t Write(const void* buffer, unsigned int count)
size_t Write(const wxString& buffer, unsigned int count)

size_t Write(const wxString &str) //, const wxMBConv& conv = wxConvUTF8)
%endclass

// ---------------------------------------------------------------------------
// wxTempFile

%include "wx/file.h"

%class %delete %noclassinfo %encapsulate wxTempFile
wxTempFile()
// associates the temp file with the file to be replaced and opens it
wxTempFile(const wxString& strName)

// open the temp file (strName is the name of file to be replaced)
bool Open(const wxString& strName)

// is the file opened?
bool IsOpened() const
// get current file length
wxFileOffset Length() const
// move ptr ofs bytes related to start/current offset/end of file
wxFileOffset Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart)
// get current offset
wxFileOffset Tell() const

// I/O (both functions return true on success, false on failure)
//bool Write(const void *p, size_t n)
bool Write(const wxString& str) //, const wxMBConv& conv = wxConvUTF8)

// validate changes and delete the old file of name m_strName
bool Commit()
// discard changes
void Discard();

%endclass

%endif //wxLUA_USE_wxFile && wxUSE_FILE

// ---------------------------------------------------------------------------
// wxDir

%if wxLUA_USE_wxDir

%include "wx/dir.h"

%define wxDIR_FILES
%define wxDIR_DIRS
%define wxDIR_HIDDEN
%define wxDIR_DOTDOT
%define wxDIR_DEFAULT

%class %delete %noclassinfo %encapsulate wxDir
wxDir()
wxDir(const wxString& dir)

static bool Exists(const wxString& dir)

// %override [unsigned int, Lua string table] wxDir::GetAllFiles(const wxString& dirname, const wxString& filespec = "", int flags = wxDIR_DEFAULT)
// C++ Func: static unsigned int GetAllFiles(const wxString& dirname, wxArrayString *files, const wxString& filespec = "", int flags = wxDIR_DEFAULT)
static unsigned int GetAllFiles(const wxString& dirname, const wxString& filespec = "", int flags = wxDIR_DEFAULT)

// %override [bool, string filename] wxDir::GetFirst(const wxString& filespec = "", int flags = wxDIR_DEFAULT)
// C++ Func: bool GetFirst(wxString * filename, const wxString& filespec = "", int flags = wxDIR_DEFAULT) const
bool GetFirst(const wxString& filespec = "", int flags = wxDIR_DEFAULT) const

wxString GetName() const

// %override [bool, string filename] wxDir::GetNext()
// C++ Func: bool GetNext(wxString * filename) const
bool GetNext() const

bool HasFiles(const wxString& filespec = "")
bool HasSubDirs(const wxString& dirspec = "")
bool IsOpened() const
bool Open(const wxString& dir)

%if %wxchkver_2_8
static wxString FindFirst(const wxString& dirname, const wxString& filespec, int flags = wxDIR_DEFAULT)
static wxULongLong GetTotalSize(const wxString &dir) //, wxArrayString *filesSkipped = NULL) FIXME override
%endif // %wxchkver_2_8

// We don't need wxDirTraverser, just use wxDir methods GetFirst, GetNext.
//size_t Traverse(wxDirTraverser& sink, const wxString& filespec = wxEmptyString, int flags = wxDIR_DEFAULT)
%endclass

%endif //wxLUA_USE_wxDir

// ---------------------------------------------------------------------------
// wxFileTypeInfo

%include "wx/mimetype.h"

%class %delete %noclassinfo %encapsulate wxFileTypeInfo
// the ... parameters form a NULL terminated list of extensions
//wxFileTypeInfo(const wxChar *mimeType, const wxChar *openCmd, const wxChar *printCmd, const wxChar *desc, ...)
// the array elements correspond to the parameters of the ctor above in the same order
wxFileTypeInfo(const wxArrayString& sArray)

// invalid item - use this to terminate the array passed to wxMimeTypesManager::AddFallbacks
wxFileTypeInfo()

bool IsValid() const

void SetIcon(const wxString& iconFile, int iconIndex = 0)
void SetShortDesc(const wxString& shortDesc)

wxString GetMimeType() const
wxString GetOpenCommand() const
wxString GetPrintCommand() const
wxString GetShortDesc() const
wxString GetDescription() const
wxArrayString GetExtensions() const
size_t GetExtensionsCount() const
wxString GetIconFile() const
int GetIconIndex() const
%endclass

// ---------------------------------------------------------------------------
// wxIconLocation

%include "wx/iconloc.h"

%class %delete %noclassinfo %encapsulate wxIconLocation
// ctor takes the name of the file where the icon is
!%msw wxIconLocation(const wxString& filename = "")
%msw wxIconLocation(const wxString& file = "", int num = 0)

// returns true if this object is valid/initialized
bool IsOk() const

// set/get the icon file name
void SetFileName(const wxString& filename)
const wxString& GetFileName() const

// set/get the icon index
%msw void SetIndex(int num)
%msw int GetIndex() const
%endclass

// ---------------------------------------------------------------------------
// wxFileType::MessageParameters

%class %delete %noclassinfo %encapsulate wxFileType::MessageParameters
//wxFileType::MessageParameters()
wxFileType::MessageParameters(const wxString& filename, const wxString& mimetype = "")

// accessors (called by GetOpenCommand)
wxString GetFileName() const
wxString GetMimeType() const

// override this function in derived class
virtual wxString GetParamValue(const wxString& name) const
%endclass

// ---------------------------------------------------------------------------
// wxFileType

%class %delete %noclassinfo %encapsulate wxFileType
wxFileType(const wxFileTypeInfo& ftInfo)

// accessors: all of them return true if the corresponding information
// could be retrieved/found, false otherwise (and in this case all [out] parameters are unchanged)

// return the MIME type for this file type
//bool GetMimeType(wxString *mimeType) const;
bool GetMimeTypes(wxArrayString& mimeTypes) const;

bool GetExtensions(wxArrayString& extensions);

// get the icon corresponding to this file type and of the given size
bool GetIcon(wxIconLocation *iconloc) const;
//bool GetIcon(wxIconLocation *iconloc, const wxFileType::MessageParameters& params) const;

// get a brief file type description ("*.txt" => "text document")
// %override [bool Lua string] wxFileType::GetDescription() const;
// C++ Func: bool GetDescription(wxString *desc) const
bool GetDescription() const

// get the command to be used to open/print the given file.
//bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const;
// a simpler to use version of GetOpenCommand() -- it only takes the
// filename and returns an empty string on failure
wxString GetOpenCommand(const wxString& filename) const;

// get the command to print the file of given type
// %override [bool Lua string] wxFileType::GetPrintCommand(const wxFileType::MessageParameters& params) const;
// C++ Func: bool GetPrintCommand(wxString *printCmd, const wxFileType::MessageParameters& params) const;
bool GetPrintCommand(const wxFileType::MessageParameters& params) const;

// return the number of commands defined for this file type, 0 if none
size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands, const wxFileType::MessageParameters& params) const;

// set an arbitrary command, ask confirmation if it already exists and overwriteprompt is true
bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = true)

bool SetDefaultIcon(const wxString& cmd = "", int index = 0)

// remove the association for this filetype from the system MIME database:
// notice that it will only work if the association is defined in the user
// file/registry part, we will never modify the system-wide settings
bool Unassociate();

// expand a string in the format of GetOpenCommand (which may contain
// '%s' and '%t' format specificators for the file name and mime type
// and %{param} constructions).
static wxString ExpandCommand(const wxString& command, const wxFileType::MessageParameters& params);
%endclass

// ---------------------------------------------------------------------------
// wxMimeTypesManager

%class %noclassinfo %encapsulate wxMimeTypesManager
%define_pointer wxTheMimeTypesManager

// wxMimeTypesManager(); - Use pointer wxTheMimeTypesManager

// check if the given MIME type is the same as the other one: the
// second argument may contain wildcards ('*'), but not the first. If
// the types are equal or if the mimeType matches wildcard the function
// returns true, otherwise it returns false
static bool IsOfType(const wxString& mimeType, const wxString& wildcard);

// NB: the following 2 functions are for Unix only and don't do anything elsewhere

// loads data from standard files according to the mailcap styles
// specified: this is a bitwise OR of wxMailcapStyle values
//
// use the extraDir parameter if you want to look for files in another
// directory
void Initialize(int mailcapStyle = wxMAILCAP_ALL, const wxString& extraDir = "");
// and this function clears all the data from the manager
void ClearData();

// Database lookup: all functions return a pointer to wxFileType object
// whose methods may be used to query it for the information you're
// interested in. If the return value is !NULL, caller is responsible for
// deleting it.
// get file type from file extension
wxFileType *GetFileTypeFromExtension(const wxString& ext);
// get file type from MIME type (in format <category>/<format>)
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);

bool ReadMailcap(const wxString& filename, bool fallback = false);
// read in additional file in mime.types format
bool ReadMimeTypes(const wxString& filename);

// enumerate all known MIME types returns the number of retrieved file types
size_t EnumAllFileTypes(wxArrayString& mimetypes);

// The filetypes array should be terminated by either NULL entry or an
// invalid wxFileTypeInfo (i.e. the one created with default ctor)
//void AddFallbacks(const wxFileTypeInfo *filetypes);
void AddFallback(const wxFileTypeInfo& ft)

// create a new association using the fields of wxFileTypeInfo (at least
// the MIME type and the extension should be set)
// if the other fields are empty, the existing values should be left alone
wxFileType *Associate(const wxFileTypeInfo& ftInfo)

// undo Associate()
bool Unassociate(wxFileType *ft)
%endclass

// ---------------------------------------------------------------------------
// wxStreamBase

%if wxUSE_STREAMS

%include "wx/stream.h"
%include "wx/txtstrm.h"

%enum wxEOL
wxEOL_NATIVE
wxEOL_UNIX
wxEOL_MAC
wxEOL_DOS
%endenum

%enum wxStreamError
wxSTREAM_NO_ERROR
wxSTREAM_EOF
wxSTREAM_WRITE_ERROR
wxSTREAM_READ_ERROR
%endenum

// ---------------------------------------------------------------------------
// wxStreamBase

%class %noclassinfo wxStreamBase
// wxStreamBase() this is only a base class

%wxchkver_2_6 wxFileOffset GetLength() const
wxStreamError GetLastError() const
size_t GetSize() const
bool IsOk() const
bool IsSeekable() const
void Reset()
%endclass

// ---------------------------------------------------------------------------
// wxInputStream

%class %noclassinfo %encapsulate wxInputStream, wxStreamBase
// wxInputStream() this is only a base class

bool CanRead() const
char GetC()
bool Eof()
size_t LastRead() const
char Peek()

// %override [Lua string] wxInputStream::Read(size_t size)
// C++ Func: wxInputStream& Read(void *buffer, size_t size)
wxString Read(size_t size)

wxInputStream& Read(wxOutputStream& stream_in)
wxFileOffset SeekI(wxFileOffset pos, wxSeekMode mode = wxFromStart)
wxFileOffset TellI() const

// %override size_t wxInputStream::Ungetch(Lua string, size_t size)
// C++ Func: size_t Ungetch(const char* buffer, size_t size)
%override_name wxLua_wxInputStream_UngetchString size_t Ungetch(const wxString& str, size_t size)

bool Ungetch(char c)
%endclass

// ---------------------------------------------------------------------------
// wxOutputStream

%class %noclassinfo %encapsulate wxOutputStream, wxStreamBase
// wxOutputStream() this is only a base class

bool Close()
size_t LastWrite() const
void PutC(char c)
wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart)
wxFileOffset TellO() const

// %override wxOutputStream& wxOutputStream::Write(Lua string, size_t size)
// C++ Func: wxOutputStream& Write(const void *buffer, size_t size)
wxOutputStream& Write(const wxString& buffer, size_t size)

wxOutputStream& Write(wxInputStream& stream_in)
%endclass

// ---------------------------------------------------------------------------
// wxFileInputStream

%include "wx/wfstream.h"

%class %delete %noclassinfo %encapsulate wxFileInputStream, wxInputStream
wxFileInputStream(const wxString& fileName)
wxFileInputStream(wxFile& file)
//wxFileInputStream(int fd)

bool Ok() const
%endclass

// ---------------------------------------------------------------------------
// wxFileOutputStream

%class %delete %noclassinfo %encapsulate wxFileOutputStream, wxOutputStream
wxFileOutputStream(const wxString& fileName)
wxFileOutputStream(wxFile& file)
//wxFileOutputStream(int fd)

bool Ok() const
%endclass

// ---------------------------------------------------------------------------
// wxMemoryInputStream

%include "wx/mstream.h"

%class %delete %noclassinfo %encapsulate wxMemoryInputStream, wxInputStream
wxMemoryInputStream(const char *data, size_t length)
//wxMemoryInputStream(const wxMemoryOutputStream& stream)

%endclass

// ---------------------------------------------------------------------------
// wxMemoryOutputStream

//%include "wx/mstream.h"

//%class %delete %noclassinfo %encapsulate wxMemoryInputStream, wxInputStream
// wxMemoryOutputStream(void *data, size_t length)
// wxMemoryInputStream(const wxMemoryOutputStream& stream)
//%endclass

// ---------------------------------------------------------------------------
// wxDataInputStream

%include "wx/datstrm.h"

%class %delete %noclassinfo %encapsulate wxDataInputStream
// wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto());
wxDataInputStream(wxInputStream& s)

bool IsOk()

//#if wxHAS_INT64
// wxUint64 Read64()
//#endif
//#if wxUSE_LONGLONG
// wxLongLong ReadLL()
//#endif
wxUint32 Read32()
wxUint16 Read16()
wxUint8 Read8()
double ReadDouble()
wxString ReadString()

//#if wxHAS_INT64
// void Read64(wxUint64 *buffer, size_t size)
// void Read64(wxInt64 *buffer, size_t size)
//#endif
//#if defined(wxLongLong_t) && wxUSE_LONGLONG
// void Read64(wxULongLong *buffer, size_t size)
// void Read64(wxLongLong *buffer, size_t size)
//#endif
//#if wxUSE_LONGLONG
// void ReadLL(wxULongLong *buffer, size_t size)
// void ReadLL(wxLongLong *buffer, size_t size)
//#endif
//void Read32(wxUint32 *buffer, size_t size)
//void Read16(wxUint16 *buffer, size_t size)
//void Read8(wxUint8 *buffer, size_t size)
//void ReadDouble(double *buffer, size_t size)

void BigEndianOrdered(bool be_order)
%endclass

// ---------------------------------------------------------------------------
// wxDataOutputStream

%include "wx/datstrm.h"

%class %delete %noclassinfo %encapsulate wxDataOutputStream
// wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto());
wxDataOutputStream(wxOutputStream& s);

bool IsOk()

//#if wxHAS_INT64
// void Write64(wxUint64 i);
// void Write64(wxInt64 i);
//#endif
//#if wxUSE_LONGLONG
// void WriteLL(const wxLongLong &ll);
// void WriteLL(const wxULongLong &ll);
//#endif
void Write32(wxUint32 i)
void Write16(wxUint16 i)
void Write8(wxUint8 i)
void WriteDouble(double d)
void WriteString(const wxString& string)

//#if wxHAS_INT64
// void Write64(const wxUint64 *buffer, size_t size);
// void Write64(const wxInt64 *buffer, size_t size);
//#endif
//#if defined(wxLongLong_t) && wxUSE_LONGLONG
// void Write64(const wxULongLong *buffer, size_t size);
// void Write64(const wxLongLong *buffer, size_t size);
//#endif
//#if wxUSE_LONGLONG
// void WriteLL(const wxULongLong *buffer, size_t size);
// void WriteLL(const wxLongLong *buffer, size_t size);
//#endif
//void Write32(const wxUint32 *buffer, size_t size);
//void Write16(const wxUint16 *buffer, size_t size);
//void Write8(const wxUint8 *buffer, size_t size);
//void WriteDouble(const double *buffer, size_t size);

void BigEndianOrdered(bool be_order)
%endclass



// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// wxFSFile

%if wxUSE_FILESYSTEM // already has wxUSE_STREAMS

%include "wx/filesys.h"


%class %delete wxFSFile, wxObject
wxFSFile(%ungc wxInputStream *stream, const wxString& loc, const wxString& mimetype, const wxString& anchor, wxDateTime modif)

// returns stream. This doesn't give away ownership of the stream object.
wxInputStream *GetStream() const
// gives away the ownership of the current stream.
%gc wxInputStream *DetachStream()
// deletes the current stream and takes ownership of another.
void SetStream(%ungc wxInputStream *stream)

// returns file's mime type
wxString GetMimeType() const
// returns the original location (aka filename) of the file
wxString GetLocation() const
wxString GetAnchor() const
wxDateTime GetModificationTime() const

%endclass


// ---------------------------------------------------------------------------
// wxFileSystemHandler

%class %delete wxFileSystemHandler, wxObject
// wxFileSystemHandler() // no constructor since it has abstract functions

// returns true if this handler is able to open given location
virtual bool CanOpen(const wxString& location) //= 0;

// opens given file and returns pointer to input stream.
// Returns NULL if opening failed.
// The location is always absolute path.
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) //= 0;

// Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
// the query to directories or wxFILE for files only or 0 for either.
// Returns filename or empty string if no more matching file exists
virtual wxString FindFirst(const wxString& spec, int flags = 0);
virtual wxString FindNext();
%endclass


// ---------------------------------------------------------------------------
// wxLocalFSHandler


%class %delete wxLocalFSHandler, wxFileSystemHandler
wxLocalFSHandler()

// wxLocalFSHandler will prefix all filenames with 'root' before accessing
// files on disk. This effectively makes 'root' the top-level directory
// and prevents access to files outside this directory.
// (This is similar to Unix command 'chroot'.)
static void Chroot(const wxString& root)

%endclass


// ---------------------------------------------------------------------------
// wxFileSystem

%enum
wxFS_READ // Open for reading
wxFS_SEEKABLE // Returned stream will be seekable
%endenum

%class %delete wxFileSystem, wxObject
wxFileSystem()

// sets the current location. Every call to OpenFile is
// relative to this location.
// NOTE !!
// unless is_dir = true 'location' is *not* the directory but
// file contained in this directory
// (so ChangePathTo("dir/subdir/xh.htm") sets m_Path to "dir/subdir/")
void ChangePathTo(const wxString& location, bool is_dir = false);

wxString GetPath() const

// opens given file and returns pointer to input stream.
// Returns NULL if opening failed.
// It first tries to open the file in relative scope
// (based on ChangePathTo()'s value) and then as an absolute
// path.
wxFSFile* OpenFile(const wxString& location, int flags = wxFS_READ);

// Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
// the query to directories or wxFILE for files only or 0 for either.
// Returns filename or empty string if no more matching file exists
wxString FindFirst(const wxString& spec, int flags = 0);
wxString FindNext();

// find a file in a list of directories, returns false if not found
// %override [bool, Lua string full_path] bool FindFileInPath(const wxString& path, const wxString& file);
// C++ Func: bool FindFileInPath(wxString *pStr, const wxChar *path, const wxChar *file);
bool FindFileInPath(const wxString& path, const wxString& file);

// Adds FS handler.
// In fact, this class is only front-end to the FS handlers :-)
static void AddHandler(wxFileSystemHandler *handler);

// Removes FS handler
static wxFileSystemHandler* RemoveHandler(wxFileSystemHandler *handler);

// Returns true if there is a handler which can open the given location.
static bool HasHandlerForPath(const wxString& location);

// remove all items from the m_Handlers list
static void CleanUpHandlers();

// Returns the native path for a file URL
static wxFileName URLToFileName(const wxString& url);

// Returns the file URL for a native path
static wxString FileNameToURL(const wxFileName& filename);
%endclass


// ---------------------------------------------------------------------------
// wxArchiveFSHandler

%include "wx/fs_arc.h"

%class %delete wxArchiveFSHandler, wxFileSystemHandler
wxArchiveFSHandler()

%endclass

// ---------------------------------------------------------------------------
// wxZipFSHandler - is just a typedef to wxArchiveFSHandler

//%include "wx/fs_zip.h"

//%if wxUSE_FS_ZIP
// typedef wxArchiveFSHandler wxZipFSHandler;
//%endif

// ---------------------------------------------------------------------------
// wxFilterFSHandler

%include "wx/fs_filter.h"

%class %delete wxFilterFSHandler, wxFileSystemHandler
wxFilterFSHandler()

%endclass

// ---------------------------------------------------------------------------
// wxInternetFSHandler

%if wxUSE_FS_INET && wxUSE_SOCKETS // already has wxUSE_STREAMS && wxUSE_FILESYSTEM
%include "wx/fs_inet.h"

%class %delete wxInternetFSHandler, wxFileSystemHandler
wxInternetFSHandler()

%endclass
%endif //wxUSE_FS_INET && wxUSE_SOCKETS

// ---------------------------------------------------------------------------
// wxMemoryFSHandler - See wxcore_core.i for this since it requires wxImage & wxBitmap.


%endif // wxUSE_FILESYSTEM


%endif // wxUSE_STREAMS


wxwidgets/wxcore_appframe.i - Lua table = 'wx'


// ===========================================================================
// Purpose: wxApp and wxFrame
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================


// ---------------------------------------------------------------------------
// wxApp

%if wxLUA_USE_wxApp

%include "wx/app.h"

// %override wxApp* wxGetApp()
// C++ func: wxApp* wxGetApp() - use wxTheApp* since this requires IMPLEMENT_APP()
%function wxApp* wxGetApp()

%class wxApp, wxEvtHandler
// wxApp() NO CONSTRUCTOR! the wxApp is created in C++, use wxGetApp()

// These two are pushed into Lua by C++ at startup as table arg = { argv }
// int wxApp::argc
// wxChar** wxApp::argv

//!%wxchkver_2_6|%wxcompat_2_4 virtual wxLog* CreateLogTarget()
void Dispatch()
void ExitMainLoop()
// virtual int FilterEvent(wxEvent& event) too dangerous, use ConnectEvent
wxString GetAppName() const
//!%wxchkver_2_6&%win bool GetAuto3D() const
wxString GetClassName() const
bool GetExitOnFrameDelete() const
// static wxAppConsole *GetInstance() FIXME
wxWindow* GetTopWindow() const
bool GetUseBestVisual() const
wxString GetVendorName() const
bool IsActive() const
static bool IsMainLoopRunning()
// bool Initialized() obsolete in wxWidgets

// %override int wxApp::MainLoop()
// C++ Func: int MainLoop()
// Only calls it if (!IsMainLoopRuinning() && !wxLuaState::sm_wxAppMainLoop_will_run), returns 0 if not called.
int MainLoop()

// virtual int OnExit() nothing we can do here
// virtual bool OnInit() nothing we can do here
// virtual int OnRun() nothing we can do here
bool Pending()
// !%wxchkver_2_6 bool SendIdleEvents()
%wxchkver_2_6 bool SendIdleEvents(wxWindow* win, wxIdleEvent& event)
void SetAppName(const wxString& name)
//!%wxchkver_2_4&(%win|%mac) void SetAuto3D(const bool auto3D)
void SetClassName(const wxString& name)
void SetExitOnFrameDelete(bool flag)
// static void SetInstance(wxAppConsole* app) nothing we can do here
void SetTopWindow(wxWindow* window)
void SetVendorName(const wxString& name)
//virtual wxIcon GetStdIcon(int which) const
void SetUseBestVisual(bool flag)
%endclass

%endif //wxLUA_USE_wxApp

// ---------------------------------------------------------------------------
// wxTopLevelWindow

%if wxLUA_USE_wxFrame|wxLUA_USE_wxDialog

%include "wx/toplevel.h"

%enum
wxUSER_ATTENTION_INFO
wxUSER_ATTENTION_ERROR
%endenum

%enum
wxFULLSCREEN_NOMENUBAR
wxFULLSCREEN_NOTOOLBAR
wxFULLSCREEN_NOSTATUSBAR
wxFULLSCREEN_NOBORDER
wxFULLSCREEN_NOCAPTION
wxFULLSCREEN_ALL
%endenum

%class wxTopLevelWindow, wxWindow
// No constructors, virtual base class, use wxFrame or wxDialog

%wxchkver_2_8 wxWindow* GetDefaultItem() const
wxIcon GetIcon() const
//const wxIconBundle& GetIcons() const
wxString GetTitle() const
%wxchkver_2_8 wxWindow* GetTmpDefaultItem() const
void Iconize(bool iconize)
bool IsActive() const
bool IsFullScreen() const
bool IsIconized() const
bool IsMaximized() const
void Maximize(bool maximize)
void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO)
%wxchkver_2_8 wxWindow* SetDefaultItem(wxWindow *win)
void SetIcon(const wxIcon& icon)
void SetIcons(const wxIconBundle& icons)
//void SetLeftMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu * subMenu = NULL)
//void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu * subMenu = NULL)
bool SetShape(const wxRegion& region)
virtual void SetTitle(const wxString& title)
%wxchkver_2_8 wxWindow* SetTmpDefaultItem(wxWindow *win)
%win bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL)
%endclass

%endif //wxLUA_USE_wxFrame|wxLUA_USE_wxDialog

// ---------------------------------------------------------------------------
// wxFrame

%if wxLUA_USE_wxFrame

%include "wx/frame.h"

%define wxDEFAULT_FRAME_STYLE
%define wxICONIZE
%define wxCAPTION
%define wxMINIMIZE
%define wxMINIMIZE_BOX
%define wxMAXIMIZE
%define wxMAXIMIZE_BOX
%wxchkver_2_6 %define wxCLOSE_BOX
%define wxSTAY_ON_TOP
%define wxSYSTEM_MENU
//%define wxSIMPLE_BORDER see wxWindow defines
%define wxRESIZE_BORDER

%define wxFRAME_TOOL_WINDOW
%define wxFRAME_NO_TASKBAR
%define wxFRAME_FLOAT_ON_PARENT
%define wxFRAME_EX_CONTEXTHELP
%wxchkver_2_6 %define wxFRAME_SHAPED
%wxchkver_2_6 %define wxFRAME_EX_METAL
%define wxTHICK_FRAME

%class wxFrame, wxTopLevelWindow
wxFrame()
wxFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame")
bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame")

// void Centre(int direction = wxBOTH) - see wxWindow
virtual wxStatusBar* CreateStatusBar(int number = 1, long style = 0, wxWindowID id = wxID_ANY, const wxString& name = "wxStatusBar")
virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, wxWindowID id = wxID_ANY, const wxString& name = "wxToolBar")
wxPoint GetClientAreaOrigin() const
wxMenuBar* GetMenuBar() const
wxStatusBar* GetStatusBar() const
int GetStatusBarPane()
wxToolBar* GetToolBar() const

%wxchkver_2_4 void ProcessCommand(int id)
//!%wxchkver_2_4 void Command(int id)

void SendSizeEvent()
void SetMenuBar(wxMenuBar* menuBar)
void SetStatusBar(wxStatusBar* statusBar)
void SetStatusBarPane(int n)
virtual void SetStatusText(const wxString& text, int number = 0)

// void wxFrame::SetStatusWidths(Lua table with number indexes and values)
// C++ Func: virtual void SetStatusWidths(int n, int *widths)
virtual void SetStatusWidths(IntArray_FromLuaTable intTable)

void SetToolBar(wxToolBar* toolBar)
%endclass

// ---------------------------------------------------------------------------
// wxMiniFrame

%if wxLUA_USE_wxMiniFrame

%include "wx/minifram.h"

%define wxTINY_CAPTION_HORIZ
%define wxTINY_CAPTION_VERT

%class wxMiniFrame, wxFrame
wxMiniFrame()
wxMiniFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxMiniFrame")
bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxMiniFrame")

%endclass

%endif //wxLUA_USE_wxMiniFrame
%endif //wxLUA_USE_wxFrame

// ---------------------------------------------------------------------------
// wxStatusBar

%if wxLUA_USE_wxStatusBar && wxUSE_STATUSBAR

%include "wx/statusbr.h"

%define wxST_SIZEGRIP
%define wxSB_NORMAL
%define wxSB_FLAT
%define wxSB_RAISED

%class wxStatusBar, wxWindow
wxStatusBar()
wxStatusBar(wxWindow* parent, wxWindowID id, long style = wxST_SIZEGRIP, const wxString& name = "wxStatusBar")
bool Create(wxWindow *parent, wxWindowID id, long style = wxST_SIZEGRIP, const wxString& name = "wxStatusBar")

virtual bool GetFieldRect(int i, wxRect& rect) const
int GetFieldsCount() const
virtual wxString GetStatusText(int ir = 0) const
void PopStatusText(int field = 0)
void PushStatusText(const wxString& string, int field = 0)

// %override void wxStatusBar::SetFieldsCount(either a single number or a Lua table with number indexes and values)
// C++ Func: virtual void SetFieldsCount(int number = 1, int* widths = NULL)
virtual void SetFieldsCount(LuaTable intTable)

void SetMinHeight(int height)
virtual void SetStatusText(const wxString& text, int i = 0)

// void wxStatusBar::SetStatusWidths(Lua table with number indexes and values)
// C++ Func: virtual void SetStatusWidths(int n, int *widths)
virtual void SetStatusWidths(IntArray_FromLuaTable intTable)

// void wxStatusBar::SetStatusStyles(Lua table with number indexes and values)
// C++ Func: virtual void SetStatusStyles(int n, int *styles)
virtual void SetStatusStyles(IntArray_FromLuaTable intTable)

%endclass

%endif //wxLUA_USE_wxStatusBar && wxUSE_STATUSBAR


wxwidgets/wxcore_clipdrag.i - Lua table = 'wx'


// ===========================================================================
// Purpose: wxClipboard and drag & drop and their wxDataFormat
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

// ---------------------------------------------------------------------------
// wxClipboard

%if wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD

%include "wx/clipbrd.h"

%class wxClipboard, wxObject
!%wxchkver_2_6 %define_pointer wxTheClipboard
%wxchkver_2_6 static wxClipboard *Get()

// No constructor, use global clipboard from static Get() function only

bool AddData( %ungc wxDataObject *data )
void Clear()
void Close()
bool Flush()
bool GetData( wxDataObject& data )
bool IsOpened() const
bool IsSupported( const wxDataFormat& format )
bool Open()
bool SetData( %ungc wxDataObject *data )
void UsePrimarySelection( bool primary = true )
%endclass

// ---------------------------------------------------------------------------
// wxClipboardLocker

%class %delete %noclassinfo %encapsulate wxClipboardLocker
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxClipboardLocker(wxClipboard *clipboard = NULL)

%operator bool operator!() const
%endclass

// ---------------------------------------------------------------------------
// wxClipboardTextEvent

%if %wxchkver_2_8

%include "wx/event.h"

%class %delete wxClipboardTextEvent, wxCommandEvent
%define_event wxEVT_COMMAND_TEXT_COPY // EVT_TEXT_COPY(winid, func)
%define_event wxEVT_COMMAND_TEXT_CUT // EVT_TEXT_CUT(winid, func)
%define_event wxEVT_COMMAND_TEXT_PASTE // EVT_TEXT_PASTE(winid, func)

wxClipboardTextEvent(wxEventType type = wxEVT_NULL, wxWindowID winid = 0)

%endclass

%endif //%wxchkver_2_8

%endif //wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD

// ---------------------------------------------------------------------------
// wxDataFormat

%if wxLUA_USE_wxDataObject && wxUSE_DATAOBJ

%include "wx/dataobj.h"

%enum wxDataFormatId
wxDF_INVALID
wxDF_TEXT
wxDF_BITMAP
wxDF_METAFILE
wxDF_SYLK
wxDF_DIF
wxDF_TIFF
wxDF_OEMTEXT
wxDF_DIB
wxDF_PALETTE
wxDF_PENDATA
wxDF_RIFF
wxDF_WAVE
wxDF_UNICODETEXT
wxDF_ENHMETAFILE
wxDF_FILENAME
wxDF_LOCALE
wxDF_PRIVATE
wxDF_HTML
wxDF_MAX
%endenum

%class %delete %noclassinfo %encapsulate wxDataFormat
%define_object wxFormatInvalid

wxDataFormat(wxDataFormatId format = wxDF_INVALID)
wxDataFormat(const wxString &format)

wxString GetId() const
int GetType() const // returns wxDataFormatId, but it's just an int and msw differs
void SetId(const wxString &format)
void SetType(wxDataFormatId format)

%operator bool operator==(const wxDataFormat& format) const
%endclass

// ---------------------------------------------------------------------------
// wxDataObject

%enum wxDataObject::Direction
Get
Set
%endenum

%class %noclassinfo wxDataObject
//wxDataObject() this is a base class, use simplified derived classes

// %override [Lua table of wxDataFormat objects] wxDataObject::GetAllFormats(wxDataObject::Direction dir = wxDataObject)
// C++ Func: virtual void GetAllFormats(wxDataFormat *formats, wxDataObject::Direction dir = wxDataObject::Get) const
virtual void GetAllFormats(wxDataObject::Direction dir = wxDataObject::Get) const

// %override [bool, Lua string] wxDataObject::GetDataHere(const wxDataFormat& format)
// C++ Func: virtual bool GetDataHere(const wxDataFormat& format, void *buf) const
virtual bool GetDataHere(const wxDataFormat& format) const

virtual int GetDataSize(const wxDataFormat& format) const
virtual int GetFormatCount(wxDataObject::Direction dir = wxDataObject::Get) const
virtual wxDataFormat GetPreferredFormat(wxDataObject::Direction dir = wxDataObject::Get) const

// %override bool wxDataObject::SetData(const wxDataFormat& format, Lua string)
// C++ Func: virtual bool SetData(const wxDataFormat& format, int len, const void *buf)
virtual bool SetData(const wxDataFormat& format, const wxString& str)

%endclass

// ---------------------------------------------------------------------------
// wxDataObjectSimple

%class %delete %noclassinfo %encapsulate wxDataObjectSimple, wxDataObject
wxDataObjectSimple(const wxDataFormat& format = wxFormatInvalid)

const wxDataFormat& GetFormat() const
void SetFormat(const wxDataFormat& format)
virtual size_t GetDataSize() const

// %override [bool, Lua string] wxDataObjectSimple::GetDataHere()
// C++ Func: virtual bool GetDataHere(void *buf) const
virtual bool GetDataHere() const

// %override bool wxDataObjectSimple::SetData(Lua string)
// C++ Func: virtual bool SetData(size_t len, const void *buf)
virtual bool SetData(const wxString& str)

%endclass

// ---------------------------------------------------------------------------
// wxDataObjectComposite

%class %delete %noclassinfo %encapsulate wxDataObjectComposite, wxDataObject
wxDataObjectComposite()

void Add(%ungc wxDataObjectSimple *dataObject, bool preferred = false)
%wxchkver_2_8 wxDataFormat GetReceivedFormat() const
%endclass

// ---------------------------------------------------------------------------
// wxFileDataObject

%class %delete %noclassinfo %encapsulate wxFileDataObject, wxDataObjectSimple
wxFileDataObject()

virtual void AddFile(const wxString& file)
wxArrayString GetFilenames() const
%endclass

// ---------------------------------------------------------------------------
// wxTextDataObject

%class %delete %noclassinfo %encapsulate wxTextDataObject, wxDataObjectSimple
wxTextDataObject(const wxString& text = "")

virtual size_t GetTextLength() const
virtual wxString GetText() const
virtual void SetText(const wxString& text)
%endclass

// ---------------------------------------------------------------------------
// wxBitmapDataObject

%class %delete %noclassinfo %encapsulate wxBitmapDataObject, wxDataObjectSimple
wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap)

virtual wxBitmap GetBitmap() const
virtual void SetBitmap(const wxBitmap& bitmap)
%endclass

// ---------------------------------------------------------------------------
// wxCustomDataObject - FIXME implement this?

//%class %noclassinfo %encapsulate wxCustomDataObject, wxDataObjectSimple
// wxCustomDataObject(const wxDataFormat& format = wxFormatInvalid)
//
// virtual void *Alloc(size_t size)
// virtual void Free()
// virtual size_t GetSize() const
// virtual void *GetData() const
// virtual void SetData(size_t size, const void *data)
// virtual void TakeData( size_t size, void *data)
//%endclass

// ---------------------------------------------------------------------------
// wxURLDataObject - is simply wxTextDataObject with a different name

%if %wxchkver_2_8

%class %delete %noclassinfo %encapsulate wxURLDataObject, wxTextDataObject
wxURLDataObject(const wxString& url = "")

wxString GetURL() const
void SetURL(const wxString& url)
%endclass

%endif //%wxchkver_2_8

%endif //wxLUA_USE_wxDataObject && wxUSE_DATAOBJ

// ---------------------------------------------------------------------------
// wxDropTarget

%if wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP

%include "wx/dnd.h"

%enum
wxDrag_CopyOnly
wxDrag_AllowMove
wxDrag_DefaultMove
%endenum

%enum wxDragResult
wxDragError
wxDragNone
wxDragCopy
wxDragMove
wxDragLink
wxDragCancel
%endenum

%function bool wxIsDragResultOk(wxDragResult res)

%class %noclassinfo wxDropTarget // FIXME implement virtual

//wxDropTarget(wxDataObject* data = NULL) pure virtual functions in MSW
virtual bool GetData()
//wxDragResult GetDefaultAction()
//virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def)
//virtual bool OnDrop(wxCoord x, wxCoord y)
//virtual wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def)
//virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def)
//virtual void OnLeave()
//void SetDataObject(wxDataObject* data)
//void SetDefaultAction(wxDragResult action)
%endclass

// ---------------------------------------------------------------------------
// wxFileDropTarget

//%class %noclassinfo wxFileDropTarget, wxDropTarget // FIXME implement virtual
// wxFileDropTarget()
// virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def)
// virtual bool OnDrop(long x, long y, const void *data, size_t size)
// virtual bool OnDropFiles(wxCoord x, wxCoord y,const wxArrayString& filenames)
//%endclass

// ---------------------------------------------------------------------------
// wxTextDropTarget

//%class %noclassinfo wxTextDropTarget, wxDropTarget // FIXME implement virtual
// wxTextDropTarget()
// virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text)
// virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def)
//%endclass

// ---------------------------------------------------------------------------
// wxDropSource

%class %delete %noclassinfo %encapsulate wxDropSource // FIXME implement virtual
%win|%mac wxDropSource(wxWindow* win = NULL, const wxCursor& cursorCopy = wxNullCursor, const wxCursor& cursorMove = wxNullCursor, const wxCursor& cursorStop = wxNullCursor)
%gtk wxDropSource(wxWindow* win = NULL, const wxIcon& iconCopy = wxNullIcon, const wxIcon& iconMove = wxNullIcon, const wxIcon& iconStop = wxNullIcon)
%win wxDropSource(wxDataObject& data, wxWindow* win = NULL, const wxCursor& cursorCopy = wxNullCursor, const wxCursor& cursorMove = wxNullCursor, const wxCursor& cursorStop = wxNullCursor)
%gtk wxDropSource(wxDataObject& data, wxWindow* win = NULL, const wxIcon& iconCopy = wxNullIcon, const wxIcon& iconMove = wxNullIcon, const wxIcon& iconStop = wxNullIcon)

void SetData(wxDataObject& data)
//virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly)
wxDataObject* GetDataObject()
virtual bool GiveFeedback(wxDragResult effect)
void SetCursor(wxDragResult res, const wxCursor& cursor)
%endclass

// ---------------------------------------------------------------------------
// wxDropFilesEvent

%include "wx/event.h"

%class %delete wxDropFilesEvent, wxEvent
%define_event wxEVT_DROP_FILES // EVT_DROP_FILES(func)

// wxDropFilesEvent(WXTYPE id = 0, int noFiles = 0, wxString* files = NULL) only handle this event

// %override [Lua table of strings] wxDropFilesEvent::GetFiles()
// C++ Func: wxString* GetFiles() const
wxString* GetFiles() const

int GetNumberOfFiles() const
wxPoint GetPosition() const
%endclass

%endif //wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP

// ---------------------------------------------------------------------------
// wxMetafile

%if wxLUA_USE_wxMetafile && wxUSE_METAFILE && (%msw|%mac|%os2)

%include "wx/metafile.h"

//%function bool wxMakeMetafilePlaceable(const wxString& filename, int minX, int minY, int maxX, int maxY, float scale = 1.0)

%class %delete %noclassinfo wxMetafile, wxObject
wxMetafile(const wxString& filename = "")

bool Ok()
bool Play(wxDC *dc)
bool SetClipboard(int width = 0, int height = 0)
%endclass

// ---------------------------------------------------------------------------
// wxMetafileDC
%class %delete %noclassinfo wxMetafileDC, wxDC
wxMetafileDC(const wxString& filename = "")

%win %gc wxMetafile* Close()
%endclass

%endif

%endif //wxLUA_USE_wxMetafile && wxUSE_METAFILE && (%msw|%mac|%os2)


wxwidgets/wxcore_controls.i - Lua table = 'wx'


// ===========================================================================
// Purpose: GUI controls like buttons, combos, etc
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

// FIXME - handle WX_DECLARE_CONTROL_CONTAINER ?

// ---------------------------------------------------------------------------
// wxButton

%if wxLUA_USE_wxButton && wxUSE_BUTTON

%include "wx/button.h"

%define wxBU_LEFT
%define wxBU_RIGHT
%define wxBU_TOP
%define wxBU_BOTTOM
%define wxBU_EXACTFIT
%wxchkver_2_6 %define wxBU_AUTODRAW

%class wxButton, wxControl
wxButton()
wxButton(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxButton")
bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxButton")

static wxSize GetDefaultSize() // static is ok, use on existing button
void SetDefault()

//wxString GetLabel() const // in wxWindow
//void SetLabel(const wxString& label) // in wxWindow
%endclass

// ---------------------------------------------------------------------------
// wxBitmapButton

%if wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON

%include "wx/bmpbuttn.h"

%class wxBitmapButton, wxButton
wxBitmapButton()
wxBitmapButton( wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxBitmapButton")
bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxBitmapButton")

wxBitmap GetBitmapDisabled() const
wxBitmap GetBitmapFocus() const
%wxchkver_2_8 wxBitmap GetBitmapHover() const
wxBitmap GetBitmapLabel() const
wxBitmap GetBitmapSelected() const
void SetBitmapDisabled(const wxBitmap& bitmap)
void SetBitmapFocus(const wxBitmap& bitmap)
%wxchkver_2_8 void SetBitmapHover(const wxBitmap& hover)
void SetBitmapLabel(const wxBitmap& bitmap)
void SetBitmapSelected(const wxBitmap& bitmap)
%endclass

%endif //wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON
%endif //wxLUA_USE_wxButton && wxUSE_BUTTON

// ---------------------------------------------------------------------------
// wxToggleButton

%if wxLUA_USE_wxToggleButton && wxUSE_TOGGLEBTN

%include "wx/tglbtn.h"

%class wxToggleButton, wxControl
wxToggleButton()
wxToggleButton(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxToggleButton")
bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxToggleButton")

void SetValue(bool state)
bool GetValue() const

//wxString GetLabel() const // in wxWindow
//void SetLabel(const wxString& label) // in wxWindow
%endclass

%endif //wxLUA_USE_wxToggleButton && wxUSE_TOGGLEBTN

// ---------------------------------------------------------------------------
// wxCheckBox

%if wxLUA_USE_wxCheckBox && wxUSE_CHECKBOX

%include "wx/checkbox.h"

%define wxCHK_2STATE
%define wxCHK_3STATE
%define wxCHK_ALLOW_3RD_STATE_FOR_USER

%enum wxCheckBoxState
wxCHK_UNCHECKED
wxCHK_CHECKED
wxCHK_UNDETERMINED
%endenum

%class wxCheckBox, wxControl
wxCheckBox()
wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val = wxDefaultValidator, const wxString& name = "wxCheckBox")
bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val = wxDefaultValidator, const wxString& name = "wxCheckBox")

bool GetValue() const
wxCheckBoxState Get3StateValue() const
bool Is3rdStateAllowedForUser() const
bool Is3State() const
bool IsChecked() const
void SetValue(const bool state)
void Set3StateValue(const wxCheckBoxState state)
%endclass

%endif //wxLUA_USE_wxCheckBox && wxUSE_CHECKBOX

// ---------------------------------------------------------------------------
// wxControlWithItems

%if (wxLUA_USE_wxChoice|wxLUA_USE_wxComboBox|wxLUA_USE_wxListBox) && wxUSE_CONTROLS

%include "wx/ctrlsub.h"

%class wxControlWithItems, wxControl
// no constructor, this is just a base class

int Append(const wxString& item)
int Append(const wxString& item, voidptr_long number) // C++ is (void *clientData) You can put a number here
int Append(const wxString& item, wxClientData *clientData)
void Append(const wxArrayString& strings)
void Clear()
void Delete(unsigned int n)
int FindString(const wxString& string)
// C++ Func: void* GetClientData(unsigned int n) const
voidptr_long GetClientData(unsigned int n) const // C++ returns (void *) You get a number here

wxClientData* GetClientObject(unsigned int n) const
%rename GetStringClientObject wxStringClientData* GetClientObject(unsigned int n) const
int GetCount() const
int GetSelection() const
wxString GetString(unsigned int n) const
wxString GetStringSelection() const
int Insert(const wxString& item, int pos)
int Insert(const wxString& item, unsigned int pos, voidptr_long number) // C++ is (void *clientData) You can put a number here
int Insert(const wxString& item, unsigned int pos, wxClientData *clientData)
bool IsEmpty() const
// int Number() const // obsolete since 2.2 use GetCount()
void Select(int n)
void SetClientData(unsigned int n, voidptr_long number) // C++ is (void *clientData) You can put a number here
void SetClientObject(unsigned int n, wxClientData *data)
void SetSelection(unsigned int n)
void SetString(unsigned int n, const wxString& string)
bool SetStringSelection(const wxString& string)
%endclass

%endif //(wxLUA_USE_wxChoice|wxLUA_USE_wxComboBox|wxLUA_USE_wxListBox) && wxUSE_CONTROLS

// ---------------------------------------------------------------------------
// wxChoice

%if wxLUA_USE_wxChoice && wxUSE_CHOICE

%include "wx/choice.h"

%class wxChoice, wxControlWithItems
wxChoice()
wxChoice(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxChoice")
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxChoice")

int GetCurrentSelection() const
//int GetColumns() const // Motif only but returns 1 otherwise
//void SetColumns(int n = 1)
%endclass

%endif //wxLUA_USE_wxChoice && wxUSE_CHOICE

// ---------------------------------------------------------------------------
// wxComboBox

%if wxLUA_USE_wxComboBox && wxUSE_COMBOBOX

%include "wx/combobox.h"

%define wxCB_DROPDOWN
%define wxCB_READONLY
%define wxCB_SIMPLE
%define wxCB_SORT

%class wxComboBox, wxControlWithItems
wxComboBox()
wxComboBox(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxComboBox")
bool Create(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxComboBox")

bool CanCopy() const
bool CanCut() const
bool CanPaste() const
bool CanRedo() const
bool CanUndo() const
void Copy()
void Cut()
%wxchkver_2_8 virtual int GetCurrentSelection() const
long GetInsertionPoint() const
long GetLastPosition() const
wxString GetValue() const
void Paste()
void Redo()
void Replace(long from, long to, const wxString& text)
void Remove(long from, long to)
void SetInsertionPoint(long pos)
void SetInsertionPointEnd()
void SetSelection(long from, long to)
void SetValue(const wxString& text)
void Undo()
%endclass

%endif //wxLUA_USE_wxComboBox && wxUSE_COMBOBOX

// ---------------------------------------------------------------------------
// wxGauge

%if wxLUA_USE_wxGauge && wxUSE_GAUGE

%include "wx/gauge.h"

%define wxGA_HORIZONTAL
%wxcompat_2_6 %define wxGA_PROGRESSBAR
%define wxGA_SMOOTH
%define wxGA_VERTICAL

%class wxGauge, wxControl
wxGauge()
wxGauge(wxWindow* parent, wxWindowID id, int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxGauge")
bool Create(wxWindow* parent, wxWindowID id, int range, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxGauge")

int GetBezelFace() const
int GetRange() const
int GetShadowWidth() const
int GetValue() const
bool IsVertical() const
%wxchkver_2_8 void Pulse()
void SetBezelFace(int width)
void SetRange(int range)
void SetShadowWidth(int width)
void SetValue(int pos)
%endclass

%endif //wxLUA_USE_wxGauge && wxUSE_GAUGE

// ---------------------------------------------------------------------------
// wxListBox

%if wxLUA_USE_wxListBox && wxUSE_LISTBOX

%include "wx/listbox.h"

%define wxLB_SINGLE
%define wxLB_MULTIPLE
%define wxLB_EXTENDED
%define wxLB_HSCROLL
%define wxLB_ALWAYS_SB
%define wxLB_NEEDED_SB
%define wxLB_SORT
%define wxLB_OWNERDRAW

%class wxListBox, wxControlWithItems
wxListBox()
wxListBox(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListBox")
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListBox")

void Deselect(int n)

// %override [Lua table of int selections] wxListBox::GetSelections()
// C++ Func: int GetSelections(wxArrayInt& selections) const
int GetSelections() const

%wxchkver_2_8 int HitTest(const wxPoint& point) const
//void InsertItems(int nItems, const wxString items[], int pos)
void InsertItems(const wxArrayString& items, int pos)
bool IsSelected(int n) const
//void Set(int n, const wxString* choices)
void Set(const wxArrayString& choices)
void SetFirstItem(int n)
void SetSelection(int n, bool select = true)
void SetStringSelection(const wxString& string, bool select = true)
%endclass

// ---------------------------------------------------------------------------
// wxCheckListBox

%if wxLUA_USE_wxCheckListBox && wxUSE_CHECKLISTBOX

%include "wx/checklst.h"

%class wxCheckListBox, wxListBox
wxCheckListBox()
wxCheckListBox(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxCheckListBox")
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxCheckListBox")

void Check(int item, bool check = true)
bool IsChecked(int item) const
%endclass

%endif //wxLUA_USE_wxCheckListBox && wxUSE_CHECKLISTBOX
%endif //wxLUA_USE_wxListBox && wxUSE_LISTBOX

// ---------------------------------------------------------------------------
// wxListCtrl

%if wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL

%include "wx/listctrl.h"

%define wxLC_ALIGN_LEFT
%define wxLC_ALIGN_TOP
%define wxLC_AUTOARRANGE
%define wxLC_EDIT_LABELS
%define wxLC_HRULES
%define wxLC_ICON
%define wxLC_LIST
%define wxLC_NO_HEADER
%define wxLC_NO_SORT_HEADER
%define wxLC_REPORT
%define wxLC_SINGLE_SEL
%define wxLC_SMALL_ICON
%define wxLC_SORT_ASCENDING
%define wxLC_SORT_DESCENDING
//%define wxLC_USER_TEXT - deprecated - use wxLC_VIRTUAL
%define wxLC_VIRTUAL
%define wxLC_VRULES

%define wxLC_MASK_TYPE // (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT)
%define wxLC_MASK_ALIGN // (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT)
%define wxLC_MASK_SORT // (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING)

%define wxLIST_ALIGN_DEFAULT
%define wxLIST_ALIGN_LEFT
%define wxLIST_ALIGN_SNAP_TO_GRID
%define wxLIST_ALIGN_TOP
%define wxLIST_AUTOSIZE
%define wxLIST_AUTOSIZE_USEHEADER
%define wxLIST_FIND_DOWN
%define wxLIST_FIND_LEFT
%define wxLIST_FIND_RIGHT
%define wxLIST_FIND_UP
%define wxLIST_HITTEST_ABOVE
%define wxLIST_HITTEST_BELOW
%define wxLIST_HITTEST_NOWHERE
%define wxLIST_HITTEST_ONITEM
%define wxLIST_HITTEST_ONITEMICON
%define wxLIST_HITTEST_ONITEMLABEL
%define wxLIST_HITTEST_ONITEMRIGHT
%define wxLIST_HITTEST_ONITEMSTATEICON
%define wxLIST_HITTEST_TOLEFT
%define wxLIST_HITTEST_TORIGHT
%define wxLIST_MASK_DATA
%define wxLIST_MASK_FORMAT
%define wxLIST_MASK_IMAGE
%define wxLIST_MASK_STATE
%define wxLIST_MASK_TEXT
%define wxLIST_MASK_WIDTH
%define wxLIST_NEXT_ABOVE
%define wxLIST_NEXT_ALL
%define wxLIST_NEXT_BELOW
%define wxLIST_NEXT_LEFT
%define wxLIST_NEXT_RIGHT
%define wxLIST_RECT_BOUNDS
%define wxLIST_RECT_ICON
%define wxLIST_RECT_LABEL
%define wxLIST_SET_ITEM
%define wxLIST_STATE_CUT
%define wxLIST_STATE_DONTCARE
%define wxLIST_STATE_DROPHILITED
%define wxLIST_STATE_FOCUSED
%define wxLIST_STATE_SELECTED

%wxchkver_2_8 %define wxLIST_GETSUBITEMRECT_WHOLEITEM

%class wxListCtrl, wxControl
wxListCtrl()
wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListCtrl")
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListCtrl")

bool Arrange(int flag = wxLIST_ALIGN_DEFAULT)
void AssignImageList(%ungc wxImageList *imageList, int which)
void ClearAll()
bool DeleteAllItems()
bool DeleteColumn(int col)
bool DeleteItem(long item)
void EditLabel(long item)
bool EnsureVisible(long item)
long FindItem(long start, const wxString& str, const bool partial = false)
long FindItem(long start, long data)
long FindItem(long start, const wxPoint& pt, int direction)
bool GetColumn(int col, wxListItem& item) const
int GetColumnCount() const
int GetColumnWidth(int col) const
int GetCountPerPage() const
%win|%wxchkver_2_8 wxTextCtrl* GetEditControl() const
wxImageList* GetImageList(int which) const
bool GetItem(wxListItem& info) const
int GetItemCount() const
long GetItemData(long item) const
wxFont GetItemFont(long item) const
bool GetItemPosition(long item, wxPoint& pos) const
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const
!%wxchkver_2_6 int GetItemSpacing(bool isSmall) const
%wxchkver_2_6 wxSize GetItemSpacing() const
int GetItemState(long item, long stateMask) const
wxString GetItemText(long item) const
long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const
int GetSelectedItemCount() const
wxColour GetTextColour() const
long GetTopItem() const
wxRect GetViewRect() const

// %override [long, int flags] wxListCtrl::HitTest(const wxPoint& point)
// C++ Func: long HitTest(const wxPoint& point, int& flags)
long HitTest(const wxPoint& point)

long InsertColumn(long col, wxListItem& info)
long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT, int width = -1)
long InsertItem(wxListItem& info)
long InsertItem(long index, const wxString& label)
long InsertItem(long index, int imageIndex)
long InsertItem(long index, const wxString& label, int imageIndex)
//virtual wxListItemAttr * OnGetItemAttr(long item) const
//virtual int OnGetItemImage(long item)
//virtual wxString OnGetItemText(long item, long column) const
//void RefreshItem(long item)
//void RefreshItems(long itemFrom, long itemTo)
bool ScrollList(int dx, int dy)
//void SetBackgroundColour(const wxColour& col) - see wxWindow
bool SetColumn(int col, wxListItem& item)
bool SetColumnWidth(int col, int width)
void SetImageList(wxImageList* imageList, int which)
bool SetItem(wxListItem& info)
long SetItem(long index, int col, const wxString& label, int imageId = -1)
void SetItemBackgroundColour(long item, const wxColour& col)
bool SetItemColumnImage(long item, long column, int image)
//void SetItemCount(long count)
bool SetItemData(long item, long data)
bool SetItemImage(long item, int image) // int selImage) selImage is deprecated and isn't used anyway
bool SetItemPosition(long item, const wxPoint& pos)
bool SetItemState(long item, long state, long stateMask)
void SetItemText(long item, const wxString& text)
void SetItemTextColour(long item, const wxColour& col)
void SetSingleStyle(long style, const bool add = true)
void SetTextColour(const wxColour& col)
//void SetWindowStyleFlag(long style) - see wxWindow

// %override bool SortItems(Lua function(long item1, long item2, long data) returning int, long data)
// C++ Func: bool SortItems(wxListCtrlCompare fnSortCallBack, long data)
// Note: the data can only be a number, but you can create a table where the data is
// an index of it if you need more information.
// Also, the item1 and item2 are NOT the indexes in the wxListCtrl, but are the
// client data associated with the item. see SetItemData(item, data) and again
// you may want to make this "data" equal to an index in a table where you
// store more information needed for sorting.
// Your Lua function should return 1, 0, -1 for item1 > item2, item1 == item2, item1 < item2
bool SortItems(LuaFunction fnSortCallBack, long data)
%endclass

// ---------------------------------------------------------------------------
// wxListItemAttr - wxListCtrl

%class %delete %noclassinfo %encapsulate wxListItemAttr
wxListItemAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont)

%wxchkver_2_8 void AssignFrom(const wxListItemAttr& source)
wxColour GetBackgroundColour()
wxFont GetFont()
wxColour GetTextColour()
bool HasBackgroundColour()
bool HasFont()
bool HasTextColour()
void SetBackgroundColour(const wxColour& colBack)
void SetFont(const wxFont& font)
void SetTextColour(const wxColour& colText)
%endclass

// ---------------------------------------------------------------------------
// wxListItem - wxListCtrl

%enum wxListColumnFormat
wxLIST_FORMAT_LEFT
wxLIST_FORMAT_RIGHT
wxLIST_FORMAT_CENTRE
wxLIST_FORMAT_CENTER
%endenum

%class %delete wxListItem, wxObject
wxListItem()
wxListItem(const wxListItem& item)

void Clear()
void ClearAttributes()
wxListColumnFormat GetAlign()
wxListItemAttr *GetAttributes()
wxColour GetBackgroundColour() const
int GetColumn()
long GetData()
wxFont GetFont() const
long GetId()
int GetImage()
long GetMask()
long GetState()
wxString GetText()
wxColour GetTextColour() const
int GetWidth()
bool HasAttributes()
void SetAlign(wxListColumnFormat align)
void SetBackgroundColour(const wxColour& colBack)
void SetColumn(int col)
void SetData(long data)
void SetFont(const wxFont& font)
void SetId(long id)
void SetImage(int image)
void SetMask(long mask)
void SetState(long state)
void SetStateMask(long stateMask)
void SetText(const wxString& text)
void SetTextColour(const wxColour& colText)
void SetWidth(int width)
%endclass

// ---------------------------------------------------------------------------
// wxListEvent - wxListCtrl

%class %delete wxListEvent, wxNotifyEvent
%define_event wxEVT_COMMAND_LIST_BEGIN_DRAG // EVT_LIST_BEGIN_DRAG(id, fn)
%define_event wxEVT_COMMAND_LIST_BEGIN_RDRAG // EVT_LIST_BEGIN_RDRAG(id, fn)
%define_event wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT // EVT_LIST_BEGIN_LABEL_EDIT(id, fn)
%define_event wxEVT_COMMAND_LIST_COL_CLICK // EVT_LIST_COL_CLICK(id, fn)
%define_event wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS // EVT_LIST_DELETE_ALL_ITEMS(id, fn)
%define_event wxEVT_COMMAND_LIST_DELETE_ITEM // EVT_LIST_DELETE_ITEM(id, fn)
%define_event wxEVT_COMMAND_LIST_END_LABEL_EDIT // EVT_LIST_END_LABEL_EDIT(id, fn)
!%wxchkver_2_6 %define_event wxEVT_COMMAND_LIST_GET_INFO // EVT_LIST_GET_INFO(id, fn)
!%wxchkver_2_6 %define_event wxEVT_COMMAND_LIST_SET_INFO // EVT_LIST_SET_INFO(id, fn)
%define_event wxEVT_COMMAND_LIST_INSERT_ITEM // EVT_LIST_INSERT_ITEM(id, fn)
%define_event wxEVT_COMMAND_LIST_ITEM_ACTIVATED // EVT_LIST_ITEM_ACTIVATED(id, fn)
%define_event wxEVT_COMMAND_LIST_ITEM_DESELECTED // EVT_LIST_ITEM_DESELECTED(id, fn)
%define_event wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK // EVT_LIST_ITEM_MIDDLE_CLICK(id, fn)
%define_event wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK // EVT_LIST_ITEM_RIGHT_CLICK(id, fn)
%define_event wxEVT_COMMAND_LIST_ITEM_SELECTED // EVT_LIST_ITEM_SELECTED(id, fn)
%define_event wxEVT_COMMAND_LIST_KEY_DOWN // EVT_LIST_KEY_DOWN(id, fn)
%define_event wxEVT_COMMAND_LIST_CACHE_HINT // EVT_LIST_CACHE_HINT(id, fn)
%define_event wxEVT_COMMAND_LIST_COL_RIGHT_CLICK // EVT_LIST_COL_RIGHT_CLICK(id, fn)
%define_event wxEVT_COMMAND_LIST_COL_BEGIN_DRAG // EVT_LIST_COL_BEGIN_DRAG(id, fn)
%define_event wxEVT_COMMAND_LIST_COL_DRAGGING // EVT_LIST_COL_DRAGGING(id, fn)
%define_event wxEVT_COMMAND_LIST_COL_END_DRAG // EVT_LIST_COL_END_DRAG(id, fn)
%define_event wxEVT_COMMAND_LIST_ITEM_FOCUSED // EVT_LIST_ITEM_FOCUSED(id, fn)

wxListEvent(wxEventType commandType = 0, int id = 0)

//long GetCacheFrom() const - only useful for virtual controls
//long GetCacheTo() const
int GetKeyCode() const
long GetIndex() const
int GetColumn() const
wxPoint GetPoint() const
const wxString& GetLabel() const
const wxString& GetText() const
int GetImage() const
long GetData() const
long GetMask() const
const wxListItem& GetItem() const
bool IsEditCancelled() const
%endclass

// ---------------------------------------------------------------------------
// wxListView

%class wxListView, wxListCtrl
wxListView()
wxListView(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListView")
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListView")

void ClearColumnImage(int col)
void Focus(long index)
long GetFirstSelected() const
long GetFocusedItem() const
long GetNextSelected(long item) const
bool IsSelected(long index)
void Select(long n, bool on = true)
void SetColumnImage(int col, int image)
%endclass

%endif //wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL

// ---------------------------------------------------------------------------
// wxRadioBox

%if wxLUA_USE_wxRadioBox && wxUSE_RADIOBOX

%include "wx/radiobox.h"

%define wxRA_VERTICAL
%define wxRA_HORIZONTAL
%define wxRA_SPECIFY_COLS
%define wxRA_SPECIFY_ROWS
// %define wxRA_USE_CHECKBOX - only for palm os

%class wxRadioBox, wxControl
wxRadioBox()
wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox")
bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox")

// these are marked deprecated in 2.6, use wxWindow::Get/SetLabel and Get/SetString below
// wxString GetLabel() const - see wxWindow
// void SetLabel(const wxString& label) - see wxWindow
// wxString GetLabel(int n) const
// void SetLabel(int n, const wxString& label)

void Enable(bool enable)
void Enable(int n, bool enable)
int FindString(const wxString& string) const
int GetCount() const
int GetSelection() const
wxString GetStringSelection() const
wxString GetString(int n) const
void SetString(int n, const wxString &label)
void SetSelection(int n)
void SetStringSelection(const wxString& string)
//bool Show(bool show = true) // see wxWindow
bool Show(int item, bool show) // must specify both for overload
%endclass

%endif //wxLUA_USE_wxRadioBox && wxUSE_RADIOBOX

// ---------------------------------------------------------------------------
// wxRadioButton

%if wxLUA_USE_wxRadioButton && wxUSE_RADIOBTN

%include "wx/radiobut.h"

%define wxRB_GROUP
%define wxRB_SINGLE
// %define wxRB_USE_CHECKBOX - only for palm os

%class wxRadioButton, wxControl
wxRadioButton()
wxRadioButton(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioButton")
bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioButton")

bool GetValue() const
void SetValue(const bool value)
%endclass

%endif //wxLUA_USE_wxRadioButton && wxUSE_RADIOBTN

// ---------------------------------------------------------------------------
// wxScrollBar

%if wxLUA_USE_wxScrollBar && wxUSE_SCROLLBAR

%include "wx/scrolbar.h"

%define wxSB_HORIZONTAL
%define wxSB_VERTICAL

%class wxScrollBar, wxControl
wxScrollBar()
wxScrollBar(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxScrollBar")
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSB_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxScrollBar")

int GetRange() const
int GetPageSize() const
int GetThumbPosition() const
int GetThumbSize() const
void SetThumbPosition(int viewStart)
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize, const bool refresh = true)
%endclass

%endif //wxLUA_USE_wxScrollBar && wxUSE_SCROLLBAR

// ---------------------------------------------------------------------------
// wxSlider

%if wxLUA_USE_wxSlider && wxUSE_SLIDER

%include "wx/slider.h"

%define wxSL_AUTOTICKS
%define wxSL_BOTH
%define wxSL_BOTTOM
%define wxSL_HORIZONTAL
%define wxSL_LABELS
%define wxSL_LEFT
%define wxSL_NOTIFY_DRAG
%define wxSL_RIGHT
%define wxSL_SELRANGE
%define wxSL_TOP
%define wxSL_VERTICAL

%class wxSlider, wxControl
wxSlider()
wxSlider(wxWindow* parent, wxWindowID id, int value , int minValue, int maxValue, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxSlider")
bool Create(wxWindow* parent, wxWindowID id, int value , int minValue, int maxValue, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxSlider")

void ClearSel()
void ClearTicks()
int GetLineSize() const
int GetMax() const
int GetMin() const
int GetPageSize() const
int GetSelEnd() const
int GetSelStart() const
int GetThumbLength() const
int GetTickFreq() const
int GetValue() const
void SetLineSize(int lineSize)
void SetPageSize(int pageSize)
void SetRange(int minValue, int maxValue)
void SetSelection(int startPos, int endPos)
void SetThumbLength(int len)
void SetTick(int tickPos)
void SetTickFreq(int n, int pos)
void SetValue(int value)
%endclass

%endif //wxLUA_USE_wxSlider && wxUSE_SLIDER

// ---------------------------------------------------------------------------
// wxSpinButton

%if wxLUA_USE_wxSpinButton && wxUSE_SPINBTN

%include "wx/spinbutt.h"

%define wxSP_HORIZONTAL
%define wxSP_VERTICAL
%define wxSP_ARROW_KEYS
%define wxSP_WRAP

%class wxSpinButton, wxControl
wxSpinButton()
wxSpinButton(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, const wxString& name = "wxSpinButton")
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_VERTICAL | wxSP_ARROW_KEYS, const wxString& name = "wxSpinButton")

int GetMax() const
int GetMin() const
int GetValue() const
void SetRange(int min, int max)
void SetValue(int value)
%endclass

// ---------------------------------------------------------------------------
// wxSpinEvent - for wxSpinButton

%include "wx/spinbutt.h"
%include "wx/spinctrl.h"

%class %delete wxSpinEvent, wxNotifyEvent
%define_event wxEVT_SCROLL_LINEUP // EVT_SPIN_UP(winid, func)
%define_event wxEVT_SCROLL_LINEDOWN // EVT_SPIN_DOWN(winid, func)
%define_event wxEVT_SCROLL_THUMBTRACK // EVT_SPIN(winid, func)
//%define_event wxEVT_COMMAND_SPINCTRL_UPDATED - actually a wxCommandEvent is sent

wxSpinEvent(wxEventType commandType = wxEVT_NULL, int id = 0)

int GetPosition() const
void SetPosition(int pos)
%endclass

%endif //wxLUA_USE_wxSpinButton && wxUSE_SPINBTN

// ---------------------------------------------------------------------------
// wxSpinCtrl

%if wxLUA_USE_wxSpinCtrl && wxUSE_SPINCTRL

%include "wx/spinctrl.h"

//%define wxSP_ARROW_KEYS see wxSpinButton
//%define wxSP_WRAP see wxSpinButton

%class wxSpinCtrl, wxControl
wxSpinCtrl()
wxSpinCtrl(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, int min = 0, int max = 100, int initial = 0, const wxString& name = "wxSpinCtrl")
bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, int min = 0, int max = 100, int initial = 0, const wxString& name = "wxSpinCtrl")

int GetMax() const
int GetMin() const
int GetValue() const
void SetRange(int minVal, int maxVal)
void SetSelection(long from, long to)
void SetValue(const wxString& text)
void SetValue(int iValue)
%endclass

%endif //wxLUA_USE_wxSpinCtrl && wxUSE_SPINCTRL

// ---------------------------------------------------------------------------
// wxTextCtrl

%if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL

%include "wx/textctrl.h"

%define wxTE_PROCESS_ENTER
%define wxTE_PROCESS_TAB
%define wxTE_MULTILINE
%define wxTE_PASSWORD
%define wxTE_READONLY
%define wxTE_RICH
%define wxTE_RICH2
%define wxTE_AUTO_URL
%define wxTE_NOHIDESEL
%define wxTE_LEFT
%define wxTE_CENTRE
%define wxTE_RIGHT
%define wxTE_DONTWRAP
%define wxTE_LINEWRAP
%define wxTE_CHARWRAP
%define wxTE_WORDWRAP
%define wxTE_BESTWRAP
%define wxTE_CAPITALIZE
%define wxTE_AUTO_SCROLL
%define wxTE_NO_VSCROLL

%enum wxTextCtrlHitTestResult
wxTE_HT_UNKNOWN
wxTE_HT_BEFORE
wxTE_HT_ON_TEXT
wxTE_HT_BELOW
wxTE_HT_BEYOND
%endenum

%typedef long wxTextCoord
%define wxOutOfRangeTextCoord
%define wxInvalidTextCoord

%class wxTextCtrl, wxControl
wxTextCtrl()
wxTextCtrl(wxWindow *parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxTextCtrl")
bool Create(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxTextCtrl")

void AppendText(const wxString& text)
virtual bool CanCopy()
virtual bool CanCut()
virtual bool CanPaste()
virtual bool CanRedo()
virtual bool CanUndo()
virtual void ChangeValue(const wxString& value)
virtual void Clear()
virtual void Copy()
virtual void Cut()
void DiscardEdits()
bool EmulateKeyPress(const wxKeyEvent& event)
const wxTextAttr& GetDefaultStyle() const
virtual long GetInsertionPoint() const
virtual long GetLastPosition() const
int GetLineLength(long lineNo) const
wxString GetLineText(long lineNo) const
int GetNumberOfLines() const
virtual wxString GetRange(long from, long to) const

// %override [long from, long to] wxTextCtrl::GetSelection()
// C++ Func: virtual void GetSelection(long* from, long* to) const
virtual void GetSelection() const

virtual wxString GetStringSelection()
bool GetStyle(long position, wxTextAttr& style)
wxString GetValue() const

// %override [wxTextCtrlHitTestResult, int col, int row] wxTextCtrl::HitTest(const wxPoint& pt)
// C++ Func: wxTextCtrlHitTestResult HitTest(const wxPoint& pt, wxTextCoord *col, wxTextCoord *row) const
wxTextCtrlHitTestResult HitTest(const wxPoint& pt) const

// %override [wxTextCtrlHitTestResult, int pos] wxTextCtrl::HitTestPos(const wxPoint& pt)
// C++ Func: wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const
%rename HitTestPos wxTextCtrlHitTestResult HitTest(const wxPoint& pt) const

bool IsEditable() const
bool IsModified() const
bool IsMultiLine() const
bool IsSingleLine() const
bool LoadFile(const wxString& filename)
void MarkDirty()
//void OnDropFiles(wxDropFilesEvent& event)
virtual void Paste()

// %override [bool, int x, int y] wxTextCtrl::PositionToXY(pos)
// C++ Func: bool PositionToXY(long pos, long *x, long *y) const
bool PositionToXY(long pos) const

virtual void Redo()
virtual void Remove(long from, long to)
virtual void Replace(long from, long to, const wxString& value)
bool SaveFile(const wxString& filename)
bool SetDefaultStyle(const wxTextAttr& style)
virtual void SetEditable(bool editable)
virtual void SetInsertionPoint(long pos)
virtual void SetInsertionPointEnd()
virtual void SetMaxLength(unsigned long value)
virtual void SetSelection(long from, long to)
bool SetStyle(long start, long end, const wxTextAttr& style)
virtual void SetValue(const wxString& value)
void ShowPosition(long pos)
virtual void Undo()
void WriteText(const wxString& text)
long XYToPosition(long x, long y)
%endclass

%enum wxTextAttrAlignment
wxTEXT_ALIGNMENT_DEFAULT
wxTEXT_ALIGNMENT_LEFT
wxTEXT_ALIGNMENT_CENTRE
wxTEXT_ALIGNMENT_CENTER
wxTEXT_ALIGNMENT_RIGHT
wxTEXT_ALIGNMENT_JUSTIFIED
%endenum

%define wxTEXT_ATTR_TEXT_COLOUR
%define wxTEXT_ATTR_BACKGROUND_COLOUR
%define wxTEXT_ATTR_FONT_FACE
%define wxTEXT_ATTR_FONT_SIZE
%define wxTEXT_ATTR_FONT_WEIGHT
%define wxTEXT_ATTR_FONT_ITALIC
%define wxTEXT_ATTR_FONT_UNDERLINE
%define wxTEXT_ATTR_FONT
%define wxTEXT_ATTR_ALIGNMENT
%define wxTEXT_ATTR_LEFT_INDENT
%define wxTEXT_ATTR_RIGHT_INDENT
%define wxTEXT_ATTR_TABS

%class %delete %noclassinfo %encapsulate wxTextAttr
//wxTextAttr()
wxTextAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont, wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT)

wxTextAttrAlignment GetAlignment() const
wxColour GetBackgroundColour() const
long GetFlags() const
wxFont GetFont() const
long GetLeftIndent() const
long GetLeftSubIndent() const
long GetRightIndent() const
const wxArrayInt& GetTabs() const
wxColour GetTextColour() const
bool HasAlignment() const
bool HasBackgroundColour() const
bool HasFlag(long flag) const
bool HasFont() const
bool HasLeftIndent() const
bool HasRightIndent() const
bool HasTabs() const
bool HasTextColour() const
bool IsDefault() const
void SetAlignment(wxTextAttrAlignment alignment)
void SetBackgroundColour(const wxColour& colBack)
void SetFlags(long flags)
void SetFont(const wxFont& font, long flags = wxTEXT_ATTR_FONT)
void SetLeftIndent(int indent, int subIndent = 0)
void SetRightIndent(int indent)
void SetTabs(const wxArrayInt& tabs)
void SetTextColour(const wxColour& colText)
%endclass

// ---------------------------------------------------------------------------
// wxTextUrlEvent

%class %delete wxTextUrlEvent, wxCommandEvent

%wxchkver_2_8_0 %define_event wxEVT_COMMAND_TEXT_URL // EVT_TEXT_URL(id, fn)

wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, long start, long end)

const wxMouseEvent& GetMouseEvent() const
long GetURLStart() const
long GetURLEnd() const

%endclass

%endif //wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL

// ---------------------------------------------------------------------------
// wxTreeCtrl

%if wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL

%include "wx/treectrl.h"

%define wxTR_NO_BUTTONS
%define wxTR_HAS_BUTTONS
%define wxTR_TWIST_BUTTONS
%define wxTR_NO_LINES
%define wxTR_SINGLE
%define wxTR_MULTIPLE
%define wxTR_EXTENDED
%define wxTR_EDIT_LABELS
%define wxTR_LINES_AT_ROOT
%define wxTR_HIDE_ROOT
%define wxTR_ROW_LINES
%define wxTR_HAS_VARIABLE_ROW_HEIGHT
%define wxTR_FULL_ROW_HIGHLIGHT
%define wxTR_DEFAULT_STYLE

//%define wxTR_MAC_BUTTONS both deprecated
//%define wxTR_AQUA_BUTTONS

%enum wxTreeItemIcon
wxTreeItemIcon_Normal
wxTreeItemIcon_Selected
wxTreeItemIcon_Expanded
wxTreeItemIcon_SelectedExpanded
wxTreeItemIcon_Max
%endenum

%define wxTREE_HITTEST_ABOVE
%define wxTREE_HITTEST_BELOW
%define wxTREE_HITTEST_NOWHERE
%define wxTREE_HITTEST_ONITEMBUTTON
%define wxTREE_HITTEST_ONITEMICON
%define wxTREE_HITTEST_ONITEMINDENT
%define wxTREE_HITTEST_ONITEMLABEL
%define wxTREE_HITTEST_ONITEMRIGHT
%define wxTREE_HITTEST_ONITEMSTATEICON
%define wxTREE_HITTEST_TOLEFT
%define wxTREE_HITTEST_TORIGHT
%define wxTREE_HITTEST_ONITEMUPPERPART
%define wxTREE_HITTEST_ONITEMLOWERPART
%define wxTREE_HITTEST_ONITEM

%class wxTreeCtrl, wxControl
wxTreeCtrl()
wxTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxTreeCtrl")
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxTreeCtrl")

wxTreeItemId AddRoot(const wxString& text, int image = -1, int selImage = -1, wxTreeItemData* data = NULL)
wxTreeItemId AppendItem(const wxTreeItemId& parent, const wxString& text, int image = -1, int selImage = -1, wxTreeItemData* data = NULL)
//void AssignButtonsImageList(wxImageList* imageList)
void AssignImageList(%ungc wxImageList* imageList)
void AssignStateImageList(%ungc wxImageList* imageList)
void Collapse(const wxTreeItemId& item)
void CollapseAndReset(const wxTreeItemId& item)
void Delete(const wxTreeItemId& item)
void DeleteAllItems()
void DeleteChildren(const wxTreeItemId& item)
void EditLabel(const wxTreeItemId& item)
%win void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false)
void EnsureVisible(const wxTreeItemId& item)
void Expand(const wxTreeItemId& item)
bool GetBoundingRect(const wxTreeItemId& item, wxRect& rect, bool textOnly = false) const
//wxImageList* GetButtonsImageList() const
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true) const
int GetCount() const
//wxTextCtrl* GetEditControl() const

// %override [wxTreeItemId, wxTreeItemIdValue cookie] wxTreeCtrl::GetFirstChild(const wxTreeItemId& item)
// C++ Func: wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const
wxTreeItemId GetFirstChild(const wxTreeItemId& item) const

wxTreeItemId GetFirstVisibleItem() const
wxImageList* GetImageList() const
int GetIndent() const
wxColour GetItemBackgroundColour(const wxTreeItemId& item) const
wxTreeItemData* GetItemData(const wxTreeItemId& item) const
wxFont GetItemFont(const wxTreeItemId& item) const
int GetItemImage(const wxTreeItemId& item, wxTreeItemIcon which = wxTreeItemIcon_Normal) const
wxString GetItemText(const wxTreeItemId& item) const
wxColour GetItemTextColour(const wxTreeItemId& item) const
wxTreeItemId GetLastChild(const wxTreeItemId& item) const

// %override [wxTreeItemId, wxTreeItemIdValue cookie] wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long cookie)
// C++ Func: wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const
wxTreeItemId GetNextChild(const wxTreeItemId& item, long cookie) const

wxTreeItemId GetNextSibling(const wxTreeItemId& item) const
wxTreeItemId GetNextVisible(const wxTreeItemId& item) const
%wxchkver_2_4 wxTreeItemId GetItemParent(const wxTreeItemId& item) const
wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const
wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const
wxTreeItemId GetRootItem() const
//!%wxchkver_2_6|%wxcompat_2_4 int GetItemSelectedImage(const wxTreeItemId& item) const
wxTreeItemId GetSelection() const

// %override [size_t, Lua table of wxTreeItemIds] wxTreeCtrl::GetSelections()
// C++ Func: size_t GetSelections(wxArrayTreeItemIds& selection) const
size_t GetSelections() const

wxImageList* GetStateImageList() const

// %override [wxTreeItemId, int flags] wxTreeCtrl::HitTest(const wxPoint& point)
// C++ Func: wxTreeItemId HitTest(const wxPoint& point, int& flags)
wxTreeItemId HitTest(const wxPoint& point)

wxTreeItemId InsertItem(const wxTreeItemId& parent, const wxTreeItemId& previous, const wxString& text, int image = -1, int selImage = -1, wxTreeItemData* data = NULL)
wxTreeItemId InsertItem(const wxTreeItemId& parent, size_t before, const wxString& text, int image = -1, int selImage = -1, wxTreeItemData* data = NULL)
bool IsBold(const wxTreeItemId& item) const
bool IsExpanded(const wxTreeItemId& item) const
bool IsSelected(const wxTreeItemId& item) const
bool IsVisible(const wxTreeItemId& item) const
bool ItemHasChildren(const wxTreeItemId& item) const
//int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2)
wxTreeItemId PrependItem(const wxTreeItemId& parent, const wxString& text, int image = -1, int selImage = -1, wxTreeItemData* data = NULL)
void ScrollTo(const wxTreeItemId& item)
void SelectItem(const wxTreeItemId& item, bool select = true)
//void SetButtonsImageList(wxImageList* imageList)
void SetIndent(int indent)
void SetImageList(wxImageList* imageList)
void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col)
void SetItemBold(const wxTreeItemId& item, bool bold = true)
void SetItemData(const wxTreeItemId& item, wxTreeItemData* data)
void SetItemDropHighlight(const wxTreeItemId& item, boolhighlight = true)
void SetItemFont(const wxTreeItemId& item, const wxFont& font)
void SetItemHasChildren(const wxTreeItemId& item, bool hasChildren = true)
void SetItemImage(const wxTreeItemId& item, int image, wxTreeItemIcon which = wxTreeItemIcon_Normal)
//!%wxchkver_2_6|%wxcompat_2_4 void SetItemSelectedImage(const wxTreeItemId& item, int selImage)
void SetItemText(const wxTreeItemId& item, const wxString& text)
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col)
void SetStateImageList(wxImageList* imageList)
// void SetWindowStyle(long styles) - see wxWindow
void SortChildren(const wxTreeItemId& item)
void Toggle(const wxTreeItemId& item)
void ToggleItemSelection(const wxTreeItemId& item)
void Unselect()
void UnselectAll()
void UnselectItem(const wxTreeItemId& item)
%endclass

// ---------------------------------------------------------------------------
// wxTreeItemAttr - wxTreeCtrl
// This is only used internally in wxWidgets with no public accessors to them.

/*
%class %delete %noclassinfo %encapsulate wxTreeItemAttr
wxTreeItemAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont)

wxColour GetBackgroundColour() const
wxFont GetFont() const
wxColour GetTextColour() const
bool HasBackgroundColour()
bool HasFont()
bool HasTextColour()
void SetBackgroundColour(const wxColour& colBack)
void SetFont(const wxFont& font)
void SetTextColour(const wxColour& colText)
%endclass
*/


// ---------------------------------------------------------------------------
// wxTreeItemIdValue - wxTreeCtrl

//%if %wxchkver_2_6
//%class %noclassinfo wxTreeItemIdValue
//%endclass
//%endif

// ---------------------------------------------------------------------------
// wxTreeItemId - wxTreeCtrl

%enum wxTreeItemIdValue
// FAKE enum, actually typedef void* wxTreeItemIdValue
// but Lua only uses double. This gets around compiler errors/warnings
%endenum

%class %delete %noclassinfo %encapsulate wxTreeItemId
wxTreeItemId()
wxTreeItemId(const wxTreeItemId& id)

bool IsOk()
wxTreeItemIdValue GetValue() const // get a pointer to the internal data to use as a reference in a Lua table

%operator wxTreeItemId& operator=(const wxTreeItemId& otherId)
%operator bool operator==(const wxTreeItemId& otherId) const
%endclass

// ---------------------------------------------------------------------------
// wxArrayTreeItemIds - wxTreeCtrl
// This is only used by the function wxTreeCtrl::GetSelections(wxArrayTreeItemIds& arr)
// which we have overridden to return a table. This is not necessary.
//
// Note: This is actually an array of the internal wxTreeItemIdValue data
// which is a void* pointer. This is why we use long.
// See wxLua's wxTreeItemId::GetValue() function

/*
%class %delete %noclassinfo %encapsulate wxArrayTreeItemIds
wxArrayTreeItemIds()
wxArrayTreeItemIds(const wxArrayTreeItemIds& array)

void Add(const wxTreeItemId& id)
void Alloc(size_t nCount)
void Clear()
void Empty()
int GetCount() const
int Index(wxTreeItemIdValue treeItemIdValue, bool bFromEnd = false)
//void Insert(wxTreeItemId& str, int nIndex, size_t copies = 1)
bool IsEmpty()
wxTreeItemId Item(size_t nIndex) const
wxTreeItemId Last()
void Remove(wxTreeItemIdValue treeItemIdValue)
void RemoveAt(size_t nIndex, size_t count = 1)
void Shrink()
%endclass
*/


// ---------------------------------------------------------------------------
// wxTreeItemData - wxTreeCtrl, see also wxLuaTreeItemData
//
// No %delete since the wxTreeCtrl should do it and you should only create one
// of these if you're going to attach it to a wxTreeCtrl to avoid memory leaks.

%class %noclassinfo wxTreeItemData, wxClientData
wxTreeItemData()

wxTreeItemId GetId()
void SetId(const wxTreeItemId& id)
%endclass

// ---------------------------------------------------------------------------
// wxLuaTreeItemData
//
// No %delete since the wxTreeCtrl should do it and you should only create one
// of these if you're going to attach it to a wxTreeCtrl to avoid memory leaks.

%include "wxbind/include/wxcore_wxlcore.h"

%class %noclassinfo wxLuaTreeItemData, wxTreeItemData
wxLuaTreeItemData(double value = 0)

double GetValue() const;
void SetValue(double value);
%endclass


// ---------------------------------------------------------------------------
// wxTreeEvent - wxTreeCtrl

%class %delete wxTreeEvent, wxNotifyEvent
%define_event wxEVT_COMMAND_TREE_BEGIN_DRAG // EVT_TREE_BEGIN_DRAG(id, fn)
%define_event wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT // EVT_TREE_BEGIN_LABEL_EDIT(id, fn)
%define_event wxEVT_COMMAND_TREE_BEGIN_RDRAG // EVT_TREE_BEGIN_RDRAG(id, fn)
%define_event wxEVT_COMMAND_TREE_DELETE_ITEM // EVT_TREE_DELETE_ITEM(id, fn)
%define_event wxEVT_COMMAND_TREE_END_DRAG // EVT_TREE_END_DRAG(id, fn)
%define_event wxEVT_COMMAND_TREE_END_LABEL_EDIT // EVT_TREE_END_LABEL_EDIT(id, fn)
%define_event wxEVT_COMMAND_TREE_GET_INFO // EVT_TREE_GET_INFO(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_ACTIVATED // EVT_TREE_ITEM_ACTIVATED(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_COLLAPSED // EVT_TREE_ITEM_COLLAPSED(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_COLLAPSING // EVT_TREE_ITEM_COLLAPSING(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_EXPANDED // EVT_TREE_ITEM_EXPANDED(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_EXPANDING // EVT_TREE_ITEM_EXPANDING(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK // EVT_TREE_ITEM_MIDDLE_CLICK(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK // EVT_TREE_ITEM_RIGHT_CLICK(id, fn)
%define_event wxEVT_COMMAND_TREE_KEY_DOWN // EVT_TREE_KEY_DOWN(id, fn)
%define_event wxEVT_COMMAND_TREE_SEL_CHANGED // EVT_TREE_SEL_CHANGED(id, fn)
%define_event wxEVT_COMMAND_TREE_SEL_CHANGING // EVT_TREE_SEL_CHANGING(id, fn)
%define_event wxEVT_COMMAND_TREE_SET_INFO // EVT_TREE_SET_INFO(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_MENU // EVT_TREE_ITEM_MENU(id, fn)
%define_event wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK // EVT_TREE_STATE_IMAGE_CLICK(id, fn)
%define_event wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP // EVT_TREE_ITEM_GETTOOLTIP(id, fn)

wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0)

int GetKeyCode() const
wxTreeItemId GetItem() const
wxKeyEvent GetKeyEvent() const
const wxString& GetLabel() const
wxTreeItemId GetOldItem() const
wxPoint GetPoint() const
bool IsEditCancelled() const
void SetToolTip(const wxString& tooltip)
%endclass

%endif //wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL

// ---------------------------------------------------------------------------
// wxGenericDirCtrl

%if wxLUA_USE_wxGenericDirCtrl && wxUSE_DIRDLG

%include "wx/dirctrl.h"

%enum
wxDIRCTRL_DIR_ONLY
wxDIRCTRL_SELECT_FIRST
wxDIRCTRL_SHOW_FILTERS
wxDIRCTRL_3D_INTERNAL
wxDIRCTRL_EDIT_LABELS
%endenum

%define_string wxDirDialogDefaultFolderStr

%class wxGenericDirCtrl, wxControl
wxGenericDirCtrl()
wxGenericDirCtrl(wxWindow *parent, const wxWindowID id = wxID_ANY, const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = "", int defaultFilter = 0, const wxString& name = "wxGenericDirCtrl")
bool Create(wxWindow *parent, const wxWindowID id = wxID_ANY, const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = "", int defaultFilter = 0, const wxString& name = "wxGenericDirCtrl")

void CollapseTree()
bool ExpandPath(const wxString& path)
wxString GetDefaultPath() const
wxString GetPath() const
wxString GetFilePath() const
wxString GetFilter() const
int GetFilterIndex() const
//wxDirFilterListCtrl* GetFilterListCtrl() const
wxTreeItemId GetRootId()
wxTreeCtrl* GetTreeCtrl() const
void ReCreateTree()
void SetDefaultPath(const wxString& path)
void SetFilter(const wxString& filter)
void SetFilterIndex(int n)
void SetPath(const wxString& path)
void ShowHidden( bool show )
bool GetShowHidden()

//wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done)

%endclass

%endif //wxLUA_USE_wxGenericDirCtrl && wxUSE_DIRDLG


wxwidgets/wxcore_core.i - Lua table = 'wx'


// ===========================================================================
// Purpose: Various wxCore classes
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

%if wxLUA_USE_wxLog && wxUSE_LOG

// C++ Func: void wxLogStatus(wxFrame *frame, const char *formatString, ...)
// void wxLogStatus(const char *formatString, ...) // this just uses the toplevel frame, use wx.NULL for the frame
%function void wxLogStatus(wxFrame *frame, const wxString& message)

// ---------------------------------------------------------------------------
// wxLogGui - wxWidgets creates and installs one of these at startup,
// just treat it as a wxLog.

%if wxUSE_LOGGUI

%class %delete %noclassinfo %encapsulate wxLogGui, wxLog
wxLogGui()
%endclass

%endif // wxUSE_LOGGUI

// ---------------------------------------------------------------------------
// wxLogTextCtrl

%if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL

%class %delete %noclassinfo %encapsulate wxLogTextCtrl, wxLog
wxLogTextCtrl(wxTextCtrl* textCtrl);

%endclass

%endif // wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL

// ---------------------------------------------------------------------------
// wxLogWindow

%if wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW

%class %delete %noclassinfo %encapsulate wxLogWindow, wxLogPassThrough
wxLogWindow(wxWindow *pParent, const wxString& szTitle, bool bShow = true, bool bPassToOld = true);

void Show(bool show = true)
wxFrame* GetFrame() const

//virtual void OnFrameCreate(wxFrame *frame)
//virtual bool OnFrameClose(wxFrame *frame)
//virtual void OnFrameDelete(wxFrame *frame)
%endclass

%endif // wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW

%endif // wxLUA_USE_wxLog && wxUSE_LOG


// ---------------------------------------------------------------------------
// wxSystemSettings

%if wxLUA_USE_wxSystemSettings

%include "wx/settings.h"

%enum wxSystemScreenType
wxSYS_SCREEN_NONE
wxSYS_SCREEN_TINY
wxSYS_SCREEN_PDA
wxSYS_SCREEN_SMALL
wxSYS_SCREEN_DESKTOP
%endenum

%enum wxSystemMetric
wxSYS_MOUSE_BUTTONS
wxSYS_BORDER_X
wxSYS_BORDER_Y
wxSYS_CURSOR_X
wxSYS_CURSOR_Y
wxSYS_DCLICK_X
wxSYS_DCLICK_Y
wxSYS_DRAG_X
wxSYS_DRAG_Y
wxSYS_EDGE_X
wxSYS_EDGE_Y
wxSYS_HSCROLL_ARROW_X
wxSYS_HSCROLL_ARROW_Y
wxSYS_HTHUMB_X
wxSYS_ICON_X
wxSYS_ICON_Y
wxSYS_ICONSPACING_X
wxSYS_ICONSPACING_Y
wxSYS_WINDOWMIN_X
wxSYS_WINDOWMIN_Y
wxSYS_SCREEN_X
wxSYS_SCREEN_Y
wxSYS_FRAMESIZE_X
wxSYS_FRAMESIZE_Y
wxSYS_SMALLICON_X
wxSYS_SMALLICON_Y
wxSYS_HSCROLL_Y
wxSYS_VSCROLL_X
wxSYS_VSCROLL_ARROW_X
wxSYS_VSCROLL_ARROW_Y
wxSYS_VTHUMB_Y
wxSYS_CAPTION_Y
wxSYS_MENU_Y
wxSYS_NETWORK_PRESENT
wxSYS_PENWINDOWS_PRESENT
wxSYS_SHOW_SOUNDS
wxSYS_SWAP_BUTTONS
%endenum

%enum wxSystemFeature
wxSYS_CAN_DRAW_FRAME_DECORATIONS
wxSYS_CAN_ICONIZE_FRAME
%endenum

%enum wxSystemColour
wxSYS_COLOUR_SCROLLBAR
wxSYS_COLOUR_BACKGROUND
wxSYS_COLOUR_DESKTOP
wxSYS_COLOUR_ACTIVECAPTION
wxSYS_COLOUR_INACTIVECAPTION
wxSYS_COLOUR_MENU
wxSYS_COLOUR_WINDOW
wxSYS_COLOUR_WINDOWFRAME
wxSYS_COLOUR_MENUTEXT
wxSYS_COLOUR_WINDOWTEXT
wxSYS_COLOUR_CAPTIONTEXT
wxSYS_COLOUR_ACTIVEBORDER
wxSYS_COLOUR_INACTIVEBORDER
wxSYS_COLOUR_APPWORKSPACE
wxSYS_COLOUR_HIGHLIGHT
wxSYS_COLOUR_HIGHLIGHTTEXT
wxSYS_COLOUR_BTNFACE
wxSYS_COLOUR_3DFACE
wxSYS_COLOUR_BTNSHADOW
wxSYS_COLOUR_3DSHADOW
wxSYS_COLOUR_GRAYTEXT
wxSYS_COLOUR_BTNTEXT
wxSYS_COLOUR_INACTIVECAPTIONTEXT
wxSYS_COLOUR_BTNHIGHLIGHT
wxSYS_COLOUR_BTNHILIGHT
wxSYS_COLOUR_3DHIGHLIGHT
wxSYS_COLOUR_3DHILIGHT
wxSYS_COLOUR_3DDKSHADOW
wxSYS_COLOUR_3DLIGHT
wxSYS_COLOUR_INFOTEXT
wxSYS_COLOUR_INFOBK
wxSYS_COLOUR_LISTBOX
wxSYS_COLOUR_HOTLIGHT
wxSYS_COLOUR_GRADIENTACTIVECAPTION
wxSYS_COLOUR_GRADIENTINACTIVECAPTION
wxSYS_COLOUR_MENUHILIGHT
wxSYS_COLOUR_MENUBAR
wxSYS_COLOUR_MAX
%endenum

%enum wxSystemFont
wxSYS_OEM_FIXED_FONT
wxSYS_ANSI_FIXED_FONT
wxSYS_ANSI_VAR_FONT
wxSYS_SYSTEM_FONT
wxSYS_DEVICE_DEFAULT_FONT
wxSYS_DEFAULT_PALETTE
wxSYS_SYSTEM_FIXED_FONT
wxSYS_DEFAULT_GUI_FONT
%endenum

%class %noclassinfo wxSystemSettings
//wxSystemSettings() // No constructor, all members static

static wxColour GetColour(wxSystemColour index)
static wxFont GetFont(wxSystemFont index)
static int GetMetric(wxSystemMetric index, wxWindow* win = NULL)
static bool HasFeature(wxSystemFeature index)

static wxSystemScreenType GetScreenType()
static void SetScreenType( wxSystemScreenType screen )
%endclass

%endif //wxLUA_USE_wxSystemSettings


// ---------------------------------------------------------------------------
// wxValidator

%if wxLUA_USE_wxValidator && wxUSE_VALIDATORS

%include "wx/validate.h"

%class wxValidator, wxEvtHandler
%define_object wxDefaultValidator

// No constructor as this is a base class

static bool IsSilent()
wxWindow* GetWindow() const
static void SetBellOnError(bool doIt = true)
void SetWindow(wxWindow* window)
virtual bool TransferFromWindow()
virtual bool TransferToWindow()
virtual bool Validate(wxWindow* parent)
%endclass

// ---------------------------------------------------------------------------
// wxTextValidator

%if wxLUA_USE_wxTextValidator

%include "wx/valtext.h"

%define wxFILTER_NONE
%define wxFILTER_ASCII
%define wxFILTER_ALPHA
%define wxFILTER_ALPHANUMERIC
%define wxFILTER_NUMERIC
%define wxFILTER_INCLUDE_LIST
%define wxFILTER_EXCLUDE_LIST
%define wxFILTER_INCLUDE_CHAR_LIST
%define wxFILTER_EXCLUDE_CHAR_LIST

%class %delete wxTextValidator, wxValidator
// %override wxTextValidator(long style = wxFILTER_NONE, wxLuaObject* obj)
// C++ Func: wxTextValidator(long style = wxFILTER_NONE, wxString *valPtr = NULL)
wxTextValidator(long style = wxFILTER_NONE, wxLuaObject* stringObj = NULL)

%wxchkver_2_6 wxArrayString& GetExcludes()
%wxchkver_2_6 wxArrayString& GetIncludes()
long GetStyle() const
void SetStyle(long style)
%wxchkver_2_6 void SetIncludes(const wxArrayString& includes)
%wxchkver_2_6 void SetExcludes(const wxArrayString& excludes)

//!%wxchkver_2_6|%wxcompat_2_4 wxStringList& GetExcludeList() const
//!%wxchkver_2_6|%wxcompat_2_4 wxStringList& GetIncludeList() const
//!%wxchkver_2_6|%wxcompat_2_4 void SetExcludeList(const wxStringList& stringList)
//!%wxchkver_2_6|%wxcompat_2_4 void SetIncludeList(const wxStringList& stringList)
%endclass

%endif //wxLUA_USE_wxTextValidator

// ---------------------------------------------------------------------------
// wxGenericValidator

%if wxLUA_USE_wxGenericValidator

%include "wx/valgen.h"

%class %delete wxGenericValidator, wxValidator
// See the validator.wx.Lua sample for usage of this class

// %override wxGenericValidatorBool(wxLuaObject* boolObj)
// C++ Func: wxGenericValidator(bool *boolPtr)
// for wxCheckBox and wxRadioButton
%rename wxGenericValidatorBool wxGenericValidator(wxLuaObject* boolObj)

// %override wxGenericValidatorString(wxLuaObject* stringObj)
// C++ Func: wxGenericValidator(wxString *valPtr)
// for wxButton and wxComboBox, wxStaticText and wxTextCtrl
%rename wxGenericValidatorString wxGenericValidator(wxLuaObject* stringObj)

// %override wxGenericValidatorInt(wxLuaObject* intObj)
// C++ Func: wxGenericValidator(int *valPtr)
// for wxGauge, wxScrollBar, wxRadioBox, wxSpinButton, wxChoice
%rename wxGenericValidatorInt wxGenericValidator(wxLuaObject* intObj)

// %override wxGenericValidatorArrayInt(wxLuaObject* intTableObj)
// C++ Func: wxGenericValidator(wxArrayInt *valPtr)
// for wxListBox and wxCheckListBox
%rename wxGenericValidatorArrayInt wxGenericValidator(wxLuaObject* intTableObj)

%endclass

%endif //wxLUA_USE_wxGenericValidator
%endif //wxLUA_USE_wxValidator && wxUSE_VALIDATORS


// ---------------------------------------------------------------------------
// wxMemoryFSHandler - See also wxbase_file.i for other wxFileSystemHandlers

%if wxUSE_STREAMS && wxUSE_FILESYSTEM

%include "wx/fs_mem.h"

%class %noclassinfo %delete wxMemoryFSHandler, wxFileSystemHandler
wxMemoryFSHandler()

// Remove file from memory FS and free occupied memory
static void RemoveFile(const wxString& filename);

static void AddFile(const wxString& filename, const wxString& textdata);
//static void AddFile(const wxString& filename, const void *binarydata, size_t size)

%if %wxchkver_2_8_5
static void AddFileWithMimeType(const wxString& filename, const wxString& textdata, const wxString& mimetype);
//static void AddFileWithMimeType(const wxString& filename, const void *binarydata, size_t size, const wxString& mimetype)
%endif // %wxchkver_2_8_5

%if wxUSE_IMAGE
static void AddFile(const wxString& filename, const wxImage& image, long type);
static void AddFile(const wxString& filename, const wxBitmap& bitmap, long type);
%endif // wxUSE_IMAGE

%endclass


%endif // wxUSE_STREAMS && wxUSE_FILESYSTEM


wxwidgets/wxcore_defsutils.i - Lua table = 'wx'


// ===========================================================================
// Purpose: enums, defines from wx/defs.h and other places
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

%include "wx/defs.h"
%include "wx/utils.h"

// This list of global functions is taken from the wxWindow's manual

// ---------------------------------------------------------------------------
// Application initialization and termination

%function void wxInitAllImageHandlers()
%function bool wxSafeYield(wxWindow* win = NULL, bool onlyIfNeeded = false)
%function bool wxYield()
%function void wxWakeUpIdle()

// ---------------------------------------------------------------------------
// wxProcess

%if wxLUA_USE_wxProcess

%enum
wxEXEC_ASYNC
wxEXEC_SYNC
wxEXEC_NOHIDE
wxEXEC_MAKE_GROUP_LEADER
wxEXEC_NODISABLE
%endenum

%enum
wxPROCESS_DEFAULT
wxPROCESS_REDIRECT
%endenum

%enum wxSignal
wxSIGNONE
wxSIGHUP
wxSIGINT
wxSIGQUIT
wxSIGILL
wxSIGTRAP
wxSIGABRT
wxSIGEMT
wxSIGFPE
wxSIGKILL
wxSIGBUS
wxSIGSEGV
wxSIGSYS
wxSIGPIPE
wxSIGALRM
wxSIGTERM
%endenum

%enum wxKillError
wxKILL_OK
wxKILL_BAD_SIGNAL
wxKILL_ACCESS_DENIED
wxKILL_NO_PROCESS
wxKILL_ERROR
%endenum

%enum wxKillFlags
wxKILL_NOCHILDREN
wxKILL_CHILDREN
%endenum

%class %delete %encapsulate wxProcess, wxEvtHandler
wxProcess(wxEvtHandler *parent = NULL, int nId = wxID_ANY)
//wxProcess(int flags)

void Detach()
static wxKillError Kill(int pid, wxSignal sig = wxSIGTERM, int flags = wxKILL_NOCHILDREN)
static bool Exists(int pid)
//virtual void OnTerminate(int pid, int status) just handle the event instead
static wxProcess *Open(const wxString& cmd, int flags = wxEXEC_ASYNC)
void Redirect()
bool IsRedirected()

%if wxUSE_STREAMS
void CloseOutput()
wxInputStream *GetErrorStream() const
wxInputStream *GetInputStream() const
wxOutputStream *GetOutputStream() const
bool IsErrorAvailable() const
bool IsInputAvailable() const
bool IsInputOpened() const
void SetPipeStreams(wxInputStream *outStream, wxOutputStream *inStream, wxInputStream *errStream)
%endif // wxUSE_STREAMS

%endclass

%endif //wxLUA_USE_wxProcess

// ---------------------------------------------------------------------------
// Process control functions

!%wxchkver_2_6 %function long wxExecute(const wxString& command, bool sync = false, wxProcess *callback = NULL)
%wxchkver_2_6 %function long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC, wxProcess *process = NULL)
// %override [long, Lua table of output strings] wxExecuteStdout(const wxString& command, int flags = 0)
%function %rename wxExecuteStdout long wxExecute(const wxString& command, wxArrayString& output, int flags = 0)
// %override [long, Lua table of output strings, Lua table of error strings] wxExecuteStdoutStderr(const wxString& command, int flags = 0)
%function %rename wxExecuteStdoutStderr long wxExecute(const wxString& command, wxArrayString& output, wxArrayString& errors, int flags = 0)
%function void wxExit()

// %override [int, wxKillError rc] wxKill(long pid, wxSignal sig = wxSIGTERM, int flags = 0)
// C++ Func: int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError *rc = NULL, int flags = 0)
%function int wxKill(long pid, wxSignal sig = wxSIGTERM, int flags = 0)
%function unsigned long wxGetProcessId()
%function bool wxShell(const wxString& command = "")


%enum wxShutdownFlags
wxSHUTDOWN_POWEROFF
wxSHUTDOWN_REBOOT
%endenum

%function bool wxShutdown(wxShutdownFlags flags)

// ---------------------------------------------------------------------------
// File functions - see file.i

// ---------------------------------------------------------------------------
// Network, user, and OS functions - see wxbase_base.i

// ---------------------------------------------------------------------------
// String functions - nothing useful here

// ---------------------------------------------------------------------------
// Dialog functions - see dialogs.i

//%function void wxBeginBusyCursor(wxCursor *cursor = wxLua_wxHOURGLASS_CURSOR)
//%function void wxBell()
//%function void wxEndBusyCursor()
//%function bool wxIsBusy()

// ---------------------------------------------------------------------------
// Math functions - nothing useful here

// ---------------------------------------------------------------------------
// GDI functions

// %override [int x, int y, int width, int height] wxClientDisplayRect()
// void wxClientDisplayRect(int *x, int *y, int *width, int *height)
%function void wxClientDisplayRect()

%function wxRect wxGetClientDisplayRect()
%function bool wxColourDisplay()
%function int wxDisplayDepth()
// %override [int width, int height] wxDisplaySize()
// void wxDisplaySize(int *width, int *height)
%function void wxDisplaySize()

%function wxSize wxGetDisplaySize()
// %override [int width, int height] wxDisplaySizeMM()
// void wxDisplaySizeMM(int *width, int *height)
%function void wxDisplaySizeMM()

%function wxSize wxGetDisplaySizeMM()

%function void wxSetCursor(const wxCursor &cursor)
// %function wxIconOrCursor wxDROP_ICON(wxString name)

// ---------------------------------------------------------------------------
// Printer settings - are marked obsolete

// ---------------------------------------------------------------------------
// Clipboard functions - are marked obsolete

// ---------------------------------------------------------------------------
// Miscellaneous functions

%function bool wxGetKeyState(wxKeyCode key)
%function long wxNewId()
%function void wxRegisterId(long id)
%function void wxEnableTopLevelWindows(bool enable = true)
%function int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString)
%function wxWindow* wxFindWindowByLabel(const wxString& label, wxWindow *parent=NULL)
%function wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent=NULL)
%function wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
%function wxWindow* wxFindWindowAtPointer(wxPoint& pt)
%wxchkver_2_8_4 %function wxWindow* wxGetActiveWindow()
// wxBatteryState wxGetBatteryState()
// X only %function wxString wxGetDisplayName()
// X only %function void wxSetDisplayName(const wxString& displayName)
// wxPowerType wxGetPowerType()
%function wxPoint wxGetMousePosition()

%if %wxchkver_2_8
// This is in wxWidgets 2.6 docs, but it's only in >=2.7
%class %delete %noclassinfo %encapsulate wxMouseState
wxMouseState()

wxCoord GetX()
wxCoord GetY()
bool LeftDown()
bool MiddleDown()
bool RightDown()
bool ControlDown()
bool ShiftDown()
bool AltDown()
bool MetaDown()
bool CmdDown()
void SetX(wxCoord x)
void SetY(wxCoord y)
void SetLeftDown(bool down)
void SetMiddleDown(bool down)
void SetRightDown(bool down)
void SetControlDown(bool down)
void SetShiftDown(bool down)
void SetAltDown(bool down)
void SetMetaDown(bool down)
%endclass

%function wxMouseState wxGetMouseState()
%endif

// %function bool wxGetResource(const wxString& section, const wxString& entry, const wxString& *value, const wxString& file = "")
// %function bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file = "")
// wxString wxGetStockLabel(wxWindowID id, bool withCodes = true, wxString accelerator = wxEmptyString)
%function wxWindow* wxGetTopLevelParent(wxWindow *win)
%function bool wxLaunchDefaultBrowser(const wxString& sUrl)
//%win %function wxString wxLoadUserResource(const wxString& resourceName, const wxString& resourceType="TEXT")
%function void wxPostEvent(wxEvtHandler *dest, wxEvent& event)

// ---------------------------------------------------------------------------
// Byte order macros - nothing useful

// ---------------------------------------------------------------------------
// RTTI functions - nothing useful, see wxObject:DynamicCast

// ---------------------------------------------------------------------------
// Log functions - FIXME maybe useful?

// ---------------------------------------------------------------------------
// Time functions - see datetime.i

// ---------------------------------------------------------------------------
// Debugging macros and functions - nothing useful

// ---------------------------------------------------------------------------
// Environmental access functions - see wxbase_base.i

// ---------------------------------------------------------------------------
// wxWidgets window IDs - copied from wx/defs.h

%if wxLUA_USE_wxID_XXX

%define wxID_NONE
%define wxID_SEPARATOR
%define wxID_ANY
%define wxID_LOWEST

%define wxID_OPEN
%define wxID_CLOSE
%define wxID_NEW
%define wxID_SAVE
%define wxID_SAVEAS
%define wxID_REVERT
%define wxID_EXIT
%define wxID_UNDO
%define wxID_REDO
%define wxID_HELP
%define wxID_PRINT
%define wxID_PRINT_SETUP
%wxchkver_2_8 %define wxID_PAGE_SETUP
%define wxID_PREVIEW
%define wxID_ABOUT
%define wxID_HELP_CONTENTS
%wxchkver_2_8 %define wxID_HELP_INDEX
%wxchkver_2_8 %define wxID_HELP_SEARCH
%define wxID_HELP_COMMANDS
%define wxID_HELP_PROCEDURES
%define wxID_HELP_CONTEXT
%define wxID_CLOSE_ALL
%define wxID_PREFERENCES

%wxchkver_2_8 %define wxID_EDIT
%define wxID_CUT
%define wxID_COPY
%define wxID_PASTE
%define wxID_CLEAR
%define wxID_FIND
%define wxID_DUPLICATE
%define wxID_SELECTALL
%define wxID_DELETE
%define wxID_REPLACE
%define wxID_REPLACE_ALL
%define wxID_PROPERTIES

%define wxID_VIEW_DETAILS
%define wxID_VIEW_LARGEICONS
%define wxID_VIEW_SMALLICONS
%define wxID_VIEW_LIST
%define wxID_VIEW_SORTDATE
%define wxID_VIEW_SORTNAME
%define wxID_VIEW_SORTSIZE
%define wxID_VIEW_SORTTYPE

%wxchkver_2_8 %define wxID_FILE
%define wxID_FILE1
%define wxID_FILE2
%define wxID_FILE3
%define wxID_FILE4
%define wxID_FILE5
%define wxID_FILE6
%define wxID_FILE7
%define wxID_FILE8
%define wxID_FILE9

%define wxID_OK
%define wxID_CANCEL
%define wxID_APPLY
%define wxID_YES
%define wxID_NO
%define wxID_STATIC
%define wxID_FORWARD
%define wxID_BACKWARD
%define wxID_DEFAULT
%define wxID_MORE
%define wxID_SETUP
%define wxID_RESET
%define wxID_CONTEXT_HELP
%define wxID_YESTOALL
%define wxID_NOTOALL
%define wxID_ABORT
%define wxID_RETRY
%define wxID_IGNORE
%define wxID_ADD
%define wxID_REMOVE

%define wxID_UP
%define wxID_DOWN
%define wxID_HOME
%define wxID_REFRESH
%define wxID_STOP
%define wxID_INDEX

%define wxID_BOLD
%define wxID_ITALIC
%define wxID_JUSTIFY_CENTER
%define wxID_JUSTIFY_FILL
%define wxID_JUSTIFY_RIGHT
%define wxID_JUSTIFY_LEFT
%define wxID_UNDERLINE
%define wxID_INDENT
%define wxID_UNINDENT
%define wxID_ZOOM_100
%define wxID_ZOOM_FIT
%define wxID_ZOOM_IN
%define wxID_ZOOM_OUT
%define wxID_UNDELETE
%define wxID_REVERT_TO_SAVED

%define wxID_SYSTEM_MENU
%define wxID_CLOSE_FRAME
%define wxID_MOVE_FRAME
%define wxID_RESIZE_FRAME
%define wxID_MAXIMIZE_FRAME
%define wxID_ICONIZE_FRAME
%define wxID_RESTORE_FRAME

// %define wxID_FILEDLGG - probably not useful

%define wxID_HIGHEST

%endif //wxLUA_USE_wxID_XXX

// ---------------------------------------------------------------------------
// Generic defines and enums

%define wxBACKINGSTORE
%define wxBACKWARD
%define wxCANCEL
%define wxCENTER
%define wxCENTER_FRAME
%define wxCENTER_ON_SCREEN
%define wxCENTRE
%define wxCENTRE_ON_SCREEN
%define wxCOLOURED
//%define wxED_BUTTONS_BOTTOM // for wxExtDialog? not used?
//%define wxED_BUTTONS_RIGHT
//%define wxED_CLIENT_MARGIN
//%define wxED_STATIC_LINE
%define wxFIXED_LENGTH
%define wxFORWARD
%define wxHELP
%define wxMORE
%define wxNO
%define wxNO_BORDER
%define wxNO_DEFAULT
%define wxOK
%define wxPASSWORD
%define wxPROCESS_ENTER
%define wxRESET
%define wxRESIZE_BOX
%define wxRETAINED
%define wxSETUP
%define wxSIZE_ALLOW_MINUS_ONE
%define wxSIZE_AUTO
%define wxSIZE_AUTO_HEIGHT
%define wxSIZE_AUTO_WIDTH
%define wxSIZE_NO_ADJUSTMENTS
%define wxSIZE_USE_EXISTING
//%define wxUSER_COLOURS deprecated use wxNO_3D
%define wxYES
%define wxYES_DEFAULT
%define wxYES_NO

%enum wxOrientation
wxHORIZONTAL
wxVERTICAL
wxBOTH
%endenum

%enum wxDirection
wxLEFT
wxRIGHT
wxUP
wxDOWN
wxTOP
wxBOTTOM
wxNORTH
wxSOUTH
wxWEST
wxEAST
wxALL
%endenum

%enum wxAlignment
wxALIGN_NOT
wxALIGN_CENTER_HORIZONTAL
wxALIGN_CENTRE_HORIZONTAL
wxALIGN_LEFT
wxALIGN_TOP
wxALIGN_RIGHT
wxALIGN_BOTTOM
wxALIGN_CENTER_VERTICAL
wxALIGN_CENTRE_VERTICAL
wxALIGN_CENTER
wxALIGN_CENTRE
wxALIGN_MASK
%endenum

%enum wxStretch
wxSTRETCH_NOT
wxSHRINK
wxGROW
wxEXPAND
wxSHAPED
wxTILE

wxADJUST_MINSIZE // deprecated after 2.4 and takes the value of 0

%wxchkver_2_8_8 wxFIXED_MINSIZE
%wxchkver_2_8_8 wxRESERVE_SPACE_EVEN_IF_HIDDEN
%endenum

%enum wxBorder
wxBORDER_DEFAULT
wxBORDER_NONE
wxBORDER_STATIC
wxBORDER_SIMPLE
wxBORDER_RAISED
wxBORDER_SUNKEN
wxBORDER_DOUBLE
wxBORDER_MASK
%endenum

%enum wxBackgroundStyle
wxBG_STYLE_SYSTEM
wxBG_STYLE_COLOUR
wxBG_STYLE_CUSTOM
%endenum

%if wxUSE_HOTKEY
%enum wxHotkeyModifier
wxMOD_NONE
wxMOD_ALT
wxMOD_CONTROL
%wxchkver_2_8 wxMOD_ALTGR
wxMOD_SHIFT
%wxchkver_2_8 wxMOD_META
wxMOD_WIN
%wxchkver_2_8 wxMOD_CMD
%wxchkver_2_8 wxMOD_ALL
%endenum
%endif

// ---------------------------------------------------------------------------
// wxBusyCursor

%if wxLUA_USE_wxBusyCursor

%include "wx/utils.h"

%class %delete %noclassinfo %encapsulate wxBusyCursor
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR)
%endclass

// ---------------------------------------------------------------------------
// wxBusyCursorSuspender - we don't wrap this since Lua's garbage collector doesn't
// automatically collect items when they go out of scope so you would have to
// delete() this anyway which is just as easy as wxBegin/EndBusyCursor

//%class %delete %noclassinfo %encapsulate wxBusyCursorSuspender
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
// wxBusyCursorSuspender()

//%endclass

%endif //wxLUA_USE_wxBusyCursor

// ---------------------------------------------------------------------------
// wxBusyInfo

%if wxLUA_USE_wxBusyInfo && wxUSE_BUSYINFO

%include "wx/busyinfo.h"

%class %delete %noclassinfo wxBusyInfo, wxObject
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxBusyInfo(const wxString& message, wxWindow *parent = NULL)
%endclass

%endif //wxLUA_USE_wxBusyInfo && wxUSE_BUSYINFO

// ---------------------------------------------------------------------------
// wxTimer

%if wxLUA_USE_wxTimer && wxUSE_TIMER

%include "wx/timer.h"

%define wxTIMER_CONTINUOUS
%define wxTIMER_ONE_SHOT

%class %delete wxTimer, wxEvtHandler
wxTimer(wxEvtHandler *owner, int id = -1)

int GetInterval() const
bool IsOneShot() const
bool IsRunning() const
void Notify()
void SetOwner(wxEvtHandler *owner, int id = -1)
bool Start(int milliseconds = -1, bool oneShot = false)
void Stop()
%endclass

// ---------------------------------------------------------------------------
// wxTimerEvent

%include "wx/timer.h"

%class %delete wxTimerEvent, wxEvent
%define_event wxEVT_TIMER // EVT_TIMER(id, fn)

int GetInterval() const
%endclass

%endif //wxLUA_USE_wxTimer && wxUSE_TIMER


wxwidgets/wxcore_dialogs.i - Lua table = 'wx'


// ===========================================================================
// Purpose: wxDialog and all dialog classes and functions
// Author: J Winwood, John Labenski
// Created: 14/11/2001
// Copyright: (c) 2001-2002 Lomtick Software. All rights reserved.
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================


%define wxICON_ASTERISK
%define wxICON_ERROR
%define wxICON_EXCLAMATION
%define wxICON_HAND
%define wxICON_INFORMATION
%define wxICON_MASK
%define wxICON_QUESTION
%define wxICON_STOP
%define wxICON_WARNING

%if %wxcompat_2_6
%enum // for wxFileSelector and wxFileDialog
wxOPEN
wxSAVE
wxOVERWRITE_PROMPT
%wxcompat_2_4 wxHIDE_READONLY
wxFILE_MUST_EXIST
wxMULTIPLE
wxCHANGE_DIR
%endenum
%endif //%wxcompat_2_6

%if %wxchkver_2_8
%enum
wxFD_OPEN
wxFD_SAVE
wxFD_OVERWRITE_PROMPT
wxFD_FILE_MUST_EXIST
wxFD_MULTIPLE
wxFD_CHANGE_DIR
wxFD_PREVIEW

wxFD_DEFAULT_STYLE
%endenum
%endif //%wxchkver_2_8

// ---------------------------------------------------------------------------
// Dialog functions from wxWidgets functions documentation

%function void wxBeginBusyCursor(wxCursor *cursor = wxLua_wxHOURGLASS_CURSOR)
%function void wxEndBusyCursor()
%function void wxBell()
// %function wxTipProvider* wxCreateFileTipProvider(const wxString& filename, size_t currentTip)

%define_string wxDirSelectorPromptStr wxT("Select a directory")
%function wxString wxDirSelector(const wxString& message = wxDirSelectorPromptStr, const wxString& default_path = "", long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, wxWindow *parent = NULL)
%function wxString wxFileSelector(const wxString& message, const wxString& default_path = "", const wxString& default_filename = "", const wxString& default_extension = "", const wxString& wildcard = "*.*", int flags = 0, wxWindow *parent = NULL, int x = -1, int y = -1)
wxUSE_COLOURDLG&&!%wxchkver_2_8 %function wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit)
wxUSE_COLOURDLG&&%wxchkver_2_8 %function wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit, const wxString& caption = "")
!%wxchkver_2_8&&wxUSE_FONTDLG %function wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit)
%wxchkver_2_8&&wxUSE_FONTDLG %function wxFont wxGetFontFromUser(wxWindow *parent = NULL, const wxFont& fontInit = wxNullFont, const wxString& caption = "")
// %override [int, Lua int table] wxGetMultipleChoices(const wxString& message, const wxString& caption, Lua string table, wxWindow *parent = NULL, int x = -1, int y = -1, bool centre = true, int width=150, int height=200)
// int wxGetMultipleChoices(const wxString& message, const wxString& caption, int n, const wxString choices[], int nsel, int *selection, wxWindow *parent = NULL, int x = -1, int y = -1, bool centre = true, int width=150, int height=200)
wxUSE_CHOICEDLG %function int wxGetMultipleChoices(const wxString& message, const wxString& caption, LuaTable strTable, wxWindow *parent = NULL, int x = -1, int y = -1, bool centre = true, int width=150, int height=200)

%if wxUSE_NUMBERDLG
%wxchkver_2_6 %include "wx/numdlg.h" // FIXME not in 2.4
%function long wxGetNumberFromUser(const wxString& message, const wxString& prompt, const wxString& caption, long value, long min = 0, long max = 100, wxWindow *parent = NULL, const wxPoint& pos = wxDefaultPosition)
%endif // wxUSE_NUMBERDLG

wxUSE_TEXTDLG %function wxString wxGetPasswordFromUser(const wxString& message, const wxString& caption = "Input text", const wxString& default_value = "", wxWindow *parent = NULL)
wxUSE_TEXTDLG %function wxString wxGetTextFromUser(const wxString& message, const wxString& caption = "Input text", const wxString& default_value = "", wxWindow *parent = NULL, int x = -1, int y = -1, bool centre = true)
// int wxGetMultipleChoice(const wxString& message, const wxString& caption, int n, const wxString& choices[], int nsel, int *selection, wxWindow *parent = NULL, int x = -1, int y = -1, bool centre = true, int width=150, int height=200)
wxUSE_CHOICEDLG %function wxString wxGetSingleChoice(const wxString& message, const wxString& caption, const wxArrayString& choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT)
wxUSE_CHOICEDLG %function int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, const wxArrayString& choices, wxWindow *parent = NULL, int x = wxDefaultCoord, int y = wxDefaultCoord, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT)
%function bool wxIsBusy()
%function int wxMessageBox(const wxString& message, const wxString& caption = "Message", int style = wxOK | wxCENTRE, wxWindow *parent = NULL, int x = -1, int y = -1)
// bool wxShowTip(wxWindow *parent, wxTipProvider *tipProvider, bool showAtStartup = true)

// ---------------------------------------------------------------------------
// wxDialog

%if wxLUA_USE_wxDialog

%include "wx/dialog.h"

%define wxDIALOG_MODAL
%define wxDIALOG_MODELESS
%define wxDEFAULT_DIALOG_STYLE
%define wxDIALOG_NO_PARENT
%define wxDIALOG_EX_CONTEXTHELP
// %define wxDIALOG_EX_METAL mac only
%define wxCHOICEDLG_STYLE

%class wxDialog, wxTopLevelWindow
wxDialog()
wxDialog(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog")
bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog")

//void Centre(int direction = wxBOTH) - see wxWindow
wxUSE_BUTTON wxSizer* CreateButtonSizer(long flags)
%wxchkver_2_8&&wxUSE_BUTTON wxSizer *CreateSeparatedButtonSizer(long flags)
wxUSE_BUTTON wxStdDialogButtonSizer* CreateStdDialogButtonSizer(long flags)
wxUSE_STATTEXT wxSizer *CreateTextSizer( const wxString &message )
// virtual bool DoOK() - pocketpc only
void EndModal(int retCode)
// int GetAffirmativeId() const - pocketpc only
int GetReturnCode()
// wxString GetTitle() const - see wxToplevelWindow
//void Iconize(bool iconize) - in wxToplevelWindow
//bool IsIconized() const - in wxToplevelWindow
bool IsModal() const
//void SetAffirmativeId(int affirmativeId)
// void SetIcon(const wxIcon& icon) - in wxToplevelWindow
// void SetModal(const bool flag) - deprecated
void SetReturnCode(int retCode)
// void SetTitle(const wxString& title) - in wxToplevelWindow
// bool Show(const bool show) - see wxWindow
int ShowModal()
%endclass

%endif // wxLUA_USE_wxDialog


// ---------------------------------------------------------------------------
// wxColourDialog

%if wxLUA_USE_wxColourDialog && wxUSE_COLOURDLG

%include "wx/colordlg.h"

%class wxColourDialog, wxDialog
wxColourDialog(wxWindow* parent, wxColourData* data = NULL)
//bool Create(wxWindow* parent, wxColourData* data = NULL)

wxColourData& GetColourData()
//int ShowModal() - in wxDialog
%endclass

// ------------------------------------------