Compare commits
154 Commits
wxPy_2_8_0
...
wxPy_2_8_0
Author | SHA1 | Date | |
---|---|---|---|
|
278c3b337c | ||
|
3d7a1b394b | ||
|
34d71f81f4 | ||
|
b0a54b8a6b | ||
|
0eaf8cd16c | ||
|
b64274c77a | ||
|
f80419c886 | ||
|
e5d3d8ad45 | ||
|
ccf6c43b3d | ||
|
6cfe484434 | ||
|
0bddba445f | ||
|
23fb9116c3 | ||
|
3e69f6e58e | ||
|
82ddc0cae3 | ||
|
8a14de8aa9 | ||
|
f7a5043240 | ||
|
c81f58f7e5 | ||
|
eee9bf2e5c | ||
|
ef1160a7dc | ||
|
7538fdc9a6 | ||
|
ca2261d33f | ||
|
4e8107d57a | ||
|
395e0a70ba | ||
|
aeffa0721d | ||
|
ffdbfc4a76 | ||
|
9f5e5c31a8 | ||
|
3bdec81e14 | ||
|
5448935a30 | ||
|
1a4b6b97b1 | ||
|
7528971e6b | ||
|
8e287ae93f | ||
|
631787c478 | ||
|
b2b4f8c0ca | ||
|
02d5015b1c | ||
|
61f84e2493 | ||
|
046c2f1404 | ||
|
defeae282f | ||
|
44038f9a6c | ||
|
e9a4bf7ddc | ||
|
99a7bebb65 | ||
|
de387fc99c | ||
|
b9d495a007 | ||
|
7e2ee0bf41 | ||
|
7f3e07a83a | ||
|
e0329d2476 | ||
|
12e424d28f | ||
|
d2a931c9f7 | ||
|
b3ff5a475b | ||
|
f321ab7fb4 | ||
|
9c6d8b7cdb | ||
|
ccea21ccf8 | ||
|
8605f9c571 | ||
|
338b2a02ce | ||
|
629ddfb03e | ||
|
f928b1ab18 | ||
|
0ae9003c21 | ||
|
3fafce674b | ||
|
574d48dbe4 | ||
|
190b93449e | ||
|
16837dc334 | ||
|
95fab76ba0 | ||
|
6969c2c318 | ||
|
e3eac0ff7f | ||
|
7947a11dad | ||
|
bdb5188415 | ||
|
dc99f469f5 | ||
|
59ccbf7fec | ||
|
2bd162773d | ||
|
e1944ad852 | ||
|
cefcc57db8 | ||
|
55424c8c22 | ||
|
015131a1fd | ||
|
38c213b192 | ||
|
e1463b9df0 | ||
|
c306c1e0f6 | ||
|
471046b088 | ||
|
cf6982fae6 | ||
|
5c7d3eb176 | ||
|
d69f7c5831 | ||
|
cbf6ba7559 | ||
|
cc197ed421 | ||
|
9a9b58229f | ||
|
f1f5f16f78 | ||
|
bc63f2c969 | ||
|
ff1bd293e1 | ||
|
8ebf24655c | ||
|
9b99c1e36a | ||
|
b370e7587f | ||
|
9fcbe07663 | ||
|
5b204a088a | ||
|
4d7e2cdad3 | ||
|
c0c677934f | ||
|
f02f4d43c5 | ||
|
afc2d3bc8a | ||
|
dbba880ee5 | ||
|
72d11e1734 | ||
|
9a137faacf | ||
|
e019c6429d | ||
|
f84a986cfc | ||
|
f0db59f269 | ||
|
4b32f8c79e | ||
|
facc1d350b | ||
|
89d1e2eeab | ||
|
09d48154cc | ||
|
bcf4fef288 | ||
|
d7db6a4351 | ||
|
757b694ba8 | ||
|
18c7af7e80 | ||
|
9e1c7236e0 | ||
|
9b9596de5e | ||
|
34841b216c | ||
|
8c0f22340e | ||
|
388703a573 | ||
|
698581160d | ||
|
779e158bb2 | ||
|
a2f2764dfb | ||
|
cd977e12f9 | ||
|
0646b21922 | ||
|
0d8a01fdaa | ||
|
8e509c4b0c | ||
|
be13a26775 | ||
|
84d3bc74b1 | ||
|
cd840087aa | ||
|
9c5fd8a319 | ||
|
5fe6c02bb8 | ||
|
9b8a360d4d | ||
|
dc4689ef73 | ||
|
d8bfd72731 | ||
|
2c4eefc056 | ||
|
6b44a33553 | ||
|
ede5511517 | ||
|
8c70a78958 | ||
|
dc7c33c455 | ||
|
9f8ffc5f8b | ||
|
9fea3325be | ||
|
0ec8d8f72c | ||
|
265db88d61 | ||
|
e6444871c1 | ||
|
4326154d28 | ||
|
31a8ceaf5f | ||
|
172d83f4ea | ||
|
62f04b576f | ||
|
0881232f66 | ||
|
948ddccfab | ||
|
3fa27f794b | ||
|
0ecdaebb94 | ||
|
fd7741f907 | ||
|
840c7ccebf | ||
|
10eeb875ec | ||
|
b529726eff | ||
|
86b6546709 | ||
|
0cdd04ad99 | ||
|
e28b9b9cb8 | ||
|
a73ae836df |
52
Makefile.in
52
Makefile.in
@@ -3728,6 +3728,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS = \
|
||||
@COND_TOOLKIT_COCOA@ monodll_gsockosx.o monodll_hid.o monodll_utilsexc_cf.o
|
||||
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS = \
|
||||
monodll_fontmgrcmn.o \
|
||||
monodll_socketevtdispatch.o \
|
||||
monodll_caret.o \
|
||||
monodll_colour.o \
|
||||
monodll_icon.o \
|
||||
@@ -3992,6 +3993,7 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS = \
|
||||
monodll_fontutil.o \
|
||||
monodll_utilsx11.o \
|
||||
monodll_displayx11.o \
|
||||
monodll_socketevtdispatch.o \
|
||||
monodll_icon.o \
|
||||
monodll_timer.o \
|
||||
monodll_app.o \
|
||||
@@ -4008,7 +4010,6 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS = \
|
||||
monodll_dcscreen.o \
|
||||
monodll_evtloop.o \
|
||||
monodll_font.o \
|
||||
monodll_gsockx11.o \
|
||||
monodll_minifram.o \
|
||||
monodll_nanox.o \
|
||||
monodll_palette.o \
|
||||
@@ -4560,6 +4561,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS = \
|
||||
@COND_TOOLKIT_COCOA@ monodll_gsockosx.o monodll_hid.o monodll_utilsexc_cf.o
|
||||
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_1 = \
|
||||
monodll_fontmgrcmn.o \
|
||||
monodll_socketevtdispatch.o \
|
||||
monodll_caret.o \
|
||||
monodll_colour.o \
|
||||
monodll_icon.o \
|
||||
@@ -4824,6 +4826,7 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_1 = \
|
||||
monodll_fontutil.o \
|
||||
monodll_utilsx11.o \
|
||||
monodll_displayx11.o \
|
||||
monodll_socketevtdispatch.o \
|
||||
monodll_icon.o \
|
||||
monodll_timer.o \
|
||||
monodll_app.o \
|
||||
@@ -4840,7 +4843,6 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_1 = \
|
||||
monodll_dcscreen.o \
|
||||
monodll_evtloop.o \
|
||||
monodll_font.o \
|
||||
monodll_gsockx11.o \
|
||||
monodll_minifram.o \
|
||||
monodll_nanox.o \
|
||||
monodll_palette.o \
|
||||
@@ -5507,6 +5509,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_1 = \
|
||||
@COND_TOOLKIT_COCOA@ monolib_gsockosx.o monolib_hid.o monolib_utilsexc_cf.o
|
||||
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_2 = \
|
||||
monolib_fontmgrcmn.o \
|
||||
monolib_socketevtdispatch.o \
|
||||
monolib_caret.o \
|
||||
monolib_colour.o \
|
||||
monolib_icon.o \
|
||||
@@ -5772,6 +5775,7 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_2 = \
|
||||
monolib_fontutil.o \
|
||||
monolib_utilsx11.o \
|
||||
monolib_displayx11.o \
|
||||
monolib_socketevtdispatch.o \
|
||||
monolib_icon.o \
|
||||
monolib_timer.o \
|
||||
monolib_app.o \
|
||||
@@ -5788,7 +5792,6 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_2 = \
|
||||
monolib_dcscreen.o \
|
||||
monolib_evtloop.o \
|
||||
monolib_font.o \
|
||||
monolib_gsockx11.o \
|
||||
monolib_minifram.o \
|
||||
monolib_nanox.o \
|
||||
monolib_palette.o \
|
||||
@@ -6340,6 +6343,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_1 = \
|
||||
@COND_TOOLKIT_COCOA@ monolib_gsockosx.o monolib_hid.o monolib_utilsexc_cf.o
|
||||
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_3 = \
|
||||
monolib_fontmgrcmn.o \
|
||||
monolib_socketevtdispatch.o \
|
||||
monolib_caret.o \
|
||||
monolib_colour.o \
|
||||
monolib_icon.o \
|
||||
@@ -6605,6 +6609,7 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_3 = \
|
||||
monolib_fontutil.o \
|
||||
monolib_utilsx11.o \
|
||||
monolib_displayx11.o \
|
||||
monolib_socketevtdispatch.o \
|
||||
monolib_icon.o \
|
||||
monolib_timer.o \
|
||||
monolib_app.o \
|
||||
@@ -6621,7 +6626,6 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_3 = \
|
||||
monolib_dcscreen.o \
|
||||
monolib_evtloop.o \
|
||||
monolib_font.o \
|
||||
monolib_gsockx11.o \
|
||||
monolib_minifram.o \
|
||||
monolib_nanox.o \
|
||||
monolib_palette.o \
|
||||
@@ -7516,6 +7520,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_2 = \
|
||||
@COND_TOOLKIT_COCOA@ coredll_gsockosx.o coredll_hid.o coredll_utilsexc_cf.o
|
||||
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_4 = \
|
||||
coredll_fontmgrcmn.o \
|
||||
coredll_socketevtdispatch.o \
|
||||
coredll_caret.o \
|
||||
coredll_colour.o \
|
||||
coredll_icon.o \
|
||||
@@ -7781,6 +7786,7 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_4 = \
|
||||
coredll_fontutil.o \
|
||||
coredll_utilsx11.o \
|
||||
coredll_displayx11.o \
|
||||
coredll_socketevtdispatch.o \
|
||||
coredll_icon.o \
|
||||
coredll_timer.o \
|
||||
coredll_app.o \
|
||||
@@ -7797,7 +7803,6 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_4 = \
|
||||
coredll_dcscreen.o \
|
||||
coredll_evtloop.o \
|
||||
coredll_font.o \
|
||||
coredll_gsockx11.o \
|
||||
coredll_minifram.o \
|
||||
coredll_nanox.o \
|
||||
coredll_palette.o \
|
||||
@@ -8349,6 +8354,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_2 = \
|
||||
@COND_TOOLKIT_COCOA@ coredll_gsockosx.o coredll_hid.o coredll_utilsexc_cf.o
|
||||
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_5 = \
|
||||
coredll_fontmgrcmn.o \
|
||||
coredll_socketevtdispatch.o \
|
||||
coredll_caret.o \
|
||||
coredll_colour.o \
|
||||
coredll_icon.o \
|
||||
@@ -8614,6 +8620,7 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_5 = \
|
||||
coredll_fontutil.o \
|
||||
coredll_utilsx11.o \
|
||||
coredll_displayx11.o \
|
||||
coredll_socketevtdispatch.o \
|
||||
coredll_icon.o \
|
||||
coredll_timer.o \
|
||||
coredll_app.o \
|
||||
@@ -8630,7 +8637,6 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_5 = \
|
||||
coredll_dcscreen.o \
|
||||
coredll_evtloop.o \
|
||||
coredll_font.o \
|
||||
coredll_gsockx11.o \
|
||||
coredll_minifram.o \
|
||||
coredll_nanox.o \
|
||||
coredll_palette.o \
|
||||
@@ -8969,6 +8975,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_3 = \
|
||||
@COND_TOOLKIT_COCOA@ corelib_gsockosx.o corelib_hid.o corelib_utilsexc_cf.o
|
||||
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_6 = \
|
||||
corelib_fontmgrcmn.o \
|
||||
corelib_socketevtdispatch.o \
|
||||
corelib_caret.o \
|
||||
corelib_colour.o \
|
||||
corelib_icon.o \
|
||||
@@ -9234,6 +9241,7 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_6 = \
|
||||
corelib_fontutil.o \
|
||||
corelib_utilsx11.o \
|
||||
corelib_displayx11.o \
|
||||
corelib_socketevtdispatch.o \
|
||||
corelib_icon.o \
|
||||
corelib_timer.o \
|
||||
corelib_app.o \
|
||||
@@ -9250,7 +9258,6 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_6 = \
|
||||
corelib_dcscreen.o \
|
||||
corelib_evtloop.o \
|
||||
corelib_font.o \
|
||||
corelib_gsockx11.o \
|
||||
corelib_minifram.o \
|
||||
corelib_nanox.o \
|
||||
corelib_palette.o \
|
||||
@@ -9802,6 +9809,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_3 = \
|
||||
@COND_TOOLKIT_COCOA@ corelib_gsockosx.o corelib_hid.o corelib_utilsexc_cf.o
|
||||
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_7 = \
|
||||
corelib_fontmgrcmn.o \
|
||||
corelib_socketevtdispatch.o \
|
||||
corelib_caret.o \
|
||||
corelib_colour.o \
|
||||
corelib_icon.o \
|
||||
@@ -10067,6 +10075,7 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_7 = \
|
||||
corelib_fontutil.o \
|
||||
corelib_utilsx11.o \
|
||||
corelib_displayx11.o \
|
||||
corelib_socketevtdispatch.o \
|
||||
corelib_icon.o \
|
||||
corelib_timer.o \
|
||||
corelib_app.o \
|
||||
@@ -10083,7 +10092,6 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_7 = \
|
||||
corelib_dcscreen.o \
|
||||
corelib_evtloop.o \
|
||||
corelib_font.o \
|
||||
corelib_gsockx11.o \
|
||||
corelib_minifram.o \
|
||||
corelib_nanox.o \
|
||||
corelib_palette.o \
|
||||
@@ -14811,8 +14819,11 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1@monodll_utilsexc_cf.o: $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp
|
||||
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@monodll_gsockx11.o: $(srcdir)/src/x11/gsockx11.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/x11/gsockx11.cpp
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@monodll_socketevtdispatch.o: $(srcdir)/src/common/socketevtdispatch.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/socketevtdispatch.cpp
|
||||
|
||||
@COND_TOOLKIT_DFB_USE_GUI_1@monodll_socketevtdispatch.o: $(srcdir)/src/common/socketevtdispatch.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/socketevtdispatch.cpp
|
||||
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@monodll_nanox.o: $(srcdir)/src/x11/nanox.c $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CCC) -c -o $@ $(MONODLL_CFLAGS) $(srcdir)/src/x11/nanox.c
|
||||
@@ -18927,8 +18938,11 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1@monolib_utilsexc_cf.o: $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp
|
||||
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@monolib_gsockx11.o: $(srcdir)/src/x11/gsockx11.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/x11/gsockx11.cpp
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@monolib_socketevtdispatch.o: $(srcdir)/src/common/socketevtdispatch.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/socketevtdispatch.cpp
|
||||
|
||||
@COND_TOOLKIT_DFB_USE_GUI_1@monolib_socketevtdispatch.o: $(srcdir)/src/common/socketevtdispatch.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/socketevtdispatch.cpp
|
||||
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@monolib_nanox.o: $(srcdir)/src/x11/nanox.c $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CCC) -c -o $@ $(MONOLIB_CFLAGS) $(srcdir)/src/x11/nanox.c
|
||||
@@ -23424,8 +23438,11 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1@coredll_utilsexc_cf.o: $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp
|
||||
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@coredll_gsockx11.o: $(srcdir)/src/x11/gsockx11.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/x11/gsockx11.cpp
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@coredll_socketevtdispatch.o: $(srcdir)/src/common/socketevtdispatch.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/socketevtdispatch.cpp
|
||||
|
||||
@COND_TOOLKIT_DFB_USE_GUI_1@coredll_socketevtdispatch.o: $(srcdir)/src/common/socketevtdispatch.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/socketevtdispatch.cpp
|
||||
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@coredll_nanox.o: $(srcdir)/src/x11/nanox.c $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CCC) -c -o $@ $(COREDLL_CFLAGS) $(srcdir)/src/x11/nanox.c
|
||||
@@ -26376,8 +26393,11 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1@corelib_utilsexc_cf.o: $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp
|
||||
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@corelib_gsockx11.o: $(srcdir)/src/x11/gsockx11.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/x11/gsockx11.cpp
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@corelib_socketevtdispatch.o: $(srcdir)/src/common/socketevtdispatch.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/socketevtdispatch.cpp
|
||||
|
||||
@COND_TOOLKIT_DFB_USE_GUI_1@corelib_socketevtdispatch.o: $(srcdir)/src/common/socketevtdispatch.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/socketevtdispatch.cpp
|
||||
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@corelib_nanox.o: $(srcdir)/src/x11/nanox.c $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_X11_USE_GUI_1@ $(CCC) -c -o $@ $(CORELIB_CFLAGS) $(srcdir)/src/x11/nanox.c
|
||||
|
@@ -1399,6 +1399,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
|
||||
<set var="X11_LOWLEVEL_SRC" hints="files">
|
||||
$(XWIN_LOWLEVEL_SRC)
|
||||
src/common/socketevtdispatch.cpp
|
||||
src/generic/icon.cpp
|
||||
src/generic/timer.cpp
|
||||
src/x11/app.cpp
|
||||
@@ -1415,7 +1416,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/x11/dcscreen.cpp
|
||||
src/x11/evtloop.cpp
|
||||
src/x11/font.cpp
|
||||
src/x11/gsockx11.cpp
|
||||
src/x11/minifram.cpp
|
||||
src/x11/nanox.c
|
||||
src/x11/palette.cpp
|
||||
@@ -1818,6 +1818,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
|
||||
<set var="DFB_LOWLEVEL_SRC" hints="files">
|
||||
src/common/fontmgrcmn.cpp
|
||||
src/common/socketevtdispatch.cpp
|
||||
src/generic/caret.cpp
|
||||
src/generic/colour.cpp
|
||||
src/generic/icon.cpp
|
||||
|
@@ -1,12 +1,12 @@
|
||||
rem Uncomment the next line to set the version; used also in wxWidgets.iss
|
||||
SET WXW_VER=2.8.0
|
||||
rem SET WXW_VER=2.8.0
|
||||
if (%WXW_VER%)==() SET WXW_VER=CVS
|
||||
|
||||
echo docs building for %WXW_VER%
|
||||
|
||||
rem This builds the docs in %WXWIN% in a number of formats
|
||||
rem and a clean inno setup in a second tree
|
||||
rem it uses a number of tools nmake, gnuwin32 zip, ghostscript, MS word, cvsNT
|
||||
rem it uses a number of tools nmake, gnuwin32 zip & dos2unix, ghostscript, MS word, cvsNT
|
||||
rem cvs is in the path already from CVSNT install
|
||||
rem writes a log file in c:\
|
||||
|
||||
@@ -18,14 +18,22 @@ set PATH=%PATH%;C:\wx\wxw26b\utils\tex2rtf\src\vc_based;C:\wx\Gnu\bin;c:\progra~
|
||||
set PATH=%PATH%;C:\Program Files\gs\gs8.51\lib;C:\Program Files\gs\gs8.51\bin
|
||||
echo %PATH% >> c:\temp.log
|
||||
|
||||
rem update wxwidgets (holds docs) and inno (cvs wxMSW module only)
|
||||
rem update wxwidgets (holds docs) and inno (cvs wxMSW setup.exe only)
|
||||
c:
|
||||
cd %WXWIN%
|
||||
cvs up -P -d
|
||||
|
||||
rem now inno
|
||||
cd \wx\inno\wxWidgets
|
||||
del c*.*
|
||||
if exist include\wx\msw\setup.h del include\wx\msw\setup.h
|
||||
if exist include\wx\univ\setup.h del include\wx\univ\setup.h
|
||||
cvs up -P
|
||||
dos2unix configure
|
||||
dos2unix config.guess
|
||||
dos2unix config.sub
|
||||
copy include\wx\msw\setup0.h include\wx\msw\setup.h
|
||||
copy include\wx\univ\setup0.h include\wx\univ\setup.h
|
||||
echo CVS update >> c:\temp.log
|
||||
|
||||
rem add bakefile build...
|
||||
|
43
configure.in
43
configure.in
@@ -35,7 +35,7 @@ dnl wx_release_number += 1
|
||||
wx_major_version_number=2
|
||||
wx_minor_version_number=8
|
||||
wx_release_number=0
|
||||
wx_subrelease_number=1
|
||||
wx_subrelease_number=2
|
||||
|
||||
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
|
||||
WX_VERSION=$WX_RELEASE.$wx_release_number
|
||||
@@ -4557,7 +4557,7 @@ if test "$ac_cv_func_snprintf" = "yes"; then
|
||||
int main (void)
|
||||
{
|
||||
char buffer[128];
|
||||
snprintf (buffer, 128, "%2\$d %3\$d %1\$d", 1, 2, 3);
|
||||
snprintf (buffer, 128, "%2$d %3$d %1$d", 1, 2, 3);
|
||||
if (strcmp ("2 3 1", buffer) == 0)
|
||||
exit (0);
|
||||
exit (1);
|
||||
@@ -6619,8 +6619,8 @@ if test "$wxUSE_IPC" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$wxUSE_DATAOBJ" = "yes"; then
|
||||
if test "$wxUSE_MGL" = 1; then
|
||||
AC_MSG_WARN([wxDataObject not yet supported under MGL... disabled])
|
||||
if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then
|
||||
AC_MSG_WARN([wxDataObject not yet supported under $TOOLKIT... disabled])
|
||||
wxUSE_DATAOBJ=no
|
||||
else
|
||||
AC_DEFINE(wxUSE_DATAOBJ)
|
||||
@@ -6632,8 +6632,8 @@ else
|
||||
fi
|
||||
|
||||
if test "$wxUSE_CLIPBOARD" = "yes"; then
|
||||
if test "$wxUSE_MGL" = 1; then
|
||||
AC_MSG_WARN([Clipboard not yet supported under MGL... disabled])
|
||||
if test "$wxUSE_MGL" = 1 -o "$wxUSE_DFB" = 1; then
|
||||
AC_MSG_WARN([Clipboard not yet supported under $TOOLKIT... disabled])
|
||||
wxUSE_CLIPBOARD=no
|
||||
fi
|
||||
|
||||
@@ -6650,18 +6650,9 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_MOTIF" = 1; then
|
||||
AC_MSG_WARN([Drag and drop not yet supported under Motif... disabled])
|
||||
wxUSE_DRAG_AND_DROP=no
|
||||
fi
|
||||
|
||||
if test "$wxUSE_X11" = 1; then
|
||||
AC_MSG_WARN([Drag and drop not yet supported under X11... disabled])
|
||||
wxUSE_DRAG_AND_DROP=no
|
||||
fi
|
||||
|
||||
if test "$wxUSE_MGL" = 1; then
|
||||
AC_MSG_WARN([Drag and drop not yet supported under MGL... disabled])
|
||||
if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_X11" = 1 -o "$wxUSE_MGL" = 1 -o \
|
||||
"$wxUSE_DFB" = 1; then
|
||||
AC_MSG_WARN([Drag and drop not yet supported under $TOOLKIT... disabled])
|
||||
wxUSE_DRAG_AND_DROP=no
|
||||
fi
|
||||
|
||||
@@ -6788,8 +6779,13 @@ if test "$wxUSE_FONTPICKERCTRL" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$wxUSE_DISPLAY" = "yes"; then
|
||||
AC_DEFINE(wxUSE_DISPLAY)
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS display multimon"
|
||||
if test "$wxUSE_DFB" = 1 -o "$wxUSE_MGL" = 1; then
|
||||
AC_MSG_WARN([wxDisplay not yet supported under $TOOLKIT... disabled])
|
||||
wxUSE_DISPLAY=no
|
||||
else
|
||||
AC_DEFINE(wxUSE_DISPLAY)
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS display multimon"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_DETECT_SM" = "yes"; then
|
||||
@@ -7156,7 +7152,12 @@ if test "$wxUSE_VALIDATORS" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$wxUSE_PALETTE" = "yes" ; then
|
||||
AC_DEFINE(wxUSE_PALETTE)
|
||||
if test "$wxUSE_DFB" = 1; then
|
||||
AC_MSG_WARN([wxPalette not yet supported under DFB... disabled])
|
||||
wxUSE_PALETTE=no
|
||||
else
|
||||
AC_DEFINE(wxUSE_PALETTE)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_MSLU" = "yes" ; then
|
||||
|
@@ -887,9 +887,7 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
|
||||
pMiniFrm->Create( &GetParentFrame(), wxID_ANY, pBar->mName,
|
||||
wxPoint( 50,50 ),
|
||||
wxSize ( 0, 0 ),
|
||||
wxFRAME_FLOAT_ON_PARENT |
|
||||
wxNO_BORDER |
|
||||
wxFRAME_NO_TASKBAR
|
||||
wxFRAME_TOOL_WINDOW | wxFRAME_FLOAT_ON_PARENT
|
||||
);
|
||||
|
||||
pMiniFrm->SetClient( pBar->mpBarWnd );
|
||||
|
8
debian/README.HowToBuild.txt
vendored
8
debian/README.HowToBuild.txt
vendored
@@ -149,6 +149,14 @@ When finished the binary and source packages will be left in the
|
||||
parent dir of the source tree.
|
||||
|
||||
|
||||
Automating the process
|
||||
----------------------
|
||||
|
||||
The script debian/build_all automates the above stepds and builds both
|
||||
wxWidgets and wxPython packages in both ANSI and Unicode modes. You should do
|
||||
the build manually at least the first time however to make sure you have all
|
||||
the prerequisites and the build doesn't fail.
|
||||
|
||||
|
||||
Other Sources of Information
|
||||
----------------------------
|
||||
|
49
debian/build_all
vendored
Executable file
49
debian/build_all
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
##############################################################################
|
||||
# Name: debian/build_all
|
||||
# Purpose: build both ANSI and Unicode Debian packages at once
|
||||
# Created: 2006-12-13
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
# Licence: wxWindows licence
|
||||
##############################################################################
|
||||
|
||||
# The following variables may be defined:
|
||||
# wx The wxWidgets root directory (if it's unset you have to run the
|
||||
# script from this directory)
|
||||
# debsrc_dir If set, suppose there are already debian sources in this dir
|
||||
|
||||
set -e
|
||||
wx_dir=${wx-`pwd`}
|
||||
if [ ! -f $wx_dir/debian/build_all ]; then
|
||||
echo "Please run the script from the root wx directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(
|
||||
if [ -z $debsrc_dir ]; then
|
||||
configure_dir=/tmp/wxtmp-$$
|
||||
|
||||
mkdir $configure_dir
|
||||
cd $configure_dir
|
||||
$wx_dir/configure --without-subdirs > /dev/null
|
||||
make debian-dist > /dev/null
|
||||
debsrc_dir=`grep 'DEBIAN_SOURCE_DIR =' Makefile | sed 's@.*/@@'`
|
||||
cd ..
|
||||
rm -rf $configure_dir
|
||||
fi
|
||||
|
||||
cd $wx_dir/../$debsrc_dir
|
||||
./debian/rules debian/control
|
||||
dpkg-buildpackage -rfakeroot > /dev/null
|
||||
|
||||
fakeroot ./debian/rules clean
|
||||
|
||||
sed -i '/^WX_UNICODE := /s/1/0/' debian/rules
|
||||
rm debian/control
|
||||
./debian/rules debian/control
|
||||
dpkg-buildpackage -rfakeroot > /dev/null
|
||||
|
||||
fakeroot ./debian/rules clean
|
||||
|
||||
) 2>&1 | tee $wx_dir/debian/build.log
|
8
debian/changelog
vendored
8
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
||||
wxwidgets2.8 (2.8.0.1-1) unstable; urgency=low
|
||||
|
||||
* No changes, just a different packager
|
||||
|
||||
-- Vadim Zeitlin <vadim@wxwindows.org> Dec, 13 Wed 2006 17:40:24 +0100
|
||||
|
||||
wxwidgets2.8 (2.8.0.1-0) unstable; urgency=low
|
||||
|
||||
* Add wxSearchCtrl
|
||||
@@ -52,7 +58,7 @@ wxwidgets2.7 (2.7.1.2-0) unstable; urgency=low
|
||||
wxwidgets2.7 (2.7.1.1-0) unstable; urgency=low
|
||||
|
||||
* First 2.7.x release from wxPython team.
|
||||
* Many enhancements, changes, fixes and updates. See
|
||||
* Many enhancements, changes, fixes and updates. See
|
||||
http://wxpython.org/CHANGES.txt for details.
|
||||
|
||||
-- Robin Dunn <robin@alldunn.com> Wed, 18 Oct 2006 17:09:53 -0700
|
||||
|
5
debian/wx-config.1
vendored
5
debian/wx-config.1
vendored
@@ -70,6 +70,11 @@ Output the wxWidgets version number in all its glory.
|
||||
.TP 15
|
||||
.B \-\-basename
|
||||
Output the base name of the wxWidgets libraries.
|
||||
.TP 15
|
||||
.B \-\-selected-config
|
||||
Output the signature of the selected wxWidgets library.
|
||||
This is a string of the form "port-unicode-release-version".
|
||||
|
||||
|
||||
.SS Feature options
|
||||
These options select features which determine which wxWidgets
|
||||
|
@@ -33,34 +33,6 @@
|
||||
|
||||
ScoreFile::ScoreFile(const wxString& appName)
|
||||
{
|
||||
#if 0
|
||||
wxString filename;
|
||||
m_configFilename << "/usr/local/share/" << appName << ".scores";
|
||||
if (access(m_configFilename, F_OK) == 0)
|
||||
{
|
||||
if (access(m_configFilename, R_OK | W_OK) != 0)
|
||||
{
|
||||
// file is not r/w - use local file instead
|
||||
m_configFilename = wxFileConfig::GetLocalFileName(appName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int fd = creat(m_configFilename, 0666);
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
// failed to create file - use local file instead
|
||||
m_configFilename = wxFileConfig::GetLocalFileName(appName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ensure created file has rw-rw-rw permissions
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
m_config = new wxConfig(appName, _T("wxWidgets"), appName, wxEmptyString,
|
||||
wxCONFIG_USE_LOCAL_FILE); // only local
|
||||
}
|
||||
@@ -68,11 +40,6 @@ ScoreFile::ScoreFile(const wxString& appName)
|
||||
ScoreFile::~ScoreFile()
|
||||
{
|
||||
delete m_config;
|
||||
#ifdef __WXGTK__
|
||||
// ensure score file has rw-rw-rw permissions
|
||||
// (wxFileConfig sets them to rw-------)
|
||||
chmod(m_configFilename, 0666);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ DOCDIR=${WX_TEMP_DIR}/wxWidgets/docs/
|
||||
CURDATE=`date -I`
|
||||
|
||||
# build info
|
||||
BUILD_VERSION=2.8.0-rc1
|
||||
BUILD_VERSION=2.8.1-rc1
|
||||
BUILD_TAG=HEAD
|
||||
|
||||
|
||||
|
@@ -37,56 +37,56 @@ fi
|
||||
getfilelist(){
|
||||
port=$1
|
||||
outfile=$2
|
||||
|
||||
|
||||
filelist="base.rsp"
|
||||
contribfiles="stc.rsp contrib.rsp ogl.rsp"
|
||||
utilsfiles="tex2rtf.rsp utils.rsp utilmake.rsp"
|
||||
commonfiles="generic.rsp jpeg.rsp tiff.rsp xml.rsp deprecated.rsp makefile.rsp $utilsfiles $contribfiles"
|
||||
|
||||
|
||||
if [ ! $port = "base" ]; then
|
||||
filelist="$filelist $commonfiles"
|
||||
fi
|
||||
|
||||
filelist="$filelist $commonfiles"
|
||||
fi
|
||||
|
||||
if [ $port = "msw" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist msw.rsp univ.rsp vc.rsp mmedia.rsp wince.rsp dmc.rsp"
|
||||
fi
|
||||
|
||||
|
||||
if [ $port = "os2" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist os2.rsp"
|
||||
fi
|
||||
|
||||
|
||||
if [ $port = "x11" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist x11.rsp"
|
||||
filelist="$filelist univ.rsp x11.rsp"
|
||||
fi
|
||||
|
||||
|
||||
if [ $port = "mgl" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist mgl.rsp"
|
||||
filelist="$filelist mgl.rsp"
|
||||
fi
|
||||
|
||||
|
||||
if [ $port = "gtk" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist gtk.rsp"
|
||||
fi
|
||||
|
||||
|
||||
if [ $port = "motif" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist motif.rsp"
|
||||
fi
|
||||
|
||||
|
||||
if [ $port = "mac" ] || [ $port = "all" ]; then
|
||||
filelist="$filelist mac.rsp cocoa.rsp"
|
||||
fi
|
||||
|
||||
|
||||
if [ $port = "all" ]; then
|
||||
filelist="$filelist gtk1.rsp palmos.rsp docsrc.rsp"
|
||||
fi
|
||||
|
||||
|
||||
tempfile="/tmp/wx$port.files.in"
|
||||
rm -f $outfile
|
||||
|
||||
|
||||
olddir=$PWD
|
||||
cd $MANIFESTDIR
|
||||
|
||||
|
||||
cat $filelist > $outfile
|
||||
|
||||
|
||||
cd $olddir
|
||||
}
|
||||
|
||||
@@ -94,12 +94,12 @@ copyfilelist(){
|
||||
FILELIST=$1
|
||||
APPDIR=$2
|
||||
DESTDIR=$3
|
||||
|
||||
|
||||
for line in `cat $FILELIST` ; do
|
||||
if [ "$line" != "" ]; then
|
||||
subdir=`dirname $line`
|
||||
mkdir -p $DESTDIR/$subdir
|
||||
cp -rf $APPDIR/$line $DESTDIR/$subdir
|
||||
cp -rf $APPDIR/$line $DESTDIR/$subdir
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -113,7 +113,7 @@ doinit()
|
||||
|
||||
dospinport(){
|
||||
port=$1
|
||||
|
||||
|
||||
case "$port" in
|
||||
all)
|
||||
portname="Widgets";;
|
||||
@@ -128,13 +128,13 @@ dospinport(){
|
||||
# upper-case version as they are abbreviations
|
||||
portname=`echo $port | tr '[a-z]' '[A-Z]'`;;
|
||||
esac
|
||||
|
||||
|
||||
echo "Creating wx$portname distribution..."
|
||||
|
||||
cd $APPDIR
|
||||
portfiles="/tmp/wx$port.files"
|
||||
getfilelist "$port" "$portfiles"
|
||||
|
||||
|
||||
TMPFILESDIR=/tmp/wx$port/wx$portname-$VERSION
|
||||
rm -rf $TMPFILESDIR
|
||||
mkdir -p $TMPFILESDIR
|
||||
@@ -164,7 +164,7 @@ dospinport(){
|
||||
popd
|
||||
rm -rf /tmp/wx$port
|
||||
rm ${portfiles}
|
||||
# rm /tmp/textfiles
|
||||
rm /tmp/textfiles
|
||||
}
|
||||
|
||||
prepareforrelease()
|
||||
@@ -174,7 +174,7 @@ prepareforrelease()
|
||||
cp $WEBFILES/site/faq*.htm $APPDIR/docs/html
|
||||
cp $WEBFILES/site/platform.htm $APPDIR/docs/html
|
||||
cp $WEBFILES/site/i18n.htm $APPDIR/docs/html
|
||||
|
||||
|
||||
echo Copying readme files...
|
||||
cp $APPDIR/docs/msw/readme.txt README-MSW.txt
|
||||
cp $APPDIR/docs/msw/install.txt INSTALL-MSW.txt
|
||||
@@ -201,7 +201,7 @@ prepareforrelease()
|
||||
|
||||
cp $APPDIR/docs/cocoa/readme.txt $APPDIR/readme-cocoa.txt
|
||||
cp $APPDIR/docs/cocoa/install.txt $APPDIR/install-cocoa.txt
|
||||
|
||||
|
||||
# Now delete a few files that are unnecessary
|
||||
rm -f BuildCVS.txt descrip.mms
|
||||
rm -f setup.h_vms
|
||||
@@ -210,16 +210,16 @@ prepareforrelease()
|
||||
rm -f src/mingegcs.bat
|
||||
# rm -f *.spec
|
||||
rm -f src/gtk/descrip.mms src/motif/descrip.mms
|
||||
|
||||
|
||||
# Copy setup0.h files to setup.h
|
||||
# OS/2 always built with configure now
|
||||
# cp $APPDIR/include/wx/os2/setup0.h $APPDIR/include/wx/os2/setup.h
|
||||
cp $APPDIR/include/wx/msw/setup0.h $APPDIR/include/wx/msw/setup.h
|
||||
cp $APPDIR/include/wx/univ/setup0.h $APPDIR/include/wx/univ/setup.h
|
||||
|
||||
|
||||
# Make MSW project files always have DOS line endings.
|
||||
unix2dos `cat $MANIFESTDIR/vc.rsp`
|
||||
|
||||
unix2dos `cat $MANIFESTDIR/vc.rsp`
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ fi
|
||||
|
||||
# Do wxAll spin
|
||||
if [ "$SPINWXALL" = "1" ] || [ "$SPINALL" = "1" ]; then
|
||||
dospinport "all"
|
||||
dospinport "all"
|
||||
fi
|
||||
|
||||
if [ "$SPINALL" = "1" ]; then
|
||||
|
@@ -14,6 +14,17 @@ if [ $# != 1 ]; then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# don't do configure; config.sub; config.guess
|
||||
if [ `basename $1` = "configure" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ `basename $1` = "config.sub" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ `basename $1` = "config.guess" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
entries=`dirname $1`/CVS/Entries
|
||||
if [ ! -f $entries ]; then
|
||||
echo "CVS entries file \"$entries\" not found." >&2
|
||||
|
@@ -118,8 +118,6 @@ include/wx/richtext/*.h
|
||||
include/wx/aui/*.h
|
||||
lib/dummy
|
||||
|
||||
tools/gettext/*.*
|
||||
|
||||
utils/*.bkl
|
||||
utils/make*.*
|
||||
utils/configure
|
||||
|
@@ -3,6 +3,8 @@ readme-mac.txt
|
||||
|
||||
lib/dummy
|
||||
|
||||
distrib/mac/pbsetup-sh
|
||||
|
||||
docs/licence.txt
|
||||
docs/mac/*.txt
|
||||
docs/mac/*.hqx
|
||||
|
@@ -16,9 +16,6 @@ docs/wine/COPYING.LIB
|
||||
docs/microwin/readme.txt
|
||||
docs/microwin/microwindows.patches
|
||||
|
||||
tools/gettext/*.exe
|
||||
tools/gettext/*.sed
|
||||
|
||||
src/cwcopysetup.bat
|
||||
src/cwdcopysetup.bat
|
||||
src/common/*.rc
|
||||
|
@@ -125,8 +125,6 @@ include/wx/html/msw/*.ico
|
||||
include/wx/html/msw/*.rc
|
||||
lib/dummy
|
||||
|
||||
tools/gettext/*.*
|
||||
|
||||
bitmaps/xpm/16x16/*.*
|
||||
bitmaps/xpm/32x32/*.*
|
||||
bitmaps/xpm/64x64/*.*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
include/msvc/wx/setup.h
|
||||
|
||||
build/msw/*.dsp
|
||||
build/msw/*.dsw
|
||||
|
||||
|
@@ -21,13 +21,6 @@ docs/x11/makewxx11
|
||||
|
||||
lib/dummy
|
||||
|
||||
mobile/configure
|
||||
mobile/configure.in
|
||||
mobile/Makefile.in
|
||||
mobile/wxedit/Makefile.in
|
||||
mobile/wxedit/*.cpp
|
||||
mobile/wxedit/*.h
|
||||
|
||||
misc/afm/*.afm
|
||||
misc/gs_afm/*.afm
|
||||
|
||||
|
@@ -131,7 +131,7 @@ else
|
||||
cp $g $START_DIR/$DIST_DIR/readme-`echo $g | sed -e "s|${DOCDIR}||g" | sed -e "s|msw/wince|wince|g" | sed -e "s|/readme.txt||g"`-${BUILD_VERSION}.txt
|
||||
done
|
||||
# Rename double readme
|
||||
mv $START_DIR/$DIST_DIR/readme-readme-${BUILD_VERSION}.txt $START_DIR/$DIST_DIR/readme-${BUILD_VERSION}.txt
|
||||
mv $START_DIR/$DIST_DIR/readme-readme.txt-${BUILD_VERSION}.txt $START_DIR/$DIST_DIR/readme-${BUILD_VERSION}.txt
|
||||
## copy files ...
|
||||
mkdir ${FTPDIR}/
|
||||
cp $START_DIR/$DIST_DIR/* ${FTPDIR}/
|
||||
|
@@ -68,7 +68,8 @@ Deprecated methods since 2.6.x and their replacements
|
||||
wxFS_SEEKABLE flags is deprecated. You can still seek, but use the flag.
|
||||
- Constructor wxZipInputStream(const wxString& archive, const wxString& file)
|
||||
deprecated in favour of wxFileSystem (other zip ctors are not deprecated).
|
||||
|
||||
- wx{Dir|File}Dialog::{Set|Get}Style deprecated in favour of the generic
|
||||
wxWindow::{Set|Get}WindowStyle()
|
||||
|
||||
|
||||
Major new features in 2.8 release
|
||||
@@ -87,6 +88,27 @@ Major new features in 2.8 release
|
||||
wxSearchCtrl, wxAboutBox, wxTreebook, tar streams.
|
||||
|
||||
|
||||
2.8.1
|
||||
-----
|
||||
|
||||
All:
|
||||
|
||||
- Fix compilation with wxUSE_STL=1
|
||||
- wxGrid::GetBestSize() returns same size the grid would have after AutoSize()
|
||||
|
||||
wxMSW:
|
||||
|
||||
- Fixed compilation with Borland C++ in Unicode mode but without MSLU
|
||||
|
||||
wxGTK:
|
||||
|
||||
- Don't crash if command line is not valid UTF-8 (Unicode build only)
|
||||
|
||||
wxUniv:
|
||||
|
||||
- It is now possible to set background colour of wxStaticText
|
||||
|
||||
|
||||
2.8.0
|
||||
-----
|
||||
|
||||
@@ -126,7 +148,7 @@ All:
|
||||
- Added wxFilterFSHandler and wxArchiveFSHandler.
|
||||
- Added wxString::ToLongLong() and ToULongLong().
|
||||
|
||||
All (GUI):
|
||||
All (GUI):
|
||||
|
||||
- wxMemoryDC constructor now optionally accepts a wxBitmap parameter,
|
||||
calling SelectObject itself if a valid bitmap is passed.
|
||||
|
@@ -28,11 +28,7 @@ wxWidgets features that don't work in wxDFB yet:
|
||||
|
||||
$ ./configure --with-directfb \
|
||||
--with-themes=mono \
|
||||
--disable-sockets \
|
||||
--disable-accel \
|
||||
--disable-display \
|
||||
--disable-palette \
|
||||
--disable-dataobj \
|
||||
--disable-popupwin \
|
||||
--disable-help \
|
||||
--disable-combobox \
|
||||
|
@@ -125,7 +125,7 @@ enum wxAuiManagerOption
|
||||
|
||||
\func{}{wxAuiManager}{\param{wxWindow* }{managed\_wnd = NULL}, \param{unsigned int }{flags = wxAUI\_MGR\_DEFAULT}}
|
||||
|
||||
Constructor. \arg{frame} specifies the wxFrame which should be managed.
|
||||
Constructor. \arg{managed\_wnd} specifies the wxFrame which should be managed.
|
||||
\arg{flags} specifies options which allow the frame management behavior
|
||||
to be modified.
|
||||
|
||||
@@ -166,9 +166,11 @@ Returns the current art provider being used.
|
||||
|
||||
See also: \helpref{wxAuiDockArt}{wxauidockart}.
|
||||
|
||||
\membersection{wxAuiManager::GetDockSizeConstraint}\label{wxauimanagergetdocksizeconstraint}
|
||||
|
||||
\func{void}{GetDockSizeConstraint}{\param{double* }{widthpct}, \param{double* }{heightpct}}
|
||||
|
||||
Returns the current dock constraint values. See SetDockSizeConstraint() for more information.
|
||||
Returns the current dock constraint values. See \helpref{SetDockSizeConstraint()}{wxauimanagersetdocksizeconstraint} for more information.
|
||||
|
||||
\membersection{wxAuiManager::GetFlags}\label{wxauimanagergetflags}
|
||||
|
||||
@@ -182,6 +184,8 @@ Returns the current manager's flags.
|
||||
|
||||
Returns the frame currently being managed by wxAuiManager.
|
||||
|
||||
\membersection{wxAuiManager::GetManager}\label{wxauimanagergetmanager}
|
||||
|
||||
\func{static wxAuiManager*}{GetManager}{\param{wxWindow* }{window}}
|
||||
|
||||
Calling this method will return the wxAuiManager for a given window. The \arg{window} parameter should
|
||||
@@ -269,6 +273,8 @@ will be deleted by wxAuiManager.
|
||||
|
||||
See also: \helpref{wxAuiDockArt}{wxauidockart}.
|
||||
|
||||
\membersection{wxAuiManager::SetDockSizeConstraint}\label{wxauimanagersetdocksizeconstraint}
|
||||
|
||||
\func{void}{SetDockSizeConstraint}{\param{double }{widthpct}, \param{double }{heightpct}}
|
||||
|
||||
When a user creates a new dock by dragging a window into a docked position, often times the large size of the
|
||||
|
@@ -188,3 +188,12 @@ Sets the current filter index (zero-based).
|
||||
|
||||
Sets the current path.
|
||||
|
||||
\membersection{wxGenericDirCtrl::ShowHidden}\label{wxgenericdirctrlShowHidden}
|
||||
|
||||
\func{void}{ShowHidden}{\param{bool }{show}}
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{show}{If true, hidden folders and files will be displayed by the
|
||||
control. If false, they will not be displayed.}
|
||||
|
||||
|
@@ -71,6 +71,7 @@ enum wxDirTraverseResult
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxDirTraverser::OnDir}\label{wxdirtraverserondir}
|
||||
|
||||
\func{virtual wxDirTraverseResult}{OnDir}{\param{const wxString\& }{dirname}}
|
||||
@@ -82,6 +83,7 @@ subdirectories in this directory.
|
||||
|
||||
This is a pure virtual function and must be implemented in the derived class.
|
||||
|
||||
|
||||
\membersection{wxDirTraverser::OnFile}\label{wxdirtraverseronfile}
|
||||
|
||||
\func{virtual wxDirTraverseResult}{OnFile}{\param{const wxString\& }{filename}}
|
||||
@@ -92,9 +94,10 @@ traversing (for example, if the file being searched is found) or
|
||||
|
||||
This is a pure virtual function and must be implemented in the derived class.
|
||||
|
||||
\membersection{wxOpenErrorTraverser::OnOpenError}\label{wxopenerrortraverseronopenerror}
|
||||
|
||||
\func{virtual wxOpenErrorTraverseResult}{OnOpenError}{\param{const wxString\& }{openerrorname}}
|
||||
\membersection{wxDirTraverser::OnOpenError}\label{wxopenerrortraverseronopenerror}
|
||||
|
||||
\func{virtual wxDirTraverseResult}{OnOpenError}{\param{const wxString\& }{openerrorname}}
|
||||
|
||||
This function is called for each directory which we failed to open for
|
||||
enumerating. It may return {\tt wxSIR\_STOP} to abort traversing completely,
|
||||
|
@@ -142,6 +142,8 @@ You can initialize a wxFileName instance using one of the following functions:
|
||||
\helpref{AssignDir}{wxfilenameassigndir}\\
|
||||
\helpref{AssignHomeDir}{wxfilenameassignhomedir}\\
|
||||
\helpref{AssignHomeTempFileName}{wxfilenameassigntempfilename}\\
|
||||
\helpref{DirName}{wxfilenamedirname}\\
|
||||
\helpref{FileName}{wxfilenamefilename}\\
|
||||
\helpref{operator $=$}{wxfilenameoperatorassign}
|
||||
|
||||
|
||||
|
@@ -996,7 +996,8 @@ Returns true if the file exists and is a plain file.
|
||||
|
||||
Returns time of last modification of given file.
|
||||
|
||||
The return value is $0$ if an error occured (e.g. file not found).
|
||||
The function returns \texttt{(time\_t)}$-1$ if an error occurred (e.g. file not
|
||||
found).
|
||||
|
||||
|
||||
\membersection{::wxFileNameFromPath}\label{wxfilenamefrompath}
|
||||
@@ -1273,6 +1274,11 @@ Removes the directory {\it dir}, returning true if successful. Does not work und
|
||||
|
||||
The {\it flags} parameter is reserved for future use.
|
||||
|
||||
Please notice that there is also a wxRmDir() function which simply wraps the
|
||||
standard POSIX rmdir() function and so return an integer error code instead of
|
||||
a boolean value (but otherwise is currently identical to wxRmdir), don't
|
||||
confuse these two functions.
|
||||
|
||||
|
||||
\membersection{::wxSetWorkingDirectory}\label{wxsetworkingdirectory}
|
||||
|
||||
|
@@ -40,8 +40,9 @@ in \helpref{wxListEvent}{wxlistevent}.
|
||||
|
||||
{\bf Mac Note:} Starting with 2.8, wxListCtrl uses a native implementation for
|
||||
report mode, and uses a generic implementation for other modes. You can use the
|
||||
generic implementation for report mode as well by setting the
|
||||
mac.listctrl.always_use_generic \helpref{wxSystemOption}{wxsystemoptions} to 1.
|
||||
generic implementation for report mode as well by setting the
|
||||
mac.listctrl.always\_use\_generic \helpref{wxSystemOption}{wxsystemoptions} to
|
||||
1.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
|
@@ -176,9 +176,9 @@ Return the directory where the loadable modules (plugins) live.
|
||||
|
||||
Example return values:
|
||||
\begin{itemize}
|
||||
\item Unix: \texttt{\textit{prefix}/share/\textit{appname}}
|
||||
\item Windows: the directory where the executable file is located
|
||||
\item Mac: \texttt{\textit{appname}.app/Contents/Resources} bundle subdirectory
|
||||
\item Unix: \texttt{\textit{prefix}/lib/\textit{appname}}
|
||||
\item Windows: the directory of the executable file
|
||||
\item Mac: \texttt{\textit{appname}.app/Contents/PlugIns} bundle subdirectory
|
||||
\end{itemize}
|
||||
|
||||
\wxheading{See also}
|
||||
@@ -199,9 +199,9 @@ all platforms except Mac OS X.
|
||||
|
||||
Example return values:
|
||||
\begin{itemize}
|
||||
\item Unix: \texttt{\textit{prefix}/lib/\textit{appname}}
|
||||
\item Windows: the directory of the executable file
|
||||
\item Mac: \texttt{\textit{appname}.app/Contents/PlugIns} bundle subdirectory
|
||||
\item Unix: \texttt{\textit{prefix}/share/\textit{appname}}
|
||||
\item Windows: the directory where the executable file is located
|
||||
\item Mac: \texttt{\textit{appname}.app/Contents/Resources} bundle subdirectory
|
||||
\end{itemize}
|
||||
|
||||
\newsince{2.7.0}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
Class: \helpref{wxAuiManager}{wxauimanager}, \helpref{wxAuiPaneInfo}{wxauipaneinfo}
|
||||
|
||||
wxAUI stands for Advances User Interface and the wxAUI framework
|
||||
wxAUI stands for Advanced User Interface and the wxAUI framework
|
||||
aims to give its user a cutting edge interface for use with the
|
||||
wxWidgets based applications. The original wxAUI sources have
|
||||
kindly been made available under the wxWindows licence
|
||||
|
@@ -64,7 +64,9 @@ and copy constructors since they are reference-counted:
|
||||
\helpref{wxPalette}{wxpalette}\\
|
||||
\helpref{wxPen}{wxpen}\\
|
||||
\helpref{wxRegion}{wxregion}\\
|
||||
\helpref{wxString}{wxstring}
|
||||
\helpref{wxString}{wxstring}\\
|
||||
\helpref{wxVariant}{wxvariant}\\
|
||||
\helpref{wxVariantData}{wxvariantdata}
|
||||
|
||||
Note that the list above reports the objects which are reference-counted in all ports of
|
||||
wxWidgets; some ports may use this tecnique also for other classes.
|
||||
|
@@ -34,12 +34,12 @@ for different data types, or a remote procedure call protocol.
|
||||
An optional name member is associated with a wxVariant. This might be used, for example,
|
||||
in CORBA or OLE automation classes, where named parameters are required.
|
||||
|
||||
Note that as of wxWidgets 2.7.1, wxVariant is reference counted. Additionally, the
|
||||
conveniance macros {\bf DECLARE\_VARIANT\_OBJECT} and {\bf IMPLEMENT\_VARIANT\_OBJECT}
|
||||
were added so that adding (limited) support for conversion to and from wxVariant
|
||||
can be very easily implemented without modifiying either wxVariant or the class
|
||||
to be stored by wxVariant. Since assignement operators cannot be declared outside
|
||||
the class, the shift left operators are used like this:
|
||||
Note that as of wxWidgets 2.7.1, wxVariant is \helpref{reference counted}{trefcount}.
|
||||
Additionally, the convenience macros {\bf DECLARE\_VARIANT\_OBJECT} and
|
||||
{\bf IMPLEMENT\_VARIANT\_OBJECT} were added so that adding (limited) support
|
||||
for conversion to and from wxVariant can be very easily implemented without modifying
|
||||
either wxVariant or the class to be stored by wxVariant. Since assignment operators
|
||||
cannot be declared outside the class, the shift left operators are used like this:
|
||||
|
||||
\begin{verbatim}
|
||||
// in the header file
|
||||
@@ -94,7 +94,7 @@ Default constructor.
|
||||
|
||||
\func{}{wxVariant}{\param{const wxVariant\& }{variant}}
|
||||
|
||||
Copy constructor.
|
||||
Copy constructor, uses \helpref{reference counting}{trefcount}.
|
||||
|
||||
\func{}{wxVariant}{\param{const wxChar*}{ value}, \param{const wxString\& }{name = ``"}}
|
||||
|
||||
@@ -165,6 +165,7 @@ Destructor.
|
||||
|
||||
Note that destructor is protected, so wxVariantData cannot usually
|
||||
be deleted. Instead, \helpref{DecRef}{wxvariantdatadecref} should be called.
|
||||
See \helpref{reference-counted object destruction}{refcountdestruct} for more info.
|
||||
|
||||
|
||||
\membersection{wxVariant::Append}\label{wxvariantappend}
|
||||
@@ -382,7 +383,7 @@ Sets the internal variant data, deleting the existing data if there is any.
|
||||
|
||||
\func{void}{operator $=$}{\param{const TIMESTAMP\_STRUCT* }{value}}
|
||||
|
||||
Assignment operators.
|
||||
Assignment operators, using \helpref{reference counting}{trefcount} when possible.
|
||||
|
||||
\membersection{wxVariant::operator $==$}\label{wxvarianteq}
|
||||
|
||||
@@ -485,13 +486,18 @@ Operator for implicit conversion to a pointer to a void, using \helpref{wxVarian
|
||||
|
||||
Operator for implicit conversion to a pointer to a \helpref{wxDateTime}{wxdatetime}, using \helpref{wxVariant::GetDateTime}{wxvariantgetdatetime}.
|
||||
|
||||
|
||||
|
||||
%% wxVariantData
|
||||
|
||||
|
||||
\section{\class{wxVariantData}}\label{wxvariantdata}
|
||||
|
||||
The {\bf wxVariantData} is used to implement a new type for wxVariant. Derive from wxVariantData,
|
||||
and override the pure virtual functions.
|
||||
The {\bf wxVariantData} class is used to implement a new type for \helpref{wxVariant}{wxvariant}.
|
||||
Derive from wxVariantData, and override the pure virtual functions.
|
||||
|
||||
wxVariantData is reference counted, but you don't normally have to care about this, as
|
||||
wxVariant manages the count automatically. However, incase your application needs to take
|
||||
wxVariantData is \helpref{reference counted}{refcount}, but you don't normally have to care about this,
|
||||
as wxVariant manages the count automatically. However, in case your application needs to take
|
||||
ownership of wxVariantData, be aware that the object is created with reference count of 1,
|
||||
and passing it to wxVariant will not increase this. In other words, \helpref{IncRef}{wxvariantdataincref}
|
||||
needs to be called only if you both take ownership of wxVariantData and pass it to a wxVariant.
|
||||
@@ -527,7 +533,9 @@ Decreases reference count. If the count reaches zero, the object is
|
||||
automatically deleted.
|
||||
|
||||
Note that destructor of wxVariantData is protected, so delete
|
||||
cannot be used as normal. Instead, DecRef should be called.
|
||||
cannot be used as normal. Instead, \helpref{DecRef}{wxvariantdatadecref} should be called.
|
||||
|
||||
|
||||
|
||||
\membersection{wxVariantData::Eq}\label{wxvariantdataeq}
|
||||
|
||||
|
@@ -79,21 +79,21 @@ build ('d'). Last component of them name is name of wxWidgets component
|
||||
"Configuring the build" below). This is a typical set of release ANSI build
|
||||
libraries (release versions on left, debug on right side):
|
||||
|
||||
wxbase25.lib wxbase25d.lib
|
||||
wxbase25_net.lib wxbase25d_net.lib
|
||||
wxbase25_xml.lib wxbase25d_xml.lib
|
||||
wxmsw25_core.lib wxmsw25d_core.lib
|
||||
wxmsw25_html.lib wxmsw25d_html.lib
|
||||
wxmsw25_adv.lib wxmsw25d_adv.lib
|
||||
wxbase28.lib wxbase28d.lib
|
||||
wxbase28_net.lib wxbase28d_net.lib
|
||||
wxbase28_xml.lib wxbase28d_xml.lib
|
||||
wxmsw28_core.lib wxmsw28d_core.lib
|
||||
wxmsw28_html.lib wxmsw28d_html.lib
|
||||
wxmsw28_adv.lib wxmsw28d_adv.lib
|
||||
|
||||
Their Unicode debug counterparts in wxUniversal build would be
|
||||
|
||||
wxbase25ud.lib
|
||||
wxbase25ud_net.lib
|
||||
wxbase25ud_xml.lib (notice these libs are same for wxUniv and wxMSW)
|
||||
wxmswuniv25ud_core.lib
|
||||
wxmswuniv25ud_html.lib
|
||||
wxmswuniv25ud_adv.lib
|
||||
wxbase28ud.lib
|
||||
wxbase28ud_net.lib
|
||||
wxbase28ud_xml.lib (notice these libs are same for wxUniv and wxMSW)
|
||||
wxmswuniv28ud_core.lib
|
||||
wxmswuniv28ud_html.lib
|
||||
wxmswuniv28ud_adv.lib
|
||||
|
||||
These directories also contain subdirectory with wx/setup.h header. This
|
||||
subdirectory is named after port, Unicode, wxUniv and debug settings and
|
||||
@@ -714,7 +714,7 @@ USE_GUI=0
|
||||
you should set wxUSE_GUI to 1 in setup.h.
|
||||
|
||||
USE_OPENGL=1
|
||||
Build wxmsw25_gl.lib library with OpenGL integration class wxGLCanvas.
|
||||
Build wxmsw28_gl.lib library with OpenGL integration class wxGLCanvas.
|
||||
You must also modify your setup.h to #define wxUSE_GLCANVAS 1. Note that
|
||||
OpenGL library is always built as additional library, even in monolithic
|
||||
build!
|
||||
@@ -766,9 +766,9 @@ VENDOR=<your company name>
|
||||
distribute wxWidgets DLLs with your application. Default value is 'custom'.
|
||||
This string is included as part of DLL name. wxWidgets DLLs contain compiler
|
||||
name, version information and vendor name in them. For example
|
||||
wxmsw250_core_bcc_custom.dll is one of DLLs build using Borland C++ with
|
||||
wxmsw280_core_bcc_custom.dll is one of DLLs build using Borland C++ with
|
||||
default settings. If you set VENDOR=mycorp, the name will change to
|
||||
wxmsw250_core_bcc_mycorp.dll.
|
||||
wxmsw280_core_bcc_mycorp.dll.
|
||||
|
||||
CFG=<configuration name>
|
||||
Sets configuration name so that you can have multiple wxWidgets builds with
|
||||
|
@@ -1,9 +1,9 @@
|
||||
Binary Compatability and wxWidgets
|
||||
Binary Compatibility and wxWidgets
|
||||
==================================
|
||||
0. Purpose
|
||||
----------
|
||||
|
||||
This is broad technote covering all aspects of binary compatability with
|
||||
This is broad technote covering all aspects of binary compatibility with
|
||||
wxWidgets.
|
||||
|
||||
1. Releases
|
||||
@@ -21,38 +21,64 @@ Major Minor Release
|
||||
|
||||
(I.E. Major.Minor.Release).
|
||||
|
||||
All Release versions where the Minor is EVEN (2.4.x,2.6.x
|
||||
etc. ODD minors are development versions) are expected to be binary
|
||||
compatable. Note that this means FORWARD binary compatability only -
|
||||
new methods to classes are ok as long as they arn't virtual, etc.
|
||||
All versions with EVEN minor version component (e.g. 2.4.x, 2.6.x etc.)
|
||||
are expected to be binary compatible (ODD minors are development versions
|
||||
and the compatibility constraints don't apply to them). Note that by
|
||||
preserving binary compatibility we mean BACKWARDS compatibility only,
|
||||
meaning that applications built with old wxWidgets headers should continue
|
||||
to work with new wxWidgets (shared/dynamic) libraries without the need to
|
||||
rebuild. There is no requirement to preserve compatibility in the other
|
||||
direction (i.e. make new headers compatible with old libraries) as this
|
||||
would preclude any additions whatsoever to the stable branch. But see
|
||||
also section (4).
|
||||
|
||||
2. What kind of changes are NOT binary compatable
|
||||
|
||||
2. What kind of changes are NOT binary compatible
|
||||
-------------------------------------------------
|
||||
|
||||
If its still up, the KDE guide is a good reference:
|
||||
http://developer.kde.org/documentation/other/binarycompatibility.html
|
||||
|
||||
The changes that are NOT binary compatable:
|
||||
The changes that are NOT binary compatible:
|
||||
- Adding a virtual function
|
||||
- Changing the name of a any function or variable
|
||||
- Changing the signature of a virtual function (adding a parameter,
|
||||
even a default one)
|
||||
- Changing the order of the virtual functions in a class
|
||||
["switching" them, etc.]
|
||||
- Changing access privalages to a function (protected to private etc.)
|
||||
- Changing access privileges to a function (protected to private etc.)
|
||||
[unlike KDE we need to support windows so this is not allowed]
|
||||
- Adding a member variable
|
||||
- Changing the order of non-static member variables
|
||||
|
||||
|
||||
3. wxABI_VERSION and BACKWARD binary compatability
|
||||
3. Changes which are compatible
|
||||
-------------------------------
|
||||
|
||||
- Adding a new class
|
||||
- Adding a new non-virtual method to an existing class
|
||||
- Overriding the implementation of an existing virtual function
|
||||
[this is considered to be backwards binary compatible until we find a
|
||||
counter example; currently it's known to work with Apple gcc at least]
|
||||
- Anything which doesn't result in ABI change at all, e.g. adding new
|
||||
macros, constants and, of course, private changes in the implementation
|
||||
|
||||
|
||||
4. wxABI_VERSION and "forward" binary compatibility
|
||||
--------------------------------------------------
|
||||
|
||||
As mentioned we do not support BACKWARD binary compatability.
|
||||
As mentioned we do not support "forward" binary compatibility, that is the
|
||||
ability to run applications compiled with new wxWidgets headers on systems
|
||||
with old wxWidgets libraries.
|
||||
|
||||
However, for this purpose we have the macro wxABI_VERSION. All
|
||||
new symbols added to binary compatable releases are to be ifed
|
||||
with wxABI_VERSION.
|
||||
However, for the developers who want to ensure that their application works
|
||||
with some fixed old wxWidgets version and doesn't (inadvertently) require
|
||||
features added in later releases, we provide the macro wxABI_VERSION which
|
||||
can be defined to restrict the API exported by wxWidgets headers to that of
|
||||
a fixed old release.
|
||||
|
||||
For this to work, all new symbols added to binary compatible releases must
|
||||
be #if'ed with wxABI_VERSION.
|
||||
|
||||
The layout of wxABI_VERSION is as follows:
|
||||
|
||||
@@ -63,7 +89,7 @@ where
|
||||
2 06 02
|
||||
Major Minor Release
|
||||
|
||||
I.E. it corresponds to the wxWidgets release in {1}.
|
||||
I.E. it corresponds to the wxWidgets release in (1).
|
||||
|
||||
An example of using wxABI_VERSION is as follows for symbols
|
||||
only in a 2.6.2 release:
|
||||
@@ -86,10 +112,10 @@ bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy)
|
||||
#endif
|
||||
|
||||
|
||||
4. Workarounds for adding virtual functions
|
||||
5. Workarounds for adding virtual functions
|
||||
-------------------------------------------
|
||||
|
||||
Originally the idea for adding virtual functions to binary compatable
|
||||
Originally the idea for adding virtual functions to binary compatible
|
||||
releases was to pad out some empty "reserved" functions and then
|
||||
rename those later when someone needed to add a virtual function.
|
||||
|
||||
@@ -115,7 +141,7 @@ is a wxShadowObjectMethod which is a typedef:
|
||||
typedef int (*wxShadowObjectMethod)(void*, void*);
|
||||
|
||||
After you add a field, you can set it via SetField with the same
|
||||
params as AddField, the second param being the value to set
|
||||
parameters as AddField, the second parameter being the value to set
|
||||
the field to. You can get the field after you call AddField
|
||||
via GetField, with the parameters as the other two field functions,
|
||||
only in the case the second parameter is the fallback
|
||||
@@ -130,11 +156,11 @@ parameter passed to the wxShadowObjectMethod, the third is the
|
||||
second parameter passed to that wxShadowObjectMethod, and the
|
||||
fourth is the return value of the wxShadowObjectMethod.
|
||||
|
||||
5. version-script.in
|
||||
6. version-script.in
|
||||
--------------------
|
||||
|
||||
For ld/libtool we use sun-style version scripts. Basically
|
||||
anything which fits the conditions of being ifed via wxABI_VERSION
|
||||
anything which fits the conditions of being #if'ed via wxABI_VERSION
|
||||
needs to go here also.
|
||||
|
||||
See 'info ld scripts version' on a GNU system, it's online here:
|
||||
@@ -175,8 +201,8 @@ For example for wxLogBuffer a line like this:
|
||||
*wxLogBuffer*;
|
||||
|
||||
|
||||
5.5. Checking the version information in libraries and programs
|
||||
---------------------------------------------------------------
|
||||
7. Checking the version information in libraries and programs
|
||||
-------------------------------------------------------------
|
||||
|
||||
On Sun there is a tool for this, see pvs(1). On GNU you can use objdump, below
|
||||
are some examples.
|
||||
@@ -226,18 +252,18 @@ $ objdump -T libwx_based-2.6.so | grep 'WXD_2\.6\.2' | grep -v 'UND\|ABS'
|
||||
00000000000abe10 g DF .text 0000000000000088 WXD_2.6.2 _ZN14wxZipFSHandler7CleanupEv
|
||||
|
||||
|
||||
6. Testing binary compatability between releases
|
||||
8. Testing binary compatibility between releases
|
||||
------------------------------------------------
|
||||
|
||||
An easy way of testing binary compatability is just to build wxWidgets
|
||||
An easy way of testing binary compatibility is just to build wxWidgets
|
||||
in dll/dynamic library mode and then switch out the current library
|
||||
in question with an earlier stable version of the library, then running
|
||||
the application in question again. If it runs OK then there is usually
|
||||
binary compatability between those releases.
|
||||
binary compatibility between those releases.
|
||||
|
||||
You can also break into your debugger or whatever program you want
|
||||
to use and check the memory layout of the class. If it is the same
|
||||
then it is binary compatable.
|
||||
then it is binary compatible.
|
||||
|
||||
Also remember to look at http://www.wxwidgets.org/bincompat.html page which
|
||||
summarizes the results of testing of all the samples built against old
|
||||
|
@@ -530,7 +530,11 @@ public:
|
||||
int GetSelection() const;
|
||||
|
||||
virtual void Split(size_t page, int direction);
|
||||
|
||||
|
||||
#if wxABI_VERSION >= 20801
|
||||
const wxAuiManager& GetAuiManager() const { return m_mgr; }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
// these can be overridden
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
virtual bool ProcessEvent(wxEvent& event);
|
||||
|
||||
wxAuiMDIChildFrame *GetActiveChild() const;
|
||||
inline void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
|
||||
void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
|
||||
|
||||
wxAuiMDIClientWindow *GetClientWindow() const;
|
||||
virtual wxAuiMDIClientWindow *OnCreateClient();
|
||||
|
@@ -1928,7 +1928,9 @@ inline wxLongLong wxTimeSpan::GetSeconds() const
|
||||
|
||||
inline int wxTimeSpan::GetMinutes() const
|
||||
{
|
||||
return (GetSeconds() / 60l).GetLo();
|
||||
// explicit cast to int suppresses a warning with CodeWarrior and possibly
|
||||
// others (changing the return type to long from int is impossible in 2.8)
|
||||
return (int)((GetSeconds() / 60l).GetLo());
|
||||
}
|
||||
|
||||
inline int wxTimeSpan::GetHours() const
|
||||
|
@@ -31,6 +31,10 @@ public:
|
||||
// returns DirectFB event buffer used by wx
|
||||
static wxIDirectFBEventBufferPtr GetDirectFBEventBuffer();
|
||||
|
||||
// wxYield implementation: iterate the loop as long as there are any
|
||||
// pending events
|
||||
void Yield();
|
||||
|
||||
protected:
|
||||
virtual void WakeUp();
|
||||
virtual void OnNextIteration();
|
||||
|
@@ -73,6 +73,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
wxDEPRECATED( long GetStyle() const );
|
||||
wxDEPRECATED( void SetStyle(long style) );
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
virtual void SetMessage(const wxString& message) { m_message = message; }
|
||||
virtual void SetPath(const wxString& path) { m_path = path; }
|
||||
|
@@ -129,6 +129,14 @@ public:
|
||||
wxArrayString& filters) );
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
wxDEPRECATED( long GetStyle() const );
|
||||
wxDEPRECATED( void SetStyle(long style) );
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
|
||||
// Append first extension to filePath from a ';' separated extensionList
|
||||
// if filePath = "path/foo.bar" just return it as is
|
||||
// if filePath = "foo[.]" and extensionList = "*.jpg;*.png" return "foo.jpg"
|
||||
|
@@ -295,8 +295,8 @@ enum wxFileKind
|
||||
#define wxOpen _wopen
|
||||
#endif
|
||||
#define wxAccess _waccess
|
||||
#define wxMkDir _mkdir
|
||||
#define wxRmDir _rmdir
|
||||
#define wxMkDir _wmkdir
|
||||
#define wxRmDir _wrmdir
|
||||
#ifdef wxHAS_HUGE_FILES
|
||||
#define wxStat _wstati64
|
||||
#else
|
||||
|
@@ -157,6 +157,9 @@ enum wxStockCursor
|
||||
#elif defined(__WXMGL__)
|
||||
// Initialize from an included XPM
|
||||
#define wxICON(X) wxIcon( (const char**) X##_xpm )
|
||||
#elif defined(__WXDFB__)
|
||||
// Initialize from an included XPM
|
||||
#define wxICON(X) wxIcon( (const char**) X##_xpm )
|
||||
#elif defined(__WXGTK__)
|
||||
// Initialize from an included XPM
|
||||
#define wxICON(X) wxIcon( (const char**) X##_xpm )
|
||||
@@ -185,6 +188,7 @@ enum wxStockCursor
|
||||
defined(__WXX11__) || \
|
||||
defined(__WXMAC__) || \
|
||||
defined(__WXMGL__) || \
|
||||
defined(__WXDFB__) || \
|
||||
defined(__WXCOCOA__)
|
||||
// Initialize from an included XPM
|
||||
#define wxBITMAP(name) wxBitmap( (const char**) name##_xpm )
|
||||
@@ -483,7 +487,7 @@ public:
|
||||
};
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
inline bool wxRect::Inside(int x, int y) const { return Contains(x, y); }
|
||||
inline bool wxRect::Inside(int cx, int cy) const { return Contains(cx, cy); }
|
||||
inline bool wxRect::Inside(const wxPoint& pt) const { return Contains(pt); }
|
||||
inline bool wxRect::Inside(const wxRect& rect) const { return Contains(rect); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
@@ -9,8 +9,8 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __SPLITTERH_G__
|
||||
#define __SPLITTERH_G__
|
||||
#ifndef _WX_GENERIC_SPLITTER_H_
|
||||
#define _WX_GENERIC_SPLITTER_H_
|
||||
|
||||
#include "wx/window.h" // base class declaration
|
||||
#include "wx/containr.h" // wxControlContainer
|
||||
@@ -226,7 +226,7 @@ protected:
|
||||
|
||||
// send the given event, return false if the event was processed and vetoed
|
||||
// by the user code
|
||||
inline bool DoSendEvent(wxSplitterEvent& event);
|
||||
bool DoSendEvent(wxSplitterEvent& event);
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
@@ -403,4 +403,4 @@ typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&);
|
||||
#define EVT_SPLITTER_UNSPLIT(id, fn) \
|
||||
wx__DECLARE_SPLITTEREVT(UNSPLIT, id, fn)
|
||||
|
||||
#endif // __SPLITTERH_G__
|
||||
#endif // _WX_GENERIC_SPLITTER_H_
|
||||
|
@@ -181,16 +181,18 @@ private:
|
||||
static BaseListType EmptyList; \
|
||||
\
|
||||
bool m_destroy; \
|
||||
\
|
||||
public: \
|
||||
decl compatibility_iterator \
|
||||
{ \
|
||||
private: \
|
||||
/* Workaround for broken VC6 nested class name resolution */ \
|
||||
typedef std::list<elT>::iterator iterator; \
|
||||
friend class liT; \
|
||||
private: \
|
||||
/* Workaround for broken VC6 nested class name resolution */ \
|
||||
typedef std::list<elT>::iterator iterator; \
|
||||
friend class liT; \
|
||||
\
|
||||
iterator m_iter; \
|
||||
liT * m_list; \
|
||||
\
|
||||
public: \
|
||||
compatibility_iterator() \
|
||||
: m_iter(EmptyList.end()), m_list( NULL ) {} \
|
||||
@@ -338,6 +340,9 @@ private:
|
||||
void Sort( wxSortCompareFunction compfunc ) \
|
||||
{ sort( WX_LIST_SORTFUNCTION( elT, compfunc ) ); } \
|
||||
~liT() { Clear(); } \
|
||||
\
|
||||
/* It needs access to our EmptyList */ \
|
||||
friend decl compatibility_iterator; \
|
||||
}
|
||||
|
||||
#define WX_DECLARE_LIST(elementtype, listname) \
|
||||
|
@@ -12,8 +12,11 @@
|
||||
#ifndef _WX_LISTCTRL_H_
|
||||
#define _WX_LISTCTRL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/generic/listctrl.h"
|
||||
|
||||
#define wxMAC_ALWAYS_USE_GENERIC_LISTCTRL wxT("mac.listctrl.always_use_generic")
|
||||
|
||||
class wxMacDataBrowserListCtrlControl;
|
||||
class wxMacListControl;
|
||||
class wxListCtrlTextCtrlWrapper;
|
||||
@@ -341,6 +344,14 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
||||
|
||||
virtual int GetScrollPos(int orient) const;
|
||||
|
||||
#if wxABI_VERSION >= 20801
|
||||
void OnRightDown(wxMouseEvent& event);
|
||||
void OnMiddleDown(wxMouseEvent& event);
|
||||
void OnChar(wxKeyEvent& event);
|
||||
virtual void SetFocus();
|
||||
void FireMouseEvent(wxEventType eventType, wxPoint position);
|
||||
#endif
|
||||
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
||||
virtual wxDropTarget* GetDropTarget() const;
|
||||
|
||||
|
@@ -406,29 +406,49 @@ private:
|
||||
// dtor
|
||||
class SelectInHDC
|
||||
{
|
||||
private:
|
||||
void DoInit(HGDIOBJ hgdiobj) { m_hgdiobj = ::SelectObject(m_hdc, hgdiobj); }
|
||||
|
||||
public:
|
||||
SelectInHDC(HDC hdc, HGDIOBJ hgdiobj) : m_hdc(hdc)
|
||||
{ m_hgdiobj = ::SelectObject(hdc, hgdiobj); }
|
||||
SelectInHDC() : m_hdc(NULL) { }
|
||||
SelectInHDC(HDC hdc, HGDIOBJ hgdiobj) : m_hdc(hdc) { DoInit(hgdiobj); }
|
||||
|
||||
~SelectInHDC() { ::SelectObject(m_hdc, m_hgdiobj); }
|
||||
void Init(HDC hdc, HGDIOBJ hgdiobj)
|
||||
{
|
||||
wxASSERT_MSG( !m_hdc, _T("initializing twice?") );
|
||||
|
||||
// return true if the object was successfully selected
|
||||
operator bool() const { return m_hgdiobj != 0; }
|
||||
m_hdc = hdc;
|
||||
|
||||
DoInit(hgdiobj);
|
||||
}
|
||||
|
||||
~SelectInHDC() { if ( m_hdc ) ::SelectObject(m_hdc, m_hgdiobj); }
|
||||
|
||||
// return true if the object was successfully selected
|
||||
operator bool() const { return m_hgdiobj != 0; }
|
||||
|
||||
private:
|
||||
HDC m_hdc;
|
||||
HGDIOBJ m_hgdiobj;
|
||||
HDC m_hdc;
|
||||
HGDIOBJ m_hgdiobj;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(SelectInHDC)
|
||||
DECLARE_NO_COPY_CLASS(SelectInHDC)
|
||||
};
|
||||
|
||||
// a class which cleans up any GDI object
|
||||
class AutoGDIObject
|
||||
{
|
||||
protected:
|
||||
AutoGDIObject() { m_gdiobj = NULL; }
|
||||
AutoGDIObject(HGDIOBJ gdiobj) : m_gdiobj(gdiobj) { }
|
||||
~AutoGDIObject() { if ( m_gdiobj ) ::DeleteObject(m_gdiobj); }
|
||||
|
||||
void InitGdiobj(HGDIOBJ gdiobj)
|
||||
{
|
||||
wxASSERT_MSG( !m_gdiobj, _T("initializing twice?") );
|
||||
|
||||
m_gdiobj = gdiobj;
|
||||
}
|
||||
|
||||
HGDIOBJ GetObject() const { return m_gdiobj; }
|
||||
|
||||
private:
|
||||
@@ -437,7 +457,7 @@ private:
|
||||
|
||||
// TODO: all this asks for using a AutoHandler<T, CreateFunc> template...
|
||||
|
||||
// a class for temporary pens
|
||||
// a class for temporary brushes
|
||||
class AutoHBRUSH : private AutoGDIObject
|
||||
{
|
||||
public:
|
||||
@@ -447,6 +467,22 @@ public:
|
||||
operator HBRUSH() const { return (HBRUSH)GetObject(); }
|
||||
};
|
||||
|
||||
// a class for temporary fonts
|
||||
class AutoHFONT : private AutoGDIObject
|
||||
{
|
||||
private:
|
||||
public:
|
||||
AutoHFONT()
|
||||
: AutoGDIObject() { }
|
||||
|
||||
AutoHFONT(const LOGFONT& lf)
|
||||
: AutoGDIObject(::CreateFontIndirect(&lf)) { }
|
||||
|
||||
void Init(const LOGFONT& lf) { InitGdiobj(::CreateFontIndirect(&lf)); }
|
||||
|
||||
operator HFONT() const { return (HFONT)GetObject(); }
|
||||
};
|
||||
|
||||
// a class for temporary pens
|
||||
class AutoHPEN : private AutoGDIObject
|
||||
{
|
||||
|
@@ -207,6 +207,15 @@ protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// creates the control of appropriate class (plain or rich edit) with the
|
||||
// styles corresponding to m_windowStyle
|
||||
//
|
||||
// this is used by ctor/Create() and when we need to recreate the control
|
||||
// later
|
||||
bool MSWCreateText(const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size);
|
||||
|
||||
virtual void DoSetValue(const wxString &value, int flags = 0);
|
||||
|
||||
// return true if this control has a user-set limit on amount of text (i.e.
|
||||
|
@@ -273,10 +273,10 @@ private:
|
||||
void Init();
|
||||
|
||||
// helper functions
|
||||
inline bool DoGetItem(wxTreeViewItem *tvItem) const;
|
||||
inline void DoSetItem(wxTreeViewItem *tvItem);
|
||||
bool DoGetItem(wxTreeViewItem *tvItem) const;
|
||||
void DoSetItem(wxTreeViewItem *tvItem);
|
||||
|
||||
inline void DoExpand(const wxTreeItemId& item, int flag);
|
||||
void DoExpand(const wxTreeItemId& item, int flag);
|
||||
|
||||
void DeleteTextCtrl();
|
||||
|
||||
|
67
include/wx/private/socketevtdispatch.h
Normal file
67
include/wx/private/socketevtdispatch.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/private/socketevtdispatch.h
|
||||
// Purpose: wxSocketEventDispatcher class
|
||||
// Authors: Angel Vidal
|
||||
// Modified by:
|
||||
// Created: August 2006
|
||||
// Copyright: (c) Angel Vidal
|
||||
// RCS-ID: $Id$
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PRIVATE_SOCKETEVTDISPATCH_H_
|
||||
#define _WX_PRIVATE_SOCKETEVTDISPATCH_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
|
||||
#include "wx/hash.h"
|
||||
|
||||
// forward declarations
|
||||
class wxSocketEventDispatcherEntry;
|
||||
class GSocket;
|
||||
|
||||
enum wxSocketEventDispatcherType
|
||||
{
|
||||
wxSocketEventDispatcherInput,
|
||||
wxSocketEventDispatcherOutput
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSocketEventDispatcher : public wxHashTable
|
||||
{
|
||||
protected:
|
||||
wxSocketEventDispatcher() : wxHashTable(wxKEY_INTEGER) {}
|
||||
|
||||
public:
|
||||
// returns instance of the table
|
||||
static wxSocketEventDispatcher& Get();
|
||||
|
||||
virtual ~wxSocketEventDispatcher()
|
||||
{
|
||||
WX_CLEAR_HASH_TABLE(*this)
|
||||
}
|
||||
|
||||
void RegisterCallback(int fd, wxSocketEventDispatcherType socketType,
|
||||
GSocket* socket);
|
||||
|
||||
void UnregisterCallback(int fd, wxSocketEventDispatcherType socketType);
|
||||
|
||||
void RunLoop(int timeout = 0);
|
||||
|
||||
private:
|
||||
void AddEvents(fd_set* readset, fd_set* writeset);
|
||||
|
||||
int FillSets(fd_set* readset, fd_set* writeset);
|
||||
|
||||
wxSocketEventDispatcherEntry* FindEntry(int fd);
|
||||
|
||||
private:
|
||||
static wxSocketEventDispatcher *ms_instance;
|
||||
|
||||
friend class wxSocketEventDispatcherModule;
|
||||
};
|
||||
|
||||
#endif // wxUSE_SOCKETS
|
||||
|
||||
#endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_
|
@@ -600,6 +600,7 @@ public:
|
||||
|
||||
void Command(wxCommandEvent& event);
|
||||
void OnDropFiles(wxDropFilesEvent& event);
|
||||
void OnCaptureLost(wxMouseCaptureLostEvent& event);
|
||||
|
||||
void OnCut(wxCommandEvent& event);
|
||||
void OnCopy(wxCommandEvent& event);
|
||||
|
@@ -116,16 +116,10 @@ public:
|
||||
void OnFromUnicodeSelected( wxCommandEvent& event );
|
||||
|
||||
#endif
|
||||
#if defined(__WXMSW__) || defined(__WXGTK__) || defined(__WXPM__) || defined(__WXMGL__) || defined(__WXMOTIF__) || defined(__WXCOCOA__) || defined(__WXX11__) || defined(__WXPALMOS__)
|
||||
|
||||
/// wxEVT_UPDATE_UI event handler for wxID_OK
|
||||
void OnOkUpdate( wxUpdateUIEvent& event );
|
||||
|
||||
#endif
|
||||
#if defined(__WXMAC__)
|
||||
/// wxEVT_UPDATE_UI event handler for wxID_OK
|
||||
void OnOkUpdate( wxUpdateUIEvent& event );
|
||||
|
||||
#endif
|
||||
////@end wxSymbolPickerDialog event handler declarations
|
||||
|
||||
////@begin wxSymbolPickerDialog member function declarations
|
||||
|
@@ -53,21 +53,24 @@ public:
|
||||
SHADOW_HIGHLIGHT,
|
||||
SHADOW_IN,
|
||||
SHADOW_OUT,
|
||||
|
||||
|
||||
// the titlebar background colours for the normal and focused states
|
||||
TITLEBAR,
|
||||
TITLEBAR_ACTIVE,
|
||||
|
||||
|
||||
// the titlebar text colours
|
||||
TITLEBAR_TEXT,
|
||||
TITLEBAR_ACTIVE_TEXT,
|
||||
|
||||
|
||||
// the default gauge fill colour
|
||||
GAUGE,
|
||||
|
||||
// desktop background colour (only used by framebuffer ports)
|
||||
DESKTOP,
|
||||
|
||||
// wxFrame's background colour
|
||||
FRAME,
|
||||
|
||||
MAX
|
||||
};
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#define wxMAJOR_VERSION 2
|
||||
#define wxMINOR_VERSION 8
|
||||
#define wxRELEASE_NUMBER 0
|
||||
#define wxSUBRELEASE_NUMBER 1
|
||||
#define wxSUBRELEASE_NUMBER 2
|
||||
#define wxVERSION_STRING _T("wxWidgets 2.8.0")
|
||||
|
||||
/* nothing to update below this line when updating the version */
|
||||
|
@@ -466,6 +466,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(NATIVE_ARCH)";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = ../../include/wx/wxprec.h;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
|
@@ -32,6 +32,8 @@
|
||||
#include "wx/log.h"
|
||||
#include "wx/image.h"
|
||||
#include "wx/filedlg.h"
|
||||
#include "wx/spinctrl.h"
|
||||
#include "wx/srchctrl.h"
|
||||
|
||||
// define this to use XPMs everywhere (by default, BMPs are used under Win)
|
||||
// BMPs use less space, but aren't compiled into the executable on other platforms
|
||||
@@ -391,7 +393,7 @@ void MyFrame::RecreateToolbar()
|
||||
// adding a combo to a vertical toolbar is not very smart
|
||||
if ( !( toolBar->IsVertical() ) )
|
||||
{
|
||||
wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, wxEmptyString, wxDefaultPosition, wxSize(200,wxDefaultCoord) );
|
||||
wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, wxEmptyString, wxDefaultPosition, wxSize(100,-1) );
|
||||
combo->Append(_T("This"));
|
||||
combo->Append(_T("is a"));
|
||||
combo->Append(_T("combobox"));
|
||||
@@ -399,8 +401,14 @@ void MyFrame::RecreateToolbar()
|
||||
combo->Append(_T("toolbar"));
|
||||
toolBar->AddControl(combo);
|
||||
|
||||
//wxSpinCtrl *spin = new wxSpinCtrl( toolBar, ID_SPIN, wxT("0"), wxDefaultPosition, wxSize(80,wxDefaultCoord), 0, 100, 0 );
|
||||
//toolBar->AddControl( spin );
|
||||
wxSpinCtrl *spin = new wxSpinCtrl( toolBar, ID_SPIN, wxT("0"), wxDefaultPosition, wxSize(80,wxDefaultCoord), 0, 0, 100 );
|
||||
toolBar->AddControl( spin );
|
||||
|
||||
wxTextCtrl *text = new wxTextCtrl( toolBar, -1, wxT("text"), wxDefaultPosition, wxSize(80,wxDefaultCoord) );
|
||||
toolBar->AddControl( text );
|
||||
|
||||
wxSearchCtrl *srch = new wxSearchCtrl( toolBar, -1, wxT("xx"), wxDefaultPosition, wxSize(80,wxDefaultCoord), wxSUNKEN_BORDER );
|
||||
toolBar->AddControl( srch );
|
||||
}
|
||||
#endif // toolbars which don't support controls
|
||||
|
||||
|
@@ -125,9 +125,6 @@
|
||||
#undef __WINDOWS__
|
||||
#endif
|
||||
|
||||
#ifndef __WIN95__
|
||||
#undef __WIN95__
|
||||
#endif
|
||||
#ifndef __WIN32__
|
||||
#undef __WIN32__
|
||||
#endif
|
||||
@@ -541,13 +538,13 @@
|
||||
|
||||
/* for some features we don't have dedicated configure switches, so just choose
|
||||
* the common values automatically */
|
||||
#if (defined(__WIN95__) && !defined(__WXUNIVERSAL__)) || defined(__WXPM__)
|
||||
#if (defined(__WIN32__) && !defined(__WXUNIVERSAL__)) || defined(__WXPM__)
|
||||
#define wxUSE_OWNER_DRAWN 1
|
||||
#else
|
||||
#define wxUSE_OWNER_DRAWN 0
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
|
||||
#if defined(__WIN32__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
|
||||
#define wxUSE_RICHEDIT 1
|
||||
#define wxUSE_RICHEDIT2 1
|
||||
#else
|
||||
|
10
setup.h_vms
10
setup.h_vms
@@ -3,7 +3,7 @@
|
||||
* Template for the set.h file for VMS *
|
||||
* Created from setup.h_in *
|
||||
* Author : J.Jansen (joukj@hrem.nano.tudelft.nl) *
|
||||
* Date : 14 November 2006 *
|
||||
* Date : 19 December 2006 *
|
||||
* *
|
||||
*****************************************************************************/
|
||||
|
||||
@@ -143,9 +143,6 @@ typedef pid_t GPid;
|
||||
#undef __WINDOWS__
|
||||
#endif
|
||||
|
||||
#ifndef __WIN95__
|
||||
#undef __WIN95__
|
||||
#endif
|
||||
#ifndef __WIN32__
|
||||
#undef __WIN32__
|
||||
#endif
|
||||
@@ -349,6 +346,7 @@ typedef pid_t GPid;
|
||||
#define wxUSE_RADIOBOX 1
|
||||
#define wxUSE_RADIOBTN 1
|
||||
#define wxUSE_SCROLLBAR 1
|
||||
#define wxUSE_SEARCHCTRL 1
|
||||
#define wxUSE_SLIDER 1
|
||||
#define wxUSE_SPINBTN 1
|
||||
#define wxUSE_SPINCTRL 1
|
||||
@@ -566,14 +564,14 @@ typedef pid_t GPid;
|
||||
|
||||
/* for some features we don't have dedicated configure switches, so just choose
|
||||
* the common values automatically */
|
||||
#if (defined(__WIN95__) && !defined(__WXUNIVERSAL__)) || defined(__WXPM__)
|
||||
#if (defined(__WIN32__) && !defined(__WXUNIVERSAL__)) || defined(__WXPM__)
|
||||
#define wxUSE_OWNER_DRAWN 1
|
||||
#else
|
||||
#define wxUSE_OWNER_DRAWN 0
|
||||
#endif
|
||||
|
||||
/* enable rich edit under Win32 */
|
||||
#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
|
||||
#if defined(__WIN32__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
|
||||
#define wxUSE_RICHEDIT 1
|
||||
#define wxUSE_RICHEDIT2 1
|
||||
#else
|
||||
|
@@ -3250,6 +3250,12 @@ wxRect wxAuiManager::CalculateHintRect(wxWindow* pane_window,
|
||||
// actually show the hint rectangle on the screen
|
||||
m_frame->ClientToScreen(&rect.x, &rect.y);
|
||||
|
||||
if ( m_frame->GetLayoutDirection() == wxLayout_RightToLeft )
|
||||
{
|
||||
// Mirror rectangle in RTL mode
|
||||
rect.x -= rect.GetWidth();
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
@@ -82,8 +82,9 @@ wxAuiMDIParentFrame::~wxAuiMDIParentFrame()
|
||||
wxDELETE(m_pClientWindow);
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxDELETE(m_pMyMenuBar);
|
||||
RemoveWindowMenu(GetMenuBar());
|
||||
delete m_pWindowMenu;
|
||||
wxDELETE(m_pWindowMenu);
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
@@ -166,7 +167,7 @@ void wxAuiMDIParentFrame::SetMenuBar(wxMenuBar* pMenuBar)
|
||||
AddWindowMenu(pMenuBar);
|
||||
|
||||
wxFrame::SetMenuBar(pMenuBar);
|
||||
m_pMyMenuBar = GetMenuBar();
|
||||
//m_pMyMenuBar = GetMenuBar();
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
@@ -179,7 +180,7 @@ void wxAuiMDIParentFrame::SetChildMenuBar(wxAuiMDIChildFrame* pChild)
|
||||
SetMenuBar(m_pMyMenuBar);
|
||||
|
||||
// Make sure we know our menu bar is in use
|
||||
//m_pMyMenuBar = NULL;
|
||||
m_pMyMenuBar = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -416,6 +417,13 @@ wxAuiMDIChildFrame::wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
|
||||
|
||||
wxAuiMDIChildFrame::~wxAuiMDIChildFrame()
|
||||
{
|
||||
wxAuiMDIParentFrame* pParentFrame = GetMDIParentFrame();
|
||||
if (pParentFrame && pParentFrame->GetActiveChild() == this)
|
||||
{
|
||||
pParentFrame->SetActiveChild(NULL);
|
||||
pParentFrame->SetChildMenuBar(NULL);
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
wxDELETE(m_pMenuBar);
|
||||
#endif // wxUSE_MENUS
|
||||
|
@@ -2306,6 +2306,7 @@ bool wxDb::ExecSql(const wxString &pSqlStmt, wxDbColInf** columns, short& numcol
|
||||
return false;
|
||||
}
|
||||
|
||||
pColInf[colNum].sqlDataType = Sqllen;
|
||||
switch (Sqllen)
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
|
@@ -208,6 +208,8 @@ OBJECTS_X11=accesscmn.obj,dndcmn.obj,dpycmn.obj,dseldlg.obj,\
|
||||
regex.obj,taskbarcmn.obj,xti.obj,xtistrm.obj,xtixml.obj,\
|
||||
combocmn.obj
|
||||
|
||||
OBJECTS_X11_2=socketevtdispatch.obj
|
||||
|
||||
SOURCES = \
|
||||
anidecod.cpp,\
|
||||
animatecmn.cpp,\
|
||||
@@ -321,6 +323,7 @@ SOURCES = \
|
||||
sckstrm.cpp,\
|
||||
sizer.cpp,\
|
||||
socket.cpp,\
|
||||
socketevtdispatch.cpp,\
|
||||
settcmn.cpp,\
|
||||
statbar.cpp,\
|
||||
stdpbase.cpp,\
|
||||
@@ -401,10 +404,12 @@ all : $(SOURCES)
|
||||
.else
|
||||
.ifdef __WXX11__
|
||||
$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11)
|
||||
$(MMS)$(MMSQUALIFIERS) $(OBJECTS_X11_2)
|
||||
library [--.lib]libwx_x11_univ.olb $(OBJECTS)
|
||||
library [--.lib]libwx_x11_univ.olb $(OBJECTS1)
|
||||
library [--.lib]libwx_x11_univ.olb $(OBJECTS2)
|
||||
library [--.lib]libwx_x11_univ.olb $(OBJECTS_X11)
|
||||
library [--.lib]libwx_x11_univ.olb $(OBJECTS_X11_2)
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
@@ -520,6 +525,7 @@ sckipc.obj : sckipc.cpp
|
||||
sckstrm.obj : sckstrm.cpp
|
||||
sizer.obj : sizer.cpp
|
||||
socket.obj : socket.cpp
|
||||
socketevtdispatch.obj : socketevtdispatch.cpp
|
||||
settcmn.obj : settcmn.cpp
|
||||
statbar.obj : statbar.cpp
|
||||
stdpbase.obj : stdpbase.cpp
|
||||
|
@@ -95,7 +95,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
|
||||
// function prototypes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static inline wxString FindExtension(const wxChar *path);
|
||||
static wxWindow* wxFindSuitableParent(void);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -284,6 +284,17 @@ static wxString wxGetVolumeString(const wxString& volume, wxPathFormat format)
|
||||
return path;
|
||||
}
|
||||
|
||||
// return true if the format used is the DOS/Windows one and the string looks
|
||||
// like a UNC path
|
||||
static bool IsUNCPath(const wxString& path, wxPathFormat format)
|
||||
{
|
||||
return format == wxPATH_DOS &&
|
||||
path.length() >= 4 && // "\\a" can't be a UNC path
|
||||
path[0u] == wxFILE_SEP_PATH_DOS &&
|
||||
path[1u] == wxFILE_SEP_PATH_DOS &&
|
||||
path[2u] != wxFILE_SEP_PATH_DOS;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
@@ -307,9 +318,28 @@ void wxFileName::Assign(const wxString& volume,
|
||||
const wxString& name,
|
||||
const wxString& ext,
|
||||
bool hasExt,
|
||||
wxPathFormat format )
|
||||
wxPathFormat format)
|
||||
{
|
||||
SetPath( path, format );
|
||||
// we should ignore paths which look like UNC shares because we already
|
||||
// have the volume here and the UNC notation (\\server\path) is only valid
|
||||
// for paths which don't start with a volume, so prevent SetPath() from
|
||||
// recognizing "\\foo\bar" in "c:\\foo\bar" as an UNC path
|
||||
//
|
||||
// note also that this is a rather ugly way to do what we want (passing
|
||||
// some kind of flag telling to ignore UNC paths to SetPath() would be
|
||||
// better) but this is the safest thing to do to avoid breaking backwards
|
||||
// compatibility in 2.8
|
||||
if ( IsUNCPath(path, format) )
|
||||
{
|
||||
// remove one of the 2 leading backslashes to ensure that it's not
|
||||
// recognized as an UNC path by SetPath()
|
||||
wxString pathNonUNC(path, 1, wxString::npos);
|
||||
SetPath(pathNonUNC, format);
|
||||
}
|
||||
else // no UNC complications
|
||||
{
|
||||
SetPath(path, format);
|
||||
}
|
||||
|
||||
m_volume = volume;
|
||||
m_ext = ext;
|
||||
@@ -427,7 +457,7 @@ void wxFileName::Assign(const wxString& fullpathOrig,
|
||||
// always recognize fullpath as directory, even if it doesn't end with a
|
||||
// slash
|
||||
wxString fullpath = fullpathOrig;
|
||||
if ( !wxEndsWithPathSeparator(fullpath) )
|
||||
if ( !fullpath.empty() && !wxEndsWithPathSeparator(fullpath) )
|
||||
{
|
||||
fullpath += GetPathSeparator(format);
|
||||
}
|
||||
@@ -1944,23 +1974,18 @@ wxFileName::SplitVolume(const wxString& fullpathWithVolume,
|
||||
wxString fullpath = fullpathWithVolume;
|
||||
|
||||
// special Windows UNC paths hack: transform \\share\path into share:path
|
||||
if ( format == wxPATH_DOS )
|
||||
if ( IsUNCPath(fullpath, format) )
|
||||
{
|
||||
if ( fullpath.length() >= 4 &&
|
||||
fullpath[0u] == wxFILE_SEP_PATH_DOS &&
|
||||
fullpath[1u] == wxFILE_SEP_PATH_DOS )
|
||||
fullpath.erase(0, 2);
|
||||
|
||||
size_t posFirstSlash =
|
||||
fullpath.find_first_of(GetPathTerminators(format));
|
||||
if ( posFirstSlash != wxString::npos )
|
||||
{
|
||||
fullpath.erase(0, 2);
|
||||
fullpath[posFirstSlash] = wxFILE_SEP_DSK;
|
||||
|
||||
size_t posFirstSlash =
|
||||
fullpath.find_first_of(GetPathTerminators(format));
|
||||
if ( posFirstSlash != wxString::npos )
|
||||
{
|
||||
fullpath[posFirstSlash] = wxFILE_SEP_DSK;
|
||||
|
||||
// UNC paths are always absolute, right? (FIXME)
|
||||
fullpath.insert(posFirstSlash + 1, 1, wxFILE_SEP_PATH_DOS);
|
||||
}
|
||||
// UNC paths are always absolute, right? (FIXME)
|
||||
fullpath.insert(posFirstSlash + 1, 1, wxFILE_SEP_PATH_DOS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#if wxUSE_FILEDLG
|
||||
|
||||
#include "wx/filedlg.h"
|
||||
#include "wx/dirdlg.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
@@ -113,6 +114,19 @@ int wxFileDialogBase::ParseWildcard(const wxString& filterStr,
|
||||
}
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
long wxFileDialogBase::GetStyle() const
|
||||
{
|
||||
return GetWindowStyle();
|
||||
}
|
||||
|
||||
void wxFileDialogBase::SetStyle(long style)
|
||||
{
|
||||
SetWindowStyle(style);
|
||||
}
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
|
||||
wxString wxFileDialogBase::AppendExtension(const wxString &filePath,
|
||||
const wxString &extensionList)
|
||||
{
|
||||
@@ -313,4 +327,22 @@ WXDLLEXPORT wxString wxSaveFileSelector(const wxChar *what,
|
||||
return wxDefaultFileSelector(false, what, extension, default_name, parent);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxDirDialogBase
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
long wxDirDialogBase::GetStyle() const
|
||||
{
|
||||
return GetWindowStyle();
|
||||
}
|
||||
|
||||
void wxDirDialogBase::SetStyle(long style)
|
||||
{
|
||||
SetWindowStyle(style);
|
||||
}
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
|
||||
#endif // wxUSE_FILEDLG
|
||||
|
@@ -176,14 +176,23 @@ static struct InitData
|
||||
static void ConvertArgsToUnicode(int argc, char **argv)
|
||||
{
|
||||
gs_initData.argv = new wchar_t *[argc + 1];
|
||||
int wargc = 0;
|
||||
for ( int i = 0; i < argc; i++ )
|
||||
{
|
||||
wxWCharBuffer buf(wxConvLocal.cMB2WX(argv[i]));
|
||||
gs_initData.argv[i] = buf ? wxStrdup(buf) : NULL;
|
||||
if ( !buf )
|
||||
{
|
||||
wxLogWarning(_("Command line argument %d couldn't be converted to Unicode and will be ignored."),
|
||||
i);
|
||||
}
|
||||
else // converted ok
|
||||
{
|
||||
gs_initData.argv[wargc++] = wxStrdup(buf);
|
||||
}
|
||||
}
|
||||
|
||||
gs_initData.argc = argc;
|
||||
gs_initData.argv[argc] = NULL;
|
||||
gs_initData.argc = wargc;
|
||||
gs_initData.argv[wargc] = NULL;
|
||||
}
|
||||
|
||||
static void FreeConvertedArgs()
|
||||
@@ -320,7 +329,7 @@ bool wxEntryStart(int& argc, char **argv)
|
||||
{
|
||||
ConvertArgsToUnicode(argc, argv);
|
||||
|
||||
if ( !wxEntryStart(argc, gs_initData.argv) )
|
||||
if ( !wxEntryStart(gs_initData.argc, gs_initData.argv) )
|
||||
{
|
||||
FreeConvertedArgs();
|
||||
|
||||
@@ -449,7 +458,7 @@ int wxEntry(int& argc, char **argv)
|
||||
{
|
||||
ConvertArgsToUnicode(argc, argv);
|
||||
|
||||
return wxEntry(argc, gs_initData.argv);
|
||||
return wxEntry(gs_initData.argc, gs_initData.argv);
|
||||
}
|
||||
|
||||
#endif // wxUSE_UNICODE
|
||||
|
@@ -18,7 +18,7 @@
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__BORLAND__) && !defined(__WXDEBUG__)
|
||||
#if defined(__BORLANDC__) && !defined(__WXDEBUG__)
|
||||
// There's a bug in Borland's compiler that breaks wxLocale with -O2,
|
||||
// so make sure that flag is not used for this file:
|
||||
#pragma option -O1
|
||||
@@ -1904,14 +1904,14 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
|
||||
!wxGetEnv(wxT("LC_MESSAGES"), &langFull) &&
|
||||
!wxGetEnv(wxT("LANG"), &langFull))
|
||||
{
|
||||
// no language specified, threat it as English
|
||||
return wxLANGUAGE_ENGLISH;
|
||||
// no language specified, treat it as English
|
||||
return wxLANGUAGE_ENGLISH_US;
|
||||
}
|
||||
|
||||
if ( langFull == _T("C") || langFull == _T("POSIX") )
|
||||
{
|
||||
// default C locale
|
||||
return wxLANGUAGE_ENGLISH;
|
||||
// default C locale is English too
|
||||
return wxLANGUAGE_ENGLISH_US;
|
||||
}
|
||||
|
||||
// the language string has the following form
|
||||
@@ -2764,7 +2764,7 @@ bool wxLocale::IsLoaded(const wxChar *szDomain) const
|
||||
// add a catalog to our linked list
|
||||
bool wxLocale::AddCatalog(const wxChar *szDomain)
|
||||
{
|
||||
return AddCatalog(szDomain, wxLANGUAGE_ENGLISH, NULL);
|
||||
return AddCatalog(szDomain, wxLANGUAGE_ENGLISH_US, NULL);
|
||||
}
|
||||
|
||||
// add a catalog to our linked list
|
||||
|
@@ -62,6 +62,9 @@ static const wxChar* const wxOperatingSystemIdNames[] =
|
||||
_T("AIX"),
|
||||
_T("HPUX"),
|
||||
|
||||
_T("Other Unix"),
|
||||
_T("Other Unix"),
|
||||
|
||||
_T("DOS"),
|
||||
_T("OS/2")
|
||||
};
|
||||
|
339
src/common/socketevtdispatch.cpp
Normal file
339
src/common/socketevtdispatch.cpp
Normal file
@@ -0,0 +1,339 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/common/socketevtdispatch.cpp
|
||||
// Purpose: implements wxSocketEventDispatcher for platforms with no
|
||||
// socket events notification
|
||||
// Author: Angel Vidal
|
||||
// Modified by:
|
||||
// Created: 08.24.06
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2006 Angel vidal
|
||||
// License: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// for compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
|
||||
#include "wx/private/socketevtdispatch.h"
|
||||
#include "wx/module.h"
|
||||
#include "wx/unix/private.h"
|
||||
#include "wx/gsocket.h"
|
||||
#include "wx/unix/gsockunx.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/hash.h"
|
||||
#endif
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
# include <sys/select.h>
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxSocketEventDispatcherEntry
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxSocketEventDispatcherEntry: public wxObject
|
||||
{
|
||||
public:
|
||||
wxSocketEventDispatcherEntry()
|
||||
{
|
||||
m_fdInput = -1; m_fdOutput = -1;
|
||||
m_socket = NULL;
|
||||
}
|
||||
|
||||
int m_fdInput;
|
||||
int m_fdOutput;
|
||||
GSocket* m_socket;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxSocketEventDispatcher
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxSocketEventDispatcher* wxSocketEventDispatcher::ms_instance = NULL;
|
||||
|
||||
/* static */
|
||||
wxSocketEventDispatcher& wxSocketEventDispatcher::Get()
|
||||
{
|
||||
if ( !ms_instance )
|
||||
ms_instance = new wxSocketEventDispatcher;
|
||||
return *ms_instance;
|
||||
}
|
||||
|
||||
wxSocketEventDispatcherEntry* wxSocketEventDispatcher::FindEntry(int fd)
|
||||
{
|
||||
wxSocketEventDispatcherEntry* entry =
|
||||
(wxSocketEventDispatcherEntry*) wxHashTable::Get(fd);
|
||||
return entry;
|
||||
}
|
||||
|
||||
void
|
||||
wxSocketEventDispatcher::RegisterCallback(int fd,
|
||||
wxSocketEventDispatcherType socketType,
|
||||
GSocket* socket)
|
||||
{
|
||||
wxSocketEventDispatcherEntry* entry = FindEntry(fd);
|
||||
if (!entry)
|
||||
{
|
||||
entry = new wxSocketEventDispatcherEntry();
|
||||
Put(fd, entry);
|
||||
}
|
||||
|
||||
if (socketType == wxSocketEventDispatcherInput)
|
||||
entry->m_fdInput = fd;
|
||||
else
|
||||
entry->m_fdOutput = fd;
|
||||
|
||||
entry->m_socket = socket;
|
||||
}
|
||||
|
||||
void
|
||||
wxSocketEventDispatcher::UnregisterCallback(int fd,
|
||||
wxSocketEventDispatcherType socketType)
|
||||
{
|
||||
wxSocketEventDispatcherEntry* entry = FindEntry(fd);
|
||||
if (entry)
|
||||
{
|
||||
if (socketType == wxSocketEventDispatcherInput)
|
||||
entry->m_fdInput = -1;
|
||||
else
|
||||
entry->m_fdOutput = -1;
|
||||
|
||||
if (entry->m_fdInput == -1 && entry->m_fdOutput == -1)
|
||||
{
|
||||
entry->m_socket = NULL;
|
||||
Delete(fd);
|
||||
delete entry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int wxSocketEventDispatcher::FillSets(fd_set* readset, fd_set* writeset)
|
||||
{
|
||||
int max_fd = 0;
|
||||
|
||||
wxFD_ZERO(readset);
|
||||
wxFD_ZERO(writeset);
|
||||
|
||||
BeginFind();
|
||||
wxHashTable::compatibility_iterator node = Next();
|
||||
while (node)
|
||||
{
|
||||
wxSocketEventDispatcherEntry* entry =
|
||||
(wxSocketEventDispatcherEntry*) node->GetData();
|
||||
|
||||
if (entry->m_fdInput != -1)
|
||||
{
|
||||
wxFD_SET(entry->m_fdInput, readset);
|
||||
if (entry->m_fdInput > max_fd)
|
||||
max_fd = entry->m_fdInput;
|
||||
}
|
||||
|
||||
if (entry->m_fdOutput != -1)
|
||||
{
|
||||
wxFD_SET(entry->m_fdOutput, writeset);
|
||||
if (entry->m_fdOutput > max_fd)
|
||||
max_fd = entry->m_fdOutput;
|
||||
}
|
||||
|
||||
node = Next();
|
||||
}
|
||||
|
||||
return max_fd;
|
||||
}
|
||||
|
||||
void wxSocketEventDispatcher::AddEvents(fd_set* readset, fd_set* writeset)
|
||||
{
|
||||
BeginFind();
|
||||
wxHashTable::compatibility_iterator node = Next();
|
||||
while (node)
|
||||
{
|
||||
// We have to store the next node here, because the event processing can
|
||||
// destroy the object before we call Next()
|
||||
|
||||
wxHashTable::compatibility_iterator next_node = Next();
|
||||
|
||||
wxSocketEventDispatcherEntry* entry =
|
||||
(wxSocketEventDispatcherEntry*) node->GetData();
|
||||
|
||||
wxCHECK_RET(entry->m_socket, wxT("Critical: Processing a NULL socket in wxSocketEventDispatcher"));
|
||||
|
||||
if (entry->m_fdInput != -1 && wxFD_ISSET(entry->m_fdInput, readset))
|
||||
entry->m_socket->Detected_Read();
|
||||
|
||||
if (entry->m_fdOutput != -1 && wxFD_ISSET(entry->m_fdOutput, writeset))
|
||||
entry->m_socket->Detected_Write();;
|
||||
|
||||
node = next_node;
|
||||
}
|
||||
}
|
||||
|
||||
void wxSocketEventDispatcher::RunLoop(int timeout)
|
||||
{
|
||||
struct timeval tv;
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = timeout;
|
||||
fd_set readset;
|
||||
fd_set writeset;
|
||||
|
||||
int max_fd = FillSets( &readset, &writeset);
|
||||
if (select( max_fd+1, &readset, &writeset, NULL, &tv ) == 0)
|
||||
{
|
||||
// No socket input/output. Don't add events.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
AddEvents(&readset, &writeset);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxSocketEventDispatcherModule
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxSocketEventDispatcherModule: public wxModule
|
||||
{
|
||||
public:
|
||||
bool OnInit() { return true; }
|
||||
void OnExit() { wxDELETE(wxSocketEventDispatcher::ms_instance); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxSocketEventDispatcherModule)
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSocketEventDispatcherModule, wxModule)
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// GSocket interface
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GSocketGUIFunctionsTableConcrete::OnInit(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void GSocketGUIFunctionsTableConcrete::OnExit(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
|
||||
{
|
||||
int *m_id;
|
||||
|
||||
socket->m_gui_dependent = (char *)malloc(sizeof(int)*2);
|
||||
m_id = (int *)(socket->m_gui_dependent);
|
||||
|
||||
m_id[0] = -1;
|
||||
m_id[1] = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
|
||||
{
|
||||
free(socket->m_gui_dependent);
|
||||
}
|
||||
|
||||
void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket *socket,
|
||||
GSocketEvent event)
|
||||
{
|
||||
int *m_id = (int *)(socket->m_gui_dependent);
|
||||
int c;
|
||||
|
||||
if (socket->m_fd == -1)
|
||||
return;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case GSOCK_LOST: /* fall-through */
|
||||
case GSOCK_INPUT: c = 0; break;
|
||||
case GSOCK_OUTPUT: c = 1; break;
|
||||
case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (m_id[c] != -1)
|
||||
XtRemoveInput(m_id[c]);
|
||||
#endif /* 0 */
|
||||
|
||||
if (c == 0)
|
||||
{
|
||||
m_id[0] = socket->m_fd;
|
||||
|
||||
wxSocketEventDispatcher::Get().RegisterCallback(
|
||||
socket->m_fd, wxSocketEventDispatcherInput, socket);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_id[1] = socket->m_fd;
|
||||
|
||||
wxSocketEventDispatcher::Get().RegisterCallback(
|
||||
socket->m_fd, wxSocketEventDispatcherOutput, socket);
|
||||
}
|
||||
}
|
||||
|
||||
void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket *socket,
|
||||
GSocketEvent event)
|
||||
{
|
||||
int *m_id = (int *)(socket->m_gui_dependent);
|
||||
int c;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case GSOCK_LOST: /* fall-through */
|
||||
case GSOCK_INPUT: c = 0; break;
|
||||
case GSOCK_OUTPUT: c = 1; break;
|
||||
case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
if (m_id[c] != -1)
|
||||
{
|
||||
if (c == 0)
|
||||
wxSocketEventDispatcher::Get().UnregisterCallback(
|
||||
m_id[c], wxSocketEventDispatcherInput);
|
||||
else
|
||||
wxSocketEventDispatcher::Get().UnregisterCallback(
|
||||
m_id[c], wxSocketEventDispatcherOutput);
|
||||
}
|
||||
|
||||
m_id[c] = -1;
|
||||
}
|
||||
|
||||
void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
|
||||
{
|
||||
Install_Callback(socket, GSOCK_INPUT);
|
||||
Install_Callback(socket, GSOCK_OUTPUT);
|
||||
}
|
||||
|
||||
void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
|
||||
{
|
||||
Uninstall_Callback(socket, GSOCK_INPUT);
|
||||
Uninstall_Callback(socket, GSOCK_OUTPUT);
|
||||
}
|
||||
|
||||
#endif // wxUSE_SOCKETS
|
@@ -247,7 +247,7 @@ bool wxTarHeaderBlock::Write(wxOutputStream& out)
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool wxTarHeaderBlock::WriteField(wxOutputStream& out, int id)
|
||||
inline bool wxTarHeaderBlock::WriteField(wxOutputStream& out, int id)
|
||||
{
|
||||
return out.Write(Get(id), Len(id)).LastWrite() == Len(id);
|
||||
}
|
||||
|
@@ -2487,6 +2487,10 @@ static void DoNotifyWindowAboutCaptureLost(wxWindow *win)
|
||||
event.SetEventObject(win);
|
||||
if ( !win->GetEventHandler()->ProcessEvent(event) )
|
||||
{
|
||||
// windows must handle this event, otherwise the app wouldn't behave
|
||||
// correctly if it loses capture unexpectedly; see the discussion here:
|
||||
// http://sourceforge.net/tracker/index.php?func=detail&aid=1153662&group_id=9863&atid=109863
|
||||
// http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/82376
|
||||
wxFAIL_MSG( _T("window that captured the mouse didn't process wxEVT_MOUSE_CAPTURE_LOST") );
|
||||
}
|
||||
}
|
||||
|
@@ -205,13 +205,13 @@ wxZipHeader::wxZipHeader(wxInputStream& stream, size_t size)
|
||||
m_ok = m_size == size;
|
||||
}
|
||||
|
||||
wxUint8 wxZipHeader::Read8()
|
||||
inline wxUint8 wxZipHeader::Read8()
|
||||
{
|
||||
wxASSERT(m_pos < m_size);
|
||||
return m_data[m_pos++];
|
||||
}
|
||||
|
||||
wxUint16 wxZipHeader::Read16()
|
||||
inline wxUint16 wxZipHeader::Read16()
|
||||
{
|
||||
wxASSERT(m_pos + 2 <= m_size);
|
||||
wxUint16 n = CrackUint16(m_data + m_pos);
|
||||
@@ -219,7 +219,7 @@ wxUint16 wxZipHeader::Read16()
|
||||
return n;
|
||||
}
|
||||
|
||||
wxUint32 wxZipHeader::Read32()
|
||||
inline wxUint32 wxZipHeader::Read32()
|
||||
{
|
||||
wxASSERT(m_pos + 4 <= m_size);
|
||||
wxUint32 n = CrackUint32(m_data + m_pos);
|
||||
|
@@ -138,10 +138,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
||||
wxLog::Suspend();
|
||||
|
||||
if ( wxEventLoop::GetActive() )
|
||||
{
|
||||
while (wxEventLoop::GetActive()->Pending())
|
||||
wxEventLoop::GetActive()->Dispatch();
|
||||
}
|
||||
wxEventLoop::GetActive()->Yield();
|
||||
|
||||
// it's necessary to call ProcessIdle() to update the frames sizes which
|
||||
// might have been changed (it also will update other things set from
|
||||
|
@@ -25,7 +25,9 @@
|
||||
#include "wx/app.h"
|
||||
#endif
|
||||
|
||||
#include "wx/thread.h"
|
||||
#include "wx/timer.h"
|
||||
#include "wx/private/socketevtdispatch.h"
|
||||
#include "wx/dfb/private.h"
|
||||
|
||||
#define TRACE_EVENTS _T("events")
|
||||
@@ -85,11 +87,18 @@ bool wxEventLoop::Dispatch()
|
||||
// NB: we don't block indefinitely waiting for an event, but instead
|
||||
// time out after a brief period in order to make sure that
|
||||
// OnNextIteration() will be called frequently enough
|
||||
//
|
||||
// FIXME: call NotifyTimers() from here (and loop) instead?
|
||||
const int TIMEOUT = 100;
|
||||
|
||||
if ( ms_buffer->WaitForEventWithTimeout(0, TIMEOUT) )
|
||||
// release the GUI mutex so that other threads have a chance to post
|
||||
// events:
|
||||
wxMutexGuiLeave();
|
||||
|
||||
bool rv = ms_buffer->WaitForEventWithTimeout(0, TIMEOUT);
|
||||
|
||||
// and acquire it back before calling any event handlers:
|
||||
wxMutexGuiEnter();
|
||||
|
||||
if ( rv )
|
||||
{
|
||||
switch ( ms_buffer->GetLastResult() )
|
||||
{
|
||||
@@ -126,9 +135,23 @@ void wxEventLoop::WakeUp()
|
||||
void wxEventLoop::OnNextIteration()
|
||||
{
|
||||
#if wxUSE_TIMER
|
||||
// see the comment in Dispatch
|
||||
wxTimer::NotifyTimers();
|
||||
#endif
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
// handle any pending socket events:
|
||||
wxSocketEventDispatcher::Get().RunLoop();
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxEventLoop::Yield()
|
||||
{
|
||||
// process all pending events:
|
||||
while ( Pending() )
|
||||
Dispatch();
|
||||
|
||||
// handle timers, sockets etc.
|
||||
OnNextIteration();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -270,12 +270,11 @@ bool wxTopLevelWindowDFB::ShowFullScreen(bool show, long style)
|
||||
|
||||
bool wxTopLevelWindowDFB::Show(bool show)
|
||||
{
|
||||
// NB: this calls wxWindow::Show() and so ensures DoRefreshWindow() is
|
||||
// called on the window -- we'll need that below
|
||||
if ( !wxTopLevelWindowBase::Show(show) )
|
||||
return false;
|
||||
|
||||
// hide/show the window by setting its opacity to 0/full:
|
||||
m_dfbwin->SetOpacity(show ? m_opacity : 0);
|
||||
|
||||
// If this is the first time Show was called, send size event,
|
||||
// so that the frame can adjust itself (think auto layout or single child)
|
||||
if ( !m_sizeSet )
|
||||
@@ -286,6 +285,17 @@ bool wxTopLevelWindowDFB::Show(bool show)
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
// make sure the window is fully painted, with all pending updates, before
|
||||
// DFB WM shows it, otherwise it would attempt to show either empty (=
|
||||
// black) window surface (if shown for the first time) or it would show
|
||||
// window with outdated content; note that the window was already refreshed
|
||||
// in the wxTopLevelWindowBase::Show() call above:
|
||||
if ( show )
|
||||
Update();
|
||||
|
||||
// hide/show the window by setting its opacity to 0/full:
|
||||
m_dfbwin->SetOpacity(show ? m_opacity : 0);
|
||||
|
||||
if ( show )
|
||||
{
|
||||
wxWindow *focused = wxWindow::FindFocus();
|
||||
|
@@ -4623,6 +4623,33 @@ void wxGrid::CalcWindowSizes()
|
||||
int cw, ch;
|
||||
GetClientSize( &cw, &ch );
|
||||
|
||||
// this block of code tries to work around the following problem: the grid
|
||||
// could have been just resized to have enough space to show the full grid
|
||||
// window contents without the scrollbars, but its client size could be
|
||||
// not big enough because the grid has the scrollbars right now and so the
|
||||
// scrollbars would remain even though we don't need them any more
|
||||
//
|
||||
// to prevent this from happening, check if we have enough space for
|
||||
// everything without the scrollbars and explicitly disable them then
|
||||
wxSize size = GetSize() - GetWindowBorderSize();
|
||||
if ( size != wxSize(cw, ch) )
|
||||
{
|
||||
// check if we have enough space for grid window after accounting for
|
||||
// the fixed size elements
|
||||
size.x -= m_rowLabelWidth;
|
||||
size.y -= m_colLabelHeight;
|
||||
|
||||
const wxSize vsize = m_gridWin->GetVirtualSize();
|
||||
|
||||
if ( size.x >= vsize.x && size.y >= vsize.y )
|
||||
{
|
||||
// yes, we do, so remove the scrollbars and use the new client size
|
||||
// (which should be the same as full window size - borders now)
|
||||
SetScrollbars(0, 0, 0, 0);
|
||||
GetClientSize(&cw, &ch);
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_cornerLabelWin && m_cornerLabelWin->IsShown() )
|
||||
m_cornerLabelWin->SetSize( 0, 0, m_rowLabelWidth, m_colLabelHeight );
|
||||
|
||||
@@ -10652,46 +10679,22 @@ void wxGrid::AutoSizeColLabelSize( int col )
|
||||
|
||||
wxSize wxGrid::DoGetBestSize() const
|
||||
{
|
||||
// don't set sizes, only calculate them
|
||||
wxGrid *self = (wxGrid *)this; // const_cast
|
||||
|
||||
int width, height;
|
||||
width = self->SetOrCalcColumnSizes(true);
|
||||
height = self->SetOrCalcRowSizes(true);
|
||||
|
||||
if (!width)
|
||||
width = 100;
|
||||
if (!height)
|
||||
height = 80;
|
||||
|
||||
// Round up to a multiple the scroll rate
|
||||
// NOTE: this still doesn't get rid of the scrollbars;
|
||||
// is there any magic incantation for that?
|
||||
int xpu, ypu;
|
||||
GetScrollPixelsPerUnit(&xpu, &ypu);
|
||||
if (xpu)
|
||||
width += 1 + xpu - (width % xpu);
|
||||
if (ypu)
|
||||
height += 1 + ypu - (height % ypu);
|
||||
|
||||
// limit to 1/4 of the screen size
|
||||
int maxwidth, maxheight;
|
||||
wxDisplaySize( &maxwidth, &maxheight );
|
||||
maxwidth /= 2;
|
||||
maxheight /= 2;
|
||||
if ( width > maxwidth )
|
||||
width = maxwidth;
|
||||
if ( height > maxheight )
|
||||
height = maxheight;
|
||||
|
||||
wxSize best(width, height);
|
||||
// we do the same as in AutoSize() here with the exception that we don't
|
||||
// change the column/row sizes, only calculate them
|
||||
wxSize size(self->SetOrCalcColumnSizes(true) - m_rowLabelWidth + m_extraWidth,
|
||||
self->SetOrCalcRowSizes(true) - m_colLabelHeight + m_extraHeight);
|
||||
wxSize sizeFit(GetScrollX(size.x) * GetScrollLineX(),
|
||||
GetScrollY(size.y) * GetScrollLineY());
|
||||
|
||||
// NOTE: This size should be cached, but first we need to add calls to
|
||||
// InvalidateBestSize everywhere that could change the results of this
|
||||
// calculation.
|
||||
// CacheBestSize(size);
|
||||
|
||||
return best;
|
||||
return wxSize(sizeFit.x + m_rowLabelWidth, sizeFit.y + m_colLabelHeight)
|
||||
+ GetWindowBorderSize();
|
||||
}
|
||||
|
||||
void wxGrid::Fit()
|
||||
|
@@ -570,7 +570,9 @@ bool wxSimpleHtmlListBox::Create(wxWindow *parent, wxWindowID id,
|
||||
if (!wxHtmlListBox::Create(parent, id, pos, size, style, name))
|
||||
return false;
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
SetValidator(validator);
|
||||
#endif
|
||||
for (int i=0; i<n; i++)
|
||||
Append(choices[i]);
|
||||
|
||||
@@ -588,7 +590,9 @@ bool wxSimpleHtmlListBox::Create(wxWindow *parent, wxWindowID id,
|
||||
if (!wxHtmlListBox::Create(parent, id, pos, size, style, name))
|
||||
return false;
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
SetValidator(validator);
|
||||
#endif
|
||||
Append(choices);
|
||||
|
||||
return true;
|
||||
|
@@ -224,7 +224,11 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
#ifdef __WXGTK__
|
||||
if ( !wxTextCtrlBase::Create(parent, id, pos, size, wxSUNKEN_BORDER | style, validator, name) )
|
||||
#else
|
||||
if ( !wxTextCtrlBase::Create(parent, id, pos, size, wxSIMPLE_BORDER | style, validator, name) )
|
||||
#endif
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -424,7 +428,10 @@ void wxSearchCtrl::LayoutControls(int x, int y, int width, int height)
|
||||
// position the subcontrols inside the client area
|
||||
|
||||
m_searchButton->SetSize(x, y + ICON_OFFSET, sizeSearch.x, height);
|
||||
m_text->SetSize(x + sizeSearch.x + searchMargin, y + ICON_OFFSET, textWidth, height);
|
||||
m_text->SetSize( x + sizeSearch.x + searchMargin,
|
||||
y + ICON_OFFSET - BORDER,
|
||||
textWidth,
|
||||
height);
|
||||
m_cancelButton->SetSize(x + sizeSearch.x + searchMargin + textWidth + cancelMargin,
|
||||
y + ICON_OFFSET, sizeCancel.x, height);
|
||||
}
|
||||
@@ -1058,7 +1065,7 @@ void wxSearchCtrl::OnSetFocus( wxFocusEvent& /*event*/ )
|
||||
}
|
||||
}
|
||||
|
||||
void wxSearchCtrl::OnSize( wxSizeEvent& event )
|
||||
void wxSearchCtrl::OnSize( wxSizeEvent& WXUNUSED(event) )
|
||||
{
|
||||
int width, height;
|
||||
GetSize(&width, &height);
|
||||
|
@@ -220,6 +220,20 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
||||
if (!wxTheApp->IsInAssert())
|
||||
#endif // __WXDEBUG__
|
||||
{
|
||||
guint idleID_save;
|
||||
{
|
||||
// Allow another idle source to be added while this one is busy.
|
||||
// Needed if an idle event handler runs a new event loop,
|
||||
// for example by showing a dialog.
|
||||
#if wxUSE_THREADS
|
||||
wxMutexLocker lock(gs_idleTagsMutex);
|
||||
#endif
|
||||
idleID_save = wxTheApp->m_idleTag;
|
||||
wxTheApp->m_idleTag = 0;
|
||||
g_isIdle = true;
|
||||
wxAddEmissionHook();
|
||||
}
|
||||
|
||||
// When getting called from GDK's time-out handler
|
||||
// we are no longer within GDK's grab on the GUI
|
||||
// thread so we must lock it here ourselves.
|
||||
@@ -233,6 +247,17 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
|
||||
|
||||
// Release lock again
|
||||
gdk_threads_leave();
|
||||
|
||||
{
|
||||
// If another idle source was added, remove it
|
||||
#if wxUSE_THREADS
|
||||
wxMutexLocker lock(gs_idleTagsMutex);
|
||||
#endif
|
||||
if (wxTheApp->m_idleTag != 0)
|
||||
g_source_remove(wxTheApp->m_idleTag);
|
||||
wxTheApp->m_idleTag = idleID_save;
|
||||
g_isIdle = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!moreIdles)
|
||||
|
@@ -375,10 +375,10 @@ void gtk_assert_dialog_init(GtkAssertDialog *dlg)
|
||||
|
||||
/* add the stop button */
|
||||
gtk_assert_dialog_add_button (dlg, "_Stop", GTK_STOCK_QUIT, GTK_ASSERT_DIALOG_STOP);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_ASSERT_DIALOG_STOP);
|
||||
|
||||
/* add the continue button */
|
||||
continuebtn = gtk_assert_dialog_add_button (dlg, "_Continue", GTK_STOCK_YES, GTK_ASSERT_DIALOG_CONTINUE);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_ASSERT_DIALOG_CONTINUE);
|
||||
g_signal_connect (continuebtn, "clicked", G_CALLBACK(gtk_assert_dialog_continue_callback), dlg);
|
||||
|
||||
/* complete creation */
|
||||
|
@@ -200,6 +200,7 @@ gtkcombobox_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -348,6 +349,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
||||
|
||||
g_signal_connect_after (m_widget, "changed",
|
||||
G_CALLBACK (gtkcombobox_changed_callback), this);
|
||||
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@@ -371,16 +373,10 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
|
||||
this);
|
||||
g_signal_connect_after (entry, "changed",
|
||||
G_CALLBACK (gtkcombo_text_changed_callback), this);
|
||||
|
||||
// This is required for tool bar support
|
||||
// Doesn't currently work
|
||||
// wxSize setsize = GetSize();
|
||||
// gtk_widget_set_size_request( m_widget, setsize.x, setsize.y );
|
||||
}
|
||||
|
||||
SetInitialSize(size); // need this too because this is a wxControlWithItems
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -118,7 +118,7 @@ int wxDialog::ShowModal()
|
||||
wxWindow *parent = wxTheApp->GetTopWindow();
|
||||
if ( parent &&
|
||||
parent != this &&
|
||||
parent->IsBeingDeleted() &&
|
||||
!parent->IsBeingDeleted() &&
|
||||
!(parent->GetExtraStyle() & wxWS_EX_TRANSIENT) )
|
||||
{
|
||||
m_parent = parent;
|
||||
|
@@ -631,20 +631,22 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar )
|
||||
|
||||
void wxFrame::UpdateMenuBarSize()
|
||||
{
|
||||
GtkRequisition req;
|
||||
|
||||
req.width = 2;
|
||||
req.height = 2;
|
||||
m_menuBarHeight = 2;
|
||||
|
||||
// this is called after Remove with a NULL m_frameMenuBar
|
||||
if ( m_frameMenuBar )
|
||||
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_frameMenuBar->m_widget) )->size_request )
|
||||
(m_frameMenuBar->m_widget, &req );
|
||||
{
|
||||
GtkRequisition req;
|
||||
gtk_widget_ensure_style(m_frameMenuBar->m_widget);
|
||||
// have to call class method directly because
|
||||
// "size_request" signal is overridden by wx
|
||||
GTK_WIDGET_GET_CLASS(m_frameMenuBar->m_widget)->size_request(
|
||||
m_frameMenuBar->m_widget, &req);
|
||||
|
||||
m_menuBarHeight = req.height;
|
||||
m_menuBarHeight = req.height;
|
||||
}
|
||||
|
||||
// resize window in OnInternalIdle
|
||||
|
||||
GtkUpdateSize();
|
||||
}
|
||||
|
||||
|
@@ -215,6 +215,27 @@ static gint gtk_toolbar_tool_callback( GtkWidget *WXUNUSED(widget),
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
static
|
||||
void gtktoolwidget_size_callback( GtkWidget *widget,
|
||||
GtkAllocation *alloc,
|
||||
wxWindow *win )
|
||||
{
|
||||
// this shouldn't happen...
|
||||
if (win->GetParent()->m_wxwindow) return;
|
||||
|
||||
wxSize size = win->GetEffectiveMinSize();
|
||||
if (size.y != alloc->height)
|
||||
{
|
||||
GtkAllocation alloc2;
|
||||
alloc2.x = alloc->x;
|
||||
alloc2.y = (alloc->height - size.y + 3) / 2;
|
||||
alloc2.width = alloc->width;
|
||||
alloc2.height = size.y;
|
||||
gtk_widget_size_allocate( widget, &alloc2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
// InsertChild callback for wxToolBar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -453,6 +474,11 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||
(const char *) NULL,
|
||||
posGtk
|
||||
);
|
||||
|
||||
// connect after in order to correct size_allocate events
|
||||
g_signal_connect_after (tool->GetControl()->m_widget, "size_allocate",
|
||||
G_CALLBACK (gtktoolwidget_size_callback), tool->GetControl());
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -194,7 +194,7 @@ int wxDialog::ShowModal()
|
||||
wxWindow *parent = wxTheApp->GetTopWindow();
|
||||
if ( parent &&
|
||||
parent != this &&
|
||||
parent->IsBeingDeleted() &&
|
||||
!parent->IsBeingDeleted() &&
|
||||
!(parent->GetExtraStyle() & wxWS_EX_TRANSIENT) )
|
||||
{
|
||||
m_parent = parent;
|
||||
|
@@ -1836,6 +1836,9 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
|
||||
*width = FixedToInt(textAfter - textBefore);
|
||||
|
||||
::ATSUDisposeTextLayout(atsuLayout);
|
||||
#if SIZEOF_WCHAR_T == 4
|
||||
free( ubuf ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const
|
||||
@@ -1894,6 +1897,9 @@ void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArr
|
||||
}
|
||||
|
||||
::ATSUDisposeTextLayout(atsuLayout);
|
||||
#if SIZEOF_WCHAR_T == 4
|
||||
free( ubuf ) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
void * wxMacCoreGraphicsContext::GetNativeContext()
|
||||
|
@@ -38,7 +38,7 @@
|
||||
#include "wx/sysopt.h"
|
||||
#include "wx/timer.h"
|
||||
|
||||
#define wxMAC_ALWAYS_USE_GENERIC_LISTCTRL wxT("mac.listctrl.always_use_generic")
|
||||
#include "wx/hashmap.h"
|
||||
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
WX_DEFINE_FLAGS( wxListCtrlStyle )
|
||||
@@ -113,9 +113,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
|
||||
|
||||
WX_DECLARE_EXPORTED_LIST(wxListItem, wxListItemList);
|
||||
WX_DECLARE_HASH_MAP( int, wxListItem*, wxIntegerHash, wxIntegerEqual, wxListItemList );
|
||||
|
||||
#include "wx/listimpl.cpp"
|
||||
WX_DEFINE_LIST(wxListItemList)
|
||||
WX_DEFINE_LIST(wxColumnList)
|
||||
|
||||
// so we can check for column clicks
|
||||
@@ -219,7 +219,8 @@ public:
|
||||
virtual void MacSetColumnInfo( unsigned int row, unsigned int column, wxListItem* item );
|
||||
virtual void MacGetColumnInfo( unsigned int row, unsigned int column, wxListItem& item );
|
||||
virtual void UpdateState(wxMacDataItem* dataItem, wxListItem* item);
|
||||
|
||||
int GetFlags() { return m_flags; }
|
||||
|
||||
protected:
|
||||
// we need to override to provide specialized handling for virtual wxListCtrls
|
||||
virtual OSStatus GetSetItemData(DataBrowserItemID itemID,
|
||||
@@ -274,6 +275,7 @@ protected:
|
||||
|
||||
wxClientDataType m_clientDataItemsType;
|
||||
bool m_isVirtual;
|
||||
int m_flags;
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacDataBrowserListCtrlControl)
|
||||
};
|
||||
|
||||
@@ -505,6 +507,9 @@ void wxListCtrlTextCtrlWrapper::OnKillFocus( wxFocusEvent &event )
|
||||
BEGIN_EVENT_TABLE(wxListCtrl, wxControl)
|
||||
EVT_LEFT_DOWN(wxListCtrl::OnLeftDown)
|
||||
EVT_LEFT_DCLICK(wxListCtrl::OnDblClick)
|
||||
EVT_MIDDLE_DOWN(wxListCtrl::OnMiddleDown)
|
||||
EVT_RIGHT_DOWN(wxListCtrl::OnRightDown)
|
||||
EVT_CHAR(wxListCtrl::OnChar)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ============================================================================
|
||||
@@ -614,6 +619,67 @@ void wxListCtrl::OnDblClick(wxMouseEvent& event)
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
#if wxABI_VERSION >= 20801
|
||||
void wxListCtrl::OnRightDown(wxMouseEvent& event)
|
||||
{
|
||||
if (m_dbImpl)
|
||||
FireMouseEvent(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition());
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxListCtrl::OnMiddleDown(wxMouseEvent& event)
|
||||
{
|
||||
if (m_dbImpl)
|
||||
FireMouseEvent(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, event.GetPosition());
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxListCtrl::FireMouseEvent(wxEventType eventType, wxPoint position)
|
||||
{
|
||||
wxListEvent le( eventType, GetId() );
|
||||
le.SetEventObject(this);
|
||||
le.m_pointDrag = position;
|
||||
le.m_itemIndex = -1;
|
||||
|
||||
int flags;
|
||||
long item = HitTest(position, flags);
|
||||
if (flags & wxLIST_HITTEST_ONITEM)
|
||||
{
|
||||
le.m_itemIndex = item;
|
||||
if (!IsVirtual())
|
||||
{
|
||||
|
||||
le.m_item.m_itemId = item;
|
||||
GetItem(le.m_item);
|
||||
}
|
||||
GetEventHandler()->ProcessEvent(le);
|
||||
}
|
||||
}
|
||||
|
||||
void wxListCtrl::OnChar(wxKeyEvent& event)
|
||||
{
|
||||
if (m_dbImpl)
|
||||
{
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetId() );
|
||||
le.SetEventObject(this);
|
||||
le.m_code = event.GetKeyCode();
|
||||
le.m_itemIndex = -1;
|
||||
|
||||
if (m_current != -1)
|
||||
{
|
||||
le.m_itemIndex = m_current;
|
||||
if (!IsVirtual())
|
||||
{
|
||||
le.m_item.m_itemId = m_current;
|
||||
GetItem(le.m_item);
|
||||
}
|
||||
GetEventHandler()->ProcessEvent(le);
|
||||
}
|
||||
}
|
||||
event.Skip();
|
||||
}
|
||||
#endif
|
||||
|
||||
bool wxListCtrl::Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
@@ -650,8 +716,7 @@ bool wxListCtrl::Create(wxWindow *parent,
|
||||
else
|
||||
{
|
||||
m_macIsUserPane = false;
|
||||
|
||||
if ( !wxWindow::Create(parent, id, pos, size, style, name) )
|
||||
if ( !wxWindow::Create(parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), name) )
|
||||
return false;
|
||||
m_dbImpl = new wxMacDataBrowserListCtrlControl( this, pos, size, style );
|
||||
m_peer = m_dbImpl;
|
||||
@@ -743,12 +808,15 @@ void wxListCtrl::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
||||
totalWidth += m_dbImpl->GetColumnWidth( column );
|
||||
}
|
||||
|
||||
Boolean vertScrollBar;
|
||||
GetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), NULL, &vertScrollBar );
|
||||
if (totalWidth > width)
|
||||
SetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), true, vertScrollBar );
|
||||
else
|
||||
SetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), false, vertScrollBar );
|
||||
if ( !(m_dbImpl->GetFlags() & wxHSCROLL) )
|
||||
{
|
||||
Boolean vertScrollBar;
|
||||
GetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), NULL, &vertScrollBar );
|
||||
if (totalWidth > width)
|
||||
SetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), true, vertScrollBar );
|
||||
else
|
||||
SetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), false, vertScrollBar );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -962,7 +1030,7 @@ bool wxListCtrl::SetColumnWidth(int col, int width)
|
||||
{
|
||||
wxListItem colInfo;
|
||||
GetColumn(col, colInfo);
|
||||
|
||||
|
||||
colInfo.SetWidth(width);
|
||||
SetColumn(col, colInfo);
|
||||
m_dbImpl->SetColumnWidth(col, mywidth);
|
||||
@@ -1492,19 +1560,43 @@ long wxListCtrl::GetNextItem(long item, int geom, int state) const
|
||||
if (m_genericImpl)
|
||||
return m_genericImpl->GetNextItem(item, geom, state);
|
||||
|
||||
if (m_dbImpl && geom == wxLIST_NEXT_ALL && state == wxLIST_STATE_SELECTED )
|
||||
// TODO: implement all geometry and state options?
|
||||
if ( m_dbImpl )
|
||||
{
|
||||
long count = m_dbImpl->MacGetCount() ;
|
||||
for ( long line = item + 1 ; line < count; line++ )
|
||||
if ( geom == wxLIST_NEXT_ALL || geom == wxLIST_NEXT_BELOW )
|
||||
{
|
||||
wxMacDataItem* id = m_dbImpl->GetItemFromLine(line);
|
||||
if ( m_dbImpl->IsItemSelected(id ) )
|
||||
return line;
|
||||
long count = m_dbImpl->MacGetCount() ;
|
||||
for ( long line = item + 1 ; line < count; line++ )
|
||||
{
|
||||
wxMacDataItem* id = m_dbImpl->GetItemFromLine(line);
|
||||
|
||||
if ( (state == wxLIST_STATE_DONTCARE ) )
|
||||
return line;
|
||||
|
||||
if ( (state & wxLIST_STATE_SELECTED) && m_dbImpl->IsItemSelected( id ) )
|
||||
return line;
|
||||
}
|
||||
}
|
||||
else if ( geom == wxLIST_NEXT_ABOVE )
|
||||
{
|
||||
int item2 = item;
|
||||
if ( item2 == -1 )
|
||||
item2 = m_dbImpl->MacGetCount();
|
||||
|
||||
for ( long line = item2 - 1 ; line >= 0; line-- )
|
||||
{
|
||||
wxMacDataItem* id = m_dbImpl->GetItemFromLine(line);
|
||||
|
||||
if ( (state == wxLIST_STATE_DONTCARE ) )
|
||||
return line;
|
||||
|
||||
if ( (state & wxLIST_STATE_SELECTED) && m_dbImpl->IsItemSelected( id ) )
|
||||
return line;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1883,7 +1975,6 @@ long wxListCtrl::InsertItem(wxListItem& info)
|
||||
info.m_itemId = count;
|
||||
|
||||
m_dbImpl->MacInsertItem(info.m_itemId, &info );
|
||||
wxMacDataItem* dataItem = m_dbImpl->GetItemFromLine(info.m_itemId);
|
||||
|
||||
wxListEvent event( wxEVT_COMMAND_LIST_INSERT_ITEM, GetId() );
|
||||
event.SetEventObject( this );
|
||||
@@ -2198,6 +2289,19 @@ wxDropTarget *wxListCtrl::GetDropTarget() const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if wxABI_VERSION >= 20801
|
||||
void wxListCtrl::SetFocus()
|
||||
{
|
||||
if (m_genericImpl)
|
||||
{
|
||||
m_genericImpl->SetFocus();
|
||||
return;
|
||||
}
|
||||
|
||||
wxWindow::SetFocus();
|
||||
}
|
||||
#endif
|
||||
|
||||
// wxMac internal data structures
|
||||
|
||||
wxMacListCtrlItem::~wxMacListCtrlItem()
|
||||
@@ -2295,6 +2399,7 @@ wxMacDataBrowserListCtrlControl::wxMacDataBrowserListCtrlControl( wxWindow *peer
|
||||
OSStatus err = noErr;
|
||||
m_clientDataItemsType = wxClientData_None;
|
||||
m_isVirtual = false;
|
||||
m_flags = 0;
|
||||
|
||||
if ( style & wxLC_VIRTUAL )
|
||||
m_isVirtual = true;
|
||||
@@ -2339,19 +2444,16 @@ wxMacDataBrowserListCtrlControl::wxMacDataBrowserListCtrlControl( wxWindow *peer
|
||||
SetSortProperty( kMinColumnId - 1 );
|
||||
else
|
||||
SetSortProperty( kMinColumnId );
|
||||
if ( style & wxLC_SORT_ASCENDING )
|
||||
|
||||
m_sortOrder = SortOrder_None;
|
||||
|
||||
if ( style & wxLC_SORT_DESCENDING )
|
||||
{
|
||||
m_sortOrder = SortOrder_Text_Ascending;
|
||||
SetSortOrder( kDataBrowserOrderIncreasing );
|
||||
}
|
||||
else if ( style & wxLC_SORT_DESCENDING )
|
||||
{
|
||||
m_sortOrder = SortOrder_Text_Descending;
|
||||
SetSortOrder( kDataBrowserOrderDecreasing );
|
||||
}
|
||||
else
|
||||
else if ( style & wxLC_SORT_ASCENDING )
|
||||
{
|
||||
m_sortOrder = SortOrder_None;
|
||||
SetSortOrder( kDataBrowserOrderIncreasing );
|
||||
}
|
||||
|
||||
if ( style & wxLC_VRULES )
|
||||
@@ -2362,7 +2464,7 @@ wxMacDataBrowserListCtrlControl::wxMacDataBrowserListCtrlControl( wxWindow *peer
|
||||
}
|
||||
|
||||
verify_noerr( SetHiliteStyle(kDataBrowserTableViewFillHilite ) );
|
||||
err = SetHasScrollBars( (style & wxHSCROLL) != 0 , true );
|
||||
verify_noerr( SetHasScrollBars( (style & wxHSCROLL) != 0 , true ) );
|
||||
}
|
||||
|
||||
pascal Boolean wxMacDataBrowserListCtrlControl::DataBrowserEditTextProc(
|
||||
@@ -2536,6 +2638,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
|
||||
enclosingRect.right - enclosingRect.left,
|
||||
enclosingRect.bottom - enclosingRect.top);
|
||||
|
||||
bool hasFocus = (wxWindow::FindFocus() == list);
|
||||
active = IsControlActive(GetControlRef());
|
||||
|
||||
// don't paint the background over the vertical rule line
|
||||
@@ -2548,10 +2651,17 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
|
||||
{
|
||||
|
||||
GetThemeDrawingState(&savedState);
|
||||
|
||||
GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &backgroundColor);
|
||||
GetThemeTextColor(kThemeTextColorWhite, gdDepth, colorDevice, &labelColor);
|
||||
|
||||
|
||||
if (active && hasFocus)
|
||||
{
|
||||
GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &backgroundColor);
|
||||
GetThemeTextColor(kThemeTextColorWhite, gdDepth, colorDevice, &labelColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetThemeBrushAsColor(kThemeBrushSecondaryHighlightColor, 32, true, &backgroundColor);
|
||||
GetThemeTextColor(kThemeTextColorBlack, gdDepth, colorDevice, &labelColor);
|
||||
}
|
||||
CGContextSaveGState(context);
|
||||
|
||||
CGContextSetRGBFillColor(context, (float)backgroundColor.red / (float)USHRT_MAX,
|
||||
@@ -2568,7 +2678,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
|
||||
labelColor = MAC_WXCOLORREF( color.GetPixel() );
|
||||
else if (list->GetTextColour().Ok())
|
||||
labelColor = MAC_WXCOLORREF( list->GetTextColour().GetPixel() );
|
||||
|
||||
|
||||
if (bgColor.Ok())
|
||||
{
|
||||
backgroundColor = MAC_WXCOLORREF( bgColor.GetPixel() );
|
||||
@@ -2773,7 +2883,7 @@ void wxMacDataBrowserListCtrlControl::ItemNotification(DataBrowserItemID itemID,
|
||||
// avoid asserts by getting out now
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
wxListCtrl *list = wxDynamicCast( GetPeer() , wxListCtrl );
|
||||
if ( list )
|
||||
{
|
||||
@@ -2848,10 +2958,16 @@ Boolean wxMacDataBrowserListCtrlControl::CompareItems(DataBrowserItemID itemOneI
|
||||
bool retval = false;
|
||||
wxString itemText;
|
||||
wxString otherItemText;
|
||||
long itemOrder;
|
||||
long otherItemOrder;
|
||||
|
||||
int colId = sortProperty - kMinColumnId;
|
||||
|
||||
wxListCtrl* list = wxDynamicCast( GetPeer() , wxListCtrl );
|
||||
|
||||
DataBrowserSortOrder sort;
|
||||
verify_noerr(GetSortOrder(&sort));
|
||||
|
||||
if (colId >= 0)
|
||||
{
|
||||
if (!m_isVirtual)
|
||||
@@ -2859,6 +2975,9 @@ Boolean wxMacDataBrowserListCtrlControl::CompareItems(DataBrowserItemID itemOneI
|
||||
wxMacListCtrlItem* item = (wxMacListCtrlItem*)itemOneID;
|
||||
wxMacListCtrlItem* otherItem = (wxMacListCtrlItem*)itemTwoID;
|
||||
|
||||
itemOrder = item->GetOrder();
|
||||
otherItemOrder = item->GetOrder();
|
||||
|
||||
wxListCtrlCompare func = list->GetCompareFunc();
|
||||
if (func != NULL)
|
||||
{
|
||||
@@ -2872,13 +2991,16 @@ Boolean wxMacDataBrowserListCtrlControl::CompareItems(DataBrowserItemID itemOneI
|
||||
if (item1 > -1 && item2 > -1)
|
||||
{
|
||||
int result = func(item1, item2, list->GetCompareFuncData());
|
||||
return result >= 0;
|
||||
if (sort == kDataBrowserOrderIncreasing)
|
||||
return result >= 0;
|
||||
else
|
||||
return result < 0;
|
||||
}
|
||||
}
|
||||
if (item->HasColumnInfo(colId))
|
||||
itemText = item->GetColumnInfo(colId)->GetText();
|
||||
if (otherItem->HasColumnInfo(colId))
|
||||
otherItemText = otherItem->GetColumnInfo(colId)->GetText();
|
||||
|
||||
// we can't use the native control's sorting abilities, so just
|
||||
// sort by item id.
|
||||
return itemOrder < otherItemOrder;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2887,19 +3009,9 @@ Boolean wxMacDataBrowserListCtrlControl::CompareItems(DataBrowserItemID itemOneI
|
||||
long otherItemNum = (long)itemTwoID;
|
||||
itemText = list->OnGetItemText( itemNum-1, colId );
|
||||
otherItemText = list->OnGetItemText( otherItemNum-1, colId );
|
||||
|
||||
}
|
||||
|
||||
DataBrowserSortOrder sort;
|
||||
verify_noerr(GetSortOrder(&sort));
|
||||
|
||||
if ( sort == kDataBrowserOrderIncreasing )
|
||||
{
|
||||
retval = itemText.CmpNoCase( otherItemText ) > 0;
|
||||
}
|
||||
else if ( sort == kDataBrowserOrderDecreasing )
|
||||
{
|
||||
retval = itemText.CmpNoCase( otherItemText ) < 0;
|
||||
|
||||
// virtual listctrls don't support sorting
|
||||
return itemNum < otherItemNum;
|
||||
}
|
||||
}
|
||||
else{
|
||||
@@ -2923,6 +3035,7 @@ void wxMacDataBrowserListCtrlControl::MacSetColumnInfo( unsigned int row, unsign
|
||||
wxMacListCtrlItem* listItem = wx_static_cast(wxMacListCtrlItem*,dataItem);
|
||||
bool hasInfo = listItem->HasColumnInfo( column );
|
||||
listItem->SetColumnInfo( column, item );
|
||||
listItem->SetOrder(row);
|
||||
UpdateState(dataItem, item);
|
||||
|
||||
wxListCtrl* list = wxDynamicCast( GetPeer() , wxListCtrl );
|
||||
@@ -3009,7 +3122,7 @@ wxMacDataItem* wxMacDataBrowserListCtrlControl::CreateItem()
|
||||
|
||||
wxMacListCtrlItem::wxMacListCtrlItem()
|
||||
{
|
||||
m_rowItems = wxListItemList( wxKEY_INTEGER );
|
||||
m_rowItems = wxListItemList();
|
||||
}
|
||||
|
||||
int wxMacListCtrlItem::GetColumnImageValue( unsigned int column )
|
||||
@@ -3049,15 +3162,13 @@ void wxMacListCtrlItem::SetColumnTextValue( unsigned int column, const wxString&
|
||||
|
||||
wxListItem* wxMacListCtrlItem::GetColumnInfo( unsigned int column )
|
||||
{
|
||||
wxListItemList::compatibility_iterator node = m_rowItems.Find( column );
|
||||
wxASSERT_MSG( node, _T("invalid column index in wxMacListCtrlItem") );
|
||||
|
||||
return node->GetData();
|
||||
wxASSERT_MSG( HasColumnInfo(column), _T("invalid column index in wxMacListCtrlItem") );
|
||||
return m_rowItems[column];
|
||||
}
|
||||
|
||||
bool wxMacListCtrlItem::HasColumnInfo( unsigned int column )
|
||||
{
|
||||
return m_rowItems.Find( column ) != NULL;
|
||||
return !(m_rowItems.find( column ) == m_rowItems.end());
|
||||
}
|
||||
|
||||
void wxMacListCtrlItem::SetColumnInfo( unsigned int column, wxListItem* item )
|
||||
@@ -3066,7 +3177,7 @@ void wxMacListCtrlItem::SetColumnInfo( unsigned int column, wxListItem* item )
|
||||
if ( !HasColumnInfo(column) )
|
||||
{
|
||||
wxListItem* listItem = new wxListItem(*item);
|
||||
m_rowItems.Append( column, listItem );
|
||||
m_rowItems[column] = listItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3100,3 +3211,4 @@ void wxMacListCtrlItem::SetColumnInfo( unsigned int column, wxListItem* item )
|
||||
}
|
||||
|
||||
#endif // wxUSE_LISTCTRL
|
||||
|
||||
|
@@ -74,45 +74,56 @@ bool wxStaticText::Create( wxWindow *parent,
|
||||
|
||||
wxSize wxStaticText::DoGetBestSize() const
|
||||
{
|
||||
ControlFontStyleRec controlFont;
|
||||
OSStatus err = m_peer->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
|
||||
verify_noerr( err );
|
||||
|
||||
Rect bestsize = { 0 , 0 , 0 , 0 } ;
|
||||
Point bounds;
|
||||
SInt16 baseline;
|
||||
wxMacCFStringHolder str( m_label, m_font.GetEncoding() );
|
||||
|
||||
if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont )
|
||||
|
||||
// try the built-in best size if available
|
||||
m_peer->GetBestRect( &bestsize ) ;
|
||||
if ( !EmptyRect( &bestsize ) )
|
||||
{
|
||||
err = GetThemeTextDimensions(
|
||||
(!m_label.empty() ? (CFStringRef)str : CFSTR(" ")),
|
||||
m_font.MacGetThemeFontID(), kThemeStateActive, false, &bounds, &baseline );
|
||||
verify_noerr( err );
|
||||
bounds.h = bestsize.right - bestsize.left ;
|
||||
bounds.v = bestsize.bottom - bestsize.top ;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if wxMAC_USE_CORE_GRAPHICS
|
||||
wxClientDC dc(const_cast<wxStaticText*>(this));
|
||||
wxCoord width, height ;
|
||||
dc.GetTextExtent( m_label , &width, &height);
|
||||
bounds.h = width;
|
||||
bounds.v = height;
|
||||
#else
|
||||
wxMacWindowStateSaver sv( this );
|
||||
::TextFont( m_font.MacGetFontNum() );
|
||||
::TextSize( (short)(m_font.MacGetFontSize()) );
|
||||
::TextFace( m_font.MacGetFontStyle() );
|
||||
|
||||
err = GetThemeTextDimensions(
|
||||
(!m_label.empty() ? (CFStringRef)str : CFSTR(" ")),
|
||||
kThemeCurrentPortFont, kThemeStateActive, false, &bounds, &baseline );
|
||||
ControlFontStyleRec controlFont;
|
||||
OSStatus err = m_peer->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
|
||||
verify_noerr( err );
|
||||
#endif
|
||||
|
||||
SInt16 baseline;
|
||||
wxMacCFStringHolder str( m_label, m_font.GetEncoding() );
|
||||
|
||||
if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont )
|
||||
{
|
||||
err = GetThemeTextDimensions(
|
||||
(!m_label.empty() ? (CFStringRef)str : CFSTR(" ")),
|
||||
m_font.MacGetThemeFontID(), kThemeStateActive, false, &bounds, &baseline );
|
||||
verify_noerr( err );
|
||||
}
|
||||
else
|
||||
{
|
||||
#if wxMAC_USE_CORE_GRAPHICS
|
||||
wxClientDC dc(const_cast<wxStaticText*>(this));
|
||||
wxCoord width, height ;
|
||||
dc.GetTextExtent( m_label , &width, &height);
|
||||
bounds.h = width;
|
||||
bounds.v = height;
|
||||
#else
|
||||
wxMacWindowStateSaver sv( this );
|
||||
::TextFont( m_font.MacGetFontNum() );
|
||||
::TextSize( (short)(m_font.MacGetFontSize()) );
|
||||
::TextFace( m_font.MacGetFontStyle() );
|
||||
|
||||
err = GetThemeTextDimensions(
|
||||
(!m_label.empty() ? (CFStringRef)str : CFSTR(" ")),
|
||||
kThemeCurrentPortFont, kThemeStateActive, false, &bounds, &baseline );
|
||||
verify_noerr( err );
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( m_label.empty() )
|
||||
bounds.h = 0;
|
||||
}
|
||||
|
||||
if ( m_label.empty() )
|
||||
bounds.h = 0;
|
||||
|
||||
bounds.h += MacGetLeftBorderSize() + MacGetRightBorderSize();
|
||||
bounds.v += MacGetTopBorderSize() + MacGetBottomBorderSize();
|
||||
|
||||
|
@@ -3027,12 +3027,20 @@ wxMacMLTEHIViewControl::wxMacMLTEHIViewControl( wxTextCtrl *wxPeer,
|
||||
|
||||
m_scrollView = NULL ;
|
||||
TXNFrameOptions frameOptions = FrameOptionsFromWXStyle( style ) ;
|
||||
if ( frameOptions & (kTXNWantVScrollBarMask | kTXNWantHScrollBarMask) )
|
||||
if (( frameOptions & (kTXNWantVScrollBarMask | kTXNWantHScrollBarMask)) || !(frameOptions &kTXNSingleLineOnlyMask))
|
||||
{
|
||||
HIScrollViewCreate(
|
||||
(frameOptions & kTXNWantHScrollBarMask ? kHIScrollViewOptionsHorizScroll : 0)
|
||||
| (frameOptions & kTXNWantVScrollBarMask ? kHIScrollViewOptionsVertScroll : 0) ,
|
||||
&m_scrollView ) ;
|
||||
if ( frameOptions & (kTXNWantVScrollBarMask | kTXNWantHScrollBarMask) )
|
||||
{
|
||||
HIScrollViewCreate(
|
||||
(frameOptions & kTXNWantHScrollBarMask ? kHIScrollViewOptionsHorizScroll : 0)
|
||||
| (frameOptions & kTXNWantVScrollBarMask ? kHIScrollViewOptionsVertScroll : 0) ,
|
||||
&m_scrollView ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
HIScrollViewCreate(kHIScrollViewOptionsVertScroll,&m_scrollView);
|
||||
HIScrollViewSetScrollBarAutoHide(m_scrollView,true);
|
||||
}
|
||||
|
||||
HIViewSetFrame( m_scrollView, &hr );
|
||||
HIViewSetVisible( m_scrollView, true );
|
||||
|
@@ -156,6 +156,7 @@ static const EventTypeSpec eventList[] =
|
||||
{ kEventClassCommand, kEventProcessCommand } ,
|
||||
{ kEventClassCommand, kEventCommandUpdateStatus } ,
|
||||
|
||||
{ kEventClassControl , kEventControlGetClickActivation } ,
|
||||
{ kEventClassControl , kEventControlHit } ,
|
||||
|
||||
{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
|
||||
@@ -350,6 +351,18 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
result = thisWindow->MacControlHit( handler , event ) ;
|
||||
break ;
|
||||
|
||||
case kEventControlGetClickActivation :
|
||||
{
|
||||
// fix to always have a proper activation for DataBrowser controls (stay in bkgnd otherwise)
|
||||
WindowRef owner = cEvent.GetParameter<WindowRef>(kEventParamWindowRef);
|
||||
if ( !IsWindowActive(owner) )
|
||||
{
|
||||
cEvent.SetParameter(kEventParamClickActivation,(UInt32) kActivateAndIgnoreClick) ;
|
||||
result = noErr ;
|
||||
}
|
||||
}
|
||||
break ;
|
||||
|
||||
default :
|
||||
break ;
|
||||
}
|
||||
|
@@ -1737,7 +1737,11 @@ bool wxListCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
|
||||
{
|
||||
if ( msg->wParam == VK_RETURN )
|
||||
{
|
||||
// we need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED
|
||||
// We need VK_RETURN to generate wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
|
||||
// but only if none of the modifiers is down. We'll let normal
|
||||
// accelerators handle those.
|
||||
if ( !wxIsCtrlDown() && !wxIsCtrlDown() &&
|
||||
!((HIWORD(msg->lParam) & KF_ALTDOWN) == KF_ALTDOWN))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -400,6 +400,28 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
||||
pos += 2; // for the title itself and its separator
|
||||
|
||||
BOOL ok = false;
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
// Currently, mixing owner-drawn and non-owner-drawn items results in
|
||||
// inconsistent margins, so we force this to be owner-drawn if any other
|
||||
// items already are. Later we might want to use a boolean in the wxMenu
|
||||
// to avoid search. Also we might make this fix unnecessary by getting the correct
|
||||
// margin using NONCLIENTMETRICS.
|
||||
if ( !pItem->IsOwnerDrawn() )
|
||||
{
|
||||
// Check if any other items are ownerdrawn, and make ownerdrawn if so
|
||||
wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
if (node->GetData()->IsOwnerDrawn())
|
||||
{
|
||||
pItem->SetOwnerDrawn(true);
|
||||
break;
|
||||
}
|
||||
node = node->GetNext();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// check if we have something more than a simple text item
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
|
@@ -107,8 +107,21 @@ int wxMessageDialog::ShowModal()
|
||||
else
|
||||
msStyle |= MB_TASKMODAL;
|
||||
|
||||
// per MSDN documentation for MessageBox() we can prefix the message with 2
|
||||
// right-to-left mark characters to tell the function to use RTL layout
|
||||
// (unfortunately this only works in Unicode builds)
|
||||
wxString message = m_message;
|
||||
#if wxUSE_UNICODE
|
||||
if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
|
||||
{
|
||||
// NB: not all compilers support \u escapes
|
||||
static const wchar_t wchRLM = 0x200f;
|
||||
message.Prepend(wxString(wchRLM, 2));
|
||||
}
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
// do show the dialog
|
||||
int msAns = MessageBox(hWnd, m_message.c_str(), m_caption.c_str(), msStyle);
|
||||
int msAns = MessageBox(hWnd, message, m_caption, msStyle);
|
||||
int ans;
|
||||
switch (msAns)
|
||||
{
|
||||
|
@@ -80,7 +80,7 @@ protected:
|
||||
HWND m_hwnd; // window we're associated with
|
||||
|
||||
// get default drop effect for given keyboard flags
|
||||
static inline DWORD GetDropEffect(DWORD flags, wxDragResult defaultAction);
|
||||
static DWORD GetDropEffect(DWORD flags, wxDragResult defaultAction);
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxIDropTarget)
|
||||
};
|
||||
|
@@ -1413,7 +1413,7 @@ const wxChar *GetFullName(const wxRegKey *pKey, const wxChar *szValue)
|
||||
return s_str.c_str();
|
||||
}
|
||||
|
||||
void RemoveTrailingSeparator(wxString& str)
|
||||
inline void RemoveTrailingSeparator(wxString& str)
|
||||
{
|
||||
if ( !str.empty() && str.Last() == REG_SEPARATOR )
|
||||
str.Truncate(str.Len() - 1);
|
||||
|
@@ -42,6 +42,13 @@
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/missing.h"
|
||||
|
||||
// the values coincide with those in tmschema.h
|
||||
#define BP_GROUPBOX 4
|
||||
|
||||
#define GBS_NORMAL 1
|
||||
|
||||
#define TMT_FONT 210
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWin macros
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -383,40 +390,11 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT& rc)
|
||||
// background mode doesn't change anything: the static box def window proc
|
||||
// still draws the label in its own colours, so we need to redraw the text
|
||||
// ourselves if we have a non default fg colour
|
||||
if ( wxUxThemeEngine::GetIfActive() )
|
||||
if ( m_hasFgCol && wxUxThemeEngine::GetIfActive() )
|
||||
{
|
||||
// draw over the text in default colour in our colour
|
||||
dc.SetFont(GetFont());
|
||||
|
||||
HDC hdc = GetHdcOf(dc);
|
||||
if ( m_hasFgCol )
|
||||
{
|
||||
::SetTextColor(hdc, GetForegroundColour().GetPixel());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxUxThemeHandle hTheme(this, L"BUTTON");
|
||||
if (hTheme)
|
||||
{
|
||||
COLORREF col;
|
||||
wxUxThemeEngine::Get()->GetThemeColor(
|
||||
hTheme,
|
||||
4 /* BP_GROUPBOX */,
|
||||
1 /* GBS_NORMAL */,
|
||||
3803 /* TMT_TEXTCOLOR */,
|
||||
&col);
|
||||
|
||||
::SetTextColor(hdc, col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// can't open the theme - default to blue
|
||||
::SetTextColor(hdc, 0x00D54600);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: value of x is hardcoded as this is what it is on my system,
|
||||
// no idea if it's true everywhere
|
||||
::SetTextColor(hdc, GetForegroundColour().GetPixel());
|
||||
|
||||
const bool rtl = wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft;
|
||||
if ( rtl )
|
||||
@@ -425,13 +403,17 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT& rc)
|
||||
// Get dimensions of the label
|
||||
const wxString label = GetLabel();
|
||||
int width, height;
|
||||
dc.GetTextExtent(wxStripMenuCodes(label, wxStrip_Mnemonics), &width, &height);
|
||||
dc.GetTextExtent(wxStripMenuCodes(label, wxStrip_Mnemonics),
|
||||
&width, &height);
|
||||
|
||||
int x;
|
||||
int y = height;
|
||||
|
||||
// first we need to correctly paint the background of the label
|
||||
// as Windows ignores the brush offset when doing it
|
||||
//
|
||||
// FIXME: value of x is hardcoded as this is what it is on my system,
|
||||
// no idea if it's true everywhere
|
||||
RECT dimensions = {0, 0, 0, y};
|
||||
if ( !rtl )
|
||||
{
|
||||
@@ -452,6 +434,54 @@ void wxStaticBox::PaintForeground(wxDC& dc, const RECT& rc)
|
||||
dimensions.bottom += 2;
|
||||
PaintBackground(dc, dimensions);
|
||||
|
||||
// choose the correct font
|
||||
AutoHFONT font;
|
||||
SelectInHDC selFont;
|
||||
if ( m_hasFont )
|
||||
{
|
||||
selFont.Init(hdc, GetHfontOf(GetFont()));
|
||||
}
|
||||
else // no font set, use the one set by the theme
|
||||
{
|
||||
wxUxThemeHandle hTheme(this, L"BUTTON");
|
||||
if ( hTheme )
|
||||
{
|
||||
// GetThemeFont() expects its parameter to be LOGFONTW and not
|
||||
// LOGFONTA even in ANSI programs and will happily corrupt
|
||||
// memory after the struct end if we pass a LOGFONTA (which is
|
||||
// smaller) to it!
|
||||
LOGFONTW lfw;
|
||||
if ( wxUxThemeEngine::Get()->GetThemeFont
|
||||
(
|
||||
hTheme,
|
||||
hdc,
|
||||
BP_GROUPBOX,
|
||||
GBS_NORMAL,
|
||||
TMT_FONT,
|
||||
(LOGFONT *)&lfw
|
||||
) == S_OK )
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
// ok, no conversion necessary
|
||||
const LOGFONT& lf = lfw;
|
||||
#else // !wxUSE_UNICODE
|
||||
// most of the fields are the same in LOGFONTA and LOGFONTW
|
||||
LOGFONT lf;
|
||||
memcpy(&lf, &lfw, sizeof(lf));
|
||||
|
||||
// but the face name must be converted
|
||||
WideCharToMultiByte(CP_ACP, 0, lfw.lfFaceName, -1,
|
||||
lf.lfFaceName, sizeof(lf.lfFaceName),
|
||||
NULL, NULL);
|
||||
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
||||
|
||||
font.Init(lf);
|
||||
if ( font )
|
||||
selFont.Init(hdc, font);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// now draw the text
|
||||
if ( !rtl )
|
||||
{
|
||||
|
@@ -263,50 +263,10 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
|
||||
EVT_SET_FOCUS(wxTextCtrl::OnSetFocus)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// function prototypes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
LRESULT APIENTRY _EXPORT wxTextCtrlWndProc(HWND hWnd,
|
||||
UINT message,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// global vars
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// the pointer to standard text control wnd proc
|
||||
static WNDPROC gs_wndprocEdit = (WNDPROC)NULL;
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wnd proc for subclassed edit control
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
LRESULT APIENTRY _EXPORT wxTextCtrlWndProc(HWND hWnd,
|
||||
UINT message,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch ( message )
|
||||
{
|
||||
case WM_CUT:
|
||||
case WM_COPY:
|
||||
case WM_PASTE:
|
||||
{
|
||||
wxWindow *win = wxFindWinFromHandle((WXHWND)hWnd);
|
||||
if( win->HandleClipboardEvent( message ) )
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ::CallWindowProc(CASTWNDPROC gs_wndprocEdit, hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// creation
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -331,7 +291,8 @@ wxTextCtrl::~wxTextCtrl()
|
||||
delete m_privateContextMenu;
|
||||
}
|
||||
|
||||
bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
bool wxTextCtrl::Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@@ -348,6 +309,16 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
||||
return false;
|
||||
|
||||
if ( !MSWCreateText(value, pos, size) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTextCtrl::MSWCreateText(const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size)
|
||||
{
|
||||
// translate wxWin style flags to MSW ones
|
||||
WXDWORD msStyle = MSWGetCreateWindowFlags();
|
||||
|
||||
@@ -356,7 +327,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
#if defined(__POCKETPC__) || defined(__SMARTPHONE__)
|
||||
// A control that capitalizes the first letter
|
||||
if (style & wxTE_CAPITALIZE)
|
||||
if ( HasFlag(wxTE_CAPITALIZE) )
|
||||
windowClass = wxT("CAPEDIT");
|
||||
#endif
|
||||
|
||||
@@ -511,7 +482,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
// Windows XP, so if we're sure it works correctly under other
|
||||
// systems we could do this only for XP
|
||||
SetSize(-1, 1); // 1 is small enough to force vert scrollbar
|
||||
SetSize(size);
|
||||
SetInitialSize(size);
|
||||
}
|
||||
else if ( m_windowStyle & wxTE_AUTO_URL )
|
||||
{
|
||||
@@ -524,9 +495,6 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||
}
|
||||
#endif // wxUSE_RICHEDIT
|
||||
|
||||
gs_wndprocEdit = wxSetWindowProc((HWND)GetHwnd(),
|
||||
wxTextCtrlWndProc);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -640,6 +608,60 @@ WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
|
||||
|
||||
void wxTextCtrl::SetWindowStyleFlag(long style)
|
||||
{
|
||||
// changing the alignment of the control dynamically only works under XP
|
||||
// (but not older Windows version) and only for plain EDIT controls (not
|
||||
// RICH ones) and we have to recreate the control to make it always work
|
||||
if ( IsRich() || wxGetWinVersion() < wxWinVersion_XP )
|
||||
{
|
||||
const long alignMask = wxTE_LEFT | wxTE_CENTRE | wxTE_RIGHT;
|
||||
if ( (style & alignMask) != (GetWindowStyle() & alignMask) )
|
||||
{
|
||||
const wxString value = GetValue();
|
||||
const wxPoint pos = GetPosition();
|
||||
const wxSize size = GetSize();
|
||||
|
||||
// delete the old window
|
||||
HWND hwnd = GetHwnd();
|
||||
DissociateHandle();
|
||||
::DestroyWindow(hwnd);
|
||||
|
||||
// create the new one with the updated flags
|
||||
m_windowStyle = style;
|
||||
MSWCreateText(value, pos, size);
|
||||
|
||||
// and make sure it has the same attributes as before
|
||||
if ( m_hasFont )
|
||||
{
|
||||
// calling SetFont(m_font) would do nothing as the code would
|
||||
// notice that the font didn't change, so force it to believe
|
||||
// that it did
|
||||
wxFont font = m_font;
|
||||
m_font = wxNullFont;
|
||||
SetFont(font);
|
||||
}
|
||||
|
||||
if ( m_hasFgCol )
|
||||
{
|
||||
wxColour colFg = m_foregroundColour;
|
||||
m_foregroundColour = wxNullColour;
|
||||
SetForegroundColour(colFg);
|
||||
}
|
||||
|
||||
if ( m_hasBgCol )
|
||||
{
|
||||
wxColour colBg = m_backgroundColour;
|
||||
m_backgroundColour = wxNullColour;
|
||||
SetBackgroundColour(colBg);
|
||||
}
|
||||
|
||||
// note that text styles are lost but this is probably not a big
|
||||
// problem: if you use styles, you probably don't use nor change
|
||||
// alignment flags anyhow
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_RICHEDIT
|
||||
// we have to deal with some styles separately because they can't be
|
||||
// changed by simply calling SetWindowLong(GWL_STYLE) but can be changed
|
||||
@@ -1923,41 +1945,53 @@ WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
||||
{
|
||||
WXLRESULT lRc = wxTextCtrlBase::MSWWindowProc(nMsg, wParam, lParam);
|
||||
|
||||
if ( nMsg == WM_GETDLGCODE )
|
||||
switch ( nMsg )
|
||||
{
|
||||
// we always want the chars and the arrows: the arrows for navigation
|
||||
// and the chars because we want Ctrl-C to work even in a read only
|
||||
// control
|
||||
long lDlgCode = DLGC_WANTCHARS | DLGC_WANTARROWS;
|
||||
case WM_GETDLGCODE:
|
||||
{
|
||||
// we always want the chars and the arrows: the arrows for
|
||||
// navigation and the chars because we want Ctrl-C to work even
|
||||
// in a read only control
|
||||
long lDlgCode = DLGC_WANTCHARS | DLGC_WANTARROWS;
|
||||
|
||||
if ( IsEditable() )
|
||||
{
|
||||
// we may have several different cases:
|
||||
// 1. normal case: both TAB and ENTER are used for dlg navigation
|
||||
// 2. ctrl which wants TAB for itself: ENTER is used to pass to the
|
||||
// next control in the dialog
|
||||
// 3. ctrl which wants ENTER for itself: TAB is used for dialog
|
||||
// navigation
|
||||
// 4. ctrl which wants both TAB and ENTER: Ctrl-ENTER is used to go
|
||||
// to the next control
|
||||
if ( IsEditable() )
|
||||
{
|
||||
// we may have several different cases:
|
||||
// 1. normal: both TAB and ENTER are used for navigation
|
||||
// 2. ctrl wants TAB for itself: ENTER is used to pass to
|
||||
// the next control in the dialog
|
||||
// 3. ctrl wants ENTER for itself: TAB is used for dialog
|
||||
// navigation
|
||||
// 4. ctrl wants both TAB and ENTER: Ctrl-ENTER is used to
|
||||
// go to the next control (we need some way to do it)
|
||||
|
||||
// the multiline edit control should always get <Return> for itself
|
||||
if ( HasFlag(wxTE_PROCESS_ENTER) || HasFlag(wxTE_MULTILINE) )
|
||||
lDlgCode |= DLGC_WANTMESSAGE;
|
||||
// multiline controls should always get ENTER for themselves
|
||||
if ( HasFlag(wxTE_PROCESS_ENTER) || HasFlag(wxTE_MULTILINE) )
|
||||
lDlgCode |= DLGC_WANTMESSAGE;
|
||||
|
||||
if ( HasFlag(wxTE_PROCESS_TAB) )
|
||||
lDlgCode |= DLGC_WANTTAB;
|
||||
if ( HasFlag(wxTE_PROCESS_TAB) )
|
||||
lDlgCode |= DLGC_WANTTAB;
|
||||
|
||||
lRc |= lDlgCode;
|
||||
}
|
||||
else // !editable
|
||||
{
|
||||
// NB: use "=", not "|=" as the base class version returns the
|
||||
// same flags is this state as usual (i.e. including
|
||||
// DLGC_WANTMESSAGE). This is strange (how does it work in the
|
||||
// native Win32 apps?) but for now live with it.
|
||||
lRc = lDlgCode;
|
||||
}
|
||||
lRc |= lDlgCode;
|
||||
}
|
||||
else // !editable
|
||||
{
|
||||
// NB: use "=", not "|=" as the base class version returns
|
||||
// the same flags is this state as usual (i.e.
|
||||
// including DLGC_WANTMESSAGE). This is strange (how
|
||||
// does it work in the native Win32 apps?) but for now
|
||||
// live with it.
|
||||
lRc = lDlgCode;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_CUT:
|
||||
case WM_COPY:
|
||||
case WM_PASTE:
|
||||
if ( HandleClipboardEvent(nMsg) )
|
||||
lRc = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return lRc;
|
||||
|
@@ -1172,6 +1172,10 @@ void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font)
|
||||
|
||||
attr->SetFont(font);
|
||||
|
||||
// Reset the item's text to ensure that the bounding rect will be adjusted
|
||||
// for the new font.
|
||||
SetItemText(item, GetItemText(item));
|
||||
|
||||
RefreshItem(item);
|
||||
}
|
||||
|
||||
|
@@ -3017,6 +3017,16 @@ bool wxRichTextParagraph::Draw(wxDC& dc, const wxRichTextRange& range, const wxR
|
||||
|
||||
wxTextAttrEx bulletAttr(GetCombinedAttributes());
|
||||
|
||||
// Combine with the font of the first piece of content, if one is specified
|
||||
if (GetChildren().GetCount() > 0)
|
||||
{
|
||||
wxRichTextObject* firstObj = (wxRichTextObject*) GetChildren().GetFirst()->GetData();
|
||||
if (firstObj->GetAttributes().HasFont())
|
||||
{
|
||||
wxRichTextApplyStyle(bulletAttr, firstObj->GetAttributes());
|
||||
}
|
||||
}
|
||||
|
||||
// Get line height from first line, if any
|
||||
wxRichTextLine* line = m_cachedLines.GetFirst() ? (wxRichTextLine* ) m_cachedLines.GetFirst()->GetData() : (wxRichTextLine*) NULL;
|
||||
|
||||
|
@@ -74,6 +74,7 @@ BEGIN_EVENT_TABLE( wxRichTextCtrl, wxControl )
|
||||
EVT_SIZE(wxRichTextCtrl::OnSize)
|
||||
EVT_SET_FOCUS(wxRichTextCtrl::OnSetFocus)
|
||||
EVT_KILL_FOCUS(wxRichTextCtrl::OnKillFocus)
|
||||
EVT_MOUSE_CAPTURE_LOST(wxRichTextCtrl::OnCaptureLost)
|
||||
EVT_CONTEXT_MENU(wxRichTextCtrl::OnContextMenu)
|
||||
|
||||
EVT_MENU(wxID_UNDO, wxRichTextCtrl::OnUndo)
|
||||
@@ -325,6 +326,11 @@ void wxRichTextCtrl::OnKillFocus(wxFocusEvent& WXUNUSED(event))
|
||||
// Refresh(false);
|
||||
}
|
||||
|
||||
void wxRichTextCtrl::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event))
|
||||
{
|
||||
m_dragging = false;
|
||||
}
|
||||
|
||||
/// Left-click
|
||||
void wxRichTextCtrl::OnLeftClick(wxMouseEvent& event)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user