diff options
author | Dan Gudmundsson <[email protected]> | 2015-09-16 11:49:14 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-09-16 11:49:14 +0200 |
commit | acc47d90e34e4552ffe99766da7ac95423db1e30 (patch) | |
tree | ba4b9838ac573456db2fe1b523b5bfa372888275 /lib/wx/api_gen/wx_gen_cpp.erl | |
parent | e23ea97d7dce3c12f54f06cb90354a0b3a55d073 (diff) | |
parent | e7d0b4e0f19280daa03292214163880cd7337cb2 (diff) | |
download | otp-acc47d90e34e4552ffe99766da7ac95423db1e30.tar.gz otp-acc47d90e34e4552ffe99766da7ac95423db1e30.tar.bz2 otp-acc47d90e34e4552ffe99766da7ac95423db1e30.zip |
Merge branch 'dgud/wx/add-missing-aui-func/OTP-12961' into maint
* dgud/wx/add-missing-aui-func/OTP-12961:
wx: Fix wxAuiManager:getAllPanes/1
wx: Add missing aui functionality
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 2ce6295078..5649336b5d 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -235,7 +235,8 @@ gen_funcs(Defs) -> w("}} /* The End */~n~n~n"), UglySkipList = ["wxCaret", "wxCalendarDateAttr", - "wxFileDataObject", "wxTextDataObject", "wxBitmapDataObject" + "wxFileDataObject", "wxTextDataObject", "wxBitmapDataObject", + "wxAuiSimpleTabArt" ], w("bool WxeApp::delete_object(void *ptr, wxeRefData *refd) {~n", []), @@ -323,12 +324,8 @@ gen_method(CName, M=#method{name=N,params=Ps0,type=T,method_type=MT,id=MethodId put(current_func, N), put(bin_count,-1), ?WTC("gen_method"), - Endif = case lists:keysearch(deprecated, 1, FOpts) of - {value, {deprecated, IfDef}} -> - w("#if ~s~n", [IfDef]), - true; - _ -> false - end, + Endif1 = gen_if(deprecated, FOpts), + Endif2 = gen_if(test_if, FOpts), w("case ~s: { // ~s::~s~n", [wx_gen_erl:get_unique_name(MethodId),CName,N]), Ps1 = declare_variables(void, Ps0), {Ps2,Align} = decode_arguments(Ps1), @@ -347,10 +344,19 @@ gen_method(CName, M=#method{name=N,params=Ps0,type=T,method_type=MT,id=MethodId free_args(), build_return_vals(T,Ps3), w(" break;~n}~n", []), - Endif andalso w("#endif~n", []), + Endif1 andalso w("#endif~n", []), + Endif2 andalso w("#endif~n", []), erase(current_func), M. +gen_if(What, Opts) -> + case lists:keysearch(What, 1, Opts) of + {value, {What, IfDef}} -> + w("#if ~s~n", [IfDef]), + true; + _ -> false + end. + declare_variables(void,Ps) -> [declare_var(P) || P <- Ps]; declare_variables(T, Ps) -> @@ -1014,6 +1020,10 @@ build_ret(Name,_,#type{base={comp,_,_},single=array}) -> w(" for(unsigned int i=0; i < ~s.GetCount(); i++) {~n", [Name]), w(" rt.add(~s[i]);~n }~n",[Name]), w(" rt.endList(~s.GetCount());~n",[Name]); +build_ret(Name,_,#type{base={class,Class},single=array}) -> + w(" for(unsigned int i=0; i < ~s.GetCount(); i++) {~n", [Name]), + w(" rt.addRef(getRef((void *) &~s.Item(i), memenv), \"~s\");~n }~n",[Name, Class]), + w(" rt.endList(~s.GetCount());~n",[Name]); build_ret(Name,_,#type{name=List,single=list,base={class,Class}}) -> w(" int i=0;~n"), w(" for(~s::const_iterator it = ~s.begin(); it != ~s.end(); ++it) {~n", |