diff options
author | Dan Gudmundsson <[email protected]> | 2013-01-15 09:19:32 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-01-15 09:19:32 +0100 |
commit | 0324fe0502d843830e6fe128e307601f21a60f26 (patch) | |
tree | 299db89395e593c0eded9790e69992259ca60058 /lib/debugger/src/dbg_wx_code.erl | |
parent | 364ec900a6f974e7bc184bb3d5d67e85765353e0 (diff) | |
parent | 7f048c5d71534d458351513e84bb879c47f2c76e (diff) | |
download | otp-0324fe0502d843830e6fe128e307601f21a60f26.tar.gz otp-0324fe0502d843830e6fe128e307601f21a60f26.tar.bz2 otp-0324fe0502d843830e6fe128e307601f21a60f26.zip |
Merge branch 'dgud/debugger/unicode/OTP-10679'
* dgud/debugger/unicode/OTP-10679:
debugger: View terms as unicode-strings
debugger: Fix code viewing on wxWidgets-2.9
debugger: Remove bad gs:call
debugger: Fix user evalution dependent of bindings in trace window
Diffstat (limited to 'lib/debugger/src/dbg_wx_code.erl')
-rw-r--r-- | lib/debugger/src/dbg_wx_code.erl | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/lib/debugger/src/dbg_wx_code.erl b/lib/debugger/src/dbg_wx_code.erl index 99826d9bdb..9853a5dbae 100644 --- a/lib/debugger/src/dbg_wx_code.erl +++ b/lib/debugger/src/dbg_wx_code.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -30,6 +30,21 @@ -define(stc, wxStyledTextCtrl). +%% For wx-2.9 usage +-ifndef(wxSTC_ERLANG_COMMENT_FUNCTION). +-define(wxSTC_ERLANG_COMMENT_FUNCTION, 14). +-define(wxSTC_ERLANG_COMMENT_MODULE, 15). +-define(wxSTC_ERLANG_COMMENT_DOC, 16). +-define(wxSTC_ERLANG_COMMENT_DOC_MACRO, 17). +-define(wxSTC_ERLANG_ATOM_QUOTED, 18). +-define(wxSTC_ERLANG_MACRO_QUOTED, 19). +-define(wxSTC_ERLANG_RECORD_QUOTED, 20). +-define(wxSTC_ERLANG_NODE_NAME_QUOTED, 21). +-define(wxSTC_ERLANG_BIFS, 22). +-define(wxSTC_ERLANG_MODULES, 23). +-define(wxSTC_ERLANG_MODULES_ATT, 24). +-endif. + code_area(Parent) -> FixedFont = wxFont:new(10, ?wxFONTFAMILY_TELETYPE, ?wxNORMAL, ?wxNORMAL,[]), %%Ed = wxStyledTextCtrl:new(Parent, [{size, {700, 500}}]), @@ -58,7 +73,21 @@ code_area(Parent) -> {?wxSTC_ERLANG_MACRO, {40,144,170}}, {?wxSTC_ERLANG_RECORD, {40,100,20}}, {?wxSTC_ERLANG_SEPARATOR,{0,0,0}}, - {?wxSTC_ERLANG_NODE_NAME,{0,0,0}}], + {?wxSTC_ERLANG_NODE_NAME,{0,0,0}}, + %% Optional 2.9 stuff + {?wxSTC_ERLANG_COMMENT_FUNCTION, {160,53,35}}, + {?wxSTC_ERLANG_COMMENT_MODULE, {160,53,35}}, + {?wxSTC_ERLANG_COMMENT_DOC, {160,53,35}}, + {?wxSTC_ERLANG_COMMENT_DOC_MACRO, {160,53,35}}, + {?wxSTC_ERLANG_ATOM_QUOTED, {0,0,0}}, + {?wxSTC_ERLANG_MACRO_QUOTED, {40,144,170}}, + {?wxSTC_ERLANG_RECORD_QUOTED, {40,100,20}}, + {?wxSTC_ERLANG_NODE_NAME_QUOTED, {0,0,0}}, + {?wxSTC_ERLANG_BIFS, {130,40,172}}, + {?wxSTC_ERLANG_MODULES, {64,102,244}}, + {?wxSTC_ERLANG_MODULES_ATT, {64,102,244}} + ], + SetStyle = fun({Style, Color}) -> ?stc:styleSetFont(Ed, Style, FixedFont), ?stc:styleSetForeground(Ed, Style, Color) |