]> git.saurik.com Git - wxWidgets.git/commitdiff
Derive wxAuiNotebook from wxBookCtrlBase. Document wxAuiNotebookEvent which now deriv...
authorSteve Lamerton <steve.lamerton@gmail.com>
Sun, 2 Oct 2011 10:29:00 +0000 (10:29 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Sun, 2 Oct 2011 10:29:00 +0000 (10:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

18 files changed:
docs/changes.txt
include/wx/aui/auibook.h
interface/wx/aui/auibook.h
interface/wx/bookctrl.h
samples/notebook/Makefile.in
samples/notebook/makefile.bcc
samples/notebook/makefile.gcc
samples/notebook/makefile.unx
samples/notebook/makefile.vc
samples/notebook/makefile.wat
samples/notebook/notebook.bkl
samples/notebook/notebook.cpp
samples/notebook/notebook.dsp
samples/notebook/notebook.h
samples/notebook/notebook_vc7.vcproj
samples/notebook/notebook_vc8.vcproj
samples/notebook/notebook_vc9.vcproj
src/aui/auibook.cpp

index 207808e4d8f1df43d514b47c028ce93f8f8b5454..101cf891fd798c48d12cb95e354463b6a675b100 100644 (file)
@@ -471,6 +471,7 @@ All (GUI):
 - Added support for saving alpha with TIFF images.
 - Added wxPersistentSplitter.
 - Added wxWebView library (Steven Lamerton & Auria, GSoC 2011 project).
+- Derive wxAuiNotebook from wxBookCtrlBase (Steven Lamerton)
 
 OSX:
 
index 42092662f8acb8e7a839cdfdbc001c81b9f70cb0..375407aa34b135aeeb5b71d56e6ca836d589a490 100644 (file)
@@ -24,7 +24,7 @@
 #include "wx/aui/framemanager.h"
 #include "wx/aui/dockart.h"
 #include "wx/aui/floatpane.h"
-#include "wx/control.h"
+#include "wx/bookctrl.h"
 
 
 class wxAuiNotebook;
@@ -60,39 +60,27 @@ enum wxAuiNotebookOption
 
 // aui notebook event class
 
-class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxNotifyEvent
+class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxBookCtrlEvent
 {
 public:
     wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL,
                        int win_id = 0)
-          : wxNotifyEvent(command_type, win_id)
+          : wxBookCtrlEvent(command_type, win_id)
     {
-        old_selection = -1;
-        selection = -1;
         drag_source = NULL;
     }
 #ifndef SWIG
-    wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxNotifyEvent(c)
+    wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxBookCtrlEvent(c)
     {
-        old_selection = c.old_selection;
-        selection = c.selection;
         drag_source = c.drag_source;
     }
 #endif
     wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); }
 
-    void SetSelection(int s) { selection = s; m_commandInt = s; }
-    int GetSelection() const { return selection; }
-
-    void SetOldSelection(int s) { old_selection = s; }
-    int GetOldSelection() const { return old_selection; }
-
     void SetDragSource(wxAuiNotebook* s) { drag_source = s; }
     wxAuiNotebook* GetDragSource() const { return drag_source; }
 
 public:
-    int old_selection;
-    int selection;
     wxAuiNotebook* drag_source;
 
 #ifndef SWIG
@@ -502,7 +490,7 @@ protected:
 
 
 
-class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled<wxControl>
+class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled<wxBookCtrlBase>
 {
 
 public:
@@ -558,7 +546,7 @@ public:
     bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
     wxBitmap GetPageBitmap(size_t page_idx) const;
 
-    size_t SetSelection(size_t new_page);
+    int SetSelection(size_t new_page);
     int GetSelection() const;
 
     virtual void Split(size_t page, int direction);
@@ -598,6 +586,24 @@ public:
     // Redo sizing after thawing
     virtual void Thaw();
 
+    //wxBookCtrlBase functions
+
+    virtual void SetPageSize (const wxSize &size);
+    virtual int  HitTest (const wxPoint &pt, long *flags=NULL) const;
+
+    virtual int GetPageImage(size_t n) const;
+    virtual bool SetPageImage(size_t n, int imageId);
+
+    wxWindow* GetCurrentPage () const;
+
+    virtual int ChangeSelection(size_t n);
+
+    virtual bool AddPage(wxWindow *page, const wxString &text, bool select, 
+                         int imageId);
+    virtual bool DeleteAllPages();
+    virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
+                            bool select=false, int imageId=NO_IMAGE);
+
 protected:
     // Common part of all ctors.
     void Init();
@@ -614,6 +620,12 @@ protected:
     virtual int CalculateTabCtrlHeight();
     virtual wxSize CalculateNewSplitSize();
 
+    // remove the page and return a pointer to it
+    virtual wxWindow *DoRemovePage(size_t WXUNUSED(page)) { return NULL; }
+
+    //A general selection function
+    virtual int DoModifySelection(size_t n, bool events);
+
 protected:
 
     void DoSizing();
index 2ed82e3eddecb21a4ce496254b6dc926fd03e879..451924152e282190a2a6614dc9457073c3f19c36 100644 (file)
@@ -19,9 +19,6 @@
     splitter configurations, and toggle through different themes to customize
     the control's look and feel.
 
