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 \
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 \
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 \
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 \
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 \
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
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
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
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
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
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
$(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 \
$(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 \
$(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 \
$(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 \
$(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) $**
$(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) $**
$(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) $**
$(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) $**
$(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 \
$(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 \
$(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 \
$(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 \
$(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) $<
$(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) $<
$(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) $<
$(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) $<
$(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 \
$(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 \
$(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 \
$(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 \
$(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) $**
$(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) $**
$(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) $**
$(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) $**
$(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 &
$(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 &
$(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 &
$(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 &
$(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) $<
$(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) $<
$(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) $<
$(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) $<
# 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
# 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
# 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
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
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
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
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
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)
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"
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
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 ---------------------------------------------------------------------------
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'"}
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
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}\\
\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}
# 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."
#ifndef _WX_COLLAPSABLE_PANE_H_BASE_
#define _WX_COLLAPSABLE_PANE_H_BASE_
+#include "wx/defs.h"
+
+
+#if wxUSE_COLLPANE
+
#include "wx/control.h"
// 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
{
(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_
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,
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;
//
// Default is 1.
//
-// Recommended setting: 1
+// Recommended setting: 1
#define wxUSE_MEDIACTRL 1
// Use GStreamer for Unix (req a lot of dependancies)
#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
//
// Default is 1.
//
-// Recommended setting: 1
+// Recommended setting: 1
#define wxUSE_MEDIACTRL 1
// Use GStreamer for Unix (req a lot of dependancies)
#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
//
// Default is 1.
//
-// Recommended setting: 1
+// Recommended setting: 1
#define wxUSE_MEDIACTRL 1
// Use GStreamer for Unix (req a lot of dependancies)
#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
//
// Default is 1.
//
-// Recommended setting: 1
+// Recommended setting: 1
#define wxUSE_MEDIACTRL 1
// Use GStreamer for Unix (req a lot of dependancies)
#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
//
// Default is 1.
//
-// Recommended setting: 1
+// Recommended setting: 1
#define wxUSE_MEDIACTRL 1
// Use GStreamer for Unix (req a lot of dependancies)
#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
//
// Default is 1.
//
-// Recommended setting: 1
+// Recommended setting: 1
#define wxUSE_MEDIACTRL 1
// Use GStreamer for Unix (req a lot of dependancies)
#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
//
// Default is 1.
//
-// Recommended setting: 1
+// Recommended setting: 1
#define wxUSE_MEDIACTRL 1
// Use GStreamer for Unix (req a lot of dependancies)
#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
#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_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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_
<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>
#include "wx/clrpicker.h"
#include "wx/filepicker.h"
#include "wx/fontpicker.h"
+#include "wx/aboutdlg.h"
// ----------------------------------------------------------------------------
// constants
PANE_EXPAND,
PANE_SETLABEL,
PANE_SHOWDLG,
+ PANE_ABOUT = wxID_ABOUT,
PANE_QUIT = wxID_EXIT
};
void OnSetLabel(wxCommandEvent& event);
void OnShowDialog(wxCommandEvent& event);
void Quit(wxCommandEvent& event);
+ void OnAbout(wxCommandEvent& event);
// Menu command update functions
void UpdateUI(wxUpdateUIEvent& event);
public:
MyDialog(wxFrame *parent);
void OnToggleStatus(wxCommandEvent& WXUNUSED(ev));
+ void OnPaneChanged(wxCollapsiblePaneEvent& event);
private:
wxCollapsiblePane *m_collPane;
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)
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!"));
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
// ----------------------------------------------------------------------------
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)
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);
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"));
+}
+
<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"/>
</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">
#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
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#include "wx/defs.h"
-#include "wx/collpane.h"
+#if wxUSE_COLLPANE && wxUSE_BUTTON && wxUSE_STATLINE
-#if wxUSE_BUTTON && wxUSE_STATLINE
+#include "wx/collpane.h"
#ifndef WX_PRECOMP
#include "wx/toplevel.h"
// 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
// ============================================================================
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;
}
-wxSize wxGenericCollapsiblePane::DoGetBestSize() const
+wxGenericCollapsiblePane::~wxGenericCollapsiblePane()
{
- wxSize sz = m_pButton->GetBestSize();
+ if (m_pButton && m_pStaticLine && m_sz)
+ {
+ m_pButton->SetContainingSizer(NULL);
+ m_pStaticLine->SetContainingSizer(NULL);
- // 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;
+ // our sizer is not deleted automatically since we didn't use SetSizer()!
+ wxDELETE(m_sz);
+ }
+}
+
+wxSize wxGenericCollapsiblePane::DoGetBestSize() const
+{
+ // 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;
}
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
{
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();
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!
+
+ wxSize oursz(GetSize());
- // the button position & size are always ok...
+ // 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 static line
- m_pStatLine->SetSize(btnSz.x + wxCP_MARGIN, btnSz.y/2,
- GetSize().x - btnSz.x - wxCP_MARGIN, -1,
- wxSIZE_USE_EXISTING);
+ 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();
+ }
- // move & resize the container window
- m_pPane->SetSize(0, btnSz.y + wxCP_MARGIN,
- GetSize().x, GetSize().y - btnSz.y - wxCP_MARGIN);
+ 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
}
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
// 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>
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
{
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!
(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);
}
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);
}
// 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__ )
# 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
# 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
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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
#if wxUSE_CHOICEBOOK
AddHandler(new wxChoicebookXmlHandler);
#endif
+#if wxUSE_COLLPANE
+ AddHandler(new wxCollapsiblePaneXmlHandler);
+#endif
#if wxUSE_COLOURPICKERCTRL
AddHandler(new wxColourPickerCtrlXmlHandler);
#endif