From: John L. <jr...@us...> - 2006-02-02 15:49:43
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31289/wxLua/bindings/wxstc Added Files: Makefile stc.i wxluasetup.h.in wxstc_rules.lua Log Message: separated wxSTC contrib from the wxWidgets binding, create new module for it --- NEW FILE: wxstc_rules.lua --- ------------------------------------------------------------------------------- -- rules to build wxWidgets binding for wxLua (for genwxbind.lua) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Set the root directory of the wxLua distribution, used only in this file wxlua_dir = "../" --cdluapath=wxlua_dir.."/parts/cdlua/" -- FIXME see genwxbind for this ------------------------------------------------------------------------------- -- Set the bindings directory that contains the *.i interface files interface_dir = wxlua_dir.."/bindings/wxstc" -- Set the directory to output the bindings to, both C++ header and source files output_dir = wxlua_dir.."/modules/wxbindstc/src" output_header_dir = wxlua_dir.."/modules/wxbindstc/include" ------------------------------------------------------------------------------- -- Set the lua namespace that the bindings will be placed, eg. wx.wxWindow(...) hook_lua_namespace = "wx" -- Set the C++ "namespace" that the bindings will be placed, eg. function names -- contain this to prevent duplicate function names hook_cpp_namespace = "wxstc" -- Set any #includes or other C++ code to be placed verbatim at the top of -- every generated file or "" for none hook_header_includes = "#include \"wx/wxprec.h\"\n" -- Set the name of the subclassed wxLuaBinding class hook_binding_class = hook_cpp_namespace.."_Binding" ------------------------------------------------------------------------------- -- Set the name of the header file that will have the #includes from the -- bindings in it. This will be used as #include "hook_header_file" in the C++ -- wrapper files, so it must include the proper #include path. hook_header_file = "wxstc/include/wxbind.h" ------------------------------------------------------------------------------- -- Set the files to output the structs of wrapped defined values, objects, -- events, builtin (static functionc), and classes hook_define_file = hook_cpp_namespace.."_define" hook_define_fn = "wxLuaGetDefineList_"..hook_cpp_namespace hook_object_file = hook_cpp_namespace.."_object" hook_object_fn = "wxLuaGetObjectList_"..hook_cpp_namespace hook_event_file = hook_cpp_namespace.."_event" hook_event_fn = "wxLuaGetEventList_"..hook_cpp_namespace hook_builtin_file = hook_cpp_namespace.."_builtin" hook_builtin_fn = "wxLuaGetBuiltinList_"..hook_cpp_namespace hook_class_file = hook_cpp_namespace.."_class" hook_class_fn = "wxLuaGetClassList_"..hook_cpp_namespace ------------------------------------------------------------------------------- -- generate comments into code comment = true ------------------------------------------------------------------------------- -- Set the file that contains bindings that need to be overridden --override_file = "override.hpp" ------------------------------------------------------------------------------- -- list of interface files to use to make the bindings in the "interfacedir" interfaceFileList = { "stc.i" } ------------------------------------------------------------------------------- -- a table containing filenames of DataTypes.Cache.lua from other wrappers to -- to define classes and data types used in this wrapper -- NOTE: for the base wxWidgets wrappers we don't load the cache since they -- don't depend on other wrappers and can cause problems when interface -- files are updated. Make sure you delete or have updated any cache file -- that changes any data types. dataTypeCacheFilenames = { wxlua_dir.."/bindings/wxwidgets/DataTypes.Cache.lua" } ------------------------------------------------------------------------------- -- virtual wxLuaBinding::OnRegister body - can load extra lua bindings here --[[ onregister = { " wxLuaState wxLS(wxlState);\n", " wxCHECK_RET(wxLS.Ok(), wxT(\"Invalid wxLuaState\"));\n", "\n", " // register wxNull\n", " if (registerTypes)\n", " {\n", " wxLS.GetLuaStateRefData()->m_wxLuaNull = wxLS.tnewtag();\n", " }\n", "\n", " tpushwxLuaNull(wxLS.GetLuaState());\n", " wxLS.tpushusertag(NULL, wxLS.GetLuaStateRefData()->m_wxLuaNull);\n", " lua_rawset(wxLS.GetLuaState(), luaTable);\n", } ]] ------------------------------------------------------------------------------- -- Add additional include information for binding header file -- This code will be place directly after any #includes at the top of the file headerCPPCode = "#include \"wx/defs.h\"\n".. "#include \"wxbind/include/wxbind.h\"\n".. "#ifndef wxUSE_WAVE\n#define wxUSE_WAVE 0\n#endif\n".. "#ifndef wxUSE_SOUND\n#define wxUSE_SOUND 0\n#endif\n" ------------------------------------------------------------------------------- -- Add additional conditions here -- example: conditions["DOXYGEN_INCLUDE"] = "defined(DOXYGEN_INCLUDE)" ------------------------------------------------------------------------------- -- Add additional data types here -- example: dataTypes["wxArrayInt"] = AllocDataType("wxArrayInt", "class",false) --- NEW FILE: wxluasetup.h.in --- // Automatically generated by utils/get_luasetup edit as necessary. #ifndef __WXLUA_SETUP__ #define __WXLUA_SETUP__ #define wxLUA_USE_FL 0 #define wxLUA_USE_Geometry 1 #define wxLUA_USE_MDI 1 #define wxLUA_USE_wxAcceleratorTable 1 #define wxLUA_USE_wxApp 1 #define wxLUA_USE_wxArrayInt 1 #define wxLUA_USE_wxArrayString 1 #define wxLUA_USE_wxBitmap 1 #define wxLUA_USE_wxBitmapButton 1 #define wxLUA_USE_wxBrushList 1 #define wxLUA_USE_wxButton 1 #define wxLUA_USE_wxCalendarCtrl 1 #define wxLUA_USE_wxCaret 1 #define wxLUA_USE_wxCheckBox 1 #define wxLUA_USE_wxCheckListBox 1 #define wxLUA_USE_wxChoice 1 #define wxLUA_USE_wxClassInfo 1 #define wxLUA_USE_wxClipboard 1 #define wxLUA_USE_wxColourDialog 1 #define wxLUA_USE_wxColourPenBrush 1 #define wxLUA_USE_wxComboBox 1 #define wxLUA_USE_wxCommandProcessor 1 #define wxLUA_USE_wxConfig 1 #define wxLUA_USE_wxCursor 1 #define wxLUA_USE_wxDataObject 1 #define wxLUA_USE_wxDateSpan 1 #define wxLUA_USE_wxDateTime 1 #define wxLUA_USE_wxDC 1 #define wxLUA_USE_wxDialog 1 #define wxLUA_USE_wxDir 1 #define wxLUA_USE_wxDirDialog 1 #define wxLUA_USE_wxDragDrop 1 #define wxLUA_USE_wxFile 1 #define wxLUA_USE_wxFileDialog 1 #define wxLUA_USE_wxFileHistory 1 #define wxLUA_USE_wxFileName 1 #define wxLUA_USE_wxFindReplaceDialog 1 #define wxLUA_USE_wxFont 1 #define wxLUA_USE_wxFontDialog 1 #define wxLUA_USE_wxFontEnumerator 1 #define wxLUA_USE_wxFontList 1 #define wxLUA_USE_wxFontMapper 1 #define wxLUA_USE_wxFrame 1 #define wxLUA_USE_wxGauge 1 #define wxLUA_USE_wxGenericValidator 1 #define wxLUA_USE_wxGrid 1 #define wxLUA_USE_wxHashTable 1 #define wxLUA_USE_wxHelpController 1 #define wxLUA_USE_wxHTML 1 #define wxLUA_USE_wxHtmlHelpController 1 #define wxLUA_USE_wxIcon 1 #define wxLUA_USE_wxID_XXX 1 #define wxLUA_USE_wxImage 1 #define wxLUA_USE_wxImageList 1 #define wxLUA_USE_wxLayoutConstraints 1 #define wxLUA_USE_wxList 1 #define wxLUA_USE_wxListBox 1 #define wxLUA_USE_wxListCtrl 1 #define wxLUA_USE_wxLuaDebugServer 1 #define wxLUA_USE_wxLuaHtmlWindow 1 #define wxLUA_USE_wxLuaPrintout 1 #define wxLUA_USE_wxMask 1 #define wxLUA_USE_wxMenu 1 #define wxLUA_USE_wxMessageDialog 1 #define wxLUA_USE_wxMetafile 1 #define wxLUA_USE_wxMiniFrame 1 #define wxLUA_USE_wxNotebook 1 #define wxLUA_USE_wxObject 1 #define wxLUA_USE_wxPalette 1 #define wxLUA_USE_wxPenList 1 #define wxLUA_USE_wxPointSizeRect 1 #define wxLUA_USE_wxPrint 1 #define wxLUA_USE_wxProgressDialog 1 #define wxLUA_USE_wxRadioBox 1 #define wxLUA_USE_wxRadioButton 1 #define wxLUA_USE_wxRegEx 1 #define wxLUA_USE_wxRegion 1 #define wxLUA_USE_wxSashWindow 1 #define wxLUA_USE_wxScrollBar 1 #define wxLUA_USE_wxScrolledWindow 1 #define wxLUA_USE_wxSingleChoiceDialog 1 #define wxLUA_USE_wxSizer 1 #define wxLUA_USE_wxSlider 1 #define wxLUA_USE_wxSocket 1 #define wxLUA_USE_wxSpinButton 1 #define wxLUA_USE_wxSpinCtrl 1 #define wxLUA_USE_wxSplitterWindow 1 #define wxLUA_USE_wxStaticBitmap 1 #define wxLUA_USE_wxStaticBox 1 #define wxLUA_USE_wxStaticLine 1 #define wxLUA_USE_wxStaticText 1 #define wxLUA_USE_wxStatusBar 1 #define wxLUA_USE_wxStringList 1 #define wxLUA_USE_wxStyledTextCtrl 0 #define wxLUA_USE_wxSystemSettings 1 #define wxLUA_USE_wxTabCtrl 1 #define wxLUA_USE_wxTaskBarIcon 1 #define wxLUA_USE_wxTextCtrl 1 #define wxLUA_USE_wxTextEntryDialog 1 #define wxLUA_USE_wxTextValidator 1 #define wxLUA_USE_wxTimer 1 #define wxLUA_USE_wxTimeSpan 1 #define wxLUA_USE_wxToolbar 1 #define wxLUA_USE_wxTooltip 1 #define wxLUA_USE_wxTreeCtrl 1 #define wxLUA_USE_wxValidator 1 #define wxLUA_USE_wxWave 1 #define wxLUA_USE_wxWindowList 1 #define wxLUA_USE_wxWizard 1 #define wxLUA_USE_wxXMLResource 1 #endif // __WXLUA_SETUP__ --- NEW FILE: Makefile --- # # File: makefile.unx # Author: J Winwood # Created: 2002 # Updated: # Copyright: (c) 2002. J Winwood # # # Makefile for generating the bindings WXLUA_DIR = ../.. include $(WXLUA_DIR)/bindings/wxwidgets/wrappers.lst THEWRAPPERS=$(addprefix $(WXLUA_DIR)/bindings/wxwidgets/, $(WRAPPERS)) DEPFILES=wxluasetup.h.in $(WXLUA_DIR)/bindings/genwxbind.lua $(WXLUA_DIR)/bindings/wxwidgets/override.hpp # $(THEWRAPPERS) all: genwxbind genwxbind: $(DEPFILES) @(cd $(WXLUA_DIR)/bindings && ../bin/lua -e"rulesFilename=\"wxstc/wxstc_rules.lua\"" genwxbind.lua > wxstc/error.txt) # do nothing to clean clean: --- NEW FILE: stc.i --- ///////////////////////////////////////////////////////////////////////////// // Purpose: wxStyledTextCtrl from contribs // Author: J Winwood // Created: 14/11/2001 // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// %if wxLUA_USE_wxStyledTextCtrl %include "wx/stc/stc.h" %define wxSTC_INVALID_POSITION %define wxSTC_START %define wxSTC_OPTIONAL_START %define wxSTC_LEXER_START %define wxSTC_CMD_REDO %define wxSTC_CMD_SELECTALL %define wxSTC_WS_INVISIBLE [...1042 lines suppressed...] %property=ListType, read, write int GetX() const %property=X, read, write int GetY() const %property=Y, read, write wxString GetDragText() %property=DragText, read, write bool GetDragAllowMove() %property=DragAllowMove, read, write wxDragResult GetDragResult() %property=DragResult, read, write bool GetShift() const %property=Shift, read bool GetControl() const %property=Control, read bool GetAlt() const %property=Alt, read %endclass %endif wxLUA_USE_wxStyledTextCtrl |