-    An effort has been made to try to maintain an API as similar to that of
-    wxNotebook (note that wxAuiNotebook does not derive from wxNotebook!).
-
     The default theme that is used is wxAuiDefaultTabArt, which provides a modern,
     glossy look and feel.
     The theme can be changed by calling wxAuiNotebook::SetArtProvider.
@@ -76,7 +73,7 @@
     @library{wxaui}
     @category{aui}
 */
-class wxAuiNotebook : public wxControl
+class wxAuiNotebook : public wxBookCtrlBase
 {
 public:
     /**
@@ -100,11 +97,48 @@ public:
                  bool select = false,
                  const wxBitmap& bitmap = wxNullBitmap);
 
+    /**
+        Adds a new page.
+
+        The page must have the book control itself as the parent and must not
+        have been added to this control previously.
+
+        The call to this function may generate the page changing events.
+
+        @param page
+            Specifies the new page.
+        @param text
+            Specifies the text for the new page.
+        @param select
+            Specifies whether the page should be selected.
+        @param imageId
+            Specifies the optional image index for the new page.
+
+        @return @true if successful, @false otherwise.
+
+        @remarks Do not delete the page, it will be deleted by the book control.
+
+        @see InsertPage()
+        @since 2.9.3
+    */
+    virtual bool AddPage(wxWindow *page, const wxString &text, bool select, int imageId);
+
     /**
         Sets the selection to the next or previous page.
     */
     void AdvanceSelection(bool forward = true);
 
+    /**
+        Changes the selection for the given page, returning the previous selection.
+
+        This function behaves as SetSelection() but does @em not generate the
+        page changing events.
+
+        See @ref overview_events_prog for more information.
+        @since 2.9.3
+    */
+    virtual int ChangeSelection(size_t n);
+
     /**
         Creates the notebook window.
     */
@@ -113,6 +147,12 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = 0);
 
+    /**
+        Deletes all pages.
+        @since 2.9.3
+    */
+    virtual bool DeleteAllPages();
+
     /**
         Deletes a page at the given index.
         Calling this method will generate a page change event.
@@ -124,6 +164,12 @@ public:
     */
     wxAuiTabArt* GetArtProvider() const;
 
+    /**
+        Returns the currently selected page or @NULL.
+        @since 2.9.3
+    */
+    wxWindow* GetCurrentPage () const;
+
     /**
         Returns the desired height of the notebook for the given page height.
         Use this to fit the notebook to a given page size.
@@ -177,6 +223,30 @@ public:
                     bool select = false,
                     const wxBitmap& bitmap = wxNullBitmap);
 
+    /**
+        Inserts a new page at the specified position.
+
+        @param index
+            Specifies the position for the new page.
+        @param page
+            Specifies the new page.
+        @param text
+            Specifies the text for the new page.
+        @param select
+            Specifies whether the page should be selected.
+        @param imageId
+            Specifies the optional image index for the new page.
+
+        @return @true if successful, @false otherwise.
+
+        @remarks Do not delete the page, it will be deleted by the book control.
+
+        @see AddPage()
+        @since 2.9.3
+    */
+    virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
+                            bool select=false, int imageId=NO_IMAGE);
+
     /**
         Removes a page, without deleting the window pointer.
     */
@@ -209,6 +279,13 @@ public:
     */
     bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
 
+    /**
+        Sets the image index for the given page. @a image is an index into
+        the image list which was set with SetImageList().
+        @since 2.9.3
+    */
+    virtual bool SetPageImage(size_t n, int imageId);
+
     /**
         Sets the tab label for the page.
     */
@@ -357,3 +434,43 @@ public:
     virtual void SetSizingInfo(const wxSize& tab_ctrl_size, size_t tab_count) = 0;
 };
 
