From: John L. <jr...@us...> - 2007-06-27 03:12:01
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13326/wxLua/bindings/wxwidgets Modified Files: datetime.i gdi.i wx_datatypes.lua Log Message: Unicode compilation fix for genwxbind Add wxRenderer to bindings Index: datetime.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/datetime.i,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** datetime.i 26 Jun 2007 22:16:38 -0000 1.36 --- datetime.i 27 Jun 2007 03:11:27 -0000 1.37 *************** *** 778,782 **** %endenum ! %struct wxLanguageInfo %member int Language; // wxLanguage id %member wxString CanonicalName; // Canonical name, e.g. fr_FR --- 778,784 ---- %endenum ! %struct %delete %encapsulate wxLanguageInfo ! wxLanguageInfo() // you must set all the values by hand ! %member int Language; // wxLanguage id %member wxString CanonicalName; // Canonical name, e.g. fr_FR Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** wx_datatypes.lua 26 Jun 2007 03:22:04 -0000 1.78 --- wx_datatypes.lua 27 Jun 2007 03:11:27 -0000 1.79 *************** *** 1689,1692 **** --- 1689,1705 ---- Name = "wxHTTP", }, + wxHeaderButtonParams = { + Condition = "wxLUA_USE_wxRenderer", + DefType = "struct", + Encapsulate = true, + IsNumber = false, + Name = "wxHeaderButtonParams", + }, + wxHeaderSortIconType = { + Condition = "wxLUA_USE_wxRenderer", + DefType = "enum", + IsNumber = true, + Name = "wxHeaderSortIconType", + }, wxHelpController = { BaseClass = "wxHelpControllerBase", *************** *** 2092,2095 **** --- 2105,2109 ---- Condition = "wxUSE_INTL", DefType = "struct", + Encapsulate = true, IsNumber = false, Name = "wxLanguageInfo", *************** *** 3004,3007 **** --- 3018,3041 ---- Name = "wxRelationship", }, + wxRendererNative = { + Condition = "wxLUA_USE_wxRenderer", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxRendererNative", + }, + wxRendererVersion = { + Condition = "wxLUA_USE_wxRenderer", + DefType = "struct", + Encapsulate = true, + IsNumber = false, + Name = "wxRendererVersion", + }, + ["wxRendererVersion::dummy"] = { + Condition = "wxLUA_USE_wxRenderer", + DefType = "enum", + IsNumber = true, + Name = "wxRendererVersion::dummy", + }, wxSashDragStatus = { Condition = "wxLUA_USE_wxSashWindow && wxUSE_SASH", *************** *** 3286,3289 **** --- 3320,3330 ---- Name = "wxSplitterEvent", }, + wxSplitterRenderParams = { + Condition = "wxLUA_USE_wxRenderer", + DefType = "struct", + Encapsulate = true, + IsNumber = false, + Name = "wxSplitterRenderParams", + }, wxSplitterWindow = { BaseClass = "wxWindow", *************** *** 4033,4036 **** --- 4074,4078 ---- ["%win"] = "defined(__WXMSW__)", ["%wince"] = "defined(__WXWINCE__)", + ["%wxHAS_NATIVE_RENDERER"] = "defined(wxHAS_NATIVE_RENDERER)", ["%wxchkver_2_4"] = "wxCHECK_VERSION(2,4,0)", ["%wxchkver_2_6"] = "wxCHECK_VERSION(2,6,0)", *************** *** 4150,4153 **** --- 4192,4196 ---- wxLUA_USE_wxRegEx = "wxLUA_USE_wxRegEx", wxLUA_USE_wxRegion = "wxLUA_USE_wxRegion", + wxLUA_USE_wxRenderer = "wxLUA_USE_wxRenderer", wxLUA_USE_wxSashWindow = "wxLUA_USE_wxSashWindow", wxLUA_USE_wxScrollBar = "wxLUA_USE_wxScrollBar", Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** gdi.i 25 Jun 2007 03:19:37 -0000 1.59 --- gdi.i 27 Jun 2007 03:11:27 -0000 1.60 *************** *** 1738,1739 **** --- 1738,1908 ---- %endif // %wxchkver_2_8 && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL + + // --------------------------------------------------------------------------- + // 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 + %endenum + + %struct %delete %encapsulate wxSplitterRenderParams + // the only way to initialize this struct is by using this ctor + wxSplitterRenderParams(wxCoord widthSash_, wxCoord border_, bool isSens_) + + %member const wxCoord widthSash // the width of the splitter sash + %member const wxCoord border // the width of the border of the splitter window + %member const bool isHotSensitive // true if the splitter changes its appearance when the mouse is over it + %endstruct + + + // extra optional parameters for DrawHeaderButton + %struct %delete %encapsulate wxHeaderButtonParams + wxHeaderButtonParams() + + %member wxColour m_arrowColour; + %member wxColour m_selectionColour; + %member wxString m_labelText; + %member wxFont m_labelFont; + %member wxColour m_labelColour; + %member wxBitmap m_labelBitmap; + %member int m_labelAlignment; + %endstruct + + %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 + %endenum + + // 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 + %endenum + + // wxRendererNative interface version + %struct %delete %encapsulate wxRendererVersion + wxRendererVersion(int version_, int age_) + + // check if the given version is compatible with the current one + static bool IsCompatible(const wxRendererVersion& ver) + + %member const int version; + %member const int age; + %endstruct + + + %class %delete %noclassinfo %encapsulate 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; + + %endclass + + %endif // wxLUA_USE_wxRenderer |