Various wxCollapsiblePane enhancements (re-patch 1577412):
1. wxUSE_COLLPANE added 2. XRC handler added 3. flicker fixes for the generic version 4. sizing fixes for GTK+ version 5. RTL fixes for the generic version (via wxBoxSizer) 6. better appearance under Mac for the generic version git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a4c8fc2374
commit
912c39325b
17
Makefile.in
17
Makefile.in
@ -1314,6 +1314,7 @@ XRCDLL_OBJECTS = \
|
||||
xrcdll_xh_choic.o \
|
||||
xrcdll_xh_choicbk.o \
|
||||
xrcdll_xh_clrpicker.o \
|
||||
xrcdll_xh_collpane.o \
|
||||
xrcdll_xh_combo.o \
|
||||
xrcdll_xh_datectrl.o \
|
||||
xrcdll_xh_dirpicker.o \
|
||||
@ -1374,6 +1375,7 @@ XRCLIB_OBJECTS = \
|
||||
xrclib_xh_choic.o \
|
||||
xrclib_xh_choicbk.o \
|
||||
xrclib_xh_clrpicker.o \
|
||||
xrclib_xh_collpane.o \
|
||||
xrclib_xh_combo.o \
|
||||
xrclib_xh_datectrl.o \
|
||||
xrclib_xh_dirpicker.o \
|
||||
@ -3042,6 +3044,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \
|
||||
wx/xrc/xh_choic.h \
|
||||
wx/xrc/xh_choicbk.h \
|
||||
wx/xrc/xh_clrpicker.h \
|
||||
wx/xrc/xh_collpane.h \
|
||||
wx/xrc/xh_combo.h \
|
||||
wx/xrc/xh_datectrl.h \
|
||||
wx/xrc/xh_dirpicker.h \
|
||||
@ -3347,6 +3350,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \
|
||||
monodll_xh_choic.o \
|
||||
monodll_xh_choicbk.o \
|
||||
monodll_xh_clrpicker.o \
|
||||
monodll_xh_collpane.o \
|
||||
monodll_xh_combo.o \
|
||||
monodll_xh_datectrl.o \
|
||||
monodll_xh_dirpicker.o \
|
||||
@ -5101,6 +5105,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \
|
||||
monolib_xh_choic.o \
|
||||
monolib_xh_choicbk.o \
|
||||
monolib_xh_clrpicker.o \
|
||||
monolib_xh_collpane.o \
|
||||
monolib_xh_combo.o \
|
||||
monolib_xh_datectrl.o \
|
||||
monolib_xh_dirpicker.o \
|
||||
@ -12774,6 +12779,9 @@ monodll_xh_choicbk.o: $(srcdir)/src/xrc/xh_choicbk.cpp $(MONODLL_ODEP)
|
||||
monodll_xh_clrpicker.o: $(srcdir)/src/xrc/xh_clrpicker.cpp $(MONODLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_clrpicker.cpp
|
||||
|
||||
monodll_xh_collpane.o: $(srcdir)/src/xrc/xh_collpane.cpp $(MONODLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_collpane.cpp
|
||||
|
||||
monodll_xh_combo.o: $(srcdir)/src/xrc/xh_combo.cpp $(MONODLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_combo.cpp
|
||||
|
||||
@ -16869,6 +16877,9 @@ monolib_xh_choicbk.o: $(srcdir)/src/xrc/xh_choicbk.cpp $(MONOLIB_ODEP)
|
||||
monolib_xh_clrpicker.o: $(srcdir)/src/xrc/xh_clrpicker.cpp $(MONOLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_clrpicker.cpp
|
||||
|
||||
monolib_xh_collpane.o: $(srcdir)/src/xrc/xh_collpane.cpp $(MONOLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_collpane.cpp
|
||||
|
||||
monolib_xh_combo.o: $(srcdir)/src/xrc/xh_combo.cpp $(MONOLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_combo.cpp
|
||||
|
||||
@ -28260,6 +28271,9 @@ xrcdll_xh_choicbk.o: $(srcdir)/src/xrc/xh_choicbk.cpp $(XRCDLL_ODEP)
|
||||
xrcdll_xh_clrpicker.o: $(srcdir)/src/xrc/xh_clrpicker.cpp $(XRCDLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_clrpicker.cpp
|
||||
|
||||
xrcdll_xh_collpane.o: $(srcdir)/src/xrc/xh_collpane.cpp $(XRCDLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_collpane.cpp
|
||||
|
||||
xrcdll_xh_combo.o: $(srcdir)/src/xrc/xh_combo.cpp $(XRCDLL_ODEP)
|
||||
$(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_combo.cpp
|
||||
|
||||
@ -28422,6 +28436,9 @@ xrclib_xh_choicbk.o: $(srcdir)/src/xrc/xh_choicbk.cpp $(XRCLIB_ODEP)
|
||||
xrclib_xh_clrpicker.o: $(srcdir)/src/xrc/xh_clrpicker.cpp $(XRCLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_clrpicker.cpp
|
||||
|
||||
xrclib_xh_collpane.o: $(srcdir)/src/xrc/xh_collpane.cpp $(XRCLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_collpane.cpp
|
||||
|
||||
xrclib_xh_combo.o: $(srcdir)/src/xrc/xh_combo.cpp $(XRCLIB_ODEP)
|
||||
$(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_combo.cpp
|
||||
|
||||
|
@ -2955,6 +2955,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/xrc/xh_choic.cpp
|
||||
src/xrc/xh_choicbk.cpp
|
||||
src/xrc/xh_clrpicker.cpp
|
||||
src/xrc/xh_collpane.cpp
|
||||
src/xrc/xh_combo.cpp
|
||||
src/xrc/xh_datectrl.cpp
|
||||
src/xrc/xh_dirpicker.cpp
|
||||
@ -3012,6 +3013,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/xrc/xh_choic.h
|
||||
wx/xrc/xh_choicbk.h
|
||||
wx/xrc/xh_clrpicker.h
|
||||
wx/xrc/xh_collpane.h
|
||||
wx/xrc/xh_combo.h
|
||||
wx/xrc/xh_datectrl.h
|
||||
wx/xrc/xh_dirpicker.h
|
||||
|
@ -949,6 +949,7 @@ XRCDLL_OBJECTS = \
|
||||
$(OBJS)\xrcdll_xh_choic.obj \
|
||||
$(OBJS)\xrcdll_xh_choicbk.obj \
|
||||
$(OBJS)\xrcdll_xh_clrpicker.obj \
|
||||
$(OBJS)\xrcdll_xh_collpane.obj \
|
||||
$(OBJS)\xrcdll_xh_combo.obj \
|
||||
$(OBJS)\xrcdll_xh_datectrl.obj \
|
||||
$(OBJS)\xrcdll_xh_dirpicker.obj \
|
||||
@ -1013,6 +1014,7 @@ XRCLIB_OBJECTS = \
|
||||
$(OBJS)\xrclib_xh_choic.obj \
|
||||
$(OBJS)\xrclib_xh_choicbk.obj \
|
||||
$(OBJS)\xrclib_xh_clrpicker.obj \
|
||||
$(OBJS)\xrclib_xh_collpane.obj \
|
||||
$(OBJS)\xrclib_xh_combo.obj \
|
||||
$(OBJS)\xrclib_xh_datectrl.obj \
|
||||
$(OBJS)\xrclib_xh_dirpicker.obj \
|
||||
@ -1250,6 +1252,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_xh_choic.obj \
|
||||
$(OBJS)\monodll_xh_choicbk.obj \
|
||||
$(OBJS)\monodll_xh_clrpicker.obj \
|
||||
$(OBJS)\monodll_xh_collpane.obj \
|
||||
$(OBJS)\monodll_xh_combo.obj \
|
||||
$(OBJS)\monodll_xh_datectrl.obj \
|
||||
$(OBJS)\monodll_xh_dirpicker.obj \
|
||||
@ -1860,6 +1863,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_xh_choic.obj \
|
||||
$(OBJS)\monolib_xh_choicbk.obj \
|
||||
$(OBJS)\monolib_xh_clrpicker.obj \
|
||||
$(OBJS)\monolib_xh_collpane.obj \
|
||||
$(OBJS)\monolib_xh_combo.obj \
|
||||
$(OBJS)\monolib_xh_datectrl.obj \
|
||||
$(OBJS)\monolib_xh_dirpicker.obj \
|
||||
@ -5081,6 +5085,9 @@ $(OBJS)\monodll_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\monodll_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
@ -7062,6 +7069,9 @@ $(OBJS)\monolib_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\monolib_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
@ -12079,6 +12089,9 @@ $(OBJS)\xrcdll_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\xrcdll_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\xrcdll_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\xrcdll_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) $**
|
||||
|
||||
@ -12244,6 +12257,9 @@ $(OBJS)\xrclib_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\xrclib_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\xrclib_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\xrclib_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) $**
|
||||
|
||||
|
@ -948,6 +948,7 @@ XRCDLL_OBJECTS = \
|
||||
$(OBJS)\xrcdll_xh_choic.o \
|
||||
$(OBJS)\xrcdll_xh_choicbk.o \
|
||||
$(OBJS)\xrcdll_xh_clrpicker.o \
|
||||
$(OBJS)\xrcdll_xh_collpane.o \
|
||||
$(OBJS)\xrcdll_xh_combo.o \
|
||||
$(OBJS)\xrcdll_xh_datectrl.o \
|
||||
$(OBJS)\xrcdll_xh_dirpicker.o \
|
||||
@ -1012,6 +1013,7 @@ XRCLIB_OBJECTS = \
|
||||
$(OBJS)\xrclib_xh_choic.o \
|
||||
$(OBJS)\xrclib_xh_choicbk.o \
|
||||
$(OBJS)\xrclib_xh_clrpicker.o \
|
||||
$(OBJS)\xrclib_xh_collpane.o \
|
||||
$(OBJS)\xrclib_xh_combo.o \
|
||||
$(OBJS)\xrclib_xh_datectrl.o \
|
||||
$(OBJS)\xrclib_xh_dirpicker.o \
|
||||
@ -1259,6 +1261,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_xh_choic.o \
|
||||
$(OBJS)\monodll_xh_choicbk.o \
|
||||
$(OBJS)\monodll_xh_clrpicker.o \
|
||||
$(OBJS)\monodll_xh_collpane.o \
|
||||
$(OBJS)\monodll_xh_combo.o \
|
||||
$(OBJS)\monodll_xh_datectrl.o \
|
||||
$(OBJS)\monodll_xh_dirpicker.o \
|
||||
@ -1875,6 +1878,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_xh_choic.o \
|
||||
$(OBJS)\monolib_xh_choicbk.o \
|
||||
$(OBJS)\monolib_xh_clrpicker.o \
|
||||
$(OBJS)\monolib_xh_collpane.o \
|
||||
$(OBJS)\monolib_xh_combo.o \
|
||||
$(OBJS)\monolib_xh_datectrl.o \
|
||||
$(OBJS)\monolib_xh_dirpicker.o \
|
||||
@ -5198,6 +5202,9 @@ $(OBJS)\monodll_xh_choicbk.o: ../../src/xrc/xh_choicbk.cpp
|
||||
$(OBJS)\monodll_xh_clrpicker.o: ../../src/xrc/xh_clrpicker.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monodll_xh_collpane.o: ../../src/xrc/xh_collpane.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monodll_xh_combo.o: ../../src/xrc/xh_combo.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
@ -7279,6 +7286,9 @@ $(OBJS)\monolib_xh_choicbk.o: ../../src/xrc/xh_choicbk.cpp
|
||||
$(OBJS)\monolib_xh_clrpicker.o: ../../src/xrc/xh_clrpicker.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monolib_xh_collpane.o: ../../src/xrc/xh_collpane.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monolib_xh_combo.o: ../../src/xrc/xh_combo.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
@ -12596,6 +12606,9 @@ $(OBJS)\xrcdll_xh_choicbk.o: ../../src/xrc/xh_choicbk.cpp
|
||||
$(OBJS)\xrcdll_xh_clrpicker.o: ../../src/xrc/xh_clrpicker.cpp
|
||||
$(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\xrcdll_xh_collpane.o: ../../src/xrc/xh_collpane.cpp
|
||||
$(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\xrcdll_xh_combo.o: ../../src/xrc/xh_combo.cpp
|
||||
$(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
@ -12761,6 +12774,9 @@ $(OBJS)\xrclib_xh_choicbk.o: ../../src/xrc/xh_choicbk.cpp
|
||||
$(OBJS)\xrclib_xh_clrpicker.o: ../../src/xrc/xh_clrpicker.cpp
|
||||
$(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\xrclib_xh_collpane.o: ../../src/xrc/xh_collpane.cpp
|
||||
$(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\xrclib_xh_combo.o: ../../src/xrc/xh_combo.cpp
|
||||
$(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
|
@ -1029,6 +1029,7 @@ XRCDLL_OBJECTS = \
|
||||
$(OBJS)\xrcdll_xh_choic.obj \
|
||||
$(OBJS)\xrcdll_xh_choicbk.obj \
|
||||
$(OBJS)\xrcdll_xh_clrpicker.obj \
|
||||
$(OBJS)\xrcdll_xh_collpane.obj \
|
||||
$(OBJS)\xrcdll_xh_combo.obj \
|
||||
$(OBJS)\xrcdll_xh_datectrl.obj \
|
||||
$(OBJS)\xrcdll_xh_dirpicker.obj \
|
||||
@ -1095,6 +1096,7 @@ XRCLIB_OBJECTS = \
|
||||
$(OBJS)\xrclib_xh_choic.obj \
|
||||
$(OBJS)\xrclib_xh_choicbk.obj \
|
||||
$(OBJS)\xrclib_xh_clrpicker.obj \
|
||||
$(OBJS)\xrclib_xh_collpane.obj \
|
||||
$(OBJS)\xrclib_xh_combo.obj \
|
||||
$(OBJS)\xrclib_xh_datectrl.obj \
|
||||
$(OBJS)\xrclib_xh_dirpicker.obj \
|
||||
@ -1417,6 +1419,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_xh_choic.obj \
|
||||
$(OBJS)\monodll_xh_choicbk.obj \
|
||||
$(OBJS)\monodll_xh_clrpicker.obj \
|
||||
$(OBJS)\monodll_xh_collpane.obj \
|
||||
$(OBJS)\monodll_xh_combo.obj \
|
||||
$(OBJS)\monodll_xh_datectrl.obj \
|
||||
$(OBJS)\monodll_xh_dirpicker.obj \
|
||||
@ -2033,6 +2036,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_xh_choic.obj \
|
||||
$(OBJS)\monolib_xh_choicbk.obj \
|
||||
$(OBJS)\monolib_xh_clrpicker.obj \
|
||||
$(OBJS)\monolib_xh_collpane.obj \
|
||||
$(OBJS)\monolib_xh_combo.obj \
|
||||
$(OBJS)\monolib_xh_datectrl.obj \
|
||||
$(OBJS)\monolib_xh_dirpicker.obj \
|
||||
@ -5414,6 +5418,9 @@ $(OBJS)\monodll_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\monodll_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monodll_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
|
||||
|
||||
@ -7395,6 +7402,9 @@ $(OBJS)\monolib_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\monolib_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\monolib_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
|
||||
|
||||
@ -12412,6 +12422,9 @@ $(OBJS)\xrcdll_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\xrcdll_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\xrcdll_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\xrcdll_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) $**
|
||||
|
||||
@ -12577,6 +12590,9 @@ $(OBJS)\xrclib_xh_choicbk.obj: ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\xrclib_xh_clrpicker.obj: ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\xrclib_xh_collpane.obj: ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) $**
|
||||
|
||||
$(OBJS)\xrclib_xh_combo.obj: ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) $**
|
||||
|
||||
|
@ -144,6 +144,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = &
|
||||
$(OBJS)\monodll_xh_choic.obj &
|
||||
$(OBJS)\monodll_xh_choicbk.obj &
|
||||
$(OBJS)\monodll_xh_clrpicker.obj &
|
||||
$(OBJS)\monodll_xh_collpane.obj &
|
||||
$(OBJS)\monodll_xh_combo.obj &
|
||||
$(OBJS)\monodll_xh_datectrl.obj &
|
||||
$(OBJS)\monodll_xh_dirpicker.obj &
|
||||
@ -764,6 +765,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = &
|
||||
$(OBJS)\monolib_xh_choic.obj &
|
||||
$(OBJS)\monolib_xh_choicbk.obj &
|
||||
$(OBJS)\monolib_xh_clrpicker.obj &
|
||||
$(OBJS)\monolib_xh_collpane.obj &
|
||||
$(OBJS)\monolib_xh_combo.obj &
|
||||
$(OBJS)\monolib_xh_datectrl.obj &
|
||||
$(OBJS)\monolib_xh_dirpicker.obj &
|
||||
@ -3674,6 +3676,7 @@ XRCDLL_OBJECTS = &
|
||||
$(OBJS)\xrcdll_xh_choic.obj &
|
||||
$(OBJS)\xrcdll_xh_choicbk.obj &
|
||||
$(OBJS)\xrcdll_xh_clrpicker.obj &
|
||||
$(OBJS)\xrcdll_xh_collpane.obj &
|
||||
$(OBJS)\xrcdll_xh_combo.obj &
|
||||
$(OBJS)\xrcdll_xh_datectrl.obj &
|
||||
$(OBJS)\xrcdll_xh_dirpicker.obj &
|
||||
@ -3738,6 +3741,7 @@ XRCLIB_OBJECTS = &
|
||||
$(OBJS)\xrclib_xh_choic.obj &
|
||||
$(OBJS)\xrclib_xh_choicbk.obj &
|
||||
$(OBJS)\xrclib_xh_clrpicker.obj &
|
||||
$(OBJS)\xrclib_xh_collpane.obj &
|
||||
$(OBJS)\xrclib_xh_combo.obj &
|
||||
$(OBJS)\xrclib_xh_datectrl.obj &
|
||||
$(OBJS)\xrclib_xh_dirpicker.obj &
|
||||
@ -5426,6 +5430,9 @@ $(OBJS)\monodll_xh_choicbk.obj : .AUTODEPEND ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\monodll_xh_clrpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_xh_collpane.obj : .AUTODEPEND ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monodll_xh_combo.obj : .AUTODEPEND ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
|
||||
|
||||
@ -7507,6 +7514,9 @@ $(OBJS)\monolib_xh_choicbk.obj : .AUTODEPEND ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\monolib_xh_clrpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_xh_collpane.obj : .AUTODEPEND ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\monolib_xh_combo.obj : .AUTODEPEND ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
|
||||
|
||||
@ -12824,6 +12834,9 @@ $(OBJS)\xrcdll_xh_choicbk.obj : .AUTODEPEND ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\xrcdll_xh_clrpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\xrcdll_xh_collpane.obj : .AUTODEPEND ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\xrcdll_xh_combo.obj : .AUTODEPEND ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $<
|
||||
|
||||
@ -12989,6 +13002,9 @@ $(OBJS)\xrclib_xh_choicbk.obj : .AUTODEPEND ..\..\src\xrc\xh_choicbk.cpp
|
||||
$(OBJS)\xrclib_xh_clrpicker.obj : .AUTODEPEND ..\..\src\xrc\xh_clrpicker.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\xrclib_xh_collpane.obj : .AUTODEPEND ..\..\src\xrc\xh_collpane.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $<
|
||||
|
||||
$(OBJS)\xrclib_xh_combo.obj : .AUTODEPEND ..\..\src\xrc\xh_combo.cpp
|
||||
$(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $<
|
||||
|
||||
|
@ -9445,6 +9445,10 @@ SOURCE=..\..\include\wx\xrc\xh_clrpicker.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\xrc\xh_collpane.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\xrc\xh_combo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -1006,6 +1006,10 @@ SOURCE=..\..\include\wx\xrc\xh_clrpicker.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\xrc\xh_collpane.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\xrc\xh_combo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1222,6 +1226,10 @@ SOURCE=..\..\src\xrc\xh_clrpicker.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\xrc\xh_collpane.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\xrc\xh_combo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
19
configure.in
19
configure.in
@ -521,6 +521,7 @@ if test $DEBUG_CONFIGURE = 1; then
|
||||
DEFAULT_wxUSE_CHECKLST=no
|
||||
DEFAULT_wxUSE_CHOICE=no
|
||||
DEFAULT_wxUSE_CHOICEBOOK=no
|
||||
DEFAULT_wxUSE_COLLPANE=no
|
||||
DEFAULT_wxUSE_COLOURPICKERCTRL=no
|
||||
DEFAULT_wxUSE_COMBOBOX=no
|
||||
DEFAULT_wxUSE_COMBOCTRL=no
|
||||
@ -741,6 +742,7 @@ else
|
||||
DEFAULT_wxUSE_CHECKLST=yes
|
||||
DEFAULT_wxUSE_CHOICE=yes
|
||||
DEFAULT_wxUSE_CHOICEBOOK=yes
|
||||
DEFAULT_wxUSE_COLLPANE=yes
|
||||
DEFAULT_wxUSE_COLOURPICKERCTRL=yes
|
||||
DEFAULT_wxUSE_COMBOBOX=yes
|
||||
DEFAULT_wxUSE_COMBOCTRL=yes
|
||||
@ -1073,6 +1075,7 @@ if test "$wxUSE_CONTROLS" = "yes"; then
|
||||
DEFAULT_wxUSE_CHECKLISTBOX=yes
|
||||
DEFAULT_wxUSE_CHOICE=yes
|
||||
DEFAULT_wxUSE_CHOICEBOOK=yes
|
||||
DEFAULT_wxUSE_COLLPANE=yes
|
||||
DEFAULT_wxUSE_COLOURPICKERCTRL=yes
|
||||
DEFAULT_wxUSE_COMBOBOX=yes
|
||||
DEFAULT_wxUSE_DATEPICKCTRL=yes
|
||||
@ -1119,6 +1122,7 @@ elif test "$wxUSE_CONTROLS" = "no"; then
|
||||
DEFAULT_wxUSE_BUTTON=no
|
||||
DEFAULT_wxUSE_CALCTRL=no
|
||||
DEFAULT_wxUSE_CARET=no
|
||||
DEFAULT_wxUSE_COLLPANE=no
|
||||
DEFAULT_wxUSE_COMBOBOX=no
|
||||
DEFAULT_wxUSE_CHECKBOX=no
|
||||
DEFAULT_wxUSE_CHECKLISTBOX=no
|
||||
@ -1176,6 +1180,7 @@ WX_ARG_ENABLE(checkbox, [ --enable-checkbox use wxCheckBox class], wxU
|
||||
WX_ARG_ENABLE(checklst, [ --enable-checklst use wxCheckListBox (listbox with checkboxes) class], wxUSE_CHECKLST)
|
||||
WX_ARG_ENABLE(choice, [ --enable-choice use wxChoice class], wxUSE_CHOICE)
|
||||
WX_ARG_ENABLE(choicebook, [ --enable-choicebook use wxChoicebook class], wxUSE_CHOICEBOOK)
|
||||
WX_ARG_ENABLE(collpane, [ --enable-collpane use wxCollapsiblePane class], wxUSE_COLLPANE)
|
||||
WX_ARG_ENABLE(colourpicker,[ --enable-colourpicker use wxColourPickerCtrl class], wxUSE_COLOURPICKERCTRL)
|
||||
WX_ARG_ENABLE(combobox, [ --enable-combobox use wxComboBox class], wxUSE_COMBOBOX)
|
||||
WX_ARG_ENABLE(comboctrl, [ --enable-comboctrl use wxComboCtrl class], wxUSE_COMBOCTRL)
|
||||
@ -5679,7 +5684,7 @@ fi
|
||||
|
||||
if test "$WXGTK20" = 1; then
|
||||
if test "$wxUSE_LIBHILDON" = "yes" ; then
|
||||
PKG_CHECK_MODULES(HILDON,
|
||||
PKG_CHECK_MODULES(HILDON,
|
||||
[hildon-lgpl >= 0.9],
|
||||
[
|
||||
EXTRALIBS_HILDON="$HILDON_LIBS"
|
||||
@ -6574,6 +6579,12 @@ if test "$wxUSE_CARET" = "yes"; then
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret"
|
||||
fi
|
||||
|
||||
if test "$wxUSE_COLLPANE" = "yes"; then
|
||||
AC_DEFINE(wxUSE_COLLPANE)
|
||||
USES_CONTROLS=1
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS collpane"
|
||||
fi
|
||||
|
||||
if test "$wxUSE_COMBOBOX" = "yes"; then
|
||||
AC_DEFINE(wxUSE_COMBOBOX)
|
||||
USES_CONTROLS=1
|
||||
@ -7587,7 +7598,7 @@ if test "$wxUSE_WINE" = "yes"; then
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Add Universal binary support
|
||||
dnl Add Universal binary support
|
||||
dnl Note we don't do this earlier because adding these cpp/ld flags could
|
||||
dnl cause configure tests to fail.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
@ -7597,7 +7608,7 @@ if test "$wxUSE_MAC" = 1 ; then
|
||||
dnl --enable-universal_binary=SDK names a path to an SDK
|
||||
if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
|
||||
OSX_UNIV_OPTS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
||||
else
|
||||
else
|
||||
dnl '' would mean universal with no SDK, which may be the case if
|
||||
dnl the compiler uses a sysroot by default
|
||||
OSX_UNIV_OPTS=${wxUSE_UNIVERSAL_BINARY:+"-isysroot '$wxUSE_UNIVERSAL_BINARY'"}
|
||||
@ -7675,7 +7686,7 @@ then
|
||||
CPPFLAGS="-DWX_PRECOMP $CPPFLAGS"
|
||||
fi
|
||||
|
||||
dnl HACK ALERT!!
|
||||
dnl HACK ALERT!!
|
||||
dnl For now, we need to alter bk-deps not to generate deps
|
||||
dnl when we've configured a Universal binary build.
|
||||
dnl The next version of Bakefile will have the correct fix for this
|
||||
|
@ -13,6 +13,14 @@
|
||||
A collapsable panel is a container with an embedded button-like control which can be
|
||||
used by the user to collapse or expand the pane's contents.
|
||||
|
||||
Note that because of its nature of control which can dynamically (and drastically)
|
||||
change its size at run-time under user-input, when putting wxCollapsiblePane inside
|
||||
a \helpref{wxSizer}{wxsizer} you should be careful to add it with a proportion value
|
||||
of zero; this is because otherwise all other windows with non-null proportion values
|
||||
would automatically get resized each time the user expands or collaps the pane window.
|
||||
|
||||
It is only available if \texttt{wxUSE\_COLLPANE} is set to $1$ (the default).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxControl}{wxcontrol}\\
|
||||
@ -26,9 +34,18 @@ used by the user to collapse or expand the pane's contents.
|
||||
|
||||
\wxheading{Window styles}
|
||||
|
||||
There are no specific styles for this window.
|
||||
\twocolwidtha{5cm}%
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxCP\_DEFAULT\_STYLE}}{The default style: 0.}
|
||||
\end{twocollist}
|
||||
|
||||
\wxheading{Event handling}
|
||||
|
||||
\twocolwidtha{7cm}%
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf EVT\_COLLAPSIBLEPANE\_CHANGED(id, func)}}{The user showed or hidden the collapsible pane. }
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
|
@ -432,6 +432,14 @@
|
||||
# endif
|
||||
#endif /* !defined(wxUSE_CLIPBOARD) */
|
||||
|
||||
#ifndef wxUSE_COLLPANE
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_COLLPANE must be defined."
|
||||
# else
|
||||
# define wxUSE_COLLPANE 0
|
||||
# endif
|
||||
#endif /* !defined(wxUSE_COLLPANE) */
|
||||
|
||||
#ifndef wxUSE_COLOURDLG
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_COLOURDLG must be defined."
|
||||
|
@ -12,6 +12,11 @@
|
||||
#ifndef _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
#define _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
|
||||
#if wxUSE_COLLPANE
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
|
||||
@ -19,7 +24,8 @@
|
||||
// wxCollapsiblePaneBase: interface for wxCollapsiblePane
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxCP_DEFAULT_STYLE (0)
|
||||
#define wxCP_DEFAULT_STYLE (wxNO_BORDER)
|
||||
#define wxCP_NO_TLW_RESIZE (0x0002)
|
||||
|
||||
class WXDLLIMPEXP_ADV wxCollapsiblePaneBase : public wxControl
|
||||
{
|
||||
@ -81,15 +87,19 @@ typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEv
|
||||
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCollapsiblePaneEventFunction, &func)
|
||||
|
||||
#define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventFunction(fn))
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
|
||||
|
||||
|
||||
#if defined(__WXGTK24__)
|
||||
#include "wx/gtk/collpane.h"
|
||||
#else
|
||||
#include "wx/generic/collpaneg.h"
|
||||
#define wxCollapsiblePane wxGenericCollapsiblePane
|
||||
|
||||
// use a typedef and not a #define to avoid problems with XRC forward declarations
|
||||
typedef wxCollapsiblePane wxGenericCollapsiblePane
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_COLLPANE
|
||||
|
||||
#endif
|
||||
// _WX_COLLAPSABLE_PANE_H_BASE_
|
||||
|
@ -48,10 +48,13 @@ public:
|
||||
void Init()
|
||||
{
|
||||
m_pButton = NULL;
|
||||
m_pStatLine = NULL;
|
||||
m_pPane = NULL;
|
||||
m_pStaticLine = NULL;
|
||||
m_sz = NULL;
|
||||
}
|
||||
|
||||
~wxGenericCollapsiblePane();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& label,
|
||||
@ -80,17 +83,16 @@ public:
|
||||
protected:
|
||||
// overridden methods
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// internal helpers
|
||||
void LayoutChildren();
|
||||
bool Layout();
|
||||
|
||||
wxString GetBtnLabel() const;
|
||||
|
||||
int GetBorder() const;
|
||||
|
||||
// child controls
|
||||
wxButton *m_pButton;
|
||||
wxStaticLine *m_pStatLine;
|
||||
wxStaticLine *m_pStaticLine;
|
||||
wxWindow *m_pPane;
|
||||
wxSizer *m_sz;
|
||||
|
||||
// the button label without ">>" or "<<"
|
||||
wxString m_strLabel;
|
||||
|
@ -519,7 +519,7 @@
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_MEDIACTRL 1
|
||||
|
||||
// Use GStreamer for Unix (req a lot of dependancies)
|
||||
@ -614,6 +614,7 @@
|
||||
#define wxUSE_CHECKBOX 1 // wxCheckBox
|
||||
#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
|
||||
#define wxUSE_CHOICE 1 // wxChoice
|
||||
#define wxUSE_COLLPANE 1 // wxCollapsiblePane
|
||||
#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl
|
||||
#define wxUSE_COMBOBOX 1 // wxComboBox
|
||||
#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl
|
||||
|
@ -518,7 +518,7 @@
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_MEDIACTRL 1
|
||||
|
||||
// Use GStreamer for Unix (req a lot of dependancies)
|
||||
@ -613,6 +613,7 @@
|
||||
#define wxUSE_CHECKBOX 1 // wxCheckBox
|
||||
#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
|
||||
#define wxUSE_CHOICE 1 // wxChoice
|
||||
#define wxUSE_COLLPANE 1 // wxCollapsiblePane
|
||||
#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl
|
||||
#define wxUSE_COMBOBOX 1 // wxComboBox
|
||||
#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl
|
||||
|
@ -518,7 +518,7 @@
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_MEDIACTRL 1
|
||||
|
||||
// Use GStreamer for Unix (req a lot of dependancies)
|
||||
@ -613,6 +613,7 @@
|
||||
#define wxUSE_CHECKBOX 1 // wxCheckBox
|
||||
#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
|
||||
#define wxUSE_CHOICE 1 // wxChoice
|
||||
#define wxUSE_COLLPANE 1 // wxCollapsiblePane
|
||||
#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl
|
||||
#define wxUSE_COMBOBOX 1 // wxComboBox
|
||||
#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl
|
||||
|
@ -518,7 +518,7 @@
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_MEDIACTRL 1
|
||||
|
||||
// Use GStreamer for Unix (req a lot of dependancies)
|
||||
@ -613,6 +613,7 @@
|
||||
#define wxUSE_CHECKBOX 1 // wxCheckBox
|
||||
#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
|
||||
#define wxUSE_CHOICE 1 // wxChoice
|
||||
#define wxUSE_COLLPANE 1 // wxCollapsiblePane
|
||||
#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl
|
||||
#define wxUSE_COMBOBOX 1 // wxComboBox
|
||||
#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl
|
||||
|
@ -518,7 +518,7 @@
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_MEDIACTRL 1
|
||||
|
||||
// Use GStreamer for Unix (req a lot of dependancies)
|
||||
@ -613,6 +613,7 @@
|
||||
#define wxUSE_CHECKBOX 1 // wxCheckBox
|
||||
#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
|
||||
#define wxUSE_CHOICE 1 // wxChoice
|
||||
#define wxUSE_COLLPANE 1 // wxCollapsiblePane
|
||||
#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl
|
||||
#define wxUSE_COMBOBOX 1 // wxComboBox
|
||||
#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl
|
||||
|
@ -518,7 +518,7 @@
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_MEDIACTRL 1
|
||||
|
||||
// Use GStreamer for Unix (req a lot of dependancies)
|
||||
@ -613,6 +613,7 @@
|
||||
#define wxUSE_CHECKBOX 1 // wxCheckBox
|
||||
#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
|
||||
#define wxUSE_CHOICE 1 // wxChoice
|
||||
#define wxUSE_COLLPANE 1 // wxCollapsiblePane
|
||||
#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl
|
||||
#define wxUSE_COMBOBOX 1 // wxComboBox
|
||||
#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl
|
||||
|
@ -514,7 +514,7 @@
|
||||
//
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1
|
||||
// Recommended setting: 1
|
||||
#define wxUSE_MEDIACTRL 1
|
||||
|
||||
// Use GStreamer for Unix (req a lot of dependancies)
|
||||
@ -609,6 +609,7 @@
|
||||
#define wxUSE_CHECKBOX 1 // wxCheckBox
|
||||
#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
|
||||
#define wxUSE_CHOICE 1 // wxChoice
|
||||
#define wxUSE_COLLPANE 1 // wxCollapsiblePane
|
||||
#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl
|
||||
#define wxUSE_COMBOBOX 1 // wxComboBox
|
||||
#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl
|
||||
|
@ -66,5 +66,6 @@
|
||||
#include "wx/xrc/xh_hyperlink.h"
|
||||
#include "wx/xrc/xh_bmpcbox.h"
|
||||
#include "wx/xrc/xh_animatctrl.h"
|
||||
#include "wx/xrc/xh_collpane.h"
|
||||
|
||||
#endif // _WX_XH_ALL_H_
|
||||
|
36
include/wx/xrc/xh_collpane.h
Normal file
36
include/wx/xrc/xh_collpane.h
Normal file
@ -0,0 +1,36 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/xrc/xh_collpane.h
|
||||
// Purpose: XML resource handler for wxCollapsiblePane
|
||||
// Author: Francesco Montorsi
|
||||
// Created: 2006-10-27
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_COLLPANE_H_
|
||||
#define _WX_XH_COLLPANE_H_
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
#if wxUSE_XRC && wxUSE_COLLPANE
|
||||
|
||||
class WXDLLEXPORT wxCollapsiblePane;
|
||||
|
||||
class WXDLLIMPEXP_XRC wxCollapsiblePaneXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler)
|
||||
|
||||
public:
|
||||
wxCollapsiblePaneXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
|
||||
private:
|
||||
bool m_isInside;
|
||||
wxCollapsiblePane *m_collpane;
|
||||
};
|
||||
|
||||
#endif // wxUSE_XRC && wxUSE_COLLPANE
|
||||
|
||||
#endif // _WX_XH_COLLPANE_H_
|
@ -5,6 +5,7 @@
|
||||
|
||||
<exe id="collpane" template="wx_sample" template_append="wx_append">
|
||||
<sources>collpane.cpp</sources>
|
||||
<wx-lib>adv</wx-lib>
|
||||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<win32-res>../sample.rc</win32-res>
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "wx/clrpicker.h"
|
||||
#include "wx/filepicker.h"
|
||||
#include "wx/fontpicker.h"
|
||||
#include "wx/aboutdlg.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
@ -54,6 +55,7 @@ enum
|
||||
PANE_EXPAND,
|
||||
PANE_SETLABEL,
|
||||
PANE_SHOWDLG,
|
||||
PANE_ABOUT = wxID_ABOUT,
|
||||
PANE_QUIT = wxID_EXIT
|
||||
};
|
||||
|
||||
@ -84,6 +86,7 @@ public:
|
||||
void OnSetLabel(wxCommandEvent& event);
|
||||
void OnShowDialog(wxCommandEvent& event);
|
||||
void Quit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
|
||||
// Menu command update functions
|
||||
void UpdateUI(wxUpdateUIEvent& event);
|
||||
@ -100,6 +103,7 @@ class MyDialog : public wxDialog
|
||||
public:
|
||||
MyDialog(wxFrame *parent);
|
||||
void OnToggleStatus(wxCommandEvent& WXUNUSED(ev));
|
||||
void OnPaneChanged(wxCollapsiblePaneEvent& event);
|
||||
|
||||
private:
|
||||
wxCollapsiblePane *m_collPane;
|
||||
@ -139,6 +143,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(PANE_EXPAND, MyFrame::OnExpand)
|
||||
EVT_MENU(PANE_SETLABEL, MyFrame::OnSetLabel)
|
||||
EVT_MENU(PANE_SHOWDLG, MyFrame::OnShowDialog)
|
||||
EVT_MENU(PANE_ABOUT, MyFrame::OnAbout)
|
||||
EVT_MENU(PANE_QUIT, MyFrame::Quit)
|
||||
|
||||
EVT_UPDATE_UI(wxID_ANY, MyFrame::UpdateUI)
|
||||
@ -165,8 +170,12 @@ MyFrame::MyFrame()
|
||||
paneMenu->AppendSeparator();
|
||||
paneMenu->Append(PANE_QUIT);
|
||||
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(PANE_ABOUT);
|
||||
|
||||
wxMenuBar *menuBar = new wxMenuBar;
|
||||
menuBar->Append(paneMenu, _T("&Pane"));
|
||||
menuBar->Append(helpMenu, _T("&Help"));
|
||||
SetMenuBar(menuBar);
|
||||
|
||||
m_collPane = new wxCollapsiblePane(this, -1, wxT("test!"));
|
||||
@ -211,12 +220,23 @@ void MyFrame::OnShowDialog(wxCommandEvent& WXUNUSED(event) )
|
||||
dlg.ShowModal();
|
||||
}
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
wxAboutDialogInfo info;
|
||||
info.SetName(_("wxCollapsiblePane sample"));
|
||||
info.SetDescription(_("This sample program demonstrates usage of wxCollapsiblePane"));
|
||||
info.SetCopyright(_T("(C) 2006 Francesco Montorsi <frm@users.sourceforge.net>"));
|
||||
|
||||
wxAboutBox(info);
|
||||
}
|
||||
|
||||
void MyFrame::UpdateUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
GetMenuBar()->Enable(PANE_COLLAPSE, !m_collPane->IsCollapsed());
|
||||
GetMenuBar()->Enable(PANE_EXPAND, m_collPane->IsCollapsed());
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyDialog
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -228,6 +248,7 @@ enum
|
||||
|
||||
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
|
||||
EVT_BUTTON(PANEDLG_TOGGLESTATUS_BTN, MyDialog::OnToggleStatus)
|
||||
EVT_COLLAPSIBLEPANE_CHANGED(wxID_ANY, MyDialog::OnPaneChanged)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MyDialog::MyDialog(wxFrame *parent)
|
||||
@ -236,14 +257,14 @@ MyDialog::MyDialog(wxFrame *parent)
|
||||
wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE )
|
||||
{
|
||||
wxSizer *sz = new wxBoxSizer(wxVERTICAL);
|
||||
sz->Add(new wxStaticText(this, -1,
|
||||
sz->Add(new wxStaticText(this, -1,
|
||||
wxT("This dialog allows you to test the wxCollapsiblePane control")),
|
||||
0, wxALL, 5);
|
||||
sz->Add(new wxButton(this, PANEDLG_TOGGLESTATUS_BTN, wxT("Change status")),
|
||||
sz->Add(new wxButton(this, PANEDLG_TOGGLESTATUS_BTN, wxT("Change status")),
|
||||
1, wxGROW|wxALL, 5);
|
||||
|
||||
|
||||
m_collPane = new wxCollapsiblePane(this, -1, wxT("Click here for a surprise"));
|
||||
sz->Add(m_collPane, 1, wxGROW|wxALL, 5);
|
||||
sz->Add(m_collPane, 0, wxGROW|wxALL, 5);
|
||||
sz->Add(new wxTextCtrl(this, -1, wxT("just a test")), 0, wxGROW|wxALL, 5);
|
||||
sz->AddSpacer(10);
|
||||
sz->Add(new wxButton(this, wxID_OK), 0, wxALIGN_RIGHT|wxALL, 5);
|
||||
@ -267,3 +288,9 @@ void MyDialog::OnToggleStatus(wxCommandEvent& WXUNUSED(ev))
|
||||
m_collPane->Collapse(!m_collPane->IsCollapsed());
|
||||
}
|
||||
|
||||
void MyDialog::OnPaneChanged(wxCollapsiblePaneEvent &event)
|
||||
{
|
||||
wxLogDebug(wxT("The pane has just been %s by the user"),
|
||||
event.GetCollapsed() ? wxT("collapsed") : wxT("expanded"));
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
<subproject id="calendar" template="sub"/>
|
||||
<subproject id="caret" template="sub"/>
|
||||
<subproject id="checklst" template="sub"/>
|
||||
<subproject id="collpane" template="sub"/>
|
||||
<subproject id="config" template="sub"/>
|
||||
<subproject id="combo" template="sub"/>
|
||||
<subproject id="console" template="sub"/>
|
||||
|
@ -1118,6 +1118,54 @@
|
||||
</object>
|
||||
</object>
|
||||
|
||||
<object class="notebookpage">
|
||||
<label>wxCollapsiblePane</label>
|
||||
<object class="wxPanel" name="collpane">
|
||||
<object class="wxFlexGridSizer">
|
||||
<cols>1</cols>
|
||||
<rows>1</rows>
|
||||
<vgap>0</vgap>
|
||||
<hgap>0</hgap>
|
||||
<growablecols>0</growablecols>
|
||||
<growablerows>0</growablerows>
|
||||
|
||||
<object class="sizeritem">
|
||||
<flag>wxGROW|wxALL</flag>
|
||||
<border>5</border>
|
||||
<option>1</option>
|
||||
<object class="wxCollapsiblePane" name="controls_collpane">
|
||||
<label>Details:</label>
|
||||
<collapsed>0</collapsed>
|
||||
<object class="panewindow">
|
||||
|
||||
<object class="wxFlexGridSizer">
|
||||
<cols>1</cols>
|
||||
<rows>1</rows>
|
||||
<vgap>0</vgap>
|
||||
<hgap>0</hgap>
|
||||
<growablecols>0</growablecols>
|
||||
<growablerows>0</growablerows>
|
||||
|
||||
<object class="sizeritem">
|
||||
<flag>wxALIGN_CENTRE|wxALL</flag>
|
||||
<border>5</border>
|
||||
<object class="wxStaticText" name="controls_dialog_statictext">
|
||||
<label>
|
||||
Inside a wxCollapsiblePane you can put everything you want and
|
||||
lay them out using wxSizers, absolute positioning, everything you like!
|
||||
</label>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
<object class="notebookpage">
|
||||
<label>The Rest</label>
|
||||
<object class="wxPanel" name="Rest">
|
||||
|
@ -316,6 +316,7 @@
|
||||
#define wxUSE_CHECKBOX 0
|
||||
#define wxUSE_CHECKLISTBOX 0
|
||||
#define wxUSE_CHOICE 0
|
||||
#define wxUSE_COLLPANE 0
|
||||
#define wxUSE_COLOURPICKERCTRL 0
|
||||
#define wxUSE_COMBOBOX 0
|
||||
#define wxUSE_DATAVIEWCTRL 0
|
||||
|
@ -16,11 +16,12 @@
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_COLLPANE && wxUSE_BUTTON && wxUSE_STATLINE
|
||||
|
||||
#include "wx/collpane.h"
|
||||
|
||||
#if wxUSE_BUTTON && wxUSE_STATLINE
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/toplevel.h"
|
||||
#include "wx/button.h"
|
||||
@ -33,10 +34,6 @@
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// the number of pixels to leave between the button and the static line and
|
||||
// between the button and the pane
|
||||
#define wxCP_MARGIN 10
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
@ -71,33 +68,56 @@ bool wxGenericCollapsiblePane::Create(wxWindow *parent,
|
||||
|
||||
m_strLabel = label;
|
||||
|
||||
// create children; their size & position is set in OnSize()
|
||||
// create children and lay them out using a wxBoxSizer
|
||||
// (so that we automatically get RTL features)
|
||||
m_pButton = new wxButton(this, wxID_ANY, GetBtnLabel(), wxPoint(0, 0),
|
||||
wxDefaultSize, wxBU_EXACTFIT);
|
||||
m_pStatLine = new wxStaticLine(this, wxID_ANY);
|
||||
m_pStaticLine = new wxStaticLine(this, wxID_ANY);
|
||||
#ifdef __WXMAC__
|
||||
// on Mac we put the static libe above the button
|
||||
m_sz = new wxBoxSizer(wxVERTICAL);
|
||||
m_sz->Add(m_pStaticLine, 0, wxALL|wxGROW, GetBorder());
|
||||
m_sz->Add(m_pButton, 0, wxLEFT|wxRIGHT|wxBOTTOM, GetBorder());
|
||||
#else
|
||||
// on other platforms we put the static line and the button horizontally
|
||||
m_sz = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_sz->Add(m_pButton, 0, wxLEFT|wxTOP|wxBOTTOM, GetBorder());
|
||||
m_sz->Add(m_pStaticLine, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT, GetBorder());
|
||||
#endif
|
||||
|
||||
// do not set sz as our sizers since we handle the pane window without using sizers
|
||||
m_pPane = new wxWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxNO_BORDER);
|
||||
|
||||
// start as collapsed:
|
||||
m_pPane->Hide();
|
||||
|
||||
//CacheBestSize(GetBestSize());
|
||||
return true;
|
||||
}
|
||||
|
||||
wxGenericCollapsiblePane::~wxGenericCollapsiblePane()
|
||||
{
|
||||
if (m_pButton && m_pStaticLine && m_sz)
|
||||
{
|
||||
m_pButton->SetContainingSizer(NULL);
|
||||
m_pStaticLine->SetContainingSizer(NULL);
|
||||
|
||||
// our sizer is not deleted automatically since we didn't use SetSizer()!
|
||||
wxDELETE(m_sz);
|
||||
}
|
||||
}
|
||||
|
||||
wxSize wxGenericCollapsiblePane::DoGetBestSize() const
|
||||
{
|
||||
wxSize sz = m_pButton->GetBestSize();
|
||||
|
||||
// set width
|
||||
sz.SetWidth(sz.x + wxCP_MARGIN + m_pStatLine->GetBestSize().x);
|
||||
const wxCoord paneWidth = m_pPane->GetBestSize().x;
|
||||
if ( sz.x < paneWidth )
|
||||
sz.x = paneWidth;
|
||||
// NB: do not use GetSize() but rather GetMinSize()
|
||||
wxSize sz = m_sz->GetMinSize();
|
||||
|
||||
// when expanded, we need more vertical space
|
||||
if ( IsExpanded() )
|
||||
sz.SetHeight(sz.y + wxCP_MARGIN + m_pPane->GetBestSize().y);
|
||||
{
|
||||
sz.SetWidth(wxMax( sz.GetWidth(), m_pPane->GetBestSize().x ));
|
||||
sz.SetHeight(sz.y + GetBorder() + m_pPane->GetBestSize().y);
|
||||
}
|
||||
|
||||
return sz;
|
||||
}
|
||||
@ -113,16 +133,27 @@ void wxGenericCollapsiblePane::OnStateChange(const wxSize& sz)
|
||||
SetMinSize(sz);
|
||||
SetSize(sz);
|
||||
|
||||
if (this->HasFlag(wxCP_NO_TLW_RESIZE))
|
||||
{
|
||||
// the user asked to explicitely handle the resizing itself...
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// NB: the following block of code has been accurately designed to
|
||||
// as much flicker-free as possible; be careful when modifying it!
|
||||
//
|
||||
|
||||
wxTopLevelWindow *
|
||||
top = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
|
||||
if ( top )
|
||||
{
|
||||
// we've changed our size, thus our top level parent needs to relayout
|
||||
// itself
|
||||
top->Layout();
|
||||
// NB: don't Layout() the 'top' window as its size has not been correctly
|
||||
// updated yet and we don't want to do an initial Layout() with the old
|
||||
// size immediately followed by a SetClientSize/Fit call for the new
|
||||
// size; that would provoke flickering!
|
||||
|
||||
// FIXME: this makes wxGenericCollapsiblePane behave as the user expect
|
||||
// but maybe there are cases where this is unwanted!
|
||||
if (top->GetSizer())
|
||||
#ifdef __WXGTK__
|
||||
// FIXME: the SetSizeHints() call would be required also for GTK+ for
|
||||
@ -142,12 +173,23 @@ void wxGenericCollapsiblePane::OnStateChange(const wxSize& sz)
|
||||
{
|
||||
if ( IsCollapsed() )
|
||||
{
|
||||
// use SetClientSize() and not SetSize() otherwise the size for
|
||||
// e.g. a wxFrame with a menubar wouldn't be correctly set
|
||||
top->SetClientSize(sz);
|
||||
// expanded -> collapsed transition
|
||||
if (top->GetSizer())
|
||||
{
|
||||
// we have just set the size hints...
|
||||
wxSize sz = top->GetSizer()->CalcMin();
|
||||
|
||||
// use SetClientSize() and not SetSize() otherwise the size for
|
||||
// e.g. a wxFrame with a menubar wouldn't be correctly set
|
||||
top->SetClientSize(sz);
|
||||
}
|
||||
else
|
||||
top->Layout();
|
||||
}
|
||||
else
|
||||
{
|
||||
// collapsed -> expanded transition
|
||||
|
||||
// force our parent to "fit", i.e. expand so that it can honour
|
||||
// our minimal size
|
||||
top->Fit();
|
||||
@ -178,23 +220,46 @@ void wxGenericCollapsiblePane::SetLabel(const wxString &label)
|
||||
m_pButton->SetLabel(GetBtnLabel());
|
||||
m_pButton->SetBestFittingSize();
|
||||
|
||||
LayoutChildren();
|
||||
Layout();
|
||||
}
|
||||
|
||||
void wxGenericCollapsiblePane::LayoutChildren()
|
||||
bool wxGenericCollapsiblePane::Layout()
|
||||
{
|
||||
wxSize btnSz = m_pButton->GetSize();
|
||||
if (!m_pButton || !m_pStaticLine || !m_pPane || !m_sz)
|
||||
return false; // we need to complete the creation first!
|
||||
|
||||
// the button position & size are always ok...
|
||||
wxSize oursz(GetSize());
|
||||
|
||||
// move & resize the static line
|
||||
m_pStatLine->SetSize(btnSz.x + wxCP_MARGIN, btnSz.y/2,
|
||||
GetSize().x - btnSz.x - wxCP_MARGIN, -1,
|
||||
wxSIZE_USE_EXISTING);
|
||||
// move & resize the button and the static line
|
||||
m_sz->SetDimension(0, 0, oursz.GetWidth(), m_sz->GetMinSize().GetHeight());
|
||||
m_sz->Layout();
|
||||
|
||||
// move & resize the container window
|
||||
m_pPane->SetSize(0, btnSz.y + wxCP_MARGIN,
|
||||
GetSize().x, GetSize().y - btnSz.y - wxCP_MARGIN);
|
||||
if ( IsExpanded() )
|
||||
{
|
||||
// move & resize the container window
|
||||
int yoffset = m_sz->GetSize().GetHeight() + GetBorder();
|
||||
m_pPane->SetSize(0, yoffset,
|
||||
oursz.x, oursz.y - yoffset);
|
||||
|
||||
// this is very important to make the pane window layout show correctly
|
||||
m_pPane->Layout();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int wxGenericCollapsiblePane::GetBorder() const
|
||||
{
|
||||
#if defined( __WXMAC__ )
|
||||
return 6;
|
||||
#elif defined(__WXGTK20__)
|
||||
return 3;
|
||||
#elif defined(__WXMSW__)
|
||||
wxASSERT(m_pButton);
|
||||
return m_pButton->ConvertDialogToPixels(wxSize(2, 0)).x;
|
||||
#else
|
||||
return 5;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -229,14 +294,7 @@ void wxGenericCollapsiblePane::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
dc.DrawRectangle(wxPoint(0,0), GetBestSize());
|
||||
#endif
|
||||
|
||||
|
||||
if (!m_pButton || !m_pStatLine || !m_pPane)
|
||||
return; // we need to complete the creation first!
|
||||
|
||||
LayoutChildren();
|
||||
|
||||
// this is very important to make the pane window layout show correctly
|
||||
m_pPane->Layout();
|
||||
Layout();
|
||||
}
|
||||
|
||||
#endif // wxUSE_BUTTON && wxUSE_STATLINE
|
||||
#endif // wxUSE_COLLPANE && wxUSE_BUTTON && wxUSE_STATLINE
|
||||
|
@ -17,10 +17,11 @@
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __WXGTK24__
|
||||
#if wxUSE_COLLPANE && defined( __WXGTK24__ )
|
||||
|
||||
#include "wx/collpane.h"
|
||||
#include "wx/gtk/private.h"
|
||||
#include "wx/gtk/win_gtk.h"
|
||||
|
||||
#include <gtk/gtkexpander.h>
|
||||
|
||||
@ -50,18 +51,16 @@ static void gtk_collapsiblepane_expanded_callback (GObject *object,
|
||||
wxSize sz;
|
||||
if ( p->IsExpanded() )
|
||||
{
|
||||
// unfortunately there's no clean way to retrieve the minimal size of
|
||||
// the expanded pane in this handler or in other handlers for the
|
||||
// signals generated by user clicks on the GtkExpander button:
|
||||
// p->GetBestSize() or p->GetMinSize() would still return the size for
|
||||
// the collapsed expander even if the collapsed->expanded transition
|
||||
// has already been completed (this because GTK+ queues some resize
|
||||
// calls which still must be processed). So, the only solution to
|
||||
// correctly set the size hints for this window is to calculate the
|
||||
// expanded size ourselves, without relying on p->Get[Best|Min]Size:
|
||||
sz = p->GetMinSize();
|
||||
sz.SetWidth(wxMax(sz.x, p->GetPane()->GetMinSize().x));
|
||||
sz.SetHeight(sz.y + p->GetPane()->GetMinSize().y + 10);
|
||||
// NB: we cannot use the p->GetBestSize() or p->GetMinSize() functions
|
||||
// here as they would return the size for the collapsed expander
|
||||
// even if the collapsed->expanded transition has already been
|
||||
// completed; we solve this problem doing:
|
||||
|
||||
sz = p->m_szCollapsed;
|
||||
|
||||
wxSize panesz = p->GetPane()->GetBestSize();
|
||||
sz.x = wxMax(sz.x, panesz.x);
|
||||
sz.y += gtk_expander_get_spacing(GTK_EXPANDER(p->m_widget)) + panesz.y;
|
||||
}
|
||||
else // collapsed
|
||||
{
|
||||
@ -72,8 +71,95 @@ static void gtk_collapsiblepane_expanded_callback (GObject *object,
|
||||
sz = p->m_szCollapsed;
|
||||
}
|
||||
|
||||
#if 1
|
||||
// this does work but in the expanded->collapsed transition it provokes
|
||||
// a lot of flicker!!!
|
||||
//
|
||||
// It also has the problem that in the collapsed->expanded transition with the
|
||||
// "clearlooks" GTK theme I get:
|
||||
//
|
||||
// ** (collpane:18928): CRITICAL **: clearlooks_style_draw_focus: assertion `height >= -1' failed
|
||||
// ** (collpane:18928): CRITICAL **: clearlooks_style_draw_focus: assertion `height >= -1' failed
|
||||
//
|
||||
// Not sure however if this is a ClearLooks bug or rather my bug.
|
||||
// Note that those warnings only appear:
|
||||
// 1) if you're using clearlooks theme
|
||||
// 2) if you use the "Change status" wxButton in samples/collpane application
|
||||
p->OnStateChange(sz);
|
||||
|
||||
#else // flicker-free code
|
||||
|
||||
|
||||
// need to update our size hints
|
||||
// NB: this function call won't actually do any long operation
|
||||
// (redraw/relayouting/resizing) so that it's flicker-free
|
||||
p->SetMinSize(sz);
|
||||
|
||||
if (p->HasFlag(wxCP_NO_TLW_RESIZE))
|
||||
{
|
||||
// the user asked to explicitely handle the resizing itself...
|
||||
return;
|
||||
}
|
||||
|
||||
wxTopLevelWindow *
|
||||
top = wxDynamicCast(wxGetTopLevelParent(p), wxTopLevelWindow);
|
||||
if ( top && top->GetSizer() )
|
||||
{
|
||||
// recalculate minimal size of the top window
|
||||
wxSize sz = top->GetSizer()->CalcMin();
|
||||
|
||||
// FIXME:
|
||||
// THE PROBLEM WITH THIS CODE IS THAT IN THE EXPANDED->COLLAPSED TRANSITION
|
||||
// IT DOES *NOT* SHRINK THE TOP WINDOW.
|
||||
// However it's flicker-free, native code and it also does not have the
|
||||
// ** (collpane:18928): CRITICAL **: clearlooks_style_draw_focus: assertion `height >= -1' failed
|
||||
// problem
|
||||
|
||||
if (top->m_mainWidget)
|
||||
{
|
||||
wxLogDebug(wxT("setting min size to %d;%d"), sz.x, sz.y);
|
||||
|
||||
// set size hints
|
||||
GdkGeometry geom;
|
||||
|
||||
geom.min_width = sz.x;
|
||||
geom.min_height = sz.y;
|
||||
|
||||
gtk_window_set_geometry_hints( GTK_WINDOW(top->m_widget),
|
||||
(GtkWidget*) NULL,
|
||||
&geom,
|
||||
GDK_HINT_MIN_SIZE );
|
||||
//gtk_window_set_default_size( GTK_WINDOW(top->m_widget), sz.x, sz.y );
|
||||
|
||||
|
||||
/* I revert back to wxGTK's original behaviour. m_mainWidget holds the
|
||||
* menubar, the toolbar and the client area, which is represented by
|
||||
* m_wxwindow.
|
||||
* this hurts in the eye, but I don't want to call SetSize()
|
||||
* because I don't want to call any non-native functions here. */
|
||||
|
||||
top->m_width = sz.x;
|
||||
top->m_height = sz.y;
|
||||
|
||||
int client_x = top->m_miniEdge;
|
||||
int client_y = top->m_miniEdge + top->m_miniTitle;
|
||||
int client_w = top->m_width - 2*top->m_miniEdge;
|
||||
int client_h = top->m_height - 2*top->m_miniEdge - top->m_miniTitle;
|
||||
if (client_w < 0)
|
||||
client_w = 0;
|
||||
if (client_h < 0)
|
||||
client_h = 0;
|
||||
|
||||
// Let the parent perform the resize
|
||||
gtk_pizza_set_size( GTK_PIZZA(top->m_mainWidget),
|
||||
top->m_wxwindow,
|
||||
client_x, client_y, client_w, client_h );
|
||||
|
||||
gtk_widget_set_size_request( top->m_wxwindow, sz.x, sz.y );
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if ( p->m_bIgnoreNextChange )
|
||||
{
|
||||
// change generated programmatically - do not send an event!
|
||||
@ -173,6 +259,7 @@ wxSize wxCollapsiblePane::DoGetBestSize() const
|
||||
(m_widget, &req );
|
||||
|
||||
// notice that we do not cache our best size here as it changes
|
||||
// all times the user expands/hide our pane
|
||||
return wxSize(req.width, req.height);
|
||||
}
|
||||
|
||||
@ -206,7 +293,13 @@ bool wxCollapsiblePane::IsCollapsed() const
|
||||
void wxCollapsiblePane::SetLabel(const wxString &str)
|
||||
{
|
||||
if (!gtk_check_version(2,4,0))
|
||||
{
|
||||
gtk_expander_set_label(GTK_EXPANDER(m_widget), wxGTK_CONV(str));
|
||||
|
||||
// FIXME: we need to update our collapsed width in some way but using GetBestSize()
|
||||
// we may get the size of the control with the pane size summed up if we are expanded!
|
||||
//m_szCollapsed.x = GetBestSize().x;
|
||||
}
|
||||
else
|
||||
wxGenericCollapsiblePane::SetLabel(str);
|
||||
}
|
||||
@ -224,12 +317,12 @@ void wxCollapsiblePane::OnSize(wxSizeEvent &ev)
|
||||
|
||||
// here we need to resize the pane window otherwise, even if the GtkExpander container
|
||||
// is expanded or shrinked, the pane window won't be updated!
|
||||
m_pPane->SetSize(ev.GetSize());
|
||||
m_pPane->SetSize(ev.GetSize().x, ev.GetSize().y - m_szCollapsed.y);
|
||||
|
||||
// we need to explicitely call m_pPane->Layout() or else it won't correctly relayout
|
||||
// (even if SetAutoLayout(true) has been called on it!)
|
||||
m_pPane->Layout();
|
||||
}
|
||||
|
||||
#endif // __WXGTK24__
|
||||
#endif // wxUSE_COLLPANE && defined( __WXGTK24__ )
|
||||
|
||||
|
@ -1935,6 +1935,10 @@ SOURCE=.\xrc\xh_clrpicker.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\xrc\xh_collpane.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\xrc\xh_combo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -3551,6 +3555,10 @@ SOURCE=..\include\wx\xrc\xh_clrpicker.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\xrc\xh_collpane.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\wx\xrc\xh_combo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
96
src/xrc/xh_collpane.cpp
Normal file
96
src/xrc/xh_collpane.cpp
Normal file
@ -0,0 +1,96 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/xrc/xh_collpane.cpp
|
||||
// Purpose: XML resource handler for wxCollapsiblePane
|
||||
// Author: Francesco Montorsi
|
||||
// Created: 2006-10-27
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_XRC && wxUSE_COLLPANE
|
||||
|
||||
#include "wx/xrc/xh_collpane.h"
|
||||
#include "wx/collpane.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxCollapsiblePaneXmlHandler::wxCollapsiblePaneXmlHandler() : wxXmlResourceHandler()
|
||||
{
|
||||
XRC_ADD_STYLE(wxCP_NO_TLW_RESIZE);
|
||||
XRC_ADD_STYLE(wxCP_DEFAULT_STYLE);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxCollapsiblePaneXmlHandler::DoCreateResource()
|
||||
{
|
||||
if (m_class == wxT("panewindow")) // read the XRC for the pane window
|
||||
{
|
||||
wxXmlNode *n = GetParamNode(wxT("object"));
|
||||
|
||||
if ( !n )
|
||||
n = GetParamNode(wxT("object_ref"));
|
||||
|
||||
if (n)
|
||||
{
|
||||
bool old_ins = m_isInside;
|
||||
m_isInside = false;
|
||||
wxObject *item = CreateResFromNode(n, m_collpane->GetPane(), NULL);
|
||||
m_isInside = old_ins;
|
||||
|
||||
return item;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogError(wxT("Error in resource: no control within collapsible pane's <panewindow> tag."));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
XRC_MAKE_INSTANCE(ctrl, wxCollapsiblePane)
|
||||
|
||||
wxString label = GetParamValue(wxT("label"));
|
||||
if (label.empty())
|
||||
{
|
||||
wxLogError(wxT("Error in resource: empty label for wxCollapsiblePane"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ctrl->Create(m_parentAsWindow,
|
||||
GetID(),
|
||||
label,
|
||||
GetPosition(), GetSize(),
|
||||
GetStyle(_T("style"), wxCP_DEFAULT_STYLE),
|
||||
wxDefaultValidator,
|
||||
GetName());
|
||||
|
||||
ctrl->Collapse(GetBool(_T("collapsed")));
|
||||
SetupWindow(ctrl);
|
||||
|
||||
wxCollapsiblePane *old_par = m_collpane;
|
||||
m_collpane = ctrl;
|
||||
bool old_ins = m_isInside;
|
||||
m_isInside = true;
|
||||
CreateChildren(m_collpane, true/*only this handler*/);
|
||||
m_isInside = old_ins;
|
||||
m_collpane = old_par;
|
||||
|
||||
return ctrl;
|
||||
}
|
||||
}
|
||||
|
||||
bool wxCollapsiblePaneXmlHandler::CanHandle(wxXmlNode *node)
|
||||
{
|
||||
return IsOfClass(node, wxT("wxCollapsiblePane")) ||
|
||||
(m_isInside && IsOfClass(node, wxT("panewindow")));
|
||||
}
|
||||
|
||||
#endif // wxUSE_XRC && wxUSE_COLLPANE
|
@ -63,6 +63,9 @@ void wxXmlResource::InitAllHandlers()
|
||||
#if wxUSE_CHOICEBOOK
|
||||
AddHandler(new wxChoicebookXmlHandler);
|
||||
#endif
|
||||
#if wxUSE_COLLPANE
|
||||
AddHandler(new wxCollapsiblePaneXmlHandler);
|
||||
#endif
|
||||
#if wxUSE_COLOURPICKERCTRL
|
||||
AddHandler(new wxColourPickerCtrlXmlHandler);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user