+/**
+    @class wxAuiNotebookEvent
+
+    This class is used by the events generated by wxAuiNotebook.
+
+    @beginEventEmissionTable{wxAuiNotebookEvent}
+    @event{EVT_AUINOTEBOOK_PAGE_CLOSE(id, func)}
+        A page is about to be closed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE event.
+    @event{EVT_AUINOTEBOOK_PAGE_CHANGED(id, func)}
+        The page selection was changed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED event.
+    @event{EVT_AUINOTEBOOK_PAGE_CHANGING(id, func)}
+        The page selection is about to be changed. Processes a  @c wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING event. This event can be vetoed.
+    @event{EVT_AUINOTEBOOK_BUTTON(id, func)}
+        The window list button has been pressed. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_BUTTON event.
+    @event{EVT_AUINOTEBOOK_BEGIN_DRAG(id, func)}
+        Dragging is about to begin. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG event.
+    @event{EVT_AUINOTEBOOK_END_DRAG(id, func)}
+        Dragging has ended. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_END_DRAG event.
+    @event{EVT_AUINOTEBOOK_DRAG_MOTION(id, func)}
+        Emitted during a drag and drop operation. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION event.
+    @event{EVT_AUINOTEBOOK_ALLOW_DND(id, func)}
+        Whether to allow a tab to be dropped. Processes a @c wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND event. This event must be specially allowed.
+    @endEventTable
+
+    @library{wxaui}
+    @category{events,bookctrl}
+
+    @see wxAuiNotebook, wxBookCtrlEvent
+*/
+class wxAuiNotebookEvent : public wxBookCtrlEvent
+{
+public:
+    /**
+        Constructor.
+    */
+    wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL, int win_id = 0);
+
+    wxEvent *Clone();
+};
+
index 912f1674c2539cfca8ea82f3cd7042bf56271e19..15f27c1abf0d6f2879eeb9991958b5e87fd499ba 100644 (file)
@@ -335,7 +335,7 @@ public:
     @class wxBookCtrlEvent
 
     This class represents the events generated by book controls (wxNotebook,
-    wxListbook, wxChoicebook, wxTreebook).
+    wxListbook, wxChoicebook, wxTreebook, wxAuiNotebook).
 
     The PAGE_CHANGING events are sent before the current page is changed.
     It allows the program to examine the current page (which can be retrieved
@@ -354,7 +354,7 @@ public:
     @library{wxcore}
     @category{events,bookctrl}
 
-    @see wxNotebook, wxListbook, wxChoicebook, wxTreebook, wxToolbook
+    @see wxNotebook, wxListbook, wxChoicebook, wxTreebook, wxToolbook, wxAuiNotebook
 */
 class wxBookCtrlEvent : public wxNotifyEvent
 {
index a6765240e47fa6fc3028e72ea18b0d0eb0afcefb..7823bb81d49c0ac0bd47480b726528899b02fda5 100644 (file)
@@ -101,6 +101,9 @@ COND_PLATFORM_OS2_1___notebook___os2_emxbindcmd = $(NM) notebook$(EXEEXT) | if \
 @COND_TOOLKIT_OSX_IPHONE@      = $(__notebook_app_Contents_PkgInfo___depname)
 @COND_TOOLKIT_COCOA@____notebook_BUNDLE_TGT_REF_DEP = \
 @COND_TOOLKIT_COCOA@   $(__notebook_app_Contents_PkgInfo___depname)
+COND_MONOLITHIC_0___WXLIB_AUI_p = \
+       -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_AUI_p = $(COND_MONOLITHIC_0___WXLIB_AUI_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)
@@ -147,7 +150,7 @@ distclean: clean
        rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
 
 notebook$(EXEEXT): $(NOTEBOOK_OBJECTS) $(__notebook___win32rc)
-       $(CXX) -o $@ $(NOTEBOOK_OBJECTS)    -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS)  $(__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_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
+       $(CXX) -o $@ $(NOTEBOOK_OBJECTS)    -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS)  $(__WXLIB_AUI_p)  $(__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_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
        
        $(__notebook___mac_setfilecmd)
        $(__notebook___os2_emxbindcmd)
index a5cbf194eed4d20bb0d0de801b548b08b7b4f33f..4ea03a5a4c55d597e6e6fdc549a184ec69792d9e 100644 (file)
@@ -167,6 +167,10 @@ __DLLFLAG_p = -DWXUSINGDLL
 __DLLFLAG_p_1 = -dWXUSINGDLL\r
 !endif\r
 !if "$(MONOLITHIC)" == "0"\r
+__WXLIB_AUI_p = \\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib\r
+!endif\r
+!if "$(MONOLITHIC)" == "0"\r
 __WXLIB_CORE_p = \\r
        wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib\r
 !endif\r
@@ -231,7 +235,7 @@ clean:
 \r
 $(OBJS)\notebook.exe: $(NOTEBOOK_OBJECTS)  $(OBJS)\notebook_sample.res\r
        ilink32 -Tpe -q  -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) -aa $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @&&|\r
-       c0w32.obj $(NOTEBOOK_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) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\notebook_sample.res\r
+       c0w32.obj $(NOTEBOOK_OBJECTS),$@,, $(__WXLIB_AUI_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) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\notebook_sample.res\r
 |\r
 \r
 $(OBJS)\notebook_sample.res: .\..\..\samples\sample.rc\r
index 398515ab184efdfa32728d8440e309e0258d5df5..4f211944c4cebecb7394d2452834f3909e17aed8 100644 (file)
@@ -152,6 +152,10 @@ ifeq ($(SHARED),1)
 __DLLFLAG_p_1 = --define WXUSINGDLL\r
 endif\r
 ifeq ($(MONOLITHIC),0)\r
+__WXLIB_AUI_p = \\r
+       -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui\r
+endif\r
+ifeq ($(MONOLITHIC),0)\r
 __WXLIB_CORE_p = \\r
        -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core\r
 endif\r
@@ -219,7 +223,7 @@ clean:
        -if exist $(OBJS)\notebook.exe del $(OBJS)\notebook.exe\r
 \r
 $(OBJS)\notebook.exe: $(NOTEBOOK_OBJECTS) $(OBJS)\notebook_sample_rc.o\r
-       $(CXX) -o $@ $(NOTEBOOK_OBJECTS)  $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS)  $(__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) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet\r
+       $(CXX) -o $@ $(NOTEBOOK_OBJECTS)  $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS)  $(__WXLIB_AUI_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) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet\r
 \r
 $(OBJS)\notebook_sample_rc.o: ./../../samples/sample.rc\r
        windres --use-temp-file -i$< -o$@    --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_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 $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../samples --define NOPCH\r
index c8d7808cb50de5e79e301fb65f77c8c2f818c204..418846d433f5be6bd933b13a2e90ea339b3f2061 100644 (file)
@@ -88,7 +88,7 @@ test_for_selected_wxbuild:
        @$(WX_CONFIG) $(WX_CONFIG_FLAGS)
 
 notebook: $(NOTEBOOK_OBJECTS)
