From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/bindings/wxwidgets Modified Files: wx_rules.lua Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wx_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_rules.lua,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wx_rules.lua 8 Aug 2006 22:54:37 -0000 1.22 --- wx_rules.lua 28 Aug 2006 05:26:20 -0000 1.23 *************** *** 73,81 **** -- This code will be place directly after any #includes at the top of the file hook_cpp_binding_header_includes = ! "#include \"wx/defs.h\"\n".. ! "#include \"wxluasetup.h\"\n".. ! "#include \"wxbind/include/wxbinddefs.h\"\n".. ! "#ifndef wxUSE_WAVE\n#define wxUSE_WAVE 0\n#endif\n".. ! "#ifndef wxUSE_SOUND\n#define wxUSE_SOUND 0\n#endif\n" ------------------------------------------------------------------------------- --- 73,104 ---- -- This code will be place directly after any #includes at the top of the file hook_cpp_binding_header_includes = ! [[ ! #include "wx/defs.h" ! #include "wxluasetup.h" ! #include "wxbind/include/wxbinddefs.h" ! #ifndef wxUSE_WAVE ! #define wxUSE_WAVE 0 ! #endif // wxUSE_WAVE ! #ifndef wxUSE_SOUND ! #define wxUSE_SOUND 0 ! #endif // wxUSE_SOUND ! ! #include "wx/treectrl.h" ! ! // ---------------------------------------------------------------------------- ! // wxLuaTreeItemData - our treeitem data that allows us to get/set an index ! // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUA wxLuaTreeItemData : public wxTreeItemData ! { ! public: ! wxLuaTreeItemData(double value = 0) : m_value(value) {} ! double GetValue() const { return m_value; } ! void SetValue(double value) { m_value = value; } ! ! private: ! double m_value; ! }; ! ! ]] ------------------------------------------------------------------------------- *************** *** 83,129 **** -- the single hook_cpp_binding_filename generated cpp file or "" for none hook_cpp_binding_source_includes = ! "// wxWidgets >= 2.7 doesn't have static versions of stock GDI objects anymore\n".. ! "wxColour* wxLua_wxBLACK = NULL;\n".. ! "wxColour* wxLua_wxWHITE = NULL;\n".. ! "wxColour* wxLua_wxRED = NULL;\n".. ! "wxColour* wxLua_wxBLUE = NULL;\n".. ! "wxColour* wxLua_wxGREEN = NULL;\n".. ! "wxColour* wxLua_wxCYAN = NULL;\n".. ! "wxColour* wxLua_wxLIGHT_GREY = NULL;\n".. ! "wxPen* wxLua_wxRED_PEN = NULL;\n".. ! "wxPen* wxLua_wxCYAN_PEN = NULL;\n".. ! "wxPen* wxLua_wxGREEN_PEN = NULL;\n".. ! "wxPen* wxLua_wxBLACK_PEN = NULL;\n".. ! "wxPen* wxLua_wxWHITE_PEN = NULL;\n".. ! "wxPen* wxLua_wxTRANSPARENT_PEN = NULL;\n".. ! "wxPen* wxLua_wxBLACK_DASHED_PEN = NULL;\n".. ! "wxPen* wxLua_wxGREY_PEN = NULL;\n".. ! "wxPen* wxLua_wxMEDIUM_GREY_PEN = NULL;\n".. ! "wxPen* wxLua_wxLIGHT_GREY_PEN = NULL;\n".. ! "wxBrush* wxLua_wxBLUE_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxGREEN_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxWHITE_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxBLACK_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxGREY_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxMEDIUM_GREY_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxLIGHT_GREY_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxTRANSPARENT_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxCYAN_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxRED_BRUSH = NULL;\n".. ! "wxFont* wxLua_wxNORMAL_FONT = NULL;\n".. ! "wxFont* wxLua_wxSMALL_FONT = NULL;\n".. ! "wxFont* wxLua_wxITALIC_FONT = NULL;\n".. ! "wxFont* wxLua_wxSWISS_FONT = NULL;\n".. ! "wxCursor* wxLua_wxSTANDARD_CURSOR = NULL;\n".. ! "wxCursor* wxLua_wxHOURGLASS_CURSOR = NULL;\n".. ! "wxCursor* wxLua_wxCROSS_CURSOR = NULL;\n".. ! "\n".. ! "#if defined(__MINGW32__) || defined(__GNUWIN32__)\n".. ! " // FIX: \"internal compiler error: output_operand: invalid expression as operand\"\n".. ! " const wxPoint wxDefaultPositionHack = wxDefaultPosition;\n".. ! " const wxSize wxDefaultSizeHack = wxDefaultSize;\n".. ! " #define wxDefaultPosition wxDefaultPositionHack\n".. ! " #define wxDefaultSize wxDefaultSizeHack\n".. ! "#endif //__MINGW32__ \n" --============================================================================= --- 106,154 ---- -- the single hook_cpp_binding_filename generated cpp file or "" for none hook_cpp_binding_source_includes = ! [[ ! // wxWidgets >= 2.7 doesn't have static versions of stock GDI objects anymore ! wxColour* wxLua_wxBLACK = NULL; ! wxColour* wxLua_wxWHITE = NULL; ! wxColour* wxLua_wxRED = NULL; ! wxColour* wxLua_wxBLUE = NULL; ! wxColour* wxLua_wxGREEN = NULL; ! wxColour* wxLua_wxCYAN = NULL; ! wxColour* wxLua_wxLIGHT_GREY = NULL; ! wxPen* wxLua_wxRED_PEN = NULL; ! wxPen* wxLua_wxCYAN_PEN = NULL; ! wxPen* wxLua_wxGREEN_PEN = NULL; ! wxPen* wxLua_wxBLACK_PEN = NULL; ! wxPen* wxLua_wxWHITE_PEN = NULL; ! wxPen* wxLua_wxTRANSPARENT_PEN = NULL; ! wxPen* wxLua_wxBLACK_DASHED_PEN = NULL; ! wxPen* wxLua_wxGREY_PEN = NULL; ! wxPen* wxLua_wxMEDIUM_GREY_PEN = NULL; ! wxPen* wxLua_wxLIGHT_GREY_PEN = NULL; ! wxBrush* wxLua_wxBLUE_BRUSH = NULL; ! wxBrush* wxLua_wxGREEN_BRUSH = NULL; ! wxBrush* wxLua_wxWHITE_BRUSH = NULL; ! wxBrush* wxLua_wxBLACK_BRUSH = NULL; ! wxBrush* wxLua_wxGREY_BRUSH = NULL; ! wxBrush* wxLua_wxMEDIUM_GREY_BRUSH = NULL; ! wxBrush* wxLua_wxLIGHT_GREY_BRUSH = NULL; ! wxBrush* wxLua_wxTRANSPARENT_BRUSH = NULL; ! wxBrush* wxLua_wxCYAN_BRUSH = NULL; ! wxBrush* wxLua_wxRED_BRUSH = NULL; ! wxFont* wxLua_wxNORMAL_FONT = NULL; ! wxFont* wxLua_wxSMALL_FONT = NULL; ! wxFont* wxLua_wxITALIC_FONT = NULL; ! wxFont* wxLua_wxSWISS_FONT = NULL; ! wxCursor* wxLua_wxSTANDARD_CURSOR = NULL; ! wxCursor* wxLua_wxHOURGLASS_CURSOR = NULL; ! wxCursor* wxLua_wxCROSS_CURSOR = NULL; ! ! #if defined(__MINGW32__) || defined(__GNUWIN32__) ! // FIX: "internal compiler error: output_operand: invalid expression as operand" ! const wxPoint wxLua_wxDefaultPositionHack = wxDefaultPosition; ! const wxSize wxLua_wxDefaultSizeHack = wxDefaultSize; ! #define wxDefaultPosition wxLua_wxDefaultPositionHack ! #define wxDefaultSize wxLua_wxDefaultSizeHack ! #endif //__MINGW32__ ! ]] --============================================================================= *************** *** 196,237 **** [[ // ugly hack for wxWidgets >2.7 change to use wxStockGDI::GetXXX ! wxLua_wxBLACK = (wxColour*)wxBLACK; ! wxLua_wxWHITE = (wxColour*)wxWHITE; ! wxLua_wxRED = (wxColour*)wxRED; ! wxLua_wxBLUE = (wxColour*)wxBLUE; ! wxLua_wxGREEN = (wxColour*)wxGREEN; ! wxLua_wxCYAN = (wxColour*)wxCYAN; ! wxLua_wxLIGHT_GREY = (wxColour*)wxLIGHT_GREY; ! wxLua_wxRED_PEN = (wxPen*)wxRED_PEN; ! wxLua_wxCYAN_PEN = (wxPen*)wxCYAN_PEN; ! wxLua_wxGREEN_PEN = (wxPen*)wxGREEN_PEN; ! wxLua_wxBLACK_PEN = (wxPen*)wxBLACK_PEN; ! wxLua_wxWHITE_PEN = (wxPen*)wxWHITE_PEN; ! wxLua_wxTRANSPARENT_PEN = (wxPen*)wxTRANSPARENT_PEN; ! wxLua_wxBLACK_DASHED_PEN = (wxPen*)wxBLACK_DASHED_PEN; ! wxLua_wxGREY_PEN = (wxPen*)wxGREY_PEN; ! wxLua_wxMEDIUM_GREY_PEN = (wxPen*)wxMEDIUM_GREY_PEN; ! wxLua_wxLIGHT_GREY_PEN = (wxPen*)wxLIGHT_GREY_PEN; ! wxLua_wxBLUE_BRUSH = (wxBrush*)wxBLUE_BRUSH; ! wxLua_wxGREEN_BRUSH = (wxBrush*)wxGREEN_BRUSH; ! wxLua_wxWHITE_BRUSH = (wxBrush*)wxWHITE_BRUSH; ! wxLua_wxBLACK_BRUSH = (wxBrush*)wxBLACK_BRUSH; ! wxLua_wxGREY_BRUSH = (wxBrush*)wxGREY_BRUSH; ! wxLua_wxMEDIUM_GREY_BRUSH = (wxBrush*)wxMEDIUM_GREY_BRUSH; ! wxLua_wxLIGHT_GREY_BRUSH = (wxBrush*)wxLIGHT_GREY_BRUSH; ! wxLua_wxTRANSPARENT_BRUSH = (wxBrush*)wxTRANSPARENT_BRUSH; ! wxLua_wxCYAN_BRUSH = (wxBrush*)wxCYAN_BRUSH; ! wxLua_wxRED_BRUSH = (wxBrush*)wxRED_BRUSH; ! wxLua_wxNORMAL_FONT = (wxFont*)wxNORMAL_FONT; ! wxLua_wxSMALL_FONT = (wxFont*)wxSMALL_FONT; ! wxLua_wxITALIC_FONT = (wxFont*)wxITALIC_FONT; ! wxLua_wxSWISS_FONT = (wxFont*)wxSWISS_FONT; ! wxLua_wxSTANDARD_CURSOR = (wxCursor*)wxSTANDARD_CURSOR; ! wxLua_wxHOURGLASS_CURSOR = (wxCursor*)wxHOURGLASS_CURSOR; ! wxLua_wxCROSS_CURSOR = (wxCursor*)wxCROSS_CURSOR; ]] --- 221,265 ---- [[ // ugly hack for wxWidgets >2.7 change to use wxStockGDI::GetXXX ! if (wxLua_wxBLACK == NULL) ! { ! wxLua_wxBLACK = (wxColour*)wxBLACK; ! wxLua_wxWHITE = (wxColour*)wxWHITE; ! wxLua_wxRED = (wxColour*)wxRED; ! wxLua_wxBLUE = (wxColour*)wxBLUE; ! wxLua_wxGREEN = (wxColour*)wxGREEN; ! wxLua_wxCYAN = (wxColour*)wxCYAN; ! wxLua_wxLIGHT_GREY = (wxColour*)wxLIGHT_GREY; ! wxLua_wxRED_PEN = (wxPen*)wxRED_PEN; ! wxLua_wxCYAN_PEN = (wxPen*)wxCYAN_PEN; ! wxLua_wxGREEN_PEN = (wxPen*)wxGREEN_PEN; ! wxLua_wxBLACK_PEN = (wxPen*)wxBLACK_PEN; ! wxLua_wxWHITE_PEN = (wxPen*)wxWHITE_PEN; ! wxLua_wxTRANSPARENT_PEN = (wxPen*)wxTRANSPARENT_PEN; ! wxLua_wxBLACK_DASHED_PEN = (wxPen*)wxBLACK_DASHED_PEN; ! wxLua_wxGREY_PEN = (wxPen*)wxGREY_PEN; ! wxLua_wxMEDIUM_GREY_PEN = (wxPen*)wxMEDIUM_GREY_PEN; ! wxLua_wxLIGHT_GREY_PEN = (wxPen*)wxLIGHT_GREY_PEN; ! wxLua_wxBLUE_BRUSH = (wxBrush*)wxBLUE_BRUSH; ! wxLua_wxGREEN_BRUSH = (wxBrush*)wxGREEN_BRUSH; ! wxLua_wxWHITE_BRUSH = (wxBrush*)wxWHITE_BRUSH; ! wxLua_wxBLACK_BRUSH = (wxBrush*)wxBLACK_BRUSH; ! wxLua_wxGREY_BRUSH = (wxBrush*)wxGREY_BRUSH; ! wxLua_wxMEDIUM_GREY_BRUSH = (wxBrush*)wxMEDIUM_GREY_BRUSH; ! wxLua_wxLIGHT_GREY_BRUSH = (wxBrush*)wxLIGHT_GREY_BRUSH; ! wxLua_wxTRANSPARENT_BRUSH = (wxBrush*)wxTRANSPARENT_BRUSH; ! wxLua_wxCYAN_BRUSH = (wxBrush*)wxCYAN_BRUSH; ! wxLua_wxRED_BRUSH = (wxBrush*)wxRED_BRUSH; ! wxLua_wxNORMAL_FONT = (wxFont*)wxNORMAL_FONT; ! wxLua_wxSMALL_FONT = (wxFont*)wxSMALL_FONT; ! wxLua_wxITALIC_FONT = (wxFont*)wxITALIC_FONT; ! wxLua_wxSWISS_FONT = (wxFont*)wxSWISS_FONT; ! wxLua_wxSTANDARD_CURSOR = (wxCursor*)wxSTANDARD_CURSOR; ! wxLua_wxHOURGLASS_CURSOR = (wxCursor*)wxHOURGLASS_CURSOR; ! wxLua_wxCROSS_CURSOR = (wxCursor*)wxCROSS_CURSOR; ! } ]] |