-------------------------------------------------------------------------------
-- rules to build wxWidgets binding for wxLua (for genwxbind.lua)
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
-- Set the root directory of the wxLua distribution, used only in this file
wxluacan_dir =  "${wxluacan_SOURCE_DIR}/"

--cdluapath=wxluacan_dir.."/parts/cdlua/" -- FIXME see genwxbind for this

-------------------------------------------------------------------------------
-- Set the bindings directory that contains the *.i interface files
interface_dir     = "."
-- Set the directory to output the bindings to, both C++ header and source files
output_dir        = "."
output_header_dir = "."

-------------------------------------------------------------------------------
-- 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   = "wxluacan"

-- Set any #includes or other C++ code to be placed verbatim at the top of
--   every generated file or "" for none
hook_header_includes = ""
-- 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   = "wxluacan.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 =
{
    "wxluacan.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 = { "../../../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 conditions here

-- example: conditions["DOXYGEN_INCLUDE"] = "defined(DOXYGEN_INCLUDE)"

-------------------------------------------------------------------------------
-- Add additional data types here

-- example: dataTypes["wxArrayInt"] = AllocDataType("wxArrayInt", "class",false)
--dataTypes["wxPoint"] = AllocDataType("wxPoint", "class",false)
--dataTypes["wxSize"] = AllocDataType("wxSize", "class",false)
--dataTypes["wxWindow"] = AllocDataType("wxWindow", "class",false)
--dataTypes["wxScrolledWindow"] = AllocDataType("wxScrolledWindow", "class",false)
--dataTypes["wxDC"] = AllocDataType("wxDC", "class",false)