-       $(CXX) -o $@ $(NOTEBOOK_OBJECTS)   $(LDFLAGS)  `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,base`
+       $(CXX) -o $@ $(NOTEBOOK_OBJECTS)   $(LDFLAGS)  `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs aui,core,base`
 
 notebook_notebook.o: ./notebook.cpp
        $(CXX) -c -o $@ $(NOTEBOOK_CXXFLAGS) $(CPPDEPS) $<
index 7b5e8ec92c3b640e123c5d30e18144dc7bc0461a..b113d1bf3439a09bf2096fe8feeaabfc60ddcc7c 100644 (file)
@@ -292,6 +292,10 @@ __DLLFLAG_p = /DWXUSINGDLL
 __DLLFLAG_p_1 = /d WXUSINGDLL\r
 !endif\r
 !if "$(MONOLITHIC)" == "0"\r
+__WXLIB_AUI_p = \\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib\r
+!endif\r
+!if "$(MONOLITHIC)" == "0"\r
 __WXLIB_CORE_p = \\r
        wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib\r
 !endif\r
@@ -341,7 +345,7 @@ clean:
 \r
 $(OBJS)\notebook.exe: $(NOTEBOOK_OBJECTS) $(OBJS)\notebook_sample.res\r
        link /NOLOGO /OUT:$@  $(__DEBUGINFO_1) /pdb:"$(OBJS)\notebook.pdb" $(__DEBUGINFO_2)  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<\r
-       $(NOTEBOOK_OBJECTS) $(NOTEBOOK_RESOURCES)  $(__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) $(__CAIRO_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 wininet.lib\r
+       $(NOTEBOOK_OBJECTS) $(NOTEBOOK_RESOURCES)  $(__WXLIB_AUI_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) $(__CAIRO_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 wininet.lib\r
 <<\r
 \r
 $(OBJS)\notebook_sample.res: .\..\..\samples\sample.rc\r
index 97ccdc0bdaf1f584ccace56882198630451f8d44..5d1d3105ee68eb20992c8c2bf1fcac46397e77f3 100644 (file)
@@ -137,6 +137,11 @@ __EXCEPTIONSFLAG_8 =
 !ifeq USE_EXCEPTIONS 1\r
 __EXCEPTIONSFLAG_8 = -xs\r
 !endif\r
+__WXLIB_AUI_p =\r
+!ifeq MONOLITHIC 0\r
+__WXLIB_AUI_p = &\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib\r
+!endif\r
 __WXLIB_CORE_p =\r
 !ifeq MONOLITHIC 0\r
 __WXLIB_CORE_p = &\r
@@ -255,7 +260,7 @@ $(OBJS)\notebook.exe :  $(NOTEBOOK_OBJECTS) $(OBJS)\notebook_sample.res
        @%append $(OBJS)\notebook.lbc option caseexact\r
        @%append $(OBJS)\notebook.lbc  $(__DEBUGINFO_1)  libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS)\r
        @for %i in ($(NOTEBOOK_OBJECTS)) do @%append $(OBJS)\notebook.lbc file %i\r
-       @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)  $(__CAIRO_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 wininet.lib) do @%append $(OBJS)\notebook.lbc library %i\r
+       @for %i in ( $(__WXLIB_AUI_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)  $(__CAIRO_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 wininet.lib) do @%append $(OBJS)\notebook.lbc library %i\r
        @%append $(OBJS)\notebook.lbc option resource=$(OBJS)\notebook_sample.res\r
        @for %i in () do @%append $(OBJS)\notebook.lbc option stack=%i\r
        wlink @$(OBJS)\notebook.lbc\r
index 0ff96c0d9f5bd8fe540a7523f1b2b2f10b69bbc2..057596b0441893bf46ec1fcb32a17043cb5adb6c 100644 (file)
@@ -6,6 +6,7 @@
     <exe id="notebook" template="wx_sample" template_append="wx_append">
         <sources>notebook.cpp</sources>
         <headers>notebook.h</headers>
+        <wx-lib>aui</wx-lib>
         <wx-lib>core</wx-lib>
         <wx-lib>base</wx-lib>
     </exe>
index 3aceabbe2fc94d2af6a3e79edbc3f5601174838e..f43dee7bd894e6e1bb6714be097115dcdb27ab2a 100644 (file)
@@ -271,6 +271,10 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_TOOLBOOK_PAGE_CHANGED(wxID_ANY, MyFrame::OnToolbook)
     EVT_TOOLBOOK_PAGE_CHANGING(wxID_ANY, MyFrame::OnToolbook)
 #endif
+#if wxUSE_AUI
+    EVT_AUINOTEBOOK_PAGE_CHANGED(wxID_ANY, MyFrame::OnAuiNotebook)
+    EVT_AUINOTEBOOK_PAGE_CHANGING(wxID_ANY, MyFrame::OnAuiNotebook)
+#endif
 
     // Update title in idle time
     EVT_IDLE(MyFrame::OnIdle)
@@ -293,6 +297,8 @@ MyFrame::MyFrame()
     m_type = Type_Treebook;
 #elif wxUSE_TOOLBOOK
     m_type = Type_Toolbook;
+#elif wxUSE_AUI
+    m_type = Type_Aui;
 #else
     #error "Don't use Notebook sample without any book enabled in wxWidgets build!"
 #endif
@@ -324,6 +330,9 @@ MyFrame::MyFrame()
 #if wxUSE_TOOLBOOK
     menuType->AppendRadioItem(ID_BOOK_TOOLBOOK,   wxT("T&oolbook\tCtrl-5"));
 #endif
+#if wxUSE_AUI
+    menuType->AppendRadioItem(ID_BOOK_AUINOTEBOOK,   wxT("&AuiNotebook\tCtrl-6"));
+#endif
 
     menuType->Check(ID_BOOK_NOTEBOOK + m_type, true);
 
@@ -469,7 +478,13 @@ MyFrame::~MyFrame()
     #define CASE_TOOLBOOK(x)
 #endif
 
-#define DISPATCH_ON_TYPE(before, nb, lb, cb, tb, toolb, after)                \
+#if wxUSE_AUI
+    #define CASE_AUINOTEBOOK(x) case Type_AuiNotebook: x; break;
+#else
+    #define CASE_AUINOTEBOOK(x)
+#endif
+
+#define DISPATCH_ON_TYPE(before, nb, lb, cb, tb, toolb, aui, after)           \
     switch ( m_type )                                                         \
     {                                                                         \
         CASE_NOTEBOOK(before nb after)                                        \
@@ -477,16 +492,17 @@ MyFrame::~MyFrame()
         CASE_CHOICEBOOK(before cb after)                                      \
         CASE_TREEBOOK(before tb after)                                        \
         CASE_TOOLBOOK(before toolb after)                                     \
+        CASE_AUINOTEBOOK(before aui after)                                    \
                                                                               \
         default:                                                              \
             wxFAIL_MSG( wxT("unknown book control type") );                    \
     }
 
-int MyFrame::TranslateBookFlag(int nb, int lb, int chb, int tbk, int toolbk) const
+int MyFrame::TranslateBookFlag(int nb, int lb, int chb, int tbk, int toolbk, int aui) const
 {
     int flag = 0;
 
-    DISPATCH_ON_TYPE(flag =, nb,  lb,  chb,  tbk, toolbk, + 0);
+    DISPATCH_ON_TYPE(flag =, nb,  lb,  chb,  tbk, toolbk, aui, + 0);
 
     return flag;
 }
@@ -541,6 +557,7 @@ void MyFrame::RecreateBook()
                          wxChoicebook,
                          wxTreebook,
                          wxToolbook,
+                         wxAuiNotebook,
                      (m_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, flags));
 
     if ( !m_bookCtrl )
