Fold wxOSX-specific wxImageList into generic version
Get rid of wxOSX wxImageList implementation as it was 99% identical to the generic version and the non-identical parts should really have been made part of the generic version too from the beginning. Notably, use GetScaled{Width,Height}() in Add() method in the generic version too now.
This commit is contained in:
68
Makefile.in
68
Makefile.in
@@ -3314,7 +3314,6 @@ COND_TOOLKIT_OSX_COCOA_GUI_HDR = \
|
|||||||
wx/osx/fontdlg.h \
|
wx/osx/fontdlg.h \
|
||||||
wx/osx/frame.h \
|
wx/osx/frame.h \
|
||||||
wx/osx/gauge.h \
|
wx/osx/gauge.h \
|
||||||
wx/osx/imaglist.h \
|
|
||||||
wx/osx/listbox.h \
|
wx/osx/listbox.h \
|
||||||
wx/osx/listctrl.h \
|
wx/osx/listctrl.h \
|
||||||
wx/osx/mdi.h \
|
wx/osx/mdi.h \
|
||||||
@@ -3368,6 +3367,7 @@ COND_TOOLKIT_OSX_COCOA_GUI_HDR = \
|
|||||||
wx/generic/statusbr.h \
|
wx/generic/statusbr.h \
|
||||||
wx/osx/appprogress.h \
|
wx/osx/appprogress.h \
|
||||||
wx/generic/icon.h \
|
wx/generic/icon.h \
|
||||||
|
wx/generic/imaglist.h \
|
||||||
wx/osx/cocoa/chkconf.h \
|
wx/osx/cocoa/chkconf.h \
|
||||||
wx/osx/cocoa/evtloop.h \
|
wx/osx/cocoa/evtloop.h \
|
||||||
wx/osx/cocoa/private.h \
|
wx/osx/cocoa/private.h \
|
||||||
@@ -3424,7 +3424,6 @@ COND_TOOLKIT_OSX_IPHONE_GUI_HDR = \
|
|||||||
wx/osx/fontdlg.h \
|
wx/osx/fontdlg.h \
|
||||||
wx/osx/frame.h \
|
wx/osx/frame.h \
|
||||||
wx/osx/gauge.h \
|
wx/osx/gauge.h \
|
||||||
wx/osx/imaglist.h \
|
|
||||||
wx/osx/listbox.h \
|
wx/osx/listbox.h \
|
||||||
wx/osx/listctrl.h \
|
wx/osx/listctrl.h \
|
||||||
wx/osx/mdi.h \
|
wx/osx/mdi.h \
|
||||||
@@ -3478,6 +3477,7 @@ COND_TOOLKIT_OSX_IPHONE_GUI_HDR = \
|
|||||||
wx/generic/statusbr.h \
|
wx/generic/statusbr.h \
|
||||||
wx/osx/appprogress.h \
|
wx/osx/appprogress.h \
|
||||||
wx/generic/icon.h \
|
wx/generic/icon.h \
|
||||||
|
wx/generic/imaglist.h \
|
||||||
wx/osx/iphone/chkconf.h \
|
wx/osx/iphone/chkconf.h \
|
||||||
wx/osx/iphone/evtloop.h \
|
wx/osx/iphone/evtloop.h \
|
||||||
wx/osx/iphone/private.h \
|
wx/osx/iphone/private.h \
|
||||||
@@ -13174,7 +13174,8 @@ COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS = \
|
|||||||
monodll_generic_statusbr.o \
|
monodll_generic_statusbr.o \
|
||||||
monodll_generic_textmeasure.o \
|
monodll_generic_textmeasure.o \
|
||||||
monodll_generic_icon.o \
|
monodll_generic_icon.o \
|
||||||
monodll_statbmp_osx.o
|
monodll_statbmp_osx.o \
|
||||||
|
monodll_generic_imaglist.o
|
||||||
@COND_PLATFORM_MACOSX_1@__OSX_COMMON_SRC_OBJECTS = $(COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS)
|
@COND_PLATFORM_MACOSX_1@__OSX_COMMON_SRC_OBJECTS = $(COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS)
|
||||||
COND_PLATFORM_MACOSX_1___GTK_PLATFORM_SRC_OBJECTS = \
|
COND_PLATFORM_MACOSX_1___GTK_PLATFORM_SRC_OBJECTS = \
|
||||||
monodll_generic_caret.o \
|
monodll_generic_caret.o \
|
||||||
@@ -13225,7 +13226,6 @@ COND_PLATFORM_MACOSX_1___OSX_LOWLEVEL_SRC_OBJECTS = \
|
|||||||
monodll_osx_brush.o \
|
monodll_osx_brush.o \
|
||||||
monodll_dialog_osx.o \
|
monodll_dialog_osx.o \
|
||||||
monodll_osx_fontutil.o \
|
monodll_osx_fontutil.o \
|
||||||
monodll_osx_imaglist.o \
|
|
||||||
monodll_osx_minifram.o \
|
monodll_osx_minifram.o \
|
||||||
monodll_nonownedwnd_osx.o \
|
monodll_nonownedwnd_osx.o \
|
||||||
monodll_osx_palette.o \
|
monodll_osx_palette.o \
|
||||||
@@ -13315,7 +13315,8 @@ COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_0 = \
|
|||||||
monolib_generic_statusbr.o \
|
monolib_generic_statusbr.o \
|
||||||
monolib_generic_textmeasure.o \
|
monolib_generic_textmeasure.o \
|
||||||
monolib_generic_icon.o \
|
monolib_generic_icon.o \
|
||||||
monolib_statbmp_osx.o
|
monolib_statbmp_osx.o \
|
||||||
|
monolib_generic_imaglist.o
|
||||||
@COND_PLATFORM_MACOSX_1@__OSX_COMMON_SRC_OBJECTS_0 = $(COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_0)
|
@COND_PLATFORM_MACOSX_1@__OSX_COMMON_SRC_OBJECTS_0 = $(COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_0)
|
||||||
COND_PLATFORM_MACOSX_1___GTK_PLATFORM_SRC_OBJECTS_27 = \
|
COND_PLATFORM_MACOSX_1___GTK_PLATFORM_SRC_OBJECTS_27 = \
|
||||||
monolib_generic_caret.o \
|
monolib_generic_caret.o \
|
||||||
@@ -13366,7 +13367,6 @@ COND_PLATFORM_MACOSX_1___OSX_LOWLEVEL_SRC_OBJECTS_17 = \
|
|||||||
monolib_osx_brush.o \
|
monolib_osx_brush.o \
|
||||||
monolib_dialog_osx.o \
|
monolib_dialog_osx.o \
|
||||||
monolib_osx_fontutil.o \
|
monolib_osx_fontutil.o \
|
||||||
monolib_osx_imaglist.o \
|
|
||||||
monolib_osx_minifram.o \
|
monolib_osx_minifram.o \
|
||||||
monolib_nonownedwnd_osx.o \
|
monolib_nonownedwnd_osx.o \
|
||||||
monolib_osx_palette.o \
|
monolib_osx_palette.o \
|
||||||
@@ -13456,7 +13456,8 @@ COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_8 = \
|
|||||||
coredll_generic_statusbr.o \
|
coredll_generic_statusbr.o \
|
||||||
coredll_generic_textmeasure.o \
|
coredll_generic_textmeasure.o \
|
||||||
coredll_generic_icon.o \
|
coredll_generic_icon.o \
|
||||||
coredll_statbmp_osx.o
|
coredll_statbmp_osx.o \
|
||||||
|
coredll_generic_imaglist.o
|
||||||
@COND_PLATFORM_MACOSX_1@__OSX_COMMON_SRC_OBJECTS_8 = $(COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_8)
|
@COND_PLATFORM_MACOSX_1@__OSX_COMMON_SRC_OBJECTS_8 = $(COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_8)
|
||||||
COND_PLATFORM_MACOSX_1___GTK_PLATFORM_SRC_OBJECTS_1_4 = \
|
COND_PLATFORM_MACOSX_1___GTK_PLATFORM_SRC_OBJECTS_1_4 = \
|
||||||
coredll_generic_caret.o \
|
coredll_generic_caret.o \
|
||||||
@@ -13507,7 +13508,6 @@ COND_PLATFORM_MACOSX_1___OSX_LOWLEVEL_SRC_OBJECTS_1_1 = \
|
|||||||
coredll_osx_brush.o \
|
coredll_osx_brush.o \
|
||||||
coredll_dialog_osx.o \
|
coredll_dialog_osx.o \
|
||||||
coredll_osx_fontutil.o \
|
coredll_osx_fontutil.o \
|
||||||
coredll_osx_imaglist.o \
|
|
||||||
coredll_osx_minifram.o \
|
coredll_osx_minifram.o \
|
||||||
coredll_nonownedwnd_osx.o \
|
coredll_nonownedwnd_osx.o \
|
||||||
coredll_osx_palette.o \
|
coredll_osx_palette.o \
|
||||||
@@ -13594,7 +13594,8 @@ COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_9 = \
|
|||||||
corelib_generic_statusbr.o \
|
corelib_generic_statusbr.o \
|
||||||
corelib_generic_textmeasure.o \
|
corelib_generic_textmeasure.o \
|
||||||
corelib_generic_icon.o \
|
corelib_generic_icon.o \
|
||||||
corelib_statbmp_osx.o
|
corelib_statbmp_osx.o \
|
||||||
|
corelib_generic_imaglist.o
|
||||||
@COND_PLATFORM_MACOSX_1@__OSX_COMMON_SRC_OBJECTS_9 = $(COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_9)
|
@COND_PLATFORM_MACOSX_1@__OSX_COMMON_SRC_OBJECTS_9 = $(COND_PLATFORM_MACOSX_1___OSX_COMMON_SRC_OBJECTS_9)
|
||||||
COND_PLATFORM_MACOSX_1___GTK_PLATFORM_SRC_OBJECTS_2_2 = \
|
COND_PLATFORM_MACOSX_1___GTK_PLATFORM_SRC_OBJECTS_2_2 = \
|
||||||
corelib_generic_caret.o \
|
corelib_generic_caret.o \
|
||||||
@@ -13645,7 +13646,6 @@ COND_PLATFORM_MACOSX_1___OSX_LOWLEVEL_SRC_OBJECTS_1_4 = \
|
|||||||
corelib_osx_brush.o \
|
corelib_osx_brush.o \
|
||||||
corelib_dialog_osx.o \
|
corelib_dialog_osx.o \
|
||||||
corelib_osx_fontutil.o \
|
corelib_osx_fontutil.o \
|
||||||
corelib_osx_imaglist.o \
|
|
||||||
corelib_osx_minifram.o \
|
corelib_osx_minifram.o \
|
||||||
corelib_nonownedwnd_osx.o \
|
corelib_nonownedwnd_osx.o \
|
||||||
corelib_osx_palette.o \
|
corelib_osx_palette.o \
|
||||||
@@ -17549,6 +17549,12 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
|
|||||||
@COND_TOOLKIT_DFB_USE_GUI_1@monodll_generic_caret.o: $(srcdir)/src/generic/caret.cpp $(MONODLL_ODEP)
|
@COND_TOOLKIT_DFB_USE_GUI_1@monodll_generic_caret.o: $(srcdir)/src/generic/caret.cpp $(MONODLL_ODEP)
|
||||||
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
||||||
|
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monodll_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(MONODLL_ODEP)
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@monodll_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(MONODLL_ODEP)
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@monodll_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(MONODLL_ODEP)
|
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@monodll_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(MONODLL_ODEP)
|
||||||
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
@@ -18704,12 +18710,6 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
|
|||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@monodll_osx_fontutil.o: $(srcdir)/src/osx/fontutil.cpp $(MONODLL_ODEP)
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@monodll_osx_fontutil.o: $(srcdir)/src/osx/fontutil.cpp $(MONODLL_ODEP)
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/fontutil.cpp
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/fontutil.cpp
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@monodll_osx_imaglist.o: $(srcdir)/src/osx/imaglist.cpp $(MONODLL_ODEP)
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/imaglist.cpp
|
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@monodll_osx_imaglist.o: $(srcdir)/src/osx/imaglist.cpp $(MONODLL_ODEP)
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/imaglist.cpp
|
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@monodll_osx_minifram.o: $(srcdir)/src/osx/minifram.cpp $(MONODLL_ODEP)
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@monodll_osx_minifram.o: $(srcdir)/src/osx/minifram.cpp $(MONODLL_ODEP)
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/minifram.cpp
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/minifram.cpp
|
||||||
|
|
||||||
@@ -22802,6 +22802,12 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
|
|||||||
@COND_TOOLKIT_DFB_USE_GUI_1@monolib_generic_caret.o: $(srcdir)/src/generic/caret.cpp $(MONOLIB_ODEP)
|
@COND_TOOLKIT_DFB_USE_GUI_1@monolib_generic_caret.o: $(srcdir)/src/generic/caret.cpp $(MONOLIB_ODEP)
|
||||||
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
||||||
|
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monolib_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(MONOLIB_ODEP)
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@monolib_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(MONOLIB_ODEP)
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@monolib_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(MONOLIB_ODEP)
|
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@monolib_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(MONOLIB_ODEP)
|
||||||
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
@@ -23957,12 +23963,6 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
|
|||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@monolib_osx_fontutil.o: $(srcdir)/src/osx/fontutil.cpp $(MONOLIB_ODEP)
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@monolib_osx_fontutil.o: $(srcdir)/src/osx/fontutil.cpp $(MONOLIB_ODEP)
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/fontutil.cpp
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/fontutil.cpp
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@monolib_osx_imaglist.o: $(srcdir)/src/osx/imaglist.cpp $(MONOLIB_ODEP)
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/imaglist.cpp
|
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@monolib_osx_imaglist.o: $(srcdir)/src/osx/imaglist.cpp $(MONOLIB_ODEP)
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/imaglist.cpp
|
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@monolib_osx_minifram.o: $(srcdir)/src/osx/minifram.cpp $(MONOLIB_ODEP)
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@monolib_osx_minifram.o: $(srcdir)/src/osx/minifram.cpp $(MONOLIB_ODEP)
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/minifram.cpp
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/minifram.cpp
|
||||||
|
|
||||||
@@ -28148,6 +28148,12 @@ coredll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(COREDLL_ODEP)
|
|||||||
@COND_TOOLKIT_DFB_USE_GUI_1@coredll_generic_caret.o: $(srcdir)/src/generic/caret.cpp $(COREDLL_ODEP)
|
@COND_TOOLKIT_DFB_USE_GUI_1@coredll_generic_caret.o: $(srcdir)/src/generic/caret.cpp $(COREDLL_ODEP)
|
||||||
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
||||||
|
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(COREDLL_ODEP)
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@coredll_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(COREDLL_ODEP)
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@coredll_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(COREDLL_ODEP)
|
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@coredll_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(COREDLL_ODEP)
|
||||||
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
@@ -29303,12 +29309,6 @@ coredll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(COREDLL_ODEP)
|
|||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@coredll_osx_fontutil.o: $(srcdir)/src/osx/fontutil.cpp $(COREDLL_ODEP)
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@coredll_osx_fontutil.o: $(srcdir)/src/osx/fontutil.cpp $(COREDLL_ODEP)
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/fontutil.cpp
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/fontutil.cpp
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@coredll_osx_imaglist.o: $(srcdir)/src/osx/imaglist.cpp $(COREDLL_ODEP)
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/imaglist.cpp
|
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@coredll_osx_imaglist.o: $(srcdir)/src/osx/imaglist.cpp $(COREDLL_ODEP)
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/imaglist.cpp
|
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@coredll_osx_minifram.o: $(srcdir)/src/osx/minifram.cpp $(COREDLL_ODEP)
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@coredll_osx_minifram.o: $(srcdir)/src/osx/minifram.cpp $(COREDLL_ODEP)
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/minifram.cpp
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/minifram.cpp
|
||||||
|
|
||||||
@@ -32396,6 +32396,12 @@ corelib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(CORELIB_ODEP)
|
|||||||
@COND_TOOLKIT_DFB_USE_GUI_1@corelib_generic_caret.o: $(srcdir)/src/generic/caret.cpp $(CORELIB_ODEP)
|
@COND_TOOLKIT_DFB_USE_GUI_1@corelib_generic_caret.o: $(srcdir)/src/generic/caret.cpp $(CORELIB_ODEP)
|
||||||
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
|
||||||
|
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(CORELIB_ODEP)
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@corelib_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(CORELIB_ODEP)
|
||||||
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@corelib_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(CORELIB_ODEP)
|
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@corelib_generic_imaglist.o: $(srcdir)/src/generic/imaglist.cpp $(CORELIB_ODEP)
|
||||||
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
@COND_TOOLKIT_QT_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/imaglist.cpp
|
||||||
|
|
||||||
@@ -33551,12 +33557,6 @@ corelib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(CORELIB_ODEP)
|
|||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@corelib_osx_fontutil.o: $(srcdir)/src/osx/fontutil.cpp $(CORELIB_ODEP)
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@corelib_osx_fontutil.o: $(srcdir)/src/osx/fontutil.cpp $(CORELIB_ODEP)
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/fontutil.cpp
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/fontutil.cpp
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@corelib_osx_imaglist.o: $(srcdir)/src/osx/imaglist.cpp $(CORELIB_ODEP)
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/imaglist.cpp
|
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@corelib_osx_imaglist.o: $(srcdir)/src/osx/imaglist.cpp $(CORELIB_ODEP)
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/imaglist.cpp
|
|
||||||
|
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@corelib_osx_minifram.o: $(srcdir)/src/osx/minifram.cpp $(CORELIB_ODEP)
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@corelib_osx_minifram.o: $(srcdir)/src/osx/minifram.cpp $(CORELIB_ODEP)
|
||||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/minifram.cpp
|
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/minifram.cpp
|
||||||
|
|
||||||
|
@@ -2395,7 +2395,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
src/osx/brush.cpp
|
src/osx/brush.cpp
|
||||||
src/osx/dialog_osx.cpp
|
src/osx/dialog_osx.cpp
|
||||||
src/osx/fontutil.cpp
|
src/osx/fontutil.cpp
|
||||||
src/osx/imaglist.cpp
|
|
||||||
src/osx/minifram.cpp
|
src/osx/minifram.cpp
|
||||||
src/osx/nonownedwnd_osx.cpp
|
src/osx/nonownedwnd_osx.cpp
|
||||||
src/osx/palette.cpp
|
src/osx/palette.cpp
|
||||||
@@ -2495,6 +2494,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
src/generic/textmeasure.cpp
|
src/generic/textmeasure.cpp
|
||||||
src/generic/icon.cpp
|
src/generic/icon.cpp
|
||||||
src/osx/statbmp_osx.cpp
|
src/osx/statbmp_osx.cpp
|
||||||
|
src/generic/imaglist.cpp
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
|
|
||||||
@@ -2538,7 +2538,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
wx/osx/fontdlg.h
|
wx/osx/fontdlg.h
|
||||||
wx/osx/frame.h
|
wx/osx/frame.h
|
||||||
wx/osx/gauge.h
|
wx/osx/gauge.h
|
||||||
wx/osx/imaglist.h
|
|
||||||
wx/osx/listbox.h
|
wx/osx/listbox.h
|
||||||
wx/osx/listctrl.h
|
wx/osx/listctrl.h
|
||||||
wx/osx/mdi.h
|
wx/osx/mdi.h
|
||||||
@@ -2593,6 +2592,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
wx/generic/statusbr.h
|
wx/generic/statusbr.h
|
||||||
wx/osx/appprogress.h
|
wx/osx/appprogress.h
|
||||||
wx/generic/icon.h
|
wx/generic/icon.h
|
||||||
|
wx/generic/imaglist.h
|
||||||
</set>
|
</set>
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
<!-- ====================================================================== -->
|
||||||
|
@@ -2274,7 +2274,6 @@ set(OSX_LOWLEVEL_SRC
|
|||||||
src/osx/brush.cpp
|
src/osx/brush.cpp
|
||||||
src/osx/dialog_osx.cpp
|
src/osx/dialog_osx.cpp
|
||||||
src/osx/fontutil.cpp
|
src/osx/fontutil.cpp
|
||||||
src/osx/imaglist.cpp
|
|
||||||
src/osx/minifram.cpp
|
src/osx/minifram.cpp
|
||||||
src/osx/nonownedwnd_osx.cpp
|
src/osx/nonownedwnd_osx.cpp
|
||||||
src/osx/palette.cpp
|
src/osx/palette.cpp
|
||||||
@@ -2373,6 +2372,7 @@ set(OSX_COMMON_SRC
|
|||||||
src/generic/icon.cpp
|
src/generic/icon.cpp
|
||||||
#TODO: </if>
|
#TODO: </if>
|
||||||
src/osx/statbmp_osx.cpp
|
src/osx/statbmp_osx.cpp
|
||||||
|
src/generic/imaglist.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OSX_SHARED_HDR
|
set(OSX_SHARED_HDR
|
||||||
@@ -2414,7 +2414,6 @@ set(OSX_SHARED_HDR
|
|||||||
wx/osx/fontdlg.h
|
wx/osx/fontdlg.h
|
||||||
wx/osx/frame.h
|
wx/osx/frame.h
|
||||||
wx/osx/gauge.h
|
wx/osx/gauge.h
|
||||||
wx/osx/imaglist.h
|
|
||||||
wx/osx/listbox.h
|
wx/osx/listbox.h
|
||||||
wx/osx/listctrl.h
|
wx/osx/listctrl.h
|
||||||
wx/osx/mdi.h
|
wx/osx/mdi.h
|
||||||
@@ -2469,6 +2468,7 @@ set(OSX_SHARED_HDR
|
|||||||
wx/generic/statusbr.h
|
wx/generic/statusbr.h
|
||||||
wx/osx/appprogress.h
|
wx/osx/appprogress.h
|
||||||
wx/generic/icon.h
|
wx/generic/icon.h
|
||||||
|
wx/generic/imaglist.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OSX_COCOA_SRC
|
set(OSX_COCOA_SRC
|
||||||
|
@@ -2256,7 +2256,6 @@ OSX_LOWLEVEL_SRC =
|
|||||||
src/osx/brush.cpp
|
src/osx/brush.cpp
|
||||||
src/osx/dialog_osx.cpp
|
src/osx/dialog_osx.cpp
|
||||||
src/osx/fontutil.cpp
|
src/osx/fontutil.cpp
|
||||||
src/osx/imaglist.cpp
|
|
||||||
src/osx/minifram.cpp
|
src/osx/minifram.cpp
|
||||||
src/osx/nonownedwnd_osx.cpp
|
src/osx/nonownedwnd_osx.cpp
|
||||||
src/osx/palette.cpp
|
src/osx/palette.cpp
|
||||||
@@ -2347,6 +2346,7 @@ OSX_COMMON_SRC =
|
|||||||
src/generic/fontdlgg.cpp
|
src/generic/fontdlgg.cpp
|
||||||
src/generic/fontpickerg.cpp
|
src/generic/fontpickerg.cpp
|
||||||
src/generic/icon.cpp
|
src/generic/icon.cpp
|
||||||
|
src/generic/imaglist.cpp
|
||||||
src/generic/listctrl.cpp
|
src/generic/listctrl.cpp
|
||||||
src/generic/prntdlgg.cpp
|
src/generic/prntdlgg.cpp
|
||||||
src/generic/statusbr.cpp
|
src/generic/statusbr.cpp
|
||||||
@@ -2393,7 +2393,6 @@ OSX_SHARED_HDR =
|
|||||||
wx/osx/fontdlg.h
|
wx/osx/fontdlg.h
|
||||||
wx/osx/frame.h
|
wx/osx/frame.h
|
||||||
wx/osx/gauge.h
|
wx/osx/gauge.h
|
||||||
wx/osx/imaglist.h
|
|
||||||
wx/osx/listbox.h
|
wx/osx/listbox.h
|
||||||
wx/osx/listctrl.h
|
wx/osx/listctrl.h
|
||||||
wx/osx/mdi.h
|
wx/osx/mdi.h
|
||||||
@@ -2444,6 +2443,7 @@ OSX_SHARED_HDR =
|
|||||||
wx/generic/fontdlgg.h
|
wx/generic/fontdlgg.h
|
||||||
wx/generic/fontpickerg.h
|
wx/generic/fontpickerg.h
|
||||||
wx/generic/icon.h
|
wx/generic/icon.h
|
||||||
|
wx/generic/imaglist.h
|
||||||
wx/generic/listctrl.h
|
wx/generic/listctrl.h
|
||||||
wx/generic/prntdlgg.h
|
wx/generic/prntdlgg.h
|
||||||
wx/generic/statusbr.h
|
wx/generic/statusbr.h
|
||||||
|
@@ -41,16 +41,11 @@ enum
|
|||||||
#define wxIMAGELIST_DRAW_SELECTED 0x0004
|
#define wxIMAGELIST_DRAW_SELECTED 0x0004
|
||||||
#define wxIMAGELIST_DRAW_FOCUSED 0x0008
|
#define wxIMAGELIST_DRAW_FOCUSED 0x0008
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXMAC__)
|
#if defined(__WXMSW__)
|
||||||
#define wxHAS_NATIVE_IMAGELIST
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(wxHAS_NATIVE_IMAGELIST)
|
|
||||||
#include "wx/generic/imaglist.h"
|
|
||||||
#elif defined(__WXMSW__)
|
|
||||||
#include "wx/msw/imaglist.h"
|
#include "wx/msw/imaglist.h"
|
||||||
#elif defined(__WXMAC__)
|
#define wxHAS_NATIVE_IMAGELIST
|
||||||
#include "wx/osx/imaglist.h"
|
#else
|
||||||
|
#include "wx/generic/imaglist.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _WX_IMAGLIST_H_BASE_
|
#endif // _WX_IMAGLIST_H_BASE_
|
||||||
|
@@ -1,59 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: wx/osx/imaglist.h
|
|
||||||
// Purpose:
|
|
||||||
// Author: Robert Roebling, Stefan Csomor
|
|
||||||
// Created: 01/02/97
|
|
||||||
// Id:
|
|
||||||
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef _WX_IMAGLIST_H_
|
|
||||||
#define _WX_IMAGLIST_H_
|
|
||||||
|
|
||||||
#include "wx/defs.h"
|
|
||||||
#include "wx/list.h"
|
|
||||||
#include "wx/icon.h"
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_FWD_CORE wxDC;
|
|
||||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
|
||||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxImageList: public wxObject
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wxImageList() { m_width = m_height = 0; }
|
|
||||||
wxImageList( int width, int height, bool mask = true, int initialCount = 1 );
|
|
||||||
virtual ~wxImageList();
|
|
||||||
bool Create( int width, int height, bool mask = true, int initialCount = 1 );
|
|
||||||
bool Create();
|
|
||||||
|
|
||||||
virtual int GetImageCount() const;
|
|
||||||
virtual bool GetSize( int index, int &width, int &height ) const;
|
|
||||||
virtual wxSize GetSize() const { return wxSize(m_width, m_height); }
|
|
||||||
|
|
||||||
int Add( const wxBitmap& bitmap );
|
|
||||||
int Add( const wxBitmap& bitmap, const wxBitmap& mask );
|
|
||||||
int Add( const wxBitmap& bitmap, const wxColour& maskColour );
|
|
||||||
wxBitmap GetBitmap(int index) const;
|
|
||||||
wxIcon GetIcon(int index) const;
|
|
||||||
bool Replace( int index, const wxBitmap &bitmap );
|
|
||||||
bool Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask );
|
|
||||||
bool Remove( int index );
|
|
||||||
bool RemoveAll();
|
|
||||||
|
|
||||||
virtual bool Draw(int index, wxDC& dc, int x, int y,
|
|
||||||
int flags = wxIMAGELIST_DRAW_NORMAL,
|
|
||||||
bool solidBackground = false);
|
|
||||||
|
|
||||||
private:
|
|
||||||
wxList m_images;
|
|
||||||
|
|
||||||
int m_width;
|
|
||||||
int m_height;
|
|
||||||
|
|
||||||
wxDECLARE_DYNAMIC_CLASS(wxImageList);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // _WX_IMAGLIST_H_
|
|
||||||
|
|
@@ -60,13 +60,11 @@ bool wxGenericImageList::Create()
|
|||||||
|
|
||||||
int wxGenericImageList::Add( const wxBitmap &bitmap )
|
int wxGenericImageList::Add( const wxBitmap &bitmap )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (bitmap.GetWidth() >= m_width && bitmap.GetHeight() == m_height)
|
wxASSERT_MSG( (bitmap.GetScaledWidth() >= m_width && bitmap.GetScaledHeight() == m_height)
|
||||||
|| (m_width == 0 && m_height == 0),
|
|| (m_width == 0 && m_height == 0),
|
||||||
wxT("invalid bitmap size in wxImageList: this might work ")
|
wxT("invalid bitmap size in wxImageList: this might work ")
|
||||||
wxT("on this platform but definitely won't under Windows.") );
|
wxT("on this platform but definitely won't under Windows.") );
|
||||||
|
|
||||||
const int index = int(m_images.GetCount());
|
|
||||||
|
|
||||||
if (bitmap.IsKindOf(wxCLASSINFO(wxIcon)))
|
if (bitmap.IsKindOf(wxCLASSINFO(wxIcon)))
|
||||||
{
|
{
|
||||||
m_images.Append( new wxIcon( (const wxIcon&) bitmap ) );
|
m_images.Append( new wxIcon( (const wxIcon&) bitmap ) );
|
||||||
@@ -75,9 +73,9 @@ int wxGenericImageList::Add( const wxBitmap &bitmap )
|
|||||||
{
|
{
|
||||||
// Mimic behaviour of Windows ImageList_Add that automatically breaks up the added
|
// Mimic behaviour of Windows ImageList_Add that automatically breaks up the added
|
||||||
// bitmap into sub-images of the correct size
|
// bitmap into sub-images of the correct size
|
||||||
if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height)
|
if (m_width > 0 && bitmap.GetScaledWidth() > m_width && bitmap.GetScaledHeight() >= m_height)
|
||||||
{
|
{
|
||||||
int numImages = bitmap.GetWidth() / m_width;
|
int numImages = bitmap.GetScaledWidth() / m_width;
|
||||||
for (int subIndex = 0; subIndex < numImages; subIndex++)
|
for (int subIndex = 0; subIndex < numImages; subIndex++)
|
||||||
{
|
{
|
||||||
wxRect rect(m_width * subIndex, 0, m_width, m_height);
|
wxRect rect(m_width * subIndex, 0, m_width, m_height);
|
||||||
@@ -93,11 +91,11 @@ int wxGenericImageList::Add( const wxBitmap &bitmap )
|
|||||||
|
|
||||||
if (m_width == 0 && m_height == 0)
|
if (m_width == 0 && m_height == 0)
|
||||||
{
|
{
|
||||||
m_width = bitmap.GetWidth();
|
m_width = bitmap.GetScaledWidth();
|
||||||
m_height = bitmap.GetHeight();
|
m_height = bitmap.GetScaledHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
return index;
|
return m_images.GetCount() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGenericImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask )
|
int wxGenericImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask )
|
||||||
@@ -128,24 +126,30 @@ const wxBitmap *wxGenericImageList::GetBitmapPtr( int index ) const
|
|||||||
wxBitmap wxGenericImageList::GetBitmap(int index) const
|
wxBitmap wxGenericImageList::GetBitmap(int index) const
|
||||||
{
|
{
|
||||||
const wxBitmap* bmp = GetBitmapPtr(index);
|
const wxBitmap* bmp = GetBitmapPtr(index);
|
||||||
if (bmp)
|
if (!bmp)
|
||||||
return *bmp;
|
|
||||||
else
|
|
||||||
return wxNullBitmap;
|
return wxNullBitmap;
|
||||||
|
|
||||||
|
if ( bmp->IsKindOf(wxCLASSINFO(wxIcon)) )
|
||||||
|
return wxBitmap( *(static_cast<const wxIcon*>(bmp)) );
|
||||||
|
else
|
||||||
|
return *bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the icon
|
// Get the icon
|
||||||
wxIcon wxGenericImageList::GetIcon(int index) const
|
wxIcon wxGenericImageList::GetIcon(int index) const
|
||||||
{
|
{
|
||||||
const wxBitmap* bmp = GetBitmapPtr(index);
|
const wxBitmap* bmp = GetBitmapPtr(index);
|
||||||
if (bmp)
|
if (!bmp)
|
||||||
|
return wxNullIcon;
|
||||||
|
|
||||||
|
if ( bmp->IsKindOf(wxCLASSINFO(wxIcon)) )
|
||||||
|
return *(static_cast<const wxIcon*>(bmp));
|
||||||
|
else
|
||||||
{
|
{
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
icon.CopyFromBitmap(*bmp);
|
icon.CopyFromBitmap(*bmp);
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return wxNullIcon;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap )
|
bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap )
|
||||||
@@ -235,8 +239,8 @@ bool wxGenericImageList::GetSize( int index, int &width, int &height ) const
|
|||||||
wxCHECK_MSG( node, false, wxT("wrong index in image list") );
|
wxCHECK_MSG( node, false, wxT("wrong index in image list") );
|
||||||
|
|
||||||
wxBitmap *bm = (wxBitmap*)node->GetData();
|
wxBitmap *bm = (wxBitmap*)node->GetData();
|
||||||
width = bm->GetWidth();
|
width = bm->GetScaledWidth();
|
||||||
height = bm->GetHeight();
|
height = bm->GetScaledHeight();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -1,265 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: src/osx/imaglist.cpp
|
|
||||||
// Purpose:
|
|
||||||
// Author: Robert Roebling
|
|
||||||
// Copyright: (c) 1998 Robert Roebling
|
|
||||||
// Licence: wxWindows licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_IMAGLIST
|
|
||||||
|
|
||||||
#include "wx/imaglist.h"
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/icon.h"
|
|
||||||
#include "wx/image.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxIMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject);
|
|
||||||
|
|
||||||
|
|
||||||
wxImageList::wxImageList( int width, int height, bool mask, int initialCount )
|
|
||||||
{
|
|
||||||
(void)Create(width, height, mask, initialCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxImageList::~wxImageList()
|
|
||||||
{
|
|
||||||
(void)RemoveAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxImageList::GetImageCount() const
|
|
||||||
{
|
|
||||||
return m_images.GetCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxImageList::Create( int width, int height, bool WXUNUSED(mask), int WXUNUSED(initialCount) )
|
|
||||||
{
|
|
||||||
m_width = width;
|
|
||||||
m_height = height;
|
|
||||||
|
|
||||||
return Create();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxImageList::Create()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxImageList::Add( const wxBitmap &bitmap )
|
|
||||||
{
|
|
||||||
wxASSERT_MSG( (bitmap.GetScaledWidth() >= m_width && bitmap.GetScaledHeight() == m_height)
|
|
||||||
|| (m_width == 0 && m_height == 0),
|
|
||||||
wxT("invalid bitmap size in wxImageList: this might work ")
|
|
||||||
wxT("on this platform but definitely won't under Windows.") );
|
|
||||||
|
|
||||||
// Mimic behaviour of Windows ImageList_Add that automatically breaks up the added
|
|
||||||
// bitmap into sub-images of the correct size
|
|
||||||
if (m_width > 0 && bitmap.GetScaledWidth() > m_width && bitmap.GetScaledHeight() >= m_height)
|
|
||||||
{
|
|
||||||
int numImages = bitmap.GetScaledWidth() / m_width;
|
|
||||||
for (int subIndex = 0; subIndex < numImages; subIndex++)
|
|
||||||
{
|
|
||||||
wxRect rect(m_width * subIndex, 0, m_width, m_height);
|
|
||||||
wxBitmap tmpBmp = bitmap.GetSubBitmap(rect);
|
|
||||||
m_images.Append( new wxBitmap(tmpBmp) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_images.Append( new wxBitmap(bitmap) );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_width == 0 && m_height == 0)
|
|
||||||
{
|
|
||||||
m_width = bitmap.GetScaledWidth();
|
|
||||||
m_height = bitmap.GetScaledHeight();
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_images.GetCount() - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask )
|
|
||||||
{
|
|
||||||
wxBitmap bmp( bitmap );
|
|
||||||
if (mask.IsOk())
|
|
||||||
bmp.SetMask( new wxMask( mask ) );
|
|
||||||
|
|
||||||
return Add( bmp );
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxImageList::Add( const wxBitmap& bitmap, const wxColour& maskColour )
|
|
||||||
{
|
|
||||||
wxImage img = bitmap.ConvertToImage();
|
|
||||||
img.SetMaskColour( maskColour.Red(), maskColour.Green(), maskColour.Blue() );
|
|
||||||
|
|
||||||
return Add( wxBitmap( img ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the bitmap
|
|
||||||
wxBitmap wxImageList::GetBitmap(int index) const
|
|
||||||
{
|
|
||||||
wxList::compatibility_iterator node = m_images.Item( index );
|
|
||||||
|
|
||||||
wxCHECK_MSG( node, wxNullBitmap , wxT("wrong index in image list") );
|
|
||||||
|
|
||||||
wxObject* obj = (wxObject*) node->GetData();
|
|
||||||
if ( obj == NULL )
|
|
||||||
return wxNullBitmap ;
|
|
||||||
else if ( obj->IsKindOf(CLASSINFO(wxIcon)) )
|
|
||||||
return wxBitmap( *(static_cast<wxIcon*>(obj)) ) ;
|
|
||||||
else
|
|
||||||
return *(static_cast<wxBitmap*>(obj)) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the icon
|
|
||||||
wxIcon wxImageList::GetIcon(int index) const
|
|
||||||
{
|
|
||||||
wxList::compatibility_iterator node = m_images.Item( index );
|
|
||||||
|
|
||||||
wxCHECK_MSG( node, wxNullIcon , wxT("wrong index in image list") );
|
|
||||||
|
|
||||||
wxObject* obj = (wxObject*) node->GetData();
|
|
||||||
if ( obj == NULL )
|
|
||||||
return wxNullIcon ;
|
|
||||||
if ( obj->IsKindOf(CLASSINFO(wxBitmap)) )
|
|
||||||
{
|
|
||||||
wxIcon icon;
|
|
||||||
icon.CopyFromBitmap(*static_cast<const wxBitmap*>(obj));
|
|
||||||
return icon;
|
|
||||||
}
|
|
||||||
return *(static_cast<wxIcon*>(obj)) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxImageList::Replace( int index, const wxBitmap &bitmap )
|
|
||||||
{
|
|
||||||
wxList::compatibility_iterator node = m_images.Item( index );
|
|
||||||
|
|
||||||
wxCHECK_MSG( node, false, wxT("wrong index in image list") );
|
|
||||||
|
|
||||||
wxBitmap* newBitmap = new wxBitmap( bitmap );
|
|
||||||
|
|
||||||
if (index == (int) m_images.GetCount() - 1)
|
|
||||||
{
|
|
||||||
delete node->GetData();
|
|
||||||
|
|
||||||
m_images.Erase( node );
|
|
||||||
m_images.Append( newBitmap );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxList::compatibility_iterator next = node->GetNext();
|
|
||||||
delete node->GetData();
|
|
||||||
|
|
||||||
m_images.Erase( node );
|
|
||||||
m_images.Insert( next, newBitmap );
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxImageList::Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask )
|
|
||||||
{
|
|
||||||
wxList::compatibility_iterator node = m_images.Item( index );
|
|
||||||
|
|
||||||
wxCHECK_MSG( node, false, wxT("wrong index in image list") );
|
|
||||||
|
|
||||||
wxBitmap* newBitmap = new wxBitmap(bitmap);
|
|
||||||
|
|
||||||
if (index == (int) m_images.GetCount() - 1)
|
|
||||||
{
|
|
||||||
delete node->GetData();
|
|
||||||
m_images.Erase( node );
|
|
||||||
m_images.Append( newBitmap );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxList::compatibility_iterator next = node->GetNext();
|
|
||||||
delete node->GetData();
|
|
||||||
m_images.Erase( node );
|
|
||||||
m_images.Insert( next, newBitmap );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mask.IsOk())
|
|
||||||
newBitmap->SetMask(new wxMask(mask));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxImageList::Remove( int index )
|
|
||||||
{
|
|
||||||
wxList::compatibility_iterator node = m_images.Item( index );
|
|
||||||
|
|
||||||
wxCHECK_MSG( node, false, wxT("wrong index in image list") );
|
|
||||||
|
|
||||||
delete node->GetData();
|
|
||||||
m_images.Erase( node );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxImageList::RemoveAll()
|
|
||||||
{
|
|
||||||
WX_CLEAR_LIST(wxList, m_images);
|
|
||||||
m_images.Clear();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxImageList::GetSize( int index, int &width, int &height ) const
|
|
||||||
{
|
|
||||||
width = 0;
|
|
||||||
height = 0;
|
|
||||||
|
|
||||||
wxList::compatibility_iterator node = m_images.Item( index );
|
|
||||||
|
|
||||||
wxCHECK_MSG( node, false, wxT("wrong index in image list") );
|
|
||||||
|
|
||||||
wxObject *obj = (wxObject*)node->GetData();
|
|
||||||
if (obj->IsKindOf(CLASSINFO(wxIcon)))
|
|
||||||
{
|
|
||||||
wxIcon *bm = static_cast< wxIcon* >(obj ) ;
|
|
||||||
width = bm->GetWidth();
|
|
||||||
height = bm->GetHeight();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxBitmap *bm = static_cast< wxBitmap* >(obj ) ;
|
|
||||||
width = bm->GetScaledWidth();
|
|
||||||
height = bm->GetScaledHeight();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxImageList::Draw(
|
|
||||||
int index, wxDC &dc, int x, int y,
|
|
||||||
int flags, bool WXUNUSED(solidBackground) )
|
|
||||||
{
|
|
||||||
wxList::compatibility_iterator node = m_images.Item( index );
|
|
||||||
|
|
||||||
wxCHECK_MSG( node, false, wxT("wrong index in image list") );
|
|
||||||
|
|
||||||
wxObject *obj = (wxObject*)node->GetData();
|
|
||||||
if (obj->IsKindOf(CLASSINFO(wxIcon)))
|
|
||||||
{
|
|
||||||
wxIcon *bm = static_cast< wxIcon* >(obj ) ;
|
|
||||||
dc.DrawIcon( *bm , x, y );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxBitmap *bm = static_cast< wxBitmap* >(obj ) ;
|
|
||||||
dc.DrawBitmap( *bm, x, y, (flags & wxIMAGELIST_DRAW_TRANSPARENT) > 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // wxUSE_IMAGLIST
|
|
Reference in New Issue
Block a user