COND_MONOLITHIC_0_SHARED_1_USE_XRC_1=""
fi
AC_SUBST(COND_MONOLITHIC_0_SHARED_1_USE_XRC_1)
-dnl ### begin block 20_COND_MONOLITHIC_0_USE_MEDIA_1[../../samples/dialup/dialup.bkl,../../samples/mediaplayer/mediaplayer.bkl,../../samples/splash/splash.bkl,../../tests/test.bkl,wx.bkl] ###
+dnl ### begin block 20_COND_MONOLITHIC_0_USE_MEDIA_1[../../samples/dialup/dialup.bkl,../../samples/mediaplayer/mediaplayer.bkl,../../samples/splash/splash.bkl,../../samples/widgets/widgets.bkl,../../tests/test.bkl,wx.bkl] ###
COND_MONOLITHIC_0_USE_MEDIA_1="#"
if test "x$MONOLITHIC" = "x0" -a "x$USE_MEDIA" = "x1" ; then
COND_MONOLITHIC_0_USE_MEDIA_1=""
TOOLKIT_VERSION = @TOOLKIT_VERSION@
TOOLCHAIN_FULLNAME = @TOOLCHAIN_FULLNAME@
EXTRALIBS = @EXTRALIBS@
+EXTRALIBS_HTML = @EXTRALIBS_HTML@
EXTRALIBS_GUI = @EXTRALIBS_GUI@
+EXTRALIBS_SDL = @EXTRALIBS_SDL@
HOST_SUFFIX = @HOST_SUFFIX@
SAMPLES_RPATH_FLAG = @SAMPLES_RPATH_FLAG@
SAMPLES_RPATH_POSTLINK = @SAMPLES_RPATH_POSTLINK@
widgets_button.o \
widgets_checkbox.o \
widgets_combobox.o \
+ widgets_datepick.o \
widgets_gauge.o \
widgets_listbox.o \
widgets_notebook.o \
@COND_DEPS_TRACKING_0@CXXC = $(CXX)
@COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX)
+@COND_USE_PLUGINS_0@PLUGIN_ADV_EXTRALIBS = $(EXTRALIBS_SDL)
@COND_USE_GUI_0@PORTNAME = base
@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
@COND_TOOLKIT_COCOA@ widgets.app/Contents/PkgInfo
@COND_TOOLKIT_MAC@____widgets_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_MAC@ widgets.app/Contents/PkgInfo
+COND_MONOLITHIC_0___WXLIB_ADV_p = \
+ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_ADV_p = $(COND_MONOLITHIC_0___WXLIB_ADV_p)
+COND_MONOLITHIC_0___WXLIB_HTML_p = \
+ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_HTML_p = $(COND_MONOLITHIC_0___WXLIB_HTML_p)
COND_MONOLITHIC_0___WXLIB_CORE_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
-@COND_PLATFORM_WIN32_1@__widgets___win32rc = widgets_widgets_rc.o
+@COND_PLATFORM_WIN32_1@__widgets___win32rc = widgets_sample_rc.o
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
widgets$(EXEEXT): $(WIDGETS_OBJECTS) $(__widgets___win32rc)
- $(CXX) -o $@ $(WIDGETS_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(EXTRALIBS_FOR_GUI)
+ $(CXX) -o $@ $(WIDGETS_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_ADV_p) $(PLUGIN_ADV_EXTRALIBS) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
$(__widgets___mac_rezcmd)
$(__widgets___mac_setfilecmd)
$(__widgets___os2_emxbindcmd)
widgets_combobox.o: $(srcdir)/combobox.cpp
$(CXXC) -c -o $@ $(WIDGETS_CXXFLAGS) $(srcdir)/combobox.cpp
+widgets_datepick.o: $(srcdir)/datepick.cpp
+ $(CXXC) -c -o $@ $(WIDGETS_CXXFLAGS) $(srcdir)/datepick.cpp
+
widgets_gauge.o: $(srcdir)/gauge.cpp
$(CXXC) -c -o $@ $(WIDGETS_CXXFLAGS) $(srcdir)/gauge.cpp
widgets_widgets.o: $(srcdir)/widgets.cpp
$(CXXC) -c -o $@ $(WIDGETS_CXXFLAGS) $(srcdir)/widgets.cpp
-widgets_widgets_rc.o: $(srcdir)/widgets.rc
+widgets_sample_rc.o: $(srcdir)/../sample.rc
$(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_2) $(__EXCEPTIONS_DEFINE_p_2) $(__RTTI_DEFINE_p_2) $(__THREAD_DEFINE_p_2) --include-dir $(srcdir) $(__DLLFLAG_p_2) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_1) --include-dir $(top_srcdir)/include
class ButtonWidgetsPage : public WidgetsPage
{
public:
- ButtonWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ ButtonWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual ~ButtonWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_button; }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(ButtonWidgetsPage, _T("Button"));
+IMPLEMENT_WIDGETS_PAGE(ButtonWidgetsPage, _T("Button"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ );
-ButtonWidgetsPage::ButtonWidgetsPage(wxBookCtrlBase *book,
+ButtonWidgetsPage::ButtonWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
: WidgetsPage(book)
{
class CheckBoxWidgetsPage : public WidgetsPage
{
public:
- CheckBoxWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ CheckBoxWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual ~CheckBoxWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_checkbox; }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(CheckBoxWidgetsPage, wxT("CheckBox"));
+IMPLEMENT_WIDGETS_PAGE(CheckBoxWidgetsPage, wxT("CheckBox"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ );
-CheckBoxWidgetsPage::CheckBoxWidgetsPage(wxBookCtrlBase *book,
+CheckBoxWidgetsPage::CheckBoxWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
: WidgetsPage(book)
{
class ComboboxWidgetsPage : public WidgetsPage
{
public:
- ComboboxWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ ComboboxWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual wxControl *GetWidget() const { return m_combobox; }
virtual void RecreateWidget() { CreateCombo(); }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(ComboboxWidgetsPage, _T("Combobox"));
+IMPLEMENT_WIDGETS_PAGE(ComboboxWidgetsPage, _T("Combobox"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ | WITH_ITEMS_CTRLS | COMBO_CTRLS
+ );
-ComboboxWidgetsPage::ComboboxWidgetsPage(wxBookCtrlBase *book,
+ComboboxWidgetsPage::ComboboxWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
: WidgetsPage(book)
{
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Program: wxWidgets Widgets Sample
+// Name: datepick.cpp
+// Purpose: Part of the widgets sample showing date picker
+// Author: Dimitri Schoolwerth, Vadim Zeitlin
+// Created: 27 Sep 2003
+// Id: $Id$
+// Copyright: (c) 2003 wxWindows team
+// License: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// for compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#if wxUSE_DATEPICKCTRL
+
+// for all others, include the necessary headers
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/log.h"
+
+ #include "wx/bitmap.h"
+ #include "wx/button.h"
+ #include "wx/checkbox.h"
+ #include "wx/radiobox.h"
+ #include "wx/statbox.h"
+ #include "wx/textctrl.h"
+
+ #include "wx/sizer.h"
+#endif
+
+#include "wx/datectrl.h"
+
+#include "widgets.h"
+
+#include "icons/datepick.xpm"
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// control ids
+enum
+{
+ DatePickerPage_Reset = wxID_HIGHEST,
+ DatePickerPage_Day,
+ DatePickerPage_Month,
+ DatePickerPage_Year,
+ DatePickerPage_Set,
+ DatePickerPage_Picker
+};
+
+// ----------------------------------------------------------------------------
+// CheckBoxWidgetsPage
+// ----------------------------------------------------------------------------
+
+class DatePickerWidgetsPage : public WidgetsPage
+{
+public:
+ DatePickerWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
+ virtual ~DatePickerWidgetsPage(){};
+
+ virtual wxControl *GetWidget() const { return m_datePicker; }
+ virtual void RecreateWidget() { CreateDatePicker(); }
+
+protected:
+ // event handlers
+ void OnButtonSet(wxCommandEvent& event);
+
+ void OnButtonReset(wxCommandEvent& event);
+
+ // reset the date picker parameters
+ void Reset();
+
+ // (re)create the date picker
+ void CreateDatePicker();
+
+ // the controls
+ // ------------
+
+ // the checkbox itself and the sizer it is in
+ wxDatePickerCtrl *m_datePicker;
+ wxSizer *m_sizerDatePicker;
+
+ wxTextCtrl *m_day;
+ wxTextCtrl *m_month;
+ wxTextCtrl *m_year;
+
+ // the text entries for command parameters
+ wxTextCtrl *m_textLabel;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_WIDGETS_PAGE(DatePickerWidgetsPage)
+};
+
+// ----------------------------------------------------------------------------
+// event tables
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(DatePickerWidgetsPage, WidgetsPage)
+ EVT_BUTTON(DatePickerPage_Reset, DatePickerWidgetsPage::OnButtonReset)
+ EVT_BUTTON(DatePickerPage_Set, DatePickerWidgetsPage::OnButtonSet)
+END_EVENT_TABLE()
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+IMPLEMENT_WIDGETS_PAGE(DatePickerWidgetsPage, wxT("DatePicker"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ | PICKER_CTRLS
+ );
+
+DatePickerWidgetsPage::DatePickerWidgetsPage(WidgetsBookCtrl *book,
+ wxImageList *imaglist)
+ :WidgetsPage(book)
+{
+ imaglist->Add(wxBitmap(datepick_xpm));
+
+ wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
+
+ // left pane
+ wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("Date details"));
+
+ wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
+
+ sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Day"), DatePickerPage_Day , &m_day ),
+ wxALL | wxALIGN_LEFT , 5 );
+
+ sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Month"), DatePickerPage_Month , &m_month ),
+ wxALL | wxALIGN_LEFT , 5 );
+
+ sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Year"), DatePickerPage_Year , &m_year ),
+ wxALL | wxALIGN_LEFT , 5 );
+
+ sizerLeft->Add( new wxButton( this, wxID_ANY, wxT("&Set date") ),
+ wxALL , 5 );
+
+ // right pane
+ wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL);
+
+ m_datePicker = new wxDatePickerCtrl(this, DatePickerPage_Picker);
+
+ sizerRight->Add(0, 0, 1, wxCENTRE);
+ sizerRight->Add(m_datePicker, 1, wxCENTRE);
+ sizerRight->Add(0, 0, 1, wxCENTRE);
+ sizerRight->SetMinSize(150, 0);
+ m_sizerDatePicker = sizerRight; // save it to modify it later
+
+ // the 3 panes panes compose the window
+ sizerTop->Add(sizerLeft, 0, (wxALL & ~wxLEFT), 10);
+ sizerTop->Add(sizerRight, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
+
+ // final initializations
+ Reset();
+
+ SetSizer(sizerTop);
+
+ sizerTop->Fit(this);
+}
+
+void DatePickerWidgetsPage::Reset()
+{
+ const wxDateTime today = wxDateTime::Today();
+
+ m_datePicker->SetValue(today);
+ m_day->SetValue(wxString::Format(_T("%d"), today.GetDay()));
+ m_month->SetValue(wxString::Format(_T("%d"), today.GetMonth()));
+ m_year->SetValue(wxString::Format(_T("%d"), today.GetYear()));
+}
+
+void DatePickerWidgetsPage::CreateDatePicker()
+{
+ const wxDateTime value = m_datePicker->GetValue();
+
+ size_t count = m_sizerDatePicker->GetChildren().GetCount();
+ for ( size_t n = 0; n < count; n++ )
+ {
+ m_sizerDatePicker->Remove(0);
+ }
+
+ delete m_datePicker;
+
+ m_datePicker = new wxDatePickerCtrl(this, DatePickerPage_Picker, value);
+
+ m_sizerDatePicker->Add(0, 0, 1, wxCENTRE);
+ m_sizerDatePicker->Add(m_datePicker, 1, wxCENTRE);
+ m_sizerDatePicker->Add(0, 0, 1, wxCENTRE);
+ m_sizerDatePicker->Layout();
+}
+
+// ----------------------------------------------------------------------------
+// event handlers
+// ----------------------------------------------------------------------------
+
+void DatePickerWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event))
+{
+ Reset();
+
+ CreateDatePicker();
+}
+
+void DatePickerWidgetsPage::OnButtonSet(wxCommandEvent& WXUNUSED(event))
+{
+}
+
+#endif // wxUSE_DATEPICKCTRL
class GaugeWidgetsPage : public WidgetsPage
{
public:
- GaugeWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ GaugeWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual ~GaugeWidgetsPage();
virtual wxControl *GetWidget() const { return m_gauge; }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(GaugeWidgetsPage, _T("Gauge"));
+IMPLEMENT_WIDGETS_PAGE(GaugeWidgetsPage, _T("Gauge"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ );
-GaugeWidgetsPage::GaugeWidgetsPage(wxBookCtrlBase *book,
+GaugeWidgetsPage::GaugeWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
:WidgetsPage(book)
{
--- /dev/null
+/* XPM */\r
+static char *choicebk_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+" c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"## ##",\r
+"## ################ ##",\r
+"## ################ ##### ##",\r
+"## ################ ### ##",\r
+"## ################ # ##",\r
+"## ################ ##",\r
+"## ##",\r
+"################################",\r
+"######$$$$$$$$$$$$$$$$$$$$$$$$##",\r
+"######$::::::::::::::::::::::$##",\r
+"####$$$$$$$$$$$$$$$$$$$$$$$$:$##",\r
+"####$::::::::::::::::::::::$:$##",\r
+"## :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$$$##",\r
+"## :::::::::::::::::::::: :$####",\r
+"## :::::::::::::::::::::: $$####",\r
+"## :::::::::::::::::::::: ######",\r
+"## ######",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
--- /dev/null
+/* XPM */\r
+static char *datepick_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+" c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"## ##",\r
+"## ::::::::::::::$::::::::::: ##",\r
+"## :: ::::: ::::$:: ::: : : ##",\r
+"## : :: ::: :::$$: :: :: : : ##",\r
+"## : :: :: : :::$:: :: :: : ##",\r
+"## : :: :::: ::$$:: :: :::: : ##",\r
+"## :: ::::: ::$:::: ::::: : ##",\r
+"## ::::::::::::$::::::::::::: ##",\r
+"## ##",\r
+"################################",\r
+"## ##",\r
+"## :::::::::::::::::::::::::: ##",\r
+"## :::::::::::::::::::::::::: ##",\r
+"## :: :: ::$ ::$$:: ::%-:: ##",\r
+"## :: $::$ :: $:: $::$ ::%%:: ##",\r
+"## :::::::::::::::::::::::::: ##",\r
+"## :::::::::::::::::::::::::: ##",\r
+"## :: $::$ ::$$::$ ::$ ::%%:: ##",\r
+"## ::$ :: $:: :: $:: ::-%:: ##",\r
+"## :::::::::::::::::::::::::: ##",\r
+"## :::::::::::::::::::::::::: ##",\r
+"## ##",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
--- /dev/null
+/* XPM */\r
+static char *listbook_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+" c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"## ##",\r
+"## :::::::: :::::::: :::::::: ##",\r
+"## ::$$$$:: :$$::$$: ::$$$$:: ##",\r
+"## :$$$$$$: :::$$::: :$$::$$: ##",\r
+"## :::::::: :::::::: :::::::: ##",\r
+"## : : : : : : : : : ##",\r
+"## :::::::: :::::::: :::::::: ##",\r
+"## ##",\r
+"################################",\r
+"######$$$$$$$$$$$$$$$$$$$$$$$$##",\r
+"######$::::::::::::::::::::::$##",\r
+"####$$$$$$$$$$$$$$$$$$$$$$$$:$##",\r
+"####$::::::::::::::::::::::$:$##",\r
+"## :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$$$##",\r
+"## :::::::::::::::::::::: :$####",\r
+"## :::::::::::::::::::::: $$####",\r
+"## :::::::::::::::::::::: ######",\r
+"## ######",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
"################################",\r
"################################",\r
"################################",\r
-"### # # ###",\r
-"## :::::::$ :::::::$ :::::::$ ##",\r
-"## :######$ :######$ :######$ ##",\r
-"## :######$ :######$ :######$ ##",\r
-"## :######$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## :########################$ ##",\r
-"## $$$$$$$$$$$$$$$$$$$$$$$$$$ ##",\r
-"## ##",\r
-"################################",\r
-"################################",\r
+"###################$$$$$$$######",\r
+"##################$:::::::$#####",\r
+"###########$$$$$$$$:::::::$#####",\r
+"##########$:::::::$:::::::$#####",\r
+"### $:::::::$:::::::$#####",\r
+"## ::::::: :::::::$:::::::$$$$##",\r
+"## ::::::: :::::::$::::::::::$##",\r
+"## ::::::: :::::::$$$$$$$$$$:$##",\r
+"## ::::::: ::::::::::::::::$:$##",\r
+"## ::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$:$##",\r
+"## :::::::::::::::::::::: :$$$##",\r
+"## :::::::::::::::::::::: :$####",\r
+"## :::::::::::::::::::::: $$####",\r
+"## :::::::::::::::::::::: ######",\r
+"## ######",\r
"################################",\r
"################################",\r
"################################",\r
class ListboxWidgetsPage : public WidgetsPage
{
public:
- ListboxWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ ListboxWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual wxControl *GetWidget() const { return m_lbox; }
virtual void RecreateWidget() { CreateLbox(); }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(ListboxWidgetsPage, _T("Listbox"));
+IMPLEMENT_WIDGETS_PAGE(ListboxWidgetsPage, _T("Listbox"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ | WITH_ITEMS_CTRLS
+ );
-ListboxWidgetsPage::ListboxWidgetsPage(wxBookCtrlBase *book,
+ListboxWidgetsPage::ListboxWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
: WidgetsPage(book)
{
$(OBJS)\widgets_button.obj \
$(OBJS)\widgets_checkbox.obj \
$(OBJS)\widgets_combobox.obj \
+ $(OBJS)\widgets_datepick.obj \
$(OBJS)\widgets_gauge.obj \
$(OBJS)\widgets_listbox.obj \
$(OBJS)\widgets_notebook.obj \
__DLLFLAG_p_1 = -dWXUSINGDLL
!endif
!if "$(MONOLITHIC)" == "0"
+__WXLIB_ADV_p = \
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_HTML_p = \
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
__WXLIB_CORE_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
!endif
-if exist $(OBJS)\widgets.ilf del $(OBJS)\widgets.ilf
-if exist $(OBJS)\widgets.ils del $(OBJS)\widgets.ils
-$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_widgets.res
+$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_sample.res
ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&|
- c0w32.obj $(WIDGETS_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\widgets_widgets.res
+ c0w32.obj $(WIDGETS_OBJECTS),$@,, $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\widgets_sample.res
|
$(OBJS)\widgets_button.obj: .\button.cpp
$(OBJS)\widgets_combobox.obj: .\combobox.cpp
$(CXX) -q -c -P -o$@ $(WIDGETS_CXXFLAGS) $**
+$(OBJS)\widgets_datepick.obj: .\datepick.cpp
+ $(CXX) -q -c -P -o$@ $(WIDGETS_CXXFLAGS) $**
+
$(OBJS)\widgets_gauge.obj: .\gauge.cpp
$(CXX) -q -c -P -o$@ $(WIDGETS_CXXFLAGS) $**
$(OBJS)\widgets_widgets.obj: .\widgets.cpp
$(CXX) -q -c -P -o$@ $(WIDGETS_CXXFLAGS) $**
-$(OBJS)\widgets_widgets.res: .\widgets.rc
+$(OBJS)\widgets_sample.res: .\..\sample.rc
brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) -i$(SETUPHDIR) -i.\..\..\include -i. $(__DLLFLAG_p_1) -i.\..\..\samples -dNOPCH $**
$(OBJS)\widgets_button.o \
$(OBJS)\widgets_checkbox.o \
$(OBJS)\widgets_combobox.o \
+ $(OBJS)\widgets_datepick.o \
$(OBJS)\widgets_gauge.o \
$(OBJS)\widgets_listbox.o \
$(OBJS)\widgets_notebook.o \
$(OBJS)\widgets_static.o \
$(OBJS)\widgets_textctrl.o \
$(OBJS)\widgets_widgets.o \
- $(OBJS)\widgets_widgets_rc.o
+ $(OBJS)\widgets_sample_rc.o
### Conditionally set variables: ###
__DLLFLAG_p_1 = --define WXUSINGDLL
endif
ifeq ($(MONOLITHIC),0)
+__WXLIB_ADV_p = \
+ -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv
+endif
+ifeq ($(MONOLITHIC),0)
+__WXLIB_HTML_p = \
+ -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html
+endif
+ifeq ($(MONOLITHIC),0)
__WXLIB_CORE_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
endif
-if exist $(OBJS)\*.d del $(OBJS)\*.d
-if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe
-$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_widgets_rc.o
- $(CXX) -o $@ $(WIDGETS_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
+$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_sample_rc.o
+ $(CXX) -o $@ $(WIDGETS_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32
$(OBJS)\widgets_button.o: ./button.cpp
$(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\widgets_combobox.o: ./combobox.cpp
$(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
+$(OBJS)\widgets_datepick.o: ./datepick.cpp
+ $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\widgets_gauge.o: ./gauge.cpp
$(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\widgets_widgets.o: ./widgets.cpp
$(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(CPPDEPS) $<
-$(OBJS)\widgets_widgets_rc.o: ./widgets.rc
+$(OBJS)\widgets_sample_rc.o: ./../sample.rc
windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../include --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../samples --define NOPCH
.PHONY: all clean
$(OBJS)\widgets_button.obj \
$(OBJS)\widgets_checkbox.obj \
$(OBJS)\widgets_combobox.obj \
+ $(OBJS)\widgets_datepick.obj \
$(OBJS)\widgets_gauge.obj \
$(OBJS)\widgets_listbox.obj \
$(OBJS)\widgets_notebook.obj \
$(OBJS)\widgets_static.obj \
$(OBJS)\widgets_textctrl.obj \
$(OBJS)\widgets_widgets.obj \
- $(OBJS)\widgets_widgets.res
+ $(OBJS)\widgets_sample.res
### Conditionally set variables: ###
__DLLFLAG_p_1 = /d WXUSINGDLL
!endif
!if "$(MONOLITHIC)" == "0"
+__WXLIB_ADV_p = \
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_HTML_p = \
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
__WXLIB_CORE_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
!endif
-if exist $(OBJS)\widgets.ilk del $(OBJS)\widgets.ilk
-if exist $(OBJS)\widgets.pdb del $(OBJS)\widgets.pdb
-$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_widgets.res
+$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_sample.res
link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<<
- $(WIDGETS_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib
+ $(WIDGETS_OBJECTS) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib
<<
$(OBJS)\widgets_button.obj: .\button.cpp
$(OBJS)\widgets_combobox.obj: .\combobox.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WIDGETS_CXXFLAGS) $**
+$(OBJS)\widgets_datepick.obj: .\datepick.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(WIDGETS_CXXFLAGS) $**
+
$(OBJS)\widgets_gauge.obj: .\gauge.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WIDGETS_CXXFLAGS) $**
$(OBJS)\widgets_widgets.obj: .\widgets.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WIDGETS_CXXFLAGS) $**
-$(OBJS)\widgets_widgets.res: .\widgets.rc
+$(OBJS)\widgets_sample.res: .\..\sample.rc
rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) $(__NO_VC_CRTDBG_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) /i $(SETUPHDIR) /i .\..\..\include /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\samples /d NOPCH $**
!ifeq USE_EXCEPTIONS 1
__EXCEPTIONSFLAG_8 = -xs
!endif
+__WXLIB_ADV_p =
+!ifeq MONOLITHIC 0
+__WXLIB_ADV_p = &
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
+!endif
+__WXLIB_HTML_p =
+!ifeq MONOLITHIC 0
+__WXLIB_HTML_p = &
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
+!endif
__WXLIB_CORE_p =
!ifeq MONOLITHIC 0
__WXLIB_CORE_p = &
$(OBJS)\widgets_button.obj &
$(OBJS)\widgets_checkbox.obj &
$(OBJS)\widgets_combobox.obj &
+ $(OBJS)\widgets_datepick.obj &
$(OBJS)\widgets_gauge.obj &
$(OBJS)\widgets_listbox.obj &
$(OBJS)\widgets_notebook.obj &
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
-if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe
-$(OBJS)\widgets.exe : $(WIDGETS_OBJECTS) $(OBJS)\widgets_widgets.res
+$(OBJS)\widgets.exe : $(WIDGETS_OBJECTS) $(OBJS)\widgets_sample.res
@%create $(OBJS)\widgets.lbc
@%append $(OBJS)\widgets.lbc option quiet
@%append $(OBJS)\widgets.lbc name $^@
@%append $(OBJS)\widgets.lbc option caseexact
@%append $(OBJS)\widgets.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16'
@for %i in ($(WIDGETS_OBJECTS)) do @%append $(OBJS)\widgets.lbc file %i
- @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib ) do @%append $(OBJS)\widgets.lbc library %i
- @%append $(OBJS)\widgets.lbc option resource=$(OBJS)\widgets_widgets.res
+ @for %i in ( $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib) do @%append $(OBJS)\widgets.lbc library %i
+ @%append $(OBJS)\widgets.lbc option resource=$(OBJS)\widgets_sample.res
@for %i in () do @%append $(OBJS)\widgets.lbc option stack=%i
wlink @$(OBJS)\widgets.lbc
$(OBJS)\widgets_combobox.obj : .AUTODEPEND .\combobox.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WIDGETS_CXXFLAGS) $<
+$(OBJS)\widgets_datepick.obj : .AUTODEPEND .\datepick.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(WIDGETS_CXXFLAGS) $<
+
$(OBJS)\widgets_gauge.obj : .AUTODEPEND .\gauge.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WIDGETS_CXXFLAGS) $<
$(OBJS)\widgets_widgets.obj : .AUTODEPEND .\widgets.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WIDGETS_CXXFLAGS) $<
-$(OBJS)\widgets_widgets.res : .AUTODEPEND .\widgets.rc
+$(OBJS)\widgets_sample.res : .AUTODEPEND .\..\sample.rc
wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\..\include -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $<
/////////////////////////////////////////////////////////////////////////////
// Program: wxWidgets Widgets Sample
// Name: notebook.cpp
-// Purpose: Part of the widgets sample showing wxNotebook
-// Author: Vadim Zeitlin
+// Purpose: Part of the widgets sample showing book controls
+// Author: Vadim Zeitlin, Wlodzimierz ABX Skiba
// Created: 06.04.01
// Id: $Id$
-// Copyright: (c) 2001 Vadim Zeitlin
+// Copyright: (c) 2001 Vadim Zeitlin, 2006 Wlodzimierz Skiba
// License: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#pragma hdrstop
#endif
-#if wxUSE_NOTEBOOK
+#if wxUSE_BOOKCTRL
// for all others, include the necessary headers
#ifndef WX_PRECOMP
#endif
#include "wx/sizer.h"
-#include "wx/notebook.h"
+#include "wx/bookctrl.h"
#include "wx/artprov.h"
#include "widgets.h"
-#include "icons/notebook.xpm"
// ----------------------------------------------------------------------------
// constants
// control ids
enum
{
- NotebookPage_Reset = 100,
- NotebookPage_SelectPage,
- NotebookPage_AddPage,
- NotebookPage_InsertPage,
- NotebookPage_RemovePage,
- NotebookPage_DeleteAll,
- NotebookPage_InsertText,
- NotebookPage_RemoveText,
- NotebookPage_SelectText,
- NotebookPage_NumPagesText,
- NotebookPage_CurSelectText,
- NotebookPage_Notebook
+ BookPage_Reset = wxID_HIGHEST,
+ BookPage_SelectPage,
+ BookPage_AddPage,
+ BookPage_InsertPage,
+ BookPage_RemovePage,
+ BookPage_DeleteAll,
+ BookPage_InsertText,
+ BookPage_RemoveText,
+ BookPage_SelectText,
+ BookPage_NumPagesText,
+ BookPage_CurSelectText,
+ BookPage_Book
};
-// notebook orientations
+// book orientations
enum Orient
{
Orient_Top,
};
// ----------------------------------------------------------------------------
-// NotebookWidgetsPage
+// BookWidgetsPage
// ----------------------------------------------------------------------------
-class NotebookWidgetsPage : public WidgetsPage
+class BookWidgetsPage : public WidgetsPage
{
public:
- NotebookWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
- virtual ~NotebookWidgetsPage();
+ BookWidgetsPage(WidgetsBookCtrl *book);
+ virtual ~BookWidgetsPage();
- virtual wxControl *GetWidget() const { return m_notebook; }
- virtual void RecreateWidget() { CreateNotebook(); }
+ virtual wxControl *GetWidget() const { return m_book; }
+ virtual void RecreateWidget() { RecreateBook(); }
protected:
// event handlers
+#ifdef ABX
void OnPageChanging(wxNotebookEvent& event);
void OnPageChanged(wxNotebookEvent& event);
+#endif
void OnButtonReset(wxCommandEvent& event);
void OnButtonDeleteAll(wxCommandEvent& event);
void OnUpdateUIResetButton(wxUpdateUIEvent& event);
- // reset the wxNotebook parameters
+ // reset book parameters
void Reset();
- // (re)create the wxNotebook
- void CreateNotebook();
+ // (re)create book
+ void RecreateBook();
+ virtual wxBookCtrlBase *CreateBook(long flags) = 0;
// create or destroy the image list
void CreateImageList();
// is the value in range?
bool IsValidValue(int val) const
- { return (val >= 0) && (val < (int) m_notebook->GetPageCount()); }
+ { return (val >= 0) && (val < (int) m_book->GetPageCount()); }
// the controls
// ------------
*m_textRemove,
*m_textSelect;
- // the notebook itself and the sizer it is in
- wxNotebook *m_notebook;
- wxSizer *m_sizerNotebook;
+ // the book itself and the sizer it is in
+ wxBookCtrlBase *m_book;
+ wxSizer *m_sizerBook;
- // thei mage list for our notebook
+ // thei mage list for our book
wxImageList *m_imageList;
private:
DECLARE_EVENT_TABLE()
- DECLARE_WIDGETS_PAGE(NotebookWidgetsPage)
};
// ----------------------------------------------------------------------------
// event tables
// ----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(NotebookWidgetsPage, WidgetsPage)
- EVT_BUTTON(NotebookPage_Reset, NotebookWidgetsPage::OnButtonReset)
- EVT_BUTTON(NotebookPage_SelectPage, NotebookWidgetsPage::OnButtonSelectPage)
- EVT_BUTTON(NotebookPage_AddPage, NotebookWidgetsPage::OnButtonAddPage)
- EVT_BUTTON(NotebookPage_InsertPage, NotebookWidgetsPage::OnButtonInsertPage)
- EVT_BUTTON(NotebookPage_RemovePage, NotebookWidgetsPage::OnButtonRemovePage)
- EVT_BUTTON(NotebookPage_DeleteAll, NotebookWidgetsPage::OnButtonDeleteAll)
+BEGIN_EVENT_TABLE(BookWidgetsPage, WidgetsPage)
+ EVT_BUTTON(BookPage_Reset, BookWidgetsPage::OnButtonReset)
+ EVT_BUTTON(BookPage_SelectPage, BookWidgetsPage::OnButtonSelectPage)
+ EVT_BUTTON(BookPage_AddPage, BookWidgetsPage::OnButtonAddPage)
+ EVT_BUTTON(BookPage_InsertPage, BookWidgetsPage::OnButtonInsertPage)
+ EVT_BUTTON(BookPage_RemovePage, BookWidgetsPage::OnButtonRemovePage)
+ EVT_BUTTON(BookPage_DeleteAll, BookWidgetsPage::OnButtonDeleteAll)
- EVT_UPDATE_UI(NotebookPage_NumPagesText, NotebookWidgetsPage::OnUpdateUINumPagesText)
- EVT_UPDATE_UI(NotebookPage_CurSelectText, NotebookWidgetsPage::OnUpdateUICurSelectText)
+ EVT_UPDATE_UI(BookPage_NumPagesText, BookWidgetsPage::OnUpdateUINumPagesText)
+ EVT_UPDATE_UI(BookPage_CurSelectText, BookWidgetsPage::OnUpdateUICurSelectText)
- EVT_UPDATE_UI(NotebookPage_SelectPage, NotebookWidgetsPage::OnUpdateUISelectButton)
- EVT_UPDATE_UI(NotebookPage_InsertPage, NotebookWidgetsPage::OnUpdateUIInsertButton)
- EVT_UPDATE_UI(NotebookPage_RemovePage, NotebookWidgetsPage::OnUpdateUIRemoveButton)
+ EVT_UPDATE_UI(BookPage_SelectPage, BookWidgetsPage::OnUpdateUISelectButton)
+ EVT_UPDATE_UI(BookPage_InsertPage, BookWidgetsPage::OnUpdateUIInsertButton)
+ EVT_UPDATE_UI(BookPage_RemovePage, BookWidgetsPage::OnUpdateUIRemoveButton)
- EVT_NOTEBOOK_PAGE_CHANGING(wxID_ANY, NotebookWidgetsPage::OnPageChanging)
+#ifdef ABX
+ EVT_NOTEBOOK_PAGE_CHANGING(wxID_ANY, BookWidgetsPage::OnPageChanging)
EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, NotebookWidgetsPage::OnPageChanged)
+#endif
- EVT_CHECKBOX(wxID_ANY, NotebookWidgetsPage::OnCheckOrRadioBox)
- EVT_RADIOBOX(wxID_ANY, NotebookWidgetsPage::OnCheckOrRadioBox)
+ EVT_CHECKBOX(wxID_ANY, BookWidgetsPage::OnCheckOrRadioBox)
+ EVT_RADIOBOX(wxID_ANY, BookWidgetsPage::OnCheckOrRadioBox)
END_EVENT_TABLE()
// ============================================================================
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(NotebookWidgetsPage, _T("Notebook"));
-
-NotebookWidgetsPage::NotebookWidgetsPage(wxBookCtrlBase *book,
- wxImageList *imaglist)
- : WidgetsPage(book)
+BookWidgetsPage::BookWidgetsPage(WidgetsBookCtrl *book)
+ :WidgetsPage(book)
{
- imaglist->Add(wxBitmap(notebook_xpm));
-
// init everything
m_chkImages = NULL;
m_imageList = NULL;
- m_notebook = (wxNotebook *)NULL;
- m_sizerNotebook = (wxSizer *)NULL;
+ m_book = NULL;
+ m_sizerBook = (wxSizer *)NULL;
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
sizerLeft->Add(m_radioOrient, 0, wxALL, 5);
- wxButton *btn = new wxButton(this, NotebookPage_Reset, _T("&Reset"));
+ wxButton *btn = new wxButton(this, BookPage_Reset, _T("&Reset"));
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
// middle pane
wxTextCtrl *text;
wxSizer *sizerRow = CreateSizerWithTextAndLabel(_T("Number of pages: "),
- NotebookPage_NumPagesText,
+ BookPage_NumPagesText,
&text);
text->SetEditable(false);
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
sizerRow = CreateSizerWithTextAndLabel(_T("Current selection: "),
- NotebookPage_CurSelectText,
+ BookPage_CurSelectText,
&text);
text->SetEditable(false);
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
- sizerRow = CreateSizerWithTextAndButton(NotebookPage_SelectPage,
+ sizerRow = CreateSizerWithTextAndButton(BookPage_SelectPage,
_T("&Select page"),
- NotebookPage_SelectText,
+ BookPage_SelectText,
&m_textSelect);
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
- btn = new wxButton(this, NotebookPage_AddPage, _T("&Add page"));
+ btn = new wxButton(this, BookPage_AddPage, _T("&Add page"));
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
- sizerRow = CreateSizerWithTextAndButton(NotebookPage_InsertPage,
+ sizerRow = CreateSizerWithTextAndButton(BookPage_InsertPage,
_T("&Insert page at"),
- NotebookPage_InsertText,
+ BookPage_InsertText,
&m_textInsert);
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
- sizerRow = CreateSizerWithTextAndButton(NotebookPage_RemovePage,
+ sizerRow = CreateSizerWithTextAndButton(BookPage_RemovePage,
_T("&Remove page"),
- NotebookPage_RemoveText,
+ BookPage_RemoveText,
&m_textRemove);
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
- btn = new wxButton(this, NotebookPage_DeleteAll, _T("&Delete All"));
+ btn = new wxButton(this, BookPage_DeleteAll, _T("&Delete All"));
sizerMiddle->Add(btn, 0, wxALL | wxGROW, 5);
// right pane
- wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL);
- m_notebook = new wxNotebook(this, NotebookPage_Notebook);
- sizerRight->Add(m_notebook, 1, wxGROW | wxALL, 5);
- sizerRight->SetMinSize(150, 0);
- m_sizerNotebook = sizerRight; // save it to modify it later
+ m_sizerBook = new wxBoxSizer(wxHORIZONTAL);
- // the 3 panes panes compose the window
+ // the 3 panes compose the window
sizerTop->Add(sizerLeft, 0, wxGROW | (wxALL & ~wxLEFT), 10);
sizerTop->Add(sizerMiddle, 0, wxGROW | wxALL, 10);
- sizerTop->Add(sizerRight, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
+ sizerTop->Add(m_sizerBook, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
// final initializations
Reset();
sizerTop->Fit(this);
}
-NotebookWidgetsPage::~NotebookWidgetsPage()
+BookWidgetsPage::~BookWidgetsPage()
{
delete m_imageList;
}
// operations
// ----------------------------------------------------------------------------
-void NotebookWidgetsPage::Reset()
+void BookWidgetsPage::Reset()
{
m_chkImages->SetValue(true);
m_radioOrient->SetSelection(Orient_Top);
}
-void NotebookWidgetsPage::CreateImageList()
+void BookWidgetsPage::CreateImageList()
{
if ( m_chkImages->GetValue() )
{
m_imageList->Add(wxArtProvider::GetIcon(wxART_ERROR, wxART_OTHER, size));
}
- m_notebook->SetImageList(m_imageList);
+ if ( m_book )
+ m_book->SetImageList(m_imageList);
}
else // no images
{
}
// because of the bug in wxMSW we can't use SetImageList(NULL) - although
- // it would be logical if this removed the image list from notebook, under
- // MSW it crashes instead
+ // it would be logical if this removed the image list from book, under
+ // MSW it crashes instead - FIXME
}
-void NotebookWidgetsPage::CreateNotebook()
+void BookWidgetsPage::RecreateBook()
{
int flags = ms_defaultFlags;
switch ( m_radioOrient->GetSelection() )
{
default:
- wxFAIL_MSG( _T("unknown notebook orientation") );
+ wxFAIL_MSG( _T("unknown orientation") );
// fall through
case Orient_Top:
break;
}
- wxNotebook *old_note = m_notebook;
+ wxBookCtrlBase *oldBook = m_book;
- m_notebook = new wxNotebook(this, NotebookPage_Notebook,
- wxDefaultPosition, wxDefaultSize,
- flags);
+ m_book = CreateBook(flags);
CreateImageList();
- if ( old_note )
+ if ( oldBook )
{
- const int sel = old_note->GetSelection();
+ const int sel = oldBook->GetSelection();
- const int count = old_note->GetPageCount();
+ const int count = oldBook->GetPageCount();
// recreate the pages
for ( int n = 0; n < count; n++ )
{
- m_notebook->AddPage(CreateNewPage(),
- old_note->GetPageText(n),
- false,
- m_chkImages->GetValue() ?
- GetIconIndex() : -1);
+ m_book->AddPage(CreateNewPage(),
+ oldBook->GetPageText(n),
+ false,
+ m_chkImages->GetValue() ?
+ GetIconIndex() : -1);
}
- m_sizerNotebook->Detach( old_note );
- delete old_note;
+ m_sizerBook->Detach( oldBook );
+ delete oldBook;
// restore selection
if ( sel != -1 )
{
- m_notebook->SetSelection(sel);
+ m_book->SetSelection(sel);
}
}
- m_sizerNotebook->Add(m_notebook, 1, wxGROW | wxALL, 5);
- m_sizerNotebook->Layout();
+ m_sizerBook->Add(m_book, 1, wxGROW | wxALL, 5);
+ m_sizerBook->SetMinSize(150, 0);
+ m_sizerBook->Layout();
}
// ----------------------------------------------------------------------------
// helpers
// ----------------------------------------------------------------------------
-int NotebookWidgetsPage::GetTextValue(wxTextCtrl *text) const
+int BookWidgetsPage::GetTextValue(wxTextCtrl *text) const
{
long pos;
if ( !text->GetValue().ToLong(&pos) )
return (int)pos;
}
-int NotebookWidgetsPage::GetIconIndex() const
+int BookWidgetsPage::GetIconIndex() const
{
if ( m_imageList )
{
int nImages = m_imageList->GetImageCount();
if ( nImages > 0 )
{
- return m_notebook->GetPageCount() % nImages;
+ return m_book->GetPageCount() % nImages;
}
}
return -1;
}
-wxWindow *NotebookWidgetsPage::CreateNewPage()
+wxWindow *BookWidgetsPage::CreateNewPage()
{
- return new wxTextCtrl(m_notebook, wxID_ANY, _T("I'm a notebook page"));
+ return new wxTextCtrl(m_book, wxID_ANY, _T("I'm a book page"));
}
// ----------------------------------------------------------------------------
// event handlers
// ----------------------------------------------------------------------------
-void NotebookWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event))
+void BookWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event))
{
Reset();
- CreateNotebook();
+ RecreateBook();
}
-void NotebookWidgetsPage::OnButtonDeleteAll(wxCommandEvent& WXUNUSED(event))
+void BookWidgetsPage::OnButtonDeleteAll(wxCommandEvent& WXUNUSED(event))
{
- m_notebook->DeleteAllPages();
+ m_book->DeleteAllPages();
}
-void NotebookWidgetsPage::OnButtonSelectPage(wxCommandEvent& WXUNUSED(event))
+void BookWidgetsPage::OnButtonSelectPage(wxCommandEvent& WXUNUSED(event))
{
int pos = GetTextValue(m_textSelect);
wxCHECK_RET( IsValidValue(pos), _T("button should be disabled") );
- m_notebook->SetSelection(pos);
+ m_book->SetSelection(pos);
}
-void NotebookWidgetsPage::OnButtonAddPage(wxCommandEvent& WXUNUSED(event))
+void BookWidgetsPage::OnButtonAddPage(wxCommandEvent& WXUNUSED(event))
{
- m_notebook->AddPage(CreateNewPage(), _T("Added page"), false,
- GetIconIndex());
+ m_book->AddPage(CreateNewPage(), _T("Added page"), false,
+ GetIconIndex());
}
-void NotebookWidgetsPage::OnButtonInsertPage(wxCommandEvent& WXUNUSED(event))
+void BookWidgetsPage::OnButtonInsertPage(wxCommandEvent& WXUNUSED(event))
{
int pos = GetTextValue(m_textInsert);
wxCHECK_RET( IsValidValue(pos), _T("button should be disabled") );
- m_notebook->InsertPage(pos, CreateNewPage(), _T("Inserted page"), false,
- GetIconIndex());
+ m_book->InsertPage(pos, CreateNewPage(), _T("Inserted page"), false,
+ GetIconIndex());
}
-void NotebookWidgetsPage::OnButtonRemovePage(wxCommandEvent& WXUNUSED(event))
+void BookWidgetsPage::OnButtonRemovePage(wxCommandEvent& WXUNUSED(event))
{
int pos = GetTextValue(m_textRemove);
wxCHECK_RET( IsValidValue(pos), _T("button should be disabled") );
- m_notebook->DeletePage(pos);
+ m_book->DeletePage(pos);
}
-void NotebookWidgetsPage::OnUpdateUISelectButton(wxUpdateUIEvent& event)
+void BookWidgetsPage::OnUpdateUISelectButton(wxUpdateUIEvent& event)
{
event.Enable( IsValidValue(GetTextValue(m_textSelect)) );
}
-void NotebookWidgetsPage::OnUpdateUIInsertButton(wxUpdateUIEvent& event)
+void BookWidgetsPage::OnUpdateUIInsertButton(wxUpdateUIEvent& event)
{
event.Enable( IsValidValue(GetTextValue(m_textInsert)) );
}
-void NotebookWidgetsPage::OnUpdateUIRemoveButton(wxUpdateUIEvent& event)
+void BookWidgetsPage::OnUpdateUIRemoveButton(wxUpdateUIEvent& event)
{
event.Enable( IsValidValue(GetTextValue(m_textRemove)) );
}
-void NotebookWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
+void BookWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
{
event.Enable( !m_chkImages->GetValue() ||
m_radioOrient->GetSelection() != wxBK_TOP );
}
-void NotebookWidgetsPage::OnUpdateUINumPagesText(wxUpdateUIEvent& event)
+void BookWidgetsPage::OnUpdateUINumPagesText(wxUpdateUIEvent& event)
{
- event.SetText( wxString::Format(_T("%d"), m_notebook->GetPageCount()) );
+ event.SetText( wxString::Format(_T("%d"), m_book->GetPageCount()) );
}
-void NotebookWidgetsPage::OnUpdateUICurSelectText(wxUpdateUIEvent& event)
+void BookWidgetsPage::OnUpdateUICurSelectText(wxUpdateUIEvent& event)
{
- event.SetText( wxString::Format(_T("%d"), m_notebook->GetSelection()) );
+ event.SetText( wxString::Format(_T("%d"), m_book->GetSelection()) );
}
-void NotebookWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
+void BookWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
{
- CreateNotebook();
+ RecreateBook();
}
-void NotebookWidgetsPage::OnPageChanging(wxNotebookEvent& event)
+#ifdef ABX
+void BookWidgetsPage::OnPageChanging(wxBookEvent& event)
{
wxLogMessage(_T("Notebook page changing from %d to %d (currently %d)."),
event.GetOldSelection(),
event.Skip();
}
+#endif
+
+#if wxUSE_NOTEBOOK
+
+#include "icons/notebook.xpm"
+#include "wx/notebook.h"
+
+// ----------------------------------------------------------------------------
+// NotebookWidgetsPage
+// ----------------------------------------------------------------------------
+
+class NotebookWidgetsPage : public BookWidgetsPage
+{
+public:
+ NotebookWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist)
+ : BookWidgetsPage(book)
+ {
+ imaglist->Add(wxBitmap(notebook_xpm));
+ RecreateBook();
+ }
+ virtual ~NotebookWidgetsPage() {}
+
+protected:
+
+ // (re)create book
+ virtual wxBookCtrlBase *CreateBook(long flags)
+ {
+ return new wxNotebook(this, BookPage_Book,
+ wxDefaultPosition, wxDefaultSize,
+ flags);
+
+ }
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_WIDGETS_PAGE(NotebookWidgetsPage)
+};
+
+// ----------------------------------------------------------------------------
+// event table
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(NotebookWidgetsPage, BookWidgetsPage)
+END_EVENT_TABLE()
+
+IMPLEMENT_WIDGETS_PAGE(NotebookWidgetsPage, _T("Notebook"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ .ElseIf(wxGTK,NATIVE_CTRLS)
+ | BOOK_CTRLS
+ );
+
#endif // wxUSE_NOTEBOOK
+
+#if wxUSE_LISTBOOK
+
+#include "icons/listbook.xpm"
+#include "wx/listbook.h"
+
+// ----------------------------------------------------------------------------
+// ListbookWidgetsPage
+// ----------------------------------------------------------------------------
+
+class ListbookWidgetsPage : public BookWidgetsPage
+{
+public:
+ ListbookWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist)
+ : BookWidgetsPage(book)
+ {
+ imaglist->Add(wxBitmap(listbook_xpm));
+ RecreateBook();
+ }
+ virtual ~ListbookWidgetsPage() {}
+
+protected:
+
+ // (re)create book
+ virtual wxBookCtrlBase *CreateBook(long flags)
+ {
+ return new wxListbook(this, BookPage_Book,
+ wxDefaultPosition, wxDefaultSize,
+ flags);
+
+ }
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_WIDGETS_PAGE(ListbookWidgetsPage)
+};
+
+// ----------------------------------------------------------------------------
+// event table
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(ListbookWidgetsPage, BookWidgetsPage)
+END_EVENT_TABLE()
+
+IMPLEMENT_WIDGETS_PAGE(ListbookWidgetsPage, _T("Listbook"),
+ GENERIC_CTRLS | BOOK_CTRLS
+ );
+
+#endif // wxUSE_LISTBOOK
+
+#if wxUSE_CHOICEBOOK
+
+#include "icons/choicebk.xpm"
+#include "wx/choicebk.h"
+
+// ----------------------------------------------------------------------------
+// ChoicebookWidgetsPage
+// ----------------------------------------------------------------------------
+
+class ChoicebookWidgetsPage : public BookWidgetsPage
+{
+public:
+ ChoicebookWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist)
+ : BookWidgetsPage(book)
+ {
+ imaglist->Add(wxBitmap(choicebk_xpm));
+ RecreateBook();
+ }
+ virtual ~ChoicebookWidgetsPage() {}
+
+protected:
+
+ // (re)create book
+ virtual wxBookCtrlBase *CreateBook(long flags)
+ {
+ return new wxChoicebook(this, BookPage_Book,
+ wxDefaultPosition, wxDefaultSize,
+ flags);
+
+ }
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_WIDGETS_PAGE(ChoicebookWidgetsPage)
+};
+
+// ----------------------------------------------------------------------------
+// event table
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(ChoicebookWidgetsPage, BookWidgetsPage)
+END_EVENT_TABLE()
+
+IMPLEMENT_WIDGETS_PAGE(ChoicebookWidgetsPage, _T("Choicebook"),
+ GENERIC_CTRLS | BOOK_CTRLS
+ );
+
+#endif // wxUSE_CHOICEBOOK
+
+#endif // wxUSE_BOOKCTRL
class RadioWidgetsPage : public WidgetsPage
{
public:
- RadioWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ RadioWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual ~RadioWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_radio; }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(RadioWidgetsPage, _T("Radio"));
+IMPLEMENT_WIDGETS_PAGE(RadioWidgetsPage, _T("Radio"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ | WITH_ITEMS_CTRLS
+ );
-RadioWidgetsPage::RadioWidgetsPage(wxBookCtrlBase *book,
+RadioWidgetsPage::RadioWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
: WidgetsPage(book)
{
class SliderWidgetsPage : public WidgetsPage
{
public:
- SliderWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ SliderWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual ~SliderWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_slider; }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(SliderWidgetsPage, _T("Slider"));
+IMPLEMENT_WIDGETS_PAGE(SliderWidgetsPage, _T("Slider"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ );
-SliderWidgetsPage::SliderWidgetsPage(wxBookCtrlBase *book,
+SliderWidgetsPage::SliderWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
: WidgetsPage(book)
{
class SpinBtnWidgetsPage : public WidgetsPage
{
public:
- SpinBtnWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ SpinBtnWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual ~SpinBtnWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_spinbtn; }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(SpinBtnWidgetsPage, _T("Spin"));
+IMPLEMENT_WIDGETS_PAGE(SpinBtnWidgetsPage, _T("Spin"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ | EDITABLE_CTRLS
+ );
-SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxBookCtrlBase *book,
+SpinBtnWidgetsPage::SpinBtnWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
: WidgetsPage(book)
{
class StaticWidgetsPage : public WidgetsPage
{
public:
- StaticWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ StaticWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual ~StaticWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_statText; }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, _T("Static"));
+IMPLEMENT_WIDGETS_PAGE(StaticWidgetsPage, _T("Static"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ );
-StaticWidgetsPage::StaticWidgetsPage(wxBookCtrlBase *book,
+StaticWidgetsPage::StaticWidgetsPage(WidgetsBookCtrl *book,
wxImageList *imaglist)
: WidgetsPage(book)
{
{
public:
// ctor(s) and dtor
- TextWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist);
+ TextWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist);
virtual ~TextWidgetsPage(){};
virtual wxControl *GetWidget() const { return m_text; }
// implementation
// ============================================================================
-IMPLEMENT_WIDGETS_PAGE(TextWidgetsPage, _T("Text"));
+IMPLEMENT_WIDGETS_PAGE(TextWidgetsPage, _T("Text"),
+ (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS)
+ | EDITABLE_CTRLS
+ );
// ----------------------------------------------------------------------------
// TextWidgetsPage creation
// ----------------------------------------------------------------------------
-TextWidgetsPage::TextWidgetsPage(wxBookCtrlBase *book, wxImageList *imaglist)
+TextWidgetsPage::TextWidgetsPage(WidgetsBookCtrl *book, wxImageList *imaglist)
: WidgetsPage(book)
{
imaglist->Add(wxBitmap(text_xpm));
<include file="../../build/bakefiles/common_samples.bkl"/>
<exe id="widgets" template="wx_sample" template_append="wx_append">
- <sources>button.cpp checkbox.cpp combobox.cpp gauge.cpp listbox.cpp
+ <sources>button.cpp checkbox.cpp combobox.cpp datepick.cpp gauge.cpp listbox.cpp
notebook.cpp radiobox.cpp slider.cpp spinbtn.cpp static.cpp
textctrl.cpp widgets.cpp</sources>
+ <wx-lib>adv</wx-lib>
+ <wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
- <win32-res>widgets.rc</win32-res>
+ <win32-res>../sample.rc</win32-res>
</exe>
</makefile>
#include "wx/sysopt.h"
#include "wx/bookctrl.h"
+#include "wx/treebook.h"
#include "wx/sizer.h"
#include "wx/colordlg.h"
#include "wx/fontdlg.h"
#include "widgets.h"
+#include "../sample.xpm"
+
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
Widgets_GoToPageLast = Widgets_GoToPage + 100
};
+const wxChar *WidgetsCategories[MAX_PAGES] = {
+ wxT("Native"),
+ wxT("Generic"),
+ wxT("Pickers"),
+ wxT("Comboboxes"),
+ wxT("With items"),
+ wxT("Editable"),
+ wxT("Books"),
+ wxT("All controls")
+};
+
// ----------------------------------------------------------------------------
// our classes
// ----------------------------------------------------------------------------
void OnExit(wxCommandEvent& event);
#if wxUSE_MENUS
- void OnPageChanged(wxBookCtrlEvent& event);
+ void OnPageChanged(WidgetsBookCtrlEvent& event);
void OnGoToPage(wxCommandEvent& event);
#if wxUSE_TOOLTIPS
// initialize the book: add all pages to it
void InitBook();
+ // finding current page assuming book inside book
+ WidgetsPage *CurrentPage();
+
private:
// the panel containing everything
wxPanel *m_panel;
#endif // USE_LOG
// the book containing the test pages
- wxBookCtrlBase *m_book;
-
- // and the image list for it
- wxImageList *m_imaglist;
+ WidgetsBookCtrl *m_book;
#if wxUSE_MENUS
// last chosen fg/bg colours and font
#endif // wxUSE_TOOLTIPS
#if wxUSE_MENUS
- EVT_BOOKCTRL_PAGE_CHANGED(Widgets_BookCtrl, WidgetsFrame::OnPageChanged)
+ EVT_WIDGETS_PAGE_CHANGED(wxID_ANY, WidgetsFrame::OnPageChanged)
EVT_MENU_RANGE(Widgets_GoToPage, Widgets_GoToPageLast,
WidgetsFrame::OnGoToPage)
wxCLIP_CHILDREN |
wxTAB_TRAVERSAL)
{
+ // set the frame icon
+ SetIcon(wxICON(sample));
+
// init everything
#if USE_LOG
m_lboxLog = (wxListBox *)NULL;
m_logTarget = (wxLog *)NULL;
#endif // USE_LOG
- m_book = (wxBookCtrlBase *)NULL;
- m_imaglist = (wxImageList *)NULL;
+ m_book = (WidgetsBookCtrl *)NULL;
#if wxUSE_MENUS
// create the menubar
// Uncomment to suppress page theme (draw in solid colour)
//style |= wxNB_NOPAGETHEME;
- m_book = new wxBookCtrl(m_panel, Widgets_BookCtrl, wxDefaultPosition,
+ m_book = new WidgetsBookCtrl(m_panel, Widgets_BookCtrl, wxDefaultPosition,
#ifdef __WXMOTIF__
wxSize(500, wxDefaultCoord), // under Motif, height is a function of the width...
#else
void WidgetsFrame::InitBook()
{
- m_imaglist = new wxImageList(32, 32);
+ wxImageList *imageList = new wxImageList(32, 32);
- ArrayWidgetsPage pages;
- wxArrayString labels;
+ imageList->Add(wxBitmap(sample_xpm));
+
+#if !USE_TREEBOOK
+ WidgetsBookCtrl *books[MAX_PAGES];
+#endif
+
+ ArrayWidgetsPage pages[MAX_PAGES];
+ wxArrayString labels[MAX_PAGES];
wxMenu *menuPages = new wxMenu;
- unsigned nPage = 0;
+ unsigned int nPage = 0, nFKey = 0;
+ int cat, imageId = 1;
// we need to first create all pages and only then add them to the book
// as we need the image list first
//
// we also construct the pages menu during this first iteration
- for ( WidgetsPageInfo *info = WidgetsPage::ms_widgetPages;
- info;
- info = info->GetNext(), nPage++ )
+ for ( cat = 0; cat < MAX_PAGES; cat++ )
{
- WidgetsPage *page = (*info->GetCtor())(m_book, m_imaglist);
- pages.Add(page);
-
- labels.Add(info->GetLabel());
- menuPages->AppendRadioItem
- (
- Widgets_GoToPage + nPage,
- wxString::Format(wxT("%s\tF%u"),
- info->GetLabel().c_str(), nPage + 1)
- );
+#if USE_TREEBOOK
+ nPage++; // increase for parent page
+#else
+ books[cat] = new WidgetsBookCtrl( m_book, wxID_ANY );
+#endif
+
+ for ( WidgetsPageInfo *info = WidgetsPage::ms_widgetPages;
+ info;
+ info = info->GetNext() )
+ {
+ if( (info->GetCategories() & ( 1 << cat )) == 0)
+ continue;
+
+ WidgetsPage *page = (*info->GetCtor())(
+#if USE_TREEBOOK
+ m_book
+#else
+ books[cat]
+#endif
+ , imageList);
+ pages[cat].Add(page);
+
+ labels[cat].Add(info->GetLabel());
+ if ( cat == ALL_PAGE )
+ {
+ wxString radioLabel(info->GetLabel());
+ nFKey++;
+ if ( nFKey <= 12 )
+ {
+ radioLabel << wxT("\tF" ) << nFKey;
+ }
+
+ menuPages->AppendRadioItem(
+ Widgets_GoToPage + nPage,
+ radioLabel
+ );
+#if !USE_TREEBOOK
+ // consider only for book in book architecture
+ nPage++;
+#endif
+ }
+
+#if USE_TREEBOOK
+ // consider only for treebook architecture (with subpages)
+ nPage++;
+#endif
+ }
}
GetMenuBar()->Append(menuPages, _T("&Page"));
- m_book->SetImageList(m_imaglist);
+ m_book->AssignImageList(imageList);
- // now do add them
- size_t count = pages.GetCount();
- for ( size_t n = 0; n < count; n++ )
+ for ( cat = 0; cat < MAX_PAGES; cat++ )
{
- m_book->AddPage(
- pages[n],
- labels[n],
- false, // don't select
- n // image id
- );
+#if USE_TREEBOOK
+ m_book->AddPage(NULL,WidgetsCategories[cat],false,0);
+#else
+ m_book->AddPage(books[cat],WidgetsCategories[cat],false,0);
+ books[cat]->SetImageList(imageList);
+#endif
+
+ // now do add them
+ size_t count = pages[cat].GetCount();
+ for ( size_t n = 0; n < count; n++ )
+ {
+#if USE_TREEBOOK
+ m_book->AddSubPage(
+#else
+ books[cat]->AddPage(
+#endif
+ pages[cat][n],
+ labels[cat][n],
+ false, // don't select
+ imageId++
+ );
+ }
}
+
+#if USE_TREEBOOK
+ // for treebook page #0 is empty parent page only
+ m_book->SetSelection(1);
+#endif
+}
+
+WidgetsPage *WidgetsFrame::CurrentPage()
+{
+#if USE_TREEBOOK
+ return wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+#else
+ WidgetsBookCtrl *book = wxStaticCast(m_book->GetCurrentPage(), WidgetsBookCtrl);
+ if (!book) return NULL;
+ return wxStaticCast(book->GetCurrentPage(), WidgetsPage);
+#endif
}
WidgetsFrame::~WidgetsFrame()
#if USE_LOG
delete m_logTarget;
#endif // USE_LOG
- delete m_imaglist;
}
// ----------------------------------------------------------------------------
#if wxUSE_MENUS
-void WidgetsFrame::OnPageChanged(wxBookCtrlEvent& event)
+void WidgetsFrame::OnPageChanged(WidgetsBookCtrlEvent& event)
{
- GetMenuBar()->Check(Widgets_GoToPage + event.GetSelection(), true);
+ wxMenuItem *item = GetMenuBar()->FindItem(Widgets_GoToPage + event.GetSelection());
+ if (item) item->Check();
event.Skip();
}
void WidgetsFrame::OnGoToPage(wxCommandEvent& event)
{
+#if USE_TREEBOOK
m_book->SetSelection(event.GetId() - Widgets_GoToPage);
+#else
+ m_book->SetSelection(m_book->GetPageCount()-1);
+ WidgetsBookCtrl *book = wxStaticCast(m_book->GetCurrentPage(), WidgetsBookCtrl);
+ book->SetSelection(event.GetId() - Widgets_GoToPage);
+#endif
}
#if wxUSE_TOOLTIPS
s_tip = dialog.GetValue();
s_tip.Replace(_T("\\n"), _T("\n"));
- WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+ WidgetsPage *page = CurrentPage();
page->GetWidget()->SetToolTip(s_tip);
wxControl *ctrl2 = page->GetWidget2();
{
#if wxUSE_COLOURDLG
// allow for debugging the default colour the first time this is called
- WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+ WidgetsPage *page = CurrentPage();
if (!m_colFg.Ok())
m_colFg = page->GetForegroundColour();
void WidgetsFrame::OnSetBgCol(wxCommandEvent& WXUNUSED(event))
{
#if wxUSE_COLOURDLG
- WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+ WidgetsPage *page = CurrentPage();
if ( !m_colBg.Ok() )
m_colBg = page->GetBackgroundColour();
void WidgetsFrame::OnSetFont(wxCommandEvent& WXUNUSED(event))
{
#if wxUSE_FONTDLG
- WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+ WidgetsPage *page = CurrentPage();
if (!m_font.Ok())
m_font = page->GetFont();
void WidgetsFrame::OnEnable(wxCommandEvent& event)
{
- WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+ WidgetsPage *page = CurrentPage();
page->GetWidget()->Enable(event.IsChecked());
}
WidgetsPage::ms_defaultFlags &= ~wxBORDER_MASK;
WidgetsPage::ms_defaultFlags |= border;
- WidgetsPage *page = wxStaticCast(m_book->GetCurrentPage(), WidgetsPage);
+ WidgetsPage *page = CurrentPage();
page->RecreateWidget();
}
// WidgetsPageInfo
// ----------------------------------------------------------------------------
-WidgetsPageInfo::WidgetsPageInfo(Constructor ctor, const wxChar *label)
+WidgetsPageInfo::WidgetsPageInfo(Constructor ctor, const wxChar *label, int categories)
: m_label(label)
+ , m_categories(categories)
{
m_ctor = ctor;
int WidgetsPage::ms_defaultFlags = wxBORDER_DEFAULT;
WidgetsPageInfo *WidgetsPage::ms_widgetPages = NULL;
-WidgetsPage::WidgetsPage(wxBookCtrlBase *book)
+WidgetsPage::WidgetsPage(WidgetsBookCtrl *book)
: wxPanel(book, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxNO_FULL_REPAINT_ON_RESIZE |
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivudll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmswuniv27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivudll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD BASE LINK32 wxmswuniv27u_adv.lib wxmswuniv27u_html.lib wxmswuniv27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivudll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD LINK32 wxmswuniv27u_adv.lib wxmswuniv27u_html.lib wxmswuniv27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivudll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 DLL Universal Unicode Debug"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmswuniv27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD BASE LINK32 wxmswuniv27ud_adv.lib wxmswuniv27ud_html.lib wxmswuniv27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD LINK32 wxmswuniv27ud_adv.lib wxmswuniv27ud_html.lib wxmswuniv27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 DLL Universal Release"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivdll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmswuniv27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivdll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD BASE LINK32 wxmswuniv27_adv.lib wxmswuniv27_html.lib wxmswuniv27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivdll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD LINK32 wxmswuniv27_adv.lib wxmswuniv27_html.lib wxmswuniv27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivdll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 DLL Universal Debug"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmswuniv27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD BASE LINK32 wxmswuniv27d_adv.lib wxmswuniv27d_html.lib wxmswuniv27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD LINK32 wxmswuniv27d_adv.lib wxmswuniv27d_html.lib wxmswuniv27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 DLL Unicode Release"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswudll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmsw27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswudll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD BASE LINK32 wxmsw27u_adv.lib wxmsw27u_html.lib wxmsw27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswudll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD LINK32 wxmsw27u_adv.lib wxmsw27u_html.lib wxmsw27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswudll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 DLL Unicode Debug"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmsw27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD BASE LINK32 wxmsw27ud_adv.lib wxmsw27ud_html.lib wxmsw27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD LINK32 wxmsw27ud_adv.lib wxmsw27ud_html.lib wxmsw27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 DLL Release"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswdll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmsw27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswdll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD BASE LINK32 wxmsw27_adv.lib wxmsw27_html.lib wxmsw27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswdll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD LINK32 wxmsw27_adv.lib wxmsw27_html.lib wxmsw27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswdll\widgets.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 DLL Debug"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
-# ADD LINK32 wxmsw27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD BASE LINK32 wxmsw27d_adv.lib wxmsw27d_html.lib wxmsw27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
+# ADD LINK32 wxmsw27d_adv.lib wxmsw27d_html.lib wxmsw27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswddll\widgets.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 Universal Unicode Release"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivu\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmswuniv27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivu\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD BASE LINK32 wxmswuniv27u_adv.lib wxmswuniv27u_html.lib wxmswuniv27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivu\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD LINK32 wxmswuniv27u_adv.lib wxmswuniv27u_html.lib wxmswuniv27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivu\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 Universal Unicode Debug"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivud\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmswuniv27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivud\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD BASE LINK32 wxmswuniv27ud_adv.lib wxmswuniv27ud_html.lib wxmswuniv27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivud\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD LINK32 wxmswuniv27ud_adv.lib wxmswuniv27ud_html.lib wxmswuniv27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivud\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 Universal Release"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuniv\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmswuniv27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuniv\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD BASE LINK32 wxmswuniv27_adv.lib wxmswuniv27_html.lib wxmswuniv27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuniv\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD LINK32 wxmswuniv27_adv.lib wxmswuniv27_html.lib wxmswuniv27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswuniv\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 Universal Debug"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmswuniv27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivd\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmswuniv27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivd\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD BASE LINK32 wxmswuniv27d_adv.lib wxmswuniv27d_html.lib wxmswuniv27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivd\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD LINK32 wxmswuniv27d_adv.lib wxmswuniv27d_html.lib wxmswuniv27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswunivd\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 Unicode Release"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswu\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmsw27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswu\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD BASE LINK32 wxmsw27u_adv.lib wxmsw27u_html.lib wxmsw27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswu\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD LINK32 wxmsw27u_adv.lib wxmsw27u_html.lib wxmsw27u_core.lib wxbase27u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswu\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 Unicode Debug"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswud\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmsw27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswud\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD BASE LINK32 wxmsw27ud_adv.lib wxmsw27ud_html.lib wxmsw27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswud\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD LINK32 wxmsw27ud_adv.lib wxmsw27ud_html.lib wxmsw27ud_core.lib wxbase27ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswud\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 Release"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_msw\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmsw27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_msw\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD BASE LINK32 wxmsw27_adv.lib wxmsw27_html.lib wxmsw27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_msw\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD LINK32 wxmsw27_adv.lib wxmsw27_html.lib wxmsw27_core.lib wxbase27.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_msw\widgets.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:windows
!ELSEIF "$(CFG)" == "widgets - Win32 Debug"
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswd\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
-# ADD LINK32 wxmsw27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswd\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD BASE LINK32 wxmsw27d_adv.lib wxmsw27d_html.lib wxmsw27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswd\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
+# ADD LINK32 wxmsw27d_adv.lib wxmsw27d_html.lib wxmsw27d_core.lib wxbase27d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib /nologo /machine:i386 /out:"vc_mswd\widgets.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:windows
!ENDIF
# End Source File
# Begin Source File
+SOURCE=.\datepick.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\gauge.cpp
# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=.\..\sample.rc
+# End Source File
+# Begin Source File
+
SOURCE=.\slider.cpp
# End Source File
# Begin Source File
SOURCE=.\widgets.cpp
# End Source File
-# Begin Source File
-
-SOURCE=.\widgets.rc
-# End Source File
# End Group
# End Target
# End Project
#ifndef _WX_SAMPLE_WIDGETS_H_
#define _WX_SAMPLE_WIDGETS_H_
+#if wxUSE_TREEBOOK
+ #include "wx/treebook.h"
+ #define USE_TREEBOOK 1
+ #define WidgetsBookCtrl wxTreebook
+ #define WidgetsBookCtrlEvent wxTreebookEvent
+ #define EVT_WIDGETS_PAGE_CHANGED(id,func) EVT_TREEBOOK_PAGE_CHANGED(id,func)
+#else
+ #include "wx/bookctrl.h"
+ #define USE_TREEBOOK 0
+ #define WidgetsBookCtrl wxBookCtrl
+ #define WidgetsBookCtrlEvent wxBookCtrlEvent
+ #define EVT_WIDGETS_PAGE_CHANGED(id,func) EVT_BOOKCTRL_PAGE_CHANGED(id,func)
+#endif
+
+#if wxUSE_LOG && !defined(__SMARTPHONE__)
+ #define USE_LOG 1
+#else
+ #define USE_LOG 0
+#endif
+
class WXDLLEXPORT wxCheckBox;
-class WXDLLEXPORT wxBookCtrlBase;
class WXDLLEXPORT wxSizer;
class WXDLLEXPORT wxTextCtrl;
+class WXDLLEXPORT WidgetsBookCtrl;
class WidgetsPageInfo;
// all source files use wxImageList
#include "wx/imaglist.h"
-#if wxUSE_LOG && !defined(__SMARTPHONE__)
- #define USE_LOG 1
-#else
- #define USE_LOG 0
-#endif
+// INTRODUCING NEW PAGES DON'T FORGET TO ADD ENTRIES TO 'WidgetsCategories'
+enum
+{
+ NATIVE_PAGE = 0,
+ GENERIC_PAGE,
+ PICKER_PAGE,
+ COMBO_PAGE,
+ WITH_ITEMS_PAGE,
+ EDITABLE_PAGE,
+ BOOK_PAGE,
+ ALL_PAGE,
+ MAX_PAGES
+};
+
+enum
+{
+ NATIVE_CTRLS = 1 << NATIVE_PAGE,
+ GENERIC_CTRLS = 1 << GENERIC_PAGE,
+ PICKER_CTRLS = 1 << PICKER_PAGE,
+ COMBO_CTRLS = 1 << COMBO_PAGE,
+ WITH_ITEMS_CTRLS = 1 << WITH_ITEMS_PAGE,
+ EDITABLE_CTRLS = 1 << EDITABLE_PAGE,
+ BOOK_CTRLS = 1 << BOOK_PAGE,
+ ALL_CTRLS = 1 << ALL_PAGE
+};
// ----------------------------------------------------------------------------
// WidgetsPage: a book page demonstrating some widget
class WidgetsPage : public wxPanel
{
public:
- WidgetsPage(wxBookCtrlBase *book);
+ WidgetsPage(WidgetsBookCtrl *book);
// return the control shown by this page
virtual wxControl *GetWidget() const = 0;
class WidgetsPageInfo
{
public:
- typedef WidgetsPage *(*Constructor)(wxBookCtrlBase *book,
+ typedef WidgetsPage *(*Constructor)(WidgetsBookCtrl *book,
wxImageList *imaglist);
// our ctor
- WidgetsPageInfo(Constructor ctor, const wxChar *label);
+ WidgetsPageInfo(Constructor ctor, const wxChar *label, int categories);
// accessors
const wxString& GetLabel() const { return m_label; }
+ int GetCategories() const { return m_categories; }
Constructor GetCtor() const { return m_ctor; }
WidgetsPageInfo *GetNext() const { return m_next; }
// the label of the page
wxString m_label;
+ // the list (flags) for sharing page between categories
+ int m_categories;
+
// the function to create this page
Constructor m_ctor;
{ return &ms_info##classname; }
// and this one must be inserted somewhere in the source file
-#define IMPLEMENT_WIDGETS_PAGE(classname, label) \
- WidgetsPage *wxCtorFor##classname(wxBookCtrlBase *book, \
+#define IMPLEMENT_WIDGETS_PAGE(classname, label, categories) \
+ WidgetsPage *wxCtorFor##classname(WidgetsBookCtrl *book, \
wxImageList *imaglist) \
{ return new classname(book, imaglist); } \
WidgetsPageInfo classname:: \
- ms_info##classname(wxCtorFor##classname, label)
+ ms_info##classname(wxCtorFor##classname, label, ALL_CTRLS | categories)
#endif // _WX_SAMPLE_WIDGETS_H_
+++ /dev/null
-#include "wx/msw/wx.rc"