@@ -965,6 +982,13 @@ void MyFrame::OnBookCtrl(wxBookCtrlBaseEvent& event)
             wxT("wxToolbook")
         },
 #endif // wxUSE_TOOLBOOK
+#if wxUSE_AUI
+        {
+            wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED,
+            wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING,
+            wxT("wxAuiNotebook")
+        },
+#endif // wxUSE_AUI
     };
 
 
index c9a2d1a78a404fb7a680b07fe1b534f3c2ce650a..acefcfd46807242133023930241e53f82544be76 100644 (file)
@@ -57,8 +57,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
-# ADD BASE LINK32 wxmswuniv29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivudll\notebook.exe" /debug /pdb:"vc_mswunivudll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
-# ADD LINK32 wxmswuniv29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivudll\notebook.exe" /debug /pdb:"vc_mswunivudll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD BASE LINK32 wxmswuniv29u_aui.lib wxmswuniv29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivudll\notebook.exe" /debug /pdb:"vc_mswunivudll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD LINK32 wxmswuniv29u_aui.lib wxmswuniv29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivudll\notebook.exe" /debug /pdb:"vc_mswunivudll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
 \r
 !ELSEIF  "$(CFG)" == "notebook - Win32 DLL Universal Debug"\r
 \r
@@ -82,8 +82,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
-# ADD BASE LINK32 wxmswuniv29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivuddll\notebook.exe" /debug /pdb:"vc_mswunivuddll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
-# ADD LINK32 wxmswuniv29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivuddll\notebook.exe" /debug /pdb:"vc_mswunivuddll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD BASE LINK32 wxmswuniv29ud_aui.lib wxmswuniv29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivuddll\notebook.exe" /debug /pdb:"vc_mswunivuddll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD LINK32 wxmswuniv29ud_aui.lib wxmswuniv29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivuddll\notebook.exe" /debug /pdb:"vc_mswunivuddll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
 \r
 !ELSEIF  "$(CFG)" == "notebook - Win32 DLL Release"\r
 \r
@@ -107,8 +107,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
-# ADD BASE LINK32 wxmsw29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswudll\notebook.exe" /debug /pdb:"vc_mswudll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
-# ADD LINK32 wxmsw29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswudll\notebook.exe" /debug /pdb:"vc_mswudll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD BASE LINK32 wxmsw29u_aui.lib wxmsw29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswudll\notebook.exe" /debug /pdb:"vc_mswudll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD LINK32 wxmsw29u_aui.lib wxmsw29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswudll\notebook.exe" /debug /pdb:"vc_mswudll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
 \r
 !ELSEIF  "$(CFG)" == "notebook - Win32 DLL Debug"\r
 \r
