wxLua 2.8.12.2 Reference Manual for wxWidgets 2.8.12

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  
wxAuiDefaultToolBarArt   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  
wxAuiToolBar   X  
wxAuiToolBarArt   X  
wxAuiToolBarEvent   X  
wxAuiToolBarItem   X  
wxAuiToolBarItemArray   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  
wxDateTime::TimeZone   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 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  
wxItemContainer   X  
wxItemContainerImmutable   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  
wxLuaDataObjectSimple   X  
wxLuaDebuggerEvent   X  
wxLuaDebuggerServer   X  
wxLuaEvent   X  
wxLuaFileDropTarget   X  
wxLuaGridTableBase   X  
wxLuaHtmlWinTagEvent   X  
wxLuaHtmlWindow   X  
wxLuaObject   X  
wxLuaPrintout   X  
wxLuaState   X  
wxLuaTextDropTarget   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  
wxPopupTransientWindow   X  
wxPopupWindow   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  
wxSizerItemList   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
wxString::const_iterator   X  
wxString::iterator   X  
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 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  
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  
wxWrapSizer   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
wxAuiToolBarArtSetting
wxAuiToolBarStyle
wxAuiToolBarToolTextOrientation
wxBackgroundStyle
wxBatteryState
wxBitmapType
wxBorder
wxCalendarDateBorder
wxCalendarHitTestResult
wxCheckBoxState
wxConfigBase::EntryType
wxDLFlags
wxDataFormatId
wxDataObject::Direction
wxDateTime::Calendar
wxDateTime::Country
wxDateTime::Month
wxDateTime::NameFlags
wxDateTime::TZ
wxDateTime::WeekDay
wxDateTime::WeekFlags
wxDateTime::Year
wxDirTraverseResult
wxDirection
wxDragResult
wxDuplexMode
wxDynamicLibraryCategory
wxEOL
wxEdge
wxEndianness
wxFTP::TransferMode
wxFile::OpenMode
wxFile::dummy
wxFileKind
wxFindReplaceDialogStyles
wxFindReplaceFlags
wxFlexSizerGrowMode
wxFloodFillStyle
wxFontEncoding
wxFontFamily
wxFontStyle
wxFontWeight
wxGrid::wxGridSelectionModes
wxGridCellAttr::wxAttrKind
wxGridTableRequest
wxHeaderSortIconType
wxHelpEvent::Origin
wxHelpSearchMode
wxHtmlWindowInterface::HTMLCursor
wxIdleMode
wxImageResizeQuality
wxItemKind
wxKeyCode
wxKeyModifier
wxKeyType
wxKillError
wxKillFlags
wxLanguage
wxLayoutAlignment
wxLayoutDirection
wxLayoutOrientation
wxListColumnFormat
wxLocaleCategory
wxLocaleInfo
wxLocaleInitFlags
wxLuaMethod_Type
wxLuaObject_Type
wxMappingMode
wxMediaCtrlPlayerControls
wxMediaState
wxNavigationKeyEvent::dummy
wxOperatingSystemId
wxOrientation
wxOutCode
wxPaperSize
wxPathFormat
wxPathNormalize
wxPenCap
wxPenJoin
wxPenStyle
wxPluginCategory
wxPolygonFillMode
wxPortId
wxPowerType
wxPrintBin
wxPrintMode
wxPrintQuality
wxPrinterError
wxProtocolError
wxRasterOperationMode
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
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
wxlua_debugger/wxluadebugger.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_wxstring wxVERSION_STRING

bool wxCHECK_VERSION(int major, int minor, int release); // actually a define
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
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
};
#endif // !%wxchkver_2_8

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

wxString wxGetUserHome(const wxString& user = "" );
wxString wxGetUserId( );
wxString wxGetUserName( );

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

// %override [bool lua_string] wxGetEnv(const wxString& var );
// Returns success and the string environment variable.
// C++ Func: bool wxGetEnv(const wxString& var, wxString *value );
bool wxGetEnv(const wxString& var );
bool wxSetEnv(const wxString& var, const wxString& value );
bool wxUnsetEnv(const wxString& var );


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

#if wxLUA_USE_wxSystemOptions

#include "wx/sysopt.h"

class wxSystemOptions : public 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
};

#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
};

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
!%wxchkver_2_9 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
!%wxchkver_2_9 wxPORT_PALMOS, // wxPalmOS, toolkit is PalmOS API
wxPORT_DFB // wxDFB, using wxUniversal
};

enum wxArchitecture
{
wxARCH_INVALID, // returned on error

wxARCH_32, // 32 bit
wxARCH_64,

wxARCH_MAX
};

enum wxEndianness
{
wxENDIAN_INVALID, // returned on error

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

wxENDIAN_MAX
};

class 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;
};


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

#if wxUSE_SNGLINST_CHECKER

#include "wx/snglinst.h"

class %delete 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?
};

#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
unsigned long wxSysErrorCode( );
wxString wxSysErrorMsg(unsigned long nErrCode = 0 );

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, ... );
void wxLogError(const wxString& message );
// C++ Func: void wxLogFatalError(const char *formatString, ... );
void wxLogFatalError(const wxString& message );
// C++ Func: void wxLogWarning(const char *formatString, ... );
void wxLogWarning(const wxString& message );
// C++ Func: void wxLogMessage(const char *formatString, ... );
void wxLogMessage(const wxString& message );
// C++ Func: void wxLogVerbose(const char *formatString, ... );
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 void wxLogStatus(wxFrame *frame, const wxString& message );

// C++ Func: void wxLogSysError(const char *formatString, ... );
void wxLogSysError(const wxString& message );
// C++ Func: void wxLogDebug(const char *formatString, ... );
void wxLogDebug(const wxString& message );
// C++ Func: void wxLogTrace(const char *mask, const char *formatString, ... );
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
};

// 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_wxstring wxTRACE_MemAlloc //wxT("memalloc"); // trace memory allocation (new/delete );
#define_wxstring wxTRACE_Messages //wxT("messages"); // trace window messages/X callbacks
#define_wxstring wxTRACE_ResAlloc //wxT("resalloc"); // trace GDI resource allocation
#define_wxstring wxTRACE_RefCount //wxT("refcount"); // trace various ref counting operations
%msw #define_wxstring wxTRACE_OleCalls //wxT("ole"); // OLE interface calls

class %delete 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 wxArrayString GetTraceMasks(); // not const wxArrayString since we copy it anyway

// %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( );
};

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

class %delete wxLogBuffer : public wxLog
{
wxLogBuffer( );

const wxString& GetBuffer() const; // get the string contents with all messages logged
};

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

class %delete wxLogChain : public 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;
};

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

class %delete wxLogNull // NOTE: this is not derived from wxLog
{
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxLogNull( );
};

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

class %delete wxLogPassThrough : public wxLogChain
{
wxLogPassThrough( );
};

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

/*
class %delete wxLogStderr : public wxLog
{
wxLogStderr(FILE *fp = (FILE *) NULL); // redirect log output to a FILE
};
*/


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

/*
#if wxUSE_STD_IOSTREAM

class %delete wxLogStream : public wxLog
{
wxLogStream(wxSTD ostream *ostr = NULL); // redirect log output to an ostream
};

#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
};

enum wxDynamicLibraryCategory
{
wxDL_LIBRARY, // standard library
wxDL_MODULE // loadable module/plugin
};

enum wxPluginCategory
{
wxDL_PLUGIN_GUI, // plugin that uses GUI classes
wxDL_PLUGIN_BASE // wxBase-only plugin
};


class %delete 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 );
};

class %delete wxDynamicLibraryDetailsArray
{
//wxDynamicLibraryDetailsArray(); // Get this from wxDynamicLibrary::ListLoaded

int GetCount() const;
wxDynamicLibraryDetails Item( int n );
};


class %delete 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( );
};

// ---------------------------------------------------------------------------
// 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 wxCriticalSection
{
wxCriticalSection( );
void Enter( );
void Leave( );
};

#endif // wxLUA_USE_wxCriticalSection


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

#if wxLUA_USE_wxCriticalSectionLocker

#include "wx/thread.h"

class %delete wxCriticalSectionLocker
{
wxCriticalSectionLocker(wxCriticalSection& cs);
};

#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
};

enum
{
wxRE_NOTBOL,
wxRE_NOTEOL
};

class %delete 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;
};

#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
};

enum wxConfigBase::EntryType
{
Type_Unknown,
Type_String,
Type_Boolean,
Type_Integer,
Type_Float
};

class %delete 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 );
};

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

class %delete wxConfig : public wxConfigBase
{
wxConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = 0 );
};

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

class %delete wxFileConfig : public 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 );
};

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

#include "wx/memconf.h"

class %delete wxMemoryConfig : public wxFileConfig
{
wxMemoryConfig( );
};

// ---------------------------------------------------------------------------
// 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 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( );
};

#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 wxString
{
wxString(const wxString& str = "" );

wxString GetData() const;

wxString AfterFirst(wxChar ch) const;
wxString AfterLast(wxChar ch) const;
wxString BeforeFirst(wxChar ch) const;
wxString BeforeLast(wxChar ch) const;

size_t Len() const;

const wxCharBuffer ToUTF8() const;
static wxString FromUTF8(const char* s );

#if %wxchkver_2_9
//wxString(wxString::const_iterator first, wxString::const_iterator last );
wxString::const_iterator begin() const;
wxString::iterator begin( );
wxString::const_iterator end() const;
wxString::iterator end( );
#endif
};

// ---------------------------------------------------------------------------
// wxString::const_iterator - A wxString iterator class

// wxWidgets has wxString iterators in < 2.9, but they are #if wxUSE_STL
// so they are not necessary for anything, in 2.9 they are inputs to some functions.

#if %wxchkver_2_9

class %delete wxString::const_iterator
{
wxString::const_iterator( );
wxString::const_iterator(const wxString::const_iterator& i );
wxString::const_iterator(const wxString::iterator& i );

//wxUniChar operator*() const;
char operator*() const;

wxString::const_iterator& operator=(const wxString::const_iterator& i );
wxString::const_iterator operator+(ptrdiff_t n) const;
wxString::const_iterator operator-(ptrdiff_t n) const;
};

// ---------------------------------------------------------------------------
// wxString::iterator - A wxString iterator class

class %delete wxString::iterator
{
wxString::iterator( );
wxString::iterator(const wxString::iterator& i );

//wxUniChar operator*() const;
char operator*() const;

wxString::iterator& operator=(const wxString::iterator& i );
wxString::iterator operator+(ptrdiff_t n) const;
wxString::iterator operator-(ptrdiff_t n) const;
};

#endif

// ---------------------------------------------------------------------------
// 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 );
};

class %delete wxStringTokenizer : public 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;
};

// ---------------------------------------------------------------------------
// 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
//};

class wxClientData
{
// declare this as a datatype, but there is nothing we can do with this as
// it must be derived, see wxStringClientData
};

// ---------------------------------------------------------------------------
// 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 wxStringClientData : public wxClientData
{
wxStringClientData(const wxString& data = "" );

wxString GetData() const;
void SetData(const wxString& data );
};

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

class 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
};

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

#if wxLUA_USE_wxObject

#include "wx/object.h"

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( );

//wxObject& operator=(const wxObject& other );
};

class wxObjectRefData // no %delete since this should be from a wxObject
{
int GetRefCount() const;
};

#endif //wxLUA_USE_wxObject

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

#if wxLUA_USE_wxClassInfo

#include "wx/object.h"

class 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;
};

#endif //wxLUA_USE_wxClassInfo


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

#if wxLUA_USE_wxList && !wxUSE_STL

#include "wx/list.h"

enum wxKeyType
{
wxKEY_NONE,
wxKEY_INTEGER,
wxKEY_STRING
};

class %delete wxList // not derived from wxObject in 2.9
{
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 );
};

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

class 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 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() );
};

#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 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( );
//};

// ---------------------------------------------------------------------------
// 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 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( );

int operator[](size_t nIndex );
};

#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 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 );

wxString& operator[](size_t nIndex );
};

// ---------------------------------------------------------------------------
// 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 wxSortedArrayString : public wxArrayString
{
wxSortedArrayString( );
wxSortedArrayString(const wxArrayString& src); // have to have this constructor since they're not actually derived
wxSortedArrayString(const wxSortedArrayString& src );
};

#endif //wxLUA_USE_wxArrayString

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

//#if wxLUA_USE_wxStringList
//%include "wx/list.h"
//class wxStringList : public wxList
//{
// wxStringList( );
// wxNode *Add(const wxString& s );
// void Clear( );
// void Delete(const wxString& s );
// bool Member(const wxString& s );
// void Sort( );
//};
//#endif wxLUA_USE_wxStringList

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

//#if wxLUA_USE_wxHashTable

//%include "wx/hash.h"

//#if %wxchkver_2_6
//class wxHashTable::Node
//{
//};
//#endif

//class wxHashTable : public 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;
//};

//#endif wxLUA_USE_wxHashTable

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

#if wxUSE_LONGLONG

#include "wx/longlong.h"

class %delete 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;

//wxLongLong operator+(const wxLongLong& ll) const;
//wxLongLong& operator+(const wxLongLong& ll );
//wxLongLong& operator++( );
//wxLongLong operator-() const;
//wxLongLong operator-(const wxLongLong& ll) const;
};

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

class %delete wxULongLong
{
wxULongLong(unsigned long hi = 0, unsigned long lo = 0 );

unsigned long GetHi() const;
unsigned long GetLo() const;
long ToULong() const;
wxString ToString() const;
};

#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"

wxString wxNow( );
long wxGetLocalTime( );
long wxGetUTCTime( );
wxLongLong wxGetLocalTimeMillis( );
%wxcompat_2_6 void wxStartTimer(); // deprecated in 2.8 use wxStopWatch
%wxcompat_2_6 long wxGetElapsedTime(bool resetTimer = true); // deprecated in 2.8 use wxStopWatch
void wxSleep(int secs );
%wxchkver_2_6 void wxMilliSleep(unsigned long milliseconds );
%wxchkver_2_6 void wxMicroSleep(unsigned long microseconds );
!%wxchkver_2_6 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
};

enum wxDateTime::Calendar
{
Gregorian,
Julian
};

enum wxDateTime::Country
{
Country_Unknown,
Country_Default,
Country_WesternEurope_Start,
Country_EEC,
France,
Germany,
UK,
Country_WesternEurope_End,
Russia,
USA
};

enum wxDateTime::Month
{
Jan,
Feb,
Mar,
Apr,
May,
Jun,
Jul,
Aug,
Sep,
Oct,
Nov,
Dec,
Inv_Month
};

enum wxDateTime::WeekDay
{
Sun,
Mon,
Tue,
Wed,
Thu,
Fri,
Sat,
Inv_WeekDay
};

enum wxDateTime::Year
{
Inv_Year
};

enum wxDateTime::NameFlags
{
Name_Full,
Name_Abbr
};

enum wxDateTime::WeekFlags
{
Default_First,
Monday_First,
Sunday_First
};

class %delete wxDateTime::TimeZone
{
wxDateTime::TimeZone(wxDateTime::TZ tz );

static wxDateTime::TimeZone Make(long offset );
long GetOffset() const;
};


typedef unsigned short wxDateTime::wxDateTime_t

class %delete wxDateTime
{
#define_object wxDefaultDateTime

static void SetCountry(wxDateTime::Country country );
static wxDateTime::Country GetCountry( );
static bool IsWestEuropeanCountry(wxDateTime::Country country = wxDateTime::Country_Default );

static int GetCurrentYear(wxDateTime::Calendar cal = wxDateTime::Gregorian );
static int ConvertYearToBC(int year );
static wxDateTime::Month GetCurrentMonth(wxDateTime::Calendar cal = wxDateTime::Gregorian );
static bool IsLeapYear(int year = wxDateTime::Inv_Year, wxDateTime::Calendar cal = wxDateTime::Gregorian );
static int GetCentury(int year );
static wxDateTime::wxDateTime_t GetNumberOfDays(int year, wxDateTime::Calendar cal = wxDateTime::Gregorian );
static wxDateTime::wxDateTime_t GetNumberOfDays(wxDateTime::Month month, int year = wxDateTime::Inv_Year, wxDateTime::Calendar cal = wxDateTime::Gregorian );
static wxString GetMonthName(wxDateTime::Month month, wxDateTime::NameFlags flags = wxDateTime::Name_Full );
static wxString GetWeekDayName(wxDateTime::WeekDay weekday, wxDateTime::NameFlags flags = wxDateTime::Name_Full );
//static void GetAmPmStrings(wxString *am, wxString *pm );
static bool IsDSTApplicable(int year = wxDateTime::Inv_Year, wxDateTime::Country country = wxDateTime::Country_Default );
static wxDateTime GetBeginDST(int year = wxDateTime::Inv_Year, wxDateTime::Country country = wxDateTime::Country_Default );
static wxDateTime GetEndDST(int year = wxDateTime::Inv_Year, wxDateTime::Country country = wxDateTime::Country_Default );
static wxDateTime Now( );
static wxDateTime UNow( );
static wxDateTime Today( );


wxDateTime( );
wxDateTime(const wxDateTime& dateTime );
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 GetDateOnly() const;
wxDateTime& SetYear(int year );
wxDateTime& SetMonth(wxDateTime::Month month );
wxDateTime& SetDay(int day );
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 ToTimezone(const wxDateTime::TimeZone& tz, bool noDST = false) const;
wxDateTime& MakeTimezone(const wxDateTime::TimeZone& tz, bool noDST = false );
wxDateTime FromTimezone(const wxDateTime::TimeZone& tz, bool noDST = false) const;
wxDateTime& MakeFromTimezone(const wxDateTime::TimeZone& tz, bool noDST = false );

wxDateTime ToUTC(bool noDST = false) const;
wxDateTime& MakeUTC(bool noDST = false );
wxDateTime ToGMT(bool noDST = false) const;
wxDateTime& MakeGMT(bool noDST = false );
wxDateTime FromUTC(bool noDST = false) const;
wxDateTime& MakeFromUTC(bool noDST = false );
int IsDST(wxDateTime::Country country = wxDateTime::Country_Default) const;

bool IsValid() const;
//Tm GetTm(const wxDateTime::TimeZone& tz = wxDateTime::Local) const;
time_t GetTicks() const;
int GetCentury(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
int GetYear(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::Month GetMonth(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::wxDateTime_t GetDay(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::WeekDay GetWeekDay(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::wxDateTime_t GetHour(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::wxDateTime_t GetMinute(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::wxDateTime_t GetSecond(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::wxDateTime_t GetMillisecond(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;

wxDateTime::wxDateTime_t GetDayOfYear(const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::wxDateTime_t GetWeekOfYear(wxDateTime::WeekFlags flags = wxDateTime::Monday_First, const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
wxDateTime::wxDateTime_t GetWeekOfMonth(wxDateTime::WeekFlags flags = wxDateTime::Monday_First, const wxDateTime::TimeZone& tz = wxLua_wxDateTime_TimeZone_Local) const;
bool IsWorkDay(wxDateTime::Country country = wxDateTime::Country_Default) const;
//bool IsGregorianDate(GregorianAdoption country = Gr_Standard) const;

wxDateTime& SetFromDOS(unsigned long ddt);
unsigned long GetAsDOS() 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 operator<(const wxDateTime& dt) const;
bool operator<=(const wxDateTime& dt) const;
bool operator>(const wxDateTime& dt) const;
bool operator>=(const wxDateTime& dt) const;
bool operator==(const wxDateTime& dt) const;
bool operator!=(const wxDateTime& dt) const;

wxDateTime& Add(const wxTimeSpan& diff );
wxDateTime& Add(const wxDateSpan& diff );
wxDateTime& Subtract(const wxTimeSpan& diff );
wxDateTime& Subtract(const wxDateSpan& diff );

// ALL of the ParseXXX() functions in wx29 that take a 'wxString::const_iterator *end'
// return the remainder of the input string after the error occurred if possible or
// the whole string. Only a bool value of true is returned on success.

// %override [bool, lua String remainder on error] ParseRfc822Date(const wxString& date );
// C++ Func: bool ParseRfc822Date(const wxString& date, wxString::const_iterator *end );
%wxchkver_2_9 bool ParseRfc822Date(const wxString& date );
// %override [bool, lua String remainder on error] ParseFormat(const wxString& date, wxString format, const wxDateTime& dateDef );
// C++ Func: bool ParseFormat(const wxString& date, wxString format, const wxDateTime& dateDef, wxString::const_iterator *end );
%wxchkver_2_9 bool ParseFormat(const wxString& date, wxString format, const wxDateTime& dateDef );
// %override [bool, lua String remainder on error] ParseFormat(const wxString& date, wxString format );
// C++ Func: bool ParseFormat(const wxString& date, wxString format, wxString::const_iterator *end );
%wxchkver_2_9 bool ParseFormat(const wxString& date, wxString format );
// %override [bool, lua String remainder on error] ParseFormat(const wxString& date );
// C++ Func: bool ParseFormat(const wxString& date, wxString::const_iterator *end );
%wxchkver_2_9 bool ParseFormat(const wxString& date );
// %override [bool, lua String remainder on error] ParseDateTime(const wxString& date );
// C++ Func: bool ParseDateTime(const wxString& date, wxString::const_iterator *end );
%wxchkver_2_9 bool ParseDateTime(const wxString& datetime );
// %override [bool, lua String remainder on error] ParseDate(const wxString& date );
// C++ Func: bool ParseDate(const wxString& date, wxString::const_iterator *end );
%wxchkver_2_9 bool ParseDate(const wxString& date );
// %override [bool, lua String remainder on error] ParseTime(const wxString& date );
// C++ Func: bool ParseTime(const wxString& date, wxString::const_iterator *end );
%wxchkver_2_9 bool ParseTime(const wxString& time );

!%wxchkver_2_9 wxString ParseRfc822Date(wxString date );
!%wxchkver_2_9 wxString ParseFormat(wxString date, wxString format = "%c", const wxDateTime& dateDef = wxDefaultDateTime );
!%wxchkver_2_9 wxString ParseDateTime(wxString datetime );
!%wxchkver_2_9 wxString ParseDate(wxString date );
!%wxchkver_2_9 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;
};

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

class %delete 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( );
};

#endif //wxLUA_USE_wxDateTime && wxUSE_DATETIME

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

#if wxLUA_USE_wxTimeSpan && wxUSE_DATETIME

#include "wx/datetime.h"

class %delete 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( );
};

#endif //wxLUA_USE_wxTimeSpan && wxUSE_DATETIME

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

#if wxLUA_USE_wxDateSpan && wxUSE_DATETIME

#include "wx/datetime.h"

class %delete 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 );

bool operator==(wxDateSpan& other) const;
};

#endif //wxLUA_USE_wxDateSpan && wxUSE_DATETIME

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

#if wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME

class 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 );
};

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

class %delete wxDateTimeWorkDays : public wxDateTimeHolidayAuthority
{
wxDateTimeWorkDays( );
};

#endif //wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME


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

#if wxLUA_USE_wxStopWatch && wxUSE_STOPWATCH

#include "wx/stopwatch.h"

class %delete 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;
};

#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
};

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
};

enum wxLocaleCategory
{
wxLOCALE_CAT_NUMBER, // (any) numbers
wxLOCALE_CAT_DATE, // date/time
wxLOCALE_CAT_MONEY, // monetary value
wxLOCALE_CAT_MAX
};

enum wxLocaleInfo
{
wxLOCALE_THOUSANDS_SEP, // the thounsands separator
wxLOCALE_DECIMAL_POINT // the character used as decimal point
};

enum wxLocaleInitFlags
{
wxLOCALE_LOAD_DEFAULT, // load wxwin.mo?
wxLOCALE_CONV_ENCODING // convert encoding on the fly?
};

#if %wxchkver_2_8
enum wxLayoutDirection
{
wxLayout_Default,
wxLayout_LeftToRight,
wxLayout_RightToLeft
};
#endif %wxchkver_2_8

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

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


class %delete 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.
%wxchkver_2_9 virtual wxString GetString(const wxString& szOrigString, const wxString& szDomain = "") const;
!%wxchkver_2_9 virtual wxString GetString(const wxString& szOrigString, const wxChar* szDomain = NULL) const;
// plural form version of the same:
%wxchkver_2_9 virtual wxString GetString(const wxString& szOrigString, const wxString& szOrigString2, size_t n, const wxString& szDomain = "") const;
!%wxchkver_2_9 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;
};

wxLocale* wxGetLocale( );

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

%wxchkver_2_9 %rename wxGetTranslationPlural wxString wxGetTranslation(const wxString& sz1, const wxString& sz2, size_t n, const wxString& domain = "" );
!%wxchkver_2_9 && %wxchkver_2_8 %rename wxGetTranslationPlural wxString wxGetTranslation(const wxString& sz1, const wxString& sz2, size_t n, const wxChar* domain=NULL );
!%wxchkver_2_8 %rename wxGetTranslationPlural 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

bool wxDirExists(const wxString& dirname );
bool wxFileExists(const wxString& filename );

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

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

// These two methods are for wxLua
// %override long wxFileSize(const wxString& fileName) - gets the filesize
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_wxstring wxFILE_SEP_EXT wxT("." );
#define_wxstring wxFILE_SEP_DSK wxT(":" );
#define_wxstring wxFILE_SEP_PATH_DOS wxT("\\" );
#define_wxstring wxFILE_SEP_PATH_UNIX wxT("/" );
#define_wxstring wxFILE_SEP_PATH_MAC wxT(":" );
#define_wxstring wxFILE_SEP_PATH_VMS wxT("."); // VMS also uses '[' and ']'

#define_wxstring wxFILE_SEP_PATH wxLua_FILE_SEP_PATH // hack to convert from wxChar wxT('') to wxChar* wxT("" );

#define_wxstring wxPATH_SEP_DOS // wxT(";" );
#define_wxstring wxPATH_SEP_UNIX // wxT(":" );
#define_wxstring wxPATH_SEP_MAC // wxT(";" );
#define_wxstring wxPATH_SEP // wxPATH_SEP_XXX

#define wxARE_FILENAMES_CASE_SENSITIVE // bool 1/0

//bool wxIsPathSeparator(wxChar c) FIXME
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
};


class 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;
};

#endif // %wxchkver_2_8 && wxLUA_USE_wxStandardPaths


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

#include "wx/filefn.h"

class %delete wxPathList : public 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 );
};

// ---------------------------------------------------------------------------
// 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
};

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
};

class %delete 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( );

wxFileName& operator=(const wxFileName& filename );
bool operator==(const wxFileName& filename) const;
};

#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
};

enum wxFile::dummy
{
fd_invalid, // = -1
fd_stdin,
fd_stdout,
fd_stderr
};

enum wxSeekMode
{
wxFromStart,
wxFromCurrent,
wxFromEnd,
wxInvalidOffset
};

enum wxFileKind
{
wxFILE_KIND_UNKNOWN,
wxFILE_KIND_DISK,
wxFILE_KIND_TERMINAL,
wxFILE_KIND_PIPE
};

#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 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 );
};

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

#include "wx/file.h"

class %delete 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();
};

#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
%wxchkver_2_9_4 #define wxDIR_NO_FOLLOW
#define wxDIR_DEFAULT


#if %wxchkver_2_9_4

// these constants are possible return value of wxDirTraverser::OnDir()
enum wxDirTraverseResult
{
wxDIR_IGNORE, // ignore this directory but continue with others
wxDIR_STOP, // stop traversing
wxDIR_CONTINUE // continue into this directory
};

#endif //%wxchkver_2_9_4


class %delete 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 );
};

#endif //wxLUA_USE_wxDir

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

#include "wx/mimetype.h"

class %delete 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;
};

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

#include "wx/iconloc.h"

class %delete 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;
};

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

class %delete 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;
};

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

class %delete 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);
};

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

class 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);

!%wxchkver_2_9 bool ReadMailcap(const wxString& filename, bool fallback = false);
// read in additional file in mime.types format
!%wxchkver_2_9 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 );
};

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

#if wxUSE_STREAMS

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

enum wxEOL
{
wxEOL_NATIVE,
wxEOL_UNIX,
wxEOL_MAC,
wxEOL_DOS
};

enum wxStreamError
{
wxSTREAM_NO_ERROR,
wxSTREAM_EOF,
wxSTREAM_WRITE_ERROR,
wxSTREAM_READ_ERROR
};

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

class 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( );
};

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

class wxInputStream : public 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 );
};

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

class wxOutputStream : public 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 );
};

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

#include "wx/wfstream.h"

class %delete wxFileInputStream : public wxInputStream
{
wxFileInputStream(const wxString& fileName );
wxFileInputStream(wxFile& file );
//wxFileInputStream(int fd );

bool Ok() const;
};

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

class %delete wxFileOutputStream : public wxOutputStream
{
wxFileOutputStream(const wxString& fileName );
wxFileOutputStream(wxFile& file );
//wxFileOutputStream(int fd );

bool Ok() const;
};

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

#include "wx/mstream.h"

class %delete wxMemoryInputStream : public wxInputStream
{
wxMemoryInputStream(const char *data, size_t length );
//wxMemoryInputStream(const wxMemoryOutputStream& stream );

};

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

//%include "wx/mstream.h"

//class %delete wxMemoryInputStream : public wxInputStream
//{
// wxMemoryOutputStream(void *data, size_t length );
// wxMemoryInputStream(const wxMemoryOutputStream& stream );
//};

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

#include "wx/datstrm.h"

class %delete 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 );
};

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

#include "wx/datstrm.h"

class %delete 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 );
};



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

#if wxUSE_FILESYSTEM // already has wxUSE_STREAMS

#include "wx/filesys.h"


class %delete wxFSFile : public 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;
};


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

class %delete wxFileSystemHandler : public 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();
};


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


class %delete wxLocalFSHandler : public 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 );
};


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

enum
{
wxFS_READ, // Open for reading
wxFS_SEEKABLE // Returned stream will be seekable
};

class %delete wxFileSystem : public 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.
%gc 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(%ungc wxFileSystemHandler *handler);

// Removes FS handler
static %gc 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);
};


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

#include "wx/fs_arc.h"

class %delete wxArchiveFSHandler : public wxFileSystemHandler
{
wxArchiveFSHandler( );
};

// ---------------------------------------------------------------------------
// 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 : public wxFileSystemHandler
{
wxFilterFSHandler( );
};

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

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

class %delete wxInternetFSHandler : public wxFileSystemHandler
{
wxInternetFSHandler( );
};
#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( );
wxApp* wxGetApp( );

class wxApp : public 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 && !%wxchkver_2_9_2 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 );
};

#endif //wxLUA_USE_wxApp

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

#if wxLUA_USE_wxFrame|wxLUA_USE_wxDialog

#include "wx/toplevel.h"

enum
{
wxUSER_ATTENTION_INFO,
wxUSER_ATTENTION_ERROR
};

enum
{
wxFULLSCREEN_NOMENUBAR,
wxFULLSCREEN_NOTOOLBAR,
wxFULLSCREEN_NOSTATUSBAR,
wxFULLSCREEN_NOBORDER,
wxFULLSCREEN_NOCAPTION,
wxFULLSCREEN_ALL
};

class wxTopLevelWindow : public wxWindow
{
// No constructors, virtual base class, use wxFrame or wxDialog

bool CanSetTransparent( );
bool EnableCloseButton(bool enable = true );
%wxchkver_2_8 wxWindow* GetDefaultItem() const;
wxIcon GetIcon() const;
//const wxIconBundle& GetIcons() const;
wxString GetTitle() const;
%wxchkver_2_8 wxWindow* GetTmpDefaultItem() const;
bool IsActive() const;
bool IsAlwaysMaximized() const;
void Iconize(bool iconize );
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); // for phones
//void SetRightMenu(int id = wxID_ANY, const wxString& label = wxEmptyString, wxMenu * subMenu = NULL );
void SetMaxSize(const wxSize& size );
void SetMinSize(const wxSize& size );
void SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1 );
void SetSizeHints(const wxSize& minSize, const wxSize& maxSize=wxDefaultSize, const wxSize& incSize=wxDefaultSize );
bool SetShape(const wxRegion& region );
virtual void SetTitle(const wxString& title );
virtual bool SetTransparent(int alpha );
//virtual bool ShouldPreventAppExit() const; // must be overridden
%wxchkver_2_8 wxWindow* SetTmpDefaultItem(wxWindow *win );
bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL );
};

#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 %wxcompat_2_6 use %wxchkver_2_6

class wxFrame : public 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 );
};

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

#if wxLUA_USE_wxMiniFrame

#include "wx/minifram.h"

#define wxTINY_CAPTION_HORIZ
#define wxTINY_CAPTION_VERT

class wxMiniFrame : public 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" );
};

#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 : public 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 );
};

#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 : public 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 );
};

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

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

bool operator!() const;
};

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

#if %wxchkver_2_8

#include "wx/event.h"

class %delete wxClipboardTextEvent : public wxCommandEvent
{
%wxEventType wxEVT_COMMAND_TEXT_COPY // EVT_TEXT_COPY(winid, func );
%wxEventType wxEVT_COMMAND_TEXT_CUT // EVT_TEXT_CUT(winid, func );
%wxEventType wxEVT_COMMAND_TEXT_PASTE // EVT_TEXT_PASTE(winid, func );

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

#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
};

class %delete 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 );

bool operator==(const wxDataFormat& format) const;
};

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

class wxDataObject
{
enum Direction
{
Get,
Set
};

//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 );
};

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

class %delete wxDataObjectSimple : public wxDataObject
{
wxDataObjectSimple(const wxDataFormat& format = wxFormatInvalid );

const wxDataFormat& GetFormat() const;
void SetFormat(const wxDataFormat& format );

// This must be overridden in wxLuaDataObjectSimple, this function returns 0.
virtual size_t GetDataSize() const;

// This must be overridden in wxLuaDataObjectSimple, this function returns false.
virtual bool GetDataHere() const;

// This must be overridden in wxLuaDataObjectSimple, this function returns false.
virtual bool SetData(const wxString& str );
};

// ---------------------------------------------------------------------------
// wxLuaDataObjectSimple

class %delete wxLuaDataObjectSimple : public wxDataObjectSimple
{
wxLuaDataObjectSimple(const wxDataFormat& format = wxFormatInvalid );

// The functions below are all virtual functions that you MUST override in Lua
// for this class to work.

// Override this function to return the size of the data for GetDataHere().
//virtual size_t GetDataSize() const;

// Create a Lua function that returns a [bool, Lua string (of exact length GetDataSize())].
// %override [bool, Lua string] wxLuaDataObjectSimple::GetDataHere( );
// C++ Func: virtual bool GetDataHere(void *buf) const;
//virtual bool GetDataHere() const;

// Create a Lua function that takes a Lua string as the input data.
// %override bool wxLuaDataObjectSimple::SetData(Lua string );
// C++ Func: virtual bool SetData(size_t len, const void *buf );
//virtual bool SetData(const wxString& str );
};

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

class %delete wxDataObjectComposite : public wxDataObject
{
wxDataObjectComposite( );

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

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

class %delete wxFileDataObject : public wxDataObjectSimple
{
wxFileDataObject( );

virtual void AddFile(const wxString& file );
wxArrayString GetFilenames() const;
};

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

class %delete wxTextDataObject : public wxDataObjectSimple
{
wxTextDataObject(const wxString& text = "" );

virtual size_t GetTextLength() const;
virtual wxString GetText() const;
virtual void SetText(const wxString& text );
};

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

class %delete wxBitmapDataObject : public wxDataObjectSimple
{
wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap );

virtual wxBitmap GetBitmap() const;
virtual void SetBitmap(const wxBitmap& bitmap );
};

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

//class wxCustomDataObject : public 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 );
//};

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

#if %wxchkver_2_8

class %delete wxURLDataObject : public wxTextDataObject
{
wxURLDataObject(const wxString& url = "" );

wxString GetURL() const;
void SetURL(const wxString& url );
};

#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
};

enum wxDragResult
{
wxDragError,
wxDragNone,
wxDragCopy,
wxDragMove,
wxDragLink,
wxDragCancel
};

bool wxIsDragResultOk(wxDragResult res );

class 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 );
};

// ---------------------------------------------------------------------------
// wxFileDropTarget - Base class only, use a wxLuaFileDropTarget and override the virtuals

class wxFileDropTarget : public wxDropTarget
{
//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);
};

// ---------------------------------------------------------------------------
// wxLuaFileDropTarget

class wxLuaFileDropTarget : public wxFileDropTarget
{
wxLuaFileDropTarget( );

// Create a Lua function that returns a wxDragResult.
// %override wxDragResult wxLuaFileDropTarget::OnData(wxCoord x, wxCoord y, wxDragResult def);
// C++ Func: virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);

// Create a Lua function that returns a bool.
// %override bool OnDropFiles(wxCoord x, wxCoord y,const wxArrayString& filenames);
// C++ Func: virtual bool OnDropFiles(wxCoord x, wxCoord y,const wxArrayString& filenames);
virtual bool OnDropFiles(wxCoord x, wxCoord y,const wxArrayString& filenames);
};

// ---------------------------------------------------------------------------
// wxTextDropTarget - Base class only, use a wxLuaTextDropTarget and override the virtuals

class wxTextDropTarget : public wxDropTarget
{
//wxTextDropTarget( );
//virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text);
//virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
};

// ---------------------------------------------------------------------------
// wxLuaTextDropTarget

class wxLuaTextDropTarget : public wxTextDropTarget
{
wxLuaTextDropTarget( );

// Create a Lua function that returns a wxDragResult.
// %override wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
// C++ Func: virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def );

// Create a Lua function that returns a bool.
// %override bool OnDropText(wxCoord x, wxCoord y, const wxString& text);
// C++ Func: virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text);
virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text);
};

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

class %delete 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 );
};

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

#include "wx/event.h"

class %delete wxDropFilesEvent : public wxEvent
{
%wxEventType 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;
};

#endif //wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP

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

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

#include "wx/metafile.h"

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

class %delete wxMetafile : public wxObject
{
wxMetafile(const wxString& filename = "" );

bool Ok( );
bool Play(wxDC *dc );
bool SetClipboard(int width = 0, int height = 0 );
};

// ---------------------------------------------------------------------------
// wxMetafileDC
class %delete wxMetafileDC : public wxDC
{
wxMetafileDC(const wxString& filename = "" );

%win %gc wxMetafile* Close( );
};

#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 : public 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
};

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

#if wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON

#include "wx/bmpbuttn.h"

class wxBitmapButton : public 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 );
};

#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 : public 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
};

#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
};

class wxCheckBox : public 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 );
};

#endif //wxLUA_USE_wxCheckBox && wxUSE_CHECKBOX

// ---------------------------------------------------------------------------
// wxItemContainerImmutable

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

#include "wx/ctrlsub.h"

class wxItemContainerImmutable
{
// no constructor, used only as a base class

virtual unsigned int GetCount() const;
virtual bool IsEmpty() const;

virtual wxString GetString(unsigned int n); // = 0;
wxArrayString GetStrings() const;
virtual void SetString(unsigned int n, const wxString& s); // = 0;

virtual int FindString(const wxString& s, bool bCase = false) const;

virtual void SetSelection(int n); //= 0;
virtual int GetSelection() const; //= 0;

bool SetStringSelection(const wxString& s );
wxString GetStringSelection() const;

void Select(int n );
};

// ---------------------------------------------------------------------------
// wxItemContainer

#include "wx/ctrlsub.h"

class wxItemContainer : public wxItemContainerImmutable
{
// no constructor, used only as 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 AppendString( const wxString& item );

void Append(const wxArrayString& strings);

int Insert(const wxString& item, unsigned 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);

virtual void Clear(); //= 0;
virtual void Delete(unsigned int n); //= 0;


void SetClientData(unsigned int n, voidptr_long number); // C++ is (void *clientData) You can put a number here
voidptr_long GetClientData(unsigned int n) const; // C++ returns (void *) You get a number here

void SetClientObject(unsigned int n, wxClientData* clientData );
wxClientData* GetClientObject(unsigned int n) const;

bool HasClientObjectData() const;
bool HasClientUntypedData() const;
};

#endif

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

#include "wx/ctrlsub.h"

class wxControlWithItems : public wxControl, public wxItemContainer
{
// no constructor, this is just a base class

virtual bool ShouldInheritColours() const;
};

#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 : public 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 );

void Command(wxCommandEvent& event );
};

#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 : public wxControl, public wxItemContainer
{
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( );
};

#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 : public 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 );
};

#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 : public 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 );
};

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

#if wxLUA_USE_wxCheckListBox && wxUSE_CHECKLISTBOX

#include "wx/checklst.h"

class wxCheckListBox : public 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;
};

#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 : public 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 );
};

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

class %delete 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 );
};

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

enum wxListColumnFormat
{
wxLIST_FORMAT_LEFT,
wxLIST_FORMAT_RIGHT,
wxLIST_FORMAT_CENTRE,
wxLIST_FORMAT_CENTER
};

class %delete wxListItem : public 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 );
};

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

class %delete wxListEvent : public wxNotifyEvent
{
%wxEventType wxEVT_COMMAND_LIST_BEGIN_DRAG // EVT_LIST_BEGIN_DRAG(id, fn );
%wxEventType wxEVT_COMMAND_LIST_BEGIN_RDRAG // EVT_LIST_BEGIN_RDRAG(id, fn );
%wxEventType wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT // EVT_LIST_BEGIN_LABEL_EDIT(id, fn );
%wxEventType wxEVT_COMMAND_LIST_COL_CLICK // EVT_LIST_COL_CLICK(id, fn );
%wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS // EVT_LIST_DELETE_ALL_ITEMS(id, fn );
%wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM // EVT_LIST_DELETE_ITEM(id, fn );
%wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT // EVT_LIST_END_LABEL_EDIT(id, fn );
!%wxchkver_2_6 %wxEventType wxEVT_COMMAND_LIST_GET_INFO // EVT_LIST_GET_INFO(id, fn );
!%wxchkver_2_6 %wxEventType wxEVT_COMMAND_LIST_SET_INFO // EVT_LIST_SET_INFO(id, fn );
%wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM // EVT_LIST_INSERT_ITEM(id, fn );
%wxEventType wxEVT_COMMAND_LIST_ITEM_ACTIVATED // EVT_LIST_ITEM_ACTIVATED(id, fn );
%wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED // EVT_LIST_ITEM_DESELECTED(id, fn );
%wxEventType wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK // EVT_LIST_ITEM_MIDDLE_CLICK(id, fn );
%wxEventType wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK // EVT_LIST_ITEM_RIGHT_CLICK(id, fn );
%wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED // EVT_LIST_ITEM_SELECTED(id, fn );
%wxEventType wxEVT_COMMAND_LIST_KEY_DOWN // EVT_LIST_KEY_DOWN(id, fn );
%wxEventType wxEVT_COMMAND_LIST_CACHE_HINT // EVT_LIST_CACHE_HINT(id, fn );
%wxEventType wxEVT_COMMAND_LIST_COL_RIGHT_CLICK // EVT_LIST_COL_RIGHT_CLICK(id, fn );
%wxEventType wxEVT_COMMAND_LIST_COL_BEGIN_DRAG // EVT_LIST_COL_BEGIN_DRAG(id, fn );
%wxEventType wxEVT_COMMAND_LIST_COL_DRAGGING // EVT_LIST_COL_DRAGGING(id, fn );
%wxEventType wxEVT_COMMAND_LIST_COL_END_DRAG // EVT_LIST_COL_END_DRAG(id, fn );
%wxEventType 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;
};

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

class wxListView : public 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 );
};

#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 : public 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
};

#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 : public 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 );
};

#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 : public 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 );
};

#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 %wxcompat_2_6 obsolete
#define wxSL_RIGHT
#define wxSL_SELRANGE
#define wxSL_TOP
#define wxSL_VERTICAL

class wxSlider : public 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 );
};

#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 : public 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 );
};

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

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

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

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

int GetPosition() const;
void SetPosition(int pos );
};

#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 : public 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 );
};

#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 %wxcompat_2_6 obsolete use wxTE_CHARWRAP
#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
};

typedef long wxTextCoord
#define wxOutOfRangeTextCoord
#define wxInvalidTextCoord

class wxTextCtrl : public 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 );
};

enum wxTextAttrAlignment
{
wxTEXT_ALIGNMENT_DEFAULT,
wxTEXT_ALIGNMENT_LEFT,
wxTEXT_ALIGNMENT_CENTRE,
wxTEXT_ALIGNMENT_CENTER,
wxTEXT_ALIGNMENT_RIGHT,
wxTEXT_ALIGNMENT_JUSTIFIED
};

#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 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 );
};

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

class %delete wxTextUrlEvent : public wxCommandEvent
{
%wxchkver_2_8_0 %wxEventType 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;
};

#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
};

#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

%wxchkver_2_9 #define wxTREE_ITEMSTATE_NONE // not state (no display state image)
%wxchkver_2_9 #define wxTREE_ITEMSTATE_NEXT // cycle to the next state
%wxchkver_2_9 #define wxTREE_ITEMSTATE_PREV // cycle to the previous state

class wxTreeCtrl : public 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, %ungc wxLuaTreeItemData* data = NULL );
wxTreeItemId AppendItem(const wxTreeItemId& parent, const wxString& text, int image = -1, int selImage = -1, %ungc wxLuaTreeItemData* data = NULL );
//void AssignButtonsImageList(wxImageList* imageList );
void AssignImageList(%ungc wxImageList* imageList );
void AssignStateImageList(%ungc wxImageList* imageList );
void Collapse(const wxTreeItemId& item );
void CollapseAll( );
void CollapseAllChildren(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 );
void ExpandAll( );
void ExpandAllChildren(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; // MSW only

// %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;
wxLuaTreeItemData* 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, wxTreeItemIdValue& 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;
bool GetQuickBestSize() const;
//!%wxchkver_2_6|%wxcompat_2_4 int GetItemSelectedImage(const wxTreeItemId& item) const; // obsolete function
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, %ungc wxLuaTreeItemData* data = NULL );
wxTreeItemId InsertItem(const wxTreeItemId& parent, size_t before, const wxString& text, int image = -1, int selImage = -1, %ungc wxLuaTreeItemData* data = NULL );
bool IsBold(const wxTreeItemId& item) const;
bool IsEmpty() 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, %ungc wxLuaTreeItemData* 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, %ungc wxLuaTreeItemData* 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_9 void SetItemState(const wxTreeItemId& item, int state);
void SetItemText(const wxTreeItemId& item, const wxString& text );
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col );
void SetQuickBestSize(bool quickBestSize );
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 );
};

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

/*
class %delete 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 );
};
*/


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

// FAKE typedef, actually typedef void* wxTreeItemIdValue
// Since we override the functions that use it we handle it as a pointer.
typedef double wxTreeItemIdValue

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

class %delete 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

wxTreeItemId& operator=(const wxTreeItemId& otherId );
bool operator==(const wxTreeItemId& otherId) const;
};

// ---------------------------------------------------------------------------
// 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 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( );
};
*/


// ---------------------------------------------------------------------------
// wxTreeItemData - wxTreeCtrl, see also wxLuaTreeItemData
//
// No %delete since the wxTreeCtrl will delete it when set as the data for an item.
// Only create a wxTreeItemData if you're going to attach it to a wxTreeCtrl item to avoid memory leaks.

class %delete wxTreeItemData : public wxClientData
{
wxTreeItemData( );

wxTreeItemId GetId( );
void SetId(const wxTreeItemId& id );
};

// ---------------------------------------------------------------------------
// wxLuaTreeItemData -
//
// No %delete since the wxTreeCtrl will delete it when set as the data for an item.
// Only create a wxLuaTreeItemData if you're going to attach it to a wxTreeCtrl item to avoid memory leaks.

#include "wxbind/include/wxcore_wxlcore.h"

class %delete wxLuaTreeItemData : public wxTreeItemData
{
wxLuaTreeItemData( );

// %override wxLuaTreeItemData(any );
// C++ Func: wxLuaTreeItemData(wxLuaObject* obj );
wxLuaTreeItemData(any );

// %override any wxLuaTreeItemData::GetData() const;
// C++ Func: wxLuaObject* GetData() const;
any GetData() const;
// %override void wxLuaTreeItemData::SetData(any );
// C++ Func: void SetData(wxLuaObject* obj );
void SetData(any);
};


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

class %delete wxTreeEvent : public wxNotifyEvent
{
%wxEventType wxEVT_COMMAND_TREE_BEGIN_DRAG // EVT_TREE_BEGIN_DRAG(id, fn );
%wxEventType wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT // EVT_TREE_BEGIN_LABEL_EDIT(id, fn );
%wxEventType wxEVT_COMMAND_TREE_BEGIN_RDRAG // EVT_TREE_BEGIN_RDRAG(id, fn );
%wxEventType wxEVT_COMMAND_TREE_DELETE_ITEM // EVT_TREE_DELETE_ITEM(id, fn );
%wxEventType wxEVT_COMMAND_TREE_END_DRAG // EVT_TREE_END_DRAG(id, fn );
%wxEventType wxEVT_COMMAND_TREE_END_LABEL_EDIT // EVT_TREE_END_LABEL_EDIT(id, fn );
%wxEventType wxEVT_COMMAND_TREE_GET_INFO // EVT_TREE_GET_INFO(id, fn );
%wxEventType wxEVT_COMMAND_TREE_ITEM_ACTIVATED // EVT_TREE_ITEM_ACTIVATED(id, fn );
%wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSED // EVT_TREE_ITEM_COLLAPSED(id, fn );
%wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSING // EVT_TREE_ITEM_COLLAPSING(id, fn );
%wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDED // EVT_TREE_ITEM_EXPANDED(id, fn );
%wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDING // EVT_TREE_ITEM_EXPANDING(id, fn );
%wxEventType wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK // EVT_TREE_ITEM_MIDDLE_CLICK(id, fn );
%wxEventType wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK // EVT_TREE_ITEM_RIGHT_CLICK(id, fn );
%wxEventType wxEVT_COMMAND_TREE_KEY_DOWN // EVT_TREE_KEY_DOWN(id, fn );
%wxEventType wxEVT_COMMAND_TREE_SEL_CHANGED // EVT_TREE_SEL_CHANGED(id, fn );
%wxEventType wxEVT_COMMAND_TREE_SEL_CHANGING // EVT_TREE_SEL_CHANGING(id, fn );
%wxEventType wxEVT_COMMAND_TREE_SET_INFO // EVT_TREE_SET_INFO(id, fn );
%wxEventType wxEVT_COMMAND_TREE_ITEM_MENU // EVT_TREE_ITEM_MENU(id, fn );
%wxEventType wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK // EVT_TREE_STATE_IMAGE_CLICK(id, fn );
%wxEventType 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 );
};

#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
};

%wxchkver_2_9_0 #define_string wxDirDialogDefaultFolderStr
!%wxchkver_2_9_0 #define_wxstring wxDirDialogDefaultFolderStr

class wxGenericDirCtrl : public 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 );
};

#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
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 wxLogGui : public wxLog
{
wxLogGui( );
};

#endif // wxUSE_LOGGUI

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

#if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL

class %delete wxLogTextCtrl : public wxLog
{
wxLogTextCtrl(wxTextCtrl* textCtrl);
};

#endif // wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL

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

#if wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW

class %delete wxLogWindow : public 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 );
};

#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
};

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
};

enum wxSystemFeature
{
wxSYS_CAN_DRAW_FRAME_DECORATIONS,
wxSYS_CAN_ICONIZE_FRAME
};

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
};

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
};

class 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 );
};

#endif //wxLUA_USE_wxSystemSettings


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

#if wxLUA_USE_wxValidator && wxUSE_VALIDATORS

#include "wx/validate.h"

class wxValidator : public 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 );
};

// ---------------------------------------------------------------------------
// 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 : public 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 );
};

#endif //wxLUA_USE_wxTextValidator

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

#if wxLUA_USE_wxGenericValidator

#include "wx/valgen.h"

class %delete wxGenericValidator : public 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 );
};

#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 %delete wxMemoryFSHandler : public 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, wxBitmapType type);
static void AddFile(const wxString& filename, const wxBitmap& bitmap, wxBitmapType type);
#endif // wxUSE_IMAGE
};


#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

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

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

#if wxLUA_USE_wxProcess

enum
{
wxEXEC_ASYNC,
wxEXEC_SYNC,
wxEXEC_NOHIDE,
wxEXEC_MAKE_GROUP_LEADER,
wxEXEC_NODISABLE
};

enum
{
wxPROCESS_DEFAULT,
wxPROCESS_REDIRECT
};

enum wxSignal
{
wxSIGNONE,
wxSIGHUP,
wxSIGINT,
wxSIGQUIT,
wxSIGILL,
wxSIGTRAP,
wxSIGABRT,
wxSIGEMT,
wxSIGFPE,
wxSIGKILL,
wxSIGBUS,
wxSIGSEGV,
wxSIGSYS,
wxSIGPIPE,
wxSIGALRM,
wxSIGTERM
};

enum wxKillError
{
wxKILL_OK,
wxKILL_BAD_SIGNAL,
wxKILL_ACCESS_DENIED,
wxKILL_NO_PROCESS,
wxKILL_ERROR
};

enum wxKillFlags
{
wxKILL_NOCHILDREN,
wxKILL_CHILDREN
};

class %delete wxProcess : public 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

};

#endif //wxLUA_USE_wxProcess

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

!%wxchkver_2_6 long wxExecute(const wxString& command, bool sync = false, wxProcess *callback = NULL );
%wxchkver_2_6 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 );
%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 );
%rename wxExecuteStdoutStderr long wxExecute(const wxString& command, wxArrayString& output, wxArrayString& errors, int flags = 0 );
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 );
int wxKill(long pid, wxSignal sig = wxSIGTERM, int flags = 0 );
unsigned long wxGetProcessId( );
bool wxShell(const wxString& command = "" );


enum wxShutdownFlags
{
wxSHUTDOWN_POWEROFF,
wxSHUTDOWN_REBOOT
};

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

//void wxBeginBusyCursor(wxCursor *cursor = wxLua_wxHOURGLASS_CURSOR );
//void wxBell( );
//void wxEndBusyCursor( );
//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 );
void wxClientDisplayRect( );

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

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

wxSize wxGetDisplaySizeMM( );

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

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

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

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

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

#if %wxchkver_2_8
// This is in wxWidgets 2.6 docs, but it's only in >=2.7
class %delete 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 );
};

wxMouseState wxGetMouseState( );
#endif

// bool wxGetResource(const wxString& section, const wxString& entry, const wxString& *value, const wxString& file = "" );
// bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file = "" );
// wxString wxGetStockLabel(wxWindowID id, bool withCodes = true, wxString accelerator = wxEmptyString );
wxWindow* wxGetTopLevelParent(wxWindow *win );
bool wxLaunchDefaultBrowser(const wxString& sUrl );
//%win wxString wxLoadUserResource(const wxString& resourceName, const wxString& resourceType="TEXT" );
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 %wxcompat_2_6 use wxTE_PASSWORD
// #define wxPROCESS_ENTER %wxcompat_2_6 use wxTE_PROCESS_ENTER
#define wxRESET
// #define wxRESIZE_BOX %wxcompat_2_6 use wxMAXIMIZE_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 %wxcompat_2_6
#define wxYES
#define wxYES_DEFAULT
#define wxYES_NO

enum wxOrientation
{
wxHORIZONTAL,
wxVERTICAL,
wxBOTH
};

enum wxDirection
{
wxLEFT,
wxRIGHT,
wxUP,
wxDOWN,
wxTOP,
wxBOTTOM,
wxNORTH,
wxSOUTH,
wxWEST,
wxEAST,
wxALL
};

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
};

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
};

enum wxBorder
{
wxBORDER_DEFAULT,
wxBORDER_NONE,
wxBORDER_STATIC,
wxBORDER_SIMPLE,
wxBORDER_RAISED,
wxBORDER_SUNKEN,
wxBORDER_DOUBLE,
wxBORDER_MASK
};

enum wxBackgroundStyle
{
wxBG_STYLE_SYSTEM,
wxBG_STYLE_COLOUR,
wxBG_STYLE_CUSTOM
};

enum wxKeyModifier
{
wxMOD_NONE,
wxMOD_ALT,
wxMOD_CONTROL,
wxMOD_ALTGR,
wxMOD_SHIFT,
wxMOD_META,
wxMOD_WIN,
wxMOD_CMD,
wxMOD_ALL
};

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

#if wxLUA_USE_wxBusyCursor

#include "wx/utils.h"

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

// ---------------------------------------------------------------------------
// 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 wxBusyCursorSuspender
//{
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
// wxBusyCursorSuspender( );
//};

#endif //wxLUA_USE_wxBusyCursor

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

#if wxLUA_USE_wxBusyInfo && wxUSE_BUSYINFO

#include "wx/busyinfo.h"

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

#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 : public 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( );
};

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

#include "wx/timer.h"

class %delete wxTimerEvent : public wxEvent
{
%wxEventType wxEVT_TIMER // EVT_TIMER(id, fn );

int GetInterval() const;
};

#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
};
#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
};
#endif //%wxchkver_2_8

// ---------------------------------------------------------------------------
// Dialog functions from wxWidgets functions documentation

void wxBeginBusyCursor(wxCursor *cursor = wxLua_wxHOURGLASS_CURSOR );
void wxEndBusyCursor( );
void wxBell( );
// wxTipProvider* wxCreateFileTipProvider(const wxString& filename, size_t currentTip );

#define_wxstring wxDirSelectorPromptStr wxT("Select a directory" );
wxString wxDirSelector(const wxString& message = wxDirSelectorPromptStr, const wxString& default_path = "", long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, wxWindow *parent = NULL );
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 wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit );
wxUSE_COLOURDLG&&%wxchkver_2_8 wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit, const wxString& caption = "" );
!%wxchkver_2_8&&wxUSE_FONTDLG wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit );
%wxchkver_2_8&&wxUSE_FONTDLG 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 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
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 wxString wxGetPasswordFromUser(const wxString& message, const wxString& caption = "Input text", const wxString& default_value = "", wxWindow *parent = NULL );
wxUSE_TEXTDLG 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 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 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 );
bool wxIsBusy( );
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 %wxcompat_2_6
// #define wxDIALOG_MODELESS %wxcompat_2_6
#define wxDEFAULT_DIALOG_STYLE
#define wxDIALOG_NO_PARENT
#define wxDIALOG_EX_CONTEXTHELP
// #define wxDIALOG_EX_METAL mac only
#define wxCHOICEDLG_STYLE

class wxDialog : public 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( );
};

#endif // wxLUA_USE_wxDialog


// ---------------------------------------------------------------------------
// wxColourDialog

#if wxLUA_USE_wxColourDialog && wxUSE_COLOURDLG

#include "wx/colordlg.h"

class wxColourDialog : public wxDialog
{
wxColourDialog(wxWindow* parent, wxColourData* data = NULL );
//bool Create(wxWindow* parent, wxColourData* data = NULL );

wxColourData& GetColourData( );
//int ShowModal() - in wxDialog
};

// ---------------------------------------------------------------------------
// wxColourData

#include "wx/cmndata.h"

class %delete wxColourData : public wxObject
{
wxColourData( );
wxColourData(const wxColourData& cData );

bool GetChooseFull() const;
wxColour GetColour() const;
wxColour GetCustomColour(int i) const;
void SetChooseFull(bool flag );
void SetColour(wxColour &colour );
void SetCustomColour(int i, wxColour &colour );
};

#endif // wxLUA_USE_wxColourDialog && wxUSE_COLOURDLG

// ---------------------------------------------------------------------------
// wxFileDialog

#if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG

#include "wx/filedlg.h"

#define_wxstring wxFileSelectorPromptStr wxT("Select a file" );
%wxchkver_2_9_0 #define_string wxFileSelectorDefaultWildcardStr
!%wxchkver_2_9_0 #define_wxstring wxFileSelectorDefaultWildcardStr

class wxFileDialog : public wxDialog
{
// wxFileDialog() no default constructor in MSW
%not_overload !%wxchkver_2_8 wxFileDialog(wxWindow* parent, const wxString& message = "Choose a file", const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildcard = "*.*", long style = 0, const wxPoint& pos = wxDefaultPosition );
%not_overload %wxchkver_2_8 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = "wxFileDialog" );
//%wxchkver_2_8 bool Create(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = "wxFileDialog" );

wxString GetDirectory() const;
wxString GetFilename() const;

// %override [Lua string table] wxFileDialog::GetFilenames( );
// C++ Func: void GetFilenames(wxArrayString& filenames) const;
void GetFilenames() const;

int GetFilterIndex() const;
wxString GetMessage() const;
wxString GetPath() const;

// %override [Lua string table] wxFileDialog::GetPaths( );
// C++ Func: void GetPaths(wxArrayString& paths) const;
void GetPaths() const;

!%wxchkver_2_8 long GetStyle() const;
wxString GetWildcard() const;
void SetDirectory(const wxString& directory );
void SetFilename(const wxString& setfilename );
void SetFilterIndex(int filterIndex );
void SetMessage(const wxString& message );
void SetPath(const wxString& path );
!%wxchkver_2_8 void SetStyle(long style );
void SetWildcard(const wxString& wildCard );
// int ShowModal() - in wxDialog
};

#endif //wxLUA_USE_wxFileDialog && wxUSE_FILEDLG

// ---------------------------------------------------------------------------
// wxDirDialog

#if wxLUA_USE_wxDirDialog && wxUSE_DIRDLG

#include "wx/dirdlg.h"

#define wxDD_DEFAULT_STYLE
!%wxchkver_2_8 #define wxDD_NEW_DIR_BUTTON
%wxchkver_2_8 #define wxDD_CHANGE_DIR
%wxchkver_2_8 #define wxDD_DIR_MUST_EXIST

class wxDirDialog : public wxDialog
{
wxDirDialog(wxWindow* parent, const wxString& message = "Choose a directory", const wxString& defaultPath = "", long style = 0, const wxPoint& pos = wxDefaultPosition );

wxString GetPath() const;
wxString GetMessage() const;
!%wxchkver_2_8 long GetStyle() const;
void SetMessage(const wxString& message );
void SetPath(const wxString& path );
!%wxchkver_2_8 void SetStyle(long style );
// int ShowModal() - in wxDialog
};

#endif //wxLUA_USE_wxDirDialog && wxUSE_DIRDLG

// ---------------------------------------------------------------------------
// wxMessageDialog

#if wxLUA_USE_wxMessageDialog && wxUSE_MSGDLG

class wxMessageDialog : public wxDialog
{
wxMessageDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Message box", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition );

// int ShowModal() - in wxDialog
};

#endif //wxLUA_USE_wxMessageDialog && wxUSE_MSGDLG

// ---------------------------------------------------------------------------
// wxMultiChoiceDialog - use wxGetMultipleChoices

#if wxUSE_CHOICEDLG && wxLUA_USE_wxMultiChoiceDialog

class wxMultiChoiceDialog : public wxDialog
{
wxMultiChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition );

wxArrayInt GetSelections() const; // FIXME
void SetSelections(const wxArrayInt& selections) const; // FIXME
//int ShowModal() - in wxDialog
};

#endif //wxUSE_CHOICEDLG && wxLUA_USE_wxMultiChoiceDialog

// ---------------------------------------------------------------------------
// wxSingleChoiceDialog - use wxGetSingleChoice or wxGetSingleChoiceIndex

#if wxUSE_CHOICEDLG && wxLUA_USE_wxSingleChoiceDialog

class wxSingleChoiceDialog : public wxDialog
{
// %override wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition );
// C++ Func: wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, void** clientData = NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition );
wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition );

int GetSelection() const;
wxString GetStringSelection() const;
void SetSelection(int selection) const;
// int ShowModal() - in wxDialog
};

#endif //wxUSE_CHOICEDLG && wxLUA_USE_wxSingleChoiceDialog

// ---------------------------------------------------------------------------
// wxTextEntryDialog - see also wxGetTextFromUser

#if wxUSE_TEXTDLG && wxLUA_USE_wxTextEntryDialog

#define wxTextEntryDialogStyle

class wxTextEntryDialog : public wxDialog
{
wxTextEntryDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Please enter text", const wxString& defaultValue = "", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition );

wxString GetValue() const;
void SetValue(const wxString& value );
// int ShowModal() - in wxDialog
};

// ---------------------------------------------------------------------------
// wxPasswordEntryDialog - see also wxGetPasswordFromUser

%wxchkver_2_9_0 #define_string wxGetPasswordFromUserPromptStr
!%wxchkver_2_9_0 #define_wxstring wxGetPasswordFromUserPromptStr
#define wxTextEntryDialogStyle

class wxPasswordEntryDialog : public wxTextEntryDialog
{
wxPasswordEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetPasswordFromUserPromptStr, const wxString& value = "", long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition );
};

#endif //wxUSE_TEXTDLG && wxLUA_USE_wxTextEntryDialog

// ---------------------------------------------------------------------------
// wxFontDialog

#if wxUSE_FONTDLG && wxLUA_USE_wxFontDialog

#include "wx/fontdlg.h"

class wxFontDialog : public wxDialog
{
wxFontDialog(wxWindow* parent, const wxFontData& data );

wxFontData& GetFontData( );
// int ShowModal() - in wxDialog
};

// ---------------------------------------------------------------------------
// wxFontData - for wxFontDialog

#include "wx/cmndata.h"

class %delete wxFontData : public wxObject
{
wxFontData( );
wxFontData(const wxFontData& data );

void EnableEffects(bool enable );
bool GetAllowSymbols( );
wxColour GetColour( );
wxFont GetChosenFont( );
bool GetEnableEffects( );
wxFont GetInitialFont( );
bool GetShowHelp( );
void SetAllowSymbols(bool allowSymbols );
void SetChosenFont(const wxFont &font );
void SetColour(const wxColour &colour );
void SetInitialFont(const wxFont &font );
void SetRange(int minimum, int maximum );
void SetShowHelp(bool showHelp );
};

#endif //wxUSE_FONTDLG && wxLUA_USE_wxFontDialog

// ---------------------------------------------------------------------------
// wxFindReplaceDialog

#if wxUSE_FINDREPLDLG && wxLUA_USE_wxFindReplaceDialog

#include "wx/fdrepdlg.h"

enum wxFindReplaceDialogStyles
{
wxFR_REPLACEDIALOG,
wxFR_NOUPDOWN,
wxFR_NOMATCHCASE,
wxFR_NOWHOLEWORD
};

class wxFindReplaceDialog : public wxDialog
{
wxFindReplaceDialog( );
wxFindReplaceDialog(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0 );
bool Create(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0 );

const wxFindReplaceData *GetData( );
void SetData(wxFindReplaceData *findData );
};

// ---------------------------------------------------------------------------
// wxFindReplaceData - Note this must exist while used in a wxFindReplaceDialog
// and you should delete() it only when the dialog is closed.

enum wxFindReplaceFlags
{
wxFR_DOWN,
wxFR_WHOLEWORD,
wxFR_MATCHCASE
};

class %delete wxFindReplaceData : public wxObject
{
wxFindReplaceData(int flags = 0 );

wxString GetFindString( );
wxString GetReplaceString( );
int GetFlags( );
void SetFlags(int flags );
void SetFindString(const wxString& string );
void SetReplaceString(const wxString& string );
};

// ---------------------------------------------------------------------------
// wxFindDialogEvent

class %delete wxFindDialogEvent : public wxCommandEvent
{
%wxEventType wxEVT_COMMAND_FIND // EVT_FIND(id, fn );
%wxEventType wxEVT_COMMAND_FIND_NEXT // EVT_FIND_NEXT(id, fn );
%wxEventType wxEVT_COMMAND_FIND_REPLACE // EVT_FIND_REPLACE(id, fn );
%wxEventType wxEVT_COMMAND_FIND_REPLACE_ALL // EVT_FIND_REPLACE_ALL(id, fn );
%wxEventType wxEVT_COMMAND_FIND_CLOSE // EVT_FIND_CLOSE(id, fn );

wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0 );

int GetFlags( );
wxString GetFindString( );
wxString GetReplaceString( );
wxFindReplaceDialog *GetDialog( );
void SetFlags(int flags );
void SetFindString(const wxString& str );
void SetReplaceString(const wxString& str );
};

#endif //wxUSE_FINDREPLDLG && wxLUA_USE_wxFindReplaceDialog

// ---------------------------------------------------------------------------
// wxProgressDialog

#if wxUSE_PROGRESSDLG && wxLUA_USE_wxProgressDialog

#include "wx/progdlg.h"

#define wxPD_APP_MODAL
#define wxPD_AUTO_HIDE
#define wxPD_SMOOTH
#define wxPD_CAN_ABORT
#define wxPD_CAN_SKIP
#define wxPD_ELAPSED_TIME
#define wxPD_ESTIMATED_TIME
#define wxPD_REMAINING_TIME

class wxProgressDialog : public wxDialog
{
wxProgressDialog(const wxString& title, const wxString& message, int maximum = 100, wxWindow* parent = NULL, int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL );

void Resume( );

// %override [bool, bool skip] Update(int value, const wxString& newmsg = "" );
// C++ Func: bool Update(int value, const wxString& newmsg = "", bool* skip = NULL );
bool Update(int value, const wxString& newmsg = "" );
};

#endif //wxUSE_PROGRESSDLG && wxLUA_USE_wxProgressDialog

// ---------------------------------------------------------------------------
// wxTabbedDialog deprecated; use wxNotebook instead
//
// #include "wx/wxtab.h"
// class wxTabbedDialog : public wxDialog
// {
// wxTabbedDialog(wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style=wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxTabbedDialog" );
// void SetTabView(wxTabView *view );
// wxTabView * GetTabView( );
// };



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


// ===========================================================================
// Purpose: wxEvent and other generic event classes and types
// events specific to a single control are with that control
// 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
// ===========================================================================


// ---------------------------------------------------------------------------
// wxEvtHandler

class %delete wxEvtHandler : public wxObject
{
wxEvtHandler( );

void AddPendingEvent(wxEvent& event );

// NOTE: Connect used to be called ConnectEvent in wxLua which is not the name of any C++ function.

// %override wxEvtHandler::Connect(int id, int lastId, wxEventType eventType, Lua function );
// %override wxEvtHandler::Connect(int id, wxEventType eventType, Lua function );
// %override wxEvtHandler::Connect(wxEventType eventType, Lua function );
// The function type above is determined at runtime depending on the inputs.
// C++ Func: void Connect(int id, int lastId, wxEventType eventType, wxObjectEventFunction function, wxObject* userData = NULL, wxEvtHandler* eventSink = NULL );
// Note: wxLua uses the userdata and the event sink and so they're not available
void Connect(int id, int lastId, wxEventType eventType, LuaFunction func );

// %override bool Disconnect(int winid, int lastId, wxEventType eventType );
// %override bool Disconnect(int winid, wxEventType eventType );
// %override bool Disconnect(wxEventType eventType );
// The function type above is determined at runtime depending on the inputs.
// C++ Func: bool Disconnect(int id, int lastId = wxID_ANY, wxEventType eventType = wxEVT_NULL, wxObjectEventFunction function = NULL, wxObject* userData = NULL, wxEvtHandler* eventSink = NULL );
// Note: wxLua uses the userdata and the event sink and so they're not available
bool Disconnect(int id, int lastId, wxEventType eventType );

voidptr_long GetClientData(); // C++ returns (void *) You get a number here
wxClientData* GetClientObject() const;
bool GetEvtHandlerEnabled( );
wxEvtHandler* GetNextHandler( );
wxEvtHandler* GetPreviousHandler( );
virtual bool ProcessEvent(wxEvent& event );
//virtual bool SearchEventTable(wxEventTable& table, wxEvent& event );
void SetClientData(voidptr_long number); // C++ is (void *clientData) You can put a number here
void SetClientObject(wxClientData* data );
void SetEvtHandlerEnabled(bool enabled );
void SetNextHandler(wxEvtHandler* handler );
void SetPreviousHandler(wxEvtHandler* handler );
};

// ---------------------------------------------------------------------------
// wxEvent

#include "wx/event.h"

enum Propagation_state
{
wxEVENT_PROPAGATE_NONE, // don't propagate it at all
wxEVENT_PROPAGATE_MAX // propagate it until it is processed
};

class %delete wxEvent : public wxObject
{
// wxEvent(int id = 0, wxEventType eventType = wxEVT_NULL) virtual base class

wxObject* GetEventObject( );
wxEventType GetEventType( );
int GetId( );
bool GetSkipped( );
long GetTimestamp( );
bool IsCommandEvent() const;
void ResumePropagation(int propagationLevel );
void SetEventObject(wxObject* object );
void SetEventType(wxEventType type );
void SetId(int id );
void SetTimestamp(long timeStamp );
bool ShouldPropagate() const;
void Skip(bool skip = true );
int StopPropagation( );
};

// ---------------------------------------------------------------------------
// wxPropagationDisabler

#include "wx/event.h"

class %delete wxPropagationDisabler
{
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxPropagationDisabler(wxEvent& event );
};

// ---------------------------------------------------------------------------
// wxPropagateOnce

#include "wx/event.h"

class %delete wxPropagateOnce
{
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxPropagateOnce(wxEvent& event );
};

// ---------------------------------------------------------------------------
// wxCommandEvent

#include "wx/event.h"
%wxchkver_2_4 #include "wx/tglbtn.h" // for wxEVT_COMMAND_TOGGLEBUTTON_CLICKED

class %delete wxCommandEvent : public wxEvent
{
%wxEventType wxEVT_NULL // dummy placeholder nobody sends this event

%wxEventType wxEVT_COMMAND_ENTER // EVT_COMMAND_ENTER(winid, func );
%wxEventType wxEVT_COMMAND_KILL_FOCUS // EVT_COMMAND_KILL_FOCUS(winid, func );
%wxEventType wxEVT_COMMAND_LEFT_CLICK // EVT_COMMAND_LEFT_CLICK(winid, func );
%wxEventType wxEVT_COMMAND_LEFT_DCLICK // EVT_COMMAND_LEFT_DCLICK(winid, func );
%wxEventType wxEVT_COMMAND_RIGHT_CLICK // EVT_COMMAND_RIGHT_CLICK(winid, func );
%wxEventType wxEVT_COMMAND_RIGHT_DCLICK // EVT_COMMAND_RIGHT_DCLICK(winid, func );
//%wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED // EVT_SCROLLBAR(winid, func) obsolete use wxEVT_SCROLL...
%wxEventType wxEVT_COMMAND_SET_FOCUS // EVT_COMMAND_SET_FOCUS(winid, func );
//%wxEventType wxEVT_COMMAND_VLBOX_SELECTED // EVT_VLBOX(winid, func) unused?

%wxEventType wxEVT_COMMAND_MENU_SELECTED // EVT_MENU(winid, func) EVT_MENU_RANGE(id1, id2, func );

%wxEventType wxEVT_COMMAND_TOOL_CLICKED // EVT_TOOL(winid, func) EVT_TOOL_RANGE(id1, id2, func );
%wxEventType wxEVT_COMMAND_TOOL_ENTER // EVT_TOOL_ENTER(winid, func );
%wxEventType wxEVT_COMMAND_TOOL_RCLICKED // EVT_TOOL_RCLICKED(winid, func) EVT_TOOL_RCLICKED_RANGE(id1, id2, func );

%wxEventType wxEVT_COMMAND_TEXT_ENTER // EVT_TEXT_ENTER(id, fn );
%wxEventType wxEVT_COMMAND_TEXT_UPDATED // EVT_TEXT(id, fn );
%wxEventType wxEVT_COMMAND_TEXT_MAXLEN // EVT_TEXT_MAXLEN(id, fn );
!%wxchkver_2_8_0 %wxEventType wxEVT_COMMAND_TEXT_URL // EVT_TEXT_URL(id, fn );

%wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED // EVT_SPINCTRL(id, fn );
%wxEventType wxEVT_COMMAND_SLIDER_UPDATED // EVT_SLIDER(winid, func );
%wxEventType wxEVT_COMMAND_RADIOBUTTON_SELECTED // EVT_RADIOBUTTON(winid, func );
%wxEventType wxEVT_COMMAND_RADIOBOX_SELECTED // EVT_RADIOBOX(winid, func );
%wxEventType wxEVT_COMMAND_CHECKLISTBOX_TOGGLED // EVT_CHECKLISTBOX(winid, func );
%wxEventType wxEVT_COMMAND_LISTBOX_DOUBLECLICKED // EVT_LISTBOX_DCLICK(winid, func );
%wxEventType wxEVT_COMMAND_LISTBOX_SELECTED // EVT_LISTBOX(winid, func );
%wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED // EVT_COMBOBOX(winid, func );
%wxEventType wxEVT_COMMAND_CHOICE_SELECTED // EVT_CHOICE(winid, func );
%wxEventType wxEVT_COMMAND_CHECKBOX_CLICKED // EVT_CHECKBOX(winid, func );
%wxEventType wxEVT_COMMAND_BUTTON_CLICKED // EVT_BUTTON(winid, func );
%wxchkver_2_4 %wxEventType wxEVT_COMMAND_TOGGLEBUTTON_CLICKED // EVT_TOGGLEBUTTON(id, fn );

wxCommandEvent(wxEventType commandEventType = wxEVT_NULL, int id = 0 );

voidptr_long GetClientData(); // C++ returns (void *) You get a number here
wxClientData* GetClientObject( );
%rename GetStringClientObject wxStringClientData* GetClientObject( );
long GetExtraLong( );
int GetInt( );
int GetSelection( );
wxString GetString( );
bool IsChecked() const;
bool IsSelection( );
void SetClientData(voidptr_long number); // C++ is (void *clientData) You can put a number here
void SetExtraLong(int extraLong );
void SetInt(int intCommand );
void SetString(const wxString &string );
};

// ---------------------------------------------------------------------------
// wxNotifyEvent

#include "wx/event.h"

class %delete wxNotifyEvent : public wxCommandEvent
{
wxNotifyEvent(wxEventType eventType = wxEVT_NULL, int id = 0 );

void Allow( );
bool IsAllowed() const;
void Veto( );
};

// ---------------------------------------------------------------------------
// wxActivateEvent

#include "wx/event.h"

class %delete wxActivateEvent : public wxEvent
{
%wxEventType wxEVT_ACTIVATE // EVT_ACTIVATE(func );
%wxEventType wxEVT_ACTIVATE_APP // EVT_ACTIVATE_APP(func );
%wxEventType wxEVT_HIBERNATE // EVT_HIBERNATE(func );

wxActivateEvent(wxEventType eventType = wxEVT_NULL, bool active = true, int id = 0 );

bool GetActive() const;
};

// ---------------------------------------------------------------------------
// wxCloseEvent

#include "wx/event.h"

class %delete wxCloseEvent : public wxEvent
{
%wxEventType wxEVT_CLOSE_WINDOW // EVT_CLOSE(func );
%wxEventType wxEVT_QUERY_END_SESSION // EVT_QUERY_END_SESSION(func );
%wxEventType wxEVT_END_SESSION // EVT_END_SESSION(func );

wxCloseEvent(wxEventType commandEventType = wxEVT_NULL, int id = 0 );

bool CanVeto( );
bool GetLoggingOff() const;
void SetCanVeto(bool canVeto );
void SetLoggingOff(bool loggingOff) const;
void Veto(bool veto = true );
};

// ---------------------------------------------------------------------------
// wxDialUpEvent - TODO - the rest of wxDialUp is missing, anyone care?

//#if !%mac
//%include "wx/dialup.h"

//class %delete wxDialUpEvent : public wxCommandEvent
//{
// %wxEventType wxEVT_DIALUP_CONNECTED // EVT_DIALUP_CONNECTED(func );
// %wxEventType wxEVT_DIALUP_DISCONNECTED // EVT_DIALUP_DISCONNECTED(func );

// wxDialUpEvent(bool isConnected, bool isOwnEvent );
// bool IsConnectedEvent() const;
// bool IsOwnEvent() const;
//};
//#endif

// ---------------------------------------------------------------------------
// wxEraseEvent

#include "wx/event.h"

class %delete wxEraseEvent : public wxEvent
{
%wxEventType wxEVT_ERASE_BACKGROUND // EVT_ERASE_BACKGROUND(func );

wxEraseEvent(int id = 0, wxDC* dc = NULL );

wxDC* GetDC() const;
};

// ---------------------------------------------------------------------------
// wxFocusEvent

#include "wx/event.h"

class %delete wxFocusEvent : public wxEvent
{
%wxEventType wxEVT_SET_FOCUS // EVT_SET_FOCUS(func );
%wxEventType wxEVT_KILL_FOCUS // EVT_KILL_FOCUS(func );

wxFocusEvent(wxEventType eventType = wxEVT_NULL, int id = 0 );

wxWindow* GetWindow( );
void SetWindow(wxWindow *win );
};

// ---------------------------------------------------------------------------
// wxChildFocusEvent

#include "wx/event.h"

class %delete wxChildFocusEvent : public wxCommandEvent
{
%wxEventType wxEVT_CHILD_FOCUS // EVT_CHILD_FOCUS(func );

wxChildFocusEvent(wxWindow *win = NULL );

wxWindow *GetWindow() const;
};

// ---------------------------------------------------------------------------
// wxQueryNewPaletteEvent

#include "wx/event.h"

class %delete wxQueryNewPaletteEvent : public wxEvent
{
%wxEventType wxEVT_QUERY_NEW_PALETTE // EVT_QUERY_NEW_PALETTE(func );

wxQueryNewPaletteEvent(wxWindowID winid = 0 );

void SetPaletteRealized(bool realized );
bool GetPaletteRealized() const;
};

// ---------------------------------------------------------------------------
// wxPaletteChangedEvent

#include "wx/event.h"

class %delete wxPaletteChangedEvent : public wxEvent
{
%wxEventType wxEVT_PALETTE_CHANGED // EVT_PALETTE_CHANGED(func );

wxPaletteChangedEvent(wxWindowID winid = 0 );

void SetChangedWindow(wxWindow* win );
wxWindow* GetChangedWindow() const;
};

// ---------------------------------------------------------------------------
// wxKeyEvent

enum wxKeyCode
{
WXK_ADD,
WXK_ALT,
WXK_BACK,
WXK_CANCEL,
WXK_CAPITAL,
WXK_CLEAR,
WXK_CONTROL,
WXK_DECIMAL,
WXK_DELETE,
WXK_DIVIDE,
WXK_DOWN,
WXK_END,
WXK_ESCAPE,
WXK_EXECUTE,
WXK_F1,
WXK_F10,
WXK_F11,
WXK_F12,
WXK_F13,
WXK_F14,
WXK_F15,
WXK_F16,
WXK_F17,
WXK_F18,
WXK_F19,
WXK_F2,
WXK_F20,
WXK_F21,
WXK_F22,
WXK_F23,
WXK_F24,
WXK_F3,
WXK_F4,
WXK_F5,
WXK_F6,
WXK_F7,
WXK_F8,
WXK_F9,
WXK_HELP,
WXK_HOME,
WXK_INSERT,
WXK_LBUTTON,
WXK_LEFT,
WXK_MBUTTON,
WXK_MENU,
WXK_MULTIPLY,
//WXK_NEXT = WXK_PAGEDOWN since 2.6
WXK_NUMLOCK,
WXK_NUMPAD_ADD,
WXK_NUMPAD_BEGIN,
WXK_NUMPAD_DECIMAL,
WXK_NUMPAD_DELETE,
WXK_NUMPAD_DIVIDE,
WXK_NUMPAD_DOWN,
WXK_NUMPAD_END,
WXK_NUMPAD_ENTER,
WXK_NUMPAD_EQUAL,
WXK_NUMPAD_F1,
WXK_NUMPAD_F2,
WXK_NUMPAD_F3,
WXK_NUMPAD_F4,
WXK_NUMPAD_HOME,
WXK_NUMPAD_INSERT,
WXK_NUMPAD_LEFT,
WXK_NUMPAD_MULTIPLY,
// WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN since 2.6
WXK_NUMPAD_PAGEDOWN,
WXK_NUMPAD_PAGEUP,
// WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP since 2.6
WXK_NUMPAD_RIGHT,
WXK_NUMPAD_SEPARATOR,
WXK_NUMPAD_SPACE,
WXK_NUMPAD_SUBTRACT,
WXK_NUMPAD_TAB,
WXK_NUMPAD_UP,
WXK_NUMPAD0,
WXK_NUMPAD1,
WXK_NUMPAD2,
WXK_NUMPAD3,
WXK_NUMPAD4,
WXK_NUMPAD5,
WXK_NUMPAD6,
WXK_NUMPAD7,
WXK_NUMPAD8,
WXK_NUMPAD9,
WXK_PAGEDOWN,
WXK_PAGEUP,
WXK_PAUSE,
WXK_PRINT,
// WXK_PRIOR = WXK_PAGEUP since 2.6
WXK_RBUTTON,
WXK_RETURN,
WXK_RIGHT,
WXK_SCROLL,
WXK_SELECT,
WXK_SEPARATOR,
WXK_SHIFT,
WXK_SNAPSHOT,
WXK_SPACE,
WXK_START,
WXK_SUBTRACT,
WXK_TAB,
WXK_UP
};

#include "wx/event.h"

class %delete wxKeyEvent : public wxEvent
{
%wxEventType wxEVT_KEY_DOWN // EVT_KEY_DOWN(func );
%wxEventType wxEVT_KEY_UP // EVT_KEY_UP(func );
%wxEventType wxEVT_CHAR // EVT_CHAR(func );
%wxEventType wxEVT_CHAR_HOOK // EVT_CHAR_HOOK(func );
wxUSE_HOTKEY %wxEventType wxEVT_HOTKEY // EVT_HOTKEY(winid, func );

wxKeyEvent(wxEventType keyEventType );

bool AltDown() const;
bool CmdDown() const;
bool ControlDown() const;
int GetKeyCode() const;
%wxchkver_2_8 int GetModifiers() const;
wxPoint GetPosition() const;

// %override [long x, long y] wxKeyEvent::GetPositionXY( );
// C++ Func: void GetPosition(long *x, long *y) const;
%rename GetPositionXY void GetPosition() const;

//wxUint32 GetRawKeyCode() const;
//wxUint32 GetRawKeyFlags() const;
//wxChar GetUnicodeKey() const;
long GetX( );
long GetY() const;
bool HasModifiers() const;
bool MetaDown() const;
bool ShiftDown() const;
};

// ---------------------------------------------------------------------------
// wxNavigationKeyEvent

#include "wx/event.h"

enum wxNavigationKeyEvent::dummy
{
IsBackward,
IsForward,
WinChange,
FromTab
};

class %delete wxNavigationKeyEvent : public wxEvent
{
%wxEventType wxEVT_NAVIGATION_KEY // EVT_NAVIGATION_KEY(func );

wxNavigationKeyEvent( );

bool GetDirection() const;
void SetDirection(bool bForward );
bool IsWindowChange() const;
void SetWindowChange(bool bIs );
bool IsFromTab() const;
void SetFromTab(bool bIs );
wxWindow* GetCurrentFocus() const;
void SetCurrentFocus(wxWindow *win );
void SetFlags(long flags );
};

// ---------------------------------------------------------------------------
// wxIdleEvent

#include "wx/event.h"

enum wxIdleMode
{
wxIDLE_PROCESS_ALL,
wxIDLE_PROCESS_SPECIFIED
};

class %delete wxIdleEvent : public wxEvent
{
%wxEventType wxEVT_IDLE // EVT_IDLE(func );

wxIdleEvent( );

!%wxchkver_2_9_2 static bool CanSend(wxWindow* window );
static wxIdleMode GetMode( );
void RequestMore(bool needMore = true );
bool MoreRequested() const;
static void SetMode(wxIdleMode mode );
};

// ---------------------------------------------------------------------------
// wxInitDialogEvent - for dialogs and panels

#include "wx/event.h"

class %delete wxInitDialogEvent : public wxEvent
{
%wxEventType wxEVT_INIT_DIALOG // EVT_INIT_DIALOG(func );

wxInitDialogEvent(int id = 0 );
};

// ---------------------------------------------------------------------------
// wxContextMenuEvent

class %delete wxContextMenuEvent : public wxCommandEvent
{
%wxEventType wxEVT_CONTEXT_MENU // EVT_CONTEXT_MENU(func) EVT_COMMAND_CONTEXT_MENU(winid, func );

wxContextMenuEvent(wxEventType type = wxEVT_NULL, wxWindowID winid = 0, const wxPoint& pt = wxDefaultPosition );
//wxContextMenuEvent(const wxContextMenuEvent& event );

wxPoint GetPosition() const;
void SetPosition(const wxPoint& pos );
};

// ---------------------------------------------------------------------------
// wxMouseEvent

#include "wx/event.h"

enum
{
wxMOUSE_BTN_ANY,
wxMOUSE_BTN_NONE,
wxMOUSE_BTN_LEFT,
wxMOUSE_BTN_MIDDLE,
wxMOUSE_BTN_RIGHT
};

class %delete wxMouseEvent : public wxEvent
{
%wxEventType wxEVT_ENTER_WINDOW // EVT_ENTER_WINDOW(func );
%wxEventType wxEVT_LEAVE_WINDOW // EVT_LEAVE_WINDOW(func );
%wxEventType wxEVT_LEFT_DCLICK // EVT_LEFT_DCLICK(func );
%wxEventType wxEVT_LEFT_DOWN // EVT_LEFT_DOWN(func );
%wxEventType wxEVT_LEFT_UP // EVT_LEFT_UP(func );
%wxEventType wxEVT_MIDDLE_DCLICK // EVT_MIDDLE_DCLICK(func );
%wxEventType wxEVT_MIDDLE_DOWN // EVT_MIDDLE_DOWN(func );
%wxEventType wxEVT_MIDDLE_UP // EVT_MIDDLE_UP(func );
%wxEventType wxEVT_MOTION // EVT_MOTION(func );
%wxEventType wxEVT_MOUSEWHEEL // EVT_MOUSEWHEEL(func );
%wxEventType wxEVT_RIGHT_DCLICK // EVT_RIGHT_DCLICK(func );
%wxEventType wxEVT_RIGHT_DOWN // EVT_RIGHT_DOWN(func );
%wxEventType wxEVT_RIGHT_UP // EVT_RIGHT_UP(func );

//%wxEventType wxEVT_NC_ENTER_WINDOW // FIXME - these are not used in wxWidgets
//%wxEventType wxEVT_NC_LEAVE_WINDOW
//%wxEventType wxEVT_NC_LEFT_DCLICK
//%wxEventType wxEVT_NC_LEFT_DOWN
//%wxEventType wxEVT_NC_LEFT_UP
//%wxEventType wxEVT_NC_MIDDLE_DCLICK
//%wxEventType wxEVT_NC_MIDDLE_DOWN
//%wxEventType wxEVT_NC_MIDDLE_UP
//%wxEventType wxEVT_NC_MOTION
//%wxEventType wxEVT_NC_RIGHT_DCLICK
//%wxEventType wxEVT_NC_RIGHT_DOWN
//%wxEventType wxEVT_NC_RIGHT_UP

wxMouseEvent(wxEventType mouseEventType = wxEVT_NULL );

bool AltDown( );
bool Button(int button );
bool ButtonDClick(int but = wxMOUSE_BTN_ANY );
bool ButtonDown(int but = wxMOUSE_BTN_ANY );
bool ButtonUp(int but = wxMOUSE_BTN_ANY );
bool CmdDown() const;
bool ControlDown( );
bool Dragging( );
bool Entering( );
wxPoint GetPosition() const;

// %override [long x, long y] wxMouseEvent::GetPositionXY( );
// C++ Func: void GetPosition(wxCoord* x, wxCoord* y) const;
%rename GetPositionXY void GetPosition() const;

wxPoint GetLogicalPosition(const wxDC& dc) const;
int GetLinesPerAction() const;
int GetWheelRotation() const;
int GetWheelDelta() const;
long GetX() const;
long GetY( );
bool IsButton() const;
bool Leaving() const;
bool LeftDClick() const;
bool LeftDown() const;
bool LeftIsDown() const;
bool LeftUp() const;
bool MetaDown() const;
bool MiddleDClick() const;
bool MiddleDown() const;
bool MiddleIsDown() const;
bool MiddleUp() const;
bool Moving() const;
bool RightDClick() const;
bool RightDown() const;
bool RightIsDown() const;
bool RightUp() const;
bool ShiftDown() const;
};

// ---------------------------------------------------------------------------
// wxMouseCaptureChangedEvent

#include "wx/event.h"

class %delete wxMouseCaptureChangedEvent : public wxEvent
{
%wxEventType wxEVT_MOUSE_CAPTURE_CHANGED // EVT_MOUSE_CAPTURE_CHANGED(func );

wxMouseCaptureChangedEvent(wxWindowID winid = 0, wxWindow* gainedCapture = NULL );

wxWindow* GetCapturedWindow() const;
};

// ---------------------------------------------------------------------------
// wxMouseCaptureLostEvent

#if %wxchkver_2_8

#include "wx/event.h"

class %delete wxMouseCaptureLostEvent : public wxEvent
{
%wxEventType wxEVT_MOUSE_CAPTURE_LOST // EVT_MOUSE_CAPTURE_LOST(func );

wxMouseCaptureLostEvent(wxWindowID winid = 0 );
};

#endif //%wxchkver_2_8

// ---------------------------------------------------------------------------
// wxMoveEvent

#include "wx/event.h"

class %delete wxMoveEvent : public wxEvent
{
%wxEventType wxEVT_MOVE // EVT_MOVE(func );
%wxchkver_2_6 %wxEventType wxEVT_MOVING // EVT_MOVING(func );

wxMoveEvent(const wxPoint& pt, int id = 0 );

wxPoint GetPosition() const;
};

// ---------------------------------------------------------------------------
// wxPaintEvent -
//
// Note: You must ALWAYS create a wxPaintDC for the window and delete() when
// done to have the exposed area marked as painted, otherwise you'll continue
// to get endless paint events.
// Tip: local dc = wx.wxPaintDC(event:GetEventObject():DynamicCast("wxWindow") );
// do stuff with dc...
// dc:delete() -- Absolutely necessary since the garbage collector may
// -- not immediatelly run.

#include "wx/event.h"

class %delete wxPaintEvent : public wxEvent
{
%wxEventType wxEVT_PAINT // EVT_PAINT(func );

wxPaintEvent(int id = 0 );
};

// ---------------------------------------------------------------------------
// wxNcPaintEvent - this is not sent from anything in wxWidgets

//#include "wx/event.h"

//class %delete wxNcPaintEvent : public wxEvent
//{
// %wxEventType wxEVT_NC_PAINT // EVT_NC_PAINT(func );
// wxNcPaintEvent(int winid = 0 );
//};

// ---------------------------------------------------------------------------
// wxProcessEvent

#include "wx/process.h"

class %delete wxProcessEvent : public wxEvent
{
%wxEventType wxEVT_END_PROCESS // EVT_END_PROCESS(id, func );

!%wxchkver_2_6 wxProcessEvent(int id = 0, int pid = 0 );
%wxchkver_2_6 wxProcessEvent(int nId = 0, int pid = 0, int exitcode = 0 );
int GetPid() const;
%wxchkver_2_6 int GetExitCode( );
};

// ---------------------------------------------------------------------------
// wxScrollEvent - for independent scrollbars and sliders

#include "wx/event.h"

class %delete wxScrollEvent : public wxCommandEvent
{
%wxEventType wxEVT_SCROLL_TOP // EVT_SCROLL_TOP(func );
%wxEventType wxEVT_SCROLL_BOTTOM // EVT_SCROLL_BOTTOM(func );
%wxEventType wxEVT_SCROLL_LINEUP // EVT_SCROLL_LINEUP(func );
%wxEventType wxEVT_SCROLL_LINEDOWN // EVT_SCROLL_LINEDOWN(func );
%wxEventType wxEVT_SCROLL_PAGEUP // EVT_SCROLL_PAGEUP(func );
%wxEventType wxEVT_SCROLL_PAGEDOWN // EVT_SCROLL_PAGEDOWN(func );
%wxEventType wxEVT_SCROLL_THUMBTRACK // EVT_SCROLL_THUMBTRACK(func );
%wxEventType wxEVT_SCROLL_THUMBRELEASE // EVT_SCROLL_THUMBRELEASE(func );
%wxcompat_2_6 %wxEventType wxEVT_SCROLL_ENDSCROLL // EVT_SCROLL_ENDSCROLL(func) FIXME called wxEVT_SCROLL_CHANGED in 2.8
%wxchkver_2_8 %wxEventType wxEVT_SCROLL_CHANGED // EVT_SCROLL_CHANGED(func );

wxScrollEvent(wxEventType commandType = wxEVT_NULL, int id = 0, int pos = 0, int orientation = 0 );

int GetOrientation() const;
int GetPosition() const;
};

// ---------------------------------------------------------------------------
// wxScrollWinEvent - for wxScrolledWindows only

#include "wx/event.h"

class %delete wxScrollWinEvent : public wxEvent
{
%wxEventType wxEVT_SCROLLWIN_BOTTOM // EVT_SCROLLWIN_BOTTOM(func );
%wxEventType wxEVT_SCROLLWIN_LINEDOWN // EVT_SCROLLWIN_LINEDOWN(func );
%wxEventType wxEVT_SCROLLWIN_LINEUP // EVT_SCROLLWIN_LINEUP(func );
%wxEventType wxEVT_SCROLLWIN_PAGEDOWN // EVT_SCROLLWIN_PAGEDOWN(func );
%wxEventType wxEVT_SCROLLWIN_PAGEUP // EVT_SCROLLWIN_PAGEUP(func );
%wxEventType wxEVT_SCROLLWIN_THUMBRELEASE // EVT_SCROLLWIN_THUMBRELEASE(func );
%wxEventType wxEVT_SCROLLWIN_THUMBTRACK // EVT_SCROLLWIN_THUMBTRACK(func );
%wxEventType wxEVT_SCROLLWIN_TOP // EVT_SCROLLWIN_TOP(func );

wxScrollWinEvent(wxEventType commandType = wxEVT_NULL, int pos = 0, int orientation = 0 );

int GetOrientation() const;
int GetPosition() const;
};

// ---------------------------------------------------------------------------
// wxSizeEvent

#include "wx/event.h"

class %delete wxSizeEvent : public wxEvent
{
%wxEventType wxEVT_SIZE // EVT_SIZE(func );
%wxchkver_2_6 %wxEventType wxEVT_SIZING // EVT_SIZING(func );

wxSizeEvent(const wxSize& sz, int id = 0 );

wxSize GetSize() const;
};

// ---------------------------------------------------------------------------
// wxShowEvent

#include "wx/event.h"

class %delete wxShowEvent : public wxEvent
{
%wxEventType wxEVT_SHOW // EVT_SHOW(func );

wxShowEvent(int winid = 0, bool show = false );

void SetShow(bool show );
bool GetShow() const;
};

// ---------------------------------------------------------------------------
// wxIconizeEvent

#include "wx/event.h"

class %delete wxIconizeEvent : public wxEvent
{
%wxEventType wxEVT_ICONIZE // EVT_ICONIZE(func );

wxIconizeEvent(int winid = 0, bool iconized = true );

bool Iconized() const;
};

// ---------------------------------------------------------------------------
// wxMaximizeEvent

#include "wx/event.h"

class %delete wxMaximizeEvent : public wxEvent
{
%wxEventType wxEVT_MAXIMIZE // EVT_MAXIMIZE(func );

wxMaximizeEvent(int winid = 0 );
};

// ---------------------------------------------------------------------------
// wxWindowCreateEvent

#include "wx/event.h"

class %delete wxWindowCreateEvent : public wxEvent
{
%wxEventType wxEVT_CREATE // EVT_WINDOW_CREATE(func );

wxWindowCreateEvent(wxWindow *win = NULL );

wxWindow *GetWindow() const;
};

// ---------------------------------------------------------------------------
// wxWindowDestroyEvent

#include "wx/event.h"

class %delete wxWindowDestroyEvent : public wxEvent
{
%wxEventType wxEVT_DESTROY // EVT_WINDOW_DESTROY(func );

wxWindowDestroyEvent(wxWindow *win = NULL );

wxWindow *GetWindow() const;
};

// ---------------------------------------------------------------------------
// wxSysColourChangedEvent

#include "wx/event.h"

class %delete wxSysColourChangedEvent : public wxEvent
{
%wxEventType wxEVT_SYS_COLOUR_CHANGED // EVT_SYS_COLOUR_CHANGED(func );

wxSysColourChangedEvent( );
};

// ---------------------------------------------------------------------------
// wxDisplayChangedEvent

#include "wx/event.h"

class %delete wxDisplayChangedEvent : public wxEvent
{
%wxEventType wxEVT_DISPLAY_CHANGED // EVT_DISPLAY_CHANGED(func );

wxDisplayChangedEvent( );
};


// ---------------------------------------------------------------------------
// wxPowerEvent

#if %wxchkver_2_8

#include "wx/power.h"

enum wxPowerType
{
wxPOWER_SOCKET,
wxPOWER_BATTERY,
wxPOWER_UNKNOWN
};

enum wxBatteryState
{
wxBATTERY_NORMAL_STATE, // system is fully usable
wxBATTERY_LOW_STATE, // start to worry
wxBATTERY_CRITICAL_STATE, // save quickly
wxBATTERY_SHUTDOWN_STATE, // too late
wxBATTERY_UNKNOWN_STATE
};

wxPowerType wxGetPowerType( );
wxBatteryState wxGetBatteryState( );

#if wxHAS_POWER_EVENTS

class %delete wxPowerEvent : public wxEvent
{
%wxEventType wxEVT_POWER_SUSPENDING // EVT_POWER_SUSPENDING(func );
%wxEventType wxEVT_POWER_SUSPENDED // EVT_POWER_SUSPENDED(func );
%wxEventType wxEVT_POWER_SUSPEND_CANCEL // EVT_POWER_SUSPEND_CANCEL(func );
%wxEventType wxEVT_POWER_RESUME // EVT_POWER_RESUME(func );

wxPowerEvent(wxEventType evtType );

void Veto( );
bool IsVetoed() const;
};

#endif // wxHAS_POWER_EVENTS

#endif // %wxchkver_2_8


// ---------------------------------------------------------------------------
// wxSetCursorEvent

#include "wx/event.h"

class %delete wxSetCursorEvent : public wxEvent
{
%wxEventType wxEVT_SET_CURSOR // EVT_SET_CURSOR(func );

wxSetCursorEvent(wxCoord x = 0, wxCoord y = 0 );

wxCoord GetX() const;
wxCoord GetY() const;
void SetCursor(const wxCursor& cursor );
wxCursor GetCursor() const;
bool HasCursor() const;
};

// ---------------------------------------------------------------------------
// wxUpdateUIEvent

#include "wx/event.h"

enum wxUpdateUIMode
{
wxUPDATE_UI_PROCESS_ALL,
wxUPDATE_UI_PROCESS_SPECIFIED
};

class %delete wxUpdateUIEvent : public wxCommandEvent
{
%wxEventType wxEVT_UPDATE_UI // EVT_UPDATE_UI(winid, func) EVT_UPDATE_UI_RANGE(id1, id2, func );

wxUpdateUIEvent(wxWindowID commandId = wxID_ANY );

static bool CanUpdate(wxWindow* window );
void Check(bool check );
void Enable(bool enable );
bool GetChecked() const;
bool GetEnabled() const;
%wxchkver_2_8 bool GetShown() const;
bool GetSetChecked() const;
bool GetSetEnabled() const;
%wxchkver_2_8 bool GetSetShown() const;
bool GetSetText() const;
wxString GetText() const;
static wxUpdateUIMode GetMode( );
static long GetUpdateInterval( );
static void ResetUpdateTime( );
static void SetMode(wxUpdateUIMode mode );
void SetText(const wxString& text );
static void SetUpdateInterval(long updateInterval );
%wxchkver_2_8 void Show(bool show );
};

// ---------------------------------------------------------------------------
// wxHelpEvent

#include "wx/event.h"

#if %wxchkver_2_8
enum wxHelpEvent::Origin
{
Origin_Unknown, // unrecognized event source
Origin_Keyboard, // event generated from F1 key press
Origin_HelpButton // event from [?] button on the title bar (Windows );
};
#endif //%wxchkver_2_8

class %delete wxHelpEvent : public wxCommandEvent
{
%wxEventType wxEVT_HELP // EVT_HELP(winid, func) EVT_HELP_RANGE(id1, id2, func );
%wxEventType wxEVT_DETAILED_HELP // EVT_DETAILED_HELP(winid, func) EVT_DETAILED_HELP_RANGE(id1, id2, func );

!%wxchkver_2_8 wxHelpEvent(wxEventType type = wxEVT_NULL, wxWindowID id = 0, const wxPoint& pt = wxDefaultPosition );
%wxchkver_2_8 wxHelpEvent(wxEventType type = wxEVT_NULL, wxWindowID id = 0, const wxPoint& pt = wxDefaultPosition, wxHelpEvent::Origin origin = wxHelpEvent::Origin_Unknown );

wxString GetLink( );
%wxchkver_2_8 wxHelpEvent::Origin GetOrigin() const;
wxPoint GetPosition( );
wxString GetTarget( );
void SetLink(const wxString& link );
%wxchkver_2_8 void SetOrigin(wxHelpEvent::Origin origin );
void SetPosition(const wxPoint& pos );
void SetTarget(const wxString& target );
};


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


// ===========================================================================
// Purpose: GDI classes, Colour, Pen, Brush, Font, DC, Bitmap...
// 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
// ===========================================================================

// ---------------------------------------------------------------------------
// wxPoint

#if wxLUA_USE_wxPointSizeRect

#include "wx/gdicmn.h"

#define wxDefaultCoord

#define_object wxPoint wxDefaultPosition

class %delete wxPoint
{
//#define_object wxDefaultPosition

wxPoint(int x = 0, int y = 0 );
wxPoint(const wxPoint& pt );

// %override [int x, int y] wxPoint::GetXY( );
// wxLua added function
int GetXY() const;

// %override void wxPoint::Set(int x, int y );
// wxLua added function
void Set(int x, int y );

%rename X %member_func int x; // GetX() and SetX(int x );
%rename Y %member_func int y; // GetY() and SetY(int y );

wxPoint& operator=(const wxPoint& p) const;

bool operator==(const wxPoint& p) const; //{ return x == p.x && y == p.y; }
bool operator!=(const wxPoint& p) const; //{ return !(*this == p); }

// arithmetic operations (component wise );
wxPoint operator+(const wxPoint& p) const; //{ return wxPoint(x + p.x, y + p.y); }
wxPoint operator-(const wxPoint& p) const; //{ return wxPoint(x - p.x, y - p.y); }

wxPoint& operator+=(const wxPoint& p); //{ x += p.x; y += p.y; return *this; }
wxPoint& operator-=(const wxPoint& p); //{ x -= p.x; y -= p.y; return *this; }

wxPoint& operator+=(const wxSize& s); //{ x += s.GetWidth(); y += s.GetHeight(); return *this; }
wxPoint& operator-=(const wxSize& s); //{ x -= s.GetWidth(); y -= s.GetHeight(); return *this; }

wxPoint operator+(const wxSize& s) const; //{ return wxPoint(x + s.GetWidth(), y + s.GetHeight()); }
wxPoint operator-(const wxSize& s) const; //{ return wxPoint(x - s.GetWidth(), y - s.GetHeight()); }

wxPoint operator-() const; //{ return wxPoint(-x, -y); }
};

// ---------------------------------------------------------------------------
// wxPointList

//#if %wxchkver_2_9

//class %delete wxPointList : public wxList
//{
// wxPointList( );
//};

//#endif

// ---------------------------------------------------------------------------
// wxRealPoint - Used nowhere in wxWidgets

//class %delete wxRealPoint
//{
// wxRealPoint(double xx = 0, double yy = 0 );
//
// %rename X double x; // GetX() and SetX(int x );
// %rename Y double y; // GetY() and SetY(int y );
//};

// ---------------------------------------------------------------------------
// wxSize

class %delete wxSize
{
#define_object wxDefaultSize

wxSize(int width = 0, int height = 0 );
wxSize(const wxSize& size );

%wxchkver_2_8 void DecBy(int dx, int dy );
//%wxchkver_2_8 void DecBy(const wxSize& sz );
//%wxchkver_2_8 void DecBy(int d );
void DecTo(const wxSize& sz );
bool IsFullySpecified() const;
int GetHeight() const;
int GetWidth() const;
%wxchkver_2_8 void IncBy(int dx, int dy );
//%wxchkver_2_8 void IncBy(const wxSize& sz );
//%wxchkver_2_8 void IncBy(int d );
void IncTo(const wxSize& sz );
%wxchkver_2_8 wxSize& Scale(float xscale, float yscale );
void Set(int width, int height );
void SetDefaults(const wxSize& size );
void SetHeight(int height );
void SetWidth(int width );

wxSize& operator=(const wxSize& s) const;

bool operator==(const wxSize& sz) const; //{ return x == sz.x && y == sz.y; }
bool operator!=(const wxSize& sz) const; //{ return x != sz.x || y != sz.y; }

wxSize operator+(const wxSize& sz) const; //{ return wxSize(x + sz.x, y + sz.y); }
wxSize operator-(const wxSize& sz) const; //{ return wxSize(x - sz.x, y - sz.y); }
wxSize operator/(int i) const; //{ return wxSize(x / i, y / i); }
wxSize operator*(int i) const; //{ return wxSize(x * i, y * i); }

wxSize& operator+=(const wxSize& sz); //{ x += sz.x; y += sz.y; return *this; }
wxSize& operator-=(const wxSize& sz); //{ x -= sz.x; y -= sz.y; return *this; }
wxSize& operator/=(const int i); //{ x /= i; y /= i; return *this; }
wxSize& operator*=(const int i); //{ x *= i; y *= i; return *this; }
};

// ---------------------------------------------------------------------------
// wxRect

class %delete wxRect
{
wxRect(int x = 0, int y = 0, int w = 0, int h = 0 );
wxRect(const wxRect& rect );
wxRect(const wxPoint& topLeft, const wxPoint& bottomRight );
wxRect(const wxPoint& pos, const wxSize& size );
wxRect(const wxSize& size );

#if %wxchkver_2_8
wxRect CentreIn(const wxRect& r, int dir = wxBOTH) const; // CenterIn
bool Contains(wxCoord dx, wxCoord dy) const;
bool Contains(const wxPoint& pt) const;
bool Contains(const wxRect& rect) const;
#endif // %wxchkver_2_8

wxRect Deflate(wxCoord dx, wxCoord dy) const; //wxRect& Deflate(wxCoord dx, wxCoord dy );
int GetBottom( );
int GetHeight( );
int GetLeft( );
wxPoint GetPosition( );
wxPoint GetTopLeft() const; // GetLeftTop
%wxchkver_2_8 wxPoint GetTopRight() const; // GetRightTop
wxPoint GetBottomRight() const; // GetRightBottom
%wxchkver_2_8 wxPoint GetBottomLeft() const; // GetLeftBottom
int GetRight( );
wxSize GetSize( );
int GetTop( );
int GetWidth( );
int GetX( );
int GetY( );
wxRect Inflate(wxCoord dx, wxCoord dy) const; //wxRect& Inflate(wxCoord dx, wxCoord dy );
%wxcompat_2_6 bool Inside(wxCoord cx, wxCoord cy );
bool Intersects(const wxRect& rect) const;
bool IsEmpty() const;
void Offset(wxCoord dx, wxCoord dy); //void Offset(const wxPoint& pt );
void SetBottom(int bottom );
void SetHeight(int height );
void SetLeft(int left );
void SetPosition(const wxPoint &p );
%wxchkver_2_8 void SetBottomLeft(const wxPoint &p); // SetLeftBottom
void SetBottomRight(const wxPoint &p); // SetRightBottom
void SetRight(int right );
void SetSize(const wxSize &s );
void SetTop(int top );
%wxchkver_2_8 void SetTopRight(const wxPoint &p); // SetRightTop
void SetWidth(int width );
void SetX(int X );
void SetY(int Y );
wxRect Union(const wxRect& rect) const; //wxRect& Union(const wxRect& rect);

wxRect& operator=(const wxRect& r) const;

bool operator==(const wxRect& rect) const;
wxRect operator+(const wxRect& rect) const;
wxRect& operator+=(const wxRect& rect );
};

#endif //wxLUA_USE_wxPointSizeRect

// ---------------------------------------------------------------------------
// wxGDIObject

class %delete wxGDIObject : public wxObject
{
//wxGDIObject() - base class, no constructor since it doesn't do anything

//bool GetVisible() these are NOT USED and have been removed in 2.7
//void SetVisible(bool visible );
bool IsNull( );
};

// ---------------------------------------------------------------------------
// wxRegion

#if wxLUA_USE_wxRegion

#include "wx/region.h"

enum wxRegionContain
{
wxOutRegion,
wxPartRegion,
wxInRegion
};

#if defined(wxHAS_REGION_COMBINE); // MSW and MAC
enum wxRegionOp
{
wxRGN_AND, // Creates the intersection of the two combined regions.
wxRGN_COPY, // Creates a copy of the region
wxRGN_DIFF, // Combines the parts of first region that are not in the second one
wxRGN_OR, // Creates the union of two combined regions.
wxRGN_XOR // Creates the union of two regions except for any overlapping areas.
};

#define wxHAS_REGION_COMBINE 1
#endif // defined(wxHAS_REGION_COMBINE );

class %delete wxRegion : public wxGDIObject
{
wxRegion(long x = 0, long y = 0, long width = 0, long height = 0 );
wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight );
// wxRegion(const wxPoint& pos, const wxSize& size );
wxRegion(const wxRect& rect );
wxRegion(const wxRegion& region );

void Clear( );

#if defined(wxHAS_REGION_COMBINE); // MSW and MAC
bool Combine(wxCoord x, wxCoord y, wxCoord w, wxCoord h, wxRegionOp op);
bool Combine(const wxRect& rect, wxRegionOp op);
bool Combine(const wxRegion& region, wxRegionOp op );
#endif // defined(wxHAS_REGION_COMBINE );

wxRegionContain Contains(long x, long y );
wxRegionContain Contains(const wxPoint& pt );
wxRegionContain Contains(const wxRect& rect );
wxRegionContain Contains(long x, long y, long w, long h );
wxBitmap ConvertToBitmap() const;
wxRect GetBox() const;

// %override [int x, int y, int width, int height] wxRegion::GetBoxXYWH( );
// C++ Func: void GetBox(int &x, int &y, int &width, int &height );
%rename GetBoxXYWH void GetBox( );

bool Intersect(long x, long y, long width, long height );
bool Intersect(const wxRect& rect );
bool Intersect(const wxRegion& region );
bool IsEmpty() const;
%wxchkver_2_8 bool IsEqual(const wxRegion& region) const;
%wxchkver_2_8 bool Ok() const;
bool Subtract(long x, long y, long width, long height );
bool Subtract(const wxRect& rect );
bool Subtract(const wxRegion& region );
bool Offset(wxCoord x, wxCoord y );
bool Union(long x, long y, long width, long height );
bool Union(const wxRect& rect );
bool Union(const wxRegion& region );
bool Union(const wxBitmap& bmp );
bool Union(const wxBitmap& bmp, const wxColour& transColour, int tolerance = 0 );
bool Xor(long x, long y, long width, long height );
bool Xor(const wxRect& rect );
bool Xor(const wxRegion& region );

wxRegion& operator=(const wxRegion& r) const;
// operator == just calls IsEqual( );
};

// ---------------------------------------------------------------------------
// wxRegionIterator

class %delete wxRegionIterator : public wxObject
{
wxRegionIterator(const wxRegion& region );

long GetX( );
long GetY( );
long GetWidth(); // long GetW( );
long GetHeight(); // long GetH( );
wxRect GetRect( );
bool HaveRects( );
void Reset( );

// %override wxRegionIterator::Next() is ++ operator
// This is a wxLua added function.
void Next(); // operator++
};

#endif //wxLUA_USE_wxRegion

// ---------------------------------------------------------------------------
// wxFont

#if wxLUA_USE_wxFont

#include "wx/font.h"

enum
{
wxDEFAULT, // these are deprecated use wxFONTFAMILY_XXX
wxDECORATIVE,
wxROMAN,
wxSCRIPT,
wxSWISS,
wxMODERN,
wxTELETYPE,

wxVARIABLE, // unused ?
wxFIXED, // unused ?

wxNORMAL,
wxLIGHT,
wxBOLD,
wxITALIC,
wxSLANT
};

enum wxFontFamily
{
wxFONTFAMILY_DEFAULT,
wxFONTFAMILY_DECORATIVE,
wxFONTFAMILY_ROMAN,
wxFONTFAMILY_SCRIPT,
wxFONTFAMILY_SWISS,
wxFONTFAMILY_MODERN,
wxFONTFAMILY_TELETYPE,
wxFONTFAMILY_MAX,
wxFONTFAMILY_UNKNOWN
};

enum wxFontStyle
{
wxFONTSTYLE_NORMAL,
wxFONTSTYLE_ITALIC,
wxFONTSTYLE_SLANT,
wxFONTSTYLE_MAX
};

enum wxFontWeight
{
wxFONTWEIGHT_NORMAL,
wxFONTWEIGHT_LIGHT,
wxFONTWEIGHT_BOLD,
wxFONTWEIGHT_MAX
};

enum
{
wxFONTFLAG_DEFAULT,
wxFONTFLAG_ITALIC,
wxFONTFLAG_SLANT,
wxFONTFLAG_LIGHT,
wxFONTFLAG_BOLD,
wxFONTFLAG_ANTIALIASED,
wxFONTFLAG_NOT_ANTIALIASED,
wxFONTFLAG_UNDERLINED,
wxFONTFLAG_STRIKETHROUGH,
wxFONTFLAG_MASK
};

class %delete wxFont : public wxGDIObject
{
// Note: use wxNullFont as the object for static functions

#define_object wxNullFont
%rename wxNORMAL_FONT #define_pointer wxLua_wxNORMAL_FONT // hack for wxWidgets >2.7
%rename wxSMALL_FONT #define_pointer wxLua_wxSMALL_FONT
%rename wxITALIC_FONT #define_pointer wxLua_wxITALIC_FONT
%rename wxSWISS_FONT #define_pointer wxLua_wxSWISS_FONT

//wxFont(int pointSize, wxFontFamily family, int style, wxFontWeight weight, const bool underline = false, const wxString& faceName = "", wxFontEncoding encoding = wxFONTENCODING_DEFAULT );
wxFont(int pointSize, int family, int style, int weight, const bool underline = false, const wxString& faceName = "", wxFontEncoding encoding = wxFONTENCODING_DEFAULT );
wxFont(const wxFont& font );

bool IsFixedWidth() const;
static wxFontEncoding GetDefaultEncoding( );
wxString GetFaceName() const;
int GetFamily() const;
wxString GetNativeFontInfoDesc() const;
int GetPointSize() const;
int GetStyle() const;
bool GetUnderlined() const;
int GetWeight() const;
static %gc wxFont* New(int pointSize, wxFontFamily family, int style, wxFontWeight weight, const bool underline = false, const wxString& faceName = "", wxFontEncoding encoding = wxFONTENCODING_DEFAULT );
static %gc wxFont* New(int pointSize, wxFontFamily family, int flags = wxFONTFLAG_DEFAULT, const wxString& faceName = "", wxFontEncoding encoding = wxFONTENCODING_DEFAULT );
static %gc wxFont* New(const wxSize& pixelSize, wxFontFamily family, int style, wxFontWeight weight, const bool underline = false, const wxString& faceName = "", wxFontEncoding encoding = wxFONTENCODING_DEFAULT );
static %gc wxFont* New(const wxSize& pixelSize, wxFontFamily family, int flags = wxFONTFLAG_DEFAULT, const wxString& faceName = "", wxFontEncoding encoding = wxFONTENCODING_DEFAULT );
bool Ok( );
static void SetDefaultEncoding(wxFontEncoding encoding );
%not_overload !%wxchkver_2_8 void SetFaceName(const wxString& faceName );
%not_overload %wxchkver_2_8 bool SetFaceName(const wxString& faceName );
void SetFamily(int family );
%not_overload !%wxchkver_2_8 void SetNativeFontInfo(const wxString& info );
%not_overload %wxchkver_2_8 bool SetNativeFontInfo(const wxString& info );
%wxchkver_2_8 bool SetNativeFontInfoUserDesc(const wxString& info );
void SetPointSize(int pointSize );
void SetStyle(int style );
void SetUnderlined(const bool underlined );
void SetWeight(int weight );

wxFont& operator=(const wxFont& f) const;
bool operator == (const wxFont& font) const;
};

// ---------------------------------------------------------------------------
// wxNativeFontInfo

#include "wx/fontutil.h"

class %delete wxNativeFontInfo
{
wxNativeFontInfo( );
wxNativeFontInfo(const wxNativeFontInfo& info );

// accessors and modifiers for the font elements
int GetPointSize() const;
%msw wxSize GetPixelSize() const; // FIXME wxWidgets has undefined symbol in gtk/mac
wxFontStyle GetStyle() const;
wxFontWeight GetWeight() const;
bool GetUnderlined() const;
wxString GetFaceName() const;
wxFontFamily GetFamily() const;
wxFontEncoding GetEncoding() const;

void SetPointSize(int pointsize );
%msw void SetPixelSize(const wxSize& pixelSize );
void SetStyle(wxFontStyle style );
void SetWeight(wxFontWeight weight );
void SetUnderlined(bool underlined );
%wxchkver_2_8 bool SetFaceName(const wxString& facename );
!%wxchkver_2_8 void SetFaceName(const wxString& facename );
void SetFamily(wxFontFamily family );
void SetEncoding(wxFontEncoding encoding );

// sets the first facename in the given array which is found
// to be valid. If no valid facename is given, sets the
// first valid facename returned by wxFontEnumerator::GetFacenames().
// Does not return a bool since it cannot fail.
%wxchkver_2_8 void SetFaceName(const wxArrayString& facenames );

// it is important to be able to serialize wxNativeFontInfo objects to be
// able to store them (in config file, for example );
bool FromString(const wxString& s);
wxString ToString() const;

// we also want to present the native font descriptions to the user in some
// human-readable form (it is not platform independent neither, but can
// hopefully be understood by the user );
bool FromUserString(const wxString& s );
wxString ToUserString() const;
};

#endif //wxLUA_USE_wxFont

// ---------------------------------------------------------------------------
// wxFontEnumerator

#if wxLUA_USE_wxFontEnumerator

#include "wx/fontenum.h"

class %delete wxFontEnumerator
{
wxFontEnumerator( );

virtual bool EnumerateFacenames( wxFontEncoding encoding = wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false );
virtual bool EnumerateEncodings( const wxString &font = "" );

%wxchkver_2_8 static wxArrayString GetEncodings(const wxString& facename = "" );
%wxchkver_2_8 static wxArrayString GetFacenames(wxFontEncoding encoding = wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false );
!%wxchkver_2_8 wxArrayString* GetEncodings( );
!%wxchkver_2_8 wxArrayString* GetFacenames( );

// Use GetEncodings/Facenames after calling EnumerateXXX
//virtual bool OnFacename(const wxString& facename );
//virtual bool OnFontEncoding(const wxString& facename, const wxString& encoding );
};

#endif //wxLUA_USE_wxFontEnumerator

// ---------------------------------------------------------------------------
// wxFontList

#if wxLUA_USE_wxFontList

class wxFontList
{
#define_pointer wxTheFontList

// No constructor, use wxTheFontList

// Note: we don't gc the returned font as the list will delete it
wxFont* FindOrCreateFont(int pointSize, int family, int style, int weight, bool underline = false, const wxString &faceName = "", wxFontEncoding encoding = wxFONTENCODING_DEFAULT );

// Only use FindOrCreateFont - others deprecated in >2.7
//void AddFont(wxFont* font );
//void RemoveFont(wxFont* font );
};

#endif //wxLUA_USE_wxFontList

// ---------------------------------------------------------------------------
// wxFontMapper

#if wxLUA_USE_wxFontMapper

#include "wx/fontmap.h"

class wxFontMapper
{
// No constructor, use static Get() function

wxFontEncoding CharsetToEncoding(const wxString &charset, bool interactive = true );
static wxFontMapper *Get( );

// %override [bool, wxFontEncoding *altEncoding] wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, const wxString &faceName = "", bool interactive = true );
// C++ Func: bool GetAltForEncoding(wxFontEncoding encoding, wxFontEncoding *altEncoding, const wxString &faceName = "", bool interactive = true );
bool GetAltForEncoding(wxFontEncoding encoding, const wxString &faceName = "", bool interactive = true );

// This function is really for wxWidgets internal use
// %rename GetAltForEncodingInternal bool GetAltForEncoding(wxFontEncoding encoding, wxNativeEncodingInfo *info, const wxString &faceName = "", bool interactive = true );

static wxString GetDefaultConfigPath( );
static wxFontEncoding GetEncoding(size_t n );
static wxString GetEncodingDescription(wxFontEncoding encoding );
static wxFontEncoding GetEncodingFromName(const wxString& encoding );
static wxString GetEncodingName(wxFontEncoding encoding );
static size_t GetSupportedEncodingsCount( );
bool IsEncodingAvailable(wxFontEncoding encoding, const wxString &facename = "" );
%wxchkver_2_8 static void Reset( );
void SetDialogParent(wxWindow *parent );
void SetDialogTitle(const wxString &title );
//static wxFontMapper *Set(wxFontMapper *mapper); // wxLua probably doesn't need this
!%wxchkver_2_8 void SetConfig(wxConfigBase *config = NULL );
void SetConfigPath(const wxString &prefix );
};

#endif //wxLUA_USE_wxFontMapper

// ---------------------------------------------------------------------------
// wxColour

#if wxLUA_USE_wxColourPenBrush

#include "wx/colour.h"
#include "wx/gdicmn.h"

#if %wxchkver_2_8
#define wxC2S_NAME // return colour name, when possible
#define wxC2S_CSS_SYNTAX // return colour in rgb(r,g,b) syntax
#define wxC2S_HTML_SYNTAX // return colour in #rrggbb syntax

#define wxALPHA_TRANSPARENT
#define wxALPHA_OPAQUE
#endif // %wxchkver_2_8

class %delete wxColour : public wxGDIObject
{
#define_object wxNullColour
%rename wxBLACK #define_pointer wxLua_wxBLACK // hack for wxWidgets >2.7 wxStockGDI::GetColour
%rename wxWHITE #define_pointer wxLua_wxWHITE
%rename wxRED #define_pointer wxLua_wxRED
%rename wxBLUE #define_pointer wxLua_wxBLUE
%rename wxGREEN #define_pointer wxLua_wxGREEN
%rename wxCYAN #define_pointer wxLua_wxCYAN
%rename wxLIGHT_GREY #define_pointer wxLua_wxLIGHT_GREY

!%wxchkver_2_8 wxColour(unsigned char red, unsigned char green, unsigned char blue );
%wxchkver_2_8 wxColour(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = wxALPHA_OPAQUE );
wxColour(const wxString& colourName );
wxColour(const wxColour& colour );

%wxchkver_2_8 unsigned char Alpha() const;
unsigned char Blue() const;
%wxchkver_2_8 virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;
!%mac long GetPixel() const;
unsigned char Green() const;
bool Ok() const;
unsigned char Red() const;
!%wxchkver_2_8 void Set(unsigned char red, unsigned char green, unsigned char blue );

#if %wxchkver_2_8
void Set(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = wxALPHA_OPAQUE );
bool Set(const wxString &str );
void Set(unsigned long colRGB );
#endif // %wxchkver_2_8

wxColour& operator=(const wxColour& c) const;
bool operator == (const wxColour& c) const;
};

// ---------------------------------------------------------------------------
// wxColourDatabase

class %delete wxColourDatabase
{
wxColourDatabase( );

wxColour Find(const wxString& name) const;
wxString FindName(const wxColour& colour) const;
void AddColour(const wxString& name, const wxColour& colour );
};

// ---------------------------------------------------------------------------
// wxPen

#include "wx/pen.h"

enum wxPenCap
{
wxCAP_BUTT,
wxCAP_PROJECTING,
wxCAP_ROUND
};

enum wxPenStyle
{
wxDOT,
wxDOT_DASH,
wxSOLID,
wxLONG_DASH,
wxSHORT_DASH,
wxUSER_DASH
};

enum wxPenJoin
{
wxJOIN_BEVEL,
wxJOIN_MITER,
wxJOIN_ROUND
};

enum
{
wxTRANSPARENT,

wxSTIPPLE_MASK_OPAQUE,
wxSTIPPLE_MASK,
wxSTIPPLE,
wxBDIAGONAL_HATCH,
wxCROSSDIAG_HATCH,
wxFDIAGONAL_HATCH,
wxCROSS_HATCH,
wxHORIZONTAL_HATCH,
wxVERTICAL_HATCH
};

class %delete wxPen : public wxGDIObject
{
#define_object wxNullPen
%rename wxRED_PEN #define_pointer wxLua_wxRED_PEN // hack for wxWidgets >2.7 wxStockGDI::GetPen
%rename wxCYAN_PEN #define_pointer wxLua_wxCYAN_PEN
%rename wxGREEN_PEN #define_pointer wxLua_wxGREEN_PEN
%rename wxBLACK_PEN #define_pointer wxLua_wxBLACK_PEN
%rename wxWHITE_PEN #define_pointer wxLua_wxWHITE_PEN
%rename wxTRANSPARENT_PEN #define_pointer wxLua_wxTRANSPARENT_PEN
%rename wxBLACK_DASHED_PEN #define_pointer wxLua_wxBLACK_DASHED_PEN
%rename wxGREY_PEN #define_pointer wxLua_wxGREY_PEN
%rename wxMEDIUM_GREY_PEN #define_pointer wxLua_wxMEDIUM_GREY_PEN
%rename wxLIGHT_GREY_PEN #define_pointer wxLua_wxLIGHT_GREY_PEN

wxPen( );
wxPen(const wxColour& colour, int width, wxPenStyle style );
wxPen(const wxString& colourName, int width, wxPenStyle style );
%win wxPen(const wxBitmap& stipple, int width );
wxPen(const wxPen& pen );

wxPenCap GetCap() const;
wxColour GetColour() const; // not wxColur& so we allocate a new one
// int GetDashes(wxDash** dashes) const;
wxPenJoin GetJoin() const;
%win wxBitmap* GetStipple() const;
wxPenStyle GetStyle() const;
int GetWidth() const;
bool Ok() const;
void SetCap(wxPenCap capStyle );

void SetColour(wxColour& colour );
void SetColour(const wxString& colourName );
void SetColour(unsigned char red, unsigned char green, unsigned char blue );

//void SetDashes(int nb_dashes, const wxDash *dash );
void SetJoin(wxPenJoin join_style );
%win void SetStipple(const wxBitmap& stipple );
void SetStyle(wxPenStyle style );
void SetWidth(int width );

wxPen& operator=(const wxPen& p) const;
bool operator == (const wxPen& p) const;
};

// ---------------------------------------------------------------------------
// wxPenList

#if wxLUA_USE_wxPenList

class wxPenList //: public wxList - it's not really derived from a wxList
{
#define_pointer wxThePenList

// No constructor, use wxThePenList

// Note: we don't gc the returned pen as the list will delete it
wxPen* FindOrCreatePen(const wxColour& colour, int width, int style );
};

#endif //wxLUA_USE_wxPenList

// ---------------------------------------------------------------------------
// wxBrush

#include "wx/brush.h"

class %delete wxBrush : public wxGDIObject
{
#define_object wxNullBrush
%rename wxBLUE_BRUSH #define_pointer wxLua_wxBLUE_BRUSH // hack for wxWidgets >2.7 wxStockGDI::GetBrush
%rename wxGREEN_BRUSH #define_pointer wxLua_wxGREEN_BRUSH
%rename wxWHITE_BRUSH #define_pointer wxLua_wxWHITE_BRUSH
%rename wxBLACK_BRUSH #define_pointer wxLua_wxBLACK_BRUSH
%rename wxGREY_BRUSH #define_pointer wxLua_wxGREY_BRUSH
%rename wxMEDIUM_GREY_BRUSH #define_pointer wxLua_wxMEDIUM_GREY_BRUSH
%rename wxLIGHT_GREY_BRUSH #define_pointer wxLua_wxLIGHT_GREY_BRUSH
%rename wxTRANSPARENT_BRUSH #define_pointer wxLua_wxTRANSPARENT_BRUSH
%rename wxCYAN_BRUSH #define_pointer wxLua_wxCYAN_BRUSH
%rename wxRED_BRUSH #define_pointer wxLua_wxRED_BRUSH

wxBrush( );
wxBrush(const wxColour& colour, int style );
wxBrush(const wxString& colourName, int style );
wxBrush(const wxBitmap& stippleBitmap );
wxBrush(const wxBrush& brush );

wxColour GetColour() const;
wxBitmap* GetStipple() const;
int GetStyle() const;
bool IsHatch() const;
bool Ok() const;
void SetColour(wxColour& colour );
void SetColour(const wxString& colourName );
void SetColour(const unsigned char red, const unsigned char green, const unsigned char blue );
void SetStipple(const wxBitmap& bitmap );
void SetStyle(int style );

wxBrush& operator=(const wxBrush& b) const;
bool operator == (const wxBrush& b) const;
};

// ---------------------------------------------------------------------------
// wxBrushList

#if wxLUA_USE_wxBrushList

class wxBrushList // : public wxList - it's not really derived from it
{
#define_pointer wxTheBrushList

// No constructor, use wxTheBrushList

// Note: we don't gc the returned brush as the list will delete it
wxBrush* FindOrCreateBrush(const wxColour& colour, int style );

// Use the wxList methods, see also wxNode
//void AddBrush(wxBrush *brush) internal use for wxWidgets
//void RemoveBrush(wxBrush *brush );
};

#endif //wxLUA_USE_wxBrushList


// ---------------------------------------------------------------------------
// wxStockGDI

#include "wx/gdicmn.h"

#if %wxchkver_2_8

enum wxStockGDI::Item
{
BRUSH_BLACK,
BRUSH_BLUE,
BRUSH_CYAN,
BRUSH_GREEN,
BRUSH_GREY,
BRUSH_LIGHTGREY,
BRUSH_MEDIUMGREY,
BRUSH_RED,
BRUSH_TRANSPARENT,
BRUSH_WHITE,
COLOUR_BLACK,
COLOUR_BLUE,
COLOUR_CYAN,
COLOUR_GREEN,
COLOUR_LIGHTGREY,
COLOUR_RED,
COLOUR_WHITE,
CURSOR_CROSS,
CURSOR_HOURGLASS,
CURSOR_STANDARD,
FONT_ITALIC,
FONT_NORMAL,
FONT_SMALL,
FONT_SWISS,
PEN_BLACK,
PEN_BLACKDASHED,
PEN_CYAN,
PEN_GREEN,
PEN_GREY,
PEN_LIGHTGREY,
PEN_MEDIUMGREY,
PEN_RED,
PEN_TRANSPARENT,
PEN_WHITE,
ITEMCOUNT
};

class wxStockGDI
{
//wxStockGDI() use instance to get the implemented wxStockGDI

//static void DeleteAll( );
static wxStockGDI& instance( );

static const wxBrush* GetBrush(wxStockGDI::Item item );
static const wxColour* GetColour(wxStockGDI::Item item );
static const wxCursor* GetCursor(wxStockGDI::Item item );
// Can be overridden by platform-specific derived classes
virtual const wxFont* GetFont(wxStockGDI::Item item );
static const wxPen* GetPen(wxStockGDI::Item item );
};

#endif // %wxchkver_2_8
#endif //wxLUA_USE_wxColourPenBrush

// ---------------------------------------------------------------------------
// wxPalette

#if wxLUA_USE_wxPalette && wxUSE_PALETTE

#include "wx/palette.h"

class %delete wxPalette : public wxGDIObject
{
#define_object wxNullPalette

wxPalette( );
// wxPalette(int n, const unsigned char* red, const unsigned char* green, const unsigned char* blue) - use Create
wxPalette(const wxPalette& palette );

// %override bool wxPalette::Create(int n, Lua string red, Lua string green, Lua string blue );
// C++ Func: bool Create(int n, const unsigned char* red, const unsigned char* green, const unsigned char* blue );
bool Create(int n, const unsigned char* red, const unsigned char* green, const unsigned char* blue );

int GetColoursCount() const;
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;

// %override [bool, char red, char green, char blue] wxPalette::GetRGB(int pixel) const;
// C++ Func: bool GetRGB(int pixel, unsigned char* red, unsigned char* green, unsigned char* blue) const;
bool GetRGB(int pixel) const;

bool Ok() const;
};

#endif //wxLUA_USE_wxPalette && wxUSE_PALETTE

// ---------------------------------------------------------------------------
// wxIcon

#if wxLUA_USE_wxIcon
typedef void* WXHANDLE

class %delete wxIcon : public wxGDIObject
{
#define_object wxNullIcon

wxIcon( );
wxIcon(const wxString& name, wxBitmapType type, int desiredWidth = -1, int desiredHeight = -1 );
//wxIcon(int width, int height, int depth = -1); // constructor does not exist

%win|%mac|%wxchkver_2_6 void CopyFromBitmap(const wxBitmap& bmp );
int GetDepth( );
int GetHeight( );
int GetWidth( );
bool LoadFile(const wxString& name, wxBitmapType flags );
bool Ok( );
void SetDepth(int d );
void SetHeight(int h );
void SetWidth(int w );
//%win void SetSize(const wxSize& size );

wxIcon& operator=(const wxIcon& i) const;
};

// ---------------------------------------------------------------------------
// wxIconBundle

#include "wx/iconbndl.h"

class %delete wxIconBundle
{
wxIconBundle( );
wxIconBundle( const wxString& file, long type );
wxIconBundle( const wxIcon& icon );
wxIconBundle( const wxIconBundle& ic );

void AddIcon( const wxString& file, long type );
void AddIcon( const wxIcon& icon );

wxIcon GetIcon( const wxSize& size ) const;
// equivalent to GetIcon( wxSize( size, size ) );
wxIcon GetIcon( int size = wxDefaultCoord ) const;
};

#endif //wxLUA_USE_wxIcon

// ---------------------------------------------------------------------------
// wxBitmap

#if wxLUA_USE_wxBitmap

#include "wx/bitmap.h"

//%win class %delete wxBitmapHandler // are these even necessary?
//{
//};

//%win class %delete wxGDIImageHandler
//{
//};
//%wxchkver_2_6&%win class wxGDIImageHandlerList : public wxList
//{
//};

class %delete wxBitmap : public wxGDIObject
{
#define_object wxNullBitmap

wxBitmap( );
wxBitmap(const wxBitmap& bitmap );
wxBitmap( int width, int height, int depth = -1 );
wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_ANY );
wxBitmap(const wxImage &image, int depth = -1 );

// %override wxBitmap(lua string, int width, int height, int depth );
// C++ Func: wxBitmap(const char bits[], int width, int height, int depth = 1 );
// Creates a bitmap from an array of bits in the form of a Lua string.
%override_name wxLua_wxBitmapFromBits_constructor wxBitmap(const char* mono_bits, int width, int height, int depth /* = 1 */);
// %override wxBitmap(LuaTable charTable, int width, int height, int depth );
// C++ Func: wxBitmap(const char bits[], int width, int height, int depth = 1 );
// Creates a bitmap from an array of chars in a Lua table.
%override_name wxLua_wxBitmapFromBitTable_constructor wxBitmap(LuaTable charTable, int width, int height, int depth /* = 1 */);

// %override wxBitmap(LuaTable stringTable where each index is a row in the image );
// C++ Func: wxBitmap(const char **data) Load from XPM
%override_name wxLua_wxBitmapFromXPMData_constructor wxBitmap(LuaTable charTable );

// %override wxBitmap(Lua string of data, int type, int width, int height, int depth = -1 );
// C++ Func: wxBitmap(const void* data, int type, int width, int height, int depth = -1 );
%override_name wxLua_wxBitmapFromData_constructor %win wxBitmap(const wxString& data, int type, int width, int height, int depth /* = -1 */ );

//%win static void AddHandler(wxBitmapHandler* handler );
//%win static void CleanUpHandlers( );
wxImage ConvertToImage( );
bool CopyFromIcon(const wxIcon& icon );
virtual bool Create(int width, int height, int depth = -1 );
//static wxBitmapHandler* FindHandler(const wxString& name );
//static wxBitmapHandler* FindHandler(const wxString& extension, wxBitmapType bitmapType );
//static wxBitmapHandler* FindHandler(wxBitmapType bitmapType );
int GetDepth() const;
//%wxchkver_2_6&%win static wxGDIImageHandlerList& GetHandlers( );
//!%wxchkver_2_6&%win static wxList& GetHandlers( );
int GetHeight() const;
wxPalette* GetPalette() const;
wxMask* GetMask() const;
wxBitmap GetSubBitmap(const wxRect&rect) const;
int GetWidth() const;
//%win static void InitStandardHandlers( );
//%win static void InsertHandler(wxBitmapHandler* handler );
bool LoadFile(const wxString& name, wxBitmapType type );
bool Ok() const;
!%msw&%wxchkver_2_8 virtual wxColour QuantizeColour(const wxColour& colour) const; // msw doesn't derive from wxBitmapBase
//%win static bool RemoveHandler(const wxString& name );
bool SaveFile(const wxString& name, wxBitmapType type, wxPalette* palette = NULL );
void SetDepth(int depth );
void SetHeight(int height );
void SetMask(%ungc wxMask* mask );
%win void SetPalette(const wxPalette& palette );
void SetWidth(int width );

wxBitmap& operator=(const wxBitmap& b) const;
};

#endif //wxLUA_USE_wxBitmap

// ---------------------------------------------------------------------------
// wxCursor

#if wxLUA_USE_wxCursor

//typedef void* WXHANDLE

#include "wx/cursor.h"

enum wxStockCursor
{
wxCURSOR_NONE,
wxCURSOR_ARROW,
wxCURSOR_RIGHT_ARROW,
wxCURSOR_BULLSEYE,
wxCURSOR_CHAR,
wxCURSOR_CROSS,
wxCURSOR_HAND,
wxCURSOR_IBEAM,
wxCURSOR_LEFT_BUTTON,
wxCURSOR_MAGNIFIER,
wxCURSOR_MIDDLE_BUTTON,
wxCURSOR_NO_ENTRY,
wxCURSOR_PAINT_BRUSH,
wxCURSOR_PENCIL,
wxCURSOR_POINT_LEFT,
wxCURSOR_POINT_RIGHT,
wxCURSOR_QUESTION_ARROW,
wxCURSOR_RIGHT_BUTTON,
wxCURSOR_SIZENESW,
wxCURSOR_SIZENS,
wxCURSOR_SIZENWSE,
wxCURSOR_SIZEWE,
wxCURSOR_SIZING,
wxCURSOR_SPRAYCAN,
wxCURSOR_WAIT,
wxCURSOR_WATCH,
wxCURSOR_BLANK,
wxCURSOR_DEFAULT,
%mac wxCURSOR_COPY_ARROW,

#if defined(__X__ );
// Not yet implemented for Windows
wxCURSOR_CROSS_REVERSE,
wxCURSOR_DOUBLE_ARROW,
wxCURSOR_BASED_ARROW_UP,
wxCURSOR_BASED_ARROW_DOWN,
#endif // X11

wxCURSOR_ARROWWAIT,
wxCURSOR_MAX
};

class %delete wxCursor : public wxObject gtk0>// wxObject in gtk, wxGDIImage in msw, wxBitmap in osx
{
#define_object wxNullCursor
%rename wxSTANDARD_CURSOR #define_pointer wxLua_wxSTANDARD_CURSOR // hack for wxWidgets >2.7
%rename wxHOURGLASS_CURSOR #define_pointer wxLua_wxHOURGLASS_CURSOR
%rename wxCROSS_CURSOR #define_pointer wxLua_wxCROSS_CURSOR

wxCursor( );
wxCursor(int id );
wxCursor(const wxImage& image );

#if %wxchkver_2_9_0
wxCursor(const wxString& cursorName, wxBitmapType type, int hotSpotX = 0, int hotSpotY = 0 );
#endif

#if !%wxchkver_2_9_0 && __UNICODE__ && (%win || %mac );
// There is a version that takes a const char[] as the first param that
// gives an error about ambiguous overloads if wxString is ANSI.
wxCursor(const wxString& cursorName, long type, int hotSpotX = 0, int hotSpotY = 0 );
#endif

bool Ok( );

%win int GetWidth( );
%win int GetHeight( );
%win int GetDepth( );
//%win void SetWidth(int width );
//%win void SetHeight(int height );
//%win void SetDepth(int depth );
//%win void SetSize(const wxSize& size );

wxCursor& operator=(const wxCursor& c) const;
};

#endif //wxLUA_USE_wxCursor

// ---------------------------------------------------------------------------
// wxMask

#if wxLUA_USE_wxMask

#include "wx/bitmap.h"

class %delete wxMask : public wxObject
{
wxMask( );
wxMask(const wxBitmap& bitmap );
wxMask(const wxBitmap& bitmap, const wxColour& colour );
%win wxMask(const wxBitmap& bitmap, int index );

bool Create(const wxBitmap& bitmap );
bool Create(const wxBitmap& bitmap, const wxColour& colour );
%win bool Create(const wxBitmap& bitmap, int index );

wxMask& operator=(const wxMask& m) const;
};

#endif //wxLUA_USE_wxMask

// ---------------------------------------------------------------------------
// wxImageList

#if wxLUA_USE_wxImageList

#include "wx/imaglist.h"

#define wxIMAGELIST_DRAW_NORMAL
#define wxIMAGELIST_DRAW_TRANSPARENT
#define wxIMAGELIST_DRAW_SELECTED
#define wxIMAGELIST_DRAW_FOCUSED

#define wxIMAGE_LIST_NORMAL
#define wxIMAGE_LIST_SMALL
#define wxIMAGE_LIST_STATE

class %delete wxImageList : public wxObject
{
wxImageList(int width, int height, bool mask = true, int initialCount = 1 );

int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap );
int Add(const wxBitmap& bitmap, const wxColour& maskColour );
int Add(const wxIcon& icon );
bool Draw(int index, wxDC& dc, int x, int y, int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = false );
wxBitmap GetBitmap(int index) const;
wxIcon GetIcon(int index) const;
int GetImageCount( );

// %override [int width, int height] wxImageList::GetSize(int index );
// C++ Func: void GetSize(int index, int& width, int& height );
void GetSize(int index );

bool Remove(int index );
bool RemoveAll( );
%win bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap );
%gtk|%mac bool Replace(int index, const wxBitmap& bitmap );
//bool ReplaceIcon(int index, const wxIcon& icon );
};

#endif //wxLUA_USE_wxImageList

// ---------------------------------------------------------------------------
// wxDC

#if wxLUA_USE_wxDC

#include "wx/dc.h"

enum wxMappingMode
{
wxMM_TEXT,
wxMM_METRIC,
wxMM_LOMETRIC,
wxMM_TWIPS,
wxMM_POINTS,

!%wxchkver_2_9_2 wxMM_HIMETRIC,
!%wxchkver_2_9_2 wxMM_LOENGLISH,
!%wxchkver_2_9_2 wxMM_HIENGLISH,
!%wxchkver_2_9_2 wxMM_ISOTROPIC,
!%wxchkver_2_9_2 wxMM_ANISOTROPIC
};

enum wxRasterOperationMode
{
wxCLEAR,
wxXOR,
wxINVERT,
wxOR_REVERSE,
wxAND_REVERSE,
wxCOPY,
wxAND,
wxAND_INVERT,
wxNO_OP,
wxNOR,
wxEQUIV,
wxSRC_INVERT,
wxOR_INVERT,
wxNAND,
wxOR,
wxSET,

// wxROP_XXX and wxBLIT_XXX are wxcompat_2_8

wxROP_BLACK,
wxROP_COPYPEN,
wxROP_MASKNOTPEN,
wxROP_MASKPEN,
wxROP_MASKPENNOT,
wxROP_MERGENOTPEN,
wxROP_MERGEPEN,
wxROP_MERGEPENNOT,
wxROP_NOP,
wxROP_NOT,
wxROP_NOTCOPYPEN,
wxROP_NOTMASKPEN,
wxROP_NOTMERGEPEN,
wxROP_NOTXORPEN,
wxROP_WHITE,
wxROP_XORPEN,

wxBLIT_00220326,
wxBLIT_007700E6,
wxBLIT_00990066,
wxBLIT_00AA0029,
wxBLIT_00DD0228,
wxBLIT_BLACKNESS,
wxBLIT_DSTINVERT,
wxBLIT_MERGEPAINT,
wxBLIT_NOTSCRCOPY,
wxBLIT_NOTSRCERASE,
wxBLIT_SRCAND,
wxBLIT_SRCCOPY,
wxBLIT_SRCERASE,
wxBLIT_SRCINVERT,
wxBLIT_SRCPAINT,
wxBLIT_WHITENESS
};

enum wxFloodFillStyle
{
wxFLOOD_BORDER,
wxFLOOD_SURFACE
};

enum wxPolygonFillMode
{
wxODDEVEN_RULE,
wxWINDING_RULE
};

class %delete wxDC : public wxObject
{
// %win wxDC() wxDC is abstract use wxXXXDC

//void BeginDrawing(); // these are deprecated in 2.8 and didn't do anything anyway
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode logicalFunc = wxCOPY, bool useMask = false );
void CalcBoundingBox(wxCoord x, wxCoord y );
void Clear( );
//void ComputeScaleAndOrigin() used internally
void CrossHair(wxCoord x, wxCoord y );
void DestroyClippingRegion( );
wxCoord DeviceToLogicalX(wxCoord x );
wxCoord DeviceToLogicalXRel(wxCoord x );
wxCoord DeviceToLogicalY(wxCoord y );
wxCoord DeviceToLogicalYRel(wxCoord y );
void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc );
void DrawBitmap(const wxBitmap& bitmap, wxCoord x, wxCoord y, bool transparent );
void DrawCheckMark(wxCoord x, wxCoord y, wxCoord width, wxCoord height );
void DrawCheckMark(const wxRect &rect );
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius );
//void DrawCircle(const wxPoint& pt, wxCoord radius );
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height );
//void DrawEllipse(const wxPoint& pt, const wxSize& size );
//void DrawEllipse(const wxRect& rect );
void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double start, double end );
void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y );
void DrawLabel(const wxString& text, const wxBitmap& image, const wxRect& rect, int alignment = wxALIGN_LEFT | wxALIGN_TOP, int indexAccel = -1); //, wxRect *rectBounding = NULL );
void DrawLabel(const wxString& text, const wxRect& rect, int alignment = wxALIGN_LEFT | wxALIGN_TOP, int indexAccel = -1 );
void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 );

//void DrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0 );
// Provide a Lua Table of {{1,2},{3,4},...}, {{x=1,y=2},{x=3,y=4},...}, or {wx.wxPoint(1,2),wx.wxPoint(3,4),...}
void DrawLines(wxPointArray_FromLuaTable points, wxCoord xoffset = 0, wxCoord yoffset = 0 );
//%wxchkver_2_9 void DrawLines(const wxPointList *points, wxCoord xoffset = 0, wxCoord yoffset = 0 );
//!%wxchkver_2_9 void DrawLines(const wxList *points, wxCoord xoffset = 0, wxCoord yoffset = 0 );

//void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fill_style = wxODDEVEN_RULE );
// Provide a Lua Table of {{1,2},{3,4},...}, {{x=1,y=2},{x=3,y=4},...}, or {wx.wxPoint(1,2),wx.wxPoint(3,4),...}
void DrawPolygon(wxPointArray_FromLuaTable points, wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fill_style = wxODDEVEN_RULE );
//%wxchkver_2_9 void DrawPolygon(const wxPointList *points, wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fill_style = wxODDEVEN_RULE );
//!%wxchkver_2_9 void DrawPolygon(const wxList *points, wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fill_style = wxODDEVEN_RULE );

//void DrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fill_style = wxODDEVEN_RULE );

void DrawPoint(wxCoord x, wxCoord y );
void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height );
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle );
void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20 );
#if wxUSE_SPLINES
//void DrawSpline(int n, wxPoint points[] );
// Provide a Lua Table of {{1,2},{3,4},...}, {{x=1,y=2},{x=3,y=4},...}, or {wx.wxPoint(1,2),wx.wxPoint(3,4),...}
void DrawSpline(wxPointArray_FromLuaTable points );
//void DrawSpline(wxList *points );
#endif //wxUSE_SPLINES
void DrawText(const wxString& text, wxCoord x, wxCoord y );
void EndDoc( );
//void EndDrawing(); // these are deprecated in 2.8 and didn't do anything anyway
void EndPage( );
void FloodFill(wxCoord x, wxCoord y, const wxColour& colour, wxFloodFillStyle style=wxFLOOD_SURFACE );

#if %wxchkver_2_8
//void GradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour );
void GradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, const wxPoint& circleCenter );
void GradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection = wxEAST );
wxBitmap GetAsBitmap(const wxRect *subrect = NULL) const;
#endif //%wxchkver_2_8

// alias
const wxBrush& GetBackground( );
int GetBackgroundMode() const;
const wxBrush& GetBrush( );
wxCoord GetCharHeight( );
wxCoord GetCharWidth( );
void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *width, wxCoord *height );
const wxFont& GetFont( );
%wxchkver_2_8 wxLayoutDirection GetLayoutDirection() const;
int GetLogicalFunction( );
int GetMapMode( );
//bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
const wxPen& GetPen( );
bool GetPixel(wxCoord x, wxCoord y, wxColour *colour );
wxSize GetPPI() const;
void GetSize(wxCoord *width, wxCoord *height); // wxSize GetSize() const;
//void GetSizeMM(wxCoord *width, wxCoord *height) const; // wxSize GetSizeMM() const;
const wxColour& GetTextBackground() const;

// %override [int x, int y, int descent, int externalLeading] int wxDC::GetTextExtent(const wxString& string, const wxFont* font = NULL );
// C++ Func: void GetTextExtent(const wxString& string, wxCoord* x, wxCoord* y, wxCoord* descent = NULL, wxCoord* externalLeading = NULL, const wxFont* font = NULL );
void GetTextExtent(const wxString& string, wxFont *font = NULL );

%wxchkver_2_8 %rename GetTextExtentSize wxSize GetTextExtent(const wxString& string) const;

// %override [int x, int y, int heightLine] int wxDC::GetMultiLineTextExtent(const wxString& string, const wxFont* font = NULL );
// C++ Func: void GetMultiLineTextExtent(const wxString& string, wxCoord* x, wxCoord* y, wxCoord* heightLine = NULL, const wxFont* font = NULL );
%wxchkver_2_8 void GetMultiLineTextExtent(const wxString& string, wxFont *font = NULL) const;

%wxchkver_2_8 %rename GetMultiLineTextExtentSize wxSize GetMultiLineTextExtent(const wxString& string) const;

const wxColour& GetTextForeground( );

// %override [int x, int y] wxDC::GetUserScale( );
// C++ Func: void GetUserScale(double *x, double *y );
void GetUserScale( );

wxCoord LogicalToDeviceX(wxCoord x );
wxCoord LogicalToDeviceXRel(wxCoord x );
wxCoord LogicalToDeviceY(wxCoord y );
wxCoord LogicalToDeviceYRel(wxCoord y );
wxCoord MaxX( );
wxCoord MaxY( );
wxCoord MinX( );
wxCoord MinY( );
bool IsOk( );
void ResetBoundingBox( );
void SetAxisOrientation(bool xLeftRight, bool yBottomUp );
%wxchkver_2_9_4 virtual double GetContentScaleFactor() const;
void SetBackground(const wxBrush& brush );
void SetBackgroundMode(int mode );
void SetBrush(const wxBrush& brush );
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height );
void SetClippingRegion(const wxRegion& region );
//void SetClippingRegion(const wxPoint& pt, const wxSize& sz );
//void SetClippingRegion(const wxRect& rect );
void SetDeviceOrigin(wxCoord x, wxCoord y );
void SetFont(const wxFont& font );
%wxchkver_2_8 void SetLayoutDirection(wxLayoutDirection dir );
void SetLogicalFunction(wxRasterOperationMode function );
void SetMapMode(wxMappingMode unit );
void SetPalette(const wxPalette& palette );
void SetPen(const wxPen& pen );
void SetTextBackground(const wxColour& colour );
void SetTextForeground(const wxColour& colour );
void SetUserScale(double xScale, double yScale );
bool StartDoc(const wxString& message );
void StartPage( );
};

// ---------------------------------------------------------------------------
// wxMemoryDC

#include "wx/dcmemory.h"

class %delete wxMemoryDC : public wxDC
{
wxMemoryDC( );
void SelectObject(wxBitmap& bitmap); // not const in >=2.8

%wxchkver_2_8 virtual void SelectObjectAsSource(const wxBitmap& bmp );
};

// ---------------------------------------------------------------------------
// wxWindowDC

#include "wx/dcclient.h"

class %delete wxWindowDC : public wxDC
{
wxWindowDC(wxWindow* window );
};

// ---------------------------------------------------------------------------
// wxClientDC

#include "wx/dcclient.h"

class %delete wxClientDC : public wxWindowDC
{
wxClientDC(wxWindow* window );
};

// ---------------------------------------------------------------------------
// wxPaintDC

#include "wx/dcclient.h"

class %delete wxPaintDC : public wxWindowDC // base ok as wxWindowDC since only some platforms have wxClientDC as base
{
wxPaintDC(wxWindow* window );
};

// ---------------------------------------------------------------------------
// wxScreenDC

#include "wx/dcscreen.h"

class %delete wxScreenDC : public wxDC
{
wxScreenDC( );

static bool StartDrawingOnTop(wxWindow* window );
static bool StartDrawingOnTop(wxRect* rect = NULL );
static bool EndDrawingOnTop( );
};

// ---------------------------------------------------------------------------
// wxBufferedDC

#include "wx/dcbuffer.h"

class %delete wxBufferedDC : public wxMemoryDC
{
wxBufferedDC( );
wxBufferedDC(wxDC *dc, const wxSize& area, int style = wxBUFFER_CLIENT_AREA );
wxBufferedDC(wxDC *dc, wxBitmap& buffer, int style = wxBUFFER_CLIENT_AREA); // not const bitmap >= 2.8

void Init(wxDC *dc, const wxSize& area, int style = wxBUFFER_CLIENT_AREA );
void Init(wxDC *dc, wxBitmap& buffer, int style = wxBUFFER_CLIENT_AREA); // not const bitmap in >= 2.8
};

// ---------------------------------------------------------------------------
// wxBufferedPaintDC

#include "wx/dcbuffer.h"

class %delete wxBufferedPaintDC : public wxBufferedDC
{
wxBufferedPaintDC(wxWindow *window, int style = wxBUFFER_CLIENT_AREA );
wxBufferedPaintDC(wxWindow *window, wxBitmap& buffer, int style = wxBUFFER_CLIENT_AREA); // not const bitmap in >= 2.8
};

// ---------------------------------------------------------------------------
// wxAutoBufferedPaintDC

#include "wx/dcbuffer.h"

#if %wxchkver_2_8

#define wxALWAYS_NATIVE_DOUBLE_BUFFER

// This class is derived from a wxPaintDC if wxALWAYS_NATIVE_DOUBLE_BUFFER else wxBufferedPaintDC
// In fact in release mode it's only a #define to either

class %delete wxAutoBufferedPaintDC : public wxDC // base ok as wxDC since no need for others
{
wxAutoBufferedPaintDC(wxWindow *window );
};

#endif // %wxchkver_2_8

// ---------------------------------------------------------------------------
// wxMirrorDC

#include "wx/dcmirror.h"

class %delete wxMirrorDC : public wxDC
{
wxMirrorDC(wxDC& dc, bool mirror );
};

// ---------------------------------------------------------------------------
// wxDCClipper

#include "wx/dc.h"

class %delete wxDCClipper
{
wxDCClipper(wxDC& dc, const wxRect& r );
//wxDCClipper(wxDC& dc, const wxRegion& r );
wxDCClipper(wxDC& dc, wxCoord x, wxCoord y, wxCoord w, wxCoord h );
};

#endif //wxLUA_USE_wxDC

// ---------------------------------------------------------------------------
// wxCaret

#if wxLUA_USE_wxCaret && wxUSE_CARET

#include "wx/caret.h"

class %delete wxCaret
{
wxCaret( );
wxCaret(wxWindow* window, const wxSize& size );
wxCaret(wxWindow* window, int width, int height );

bool Create(wxWindow* window, const wxSize& size );
bool Create(wxWindow* window, int width, int height );
static int GetBlinkTime( );

// %override [int x, int y] wxCaret::GetPositionXY( );
// C++ Func: void GetPosition(int *x, int *y );
%rename GetPositionXY void GetPosition( );

wxPoint GetPosition( );

// %override [int x, int y] wxCaret::GetSizeWH( );
// C++ Func: void GetSize(int *x, int *y );
%rename GetSizeWH void GetSize( );

wxSize GetSize( );
wxWindow *GetWindow( );
void Hide( );
bool IsOk( );
bool IsVisible( );
void Move(int x, int y );
void Move(const wxPoint& pt );
static void SetBlinkTime(int ms );
void SetSize(int width, int height );
void SetSize(const wxSize& size );
void Show(bool show = true );
};

// ---------------------------------------------------------------------------
// wxCaretSuspend

#include "wx/caret.h"

class %delete wxCaretSuspend
{
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxCaretSuspend(wxWindow *win = NULL );
};

#endif //wxLUA_USE_wxCaret && wxUSE_CARET

// ---------------------------------------------------------------------------
// wxVideoMode

#if wxLUA_USE_wxDisplay && wxUSE_DISPLAY

#include "wx/display.h"

class %delete wxVideoMode
{
#define_object wxDefaultVideoMode

wxVideoMode(int width = 0, int height = 0, int depth = 0, int freq = 0 );

bool Matches(const wxVideoMode& other) const;
int GetWidth() const;
int GetHeight() const;
int GetDepth() const;
bool IsOk() const;

bool operator==(const wxVideoMode& v) const;
};

// ---------------------------------------------------------------------------
// wxArrayVideoModes

class %delete wxArrayVideoModes
{
wxArrayVideoModes( );
wxArrayVideoModes(const wxArrayVideoModes& array );

void Add(const wxVideoMode& vm, size_t copies = 1 );
void Alloc(size_t nCount );
void Clear( );
void Empty( );
int GetCount() const;
void Insert(const wxVideoMode& vm, int nIndex, size_t copies = 1 );
bool IsEmpty( );
wxVideoMode Item(size_t nIndex) const;
wxVideoMode Last( );
void RemoveAt(size_t nIndex, size_t count = 1 );
void Shrink( );

wxVideoMode& operator[](size_t nIndex );
};

// ---------------------------------------------------------------------------
// wxDisplay

class %delete wxDisplay
{
wxDisplay(size_t index = 0 );

bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode );
static size_t GetCount( );
wxVideoMode GetCurrentMode() const;
// int GetDepth() const; // in docs BUT not in C++ header
static int GetFromPoint(const wxPoint& pt );
%wxchkver_2_8|!%gtk static int GetFromWindow(wxWindow* win );
wxRect GetGeometry() const;
%wxchkver_2_8 wxRect GetClientArea() const;
wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode) const;
wxString GetName() const;
bool IsOk() const;
bool IsPrimary( );
};

#endif //wxLUA_USE_wxDisplay && wxUSE_DISPLAY

// ---------------------------------------------------------------------------
// wxEffects

#include "wx/effects.h"

class %delete wxEffects : public wxObject
{
wxEffects(); // use system default colours
wxEffects(const wxColour& highlightColour, const wxColour& lightShadow, const wxColour& faceColour, const wxColour& mediumShadow, const wxColour& darkShadow );

wxColour GetHighlightColour() const;
wxColour GetLightShadow() const;
wxColour GetFaceColour() const;
wxColour GetMediumShadow() const;
wxColour GetDarkShadow() const;

void SetHighlightColour(const wxColour& c );
void SetLightShadow(const wxColour& c );
void SetFaceColour(const wxColour& c );
void SetMediumShadow(const wxColour& c );
void SetDarkShadow(const wxColour& c );

void Set(const wxColour& highlightColour, const wxColour& lightShadow, const wxColour& faceColour, const wxColour& mediumShadow, const wxColour& darkShadow );

void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1 );
bool TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap );
};

// ---------------------------------------------------------------------------
// wxRenderer

#if wxLUA_USE_wxRenderer

#include "wx/renderer.h"

%wxHAS_NATIVE_RENDERER #define wxHAS_NATIVE_RENDERER 1

enum
{
wxCONTROL_DISABLED, //= 0x00000001, // control is disabled
wxCONTROL_FOCUSED, //= 0x00000002, // currently has keyboard focus
wxCONTROL_PRESSED, //= 0x00000004, // (button) is pressed
wxCONTROL_SPECIAL, //= 0x00000008, // control-specific bit:
wxCONTROL_ISDEFAULT, //= wxCONTROL_SPECIAL, // only for the buttons
wxCONTROL_ISSUBMENU, //= wxCONTROL_SPECIAL, // only for the menu items
wxCONTROL_EXPANDED, //= wxCONTROL_SPECIAL, // only for the tree items
wxCONTROL_SIZEGRIP, //= wxCONTROL_SPECIAL, // only for the status bar panes
wxCONTROL_CURRENT, //= 0x00000010, // mouse is currently over the control
wxCONTROL_SELECTED, //= 0x00000020, // selected item in e.g. listbox
wxCONTROL_CHECKED, //= 0x00000040, // (check/radio button) is checked
wxCONTROL_CHECKABLE, //= 0x00000080, // (menu) item can be checked
wxCONTROL_UNDETERMINED, //= wxCONTROL_CHECKABLE, // (check) undetermined state

wxCONTROL_FLAGS_MASK, //= 0x000000ff,

// this is a pseudo flag not used directly by wxRenderer but rather by some
// controls internally
wxCONTROL_DIRTY //= 0x80000000
};

struct %delete wxSplitterRenderParams
{
// the only way to initialize this struct is by using this ctor
wxSplitterRenderParams(wxCoord widthSash_, wxCoord border_, bool isSens_ );

const wxCoord widthSash; // the width of the splitter sash
const wxCoord border; // the width of the border of the splitter window
const bool isHotSensitive; // true if the splitter changes its appearance when the mouse is over it
};


// extra optional parameters for DrawHeaderButton
struct %delete wxHeaderButtonParams
{
wxHeaderButtonParams( );

wxColour m_arrowColour;
wxColour m_selectionColour;
wxString m_labelText;
wxFont m_labelFont;
wxColour m_labelColour;
wxBitmap m_labelBitmap;
int m_labelAlignment;
};

enum wxHeaderSortIconType
{
wxHDR_SORT_ICON_NONE, // Header button has no sort arrow
wxHDR_SORT_ICON_UP, // Header button an an up sort arrow icon
wxHDR_SORT_ICON_DOWN // Header button an a down sort arrow icon
};

// the current version and age of wxRendererNative interface: different
// versions are incompatible (in both ways) while the ages inside the same
// version are upwards compatible, i.e. the version of the renderer must
// match the version of the main program exactly while the age may be
// highergreater or equal to it
enum wxRendererVersion::dummy
{
Current_Version, //= 1,
Current_Age //= 5
};

// wxRendererNative interface version
struct %delete wxRendererVersion
{
wxRendererVersion(int version_, int age_ );

// check if the given version is compatible with the current one
static bool IsCompatible(const wxRendererVersion& ver );

const int version;
const int age;
};


class %delete wxRendererNative
{
// pseudo constructors
// -------------------
// return the currently used renderer
static wxRendererNative& Get();
// return the generic implementation of the renderer
static wxRendererNative& GetGeneric();
// return the default (native) implementation for this platform
static wxRendererNative& GetDefault();


// draw the header control button (used by wxListCtrl) Returns optimal
// width for the label contents.
virtual int DrawHeaderButton(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0, wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, wxHeaderButtonParams* params=NULL); //= 0;

// Draw the contents of a header control button (label, sort arrows, etc. );
// Normally only called by DrawHeaderButton.
virtual int DrawHeaderButtonContents(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0, wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE, wxHeaderButtonParams* params=NULL); //= 0;

// Returns the default height of a header button, either a fixed platform
// height if available, or a generic height based on the window's font.
virtual int GetHeaderButtonHeight(wxWindow *win); //= 0;

// draw the expanded/collapsed icon for a tree control item
virtual void DrawTreeItemButton(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0); //= 0;

// draw the border for sash window: this border must be such that the sash
// drawn by DrawSash() blends into it well
virtual void DrawSplitterBorder(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0); //= 0;

// draw a (vertical) sash
virtual void DrawSplitterSash(wxWindow *win, wxDC& dc, const wxSize& size, wxCoord position, wxOrientation orient, int flags = 0); //= 0;

// draw a combobox dropdown button
// flags may use wxCONTROL_PRESSED and wxCONTROL_CURRENT
virtual void DrawComboBoxDropButton(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0); //= 0;

// draw a dropdown arrow
// flags may use wxCONTROL_PRESSED and wxCONTROL_CURRENT
virtual void DrawDropArrow(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0); //= 0;

// draw check button
// flags may use wxCONTROL_CHECKED, wxCONTROL_UNDETERMINED and wxCONTROL_CURRENT
virtual void DrawCheckBox(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0); //= 0;

// draw blank button
// flags may use wxCONTROL_PRESSED, wxCONTROL_CURRENT and wxCONTROL_ISDEFAULT
virtual void DrawPushButton(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0); //= 0;

// draw rectangle indicating that an item in e.g. a list control has been selected or focused
// flags may use
// wxCONTROL_SELECTED (item is selected, e.g. draw background );
// wxCONTROL_CURRENT (item is the current item, e.g. dotted border );
// wxCONTROL_FOCUSED (the whole control has focus, e.g. blue background vs. grey otherwise );
virtual void DrawItemSelectionRect(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0); //= 0;

// geometry functions
// ------------------

// get the splitter parameters: the x field of the returned point is the
// sash width and the y field is the border width
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win); //= 0;

// changing the global renderer
// ----------------------------

#if wxUSE_DYNLIB_CLASS
// load the renderer from the specified DLL, the returned pointer must be
// deleted by caller if not NULL when it is not used any more
static %gc wxRendererNative *Load(const wxString& name);
#endif // wxUSE_DYNLIB_CLASS

// set the renderer to use, passing NULL reverts to using the default
// renderer
//
// return the previous renderer used with Set() or NULL if none
static %gc wxRendererNative *Set(%ungc wxRendererNative *renderer);

// this function is used for version checking: Load() refuses to load any
// DLLs implementing an older or incompatible version; it should be
// implemented simply by returning wxRendererVersion::Current_XXX values
virtual wxRendererVersion GetVersion() const; //= 0;
};

#endif // wxLUA_USE_wxRenderer


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


// ===========================================================================
// Purpose: wxPoint2DInt, wxRect2DInt and other classes from wx/geometry.h
// 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_Geometry && wxUSE_GEOMETRY

typedef int wxInt32
typedef double wxDouble

enum wxOutCode
{
wxInside,
wxOutLeft,
wxOutRight,
wxOutTop,
wxOutBottom
};

// ---------------------------------------------------------------------------
// wxPoint2DInt

#include "wx/geometry.h"
class %delete wxPoint2DInt
{
//wxPoint2DInt( );
wxPoint2DInt( wxInt32 x=0, wxInt32 y=0 );
wxPoint2DInt( const wxPoint2DInt &pt );
wxPoint2DInt( const wxPoint &pt );

//void GetFloor( wxInt32 *x , wxInt32 *y ) const;
//void GetRounded( wxInt32 *x , wxInt32 *y ) const;
wxDouble GetVectorLength() const;
wxDouble GetVectorAngle() const;
void SetVectorLength( wxDouble length );
void SetVectorAngle( wxDouble degrees );
//void SetPolarCoordinates( wxInt32 angle, wxInt32 length ) - no function body in wxWidgets
void Normalize( );
wxDouble GetDistance( const wxPoint2DInt &pt ) const;
wxDouble GetDistanceSquare( const wxPoint2DInt &pt ) const;
wxInt32 GetDotProduct( const wxPoint2DInt &vec ) const;
wxInt32 GetCrossProduct( const wxPoint2DInt &vec ) const;

//void WriteTo( wxDataOutputStream &stream ) const;
//void ReadFrom( wxDataInputStream &stream );

%rename X %member_func wxInt32 m_x;
%rename Y %member_func wxInt32 m_y;

wxPoint2DInt operator-( );
wxPoint2DInt& operator=(const wxPoint2DInt& pt );
wxPoint2DInt& operator+=(const wxPoint2DInt& pt );
wxPoint2DInt& operator-=(const wxPoint2DInt& pt );
wxPoint2DInt& operator*=(const wxPoint2DInt& pt );
//wxPoint2DInt& operator*=(wxDouble n) - no function body in wxWidgets
//wxPoint2DInt& operator*=(wxInt32 n) - no function body in wxWidgets
wxPoint2DInt& operator/=(const wxPoint2DInt& pt );
//wxPoint2DInt& operator/=(wxDouble n) - no function body in wxWidgets
//wxPoint2DInt& operator/=(wxInt32 n) - no function body in wxWidgets
//operator wxPoint() const;
bool operator==(const wxPoint2DInt& pt) const;
//bool operator!=(const wxPoint2DInt& pt) const;

wxPoint2DInt operator*(wxInt32 n );
};

// ---------------------------------------------------------------------------
// wxPoint2DDouble

#include "wx/geometry.h"
class %delete wxPoint2DDouble
{
//wxPoint2DDouble( );
wxPoint2DDouble( wxDouble x=0, wxDouble y=0 );
wxPoint2DDouble( const wxPoint2DDouble &pt );
wxPoint2DDouble( const wxPoint2DInt &pt );
wxPoint2DDouble( const wxPoint &pt );

//void GetFloor( wxInt32 *x , wxInt32 *y ) const;
//void GetRounded( wxInt32 *x , wxInt32 *y ) const;
wxDouble GetVectorLength() const;
wxDouble GetVectorAngle() const;
void SetVectorLength( wxDouble length );
void SetVectorAngle( wxDouble degrees );
//void SetPolarCoordinates( wxDouble angle, wxDouble length ) - no function body in wxWidgets
//void Normalize() - no function body in wxWidgets
wxDouble GetDistance( const wxPoint2DDouble &pt ) const;
wxDouble GetDistanceSquare( const wxPoint2DDouble &pt ) const;
wxDouble GetDotProduct( const wxPoint2DDouble &vec ) const;
wxDouble GetCrossProduct( const wxPoint2DDouble &vec ) const;

%rename X %member_func wxDouble m_x;
%rename Y %member_func wxDouble m_y;

wxPoint2DDouble operator-( );
wxPoint2DDouble& operator=(const wxPoint2DDouble& pt );
wxPoint2DDouble& operator+=(const wxPoint2DDouble& pt );
wxPoint2DDouble& operator-=(const wxPoint2DDouble& pt );
wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt );
//wxPoint2DDouble& operator*=(wxDouble n );
//wxPoint2DDouble& operator*=(wxInt32 n );
wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt );
//wxPoint2DDouble& operator/=(wxDouble n );
//wxPoint2DDouble& operator/=(wxInt32 n );
bool operator==(const wxPoint2DDouble& pt) const;
//bool operator!=(const wxPoint2DDouble& pt) const;
};

// ---------------------------------------------------------------------------
// wxRect2DDouble

#include "wx/geometry.h"
class %delete wxRect2DDouble
{
//wxRect2DDouble( );
wxRect2DDouble(wxDouble x=0, wxDouble y=0, wxDouble w=0, wxDouble h=0 );
wxRect2DDouble(const wxRect2DDouble& rect );

wxPoint2DDouble GetPosition( );
wxSize GetSize( );
wxDouble GetLeft() const;
void SetLeft( wxDouble n );
void MoveLeftTo( wxDouble n );
wxDouble GetTop() const;
void SetTop( wxDouble n );
void MoveTopTo( wxDouble n );
wxDouble GetBottom() const;
void SetBottom( wxDouble n );
void MoveBottomTo( wxDouble n );
wxDouble GetRight() const;
void SetRight( wxDouble n );
void MoveRightTo( wxDouble n );
wxPoint2DDouble GetLeftTop() const;
void SetLeftTop( const wxPoint2DDouble &pt );
void MoveLeftTopTo( const wxPoint2DDouble &pt );
wxPoint2DDouble GetLeftBottom() const;
void SetLeftBottom( const wxPoint2DDouble &pt );
void MoveLeftBottomTo( const wxPoint2DDouble &pt );
wxPoint2DDouble GetRightTop() const;
void SetRightTop( const wxPoint2DDouble &pt );
void MoveRightTopTo( const wxPoint2DDouble &pt );
wxPoint2DDouble GetRightBottom() const;
void SetRightBottom( const wxPoint2DDouble &pt );
void MoveRightBottomTo( const wxPoint2DDouble &pt );
wxPoint2DDouble GetCentre() const;
void SetCentre( const wxPoint2DDouble &pt );
void MoveCentreTo( const wxPoint2DDouble &pt );
wxOutCode GetOutCode( const wxPoint2DDouble &pt ) const;
bool Contains( const wxPoint2DDouble &pt ) const;
bool Contains( const wxRect2DDouble &rect ) const;
bool IsEmpty() const;
bool HaveEqualSize( const wxRect2DDouble &rect ) const;
//void Inset( wxDouble x, wxDouble y );
void Inset( wxDouble left, wxDouble top, wxDouble right, wxDouble bottom );
void Offset( const wxPoint2DDouble &pt );
void ConstrainTo( const wxRect2DDouble &rect );
wxPoint2DDouble Interpolate( wxInt32 widthfactor , wxInt32 heightfactor );
//static void Intersect( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest );
void Intersect( const wxRect2DDouble &otherRect );
wxRect2DDouble CreateIntersection( const wxRect2DDouble &otherRect ) const;
bool Intersects( const wxRect2DDouble &rect ) const;
//static void Union( const wxRect2DDouble &src1 , const wxRect2DDouble &src2 , wxRect2DDouble *dest );
void Union( const wxRect2DDouble &otherRect );
void Union( const wxPoint2DDouble &pt );
wxRect2DDouble CreateUnion( const wxRect2DDouble &otherRect ) const;
void Scale( wxDouble f );
//void Scale( wxInt32 num , wxInt32 denum );

%rename X %member_func wxDouble m_x;
%rename Y %member_func wxDouble m_y;
%rename Width %member_func wxDouble m_width;
%rename Height %member_func wxDouble m_height;

//wxRect2DDouble& operator = (const wxRect2DDouble& rect) - use copy constructor
bool operator==(const wxRect2DDouble& rect );
//bool operator != (const wxRect2DDouble& rect) const;
};

// ---------------------------------------------------------------------------
// wxRect2DInt

#include "wx/geometry.h"
class %delete wxRect2DInt
{
//wxRect2DInt( );
wxRect2DInt(wxInt32 x=0, wxInt32 y=0, wxInt32 w=0, wxInt32 h=0 );
wxRect2DInt(const wxRect2DInt& rect );
wxRect2DInt( const wxRect& r );
wxRect2DInt(const wxPoint2DInt& topLeft, const wxPoint2DInt& bottomRight );
wxRect2DInt(const wxPoint2DInt& pos, const wxSize& size );

wxPoint2DInt GetPosition( );
wxSize GetSize( );
wxInt32 GetLeft() const;
void SetLeft( wxInt32 n );
void MoveLeftTo( wxInt32 n );
wxInt32 GetTop() const;
void SetTop( wxInt32 n );
void MoveTopTo( wxInt32 n );
wxInt32 GetBottom() const;
void SetBottom( wxInt32 n );
void MoveBottomTo( wxInt32 n );
wxInt32 GetRight() const;
void SetRight( wxInt32 n );
void MoveRightTo( wxInt32 n );
wxPoint2DInt GetLeftTop() const;
void SetLeftTop( const wxPoint2DInt &pt );
void MoveLeftTopTo( const wxPoint2DInt &pt );
wxPoint2DInt GetLeftBottom() const;
void SetLeftBottom( const wxPoint2DInt &pt );
void MoveLeftBottomTo( const wxPoint2DInt &pt );
wxPoint2DInt GetRightTop() const;
void SetRightTop( const wxPoint2DInt &pt );
void MoveRightTopTo( const wxPoint2DInt &pt );
wxPoint2DInt GetRightBottom() const;
void SetRightBottom( const wxPoint2DInt &pt );
void MoveRightBottomTo( const wxPoint2DInt &pt );
wxPoint2DInt GetCentre() const;
void SetCentre( const wxPoint2DInt &pt );
void MoveCentreTo( const wxPoint2DInt &pt );
wxOutCode GetOutCode( const wxPoint2DInt &pt ) const;
bool Contains( const wxPoint2DInt &pt ) const;
bool Contains( const wxRect2DInt &rect ) const;
bool IsEmpty() const;
bool HaveEqualSize( const wxRect2DInt &rect ) const;
//void Inset( wxInt32 x , wxInt32 y );
void Inset( wxInt32 left, wxInt32 top, wxInt32 right, wxInt32 bottom );
void Offset( const wxPoint2DInt &pt );
void ConstrainTo( const wxRect2DInt &rect );
wxPoint2DInt Interpolate( wxInt32 widthfactor , wxInt32 heightfactor );
//static void Intersect( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest );
void Intersect( const wxRect2DInt &otherRect );
wxRect2DInt CreateIntersection( const wxRect2DInt &otherRect ) const;
bool Intersects( const wxRect2DInt &rect ) const;
//static void Union( const wxRect2DInt &src1 , const wxRect2DInt &src2 , wxRect2DInt *dest );
void Union( const wxRect2DInt &otherRect );
void Union( const wxPoint2DInt &pt );
wxRect2DInt CreateUnion( const wxRect2DInt &otherRect ) const;
void Scale( wxInt32 f );
//void Scale( wxInt32 num , wxInt32 denum );

//void WriteTo( wxDataOutputStream &stream ) const;
//void ReadFrom( wxDataInputStream &stream );

%rename X %member_func wxInt32 m_x;
%rename Y %member_func wxInt32 m_y;
%rename Width %member_func wxInt32 m_width;
%rename Height %member_func wxInt32 m_height;

//wxRect2DInt& operator = (const wxRect2DInt& rect) - use copy constructor
bool operator == (const wxRect2DInt& rect) const;
//bool operator != (const wxRect2DInt& rect) const;
};

// ---------------------------------------------------------------------------
// wxTransform2D - an abstract class

//#include "wx/geometry.h"
//
//class %delete wxTransform2D
//{
// virtual void Transform( wxPoint2DInt* pt )const; // = 0
// virtual void Transform( wxRect2DInt* r ) const;
// virtual wxPoint2DInt Transform( const wxPoint2DInt &pt ) const;
// virtual wxRect2DInt Transform( const wxRect2DInt &r ) const;
// virtual void InverseTransform( wxPoint2DInt* pt ) const; // = 0
// virtual void InverseTransform( wxRect2DInt* r ) const;
// virtual wxPoint2DInt InverseTransform( const wxPoint2DInt &pt ) const;
// virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const;
// void wxTransform2D::Transform( wxRect2DInt* r ) const;
// wxPoint2DInt wxTransform2D::Transform( const wxPoint2DInt &pt ) const;
// wxRect2DInt wxTransform2D::Transform( const wxRect2DInt &r ) const;
// void wxTransform2D::InverseTransform( wxRect2DInt* r ) const;
// wxPoint2DInt wxTransform2D::InverseTransform( const wxPoint2DInt &pt ) const;
// wxRect2DInt wxTransform2D::InverseTransform( const wxRect2DInt &r ) const;
//};

#endif //wxLUA_USE_Geometry && wxUSE_GEOMETRY


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


// ===========================================================================
// Purpose: wxHelpController and help related 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
// ===========================================================================

// See wxhtml_html.i for wxHtmlHelp classes


// ---------------------------------------------------------------------------
// wxContextHelp

#if wxLUA_USE_wxHelpController && wxUSE_HELP

#include "wx/cshelp.h"

class %delete wxContextHelp : public wxObject
{
wxContextHelp(wxWindow* win = NULL, bool beginHelp = true );

bool BeginContextHelp(wxWindow* win );
bool EndContextHelp( );

//bool EventLoop( );
//bool DispatchEvent(wxWindow* win, const wxPoint& pt );
//void SetStatus(bool status );
};

// ---------------------------------------------------------------------------
// wxContextHelpButton

#if wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON

#include "wx/cshelp.h"

class wxContextHelpButton : public wxBitmapButton
{
wxContextHelpButton(wxWindow* parent, wxWindowID id = wxID_CONTEXT_HELP, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW );

//void OnContextHelp(wxCommandEvent& event );
};

#endif //wxLUA_USE_wxBitmapButton && wxUSE_BMPBUTTON

// ---------------------------------------------------------------------------
// wxHelpProvider

class %delete wxHelpProvider
{
// No constructor see wxSimpleHelpProvider

// Note that the wxHelpProviderModule will delete the set wxHelpProvider
// so you do not have to delete() it when the program exits. However,
// if you set a different wxHelpProvider you must delete() the previous one.
static %gc wxHelpProvider *Set(%ungc wxHelpProvider *helpProvider );
static wxHelpProvider *Get( );
virtual wxString GetHelp(const wxWindow *window); // pure virtual
%wxchkver_2_8 virtual bool ShowHelpAtPoint(wxWindow *window, const wxPoint& pt, wxHelpEvent::Origin origin );
virtual bool ShowHelp(wxWindow *window );
virtual void AddHelp(wxWindow *window, const wxString& text );
//virtual void AddHelp(wxWindowID id, const wxString& text );
virtual void RemoveHelp(wxWindow* window );
};

// ---------------------------------------------------------------------------
// wxSimpleHelpProvider

class %delete wxSimpleHelpProvider : public wxHelpProvider
{
wxSimpleHelpProvider( );
};

// ---------------------------------------------------------------------------
// wxHelpControllerHelpProvider

class %delete wxHelpControllerHelpProvider : public wxSimpleHelpProvider
{
wxHelpControllerHelpProvider(wxHelpController* hc = NULL );

// The wxHelpController you set must exist for the life of this.
// And this will not delete() it when done.
void SetHelpController(wxHelpController* hc );
wxHelpController* GetHelpController() const;
};

#endif //wxLUA_USE_wxHelpController && wxUSE_HELP


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

// ---------------------------------------------------------------------------
// wxHelpControllerBase and derived help controller classes

#if wxLUA_USE_wxHelpController && wxUSE_HELP

#include "wx/help.h"

#define wxHELP_NETSCAPE // Flags for SetViewer

enum wxHelpSearchMode
{
wxHELP_SEARCH_INDEX,
wxHELP_SEARCH_ALL
};

class %delete wxHelpControllerBase : public wxObject
{
//wxHelpControllerBase() - base class no constructor

virtual void Initialize(const wxString& file );
// virtual void Initialize(const wxString& file, int server) - marked obsolete
virtual bool DisplayBlock(long blockNo );
virtual bool DisplayContents( );
virtual bool DisplayContextPopup(int contextId );
virtual bool DisplaySection(int sectionNo );
virtual bool DisplaySection(const wxString &section );
virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos );

// %override [wxFrame*, wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL] wxHelpControllerBase::GetFrameParameters( );
// C++ Func: virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL );
virtual wxFrame* GetFrameParameters( );

%wxchkver_2_8 virtual wxWindow* GetParentWindow() const;
virtual bool KeywordSearch(const wxString& keyWord, wxHelpSearchMode mode = wxHELP_SEARCH_ALL );
virtual bool LoadFile(const wxString& file = "" );
//virtual bool OnQuit( );
virtual void SetFrameParameters(const wxString& title, const wxSize& size, const wxPoint& pos = wxDefaultPosition, bool newFrameEachTime = false );
%wxchkver_2_8 virtual void SetParentWindow(wxWindow* win );
virtual void SetViewer(const wxString& viewer, long flags );
virtual bool Quit( );
};

// ---------------------------------------------------------------------------
// wxHelpController - wxWidgets #defines it appropriately per platform

class %delete wxHelpController : public wxHelpControllerBase
{
wxHelpController( );
//%wxchkver_2_8 wxHelpController(wxWindow* parentWindow = NULL) wxHTMLHelpController takes different params
};

// ---------------------------------------------------------------------------
// wxWinHelpController

#if %msw

#include "wx/helpwin.h"

class %delete wxWinHelpController : public wxHelpControllerBase
{
wxWinHelpController( );
};

#endif //%msw

// ---------------------------------------------------------------------------
// wxCHMHelpController

//#include "wx/msw/helpchm.h"

//class %delete wxCHMHelpController : public wxHelpControllerBase
//{
// wxCHMHelpController( );
//};

// ---------------------------------------------------------------------------
// wxBestHelpController

#if %msw

#include "wx/msw/helpbest.h"

class %delete wxBestHelpController : public wxHelpControllerBase
{
wxBestHelpController(wxWindow* parentWindow = NULL, int style = wxHF_DEFAULT_STYLE );
};

#endif //%msw

// ---------------------------------------------------------------------------
// wxExtHelpController

#if !%win

#include "wx/generic/helpext.h"

class %delete wxExtHelpController : public wxHelpControllerBase
{
wxExtHelpController( );
};

#endif //!%win

#endif //wxLUA_USE_wxHelpController && wxUSE_HELP


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


// ===========================================================================
// Purpose: wxImage
// 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 wxIMAGE_ALPHA_TRANSPARENT
#define wxIMAGE_ALPHA_THRESHOLD
#define wxIMAGE_ALPHA_OPAQUE

enum wxBitmapType
{
wxBITMAP_TYPE_INVALID,
wxBITMAP_TYPE_BMP,
wxBITMAP_TYPE_BMP_RESOURCE,
wxBITMAP_TYPE_RESOURCE,
wxBITMAP_TYPE_ICO,
wxBITMAP_TYPE_ICO_RESOURCE,
wxBITMAP_TYPE_CUR,
wxBITMAP_TYPE_CUR_RESOURCE,
wxBITMAP_TYPE_XBM,
wxBITMAP_TYPE_XBM_DATA,
wxBITMAP_TYPE_XPM,
wxBITMAP_TYPE_XPM_DATA,
wxBITMAP_TYPE_TIF,
wxBITMAP_TYPE_TIF_RESOURCE,
wxBITMAP_TYPE_GIF,
wxBITMAP_TYPE_GIF_RESOURCE,
wxBITMAP_TYPE_PNG,
wxBITMAP_TYPE_PNG_RESOURCE,
wxBITMAP_TYPE_JPEG,
wxBITMAP_TYPE_JPEG_RESOURCE,
wxBITMAP_TYPE_PNM,
wxBITMAP_TYPE_PNM_RESOURCE,
wxBITMAP_TYPE_PCX,
wxBITMAP_TYPE_PCX_RESOURCE,
wxBITMAP_TYPE_PICT,
wxBITMAP_TYPE_PICT_RESOURCE,
wxBITMAP_TYPE_ICON,
wxBITMAP_TYPE_ICON_RESOURCE,
wxBITMAP_TYPE_ANI,
wxBITMAP_TYPE_IFF,
%wxchkver_2_8 wxBITMAP_TYPE_TGA,
wxBITMAP_TYPE_MACCURSOR,
wxBITMAP_TYPE_MACCURSOR_RESOURCE,
wxBITMAP_TYPE_ANY
};

// ---------------------------------------------------------------------------
// wxImage

#if wxLUA_USE_wxImage && wxUSE_IMAGE

#include "wx/image.h"

%wxchkver_2_6 #define_wxstring wxIMAGE_OPTION_CUR_HOTSPOT_X
%wxchkver_2_6 #define_wxstring wxIMAGE_OPTION_CUR_HOTSPOT_Y

//#define_string wxIMAGE_OPTION_PNG_FORMAT see wxPNGHandler
//#define_string wxIMAGE_OPTION_PNG_BITDEPTH see wxPNGHandler
//#define_string wxIMAGE_OPTION_BMP_FORMAT see wxBMPHandler

#define_wxstring wxIMAGE_OPTION_QUALITY wxT("quality" );
#define_wxstring wxIMAGE_OPTION_FILENAME wxT("FileName" );

#define_wxstring wxIMAGE_OPTION_RESOLUTION wxT("Resolution" );
#define_wxstring wxIMAGE_OPTION_RESOLUTIONX wxT("ResolutionX" );
#define_wxstring wxIMAGE_OPTION_RESOLUTIONY wxT("ResolutionY" );
#define_wxstring wxIMAGE_OPTION_RESOLUTIONUNIT wxT("ResolutionUnit" );

enum
{
// constants used with wxIMAGE_OPTION_RESOLUTIONUNIT
wxIMAGE_RESOLUTION_INCHES,
wxIMAGE_RESOLUTION_CM
};

// Constants for wxImage::Scale() for determining the level of quality
enum wxImageResizeQuality
{
// different image resizing algorithms used by Scale() and Rescale( );
%wxchkver_2_9_2 wxIMAGE_QUALITY_NEAREST,
%wxchkver_2_9_2 wxIMAGE_QUALITY_BILINEAR,
%wxchkver_2_9_2 wxIMAGE_QUALITY_BICUBIC,
%wxchkver_2_9_2 wxIMAGE_QUALITY_BOX_AVERAGE,

// default quality is low (but fast );
%wxchkver_2_8 wxIMAGE_QUALITY_NORMAL,

// highest (but best) quality
%wxchkver_2_8 wxIMAGE_QUALITY_HIGH
};



class %delete wxImage : public wxObject
{
#define_object wxNullImage

wxImage( );
wxImage(const wxImage& image );
wxImage(int width, int height, bool clear=true );
wxImage(const wxString& name, long type = wxBITMAP_TYPE_ANY );

// %override wxImage(int width, int height, unsigned char* data, bool static_data = false );
// C++ Func: wxImage(int width, int height, unsigned char* data, bool static_data = false );
%override_name wxLua_wxImageFromData_constructor wxImage(int width, int height, unsigned char* data, bool static_data = false );

// %override wxLua provides this constructor
%override_name wxLua_wxImageFromBitmap_constructor wxImage(const wxBitmap& bitmap );

static void AddHandler(%ungc wxImageHandler* handler );
%wxchkver_2_8 wxImage Blur(int radius );
%wxchkver_2_8 wxImage BlurHorizontal(int radius );
%wxchkver_2_8 wxImage BlurVertical(int radius );
static void CleanUpHandlers( );
unsigned long ComputeHistogram(wxImageHistogram& histogram) const;
//wxBitmap ConvertToBitmap() const; // - deprecated use wxBitmap constructor
%wxchkver_2_8 wxImage ConvertToGreyscale( double lr = 0.299, double lg = 0.587, double lb = 0.114 ) const;
wxImage ConvertToMono(unsigned char r, unsigned char g, unsigned char b) const;
wxImage Copy() const;
void Create(int width, int height, bool clear=true );
void Destroy( );

// %override [bool, uchar r, uchar g, char b] wxImage::FindFirstUnusedColour(unsigned char startR = 1, unsigned char startG = 0, unsigned char startB = 0 );
// C++ Func: bool FindFirstUnusedColour(unsigned char* r, unsigned char* g, unsigned char* b, unsigned char startR = 1, unsigned char startG = 0, unsigned char startB = 0 );
bool FindFirstUnusedColour(unsigned char startR = 1, unsigned char startG = 0, unsigned char startB = 0 );

static wxImageHandler* FindHandler(const wxString& name );
static wxImageHandler* FindHandler(const wxString& extension, long imageType );
static wxImageHandler* FindHandler(long imageType );
static wxImageHandler* FindHandlerMime(const wxString& mimetype );
static wxString GetImageExtWildcard( );
unsigned char GetAlpha(int x, int y) const;
unsigned char GetBlue(int x, int y) const;

// %override [Lua string] wxImage::GetAlpha() const;
// C++ Func: unsigned char* GetAlpha() const;
%override_name wxLua_wxImage_GetAlphaData unsigned char* GetAlpha() const;

// %override [Lua string] wxImage::GetData() const;
// C++ Func: unsigned char* GetData() const;
unsigned char* GetData() const;

unsigned char GetGreen(int x, int y) const;
static int GetImageCount(const wxString& filename, wxBitmapType type = wxBITMAP_TYPE_ANY );
static int GetImageCount(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY );
static wxList& GetHandlers( );
int GetHeight() const;
unsigned char GetMaskBlue() const;
unsigned char GetMaskGreen() const;
unsigned char GetMaskRed() const;

// %override [bool, uchar r, uchar g, uchar b] wxImage::GetOrFindMaskColour() const;
// C++ Func: bool GetOrFindMaskColour(unsigned char *r, unsigned char *g, unsigned char *b) const;
bool GetOrFindMaskColour() const;

wxPalette GetPalette() const;
unsigned char GetRed(int x, int y) const;
wxImage GetSubImage(const wxRect& rect) const;
int GetWidth() const;

// note: we're tricking generator to not gag on RGB/HSVValue, so pretend to return an int
// %override [r, g, b] wxImage::HSVtoRGB(double h, double s, double v );
// C++ Func: static RGBValue HSVtoRGB(const HSVValue& hsv );
static int HSVtoRGB(double h, double s, double v );

// %override [h, s, v] wxImage::RGBtoHSV(unsigned char r, unsigned char g, unsigned char b );
// C++ Func: static HSVValue RGBtoHSV(const RGBValue& rgb );
static int RGBtoHSV(unsigned char r, unsigned char g, unsigned char b );

bool HasAlpha() const;
bool HasMask() const;
wxString GetOption(const wxString &name) const;
int GetOptionInt(const wxString &name) const;
int HasOption(const wxString &name) const;
void InitAlpha( );
static void InitStandardHandlers( );
static void InsertHandler(%ungc wxImageHandler* handler );
bool IsTransparent(int x, int y, unsigned char threshold = 128) const;

bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_ANY, int index = -1 );
bool LoadFile(const wxString& name, const wxString& mimetype, int index = -1 );
bool LoadFile(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY, int index = -1 );
bool LoadFile(wxInputStream& stream, const wxString& mimetype, int index = -1 );

bool Ok() const;
static bool RemoveHandler(const wxString& name );
wxImage Mirror(bool horizontally = true) const;
void Replace(unsigned char r1, unsigned char g1, unsigned char b1, unsigned char r2, unsigned char g2, unsigned char b2 );
%wxchkver_2_8 wxImage ResampleBox(int width, int height) const;
%wxchkver_2_8 wxImage ResampleBicubic(int width, int height) const;
!%wxchkver_2_8 wxImage& Rescale(int width, int height );
%wxchkver_2_8 wxImage& Rescale( int width, int height, wxImageResizeQuality quality = wxIMAGE_QUALITY_NORMAL );
wxImage& Resize(const wxSize& size, const wxPoint& pos, int red = -1, int green = -1, int blue = -1 );
wxImage Rotate(double angle, const wxPoint& rotationCentre, bool interpolating = true, wxPoint* offsetAfterRotation = NULL );
void RotateHue(double angle );
wxImage Rotate90(bool clockwise = true) const;
bool SaveFile(const wxString& name );
bool SaveFile(const wxString& name, int type );
bool SaveFile(const wxString& name, const wxString& mimetype );
!%wxchkver_2_8 wxImage Scale(int width, int height) const;
%wxchkver_2_8 wxImage Scale( int width, int height, wxImageResizeQuality quality = wxIMAGE_QUALITY_NORMAL ) const;
wxImage Size(const wxSize& size, const wxPoint& pos, int red = -1, int green = -1, int blue = -1) const;
void SetAlpha(int x, int y, unsigned char alpha );

// %override void wxImage::SetAlpha(Lua string) - copy contents of string to image
// C++ Func: void SetAlpha(unsigned char *alpha = NULL,bool static_data = false );
%override_name wxLua_wxImage_SetAlphaData void SetAlpha(const wxString& dataStr );

// %override void wxImage::SetData(Lua string) - copy contents of string to image
// C++ Func: void SetData(unsigned char *data );
void SetData(const wxString& data );

void SetMask(bool hasMask = true );
void SetMaskColour(unsigned char red, unsigned char blue, unsigned char green );
bool SetMaskFromImage(const wxImage& mask, unsigned char mr, unsigned char mg, unsigned char mb );
void SetOption(const wxString &name, const wxString &value );
void SetOption(const wxString &name, int value );
void SetPalette(const wxPalette& palette );
void SetRGB(int x, int y, unsigned char red, unsigned char green, unsigned char blue );
void SetRGB(wxRect& rect, unsigned char red, unsigned char green, unsigned char blue );

wxImage& operator=(const wxImage& image );
//bool operator==(const wxImage& image) const; // not in 2.8
};

// ---------------------------------------------------------------------------
// wxImageHistogram

class %delete wxImageHistogramEntry
{
wxImageHistogramEntry( );
unsigned long index; // GetIndex() only, SetIndex(idx) is not allowed
unsigned long value; // GetValue() and SetValue(val );
};

class %delete wxImageHistogram::iterator
{
long first;
wxImageHistogramEntry second;

// operator used to compare with wxImageHistogram::end() iterator
bool operator==(const wxImageHistogram::iterator& other) const;

//wxImageHistogram::iterator& operator++(); // it just returns *this
void operator++(); // it's best if we don't return the iterator
};

class %delete wxImageHistogram // wxImageHistogramBase actually a hash map
{
wxImageHistogram( );

// get the key in the histogram for the given RGB values
static unsigned long MakeKey(unsigned char r, unsigned char g, unsigned char b );

// Use the function wxImage::FindFirstUnusedColour
//bool FindFirstUnusedColour(unsigned char *r, unsigned char *g, unsigned char *b, unsigned char startR = 1, unsigned char startG = 0, unsigned char startB = 0 ) const;

// Selected functions from the base wxHashMap class
wxImageHistogram::iterator begin() const; // not const iterator since we create a new copy of it
void clear( );
size_t count(long key) const;
bool empty() const;
wxImageHistogram::iterator end() const; // not const iterator since we create a new copy of it
size_t erase(long key );
wxImageHistogram::iterator find(long key );
//Insert_Result insert(const value_type& v );
size_t size() const;
//mapped_type& operator[](const key_type& key );
};

// ---------------------------------------------------------------------------
// wxQuantize

#include "wx/quantize.h"

#define wxQUANTIZE_INCLUDE_WINDOWS_COLOURS
#define wxQUANTIZE_RETURN_8BIT_DATA
#define wxQUANTIZE_FILL_DESTINATION_IMAGE

class wxQuantize : public wxObject
{
// No constructor - all methods static

// %override bool wxQuantize::Quantize(const wxImage& src, wxImage& dest, int desiredNoColours = 236, int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA);
// C++ Func: static bool Quantize(const wxImage& src, wxImage& dest, wxPalette** pPalette, int desiredNoColours = 236, unsigned char** eightBitData = 0, int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA);
static bool Quantize(const wxImage& src, wxImage& dest, int desiredNoColours = 236, int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA);

//static bool Quantize(const wxImage& src, wxImage& dest, int desiredNoColours = 236, unsigned char** eightBitData = 0, int flags = wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE|wxQUANTIZE_RETURN_8BIT_DATA);
//static void DoQuantize(unsigned w, unsigned h, unsigned char **in_rows, unsigned char **out_rows, unsigned char *palette, int desiredNoColours);
};

// ---------------------------------------------------------------------------
// wxImageHandler and derived classes

class %delete wxImageHandler : public wxObject
{
// no constructor - abstract class

wxString GetName() const;
wxString GetExtension() const;
int GetImageCount(wxInputStream& stream );
long GetType() const;
wxString GetMimeType() const;
bool LoadFile(wxImage* image, wxInputStream& stream, bool verbose=true, int index=0 );
bool SaveFile(wxImage* image, wxOutputStream& stream );
void SetName(const wxString& name );
void SetExtension(const wxString& extension );
void SetMimeType(const wxString& mimetype );
void SetType(long type );
};

// ---------------------------------------------------------------------------
// wxBMPHandler and friends in imagbmp.h

#include "wx/imagbmp.h"

enum
{
wxBMP_24BPP,
//wxBMP_16BPP, - remmed out in wxWidgets
wxBMP_8BPP,
wxBMP_8BPP_GREY,
wxBMP_8BPP_GRAY,
wxBMP_8BPP_RED,
wxBMP_8BPP_PALETTE,
wxBMP_4BPP,
wxBMP_1BPP,
wxBMP_1BPP_BW
};

#define_wxstring wxIMAGE_OPTION_BMP_FORMAT wxT("wxBMP_FORMAT"); // wxString(wxT("wxBMP_FORMAT") );

class %delete wxBMPHandler : public wxImageHandler
{
wxBMPHandler( );
};

#if wxUSE_ICO_CUR

class %delete wxICOHandler : public wxBMPHandler
{
wxICOHandler( );
};

class %delete wxCURHandler : public wxICOHandler
{
wxCURHandler( );
};

class %delete wxANIHandler : public wxCURHandler
{
wxANIHandler( );
};

#endif // wxUSE_ICO_CUR

// ---------------------------------------------------------------------------
// wxIFFHandler and friends in imagiff.h

#include "wx/imagiff.h"

#if wxUSE_IFF

class %delete wxIFFHandler : public wxImageHandler
{
wxIFFHandler( );
};

#endif //wxUSE_IFF

// ---------------------------------------------------------------------------
// wxGIFHandler and friends in imaggif.h

#include "wx/imaggif.h"

#if wxUSE_GIF

class %delete wxGIFHandler : public wxImageHandler
{
wxGIFHandler( );
};

#endif //wxUSE_GIF

// ---------------------------------------------------------------------------
// wxJPEGHandler and friends in imagjpeg.h

#include "wx/imagjpeg.h"

#if wxUSE_LIBJPEG

class %delete wxJPEGHandler : public wxImageHandler
{
wxJPEGHandler( );
};

#endif //wxUSE_LIBJPEG

// ---------------------------------------------------------------------------
// wxPCXHandler and friends in imagpcx.h

#include "wx/imagpcx.h"

#if wxUSE_PCX

class %delete wxPCXHandler : public wxImageHandler
{
wxPCXHandler( );
};

#endif //wxUSE_PCX

// ---------------------------------------------------------------------------
// wxPNGHandler and friends in imagpng.h

#include "wx/imagpng.h"

#if wxUSE_LIBPNG

#define_wxstring wxIMAGE_OPTION_PNG_FORMAT // wxT("PngFormat" );
#define_wxstring wxIMAGE_OPTION_PNG_BITDEPTH // wxT("PngBitDepth" );

enum
{
wxPNG_TYPE_COLOUR,
wxPNG_TYPE_GREY,
wxPNG_TYPE_GREY_RED
};

class %delete wxPNGHandler : public wxImageHandler
{
wxPNGHandler( );
};

#endif //wxUSE_LIBPNG

// ---------------------------------------------------------------------------
// wxPNMHandler and friends in imagpnm.h

#include "wx/imagpnm.h"

#if wxUSE_PNM

class %delete wxPNMHandler : public wxImageHandler
{
wxPNMHandler( );
};

#endif //wxUSE_PNM

// ---------------------------------------------------------------------------
// wxTIFFHandler and friends in imagtiff.h

#include "wx/imagtiff.h"

#if wxUSE_LIBTIFF

#define_wxstring wxIMAGE_OPTION_BITSPERSAMPLE wxT("BitsPerSample" );
#define_wxstring wxIMAGE_OPTION_SAMPLESPERPIXEL wxT("SamplesPerPixel" );
#define_wxstring wxIMAGE_OPTION_COMPRESSION wxT("Compression" );
#define_wxstring wxIMAGE_OPTION_IMAGEDESCRIPTOR wxT("ImageDescriptor" );

class %delete wxTIFFHandler : public wxImageHandler
{
wxTIFFHandler( );
};

#endif //wxUSE_LIBTIFF

// ---------------------------------------------------------------------------
// wxTGAHandler and friends in imagtga.h

#if %wxchkver_2_8 && wxUSE_TGA

#include "wx/imagtga.h"

class %delete wxTGAHandler : public wxImageHandler
{
wxTGAHandler( );
};

#endif // %wxchkver_2_8 && wxUSE_TGA

// ---------------------------------------------------------------------------
// wxXPMHandler and friends in imagxpm.h

#include "wx/imagxpm.h"

class %delete wxXPMHandler : public wxImageHandler
{
wxXPMHandler( );
};


#endif //wxLUA_USE_wxImage && wxUSE_IMAGE

// ---------------------------------------------------------------------------
// wxArtProvider and friends

#if wxLUA_USE_wxArtProvider

#include "wx/artprov.h"

//typedef wxString wxArtClient Just treat these as wxStrings
//typedef wxString wxArtID

// ----------------------------------------------------------------------------
// Art clients
// ----------------------------------------------------------------------------

#if %wxchkver_2_9_0
#define_string wxART_TOOLBAR
#define_string wxART_MENU
#define_string wxART_FRAME_ICON

#define_string wxART_CMN_DIALOG
#define_string wxART_HELP_BROWSER
#define_string wxART_MESSAGE_BOX
#define_string wxART_BUTTON

#define_string wxART_OTHER
#endif

#if !%wxchkver_2_9_0
#define_wxstring wxART_TOOLBAR
#define_wxstring wxART_MENU
#define_wxstring wxART_FRAME_ICON

#define_wxstring wxART_CMN_DIALOG
#define_wxstring wxART_HELP_BROWSER
#define_wxstring wxART_MESSAGE_BOX
#define_wxstring wxART_BUTTON

#define_wxstring wxART_OTHER
#endif

// ----------------------------------------------------------------------------
// Art IDs
// ----------------------------------------------------------------------------

#if %wxchkver_2_9_0
#define_string wxART_ADD_BOOKMARK
#define_string wxART_DEL_BOOKMARK
#define_string wxART_HELP_SIDE_PANEL
#define_string wxART_HELP_SETTINGS
#define_string wxART_HELP_BOOK
#define_string wxART_HELP_FOLDER
#define_string wxART_HELP_PAGE
#define_string wxART_GO_BACK
#define_string wxART_GO_FORWARD
#define_string wxART_GO_UP
#define_string wxART_GO_DOWN
#define_string wxART_GO_TO_PARENT
#define_string wxART_GO_HOME
#define_string wxART_FILE_OPEN
#define_string wxART_FILE_SAVE
#define_string wxART_FILE_SAVE_AS
#define_string wxART_PRINT
#define_string wxART_HELP
#define_string wxART_TIP
#define_string wxART_REPORT_VIEW
#define_string wxART_LIST_VIEW
#define_string wxART_NEW_DIR
#define_string wxART_HARDDISK
#define_string wxART_FLOPPY
#define_string wxART_CDROM
#define_string wxART_REMOVABLE
#define_string wxART_FOLDER
#define_string wxART_FOLDER_OPEN
#define_string wxART_GO_DIR_UP
#define_string wxART_EXECUTABLE_FILE
#define_string wxART_NORMAL_FILE
#define_string wxART_TICK_MARK
#define_string wxART_CROSS_MARK
#define_string wxART_ERROR
#define_string wxART_QUESTION
#define_string wxART_WARNING
#define_string wxART_INFORMATION
#define_string wxART_MISSING_IMAGE
#define_string wxART_COPY
#define_string wxART_CUT
#define_string wxART_PASTE
#define_string wxART_DELETE
#define_string wxART_NEW

#define_string wxART_UNDO
#define_string wxART_REDO

#define_string wxART_QUIT

#define_string wxART_FIND
#define_string wxART_FIND_AND_REPLACE
#endif

#if !%wxchkver_2_9_0
#define_wxstring wxART_ADD_BOOKMARK
#define_wxstring wxART_DEL_BOOKMARK
#define_wxstring wxART_HELP_SIDE_PANEL
#define_wxstring wxART_HELP_SETTINGS
#define_wxstring wxART_HELP_BOOK
#define_wxstring wxART_HELP_FOLDER
#define_wxstring wxART_HELP_PAGE
#define_wxstring wxART_GO_BACK
#define_wxstring wxART_GO_FORWARD
#define_wxstring wxART_GO_UP
#define_wxstring wxART_GO_DOWN
#define_wxstring wxART_GO_TO_PARENT
#define_wxstring wxART_GO_HOME
#define_wxstring wxART_FILE_OPEN
#define_wxstring wxART_FILE_SAVE
#define_wxstring wxART_FILE_SAVE_AS
#define_wxstring wxART_PRINT
#define_wxstring wxART_HELP
#define_wxstring wxART_TIP
#define_wxstring wxART_REPORT_VIEW
#define_wxstring wxART_LIST_VIEW
#define_wxstring wxART_NEW_DIR
#define_wxstring wxART_HARDDISK
#define_wxstring wxART_FLOPPY
#define_wxstring wxART_CDROM
#define_wxstring wxART_REMOVABLE
#define_wxstring wxART_FOLDER
#define_wxstring wxART_FOLDER_OPEN
#define_wxstring wxART_GO_DIR_UP
#define_wxstring wxART_EXECUTABLE_FILE
#define_wxstring wxART_NORMAL_FILE
#define_wxstring wxART_TICK_MARK
#define_wxstring wxART_CROSS_MARK
#define_wxstring wxART_ERROR
#define_wxstring wxART_QUESTION
#define_wxstring wxART_WARNING
#define_wxstring wxART_INFORMATION
#define_wxstring wxART_MISSING_IMAGE
#define_wxstring wxART_COPY
#define_wxstring wxART_CUT
#define_wxstring wxART_PASTE
#define_wxstring wxART_DELETE
#define_wxstring wxART_NEW

#define_wxstring wxART_UNDO
#define_wxstring wxART_REDO

#define_wxstring wxART_QUIT

#define_wxstring wxART_FIND
#define_wxstring wxART_FIND_AND_REPLACE
#endif

class wxArtProvider : public wxObject
{
// wxArtProvider() - abstract class

#if %wxchkver_2_8
static void Push(%ungc wxArtProvider *provider );
static void Insert(%ungc wxArtProvider *provider );
static bool Pop( );
static bool Remove(%gc wxArtProvider *provider); // FIXME - mem leak if not found
static bool Delete(%ungc wxArtProvider *provider );
#endif // %wxchkver_2_8

//#if !%wxcompat_2_6
//static void PushProvider(wxArtProvider *provider) FIXME add wxLuaArtProvider maybe?
//static bool PopProvider( );
//static bool RemoveProvider(wxArtProvider *provider );
//#endif // !%wxcompat_2_6

static wxBitmap GetBitmap(const wxString& id, const wxString& client = wxART_OTHER, const wxSize& size = wxDefaultSize );
static wxIcon GetIcon(const wxString& id, const wxString& client = wxART_OTHER, const wxSize& size = wxDefaultSize );
static wxSize GetSizeHint(const wxString& client, bool platform_dependent = false );
};

class %delete wxLuaArtProvider : public wxArtProvider
{
// %override - the C++ function takes the wxLuaState as the first param
wxLuaArtProvider( );

// virtual function that you can override in Lua.
virtual wxSize DoGetSizeHint(const wxString& client); // { return GetSizeHint(client, true); }

// virtual function that you can override in Lua.

// Derived classes must override this method to create requested
// art resource. This method is called only once per instance's
// lifetime for each requested wxArtID.
virtual wxBitmap CreateBitmap(const wxString& id, const wxString& client, const wxSize& size);
};

#endif //wxLUA_USE_wxArtProvider


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


// ===========================================================================
// Purpose: wxMDI 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_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE

#include "wx/cmdproc.h"

// ---------------------------------------------------------------------------
// wxMDIClientWindow

class wxMDIClientWindow : public wxWindow
{
};

// ---------------------------------------------------------------------------
// wxMDIParentFrame

class wxMDIParentFrame : public wxFrame
{
wxMDIParentFrame( );
wxMDIParentFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxMDIParentFrame" );
bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, const wxString& name = "wxMDIParentFrame" );

void ActivateNext( );
void ActivatePrevious( );
void ArrangeIcons( );
void Cascade( );
wxMDIChildFrame* GetActiveChild() const;
wxMDIClientWindow* GetClientWindow() const;
// virtual wxToolBar* GetToolBar() const; - see wxFrame
%win wxMenu* GetWindowMenu() const;
// virtual void SetToolBar(wxToolBar* toolbar) - see wxFrame
%win void SetWindowMenu(%ungc wxMenu* menu );
void Tile(wxOrientation orient = wxHORIZONTAL );
};

// ---------------------------------------------------------------------------
// wxMDIChildFrame

class wxMDIChildFrame : public wxFrame
{
wxMDIChildFrame( );
wxMDIChildFrame(wxMDIParentFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxMDIChildFrame" );
bool Create(wxMDIParentFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxMDIChildFrame" );

void Activate( );
%win void Maximize( );
void Restore( );
};

// ---------------------------------------------------------------------------
// wxDocMDIParentFrame

#include "wx/docmdi.h"

class wxDocMDIParentFrame : public wxMDIParentFrame
{
wxDocMDIParentFrame( );
wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIParentFrame" );
bool Create(wxDocManager *manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIParentFrame" );

wxDocManager *GetDocumentManager() const;
};

// ---------------------------------------------------------------------------
// wxDocMDIChildFrame

class wxDocMDIChildFrame : public wxMDIChildFrame
{
wxDocMDIChildFrame( );
wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIChildFrame" );
bool Create(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIChildFrame" );

wxDocument *GetDocument() const;
wxView *GetView() const;
void SetDocument(wxDocument *doc );
void SetView(wxView *view );
};

// ---------------------------------------------------------------------------
// wxDocChildFrame

#include "wx/docview.h"

class wxDocChildFrame : public wxFrame
{
wxDocChildFrame(wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocChildFrame" );

wxDocument* GetDocument() const;
wxView* GetView() const;
void SetDocument(wxDocument *doc );
void SetView(wxView *view );
};

// ---------------------------------------------------------------------------
// wxDocManager

#define wxDEFAULT_DOCMAN_FLAGS
#define wxDOC_NEW
#define wxDOC_SILENT

class wxDocManager : public wxEvtHandler
{
wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true );

%wxchkver_2_6 void ActivateView(wxView* view, bool activate );
!%wxchkver_2_6 void ActivateView(wxView* view, bool activate, bool deleting );
void AddDocument(wxDocument *doc );
void AddFileToHistory(const wxString& filename );
void AssociateTemplate(wxDocTemplate *temp );
bool CloseDocuments(bool force = true );
wxDocument* CreateDocument(const wxString& path, long flags );
wxView* CreateView(wxDocument*doc, long flags );
void DisassociateTemplate(wxDocTemplate *temp );
void FileHistoryAddFilesToMenu( );
void FileHistoryAddFilesToMenu(wxMenu* menu );
void FileHistoryLoad(wxConfigBase& config );
void FileHistoryRemoveMenu(wxMenu* menu );
void FileHistorySave(wxConfigBase& resourceFile );
void FileHistoryUseMenu(wxMenu* menu );
wxDocTemplate * FindTemplateForPath(const wxString& path );
wxDocument * GetCurrentDocument( );
wxView * GetCurrentView( );
// %overide wxList& wxDocManager::GetDocuments() - returns a copied list
wxList& GetDocuments( );
wxFileHistory * GetFileHistory( );
wxString GetLastDirectory() const;
int GetMaxDocsOpen( );
!%wxchkver_2_6 int GetNoHistoryFiles( );
%wxchkver_2_6 size_t GetHistoryFilesCount() const;
// %overide wxList& wxDocManager::GetTemplates() - returns a copied list
wxList& GetTemplates( );
bool Initialize( );

// %override [bool, string buf] wxDocManager::MakeDefaultName(wxString& buf );
// C++ Func: bool MakeDefaultName(wxString& buf );
bool MakeDefaultName(wxString& buf );

wxFileHistory* OnCreateFileHistory( );
void OnFileClose(wxCommandEvent &event );
void OnFileCloseAll(wxCommandEvent& event );
void OnFileNew(wxCommandEvent &event );
void OnFileOpen(wxCommandEvent &event );
void OnFileRevert(wxCommandEvent& event );
void OnFileSave(wxCommandEvent &event );
void OnFileSaveAs(wxCommandEvent &event );
//void OnMenuCommand(int cmd );
void RemoveDocument(wxDocument *doc );
//wxDocTemplate * SelectDocumentPath(wxDocTemplate **templates, int noTemplates, const wxString& path, const wxString& bufSize, long flags, bool save );
//wxDocTemplate * SelectDocumentType(wxDocTemplate **templates, int noTemplates, bool sort = false );
//wxDocTemplate * SelectViewType(wxDocTemplate **templates, int noTemplates, bool sort = false );
void SetLastDirectory(const wxString& dir );
void SetMaxDocsOpen(int n );
};

// ---------------------------------------------------------------------------
// wxDocMDIChildFrame

//%include "wx/docmdi.h"

//class wxDocMDIChildFrame : public wxMDIChildFrame FIXME
//{
// wxDocMDIChildFrame(wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIChildFrame" );
//
// wxDocument* GetDocument() const;
// wxView* GetView() const;
// void OnActivate(wxActivateEvent event );
// void OnCloseWindow(wxCloseEvent& event );
// void SetDocument(wxDocument *doc );
// void SetView(wxView *view );
//}

// ---------------------------------------------------------------------------
// wxDocMDIParentFrame

//%include "wx/docmdi.h"

//class wxDocMDIParentFrame : public wxMDIParentFrame FIXME
//{
// wxDocMDIParentFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocMDIParentFrame" );
//
// void OnCloseWindow(wxCloseEvent& event );
//}

// ---------------------------------------------------------------------------
// wxDocParentFrame

class wxDocParentFrame : public wxFrame
{
wxDocParentFrame(wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxDocParentFrame" );

//void OnCloseWindow(wxCloseEvent& event );
};

// ---------------------------------------------------------------------------
// wxDocTemplate

#define wxTEMPLATE_VISIBLE
#define wxTEMPLATE_INVISIBLE
#define wxDEFAULT_TEMPLATE_FLAGS

class wxDocTemplate : public wxObject
{
wxDocTemplate(wxDocManager* manager, const wxString& descr, const wxString& filter, const wxString& dir, const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, wxClassInfo* docClassInfo = NULL, wxClassInfo* viewClassInfo = NULL, long flags = wxDEFAULT_TEMPLATE_FLAGS );

wxDocument* CreateDocument(const wxString& path, long flags = 0 );
wxView* CreateView(wxDocument *doc, long flags = 0 );
wxString GetDefaultExtension( );
wxString GetDescription( );
wxString GetDirectory( );
wxDocManager * GetDocumentManager( );
wxString GetDocumentName( );
wxString GetFileFilter( );
long GetFlags( );
wxString GetViewName( );
bool InitDocument(wxDocument* doc, const wxString& path, long flags = 0 );
bool IsVisible( );
void SetDefaultExtension(const wxString& ext );
void SetDescription(const wxString& descr );
void SetDirectory(const wxString& dir );
void SetDocumentManager(wxDocManager *manager );
void SetFileFilter(const wxString& filter );
void SetFlags(long flags );
};

// ---------------------------------------------------------------------------
// wxDocument

class wxDocument : public wxEvtHandler
{
wxDocument( );

virtual bool AddView(wxView *view );
virtual bool Close( );
virtual bool DeleteAllViews( );
wxCommandProcessor* GetCommandProcessor() const;
wxDocTemplate* GetDocumentTemplate() const;
wxDocManager* GetDocumentManager() const;
wxString GetDocumentName() const;
wxWindow* GetDocumentWindow() const;
wxString GetFilename() const;
wxView * GetFirstView() const;

// %override [string name] wxDocument::GetPrintableName(wxString& name) const;
// C++ Func: virtual void GetPrintableName(wxString& name) const;
virtual void GetPrintableName(wxString& name) const;

wxString GetTitle() const;
wxList& GetViews() const;
virtual bool IsModified() const;
//virtual istream& LoadObject(istream& stream );
//virtual wxInputStream& LoadObject(wxInputStream& stream );
virtual void Modify(bool modify );
virtual void OnChangedViewList( );
virtual bool OnCloseDocument( );
virtual bool OnCreate(const wxString& path, long flags );
virtual wxCommandProcessor* OnCreateCommandProcessor( );
virtual bool OnNewDocument( );
virtual bool OnOpenDocument(const wxString& filename );
virtual bool OnSaveDocument(const wxString& filename );
virtual bool OnSaveModified( );
virtual bool RemoveView(wxView* view );
virtual bool Save( );
virtual bool SaveAs( );
//virtual ostream& SaveObject(ostream& stream );
//virtual wxOutputStream& SaveObject(wxOutputStream& stream );
virtual void SetCommandProcessor(wxCommandProcessor *processor );
void SetDocumentName(const wxString& name );
void SetDocumentTemplate(wxDocTemplate* templ );
void SetFilename(const wxString& filename, bool notifyViews = false );
void SetTitle(const wxString& title );
void UpdateAllViews(wxView* sender = NULL, wxObject* hint = NULL );
};

// ---------------------------------------------------------------------------
// wxView

class wxView : public wxEvtHandler
{
//wxView( );

virtual void Activate(bool activate );
virtual bool Close(bool deleteWindow = true );
wxDocument* GetDocument() const;
wxDocManager* GetDocumentManager() const;
wxWindow * GetFrame( );
wxString GetViewName() const;
virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView );
virtual void OnChangeFilename( );
virtual bool OnClose(bool deleteWindow );
//virtual void OnClosingDoocument( );
virtual bool OnCreate(wxDocument* doc, long flags );
virtual wxPrintout* OnCreatePrintout( );
//virtual void OnDraw(wxDC& dc );
virtual void OnUpdate(wxView* sender, wxObject* hint );
void SetDocument(wxDocument* doc );
void SetFrame(wxFrame* frame );
void SetViewName(const wxString& name );
};

#endif //wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE

// ---------------------------------------------------------------------------
// wxCommandProcessor

#if wxLUA_USE_wxCommandProcessor

#include "wx/cmdproc.h"

class wxCommandProcessor : public wxObject
{
wxCommandProcessor(int maxCommands = -1 );

virtual bool CanRedo() const;
virtual bool CanUndo() const;
virtual bool Redo( );
virtual bool Undo( );
virtual void ClearCommands( );
wxList& GetCommands() const;
int GetMaxCommands() const;
wxMenu *GetEditMenu() const;
wxString GetRedoAccelerator() const;
wxString GetRedoMenuLabel() const;
wxString GetUndoAccelerator() const;
wxString GetUndoMenuLabel() const;
virtual void Initialize( );
virtual bool IsDirty( );
virtual void MarkAsSaved( );
void SetEditMenu(wxMenu *menu );
virtual void SetMenuStrings( );
void SetRedoAccelerator(const wxString& accel );
void SetUndoAccelerator(const wxString& accel );
virtual bool Submit(wxCommand *command, bool storeIt = true );
virtual void Store(wxCommand *command );
wxCommand *GetCurrentCommand() const;
};

// ---------------------------------------------------------------------------
// wxCommand

class wxCommand : public wxObject
{
//wxCommand(bool canUndo = false, const wxString& name = "" );

virtual bool CanUndo( );
virtual bool Do(); // pure virtual
virtual wxString GetName( );
virtual bool Undo(); // pure virtual
};

#endif //wxLUA_USE_wxCommandProcessor

// ---------------------------------------------------------------------------
// wxFileHistory

#if wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE

#include "wx/docview.h"

class %delete wxFileHistory : public wxObject
{
wxFileHistory(int maxFiles = 9, wxWindowID idBase = wxID_FILE1 );

void AddFileToHistory(const wxString& filename );
void AddFilesToMenu( );
void AddFilesToMenu(wxMenu* menu );
wxString GetHistoryFile(int index) const;
int GetMaxFiles() const;
size_t GetCount() const;
void Load(wxConfigBase& config );
void RemoveFileFromHistory(size_t i );
void RemoveMenu(wxMenu* menu );
void Save(wxConfigBase& config );
void UseMenu(wxMenu* menu );
};

#endif //wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE



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


// ===========================================================================
// Purpose: wxMenu and wxToolbar 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
// ===========================================================================

// ---------------------------------------------------------------------------
// wxMenu

#if wxLUA_USE_wxMenu && wxUSE_MENUS

#include "wx/menu.h"

enum wxItemKind
{
wxITEM_SEPARATOR,
wxITEM_NORMAL,
wxITEM_CHECK,
wxITEM_RADIO,
wxITEM_MAX
};

#define wxMB_DOCKABLE
#define wxMENU_TEAROFF

class %delete wxMenu : public wxEvtHandler
{
wxMenu(const wxString& title = "", long style = 0 );

// %override wxMenu* wxMenu({{wx.wxID_NEW, "&New\tCtrl-N", "New doc", [wx.wxITEM_NORMAL]}, {}, {item 2}}, const wxString& title = "", long style = "") - empty tables are separators
// wxLua provides this function
%override_name wxLua_wxCreateMenu_constructor wxMenu(LuaTable, const wxString& title = "", long style = 0 );

wxMenuItem* Append(int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL );
wxMenuItem* Append(int id, const wxString& item, %ungc wxMenu *subMenu, const wxString& helpString = "" );
wxMenuItem* Append(%ungc wxMenuItem* menuItem );
wxMenuItem* AppendCheckItem(int id, const wxString& item, const wxString& helpString = "" );
wxMenuItem* AppendRadioItem(int id, const wxString& item, const wxString& helpString = "" );
wxMenuItem* AppendSeparator( );
void Break( );
void Check(int id, bool check );
void Delete(int id );
void Delete(wxMenuItem *item );
void Destroy(int id );
void Destroy(wxMenuItem *item );
void Enable(int id, bool enable );
int FindItem(const wxString& itemString) const;

// %override [wxMenuItem* menuItem, wxMenu* ownerMenu] wxMenu::FindItem(int id );
// C++ Func: wxMenuItem* FindItem(int id, wxMenu **menu = NULL) const;
%override_name wxLua_wxMenu_FindItemById wxMenuItem* FindItem(int id) const;

wxMenuItem* FindItemByPosition(size_t position) const;
wxString GetHelpString(int id) const;
wxString GetLabel(int id) const;
size_t GetMenuItemCount() const;
wxMenuItemList& GetMenuItems() const;
wxString GetTitle() const;
wxMenuItem* Insert(size_t pos, int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL );
wxMenuItem* Insert(size_t pos, %ungc wxMenuItem *item );
wxMenuItem* InsertCheckItem(size_t pos, int id, const wxString& item, const wxString& helpString = "" );
wxMenuItem* InsertRadioItem(size_t pos, int id, const wxString& item, const wxString& helpString = "" );
wxMenuItem* InsertSeparator(size_t pos );
bool IsChecked(int id) const;
bool IsEnabled(int id) const;
wxMenuItem* Prepend(int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL );
wxMenuItem* Prepend(%ungc wxMenuItem *item );
wxMenuItem* PrependCheckItem(int id, const wxString& item, const wxString& helpString = "" );
wxMenuItem* PrependRadioItem(int id, const wxString& item, const wxString& helpString = "" );
wxMenuItem* PrependSeparator( );
%gc wxMenuItem* Remove(wxMenuItem *item );
%gc wxMenuItem* Remove(int id );
void SetHelpString(int id, const wxString& helpString );
void SetLabel(int id, const wxString& label );
void SetTitle(const wxString& title );
void UpdateUI(wxEvtHandler* source = NULL) const;
};

// ---------------------------------------------------------------------------
// wxMenuBar

class wxMenuBar : public wxWindow
{
wxMenuBar(long style = 0 );
// void wxMenuBar(int n, wxMenu* menus[], const wxString titles[] );

bool Append(%ungc wxMenu *menu, const wxString& title );
void Check(int id, bool check );
void Enable(int id, bool enable );
void EnableTop(int pos, bool enable );
int FindMenu(const wxString& title) const;
int FindMenuItem(const wxString& menuString, const wxString& itemString) const;
wxMenuItem* FindItem(int id, wxMenu **menu = NULL) const;
wxString GetHelpString(int id) const;
wxString GetLabel(int id) const;
wxString GetLabelTop(int pos) const;
wxMenu* GetMenu(int menuIndex) const;
int GetMenuCount() const;
bool Insert(size_t pos, %ungc wxMenu *menu, const wxString& title );
bool IsChecked(int id) const;
bool IsEnabled(int id) const;
void Refresh( );
%gc wxMenu* Remove(size_t pos );
%gc wxMenu* Replace(size_t pos, %ungc wxMenu *menu, const wxString& title );
void SetHelpString(int id, const wxString& helpString );
void SetLabel(int id, const wxString& label );
void SetLabelTop(int pos, const wxString& label );

%wxchkver_2_8 virtual void UpdateMenus( );
};

// ---------------------------------------------------------------------------
// wxMenuItem
//
// Note: this is almost always owned by a wxMenu, however you can get an
// unattached one from wxMenu::Remove() so that's why we gc collect it.


#include "wx/menuitem.h"

class %delete wxMenuItem : public wxObject
{
%ungc_this wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& text = "", const wxString& help = "", wxItemKind kind = wxITEM_NORMAL, wxMenu *subMenu = NULL );

void Check(bool check );
void Enable(bool enable );
//%win wxColour GetBackgroundColour() const;
//%win wxBitmap GetBitmap(bool checked = true) const;
//%win wxFont GetFont() const;
wxString GetHelp() const;
int GetId() const;
wxItemKind GetKind() const;
wxString GetLabel() const;
static wxString GetLabelFromText(const wxString& text );
//%win int GetMarginWidth() const;
wxMenu* GetMenu() const;
// wxString GetName() const; - deprecated
wxString GetText() const;
wxMenu* GetSubMenu() const;
//%win wxColour& GetTextColour() const;
bool IsCheckable() const;
bool IsChecked() const;
bool IsEnabled() const;
bool IsSeparator() const;
bool IsSubMenu() const;
//%win void SetBackgroundColour(const wxColour& colour) const;
void SetBitmap(const wxBitmap& bmp );
//%win void SetBitmaps(const wxBitmap& checked, const wxBitmap& unchecked = wxNullBitmap) const;
//%win void SetFont(const wxFont& font) const;
void SetHelp(const wxString& helpString) const;
//%win void SetMarginWidth(int width) const;
//void SetMenu(wxMenu* menu );
void SetSubMenu(wxMenu* menu );
void SetText(const wxString& text );
// void SetName(const wxString& text) const; - deprecated
%win void SetTextColour(const wxColour& colour) const;

#if %wxchkver_2_8
void SetItemLabel(const wxString& str );
wxString GetItemLabel() const;
wxString GetItemLabelText() const;

static wxString GetLabelText(const wxString& label );
#endif
};

// ---------------------------------------------------------------------------
// wxMenuItemList

class wxMenuItemList : public wxList
{
// no constructor, you only get this back from wxMenu::GetMenuItems

// Use the wxList methods, see also wxNode
};

// ---------------------------------------------------------------------------
// wxMenuEvent

#include "wx/event.h"

class %delete wxMenuEvent : public wxEvent
{
%wxEventType wxEVT_MENU_HIGHLIGHT // EVT_MENU_HIGHLIGHT(winid, func) EVT_MENU_HIGHLIGHT_ALL(func );
%wxEventType wxEVT_MENU_OPEN // EVT_MENU_OPEN(func );
%wxEventType wxEVT_MENU_CLOSE // EVT_MENU_CLOSE(func );

wxMenuEvent(wxEventType type = wxEVT_NULL, int id = 0, wxMenu* menu = NULL );
wxMenu* GetMenu() const;
int GetMenuId() const;
bool IsPopup() const;
};

#endif //wxLUA_USE_wxMenu && wxUSE_MENUS

// ---------------------------------------------------------------------------
// wxToolBarBase

#if wxLUA_USE_wxToolbar

#include "wx/tbarbase.h"

#define wxTB_FLAT
#define wxTB_DOCKABLE
#define wxTB_HORIZONTAL
#define wxTB_VERTICAL
#define wxTB_3DBUTTONS
#define wxTB_TEXT
#define wxTB_NOICONS
#define wxTB_NODIVIDER
#define wxTB_NOALIGN
#define wxTB_HORZ_LAYOUT
#define wxTB_HORZ_TEXT

class wxToolBarBase : public wxControl
{
// no constructors base class

wxToolBarToolBase* AddControl(wxControl *control );
wxToolBarToolBase* AddSeparator( );
wxToolBarToolBase* AddTool(int toolId, const wxString& label, const wxBitmap& bitmap1, const wxBitmap& bitmap2 = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, const wxString& shortHelpString = "", const wxString& longHelpString = "", wxObject* clientData = NULL );
wxToolBarToolBase* AddTool(int toolId, const wxString& label, const wxBitmap& bitmap1, const wxString& shortHelpString = "", wxItemKind kind = wxITEM_NORMAL );
//wxToolBarToolBase* AddTool(wxToolBarToolBase* tool );
wxToolBarToolBase *AddCheckTool(int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *data = NULL );
wxToolBarToolBase *AddRadioTool(int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *data = NULL );
void ClearTools( );
bool DeleteTool(int toolId );
bool DeleteToolByPos(size_t pos );
void EnableTool(int toolId, const bool enable );
wxToolBarToolBase* FindById(int id );
wxControl* FindControl(int id );
wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
int GetMaxRows( );
int GetMaxCols( );
wxSize GetToolSize( );
wxSize GetToolBitmapSize( );
wxObject* GetToolClientData(int toolId) const;
bool GetToolEnabled(int toolId) const;
wxString GetToolLongHelp(int toolId) const;
wxSize GetToolMargins(); // GetMargins is deprecated
int GetToolPacking( );
int GetToolPos(int toolId) const;
int GetToolSeparation() const;
wxString GetToolShortHelp(int toolId) const;
bool GetToolState(int id );
wxToolBarToolBase* InsertControl(size_t pos, wxControl *control );
wxToolBarToolBase* InsertSeparator(size_t pos );
wxToolBarToolBase* InsertTool(size_t pos, int id, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, bool isToggle = false, wxObject *clientData = NULL, const wxString& shortHelpString = "", const wxString& longHelpString = "" );
wxToolBarToolBase* InsertTool(size_t pos, int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *clientData = NULL );
//wxToolBarToolBase * InsertTool(size_t pos, wxToolBarToolBase* tool );
wxToolBarToolBase* RemoveTool(int id );
bool Realize( );
void SetMargins(int x, int y );
void SetMargins(const wxSize& size );
void SetToolBitmapSize(const wxSize& size );
void SetToolClientData(int id, wxObject* clientData );
void SetToolLongHelp(int toolId, const wxString& helpString );
void SetToolPacking(int packing );
void SetToolShortHelp(int id, const wxString& helpString );
void SetToolSeparation(int separation );
void SetToggle(int id, bool toggle );
void SetRows(int nRows );
void SetMaxRowsCols(int rows, int cols );
void ToggleTool(int toolId, const bool toggle );
};

// ---------------------------------------------------------------------------
// wxToolBar

#include "wx/toolbar.h"

class wxToolBar : public wxToolBarBase
{
wxToolBar( );
wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = "wxToolBar" );
bool Create(wxWindow *parent,wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = "wxToolBar" );
};

// ---------------------------------------------------------------------------
// wxToolBarSimple

#if !%wxchkver_2_6

#include "wx/tbarsmpl.h"

class wxToolBarSimple : public wxToolBarBase
{
wxToolBarSimple( );
wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = wxToolBarNameStr );
bool Create(wxWindow *parent,wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = wxToolBarNameStr );
};

#endif // !%wxchkver_2_6

// ---------------------------------------------------------------------------
// wxToolBarToolBase

// these are unused
//#define wxTOOL_BOTTOM
//#define wxTOOL_LEFT
//#define wxTOOL_RIGHT
//#define wxTOOL_TOP

enum wxToolBarToolStyle
{
wxTOOL_STYLE_BUTTON,
wxTOOL_STYLE_SEPARATOR,
wxTOOL_STYLE_CONTROL
};

class wxToolBarToolBase : public wxObject
{
// no constructors

int GetId( );
wxControl *GetControl( );
wxToolBarBase *GetToolBar( );
int IsButton( );
int IsControl( );
int IsSeparator( );
int GetStyle( );
wxItemKind GetKind() const;
bool IsEnabled( );
bool IsToggled( );
bool CanBeToggled( );
wxBitmap GetNormalBitmap( );
wxBitmap GetDisabledBitmap( );
wxBitmap GetBitmap( );
wxString GetLabel( );
wxString GetShortHelp( );
wxString GetLongHelp( );
bool Enable(bool enable );
bool Toggle(bool toggle );
bool SetToggle(bool toggle );
bool SetShortHelp(const wxString& help );
bool SetLongHelp(const wxString& help );
void SetNormalBitmap(const wxBitmap& bmp );
void SetDisabledBitmap(const wxBitmap& bmp );
void SetLabel(const wxString& label );
void Detach( );
void Attach(wxToolBarBase *tbar );
wxObject *GetClientData( );
void SetClientData(wxObject* clientData );
};

// ---------------------------------------------------------------------------
// wxToolBarTool - This class doesn't exist!

//class wxToolBarTool : public wxToolBarToolBase
//{
//};

#endif //wxLUA_USE_wxToolbar


// ---------------------------------------------------------------------------
// wxAcceleratorTable

#if wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL

#include "wx/accel.h"

class %delete wxAcceleratorTable : public wxObject
{
#define_object wxNullAcceleratorTable

// %override wxAcceleratorTable(Lua table with this format );
// { { wx.wxACCEL_NORMAL, string.byte('0'), ID_0 },
// { wx.wxACCEL_NORMAL, wx.VXK_NUMPAD0, ID_0 } }
// C++ Func: wxAcceleratorTable(int n, wxAcceleratorEntry* entries );
wxAcceleratorTable(LuaTable accelTable );
wxAcceleratorTable(const wxAcceleratorTable& accel );

bool Ok() const;
//%wxchkver_2_8 bool IsOk() const;

// believe it or not, there aren't functions to add or remove wxAcceleratorEntries for MSW

// operators are WXWIN_COMPATIBILITY_2_4
};

// ---------------------------------------------------------------------------
// wxAcceleratorEntry

%wxcompat_2_6 wxAcceleratorEntry* wxGetAccelFromString(const wxString& label); // deprecated in 2.8 use wxAcceleratorEntry::Create() or FromString( );

#include "wx/accel.h"

enum
{
wxACCEL_NORMAL,
wxACCEL_ALT,
wxACCEL_CTRL,
wxACCEL_SHIFT,
%wxchkver_2_8 wxACCEL_CMD // Command key on OS X else wxACCEL_CTRL
};

class %delete wxAcceleratorEntry
{
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0, wxMenuItem *item = NULL );
wxAcceleratorEntry(const wxAcceleratorEntry& entry );

int GetCommand() const;
int GetFlags() const;
int GetKeyCode() const;
void Set(int flags, int keyCode, int Cmd, wxMenuItem *item = NULL );

#if %wxchkver_2_8
static %gc wxAcceleratorEntry *Create(const wxString& str );
bool IsOk() const;
wxString ToString() const;
bool FromString(const wxString& str );
wxMenuItem *GetMenuItem() const;
#endif // %wxchkver_2_8

// these are probably not necessary
//wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry );
//bool operator==(const wxAcceleratorEntry& entry) const;
//bool operator!=(const wxAcceleratorEntry& entry) const;
};

#endif //wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL


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


// ===========================================================================
// Purpose: wxPickerXXX controls
// Author: John Labenski
// Created: 14/11/2001
// Copyright: (c) 2007 John Labenski
// Licence: wxWidgets licence
// wxWidgets: Updated to 2.8.4
// ===========================================================================

#if %wxchkver_2_8 && wxLUA_USE_wxPicker

// ---------------------------------------------------------------------------
// wxPickerBase

#include "wx/pickerbase.h"

#define wxPB_USE_TEXTCTRL

class wxPickerBase : public wxControl
{
// No construcor - this is a base class

// margin between the text control and the picker
void SetInternalMargin(int newmargin );
int GetInternalMargin() const;

// proportion of the text control
void SetTextCtrlProportion(int prop );
int GetTextCtrlProportion() const;

// proportion of the picker control
void SetPickerCtrlProportion(int prop );
int GetPickerCtrlProportion() const;

bool IsTextCtrlGrowable() const;
void SetTextCtrlGrowable(bool grow = true );

bool IsPickerCtrlGrowable() const;
void SetPickerCtrlGrowable(bool grow = true );

bool HasTextCtrl() const;
wxTextCtrl *GetTextCtrl( );
wxControl *GetPickerCtrl( );

// methods that derived class must/may override
virtual void UpdatePickerFromTextCtrl( );
virtual void UpdateTextCtrlFromPicker( );
};

// ---------------------------------------------------------------------------
// wxColourPickerCtrl

#if wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL

#include "wx/clrpicker.h"

#define wxCLRP_SHOW_LABEL
#define wxCLRP_USE_TEXTCTRL
#define wxCLRP_DEFAULT_STYLE

class wxColourPickerCtrl : public wxPickerBase
{
wxColourPickerCtrl( );
// Note default color is *wxBLACK
wxColourPickerCtrl(wxWindow *parent, wxWindowID id, const wxColour& col, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxColourPickerCtrl" );
bool Create(wxWindow *parent, wxWindowID id, const wxColour& col, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxColourPickerCtrl" );

// get the colour chosen
wxColour GetColour() const;
// set currently displayed color
void SetColour(const wxColour& col );
// set colour using RGB(r,g,b) syntax or considering given text as a colour name;
// returns true if the given text was successfully recognized.
bool SetColour(const wxString& text );
};

// ---------------------------------------------------------------------------
// wxColourPickerEvent

class %delete wxColourPickerEvent : public wxCommandEvent
{
%wxEventType wxEVT_COMMAND_COLOURPICKER_CHANGED // EVT_COLOURPICKER_CHANGED(id, func );

wxColourPickerEvent( );
wxColourPickerEvent(wxObject *generator, int id, const wxColour &col );

wxColour GetColour() const;
void SetColour(const wxColour &c );
};

#endif //wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL

// ---------------------------------------------------------------------------
// wxDatePickerCtrl

#if wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL

#include "wx/datectrl.h"

// Note: this sends a wxDateEvent wxEVT_DATE_CHANGED // EVT_DATE_CHANGED(id, fn );

enum
{
wxDP_SPIN, // MSW only
wxDP_DROPDOWN,
wxDP_DEFAULT,
wxDP_ALLOWNONE,
wxDP_SHOWCENTURY
};

class wxDatePickerCtrl : public wxControl
{
wxDatePickerCtrl( );
wxDatePickerCtrl(wxWindow *parent, wxWindowID id, const wxDateTime& dt = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxDatePickerCtrl" );
bool Create(wxWindow *parent, wxWindowID id, const wxDateTime& dt = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxDatePickerCtrl" );

// %override [bool, wxDateTime dt1, wxDateTime dt2] wxDatePickerCtrl::GetRange() const;
// C++ Func: bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
bool GetRange() const;
wxDateTime GetValue() const;
void SetRange(const wxDateTime& dt1, const wxDateTime& dt2 );
void SetValue(const wxDateTime& dt );
};

#endif //wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL

// ---------------------------------------------------------------------------
// wxFileDirPickerCtrlBase

#if (wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl) && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL );

#include "wx/filepicker.h"

class wxFileDirPickerCtrlBase : public wxPickerBase
{
// No constructor - this is a base class

wxString GetPath() const;
void SetPath(const wxString &str );

// return true if the given path is valid for this control
// bool CheckPath(const wxString& path) const; - Removed in 2.9.5

// return the text control value in canonical form
wxString GetTextCtrlValue() const;
};

// ---------------------------------------------------------------------------
// wxFileDirPickerEvent

class %delete wxFileDirPickerEvent : public wxCommandEvent
{
%wxEventType wxEVT_COMMAND_FILEPICKER_CHANGED // EVT_FILEPICKER_CHANGED(id, fn );
%wxEventType wxEVT_COMMAND_DIRPICKER_CHANGED // EVT_DIRPICKER_CHANGED(id, fn );

//wxFileDirPickerEvent( );
wxFileDirPickerEvent(wxEventType type, wxObject *generator, int id, const wxString &path );

wxString GetPath() const;
void SetPath(const wxString &p );
};

#endif // (wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl) && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL );

// ---------------------------------------------------------------------------
// wxDirPickerCtrl

#if wxLUA_USE_wxDirPickerCtrl && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL );

#define wxDIRP_DIR_MUST_EXIST
#define wxDIRP_CHANGE_DIR

#define wxDIRP_DEFAULT_STYLE
#define wxDIRP_USE_TEXTCTRL

class wxDirPickerCtrl : public wxFileDirPickerCtrlBase
{
wxDirPickerCtrl( );
wxDirPickerCtrl(wxWindow *parent, wxWindowID id, const wxString& path = "", const wxString& message = wxDirSelectorPromptStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxDirPickerCtrl" );
bool Create(wxWindow *parent, wxWindowID id, const wxString& path = "", const wxString& message = wxDirSelectorPromptStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxDirPickerCtrl" );
};

#endif wxLUA_USE_wxDirPickerCtrl && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL );

// ---------------------------------------------------------------------------
// wxFilePickerCtrl

#if wxLUA_USE_wxDirPickerCtrl && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL );

#define wxFLP_OPEN
#define wxFLP_SAVE
#define wxFLP_OVERWRITE_PROMPT
#define wxFLP_FILE_MUST_EXIST
#define wxFLP_CHANGE_DIR

#define wxFLP_DEFAULT_STYLE
#define wxFLP_USE_TEXTCTRL

class wxFilePickerCtrl : public wxFileDirPickerCtrlBase
{
wxFilePickerCtrl( );
wxFilePickerCtrl(wxWindow *parent, wxWindowID id, const wxString& path = "", const wxString& message = wxFileSelectorPromptStr, const wxString& wildcard = wxFileSelectorDefaultWildcardStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFLP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxFilePickerCtrl" );
bool Create(wxWindow *parent, wxWindowID id, const wxString& path = "", const wxString& message = wxFileSelectorPromptStr, const wxString& wildcard = wxFileSelectorDefaultWildcardStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFLP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxFilePickerCtrl" );
};

#endif // wxLUA_USE_wxDirPickerCtrl && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL );

// ---------------------------------------------------------------------------
// wxFontPickerCtrl

#if wxLUA_USE_wxFontPickerCtrl && wxUSE_FONTPICKERCTRL

#include "wx/fontpicker.h"

#define wxFNTP_FONTDESC_AS_LABEL
#define wxFNTP_USEFONT_FOR_LABEL
#define wxFNTP_USE_TEXTCTRL // (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL );
#define wxFNTP_DEFAULT_STYLE

#define wxFNTP_MAXPOINT_SIZE // 100 the default max size to allow

class wxFontPickerCtrl : public wxPickerBase
{
wxFontPickerCtrl( );
wxFontPickerCtrl(wxWindow *parent, wxWindowID id, const wxFont& initial = wxNullFont, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFNTP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxFontPickerCtrl" );
bool Create(wxWindow *parent, wxWindowID id, const wxFont& initial = wxNullFont, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxFNTP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxFontPickerCtrl" );

wxFont GetSelectedFont() const;
virtual void SetSelectedFont(const wxFont &f );

void SetMaxPointSize(unsigned int max );
unsigned int GetMaxPointSize() const;
};

// ---------------------------------------------------------------------------
// wxFontPickerEvent

class %delete wxFontPickerEvent : public wxCommandEvent
{
%wxEventType wxEVT_COMMAND_FONTPICKER_CHANGED // EVT_FONTPICKER_CHANGED(id, fn );

//wxFontPickerEvent( );
wxFontPickerEvent(wxObject *generator, int id, const wxFont &f );

wxFont GetFont() const;
void SetFont(const wxFont &c );
};

#endif // wxLUA_USE_wxFontPickerCtrl && wxUSE_FONTPICKERCTRL

#endif // %wxchkver_2_8 && wxLUA_USE_wxPicker




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


// ===========================================================================
// Purpose: printing related 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_wxPrint && wxUSE_PRINTING_ARCHITECTURE

typedef wxScrolledWindow wxPreviewWindow

#include "wx/print.h"

// ---------------------------------------------------------------------------
// wxPrintout

class wxPrintout : public wxObject
{
// virtual class, use wxLuaPrintout

wxDC * GetDC( );

// %override [int minPage, int maxPage, int pageFrom, int pageTo] wxPrintout::GetPageInfo( );
// C++ Func: void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo );
void GetPageInfo( );

// %override [int w, int h] wxPrintout::GetPageSizeMM( );
// C++ Func: void GetPageSizeMM(int *w, int *h );
void GetPageSizeMM( );

// %override [int w, int h] wxPrintout::GetPageSizePixels( );
// C++ Func: void GetPageSizePixels(int *w, int *h );
void GetPageSizePixels( );

// %override [int w, int h] wxPrintout::GetPPIPrinter( );
// C++ Func: void GetPPIPrinter(int *w, int *h );
void GetPPIPrinter( );

// %override [int w, int h] wxPrintout::GetPPIScreen( );
// C++ Func: void GetPPIScreen(int *w, int *h );
void GetPPIScreen( );

wxString GetTitle( );
bool HasPage(int pageNum );
bool IsPreview( );
bool OnBeginDocument(int startPage, int endPage );
void OnEndDocument( );
void OnBeginPrinting( );
void OnEndPrinting( );
void OnPreparePrinting( );
bool OnPrintPage(int pageNum );
};

// ---------------------------------------------------------------------------
// wxLuaPrintout

#if wxLUA_USE_wxLuaPrintout

#include "wxlua/wxlua_bind.h" // for wxLuaObject tag
#include "wxbind/include/wxcore_wxlcore.h"

class %delete wxLuaPrintout : public wxPrintout
{
// %override - the C++ function takes the wxLuaState as the first param
wxLuaPrintout(const wxString& title = "Printout", wxLuaObject *pObject = NULL );

wxLuaObject *GetID( );

// This is an added function to wxPrintout so you don't have to override GetPageInfo
void SetPageInfo(int minPage, int maxPage, int pageFrom = 0, int pageTo = 0 );

// The functions below are all virtual functions that you can override in Lua.
// See the printing sample and wxPrintout for proper parameters and usage.
//void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo );
//bool HasPage(int pageNum );
//bool OnBeginDocument(int startPage, int endPage );
//void OnEndDocument( );
//void OnBeginPrinting( );
//void OnEndPrinting( );
//void OnPreparePrinting( );
//bool OnPrintPage(int pageNum );

// Dummy test function to directly verify that the binding virtual functions really work.
// This base class function appends "-Base" to the val string and returns it.
virtual wxString TestVirtualFunctionBinding(const wxString& val); // { return val + wxT("-Base"); }

static int ms_test_int;
};


// ---------------------------------------------------------------------------
// wxPrinter

enum wxPrinterError
{
wxPRINTER_NO_ERROR,
wxPRINTER_CANCELLED,
wxPRINTER_ERROR
};

class %delete wxPrinter : public wxObject
{
wxPrinter(wxPrintDialogData* data = NULL );

//bool Abort( );
virtual void CreateAbortWindow(wxWindow* parent, wxLuaPrintout* printout );
bool GetAbort() const;
static wxPrinterError GetLastError( );
wxPrintDialogData& GetPrintDialogData( );
bool Print(wxWindow *parent, wxLuaPrintout *printout, bool prompt=true );
wxDC* PrintDialog(wxWindow *parent );
void ReportError(wxWindow *parent, wxLuaPrintout *printout, const wxString& message );
bool Setup(wxWindow *parent );
};

#endif //wxLUA_USE_wxLuaPrintout

// ---------------------------------------------------------------------------
// wxPrintData

#define wxPORTRAIT
#define wxLANDSCAPE

enum wxDuplexMode
{
wxDUPLEX_HORIZONTAL,
wxDUPLEX_SIMPLEX,
wxDUPLEX_VERTICAL
};

enum wxPaperSize
{
wxPAPER_NONE,
wxPAPER_LETTER,
wxPAPER_LEGAL,
wxPAPER_A4,
wxPAPER_CSHEET,
wxPAPER_DSHEET,
wxPAPER_ESHEET,
wxPAPER_LETTERSMALL,
wxPAPER_TABLOID,
wxPAPER_LEDGER,
wxPAPER_STATEMENT,
wxPAPER_EXECUTIVE,
wxPAPER_A3,
wxPAPER_A4SMALL,
wxPAPER_A5,
wxPAPER_B4,
wxPAPER_B5,
wxPAPER_FOLIO,
wxPAPER_QUARTO,
wxPAPER_10X14,
wxPAPER_11X17,
wxPAPER_NOTE,
wxPAPER_ENV_9,
wxPAPER_ENV_10,
wxPAPER_ENV_11,
wxPAPER_ENV_12,
wxPAPER_ENV_14,
wxPAPER_ENV_DL,
wxPAPER_ENV_C5,
wxPAPER_ENV_C3,
wxPAPER_ENV_C4,
wxPAPER_ENV_C6,
wxPAPER_ENV_C65,
wxPAPER_ENV_B4,
wxPAPER_ENV_B5,
wxPAPER_ENV_B6,
wxPAPER_ENV_ITALY,
wxPAPER_ENV_MONARCH,
wxPAPER_ENV_PERSONAL,
wxPAPER_FANFOLD_US,
wxPAPER_FANFOLD_STD_GERMAN,
wxPAPER_FANFOLD_LGL_GERMAN,

wxPAPER_ISO_B4,
wxPAPER_JAPANESE_POSTCARD,
wxPAPER_9X11,
wxPAPER_10X11,
wxPAPER_15X11,
wxPAPER_ENV_INVITE,
wxPAPER_LETTER_EXTRA,
wxPAPER_LEGAL_EXTRA,
wxPAPER_TABLOID_EXTRA,
wxPAPER_A4_EXTRA,
wxPAPER_LETTER_TRANSVERSE,
wxPAPER_A4_TRANSVERSE,
wxPAPER_LETTER_EXTRA_TRANSVERSE,
wxPAPER_A_PLUS,
wxPAPER_B_PLUS,
wxPAPER_LETTER_PLUS,
wxPAPER_A4_PLUS,
wxPAPER_A5_TRANSVERSE,
wxPAPER_B5_TRANSVERSE,
wxPAPER_A3_EXTRA,
wxPAPER_A5_EXTRA,
wxPAPER_B5_EXTRA,
wxPAPER_A2,
wxPAPER_A3_TRANSVERSE,
wxPAPER_A3_EXTRA_TRANSVERSE,

wxPAPER_DBL_JAPANESE_POSTCARD,
wxPAPER_A6,
wxPAPER_JENV_KAKU2,
wxPAPER_JENV_KAKU3,
wxPAPER_JENV_CHOU3,
wxPAPER_JENV_CHOU4,
wxPAPER_LETTER_ROTATED,
wxPAPER_A3_ROTATED,
wxPAPER_A4_ROTATED,
wxPAPER_A5_ROTATED,
wxPAPER_B4_JIS_ROTATED,
wxPAPER_B5_JIS_ROTATED,
wxPAPER_JAPANESE_POSTCARD_ROTATED,
wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED,
wxPAPER_A6_ROTATED,
wxPAPER_JENV_KAKU2_ROTATED,
wxPAPER_JENV_KAKU3_ROTATED,
wxPAPER_JENV_CHOU3_ROTATED,
wxPAPER_JENV_CHOU4_ROTATED,
wxPAPER_B6_JIS,
wxPAPER_B6_JIS_ROTATED,
wxPAPER_12X11,
wxPAPER_JENV_YOU4,
wxPAPER_JENV_YOU4_ROTATED,
wxPAPER_P16K,
wxPAPER_P32K,
wxPAPER_P32KBIG,
wxPAPER_PENV_1,
wxPAPER_PENV_2,
wxPAPER_PENV_3,
wxPAPER_PENV_4,
wxPAPER_PENV_5,
wxPAPER_PENV_6,
wxPAPER_PENV_7,
wxPAPER_PENV_8,
wxPAPER_PENV_9,
wxPAPER_PENV_10,
wxPAPER_P16K_ROTATED,
wxPAPER_P32K_ROTATED,
wxPAPER_P32KBIG_ROTATED,
wxPAPER_PENV_1_ROTATED,
wxPAPER_PENV_2_ROTATED,
wxPAPER_PENV_3_ROTATED,
wxPAPER_PENV_4_ROTATED,
wxPAPER_PENV_5_ROTATED,
wxPAPER_PENV_6_ROTATED,
wxPAPER_PENV_7_ROTATED,
wxPAPER_PENV_8_ROTATED,
wxPAPER_PENV_9_ROTATED,
wxPAPER_PENV_10_ROTATED
};

enum wxPrintQuality // actually not an enum, but a typedef int
{
wxPRINT_QUALITY_DRAFT,
wxPRINT_QUALITY_HIGH,
wxPRINT_QUALITY_LOW,
wxPRINT_QUALITY_MEDIUM
};

enum wxPrintMode
{
wxPRINT_MODE_FILE,
wxPRINT_MODE_NONE,
wxPRINT_MODE_PREVIEW,
wxPRINT_MODE_PRINTER
};

#if %wxchkver_2_6
enum wxPrintBin
{
wxPRINTBIN_DEFAULT,

wxPRINTBIN_ONLYONE,
wxPRINTBIN_LOWER,
wxPRINTBIN_MIDDLE,
wxPRINTBIN_MANUAL,
wxPRINTBIN_ENVELOPE,
wxPRINTBIN_ENVMANUAL,
wxPRINTBIN_AUTO,
wxPRINTBIN_TRACTOR,
wxPRINTBIN_SMALLFMT,
wxPRINTBIN_LARGEFMT,
wxPRINTBIN_LARGECAPACITY,
wxPRINTBIN_CASSETTE,
wxPRINTBIN_FORMSOURCE,

wxPRINTBIN_USER
};
#endif

class %delete wxPrintData : public wxObject
{
wxPrintData( );
wxPrintData(const wxPrintData& data );

wxPrintData *Copy( );

// copied straight from cmndata.h not docs
int GetNoCopies() const;
bool GetCollate() const;
int GetOrientation() const;
bool Ok() const;
wxString GetPrinterName() const;
bool GetColour() const;
wxDuplexMode GetDuplex() const;
%wxchkver_2_8 int GetMedia() const;
wxPaperSize GetPaperId() const;
wxSize GetPaperSize() const;
wxPrintQuality GetQuality() const;
wxPrintBin GetBin() const;
wxPrintMode GetPrintMode() const;
%wxchkver_2_8 bool IsOrientationReversed() const;
void SetNoCopies(int v );
void SetCollate(bool flag );
void SetOrientation(int orient );
void SetPrinterName(const wxString& name );
void SetColour(bool colour );
void SetDuplex(wxDuplexMode duplex );
%wxchkver_2_8 void SetOrientationReversed(bool reversed );
%wxchkver_2_8 void SetMedia(int media );
void SetPaperId(wxPaperSize sizeId );
void SetPaperSize(const wxSize& sz );
void SetQuality(wxPrintQuality quality );
void SetBin(wxPrintBin bin );
void SetPrintMode(wxPrintMode printMode );
wxString GetFilename() const;
void SetFilename( const wxString &filename );

void operator=(const wxPrintData& data );

// these are all WXWIN_COMPATIBILITY_2_4 and for postscript printing only
//!%wxchkver_2_8 wxString GetPrinterCommand( );
//!%wxchkver_2_8 wxString GetPrinterOptions( );
//!%wxchkver_2_8 wxString GetPreviewCommand( );
//!%wxchkver_2_8 const wxString& GetFontMetricPath( );
//!%wxchkver_2_8 double GetPrinterScaleX( );
//!%wxchkver_2_8 double GetPrinterScaleY( );
//!%wxchkver_2_8 long GetPrinterTranslateX( );
//!%wxchkver_2_8 long GetPrinterTranslateY( );
//!%wxchkver_2_8 void SetPrinterCommand(const wxString& command );
//!%wxchkver_2_8 void SetPrinterOptions(const wxString& options );
//!%wxchkver_2_8 void SetPreviewCommand(const wxString& command );
//!%wxchkver_2_8 void SetFontMetricPath(const wxString& path );
//!%wxchkver_2_8 void SetPrinterScaleX(double x );
//!%wxchkver_2_8 void SetPrinterScaleY(double y );
//!%wxchkver_2_8 void SetPrinterScaling(double x, double y );
//!%wxchkver_2_8 void SetPrinterTranslateX(long x );
//!%wxchkver_2_8 void SetPrinterTranslateY(long y );
//!%wxchkver_2_8 void SetPrinterTranslation(long x, long y );
};

// ---------------------------------------------------------------------------
// wxPageSetupDialogData

class %delete wxPageSetupDialogData : public wxObject
{
wxPageSetupDialogData( );
wxPageSetupDialogData(const wxPageSetupDialogData& data );

wxPageSetupDialogData *Copy( );

// copied straight from cmndata.h not docs
wxSize GetPaperSize() const;
wxPaperSize GetPaperId() const;
wxPoint GetMinMarginTopLeft() const;
wxPoint GetMinMarginBottomRight() const;
wxPoint GetMarginTopLeft() const;
wxPoint GetMarginBottomRight() const;
bool GetDefaultMinMargins() const;
bool GetEnableMargins() const;
bool GetEnableOrientation() const;
bool GetEnablePaper() const;
bool GetEnablePrinter() const;
bool GetDefaultInfo() const;
bool GetEnableHelp() const;
bool Ok() const;
void SetPaperSize(const wxSize& sz );
void SetPaperSize(wxPaperSize id );
void SetPaperId(wxPaperSize id );
void SetMinMarginTopLeft(const wxPoint& pt );
void SetMinMarginBottomRight(const wxPoint& pt );
void SetMarginTopLeft(const wxPoint& pt );
void SetMarginBottomRight(const wxPoint& pt );
void SetDefaultMinMargins(bool flag );
void SetDefaultInfo(bool flag );
void EnableMargins(bool flag );
void EnableOrientation(bool flag );
void EnablePaper(bool flag );
void EnablePrinter(bool flag );
void EnableHelp(bool flag );
void CalculateIdFromPaperSize( );
void CalculatePaperSizeFromId( );
wxPrintData& GetPrintData( );
void SetPrintData(const wxPrintData& printData );

//wxPageSetupDialogData& operator=(const wxPageSetupData& data );
//wxPageSetupDialogData& operator=(const wxPrintData& data );
};

// ---------------------------------------------------------------------------
// wxPageSetupDialog

#include "wx/printdlg.h"

//typedef wxPageSetupDialogBase wxPageSetupDialog

class %delete wxPageSetupDialog : public wxObject // NOT a wxDialog in 2.8
{
wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL );

wxPageSetupDialogData& GetPageSetupDialogData( );
int ShowModal( );
};

// ---------------------------------------------------------------------------
// wxPrintDialog

class %delete wxPrintDialog : public wxObject // NOT a wxDialog in 2.8
{
wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL );

wxPrintDialogData& GetPrintDialogData( );
wxPrintData& GetPrintData();
wxDC* GetPrintDC( );
int ShowModal( );
};

// ---------------------------------------------------------------------------
// wxPrintDialogData

class %delete wxPrintDialogData : public wxObject
{
wxPrintDialogData( );
wxPrintDialogData(const wxPrintDialogData& dialogData );
wxPrintDialogData(const wxPrintData& data );

// copied straight from cmndata.h not docs
int GetFromPage() const;
int GetToPage() const;
int GetMinPage() const;
int GetMaxPage() const;
int GetNoCopies() const;
bool GetAllPages() const;
bool GetSelection() const;
bool GetCollate() const;
bool GetPrintToFile() const;
// WXWIN_COMPATIBILITY_2_4 //bool GetSetupDialog() const;
void SetFromPage(int v );
void SetToPage(int v );
void SetMinPage(int v );
void SetMaxPage(int v );
void SetNoCopies(int v );
void SetAllPages(bool flag );
void SetSelection(bool flag );
void SetCollate(bool flag );
void SetPrintToFile(bool flag );
// WXWIN_COMPATIBILITY_2_4 //void SetSetupDialog(bool flag) { m_printSetupDialog = flag; };
void EnablePrintToFile(bool flag );
void EnableSelection(bool flag );
void EnablePageNumbers(bool flag );
void EnableHelp(bool flag );
bool GetEnablePrintToFile() const;
bool GetEnableSelection() const;
bool GetEnablePageNumbers() const;
bool GetEnableHelp() const;
bool Ok() const;
wxPrintData& GetPrintData( );
void SetPrintData(const wxPrintData& printData );

void operator=(const wxPrintDialogData& data );
};

// ---------------------------------------------------------------------------
// wxPreviewCanvas

class wxPreviewCanvas : public wxWindow
{
wxPreviewCanvas(wxPrintPreview *preview, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewCanvas" );
};

// ---------------------------------------------------------------------------
// wxPreviewControlBar

#define wxPREVIEW_PRINT
#define wxPREVIEW_PREVIOUS
#define wxPREVIEW_NEXT
#define wxPREVIEW_ZOOM
#define wxPREVIEW_FIRST
#define wxPREVIEW_LAST
#define wxPREVIEW_GOTO

#define wxID_PREVIEW_CLOSE
#define wxID_PREVIEW_NEXT
#define wxID_PREVIEW_PREVIOUS
#define wxID_PREVIEW_PRINT
#define wxID_PREVIEW_ZOOM
#define wxID_PREVIEW_FIRST
#define wxID_PREVIEW_LAST
#define wxID_PREVIEW_GOTO

class wxPreviewControlBar : public wxWindow
{
wxPreviewControlBar(wxPrintPreview* preview, long buttons, wxWindow* parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewControlBar" );

//void CreateButtons( );
virtual void SetZoomControl(int zoom );
virtual int GetZoomControl( );
//virtual wxPrintPreviewBase *GetPrintPreview() const;
};

// ---------------------------------------------------------------------------
// wxPrintPreview
#if wxLUA_USE_wxLuaPrintout

class wxPrintPreview : public wxObject
{
wxPrintPreview(wxLuaPrintout* printout, wxLuaPrintout* printoutForPrinting, wxPrintData* data=NULL );

bool DrawBlankPage(wxPreviewCanvas* window, wxDC& dc );
wxPreviewCanvas* GetCanvas( );
int GetCurrentPage( );
wxFrame * GetFrame( );
int GetMaxPage( );
int GetMinPage( );
wxPrintout* GetPrintout( );
wxPrintout* GetPrintoutForPrinting( );
bool Ok( );
bool PaintPage(wxPreviewCanvas* window, wxDC &dc );
bool Print(bool prompt );
bool RenderPage(int pageNum );
void SetCanvas(wxPreviewCanvas* window );
void SetCurrentPage(int pageNum );
void SetFrame(wxFrame *frame );
void SetPrintout(wxLuaPrintout *printout );
void SetZoom(int percent );
};

// ---------------------------------------------------------------------------
// wxPreviewFrame

class wxPreviewFrame : public wxFrame
{
wxPreviewFrame(wxPrintPreview *preview, wxFrame *parent, const wxString &title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString &name = "wxPreviewFrame" );

void CreateControlBar( );
void CreateCanvas( );
void Initialize( );
wxPreviewControlBar* GetControlBar() const;
};

#endif //wxLUA_USE_wxLuaPrintout

// ---------------------------------------------------------------------------
// wxPostScriptDC

#if wxUSE_POSTSCRIPT

#include "wx/dcps.h"

class %delete wxPostScriptDC : public wxDC
{
wxPostScriptDC(const wxPrintData& printData );

!%wxchkver_2_9_2 static void SetResolution(int ppi );
!%wxchkver_2_9_2 static int GetResolution( );
%wxchkver_2_9_2 int GetResolution( );
};

#endif //wxUSE_POSTSCRIPT

// ---------------------------------------------------------------------------
// wxPrinterDC

#if %msw|%mac
#include "wx/dcprint.h"

class %delete wxPrinterDC : public wxDC
{
wxPrinterDC(const wxPrintData& printData );
};
#endif // %msw|%mac

#endif //wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE



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


// ===========================================================================
// Purpose: wxSizers and wxLayoutConstraints
// 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_wxSizer

#if %wxchkver_2_8

// ---------------------------------------------------------------------------
// wxSizerFlags

class %delete wxSizerFlags
{
wxSizerFlags(int proportion = 0 );

// setters for all sizer flags, they all return the object itself so that
// calls to them can be chained

wxSizerFlags& Proportion(int proportion );
wxSizerFlags& Align(int alignment); // combination of wxAlignment values
wxSizerFlags& Expand(); // wxEXPAND

// some shortcuts for Align( );
wxSizerFlags& Centre(); // { return Align(wxCENTRE); }
wxSizerFlags& Center(); // { return Centre(); }
wxSizerFlags& Left(); // { return Align(wxALIGN_LEFT); }
wxSizerFlags& Right(); // { return Align(wxALIGN_RIGHT); }
wxSizerFlags& Top(); // { return Align(wxALIGN_TOP); }
wxSizerFlags& Bottom(); // { return Align(wxALIGN_BOTTOM); }

static int GetDefaultBorder(); // default border size used by Border() below
wxSizerFlags& Border(int direction, int borderInPixels );
wxSizerFlags& Border(int direction = wxALL );
wxSizerFlags& DoubleBorder(int direction = wxALL );

wxSizerFlags& TripleBorder(int direction = wxALL );
wxSizerFlags& HorzBorder( );
wxSizerFlags& DoubleHorzBorder( );
wxSizerFlags& Shaped( );
wxSizerFlags& FixedMinSize( );

#if (wxABI_VERSION >= 20808 );
wxSizerFlags& ReserveSpaceEvenIfHidden( );
#endif

// accessors for wxSizer only
int GetProportion() const;
int GetFlags() const;
int GetBorderInPixels() const;
};

// ----------------------------------------------------------------------------
// wxSizerSpacer - No real need to create one of these in wxLua

//class wxSizerSpacer
//{
// wxSizerSpacer(const wxSize& size );
// void SetSize(const wxSize& size );
// const wxSize& GetSize() const;
// void Show(bool show );
// bool IsShown() const;
//};

// ---------------------------------------------------------------------------
// wxSizerItem

class wxSizerItem : public wxObject
{
wxSizerItem(int width, int height, int proportion, int flag, int border, %ungc wxObject* userData );
wxSizerItem(wxWindow* window, int proportion, int flag, int border, %ungc wxObject* userData );
wxSizerItem(wxSizer* sizer, int proportion, int flag, int border, %ungc wxObject* userData );
wxSizerItem(wxWindow* window, const wxSizerFlags& flags );
wxSizerItem(wxSizer* window, const wxSizerFlags& flags );

wxSize CalcMin( );
void DeleteWindows( );
void DetachSizer( );
int GetBorder() const;
int GetFlag() const;
wxSize GetMinSize() const;
wxSize GetMinSizeWithBorder() const;
wxPoint GetPosition() const;
int GetProportion() const;
float GetRatio() const;
wxRect GetRect( );
wxSize GetSize() const;
wxSizer* GetSizer() const;
wxSize GetSpacer() const;
wxObject* GetUserData() const;
wxWindow* GetWindow() const;
bool IsShown() const;
bool IsSizer() const;
bool IsSpacer() const;
bool IsWindow() const;
void SetBorder(int border );
void SetDimension(const wxPoint& pos, const wxSize& size );
void SetFlag(int flag );
void SetInitSize(int x, int y );
void SetMinSize(const wxSize& size );
void SetMinSize( int x, int y );
void SetProportion(int proportion );
void SetRatio(int width, int height );
void SetRatio(const wxSize& size );
void SetRatio(float ratio );
void SetSizer(wxSizer* sizer );
void SetSpacer(const wxSize& size );
void SetSpacer(int width, int height );
void SetUserData(%ungc wxObject* userData );
void SetWindow(wxWindow* window );
void Show(bool show );
};

// ---------------------------------------------------------------------------
// wxSizer

class wxSizer : public wxObject
{
// base class no constructors

wxSizerItem* Add(wxWindow* window, int proportion = 0,int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Add(wxSizer* sizer, int proportion = 0, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Add(int width, int height, int proportion = 0, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Add(wxWindow* window, const wxSizerFlags& flags );
wxSizerItem* Add(wxSizer* sizer, const wxSizerFlags& flags );
wxSizerItem* Add( wxSizerItem *item );
wxSizerItem* AddSpacer(int size );
wxSizerItem* AddStretchSpacer(int prop = 1 );
wxSize CalcMin( );
virtual void Clear( bool delete_windows = false );

#if (wxABI_VERSION >= 20808 );
wxSize ComputeFittingClientSize(wxWindow *window );
wxSize ComputeFittingWindowSize(wxWindow *window );
#endif

virtual void DeleteWindows( );
bool Detach(wxWindow* window );
bool Detach(wxSizer* sizer );
bool Detach(size_t index );
void Fit(wxWindow* window );
void FitInside(wxWindow* window );
wxSizerItemList& GetChildren( );
wxWindow *GetContainingWindow() const;
wxSizerItem* GetItem(wxWindow* window, bool recursive = false );
wxSizerItem* GetItem(wxSizer* sizer, bool recursive = false );
wxSizerItem* GetItem(size_t index );
wxSize GetSize( );
wxPoint GetPosition( );
wxSize GetMinSize( );
bool Hide( wxSizer *sizer, bool recursive = false );
bool Hide( wxWindow *window, bool recursive = false );
bool Hide( size_t index );
wxSizerItem* Insert(size_t index, wxWindow* window, int proportion = 0,int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Insert(size_t index, wxSizer* sizer, int proportion = 0, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Insert(size_t index, int width, int height, int proportion = 0, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Insert(size_t index, wxWindow* window, const wxSizerFlags& flags );
wxSizerItem* Insert(size_t index, wxSizer* sizer, const wxSizerFlags& flags );
virtual wxSizerItem* Insert( size_t index, wxSizerItem *item );
wxSizerItem* InsertSpacer(size_t index, int size );
wxSizerItem* InsertStretchSpacer(size_t index, int prop = 1 );
bool IsShown( wxWindow *window ) const;
bool IsShown( wxSizer *sizer ) const;
bool IsShown( size_t index ) const;
void Layout( );
void Prepend(wxWindow* window, int proportion = 0, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
void Prepend(wxSizer* sizer, int proportion = 0, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
void Prepend(int width, int height, int proportion = 0, int flag = 0, int border= 0, %ungc wxObject* userData = NULL );
wxSizerItem* Prepend(wxWindow* window, const wxSizerFlags& flags );
wxSizerItem* Prepend(wxSizer* sizer, const wxSizerFlags& flags );
wxSizerItem* Prepend(wxSizerItem *item );
wxSizerItem* PrependSpacer(int size );
wxSizerItem* PrependStretchSpacer(int prop = 1 );
void RecalcSizes( );
//bool Remove(wxWindow* window) - deprecated use Detach
//bool Remove(wxSizer* sizer );
//bool Remove(size_t index );
virtual bool Replace( wxWindow *oldwin, wxWindow *newwin, bool recursive = false );
virtual bool Replace( wxSizer *oldsz, wxSizer *newsz, bool recursive = false );
virtual bool Replace( size_t index, wxSizerItem *newitem );
void SetContainingWindow(wxWindow *window );
void SetDimension(int x, int y, int width, int height );
void SetMinSize(int width, int height );
void SetMinSize(const wxSize& size );
void SetItemMinSize(wxWindow* window, int width, int height );
void SetItemMinSize(wxSizer* sizer, int width, int height );
void SetItemMinSize(int pos, int width, int height );
void SetSizeHints(wxWindow* window );
void SetVirtualSizeHints(wxWindow* window );
bool Show(wxWindow* window, bool show = true, bool recursive = false );
bool Show(wxSizer* sizer, bool show = true, bool recursive = false );
bool Show(size_t index, bool show = true );
//void Show(bool show) - simply calls ShowItems( );
virtual void ShowItems (bool show );
};

// ---------------------------------------------------------------------------
// wxSizerItemList

//#if wxLUA_USE_wxSizerItemList && !wxUSE_STL

class wxSizerItemList : public wxList
{
//wxSizerItemList() - no constructor, just get this from wxSizer::GetChildren( );

// This is returned from wxSizer::GetChildren(), use wxList methods and
// wxNode::GetData():DynamicCast("wxSizer") to retrieve the wxSizer

// Use the wxList methods, see also wxNode
};

//#endif //wxLUA_USE_wxSizerItemList && !wxUSE_STL

// ---------------------------------------------------------------------------
// wxBoxSizer

class wxBoxSizer : public wxSizer
{
wxBoxSizer(int orient );

//void RecalcSizes( );
//wxSize CalcMin( );
int GetOrientation( );
};

// ---------------------------------------------------------------------------
// wxGridSizer

class wxGridSizer : public wxSizer
{
wxGridSizer(int cols, int rows, int vgap, int hgap );
// wxGridSizer(int cols, int vgap = 0, int hgap = 0 );

int GetCols( );
int GetHGap( );
int GetRows( );
int GetVGap( );
void SetCols(int cols );
void SetHGap(int gap );
void SetRows(int rows );
void SetVGap(int gap );
};

// ---------------------------------------------------------------------------
// wxFlexGridSizer

enum wxFlexSizerGrowMode
{
wxFLEX_GROWMODE_NONE,
wxFLEX_GROWMODE_SPECIFIED,
wxFLEX_GROWMODE_ALL
};

class wxFlexGridSizer : public wxGridSizer
{
wxFlexGridSizer(int rows, int cols, int vgap=0, int hgap=0 );
// wxFlexGridSizer(int cols, int vgap = 0, int hgap = 0); // just use the above constructor

void AddGrowableCol( size_t idx, int proportion = 0 );
void AddGrowableRow( size_t idx, int proportion = 0 );
int GetFlexibleDirection() const;
wxFlexSizerGrowMode GetNonFlexibleGrowMode() const;
void RemoveGrowableCol( size_t idx );
void RemoveGrowableRow( size_t idx );
void SetFlexibleDirection(int direction );
void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode );
};

// ---------------------------------------------------------------------------
// wxGridBagSizer

#include "wx/gbsizer.h"

class wxGridBagSizer : public wxFlexGridSizer
{
wxGridBagSizer(int vgap=0, int hgap=0 );

wxSizerItem* Add(wxWindow* window, const wxGBPosition& pos, const wxGBSpan& span = wxDefaultSpan, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Add(wxSizer* sizer, const wxGBPosition& pos, const wxGBSpan& span = wxDefaultSpan, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Add(int width, int height, const wxGBPosition& pos, const wxGBSpan& span = wxDefaultSpan, int flag = 0, int border = 0, %ungc wxObject* userData = NULL );
wxSizerItem* Add(wxGBSizerItem* item );

bool CheckForIntersection(wxGBSizerItem* item, wxGBSizerItem* excludeItem = NULL );
bool CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem = NULL );

wxGBSizerItem* FindItem(wxWindow* window );
wxGBSizerItem* FindItem(wxSizer* sizer );
wxGBSizerItem* FindItemAtPoint(const wxPoint& pt );
wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos );
wxGBSizerItem* FindItemWithData(const wxObject* userData );
wxSize GetCellSize(int row, int col) const;
wxSize GetEmptyCellSize() const;

wxGBPosition GetItemPosition(wxWindow* window );
wxGBPosition GetItemPosition(wxSizer* sizer );
wxGBPosition GetItemPosition(size_t index );

wxGBSpan GetItemSpan(wxWindow* window );
wxGBSpan GetItemSpan(wxSizer* sizer );
wxGBSpan GetItemSpan(size_t index );
//void RecalcSizes( );
void SetEmptyCellSize(const wxSize& sz );
bool SetItemPosition(wxWindow* window, const wxGBPosition& pos );
bool SetItemPosition(wxSizer* sizer, const wxGBPosition& pos );
bool SetItemPosition(size_t index, const wxGBPosition& pos );
bool SetItemSpan(wxWindow* window, const wxGBSpan& span );
bool SetItemSpan(wxSizer* sizer, const wxGBSpan& span );
bool SetItemSpan(size_t index, const wxGBSpan& span );
};

// ---------------------------------------------------------------------------
// wxGBPosition

class %delete wxGBPosition
{
wxGBPosition(int row=0, int col=0 );
wxGBPosition(const wxGBPosition& pos );

int GetRow() const;
int GetCol() const;
void SetRow(int row );
void SetCol(int col );

bool operator==(const wxGBPosition& p) const;
};

// ---------------------------------------------------------------------------
// wxGBSpan

class %delete wxGBSpan
{
wxGBSpan(int rowspan=1, int colspan=1 );
wxGBSpan(const wxGBSpan& span );

int GetRowspan() const;
int GetColspan() const;
void SetRowspan(int rowspan );
void SetColspan(int colspan );

bool operator==(const wxGBSpan& o) const;
};

// ---------------------------------------------------------------------------
// wxGBSizerItem

class wxGBSizerItem : public wxSizerItem
{
wxGBSizerItem( );
wxGBSizerItem( int width, int height, const wxGBPosition& pos, const wxGBSpan& span, int flag, int border, %ungc wxObject* userData );
wxGBSizerItem( wxWindow *window, const wxGBPosition& pos, const wxGBSpan& span, int flag, int border, %ungc wxObject* userData );
wxGBSizerItem( wxSizer *sizer, const wxGBPosition& pos, const wxGBSpan& span, int flag, int border, %ungc wxObject* userData );

wxGBPosition GetPos() const;
//void GetPos(int& row, int& col) const;
wxGBSpan GetSpan() const;
//void GetSpan(int& rowspan, int& colspan) const;
bool SetPos( const wxGBPosition& pos );
bool SetSpan( const wxGBSpan& span );
bool Intersects(const wxGBSizerItem& other );
bool Intersects(const wxGBPosition& pos, const wxGBSpan& span );

// %override [row, col] wxGBSizerItem::GetEndPos( );
// C++ Func: void GetEndPos(int& row, int& col );
void GetEndPos( );

wxGridBagSizer* GetGBSizer() const;
void SetGBSizer(wxGridBagSizer* sizer );
};

// ---------------------------------------------------------------------------
// wxWrapSizer

#if %wxchkver_2_9

#include "wx/wrapsizer.h"

enum
{
wxEXTEND_LAST_ON_EACH_LINE,
wxREMOVE_LEADING_SPACES,
wxWRAPSIZER_DEFAULT_FLAGS
};

class wxWrapSizer : public wxBoxSizer
{
wxWrapSizer(int orient = wxHORIZONTAL, int flags = wxWRAPSIZER_DEFAULT_FLAGS);

// This will probably not be needed to be called by user code.
bool InformFirstDirection(int direction, int size, int availableOtherDir);
};

#endif

// ---------------------------------------------------------------------------
// wxNotebookSizer - deprecated

#if wxUSE_NOTEBOOK && (!%wxchkver_2_6 );

class wxNotebookSizer : public wxSizer
{
wxNotebookSizer(wxNotebook* notebook );
wxNotebook* GetNotebook( );
};

#endif //wxUSE_NOTEBOOK && (!%wxchkver_2_6 );

// ---------------------------------------------------------------------------
// wxBookCtrlSizer - also depricated since 2.6

// ---------------------------------------------------------------------------
// wxStaticBoxSizer

#if wxUSE_STATBOX

class wxStaticBoxSizer : public wxBoxSizer
{
wxStaticBoxSizer(wxStaticBox* box, int orient );
wxStaticBoxSizer(int orient, wxWindow *parent, const wxString& label = "" );

wxStaticBox* GetStaticBox( );
};

#endif //wxUSE_STATBOX

// ---------------------------------------------------------------------------
// wxStdDialogButtonSizer

#if wxUSE_BUTTON

class wxStdDialogButtonSizer : public wxBoxSizer
{
wxStdDialogButtonSizer( );

void AddButton(wxButton *button );
void SetAffirmativeButton( wxButton *button );
void SetNegativeButton( wxButton *button );
void SetCancelButton( wxButton *button );

void Realize( );

wxButton *GetAffirmativeButton() const;
wxButton *GetApplyButton() const;
wxButton *GetNegativeButton() const;
wxButton *GetCancelButton() const;
wxButton *GetHelpButton() const;
};

#endif //wxUSE_BUTTON

#endif //wxLUA_USE_wxSizer

// ---------------------------------------------------------------------------
// wxLayoutConstraints - deprecated since 2.2, not updated to 2.6

#if wxLUA_USE_wxLayoutConstraints && (!%wxchkver_2_6 );

#include "wx/layout.h"

enum wxRelationship
{
wxUnconstrained,
wxAsIs,
wxPercentOf,
wxAbove,
wxBelow,
wxLeftOf,
wxRightOf,
wxSameAs,
wxAbsolute
};

enum wxEdge
{
wxLeft,
wxTop,
wxRight,
wxBottom,
wxWidth,
wxHeight,
wxCentre,
wxCenter,
wxCentreX,
wxCentreY
};

class wxLayoutConstraints : public wxObject
{
wxLayoutConstraints( );
};

// ---------------------------------------------------------------------------
// wxIndividualLayoutConstraint

#include "wx/layout.h"

class wxIndividualLayoutConstraint : public wxObject
{
wxIndividualLayoutConstraint( );
void Above(wxWindow *otherWin, int margin = 0 );
void Absolute(int value );
void AsIs( );
void Below(wxWindow *otherWin, int margin = 0 );
void Unconstrained( );
void LeftOf(wxWindow *otherWin, int margin = 0 );
void PercentOf(wxWindow *otherWin, wxEdge edge, int per );
void RightOf(wxWindow *otherWin, int margin = 0 );
void SameAs(wxWindow *otherWin, wxEdge edge, int margin = 0 );
void Set(wxRelationship rel, wxWindow *otherWin, wxEdge otherEdge, int value = 0, int margin = 0 );
};

#endif //wxLUA_USE_wxLayoutConstraints && (!%wxchkver_2_6 );



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


// ===========================================================================
// Purpose: wxWindow and other container type windows
// 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
// ===========================================================================


%wxchkver_2_8 wxWindow* wxFindFocusDescendant(wxWindow* ancestor );

// ---------------------------------------------------------------------------
// wxTooltip

#if wxLUA_USE_wxTooltip && wxUSE_TOOLTIPS

#include "wx/tooltip.h"

class %delete wxToolTip : public wxObject
{
wxToolTip(const wxString &tip );

static void Enable(bool flag );
static void SetDelay(long milliseconds );
void SetTip(const wxString& tip );
wxString GetTip( );
wxWindow *GetWindow() const;
};

#endif //wxLUA_USE_wxTooltip && wxUSE_TOOLTIPS


// ---------------------------------------------------------------------------
// wxWindowDisabler

#include "wx/utils.h"

class %delete wxWindowDisabler
{
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxWindowDisabler(wxWindow *winToSkip = NULL );
};

// ---------------------------------------------------------------------------
// wxWindowUpdateLocker - Note this only calls wxWindow::Freeze() -> Thaw( );

#include "wx/wupdlock.h"

class %delete wxWindowUpdateLocker
{
// NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough
wxWindowUpdateLocker(wxWindow *winToLock = NULL );
};

// ---------------------------------------------------------------------------
// wxWindow
#define wxSIMPLE_BORDER
#define wxDOUBLE_BORDER
#define wxSUNKEN_BORDER
#define wxRAISED_BORDER
#define wxSTATIC_BORDER
//#define wxNO_BORDER in defsutils.i
#define wxTRANSPARENT_WINDOW
// #define wxNO_3D %wxcompat_2_6
#define wxTAB_TRAVERSAL
#define wxWANTS_CHARS
#define wxVSCROLL
#define wxHSCROLL
#define wxALWAYS_SHOW_SB
#define wxCLIP_CHILDREN
#define wxNO_FULL_REPAINT_ON_RESIZE
#define wxFULL_REPAINT_ON_RESIZE

#define wxWS_EX_VALIDATE_RECURSIVELY
#define wxWS_EX_BLOCK_EVENTS
#define wxWS_EX_TRANSIENT
#define wxWS_EX_PROCESS_IDLE
#define wxWS_EX_PROCESS_UI_UPDATES

enum wxWindowVariant
{
wxWINDOW_VARIANT_NORMAL,
wxWINDOW_VARIANT_SMALL,
wxWINDOW_VARIANT_MINI,
wxWINDOW_VARIANT_LARGE,
wxWINDOW_VARIANT_MAX
};

enum wxUpdateUI
{
wxUPDATE_UI_NONE,
wxUPDATE_UI_RECURSE,
wxUPDATE_UI_FROMIDLE
};

//%mac|%x11|%motif typedef void* WXWidget
//%gtk typedef unsigned long WXWidget // GtkWidget* what could you do with it?
//%mgl typedef window_t WXWidget
//%msw|%os2 typedef unsigned long WXWidget

class %delete wxVisualAttributes
{
wxFont font;
wxColour colFg;
wxColour colBg;
};


class wxWindow : public wxEvtHandler
{
wxWindow( );
wxWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxWindow" );
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxWindow" );

virtual void AddChild(wxWindow* child );
void CacheBestSize(const wxSize& size) const;
virtual void CaptureMouse( );
void Center(int direction = wxBOTH );
void CenterOnParent(int direction = wxBOTH );
!%wxchkver_2_8 void CenterOnScreen(int direction = wxBOTH );
void Centre(int direction = wxBOTH );
void CentreOnParent(int direction = wxBOTH );
!%wxchkver_2_8 void CentreOnScreen(int direction = wxBOTH );
!%wxchkver_2_6 void Clear( );
%wxchkver_2_6 void ClearBackground( );

// %override [int x, int y] ClientToScreen(int x, int y) const;
// C++ Func: virtual void ClientToScreen(int* x, int* y) const;
%override_name wxLua_wxWindow_ClientToScreenXY virtual void ClientToScreen(int x, int y) const;

virtual wxPoint ClientToScreen(const wxPoint& pt) const;
virtual bool Close(bool force = false );
wxPoint ConvertDialogToPixels(const wxPoint& pt );
wxSize ConvertDialogToPixels(const wxSize& sz );
wxPoint ConvertPixelsToDialog(const wxPoint& pt );
wxSize ConvertPixelsToDialog(const wxSize& sz );
virtual bool Destroy( );
virtual void DestroyChildren( );
bool Disable( );
// virtual wxSize DoGetBestSize() const; // protected
//virtual void DoUpdateWindowUI(wxUpdateUIEvent& event );
%win virtual void DragAcceptFiles(bool accept );
virtual void Enable(bool enable );
static wxWindow* FindFocus( );
wxWindow* FindWindow(long id );
wxWindow* FindWindow(const wxString& name );
static wxWindow* FindWindowById(long id, wxWindow* parent = NULL );
static wxWindow* FindWindowByName(const wxString& name, wxWindow* parent = NULL );
static wxWindow* FindWindowByLabel(const wxString& label, wxWindow* parent = NULL );
virtual void Fit( );
virtual void FitInside( );
virtual void Freeze( );
wxAcceleratorTable* GetAcceleratorTable() const;
//wxAccessible* GetAccessible( );
!%wxchkver_2_8 wxSize GetAdjustedBestSize() const;
virtual wxColour GetBackgroundColour() const;
virtual wxBackgroundStyle GetBackgroundStyle() const;
wxSize GetBestFittingSize() const; // deprecated in 2.8 use GetEffectiveMinSize
virtual wxSize GetBestSize() const;
wxCaret* GetCaret() const;
static wxWindow* GetCapture( );
virtual int GetCharHeight() const;
virtual int GetCharWidth() const;
wxWindowList& GetChildren( );
//static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL );

// %override [int width, int height] wxWindow::GetClientSizeWH() const;
// C++ Func: virtual void GetClientSize(int* width, int* height) const;
%rename GetClientSizeWH virtual void GetClientSize() const;

wxSize GetClientSize() const;
!%wxchkver_2_6 wxLayoutConstraints* GetConstraints() const; // deprecated use sizers
const wxSizer* GetContainingSizer() const;
wxCursor GetCursor() const;
virtual wxVisualAttributes GetDefaultAttributes() const;
!%wxchkver_2_8 wxWindow* GetDefaultItem() const;
wxDropTarget* GetDropTarget() const;
wxEvtHandler* GetEventHandler() const;
long GetExtraStyle() const;
wxFont GetFont() const;
virtual wxColour GetForegroundColour( );
wxWindow* GetGrandParent() const;
void* GetHandle() const;
virtual wxString GetHelpText() const;
int GetId() const;
virtual wxString GetLabel() const;
wxSize GetMaxSize() const;
wxSize GetMinSize() const;
virtual wxString GetName() const;
virtual wxWindow* GetParent() const;

// %override [int x, int y] wxWindow::GetPosition() const;
// C++ Func: virtual void GetPosition(int* x, int* y) const;
%override_name wxLua_wxWindow_GetPositionXY %rename GetPositionXY virtual void GetPosition() const;

wxPoint GetPosition() const;
virtual wxRect GetRect() const;

// %override [int x, int y] wxWindow::GetScreenPosition() const;
// C++ Func: virtual void GetScreenPosition(int* x, int* y) const;
%override_name wxLua_wxWindow_GetScreenPositionXY %rename GetScreenPositionXY virtual void GetScreenPosition() const;

virtual wxPoint GetScreenPosition( );
virtual wxRect GetScreenRect() const;
virtual int GetScrollPos(int orientation );
virtual int GetScrollRange(int orientation );
virtual int GetScrollThumb(int orientation );
virtual wxSize GetSize() const;

// %override [int width, int height] wxWindow::GetSizeWH() const;
// C++ Func: virtual void GetSize(int* width, int* height) const;
%rename GetSizeWH virtual void GetSize() const;

wxSizer* GetSizer() const;

// %override [int x, int y, int descent, int externalLeading] int wxWindow::GetTextExtent(const wxString& string, const wxFont* font = NULL ) const;
// Note: Cannot use use16 from Lua, virtual void GetTextExtent(const wxString& string, int* x, int* y, int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = false) const;
// C++ Func: virtual void GetTextExtent(const wxString& string, int* x, int* y, int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL ) const;
virtual void GetTextExtent(const wxString& string, const wxFont* font = NULL ) const;

!%wxchkver_2_8 virtual wxString GetTitle( );
wxToolTip* GetToolTip() const;
virtual wxRegion GetUpdateRegion() const;
wxValidator* GetValidator() const;

// %override [int width, int height] wxWindow::GetVirtualSizeWH() const;
// C++ Func: void GetVirtualSize(int* width, int* height) const;
%override_name wxLua_wxWindow_GetVirtualSizeWH %rename GetVirtualSizeWH void GetVirtualSize() const;

wxSize GetVirtualSize() const;
%wxchkver_2_9_4 virtual wxSize GetBestVirtualSize() const;
%wxchkver_2_9_4 virtual double GetContentScaleFactor() const;
long GetWindowStyleFlag() const;
wxWindowVariant GetWindowVariant() const;
%wxchkver_2_4 bool HasCapture() const;
virtual bool HasScrollbar(int orient) const;
virtual bool HasTransparentBackground() const;
bool Hide( );
void InheritAttributes( );
void InitDialog( );
void InvalidateBestSize( );
virtual bool IsEnabled() const;
bool IsExposed(int x, int y) const;
bool IsExposed(const wxPoint &pt) const;
bool IsExposed(int x, int y, int w, int h) const;
bool IsExposed(const wxRect &rect) const;
virtual bool IsRetained() const;
virtual bool IsShown() const;
bool IsTopLevel() const;
void Layout( );
void Lower( );
virtual void MakeModal(bool flag );
void Move(int x, int y );
void Move(const wxPoint& pt );
void MoveAfterInTabOrder(wxWindow *win );
void MoveBeforeInTabOrder(wxWindow *win );
bool Navigate(int flags = wxNavigationKeyEvent::IsForward );
wxEvtHandler* PopEventHandler(bool deleteHandler = false) const;
bool PopupMenu(wxMenu* menu, const wxPoint& pos = wxDefaultPosition );
bool PopupMenu(wxMenu* menu, int x, int y );
void PushEventHandler(wxEvtHandler* handler );
void Raise( );
virtual void Refresh(bool eraseBackground = true, const wxRect* rect = NULL );
// don't need to worry about rect, void RefreshRect(const wxRect& rect, bool eraseBackground = true );
// %win bool RegisterHotKey(int hotkeyId, int modifiers, int virtualKeyCode) - only under WinCE
virtual void ReleaseMouse( );
virtual void RemoveChild(wxWindow* child );
bool RemoveEventHandler(wxEvtHandler *handler );
virtual bool Reparent(wxWindow* newParent );
virtual wxPoint ScreenToClient(const wxPoint& pt) const;

// %override [int x, int y] wxWindow::ScreenToClient(int x, int y) const;
// C++ Func: virtual void ScreenToClient(int* x, int* y) const;
%override_name wxLua_wxWindow_ScreenToClientXY virtual void ScreenToClient(int x, int y) const;

virtual bool ScrollLines(int lines );
virtual bool ScrollPages(int pages );
virtual void ScrollWindow(int dx, int dy, const wxRect* rect = NULL );
virtual void SetAcceleratorTable(const wxAcceleratorTable& accel );
//void SetAccessible(wxAccessible* accessible );
void SetAutoLayout(bool autoLayout );
virtual void SetBackgroundColour(const wxColour& colour );
virtual void SetBackgroundStyle(wxBackgroundStyle style );
!%wxchkver_2_8 void SetBestFittingSize(const wxSize& size = wxDefaultSize); // deprecated in 2.8 use SetInitialSize
void SetCaret(wxCaret *caret) const;
virtual void SetClientSize(const wxSize& size );
virtual void SetClientSize(int width, int height );
void SetContainingSizer(wxSizer* sizer );
virtual void SetCursor(const wxCursor& cursor );
!%wxchkver_2_6 void SetConstraints(wxLayoutConstraints* constraints );
!%wxchkver_2_8 wxWindow* SetDefaultItem(wxWindow *win );
// virtual void SetInitialBestSize(const wxSize& size) protected
%wxchkver_2_8 void SetInitialSize(const wxSize& size = wxDefaultSize );
void SetMaxSize(const wxSize& size );
void SetMinSize(const wxSize& size );
void SetOwnBackgroundColour(const wxColour& colour );
void SetOwnFont(const wxFont& font );
void SetOwnForegroundColour(const wxColour& colour );
void SetDropTarget(%ungc wxDropTarget* target );
void SetEventHandler(wxEvtHandler* handler );
void SetExtraStyle(long exStyle );
virtual void SetFocus( );
//virtual void SetFocusFromKbd( );
void SetFont(const wxFont& font );
virtual void SetForegroundColour(const wxColour& colour );
virtual void SetHelpText(const wxString& helpText );
void SetId(int id );
virtual void SetLabel(const wxString& label );
virtual void SetName(const wxString& name );
// virtual void SetPalette(wxPalette* palette) - obsolete
virtual void SetScrollbar(int orientation, int position, int thumbSize, int range, bool refresh = true );
virtual void SetScrollPos(int orientation, int pos, bool refresh = true );
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO );
virtual void SetSize(int width, int height );
void SetSize(const wxSize& size );
virtual void SetSize(const wxRect& rect );
virtual void SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1 );
void SetSizeHints(const wxSize& minSize, const wxSize& maxSize=wxDefaultSize, const wxSize& incSize=wxDefaultSize );
void SetSizer(wxSizer* sizer, bool deleteOld=true );
void SetSizerAndFit(wxSizer* sizer, bool deleteOld=true );
!%wxchkver_2_8 virtual void SetTitle(const wxString& title );
virtual void SetThemeEnabled(bool enable );
void SetToolTip(const wxString& tip );
void SetToolTip(%ungc wxToolTip* tip );
virtual void SetValidator(const wxValidator& validator );
void SetVirtualSize(int width, int height );
void SetVirtualSize(const wxSize& size );
virtual void SetVirtualSizeHints(int minW,int minH, int maxW=-1, int maxH=-1 );
void SetVirtualSizeHints(const wxSize& minSize=wxDefaultSize, const wxSize& maxSize=wxDefaultSize );
void SetWindowStyle(long style );
virtual void SetWindowStyleFlag(long style );
void SetWindowVariant(wxWindowVariant variant );
virtual bool ShouldInheritColours( );
virtual bool Show(bool show = true );
virtual void Thaw( );
virtual bool TransferDataFromWindow( );
virtual bool TransferDataToWindow( );
//%win bool UnregisterHotKey(int hotkeyId) - only under WinCE
virtual void Update( );
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE );
virtual bool Validate( );
void WarpPointer(int x, int y );
};

// ---------------------------------------------------------------------------
// wxWindowList

#if wxLUA_USE_wxWindowList && !wxUSE_STL

class wxWindowList : public wxList
{
//wxWindowList() - no constructor, just get this from wxWindow::GetChildren( );

// This is returned from wxWindow::GetChildren(), use wxList methods and
// wxNode::GetData():DynamicCast("wxWindow") to retrieve the wxWindow

// Use the wxList methods, see also wxNode
};

#endif //wxLUA_USE_wxWindowList && !wxUSE_STL

// ---------------------------------------------------------------------------
// wxPanel

class wxPanel : public wxWindow
{
wxPanel( );
wxPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "wxPanel" );
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "wxPanel" );

//!%wxchkver_2_8 wxWindow* GetDefaultItem() const; // - see wxWindow
// void InitDialog() see wxWindow
//!%wxchkver_2_8 wxWindow* SetDefaultItem(wxWindow *win) - see wxWindow
//virtual void SetFocus() - see wxWindow
virtual void SetFocusIgnoringChildren( );
};

// ---------------------------------------------------------------------------
// wxControl

#include "wx/control.h"

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

void Command(wxCommandEvent& event );
// wxString GetLabel(); // see wxWindow
// void SetLabel(const wxString& label); // see wxWindow

//static wxString GetLabelText(const wxString& label) translates arbitrary string, removes mnemonic characters ('&' );
%wxchkver_2_8 wxString GetLabelText() const;
};


// ---------------------------------------------------------------------------
// wxBookCtrlBase

#if wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL

#include "wx/bookctrl.h"

#if %wxchkver_2_8
#define wxBK_DEFAULT
#define wxBK_TOP
#define wxBK_LEFT
#define wxBK_RIGHT
#define wxBK_BOTTOM
#define wxBK_ALIGN_MASK

enum
{
wxBK_HITTEST_NOWHERE,
wxBK_HITTEST_ONICON,
wxBK_HITTEST_ONLABEL,
wxBK_HITTEST_ONITEM,
wxBK_HITTEST_ONPAGE
};
#endif // %wxchkver_2_8

class wxBookCtrlBase : public wxControl
{
// no constructors, base class

void AdvanceSelection(bool forward = true );
virtual bool AddPage(wxWindow *page, const wxString& text, bool bSelect = false, int imageId = -1 );
//void AssignImageList(wxImageList *imageList );
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
virtual bool DeleteAllPages( );
virtual bool DeletePage(size_t n );
wxWindow *GetCurrentPage() const;
wxImageList* GetImageList() const;
virtual wxWindow *GetPage(size_t n );
virtual size_t GetPageCount() const;
virtual int GetPageImage(size_t n) const;
virtual wxString GetPageText(size_t n) const;
virtual int GetSelection() const;
virtual bool InsertPage(size_t n, wxWindow *page, const wxString& text, bool bSelect = false, int imageId = -1 );
virtual bool RemovePage(size_t n );
virtual void SetImageList(wxImageList *imageList );
virtual bool SetPageImage(size_t n, int imageId );
virtual void SetPageSize(const wxSize& size );
virtual bool SetPageText(size_t n, const wxString& strText );
virtual int SetSelection(size_t n );

#if %wxchkver_2_8
unsigned int GetInternalBorder() const;
void SetInternalBorder(unsigned int border );
void SetControlMargin(int margin );
int GetControlMargin() const;
bool IsVertical() const;
void SetFitToCurrentPage(bool fit );
bool GetFitToCurrentPage() const;

%wxchkver_2_8 virtual int ChangeSelection(size_t n );

//virtual int HitTest(const wxPoint& pt, long* flags = NULL) const; // FIXME add this
//virtual bool HasMultiplePages() const; // - FIXME do we need this?

wxSizer* GetControlSizer() const;
#endif // %wxchkver_2_8
};

// ---------------------------------------------------------------------------
// wxBookCtrlBaseEvent

class %delete wxBookCtrlBaseEvent : public wxNotifyEvent
{
wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, int nSel = -1, int nOldSel = -1 );

int GetOldSelection() const;
int GetSelection() const; // note : must override wxCommandEvent func since it's not virtual
void SetOldSelection(int page );
void SetSelection(int page );
};

#endif //wxLUA_USE_wxNotebook && wxUSE_BOOKCTRL

// ---------------------------------------------------------------------------
// wxNotebook

#if wxLUA_USE_wxNotebook && wxUSE_NOTEBOOK

#include "wx/notebook.h"

//#if !%wxchkver_2_8|%wxcompat_2_6
#define wxNB_TOP // use wxBK_XXX after 2.6
#define wxNB_LEFT
#define wxNB_RIGHT
#define wxNB_BOTTOM
#define wxNB_FIXEDWIDTH
#define wxNB_MULTILINE
#define wxNB_NOPAGETHEME
//#endif // !%wxchkver_2_8|%wxcompat_2_6

enum
{
wxNB_HITTEST_NOWHERE,
wxNB_HITTEST_ONICON,
wxNB_HITTEST_ONLABEL,
wxNB_HITTEST_ONITEM
};

typedef wxWindow wxNotebookPage

class wxNotebook : public wxBookCtrlBase
{
wxNotebook( );
wxNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxNotebook" );
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxNotebook" );

// NOTE: All remmed out functions are located in wxBookCtrlBase

//bool AddPage(wxNotebookPage* page, const wxString& text, bool select = false, int imageId = -1 );
//void AdvanceSelection(bool forward = true );
//void AssignImageList(wxImageList* imageList );
//bool DeleteAllPages( );
//bool DeletePage(int page );
//wxWindow* GetCurrentPage() const;
//wxImageList* GetImageList() const;
//wxNotebookPage* GetPage(int page );
//int GetPageCount() const;
//int GetPageImage(int nPage) const;
//wxString GetPageText(int nPage) const;
int GetRowCount() const;
//int GetSelection() const;
wxColour GetThemeBackgroundColour() const;

// %override [int page, int flags] wxNotebook::HitTest(const wxPoint& pt );
// C++ Func: int HitTest(const wxPoint& pt, long *flags = NULL );
int HitTest(const wxPoint& pt );

//bool InsertPage(int index, wxNotebookPage* page, const wxString& text, bool select = false, int imageId = -1 );
//bool RemovePage(int page );
//void SetImageList(wxImageList* imageList );
void SetPadding(const wxSize& padding );
//void SetPageSize(const wxSize& size );
//bool SetPageImage(int page, int image );
//bool SetPageText(int page, const wxString& text );
//int SetSelection(int page );
};

// ---------------------------------------------------------------------------
// wxNotebookEvent

class %delete wxNotebookEvent : public wxBookCtrlBaseEvent
{
%wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED // EVT_NOTEBOOK_PAGE_CHANGED(winid, fn );
%wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING // EVT_NOTEBOOK_PAGE_CHANGING(winid, fn );

wxNotebookEvent(wxEventType eventType = wxEVT_NULL, int id = 0, int sel = -1, int oldSel = -1 );

// functions in wxBookCtrlBaseEvent
//int GetOldSelection() const;
//int GetSelection() const;
//void SetOldSelection(int page );
//void SetSelection(int page );
};

#endif //wxLUA_USE_wxNotebook && wxUSE_NOTEBOOK

// ---------------------------------------------------------------------------
// wxListbook

#if wxLUA_USE_wxNotebook && wxLUA_USE_wxListCtrl && wxUSE_LISTBOOK

#include "wx/listbook.h"

#define wxLB_DEFAULT
#define wxLB_TOP
#define wxLB_BOTTOM
#define wxLB_LEFT
#define wxLB_RIGHT
#define wxLB_ALIGN_MASK

class wxListbook : public wxBookCtrlBase
{
wxListbook( );
wxListbook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxListbook" );
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxListbook" );

// NOTE: See functions in wxBookCtrlBase

!%wxchkver_2_8 bool IsVertical() const; // in wxBookCtrlBase in 2.8
wxListView* GetListView( );
};

// ---------------------------------------------------------------------------
// wxListbookEvent

class %delete wxListbookEvent : public wxBookCtrlBaseEvent
{
%wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED // EVT_LISTBOOK_PAGE_CHANGED(winid, fn );
%wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING // EVT_LISTBOOK_PAGE_CHANGING(winid, fn );

wxListbookEvent(wxEventType eventType = wxEVT_NULL, int id = 0, int sel = -1, int oldSel = -1 );

// functions in wxBookCtrlBaseEvent
//int GetOldSelection() const;
//int GetSelection() const;
//void SetOldSelection(int page );
//void SetSelection(int page );
};

#endif //wxLUA_USE_wxNotebook && wxLUA_USE_wxListCtrl && wxUSE_LISTBOOK

// ---------------------------------------------------------------------------
// wxChoicebook

#if wxLUA_USE_wxNotebook && wxLUA_USE_wxChoice && wxUSE_CHOICEBOOK

#include "wx/choicebk.h"

#define wxCHB_DEFAULT
#define wxCHB_TOP
#define wxCHB_BOTTOM
#define wxCHB_LEFT
#define wxCHB_RIGHT
#define wxCHB_ALIGN_MASK

class wxChoicebook : public wxBookCtrlBase
{
wxChoicebook( );
wxChoicebook(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxChoicebook" );
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxChoicebook" );

// NOTE: See functions in wxBookCtrlBase

!%wxchkver_2_8 bool IsVertical() const; // in wxBookCtrlBase in 2.8
wxChoice* GetChoiceCtrl() const;
};

// ---------------------------------------------------------------------------
// wxChoicebookEvent

class %delete wxChoicebookEvent : public wxBookCtrlBaseEvent
{
%wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED // EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn );
%wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING // EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn );

wxChoicebookEvent(wxEventType eventType = wxEVT_NULL, int id = 0, int sel = -1, int oldSel = -1 );

// functions in wxBookCtrlBaseEvent
//int GetOldSelection() const;
//int GetSelection() const;
//void SetOldSelection(int page );
//void SetSelection(int page );
};

#endif //wxLUA_USE_wxNotebook && wxLUA_USE_wxChoice && wxUSE_CHOICEBOOK

// ---------------------------------------------------------------------------
// wxTreebook

#if %wxchkver_2_8 && wxUSE_TREEBOOK && wxLUA_USE_wxTreebook

#include "wx/treebook.h"

class wxTreebook : public wxBookCtrlBase
{
wxTreebook( );
wxTreebook(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBK_DEFAULT, const wxString& name = "wxTreebook" );
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBK_DEFAULT,const wxString& name = "wxTreebook" );

virtual bool InsertPage(size_t pos, wxWindow *page, const wxString& text, bool bSelect = false, int imageId = wxNOT_FOUND);
virtual bool InsertSubPage(size_t pos, wxWindow *page, const wxString& text, bool bSelect = false, int imageId = wxNOT_FOUND);
virtual bool AddPage(wxWindow *page, const wxString& text, bool bSelect = false, int imageId = wxNOT_FOUND);
virtual bool AddSubPage(wxWindow *page, const wxString& text, bool bSelect = false, int imageId = wxNOT_FOUND);
virtual bool IsNodeExpanded(size_t pos) const;

virtual bool ExpandNode(size_t pos, bool expand = true);
bool CollapseNode(size_t pos );
int GetPageParent(size_t pos) const;
wxTreeCtrl* GetTreeCtrl() const;
};

// ---------------------------------------------------------------------------
// wxTreebookEvent

class %delete wxTreebookEvent : public wxBookCtrlBaseEvent
{
%wxEventType wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED // EVT_TREEBOOK_PAGE_CHANGED(winid, fn );
%wxEventType wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING // EVT_TREEBOOK_PAGE_CHANGING(winid, fn );
%wxEventType wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED // EVT_TREEBOOK_NODE_COLLAPSED(winid, fn );
%wxEventType wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED // EVT_TREEBOOK_NODE_EXPANDED(winid, fn );

wxTreebookEvent(const wxTreebookEvent& event );
wxTreebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, int nSel = wxNOT_FOUND, int nOldSel = wxNOT_FOUND );
};

#endif // %wxchkver_2_8 && wxUSE_TREEBOOK && wxLUA_USE_wxTreebook

// ---------------------------------------------------------------------------
// wxToolbook

#if %wxchkver_2_8 && wxUSE_TOOLBOOK && wxLUA_USE_wxToolbook

#include "wx/toolbook.h"

class wxToolbook : public wxBookCtrlBase
{
wxToolbook( );
wxToolbook(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxToolbook" );
bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxToolbook" );

wxToolBarBase* GetToolBar() const;
// must be called in OnIdle or by application to realize the toolbar and select the initial page.
void Realize();
};

// ---------------------------------------------------------------------------
// wxToolbookEvent

class %delete wxToolbookEvent : public wxBookCtrlBaseEvent
{
%wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED // EVT_TOOLBOOK_PAGE_CHANGED(winid, fn );
%wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING // EVT_TOOLBOOK_PAGE_CHANGING(winid, fn );

wxToolbookEvent(const wxToolbookEvent& event );
wxToolbookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, int nSel = wxNOT_FOUND, int nOldSel = wxNOT_FOUND );
};

#endif // %wxchkver_2_8 && wxUSE_TOOLBOOK && wxLUA_USE_wxToolbook

// ---------------------------------------------------------------------------
// wxTabCtrl

#if %wxchkver_2_4 && %msw && wxLUA_USE_wxTabCtrl && wxUSE_TAB_DIALOG // note: wxUSE_TAB_DIALOG is correct

#include "wx/tabctrl.h"

class wxTabCtrl : public wxControl
{
#define wxTC_RIGHTJUSTIFY
#define wxTC_FIXEDWIDTH
#define wxTC_TOP
#define wxTC_LEFT
#define wxTC_RIGHT
#define wxTC_BOTTOM
#define wxTC_MULTILINE
#define wxTC_OWNERDRAW

wxTabCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxTabCtrl" );
//bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxTabCtrl" );

bool DeleteAllItems( );
bool DeleteItem(int item );
int GetCurFocus() const;
wxImageList* GetImageList() const;
int GetItemCount() const;
wxObject * GetItemData(int item) const;
int GetItemImage(int item) const;
bool GetItemRect(int item, wxRect& rect) const;
wxString GetItemText(int item) const;
int GetRowCount() const;
int GetSelection() const;
int HitTest(const wxPoint& pt, long& flags );
void InsertItem(int item, const wxString& text, int imageId = -1, wxObject *clientData = NULL );
bool SetItemData(int item, wxObject * data );
bool SetItemImage(int item, int image );
void SetImageList(wxImageList* imageList );
void SetItemSize(const wxSize& size );
bool SetItemText(int item, const wxString& text );
void SetPadding(const wxSize& padding );
int SetSelection(int item );
};

// ---------------------------------------------------------------------------
// wxTabEvent

class %delete wxTabEvent : public wxCommandEvent
{
%win %wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED // EVT_TAB_SEL_CHANGED(id, fn );
%win %wxEventType wxEVT_COMMAND_TAB_SEL_CHANGING // EVT_TAB_SEL_CHANGING(id, fn );

wxTabEvent(wxEventType commandType = 0, int id = 0 );
};

#endif //%wxchkver_2_4 && %msw && wxLUA_USE_wxTabCtrl && wxUSE_TAB_DIALOG


// ---------------------------------------------------------------------------
// wxScrolledWindow

#if wxLUA_USE_wxScrolledWindow

class wxScrolledWindow : public wxPanel
{
wxScrolledWindow( );
wxScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, const wxString& name = "wxScrolledWindow" );
bool Create(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, const wxString& name = "wxScrolledWindow" );

// %override [int xx, int yy] void wxScrolledWindow::CalcScrolledPosition(int x, int y) const;
// C++ Func: void CalcScrolledPosition( int x, int y, int *xx, int *yy) const;
void CalcScrolledPosition( int x, int y) const;

// %override [int xx, int yy] void wxScrolledWindow::CalcUnscrolledPosition(int x, int y) const;
// C++ Func: void CalcUnscrolledPosition( int x, int y, int *xx, int *yy) const;
void CalcUnscrolledPosition( int x, int y) const;

void EnableScrolling(const bool xScrolling, const bool yScrolling );

// %override [int xUnit, int yUnit] wxScrolledWindow::GetScrollPixelsPerUnit() const;
// C++ Func: void GetScrollPixelsPerUnit(int* xUnit, int* yUnit) const;
void GetScrollPixelsPerUnit() const;

// %override [int x, int y] wxScrolledWindow::GetViewStart() const;
// C++ Func: void GetViewStart(int* x, int* y) const;
void GetViewStart() const;

//// %override [int x, int y] wxScrolledWindow::GetVirtualSize() const;
//// C++ Func: void GetVirtualSize(int* x, int* y) const;
//void GetVirtualSize() const; // see wxWindow::GetVirtualSize

//bool IsRetained() const; // see wxWindow::IsRetained
void PrepareDC(wxDC& dc );
void Scroll(int x, int y );
void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX, int noUnitsY, int xPos = 0, int yPos = 0, bool noRefresh = false );
void SetScrollRate(int xstep, int ystep );
void SetTargetWindow(wxWindow* window );
// void SetVirtualSize(int width, int height) -- see wxWindow

//void DoPrepareDC(wxDC& dc );
};

#endif //wxLUA_USE_wxScrolledWindow

// ---------------------------------------------------------------------------
// wxSplitterWindow

#if wxLUA_USE_wxSplitterWindow

#include "wx/splitter.h"

#define wxSP_NOBORDER
#define wxSP_NOSASH
#define wxSP_BORDER
#define wxSP_PERMIT_UNSPLIT
#define wxSP_LIVE_UPDATE
#define wxSP_3DSASH
#define wxSP_3DBORDER
// #define wxSP_FULLSASH %wxcompat_2_6 obsolete
#define wxSP_3D
%wxchkver_2_4 #define wxSP_NO_XP_THEME
// #define wxSP_SASH_AQUA %wxcompat_2_6 obsolete

class wxSplitterWindow : public wxWindow
{
wxSplitterWindow( );
wxSplitterWindow(wxWindow* parent, wxWindowID id, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=wxSP_3D, const wxString& name = "wxSplitterWindow" );
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D|wxCLIP_CHILDREN, const wxString& name = "wxSplitterWindow" );

int GetMinimumPaneSize() const;
double GetSashGravity( );
int GetSashPosition( );
int GetSplitMode() const;
wxWindow *GetWindow1() const;
wxWindow *GetWindow2() const;
void Initialize(wxWindow* window );
bool IsSplit() const;
bool ReplaceWindow(wxWindow * winOld, wxWindow * winNew );
void SetSashGravity(double gravity );
void SetSashPosition(int position, const bool redraw = true );
void SetSashSize(int size );
void SetMinimumPaneSize(int paneSize );
void SetSplitMode(int mode );
bool SplitHorizontally(wxWindow* window1, wxWindow* window2, int sashPosition = 0 );
bool SplitVertically(wxWindow* window1, wxWindow* window2, int sashPosition = 0 );
bool Unsplit(wxWindow* toRemove = NULL );
void UpdateSize( );
};

// ---------------------------------------------------------------------------
// wxSplitterEvent

class %delete wxSplitterEvent : public wxNotifyEvent
{
%wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING // EVT_SPLITTER_SASH_POS_CHANGING(id, fn );
%wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED // EVT_SPLITTER_SASH_POS_CHANGED(id, fn );
%wxEventType wxEVT_COMMAND_SPLITTER_DOUBLECLICKED // EVT_SPLITTER_DCLICK(id, fn );
%wxEventType wxEVT_COMMAND_SPLITTER_UNSPLIT // EVT_SPLITTER_UNSPLIT(id, fn );

wxSplitterEvent(wxEventType type = wxEVT_NULL, wxSplitterWindow *splitter = NULL );

// NOTE! These functions will assert if you call them for an unspupported
// event type. Please refer to the wxWidgets C++ manual.
int GetSashPosition( );
int GetX( );
int GetY( );
wxWindow* GetWindowBeingRemoved( );
void SetSashPosition(int pos );
};

#endif //wxLUA_USE_wxSplitterWindow


// ---------------------------------------------------------------------------
// wxPopupWindow

#if wxLUA_USE_wxPopupWindow

#include "wx/popupwin.h"

class wxPopupWindow : public wxWindow
{
wxPopupWindow(wxWindow* parent, int flags = wxBORDER_NONE );
bool Create(wxWindow* parent, int flags = wxBORDER_NONE );
virtual void Position(const wxPoint &ptOrigin, const wxSize &sizePopup );
};

#endif // wxLUA_USE_wxPopupWindow

// ---------------------------------------------------------------------------
// wxPopupTransientWindow

#if wxLUA_USE_wxPopupTransientWindow

#include "wx/popupwin.h"

class wxPopupTransientWindow : public wxPopupWindow
{
wxPopupTransientWindow( );
wxPopupTransientWindow(wxWindow *parent, int flags = wxBORDER_NONE );
virtual void Popup(wxWindow *focus = NULL );
virtual void Dismiss( );
virtual void ProcessLeftDown(wxMouseEvent &event );
};

#endif // wxLUA_USE_wxPopupTransientWindow

// ---------------------------------------------------------------------------
// wxCollapsiblePane

#if %wxchkver_2_8 && wxLUA_USE_wxCollapsiblePane && wxUSE_COLLPANE

#include "wx/collpane.h"

#define wxCP_DEFAULT_STYLE

class wxCollapsiblePane : public wxControl
{
wxCollapsiblePane( );
wxCollapsiblePane(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxCollapsiblePane" );
bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxCollapsiblePane" );

bool IsCollapsed() const;
bool IsExpanded() const;
void Collapse(bool collapse = true );
void Expand( );
wxWindow* GetPane() const;
};

// ---------------------------------------------------------------------------
// wxCollapsiblePaneEvent

class %delete wxCollapsiblePaneEvent : public wxCommandEvent
{
%wxEventType wxEVT_COMMAND_COLLPANE_CHANGED // EVT_COLLAPSIBLEPANE_CHANGED(id, fn );

wxCollapsiblePaneEvent( );
wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed );

bool GetCollapsed() const;
void SetCollapsed(bool c );
};

#endif // %wxchkver_2_8 && wxLUA_USE_wxCollapsiblePane && wxUSE_COLLPANE

// ---------------------------------------------------------------------------
// wxStaticBox

#if wxLUA_USE_wxStaticBox && wxUSE_STATBOX

#include "wx/statbox.h"

class wxStaticBox : public wxControl
{
wxStaticBox( );
wxStaticBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticBox" );
bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticBox" );
};

#endif //wxLUA_USE_wxStaticBox && wxUSE_STATBOX

// ---------------------------------------------------------------------------
// wxStaticBitmap

#if wxLUA_USE_wxStaticBitmap && wxUSE_STATBMP

#include "wx/statbmp.h"

class wxStaticBitmap : public wxControl
{
wxStaticBitmap( );
wxStaticBitmap(wxWindow* parent, wxWindowID id, const wxBitmap& label = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticBitmap" );
bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& label = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticBitmap" );

wxBitmap GetBitmap() const;
virtual void SetBitmap(const wxBitmap& label );
};

#endif //wxLUA_USE_wxStaticBitmap && wxUSE_STATBMP

// ---------------------------------------------------------------------------
// wxStaticText

#if wxLUA_USE_wxStaticText && wxUSE_STATTEXT

#include "wx/stattext.h"

#define wxST_NO_AUTORESIZE
%wxchkver_2_8 && !%wxchkver_2_9_2 #define wxST_DOTS_MIDDLE
%wxchkver_2_8 && !%wxchkver_2_9_2 #define wxST_DOTS_END

class wxStaticText : public wxControl
{
wxStaticText( );
wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticText" );
bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticText" );

// wxString GetLabel() const; // - see wxWindow
// void SetLabel(const wxString& label) - see wxWindow
void Wrap(int width );
};

#endif //wxLUA_USE_wxStaticText && wxUSE_STATTEXT

// ---------------------------------------------------------------------------
// wxStaticLine

#if wxLUA_USE_wxStaticLine && wxUSE_STATLINE

#include "wx/statline.h"

#define wxLI_HORIZONTAL
#define wxLI_VERTICAL

class wxStaticLine : public wxControl
{
wxStaticLine( );
wxStaticLine(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL, const wxString& name = "wxStaticLine" );
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticLine" );

bool IsVertical() const;
static int GetDefaultSize( );
};

#endif //wxLUA_USE_wxStaticLine && wxUSE_STATLINE


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


// ===========================================================================
// Purpose: Various wxAdv library 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
// ===========================================================================

// ---------------------------------------------------------------------------
// wxAboutDialog

#if %wxchkver_2_8 && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog

#include "wx/aboutdlg.h"

class %delete wxAboutDialogInfo
{
wxAboutDialogInfo( );

void SetName(const wxString& name );
wxString GetName() const;

void SetVersion(const wxString& version );
bool HasVersion() const;
wxString GetVersion() const;

void SetDescription(const wxString& desc );
bool HasDescription() const;
wxString GetDescription() const;

void SetCopyright(const wxString& copyright );
bool HasCopyright() const;
wxString GetCopyright() const;

void SetLicence(const wxString& licence );
void SetLicense(const wxString& licence );
bool HasLicence() const;
wxString GetLicence() const;

void SetIcon(const wxIcon& icon );
bool HasIcon() const;
wxIcon GetIcon() const;

void SetWebSite(const wxString& url, const wxString& desc = "" );
bool HasWebSite() const;

wxString GetWebSiteURL() const;
wxString GetWebSiteDescription() const;

void SetDevelopers(const wxArrayString& developers );
void AddDeveloper(const wxString& developer );
bool HasDevelopers() const;
const wxArrayString& GetDevelopers() const;

void SetDocWriters(const wxArrayString& docwriters );
void AddDocWriter(const wxString& docwriter );
bool HasDocWriters() const;
wxArrayString GetDocWriters() const;

void SetArtists(const wxArrayString& artists );
void AddArtist(const wxString& artist );
bool HasArtists() const;
wxArrayString GetArtists() const;

void SetTranslators(const wxArrayString& translators );
void AddTranslator(const wxString& translator );
bool HasTranslators() const;
wxArrayString GetTranslators() const;

// implementation only
// -------------------
bool IsSimple() const;
wxString GetDescriptionAndCredits() const;
};

void wxAboutBox(const wxAboutDialogInfo& info );

#endif //%wxchkver_2_8 && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog


// ---------------------------------------------------------------------------
// wxAnimation

#if %wxchkver_2_8 && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL

#include "wx/animate.h"

enum wxAnimationType
{
wxANIMATION_TYPE_INVALID,
wxANIMATION_TYPE_GIF,
wxANIMATION_TYPE_ANI,

wxANIMATION_TYPE_ANY
};

class %delete wxAnimation : public wxGDIObject // ignore platform independent wxAnimationBase
{
wxAnimation( );
wxAnimation(const wxAnimation& anim );
//wxAnimation(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY); // doesn't exist in 2.8.4

virtual bool IsOk() const;
virtual int GetDelay(unsigned int frame) const; // can be -1
virtual unsigned int GetFrameCount() const;
virtual wxImage GetFrame(unsigned int frame) const;
virtual wxSize GetSize() const;

virtual bool LoadFile(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY );
virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY );
};

// ---------------------------------------------------------------------------
// wxAnimationCtrl

#define wxAC_NO_AUTORESIZE
#define wxAC_DEFAULT_STYLE // = wxNO_BORDER

class wxAnimationCtrl : public wxControl
{
wxAnimationCtrl( );
wxAnimationCtrl(wxWindow *parent, wxWindowID id, const wxAnimation& anim, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, const wxString& name = "wxAnimationCtrl" );
bool Create(wxWindow *parent, wxWindowID id, const wxAnimation& anim, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, const wxString& name = "wxAnimationCtrl" );

virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY );

wxAnimation GetAnimation() const;
// always return the original bitmap set in this control
wxBitmap GetInactiveBitmap() const;
virtual bool IsPlaying() const;
bool LoadFile(const wxString& file, wxAnimationType animType = wxANIMATION_TYPE_ANY );
virtual bool Play( );
virtual void SetAnimation(const wxAnimation &anim );
virtual void SetInactiveBitmap(const wxBitmap &bmp );
virtual void Stop( );
};

#endif // %wxchkver_2_8 && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL


// ---------------------------------------------------------------------------
// wxBitmapComboBox

#if wxLUA_USE_wxBitmapComboBox && wxUSE_BITMAPCOMBOBOX

#include "wx/bmpcbox.h"

class wxBitmapComboBox : public wxControl
{
wxBitmapComboBox( );
//wxBitmapComboBox(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "comboBox" );
wxBitmapComboBox(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 = "wxBitmapComboBox" );
//bool Create(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n, const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxBitmapComboBox" );
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 = "wxBitmapComboBox" );

int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap );
int Append(const wxString& item, const wxBitmap& bitmap, voidptr_long data ); // C++ is (void *clientData) You can put a number here
int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData );

wxSize GetBitmapSize() const;
wxBitmap GetItemBitmap(unsigned int n) const;

int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos );
#if !%wxchkver_2_9_0 || %wxchkver_2_9_5 // This function body was missing so you'd get linker errors
int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, voidptr_long data ); // C++ is (void *clientData) You can put a number here
#endif
int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, wxClientData *clientData );

void SetItemBitmap(unsigned int n, const wxBitmap& bitmap );

void Clear( );
void Delete(unsigned int n );
unsigned int GetCount() const;
wxString GetString(unsigned int n) const;
void SetString(unsigned int n, const wxString& s );
int FindString(const wxString& s, bool bCase = false) const;
void Select(int n );
int GetSelection() const;
//void GetSelection(long* from, long* to) const;
void SetSelection(int n );
//void SetSelection(long from, long to );
//int GetWidestItemWidth( );
//int GetWidestItem( );

void SetValue(const wxString& value );
void SetString(unsigned int n, const wxString& s );
bool SetStringSelection(const wxString& s );
};

#endif //wxLUA_USE_wxBitmapComboBox && wxUSE_BITMAPCOMBOBOX


// ---------------------------------------------------------------------------
// wxCalendarCtrl

#if wxLUA_USE_wxCalendarCtrl && wxUSE_CALENDARCTRL

#include "wx/calctrl.h"

enum
{
wxCAL_SUNDAY_FIRST,
wxCAL_MONDAY_FIRST,
wxCAL_SHOW_HOLIDAYS,
wxCAL_NO_YEAR_CHANGE,
wxCAL_NO_MONTH_CHANGE,
wxCAL_SHOW_SURROUNDING_WEEKS,
wxCAL_SEQUENTIAL_MONTH_SELECTION
};

enum wxCalendarHitTestResult
{
wxCAL_HITTEST_NOWHERE,
wxCAL_HITTEST_HEADER,
wxCAL_HITTEST_DAY,
wxCAL_HITTEST_INCMONTH,
wxCAL_HITTEST_DECMONTH,
wxCAL_HITTEST_SURROUNDING_WEEK
};

enum wxCalendarDateBorder
{
wxCAL_BORDER_NONE,
wxCAL_BORDER_SQUARE,
wxCAL_BORDER_ROUND
};

class wxCalendarCtrl : public wxControl
{
wxCalendarCtrl(wxWindow* parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const wxString& name = "wxCalendarCtrl" );
//bool Create(wxWindow* parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const wxString& name = "wxCalendarCtrl" );

void SetDate(const wxDateTime& date );
wxDateTime GetDate() const;

#if !%wxchkver_2_9_2
void EnableYearChange(bool enable = true );
#endif

void EnableMonthChange(bool enable = true );
void EnableHolidayDisplay(bool display = true );
void SetHeaderColours(const wxColour& colFg, const wxColour& colBg );
wxColour GetHeaderColourFg() const;
wxColour GetHeaderColourBg() const;
void SetHighlightColours(const wxColour& colFg, const wxColour& colBg );
wxColour GetHighlightColourFg() const;
wxColour GetHighlightColourBg() const;
void SetHolidayColours(const wxColour& colFg, const wxColour& colBg );
wxColour GetHolidayColourFg() const;
wxColour GetHolidayColourBg() const;
wxCalendarDateAttr* GetAttr(size_t day) const;
void SetAttr(size_t day, %ungc wxCalendarDateAttr* attr); // will delete previously set attr as well
void SetHoliday(size_t day );
void ResetAttr(size_t day );

// %override [wxCalendarHitTestResult, wxDateTime date, wxDateTime::WeekDay wd] wxCalendarCtrl::HitTest(const wxPoint& pos );
// C++ Func: wxCalendarHitTestResult HitTest(const wxPoint& pos, wxDateTime* date = NULL, wxDateTime::WeekDay* wd = NULL );
wxCalendarHitTestResult HitTest(const wxPoint& pos );
};

// ---------------------------------------------------------------------------
// wxCalendarDateAttr

class %delete wxCalendarDateAttr
{
wxCalendarDateAttr( );
wxCalendarDateAttr(const wxColour& colText, const wxColour& colBack = wxNullColour, const wxColour& colBorder = wxNullColour, const wxFont& font = wxNullFont, wxCalendarDateBorder border = wxCAL_BORDER_NONE );
wxCalendarDateAttr(wxCalendarDateBorder border, const wxColour& colBorder = wxNullColour );

void SetTextColour(const wxColour& colText );
void SetBackgroundColour(const wxColour& colBack );
void SetBorderColour(const wxColour& col );
void SetFont(const wxFont& font );
void SetBorder(wxCalendarDateBorder border );
void SetHoliday(bool holiday );
bool HasTextColour() const;
bool HasBackgroundColour() const;
bool HasBorderColour() const;
bool HasFont() const;
bool HasBorder() const;
bool IsHoliday() const;
wxColour GetTextColour() const;
wxColour GetBackgroundColour( );
wxColour GetBorderColour() const;
wxFont GetFont() const;
wxCalendarDateBorder GetBorder( );
};

// ---------------------------------------------------------------------------
// wxDateEvent

#include "wx/dateevt.h"

class %delete wxDateEvent : public wxCommandEvent
{
%wxEventType wxEVT_DATE_CHANGED // EVT_DATE_CHANGED(id, fn );

wxDateEvent(wxWindow *win, const wxDateTime& dt, wxEventType type );

wxDateTime GetDate() const;
void SetDate(const wxDateTime &date );
};

// ---------------------------------------------------------------------------
// wxCalendarEvent

#include "wx/event.h"

class %delete wxCalendarEvent : public wxDateEvent
{
%wxEventType wxEVT_CALENDAR_SEL_CHANGED // EVT_CALENDAR_SEL_CHANGED(id, fn );
%wxEventType wxEVT_CALENDAR_DAY_CHANGED // EVT_CALENDAR_DAY(id, fn );
%wxEventType wxEVT_CALENDAR_MONTH_CHANGED // EVT_CALENDAR_MONTH(id, fn );
%wxEventType wxEVT_CALENDAR_YEAR_CHANGED // EVT_CALENDAR_YEAR(id, fn );
%wxEventType wxEVT_CALENDAR_DOUBLECLICKED // EVT_CALENDAR(id, fn );
%wxEventType wxEVT_CALENDAR_WEEKDAY_CLICKED // EVT_CALENDAR_WEEKDAY_CLICKED(id, fn );

%wxchkver_2_9_2 wxCalendarEvent(const wxCalendarEvent& event );
!%wxchkver_2_9_2 wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type );
%wxchkver_2_9_2 wxCalendarEvent(wxWindow *win, const wxDateTime& dt, wxEventType type );

wxDateTime::WeekDay GetWeekDay() const;
void SetWeekDay(const wxDateTime::WeekDay wd );
};

#endif //wxLUA_USE_wxCalendarCtrl && wxUSE_CALENDARCTRL


// ---------------------------------------------------------------------------
// wxHyperlinkCtrl

#if %wxchkver_2_8 && wxUSE_HYPERLINKCTRL && wxLUA_USE_wxHyperlinkCtrl

#include "wx/hyperlink.h"

#define wxHL_CONTEXTMENU
#define wxHL_ALIGN_LEFT
#define wxHL_ALIGN_RIGHT
#define wxHL_ALIGN_CENTRE
#define wxHL_DEFAULT_STYLE // (wxHL_CONTEXTMENU|wxNO_BORDER|wxHL_ALIGN_CENTRE );

class wxHyperlinkCtrl : public wxControl
{
wxHyperlinkCtrl( );
wxHyperlinkCtrl(wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, const wxString& name = "wxHyperlinkCtrl" );
bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, const wxString& name = "wxHyperlinkCtrl");

wxColour GetHoverColour() const;
wxColour GetNormalColour() const;
wxColour GetVisitedColour() const;
bool GetVisited() const;
wxString GetURL() const;

void SetHoverColour(const wxColour &colour );
void SetNormalColour(const wxColour &colour);
void SetVisitedColour(const wxColour &colour);
void SetVisited(bool visited = true );
void SetURL (const wxString &url );
};

// ---------------------------------------------------------------------------
// wxHyperlinkEvent

class %delete wxHyperlinkEvent : public wxCommandEvent
{
%wxEventType wxEVT_COMMAND_HYPERLINK // EVT_HYPERLINK(id, fn );

//wxHyperlinkEvent( );
wxHyperlinkEvent(wxObject *generator, wxWindowID id, const wxString& url );

wxString GetURL() const;
void SetURL(const wxString &url );
};

#endif // %wxchkver_2_8 && wxUSE_HYPERLINKCTRL && wxLUA_USE_wxHyperlinkCtrl


// ---------------------------------------------------------------------------
// wxSashWindow

#if wxLUA_USE_wxSashWindow && wxUSE_SASH

#include "wx/sashwin.h"

#define wxSW_3D
#define wxSW_3DSASH
#define wxSW_3DBORDER
#define wxSW_BORDER

enum wxSashEdgePosition
{
wxSASH_TOP,
wxSASH_RIGHT,
wxSASH_BOTTOM,
wxSASH_LEFT,
wxSASH_NONE
};

enum wxSashDragStatus
{
wxSASH_STATUS_OK,
wxSASH_STATUS_OUT_OF_RANGE
};

class wxSashWindow : public wxWindow
{
wxSashWindow( );
wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "wxSashWindow" );

bool GetSashVisible(wxSashEdgePosition edge) const;
int GetMaximumSizeX() const;
int GetMaximumSizeY() const;
int GetMinimumSizeX() const;
int GetMinimumSizeY() const;

void SetMaximumSizeX(int min );
void SetMaximumSizeY(int min );
void SetMinimumSizeX(int min );
void SetMinimumSizeY(int min );
void SetSashVisible(wxSashEdgePosition edge, bool visible );

%wxcompat_2_6 bool HasBorder(wxSashEdgePosition edge) const;
%wxcompat_2_6 void SetSashBorder(wxSashEdgePosition edge, bool hasBorder );
};

// ---------------------------------------------------------------------------
// wxSashLayoutWindow

#include "wx/laywin.h"

enum wxLayoutAlignment
{
wxLAYOUT_NONE,
wxLAYOUT_TOP,
wxLAYOUT_LEFT,
wxLAYOUT_RIGHT,
wxLAYOUT_BOTTOM
};

enum wxLayoutOrientation
{
wxLAYOUT_HORIZONTAL,
wxLAYOUT_VERTICAL
};

class wxSashLayoutWindow : public wxSashWindow
{
wxSashLayoutWindow( );
wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "wxSashLayoutWindow" );
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "wxSashLayoutWindow" );

wxLayoutAlignment GetAlignment() const;
wxLayoutOrientation GetOrientation() const;
//void OnCalculateLayout(wxCalculateLayoutEvent& event );
//void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event );
void SetAlignment(wxLayoutAlignment alignment );
void SetDefaultSize(const wxSize& size );
void SetOrientation(wxLayoutOrientation orientation );
};

// ---------------------------------------------------------------------------
// wxLayoutAlgorithm - for wxSashLayoutWindow

#include "wx/laywin.h"

class %delete wxLayoutAlgorithm : public wxObject
{
wxLayoutAlgorithm( );

bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL) const;
bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL );
bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = NULL );
};

// ---------------------------------------------------------------------------
// wxQueryLayoutInfoEvent - for wxSashLayoutWindow

#include "wx/laywin.h"

class %delete wxQueryLayoutInfoEvent : public wxEvent
{
%wxEventType wxEVT_QUERY_LAYOUT_INFO // EVT_QUERY_LAYOUT_INFO(func );

wxQueryLayoutInfoEvent(wxWindowID id = 0 );

wxLayoutAlignment GetAlignment() const;
int GetFlags() const;
wxLayoutOrientation GetOrientation() const;
int GetRequestedLength() const;
wxSize GetSize() const;
void SetAlignment(wxLayoutAlignment alignment );
void SetFlags(int flags );
void SetOrientation(wxLayoutOrientation orientation );
void SetRequestedLength(int length );
void SetSize(const wxSize& size );
};

// ---------------------------------------------------------------------------
// wxCalculateLayoutEvent - for wxSashLayoutWindow

#include "wx/laywin.h"

class %delete wxCalculateLayoutEvent : public wxEvent
{
%wxEventType wxEVT_CALCULATE_LAYOUT // EVT_CALCULATE_LAYOUT(func );

wxCalculateLayoutEvent(wxWindowID id = 0 );

int GetFlags() const;
wxRect GetRect() const;
void SetFlags(int flags );
void SetRect(const wxRect& rect );
};

// ---------------------------------------------------------------------------
// wxSashEvent

class %delete wxSashEvent : public wxCommandEvent
{
%wxEventType wxEVT_SASH_DRAGGED // EVT_SASH_DRAGGED(id, fn) EVT_SASH_DRAGGED_RANGE(id1, id2, fn );

wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE );

void SetEdge(wxSashEdgePosition edge );
int GetEdge( );
void SetDragRect(const wxRect& rect );
wxRect GetDragRect( );
void SetDragStatus(wxSashDragStatus status );
int GetDragStatu