@@ -132,8 +132,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
-# ADD BASE LINK32 wxmsw29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswuddll\notebook.exe" /debug /pdb:"vc_mswuddll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
-# ADD LINK32 wxmsw29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswuddll\notebook.exe" /debug /pdb:"vc_mswuddll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD BASE LINK32 wxmsw29ud_aui.lib wxmsw29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswuddll\notebook.exe" /debug /pdb:"vc_mswuddll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD LINK32 wxmsw29ud_aui.lib wxmsw29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswuddll\notebook.exe" /debug /pdb:"vc_mswuddll\notebook.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
 \r
 !ELSEIF  "$(CFG)" == "notebook - Win32 Universal Release"\r
 \r
@@ -157,8 +157,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
-# ADD BASE LINK32 wxmswuniv29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivu\notebook.exe" /debug /pdb:"vc_mswunivu\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
-# ADD LINK32 wxmswuniv29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivu\notebook.exe" /debug /pdb:"vc_mswunivu\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD BASE LINK32 wxmswuniv29u_aui.lib wxmswuniv29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivu\notebook.exe" /debug /pdb:"vc_mswunivu\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD LINK32 wxmswuniv29u_aui.lib wxmswuniv29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivu\notebook.exe" /debug /pdb:"vc_mswunivu\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
 \r
 !ELSEIF  "$(CFG)" == "notebook - Win32 Universal Debug"\r
 \r
@@ -182,8 +182,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
-# ADD BASE LINK32 wxmswuniv29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivud\notebook.exe" /debug /pdb:"vc_mswunivud\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
-# ADD LINK32 wxmswuniv29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivud\notebook.exe" /debug /pdb:"vc_mswunivud\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD BASE LINK32 wxmswuniv29ud_aui.lib wxmswuniv29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivud\notebook.exe" /debug /pdb:"vc_mswunivud\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD LINK32 wxmswuniv29ud_aui.lib wxmswuniv29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswunivud\notebook.exe" /debug /pdb:"vc_mswunivud\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
 \r
 !ELSEIF  "$(CFG)" == "notebook - Win32 Release"\r
 \r
@@ -207,8 +207,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
-# ADD BASE LINK32 wxmsw29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswu\notebook.exe" /debug /pdb:"vc_mswu\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
-# ADD LINK32 wxmsw29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswu\notebook.exe" /debug /pdb:"vc_mswu\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD BASE LINK32 wxmsw29u_aui.lib wxmsw29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswu\notebook.exe" /debug /pdb:"vc_mswu\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD LINK32 wxmsw29u_aui.lib wxmsw29u_core.lib wxbase29u.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 wininet.lib /nologo /machine:i386 /out:"vc_mswu\notebook.exe" /debug /pdb:"vc_mswu\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
 \r
 !ELSEIF  "$(CFG)" == "notebook - Win32 Debug"\r
 \r
@@ -232,8 +232,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LINK32=link.exe\r
-# ADD BASE LINK32 wxmsw29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswud\notebook.exe" /debug /pdb:"vc_mswud\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
-# ADD LINK32 wxmsw29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswud\notebook.exe" /debug /pdb:"vc_mswud\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD BASE LINK32 wxmsw29ud_aui.lib wxmsw29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswud\notebook.exe" /debug /pdb:"vc_mswud\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD LINK32 wxmsw29ud_aui.lib wxmsw29ud_core.lib wxbase29ud.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 wininet.lib /nologo /machine:i386 /out:"vc_mswud\notebook.exe" /debug /pdb:"vc_mswud\notebook.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
 \r
 !ENDIF\r
 \r
index 4646e8766a52dae6f0aba3b40ffdb502af26b244..f08ffd630b43a5fef4f422b4c5d4f9d0427344f7 100644 (file)
@@ -14,6 +14,7 @@
 #include "wx/treebook.h"
 #include "wx/notebook.h"
 #include "wx/toolbook.h"
+#include "wx/aui/auibook.h"
 
 #if wxUSE_LOG && !defined( __SMARTPHONE__ )
     #define USE_LOG 1
@@ -77,6 +78,9 @@ public:
 #if wxUSE_TOOLBOOK
     void OnToolbook(wxToolbookEvent& event) { OnBookCtrl(event); }
 #endif
+#if wxUSE_AUI
+    void OnAuiNotebook(wxAuiNotebookEvent& event) { OnBookCtrl(event); }
+#endif
 
     void OnIdle(wxIdleEvent& event);
 
@@ -91,7 +95,7 @@ private:
 
     void RecreateBook();
     wxPanel *CreateNewPage() const;
-    int TranslateBookFlag(int nb, int lb, int chb, int tbk, int toolbk) const;
+    int TranslateBookFlag(int nb, int lb, int chb, int tbk, int toolbkm, int aui) const;
     void AddFlagStrIfFlagPresent(wxString & flagStr, long flags, long flag, const wxChar * flagName) const;
 
     // Sample setup
@@ -102,6 +106,7 @@ private:
         Type_Choicebook,
         Type_Treebook,
         Type_Toolbook,
+        Type_AuiNotebook,
         Type_Max
     } m_type;
     int m_orient;
@@ -137,6 +142,7 @@ enum ID_COMMANDS
     ID_BOOK_CHOICEBOOK,
     ID_BOOK_TREEBOOK,
     ID_BOOK_TOOLBOOK,
+    ID_BOOK_AUINOTEBOOK,
     ID_BOOK_MAX,
 
     ID_ORIENT_DEFAULT,
index fd594c8725946db859803fee9c6a358ceabca3cb..47de696e04f9c271d1dbb90b328c6a778de35e73 100644 (file)
@@ -46,7 +46,7 @@
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29ud_aui.lib  wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswud\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="TRUE"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29u_aui.lib  wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswu\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="TRUE"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29ud_aui.lib  wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswunivud\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="TRUE"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29u_aui.lib  wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswunivu\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="TRUE"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29ud_aui.lib  wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswuddll\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="TRUE"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29u_aui.lib  wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswudll\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="TRUE"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29ud_aui.lib  wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswunivuddll\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="TRUE"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29u_aui.lib  wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswunivudll\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="TRUE"\r
index 318b7bc30c50f98e48ff537a2ea5239124edb3a4..82897173bb868ce136a6e9e27fd905c41defb669 100644 (file)
@@ -80,7 +80,7 @@
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29ud_aui.lib  wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswud\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29u_aui.lib  wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswu\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29ud_aui.lib  wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswunivud\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29u_aui.lib  wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswunivu\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29ud_aui.lib  wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswuddll\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29u_aui.lib  wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswudll\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29ud_aui.lib  wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswunivuddll\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29u_aui.lib  wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswunivudll\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
index 5b418880b5d244d278202a8dd28be9bf2a6f8fc4..e783c272c16eaa4103202ec615f2e2a66155b35d 100644 (file)
@@ -79,7 +79,7 @@
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29ud_aui.lib  wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswud\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29u_aui.lib  wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswu\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29ud_aui.lib  wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswunivud\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29u_aui.lib  wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswunivu\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29ud_aui.lib  wxmsw29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswuddll\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmsw29u_aui.lib  wxmsw29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswudll\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29ud_aui.lib  wxmswuniv29ud_core.lib  wxbase29ud.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 wininet.lib"\r
                                OutputFile="vc_mswunivuddll\notebook.exe"\r
                                LinkIncremental="2"\r
                                SuppressStartupBanner="true"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalOptions=""\r
-                               AdditionalDependencies="wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
+                               AdditionalDependencies="wxmswuniv29u_aui.lib  wxmswuniv29u_core.lib  wxbase29u.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 wininet.lib"\r
                                OutputFile="vc_mswunivudll\notebook.exe"\r
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
index 0b7dfad98be8a1c534dfd1fbe20cc039793bfb63..8cb08550120e3740defe025108bb689863c2a58b 100644 (file)
@@ -60,7 +60,7 @@ wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent);
 
 IMPLEMENT_CLASS(wxAuiNotebook, wxControl)
 IMPLEMENT_CLASS(wxAuiTabCtrl, wxControl)
-IMPLEMENT_DYNAMIC_CLASS(wxAuiNotebookEvent, wxEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxAuiNotebookEvent, wxBookCtrlEvent)
 
 
 
@@ -3400,78 +3400,9 @@ int wxAuiNotebook::GetSelection() const
 }
 
 // SetSelection() sets the currently active page
-size_t wxAuiNotebook::SetSelection(size_t new_page)
+int wxAuiNotebook::SetSelection(size_t new_page)
 {
-    wxWindow* wnd = m_tabs.GetWindowFromIdx(new_page);
-    if (!wnd)
-        return m_curpage;
-
-    // don't change the page unless necessary;
-    // however, clicking again on a tab should give it the focus.
-    if ((int)new_page == m_curpage)
-    {
-        wxAuiTabCtrl* ctrl;
-        int ctrl_idx;
-        if (FindTab(wnd, &ctrl, &ctrl_idx))
-        {
-            if (FindFocus() != ctrl)
-                ctrl->SetFocus();
-        }
-        return m_curpage;
-    }
-
-    wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId);
-    evt.SetSelection(new_page);
-    evt.SetOldSelection(m_curpage);
-    evt.SetEventObject(this);
-    if (!GetEventHandler()->ProcessEvent(evt) || evt.IsAllowed())
-    {
-        int old_curpage = m_curpage;
-        m_curpage = new_page;
-
-        // program allows the page change
-        evt.SetEventType(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED);
-        (void)GetEventHandler()->ProcessEvent(evt);
-
-
-        wxAuiTabCtrl* ctrl;
-        int ctrl_idx;
-        if (FindTab(wnd, &ctrl, &ctrl_idx))
-        {
-            m_tabs.SetActivePage(wnd);
-
-            ctrl->SetActivePage(ctrl_idx);
-            DoSizing();
-            ctrl->DoShowHide();
-
-            ctrl->MakeTabVisible(ctrl_idx, ctrl);
-
-            // set fonts
-            wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
-            size_t i, pane_count = all_panes.GetCount();
-            for (i = 0; i < pane_count; ++i)
-            {
-                wxAuiPaneInfo& pane = all_panes.Item(i);
-                if (pane.name == wxT("dummy"))
-                    continue;
-                wxAuiTabCtrl* tabctrl = ((wxTabFrame*)pane.window)->m_tabs;
-                if (tabctrl != ctrl)
-                    tabctrl->SetSelectedFont(m_normal_font);
-                else
-                    tabctrl->SetSelectedFont(m_selected_font);
-                tabctrl->Refresh();
-            }
-
-            // Set the focus to the page if we're not currently focused on the tab.
-            // This is Firefox-like behaviour.
-            if (wnd->IsShownOnScreen() && FindFocus() != ctrl)
-                wnd->SetFocus();
-
-            return old_curpage;
-        }
-    }
-
-    return m_curpage;
+    return DoModifySelection(new_page, true);
 }
 
 void wxAuiNotebook::SetSelectionToWindow(wxWindow *win)
@@ -4544,4 +4475,161 @@ void wxAuiNotebook::Thaw()
     wxControl::Thaw();
 }
 
+void wxAuiNotebook::SetPageSize (const wxSize& WXUNUSED(size))
+{
+    wxFAIL_MSG("Not implemented for wxAuiNotebook");
+}
+
+int wxAuiNotebook::HitTest (const wxPoint& WXUNUSED(pt), long* WXUNUSED(flags)) const
+{
+    wxFAIL_MSG("Not implemented for wxAuiNotebook");
+    return wxNOT_FOUND;
+}
+
+int wxAuiNotebook::GetPageImage(size_t WXUNUSED(n)) const
+{
+    wxFAIL_MSG("Not implemented for wxAuiNotebook");
+    return -1;
+}
+
+bool wxAuiNotebook::SetPageImage(size_t n, int imageId)
+{
+    return SetPageBitmap(n, GetImageList()->GetBitmap(imageId));
+}
+
+wxWindow* wxAuiNotebook::GetCurrentPage () const
+{
+    return GetPage(GetSelection());
+}
+
+int wxAuiNotebook::ChangeSelection(size_t n)
+{
+    return DoModifySelection(n, false);
+}
+
+bool wxAuiNotebook::AddPage(wxWindow *page, const wxString &text, bool select, 
+                            int imageId)
+{
+    if(HasImageList()) 
+    {
+        return AddPage(page, text, select, GetImageList()->GetBitmap(imageId));
+    }
+    else
+    {
+        return AddPage(page, text, select, wxNullBitmap);
+    }
+}
+
+bool wxAuiNotebook::DeleteAllPages()
+{
+    size_t count = GetPageCount();
+    for(size_t i = 0; i < count; i++)
+    {
+        DeletePage(0);
+    }
+    return true;
+}
+
+bool wxAuiNotebook::InsertPage(size_t index, wxWindow *page, 
+                               const wxString &text, bool select, 
+                               int imageId)
+{
+    if(HasImageList())
+    {
+        return InsertPage(index, page, text, select, 
+                          GetImageList()->GetBitmap(imageId));
+    }
+    else
+    {
+        return InsertPage(index, page, text, select, wxNullBitmap);
+    }
+}
+
+int wxAuiNotebook::DoModifySelection(size_t n, bool events)
+{
+   wxWindow* wnd = m_tabs.GetWindowFromIdx(n);
+    if (!wnd)
+        return m_curpage;
+
+    // don't change the page unless necessary;
+    // however, clicking again on a tab should give it the focus.
+    if ((int)n == m_curpage)
+    {
+        wxAuiTabCtrl* ctrl;
+        int ctrl_idx;
+        if (FindTab(wnd, &ctrl, &ctrl_idx))
+        {
+            if (FindFocus() != ctrl)
+                ctrl->SetFocus();
+        }
+        return m_curpage;
+    }
+
+    bool vetoed = false;
+
+    wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId);
+
+    if(events)
+    {
+        evt.SetSelection(n);
+        evt.SetOldSelection(m_curpage);
+        evt.SetEventObject(this);
+        GetEventHandler()->ProcessEvent(evt);
+        vetoed = !evt.IsAllowed();
+    }
+
+    if (!vetoed)
+    {
+        int old_curpage = m_curpage;
+        m_curpage = n;
+
+        // program allows the page change
+        if(events)
+        {
+            evt.SetEventType(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED);
+            (void)GetEventHandler()->ProcessEvent(evt);
+        }
+
+
+        wxAuiTabCtrl* ctrl;
+        int ctrl_idx;
+        if (FindTab(wnd, &ctrl, &ctrl_idx))
+        {
+            m_tabs.SetActivePage(wnd);
+
+            ctrl->SetActivePage(ctrl_idx);
+            DoSizing();
+            ctrl->DoShowHide();
+
+            ctrl->MakeTabVisible(ctrl_idx, ctrl);
+
+            // set fonts
+            wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+            size_t i, pane_count = all_panes.GetCount();
+            for (i = 0; i < pane_count; ++i)
+            {
+                wxAuiPaneInfo& pane = all_panes.Item(i);
+                if (pane.name == wxT("dummy"))
+                    continue;
+                wxAuiTabCtrl* tabctrl = ((wxTabFrame*)pane.window)->m_tabs;
+                if (tabctrl != ctrl)
+                    tabctrl->SetSelectedFont(m_normal_font);
+                else
+                    tabctrl->SetSelectedFont(m_selected_font);
+                tabctrl->Refresh();
+            }
+
+            // Set the focus to the page if we're not currently focused on the tab.
+            // This is Firefox-like behaviour.
+            if (wnd->IsShownOnScreen() && FindFocus() != ctrl)
+                wnd->SetFocus();
+
+            return old_curpage;
+        }
+    }
+
+    return m_curpage;
+}
+
+
 #endif // wxUSE_AUI