1. fixed wxGTK notebook which was completely broken by the merge
2. added a new file for commno notebook code (nbkbase.cpp) 3. removed 'include "wx/wx.h"' from html files as I got tired of recompiling them git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -184,6 +184,7 @@ menucmn.cpp	C
 | 
				
			|||||||
mimecmn.cpp	C	32,B
 | 
					mimecmn.cpp	C	32,B
 | 
				
			||||||
module.cpp	C	B
 | 
					module.cpp	C	B
 | 
				
			||||||
mstream.cpp	C	B
 | 
					mstream.cpp	C	B
 | 
				
			||||||
 | 
					nbkbase.cpp	C
 | 
				
			||||||
object.cpp	C	B
 | 
					object.cpp	C	B
 | 
				
			||||||
objstrm.cpp	C	B
 | 
					objstrm.cpp	C	B
 | 
				
			||||||
odbc.cpp	C	R,X,P
 | 
					odbc.cpp	C	R,X,P
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,6 +21,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class wxGtkNotebookPage;
 | 
					class wxGtkNotebookPage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wx/list.h"
 | 
				
			||||||
 | 
					WX_DECLARE_LIST(wxGtkNotebookPage, wxGtkNotebookPagesList);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
// wxNotebook
 | 
					// wxNotebook
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
@@ -45,7 +48,7 @@ public:
 | 
				
			|||||||
              long style = 0,
 | 
					              long style = 0,
 | 
				
			||||||
              const wxString& name = "notebook");
 | 
					              const wxString& name = "notebook");
 | 
				
			||||||
      // dtor
 | 
					      // dtor
 | 
				
			||||||
    ~wxNotebook();
 | 
					    virtual ~wxNotebook();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // accessors
 | 
					  // accessors
 | 
				
			||||||
  // ---------
 | 
					  // ---------
 | 
				
			||||||
@@ -61,15 +64,6 @@ public:
 | 
				
			|||||||
  bool SetPageText(int nPage, const wxString& strText);
 | 
					  bool SetPageText(int nPage, const wxString& strText);
 | 
				
			||||||
  wxString GetPageText(int nPage) const;
 | 
					  wxString GetPageText(int nPage) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // image list stuff: each page may have an image associated with it. All
 | 
					 | 
				
			||||||
  // the images belong to an image list, so you have to
 | 
					 | 
				
			||||||
  // 1) create an image list
 | 
					 | 
				
			||||||
  // 2) associate it with the notebook
 | 
					 | 
				
			||||||
  // 3) set for each page it's image
 | 
					 | 
				
			||||||
    // associate image list with a control
 | 
					 | 
				
			||||||
  void SetImageList(wxImageList* imageList);
 | 
					 | 
				
			||||||
  void AssignImageList(wxImageList* imageList);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // sets/returns item's image index in the current image list
 | 
					    // sets/returns item's image index in the current image list
 | 
				
			||||||
  int  GetPageImage(int nPage) const;
 | 
					  int  GetPageImage(int nPage) const;
 | 
				
			||||||
  bool SetPageImage(int nPage, int nImage);
 | 
					  bool SetPageImage(int nPage, int nImage);
 | 
				
			||||||
@@ -91,10 +85,6 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // adds a new page to the notebook (it will be deleted ny the notebook,
 | 
					    // adds a new page to the notebook (it will be deleted ny the notebook,
 | 
				
			||||||
    // don't delete it yourself). If bSelect, this page becomes active.
 | 
					    // don't delete it yourself). If bSelect, this page becomes active.
 | 
				
			||||||
    bool AddPage( wxNotebookPage *win,
 | 
					 | 
				
			||||||
                  const wxString& strText,
 | 
					 | 
				
			||||||
                  bool select = FALSE,
 | 
					 | 
				
			||||||
                  int imageId = -1 );
 | 
					 | 
				
			||||||
    // the same as AddPage(), but adds it at the specified position
 | 
					    // the same as AddPage(), but adds it at the specified position
 | 
				
			||||||
    bool InsertPage( int position,
 | 
					    bool InsertPage( int position,
 | 
				
			||||||
                     wxNotebookPage *win,
 | 
					                     wxNotebookPage *win,
 | 
				
			||||||
@@ -125,12 +115,12 @@ public:
 | 
				
			|||||||
    // helper function
 | 
					    // helper function
 | 
				
			||||||
    wxGtkNotebookPage* GetNotebookPage(int page) const;
 | 
					    wxGtkNotebookPage* GetNotebookPage(int page) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool            m_ownsImageList;
 | 
					    // the additional page data (the pages themselves are in m_pages array)
 | 
				
			||||||
    wxList          m_pages;
 | 
					    wxGtkNotebookPagesList m_pagesData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // for reasons explained in gtk/notebook.cpp we store the current
 | 
					    // for reasons explained in gtk/notebook.cpp we store the current
 | 
				
			||||||
    // selection internally instead of querying the notebook for it
 | 
					    // selection internally instead of querying the notebook for it
 | 
				
			||||||
    int             m_selection;
 | 
					    int m_selection;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
    // remove one page from the notebook but do not destroy it
 | 
					    // remove one page from the notebook but do not destroy it
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,6 +21,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class wxGtkNotebookPage;
 | 
					class wxGtkNotebookPage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wx/list.h"
 | 
				
			||||||
 | 
					WX_DECLARE_LIST(wxGtkNotebookPage, wxGtkNotebookPagesList);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
// wxNotebook
 | 
					// wxNotebook
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
@@ -45,7 +48,7 @@ public:
 | 
				
			|||||||
              long style = 0,
 | 
					              long style = 0,
 | 
				
			||||||
              const wxString& name = "notebook");
 | 
					              const wxString& name = "notebook");
 | 
				
			||||||
      // dtor
 | 
					      // dtor
 | 
				
			||||||
    ~wxNotebook();
 | 
					    virtual ~wxNotebook();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // accessors
 | 
					  // accessors
 | 
				
			||||||
  // ---------
 | 
					  // ---------
 | 
				
			||||||
@@ -61,15 +64,6 @@ public:
 | 
				
			|||||||
  bool SetPageText(int nPage, const wxString& strText);
 | 
					  bool SetPageText(int nPage, const wxString& strText);
 | 
				
			||||||
  wxString GetPageText(int nPage) const;
 | 
					  wxString GetPageText(int nPage) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // image list stuff: each page may have an image associated with it. All
 | 
					 | 
				
			||||||
  // the images belong to an image list, so you have to
 | 
					 | 
				
			||||||
  // 1) create an image list
 | 
					 | 
				
			||||||
  // 2) associate it with the notebook
 | 
					 | 
				
			||||||
  // 3) set for each page it's image
 | 
					 | 
				
			||||||
    // associate image list with a control
 | 
					 | 
				
			||||||
  void SetImageList(wxImageList* imageList);
 | 
					 | 
				
			||||||
  void AssignImageList(wxImageList* imageList);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // sets/returns item's image index in the current image list
 | 
					    // sets/returns item's image index in the current image list
 | 
				
			||||||
  int  GetPageImage(int nPage) const;
 | 
					  int  GetPageImage(int nPage) const;
 | 
				
			||||||
  bool SetPageImage(int nPage, int nImage);
 | 
					  bool SetPageImage(int nPage, int nImage);
 | 
				
			||||||
@@ -91,10 +85,6 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // adds a new page to the notebook (it will be deleted ny the notebook,
 | 
					    // adds a new page to the notebook (it will be deleted ny the notebook,
 | 
				
			||||||
    // don't delete it yourself). If bSelect, this page becomes active.
 | 
					    // don't delete it yourself). If bSelect, this page becomes active.
 | 
				
			||||||
    bool AddPage( wxNotebookPage *win,
 | 
					 | 
				
			||||||
                  const wxString& strText,
 | 
					 | 
				
			||||||
                  bool select = FALSE,
 | 
					 | 
				
			||||||
                  int imageId = -1 );
 | 
					 | 
				
			||||||
    // the same as AddPage(), but adds it at the specified position
 | 
					    // the same as AddPage(), but adds it at the specified position
 | 
				
			||||||
    bool InsertPage( int position,
 | 
					    bool InsertPage( int position,
 | 
				
			||||||
                     wxNotebookPage *win,
 | 
					                     wxNotebookPage *win,
 | 
				
			||||||
@@ -125,12 +115,12 @@ public:
 | 
				
			|||||||
    // helper function
 | 
					    // helper function
 | 
				
			||||||
    wxGtkNotebookPage* GetNotebookPage(int page) const;
 | 
					    wxGtkNotebookPage* GetNotebookPage(int page) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool            m_ownsImageList;
 | 
					    // the additional page data (the pages themselves are in m_pages array)
 | 
				
			||||||
    wxList          m_pages;
 | 
					    wxGtkNotebookPagesList m_pagesData;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // for reasons explained in gtk/notebook.cpp we store the current
 | 
					    // for reasons explained in gtk/notebook.cpp we store the current
 | 
				
			||||||
    // selection internally instead of querying the notebook for it
 | 
					    // selection internally instead of querying the notebook for it
 | 
				
			||||||
    int             m_selection;
 | 
					    int m_selection;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
    // remove one page from the notebook but do not destroy it
 | 
					    // remove one page from the notebook but do not destroy it
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,8 +48,6 @@ public:
 | 
				
			|||||||
              const wxSize& size = wxDefaultSize,
 | 
					              const wxSize& size = wxDefaultSize,
 | 
				
			||||||
              long style = 0,
 | 
					              long style = 0,
 | 
				
			||||||
              const wxString& name = "notebook");
 | 
					              const wxString& name = "notebook");
 | 
				
			||||||
    // dtor
 | 
					 | 
				
			||||||
  ~wxNotebook();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // accessors
 | 
					  // accessors
 | 
				
			||||||
  // ---------
 | 
					  // ---------
 | 
				
			||||||
@@ -74,7 +72,6 @@ public:
 | 
				
			|||||||
  // 3) set for each page it's image
 | 
					  // 3) set for each page it's image
 | 
				
			||||||
    // associate image list with a control
 | 
					    // associate image list with a control
 | 
				
			||||||
  void SetImageList(wxImageList* imageList);
 | 
					  void SetImageList(wxImageList* imageList);
 | 
				
			||||||
  void AssignImageList(wxImageList* imageList);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // sets/returns item's image index in the current image list
 | 
					    // sets/returns item's image index in the current image list
 | 
				
			||||||
  int  GetPageImage(int nPage) const;
 | 
					  int  GetPageImage(int nPage) const;
 | 
				
			||||||
@@ -136,8 +133,6 @@ protected:
 | 
				
			|||||||
  // helper functions
 | 
					  // helper functions
 | 
				
			||||||
  void ChangePage(int nOldSel, int nSel); // change pages
 | 
					  void ChangePage(int nOldSel, int nSel); // change pages
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  bool m_bOwnsImageList;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  int m_nSelection;           // the current selection (-1 if none)
 | 
					  int m_nSelection;           // the current selection (-1 if none)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  DECLARE_DYNAMIC_CLASS(wxNotebook)
 | 
					  DECLARE_DYNAMIC_CLASS(wxNotebook)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,6 +12,10 @@
 | 
				
			|||||||
#ifndef _WX_NOTEBOOK_H_BASE_
 | 
					#ifndef _WX_NOTEBOOK_H_BASE_
 | 
				
			||||||
#define _WX_NOTEBOOK_H_BASE_
 | 
					#define _WX_NOTEBOOK_H_BASE_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __GNUG__
 | 
				
			||||||
 | 
					    #pragma interface "notebookbase.h"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
// headers
 | 
					// headers
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
@@ -46,7 +50,7 @@ public:
 | 
				
			|||||||
    // ctor
 | 
					    // ctor
 | 
				
			||||||
    wxNotebookBase()
 | 
					    wxNotebookBase()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        m_imageList = NULL;
 | 
					        Init();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // quasi ctor
 | 
					    // quasi ctor
 | 
				
			||||||
@@ -57,6 +61,9 @@ public:
 | 
				
			|||||||
                long style = 0,
 | 
					                long style = 0,
 | 
				
			||||||
                const wxString& name = wxNOTEBOOK_NAME);
 | 
					                const wxString& name = wxNOTEBOOK_NAME);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // dtor
 | 
				
			||||||
 | 
					    virtual ~wxNotebookBase();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // accessors
 | 
					    // accessors
 | 
				
			||||||
    // ---------
 | 
					    // ---------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -75,10 +82,10 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // image list stuff: each page may have an image associated with it (all
 | 
					    // image list stuff: each page may have an image associated with it (all
 | 
				
			||||||
    // images belong to the same image list)
 | 
					    // images belong to the same image list)
 | 
				
			||||||
    virtual void SetImageList(wxImageList* imageList)
 | 
					    virtual void SetImageList(wxImageList* imageList);
 | 
				
			||||||
    {
 | 
					
 | 
				
			||||||
        m_imageList = imageList;
 | 
					    // as SetImageList() but we will delete the image list ourselves
 | 
				
			||||||
    }
 | 
					    void AssignImageList(wxImageList* imageList);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // get pointer (may be NULL) to the associated image list
 | 
					    // get pointer (may be NULL) to the associated image list
 | 
				
			||||||
    wxImageList* GetImageList() const { return m_imageList; }
 | 
					    wxImageList* GetImageList() const { return m_imageList; }
 | 
				
			||||||
@@ -101,33 +108,13 @@ public:
 | 
				
			|||||||
    virtual void SetTabSize(const wxSize& sz) = 0;
 | 
					    virtual void SetTabSize(const wxSize& sz) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // calculate the size of the notebook from the size of its page
 | 
					    // calculate the size of the notebook from the size of its page
 | 
				
			||||||
    virtual wxSize CalcSizeFromPage(const wxSize& sizePage)
 | 
					    virtual wxSize CalcSizeFromPage(const wxSize& sizePage);
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        // this was just taken from wxNotebookSizer::CalcMin() and is, of
 | 
					 | 
				
			||||||
        // course, totally bogus - just like the original code was
 | 
					 | 
				
			||||||
        wxSize sizeTotal = sizePage;
 | 
					 | 
				
			||||||
        if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
 | 
					 | 
				
			||||||
            sizeTotal.x += 90;
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            sizeTotal.y += 40;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        return sizeTotal;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // operations
 | 
					    // operations
 | 
				
			||||||
    // ----------
 | 
					    // ----------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // remove one page from the notebook and delete it
 | 
					    // remove one page from the notebook and delete it
 | 
				
			||||||
    virtual bool DeletePage(int nPage)
 | 
					    virtual bool DeletePage(int nPage);
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        wxNotebookPage *page = DoRemovePage(nPage);
 | 
					 | 
				
			||||||
        if ( !page )
 | 
					 | 
				
			||||||
            return FALSE;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        delete page;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        return TRUE;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // remove one page from the notebook, without deleting it
 | 
					    // remove one page from the notebook, without deleting it
 | 
				
			||||||
    virtual bool RemovePage(int nPage) { return DoRemovePage(nPage) != NULL; }
 | 
					    virtual bool RemovePage(int nPage) { return DoRemovePage(nPage) != NULL; }
 | 
				
			||||||
@@ -170,32 +157,15 @@ protected:
 | 
				
			|||||||
    // remove the page and return a pointer to it
 | 
					    // remove the page and return a pointer to it
 | 
				
			||||||
    virtual wxNotebookPage *DoRemovePage(int page) = 0;
 | 
					    virtual wxNotebookPage *DoRemovePage(int page) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // common part of all ctors
 | 
				
			||||||
 | 
					    void Init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // get the next page wrapping if we reached the end
 | 
					    // get the next page wrapping if we reached the end
 | 
				
			||||||
    int GetNextPage(bool forward) const
 | 
					    int GetNextPage(bool forward) const;
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        int nPage;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        int nMax = GetPageCount();
 | 
					    wxArrayPages  m_pages;      // array of pages
 | 
				
			||||||
        if ( nMax-- ) // decrement it to get the last valid index
 | 
					    wxImageList  *m_imageList;  // we can have an associated image list
 | 
				
			||||||
        {
 | 
					    bool m_ownsImageList;       // true if we must delete m_imageList
 | 
				
			||||||
            int nSel = GetSelection();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            // change selection wrapping if it becomes invalid
 | 
					 | 
				
			||||||
            nPage = forward ? nSel == nMax ? 0
 | 
					 | 
				
			||||||
                                           : nSel + 1
 | 
					 | 
				
			||||||
                            : nSel == 0 ? nMax
 | 
					 | 
				
			||||||
                                        : nSel - 1;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        else // notebook is empty, no next page
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            nPage = -1;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        return nPage;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    wxImageList  *m_imageList; // we can have an associated image list
 | 
					 | 
				
			||||||
    wxArrayPages  m_pages;     // array of pages
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										140
									
								
								src/common/nbkbase.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										140
									
								
								src/common/nbkbase.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,140 @@
 | 
				
			|||||||
 | 
					///////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					// Name:        src/common/nbkbase.cpp
 | 
				
			||||||
 | 
					// Purpose:     common wxNotebook methods
 | 
				
			||||||
 | 
					// Author:      Vadim Zeitlin
 | 
				
			||||||
 | 
					// Modified by:
 | 
				
			||||||
 | 
					// Created:     02.07.01
 | 
				
			||||||
 | 
					// RCS-ID:      $Id$
 | 
				
			||||||
 | 
					// Copyright:   (c) 2001 Vadim Zeitlin
 | 
				
			||||||
 | 
					// Licence:     wxWindows licence
 | 
				
			||||||
 | 
					///////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ============================================================================
 | 
				
			||||||
 | 
					// declarations
 | 
				
			||||||
 | 
					// ============================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// headers
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __GNUG__
 | 
				
			||||||
 | 
					    #pragma implementation "notebookbase.h"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// For compilers that support precompilation, includes "wx.h".
 | 
				
			||||||
 | 
					#include "wx/wxprec.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __BORLANDC__
 | 
				
			||||||
 | 
					    #pragma hdrstop
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if wxUSE_NOTEBOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef WX_PRECOMP
 | 
				
			||||||
 | 
					    #include "wx/notebook.h"
 | 
				
			||||||
 | 
					    #include "wx/imaglist.h"
 | 
				
			||||||
 | 
					#endif //WX_PRECOMP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ============================================================================
 | 
				
			||||||
 | 
					// implementation
 | 
				
			||||||
 | 
					// ============================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// constructors and destructors
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxNotebookBase::Init()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    m_imageList = NULL;
 | 
				
			||||||
 | 
					    m_ownsImageList = FALSE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxNotebookBase::~wxNotebookBase()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if ( m_ownsImageList )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        // may be NULL, ok
 | 
				
			||||||
 | 
					        delete m_imageList;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// image list
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxNotebookBase::SetImageList(wxImageList* imageList)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if ( m_ownsImageList )
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        // may be NULL, ok
 | 
				
			||||||
 | 
					        delete m_imageList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        m_ownsImageList = FALSE;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    m_imageList = imageList;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wxNotebookBase::AssignImageList(wxImageList* imageList)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    SetImageList(imageList);
 | 
				
			||||||
 | 
					    m_ownsImageList = TRUE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// geometry
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    // this was just taken from wxNotebookSizer::CalcMin() and is, of
 | 
				
			||||||
 | 
					    // course, totally bogus - just like the original code was
 | 
				
			||||||
 | 
					    wxSize sizeTotal = sizePage;
 | 
				
			||||||
 | 
					    if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
 | 
				
			||||||
 | 
					        sizeTotal.x += 90;
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        sizeTotal.y += 40;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return sizeTotal;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					// pages management
 | 
				
			||||||
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool wxNotebookBase::DeletePage(int nPage)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    wxNotebookPage *page = DoRemovePage(nPage);
 | 
				
			||||||
 | 
					    if ( !page )
 | 
				
			||||||
 | 
					        return FALSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    delete page;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return TRUE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int wxNotebookBase::GetNextPage(bool forward) const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    int nPage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    int nMax = GetPageCount();
 | 
				
			||||||
 | 
					    if ( nMax-- ) // decrement it to get the last valid index
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        int nSel = GetSelection();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // change selection wrapping if it becomes invalid
 | 
				
			||||||
 | 
					        nPage = forward ? nSel == nMax ? 0
 | 
				
			||||||
 | 
					                                       : nSel + 1
 | 
				
			||||||
 | 
					                        : nSel == 0 ? nMax
 | 
				
			||||||
 | 
					                                    : nSel - 1;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else // notebook is empty, no next page
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        nPage = -1;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return nPage;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // wxUSE_NOTEBOOK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T!
 | 
				
			||||||
ALL_SOURCES = \
 | 
					ALL_SOURCES = \
 | 
				
			||||||
		common/init.cpp \
 | 
							common/init.cpp \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 | 
				
			||||||
ALL_SOURCES = \
 | 
					ALL_SOURCES = \
 | 
				
			||||||
		generic/accel.cpp \
 | 
							generic/accel.cpp \
 | 
				
			||||||
@@ -114,6 +114,7 @@ ALL_SOURCES = \
 | 
				
			|||||||
		common/mimecmn.cpp \
 | 
							common/mimecmn.cpp \
 | 
				
			||||||
		common/module.cpp \
 | 
							common/module.cpp \
 | 
				
			||||||
		common/mstream.cpp \
 | 
							common/mstream.cpp \
 | 
				
			||||||
 | 
							common/nbkbase.cpp \
 | 
				
			||||||
		common/object.cpp \
 | 
							common/object.cpp \
 | 
				
			||||||
		common/objstrm.cpp \
 | 
							common/objstrm.cpp \
 | 
				
			||||||
		common/paper.cpp \
 | 
							common/paper.cpp \
 | 
				
			||||||
@@ -656,6 +657,7 @@ COMMONOBJS = \
 | 
				
			|||||||
		mimecmn.o \
 | 
							mimecmn.o \
 | 
				
			||||||
		module.o \
 | 
							module.o \
 | 
				
			||||||
		mstream.o \
 | 
							mstream.o \
 | 
				
			||||||
 | 
							nbkbase.o \
 | 
				
			||||||
		object.o \
 | 
							object.o \
 | 
				
			||||||
		objstrm.o \
 | 
							objstrm.o \
 | 
				
			||||||
		paper.o \
 | 
							paper.o \
 | 
				
			||||||
@@ -770,6 +772,7 @@ COMMONDEPS = \
 | 
				
			|||||||
		mimecmn.d \
 | 
							mimecmn.d \
 | 
				
			||||||
		module.d \
 | 
							module.d \
 | 
				
			||||||
		mstream.d \
 | 
							mstream.d \
 | 
				
			||||||
 | 
							nbkbase.d \
 | 
				
			||||||
		object.d \
 | 
							object.d \
 | 
				
			||||||
		objstrm.d \
 | 
							objstrm.d \
 | 
				
			||||||
		paper.d \
 | 
							paper.d \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ extern bool g_isIdle;
 | 
				
			|||||||
// data
 | 
					// data
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern bool   g_blockEventsOnDrag;
 | 
					extern bool g_blockEventsOnDrag;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
// debug
 | 
					// debug
 | 
				
			||||||
@@ -60,15 +60,20 @@ extern void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar
 | 
				
			|||||||
// wxGtkNotebookPage
 | 
					// wxGtkNotebookPage
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// VZ: this is rather ugly as we keep the pages themselves in an array (it
 | 
				
			||||||
 | 
					//     allows us to have quite a few functions implemented in the base class)
 | 
				
			||||||
 | 
					//     but the page data is kept in a separate list, so we must maintain them
 | 
				
			||||||
 | 
					//     in sync manually... of course, the list had been there before the base
 | 
				
			||||||
 | 
					//     class which explains it but it still would be nice to do something
 | 
				
			||||||
 | 
					//     about this one day
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class wxGtkNotebookPage: public wxObject
 | 
					class wxGtkNotebookPage: public wxObject
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
  wxGtkNotebookPage()
 | 
					  wxGtkNotebookPage()
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    m_text = "";
 | 
					 | 
				
			||||||
    m_image = -1;
 | 
					    m_image = -1;
 | 
				
			||||||
    m_page = (GtkNotebookPage *) NULL;
 | 
					    m_page = (GtkNotebookPage *) NULL;
 | 
				
			||||||
    m_client = (wxNotebookPage *) NULL;
 | 
					 | 
				
			||||||
    m_box = (GtkWidget *) NULL;
 | 
					    m_box = (GtkWidget *) NULL;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -76,10 +81,12 @@ public:
 | 
				
			|||||||
  int                m_image;
 | 
					  int                m_image;
 | 
				
			||||||
  GtkNotebookPage   *m_page;
 | 
					  GtkNotebookPage   *m_page;
 | 
				
			||||||
  GtkLabel          *m_label;
 | 
					  GtkLabel          *m_label;
 | 
				
			||||||
  wxNotebookPage    *m_client;
 | 
					 | 
				
			||||||
  GtkWidget         *m_box;     // in which the label and image are packed
 | 
					  GtkWidget         *m_box;     // in which the label and image are packed
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wx/listimpl.cpp"
 | 
				
			||||||
 | 
					WX_DEFINE_LIST(wxGtkNotebookPagesList);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
// "switch_page"
 | 
					// "switch_page"
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
@@ -192,10 +199,9 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
 | 
				
			|||||||
    /* win is a control: tab can be propagated up */
 | 
					    /* win is a control: tab can be propagated up */
 | 
				
			||||||
    if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab))
 | 
					    if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        wxNode *node = win->m_pages.Nth( win->GetSelection() );
 | 
					        int sel = win->GetSelection();
 | 
				
			||||||
        if (!node) return FALSE;
 | 
					        wxGtkNotebookPage *page = win->GetNotebookPage(sel);
 | 
				
			||||||
 | 
					        wxCHECK_MSG( page, FALSE, _T("invalid selection in wxNotebook") );
 | 
				
			||||||
        wxGtkNotebookPage *page = (wxGtkNotebookPage*) node->Data();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        wxNavigationKeyEvent event;
 | 
					        wxNavigationKeyEvent event;
 | 
				
			||||||
        event.SetEventObject( win );
 | 
					        event.SetEventObject( win );
 | 
				
			||||||
@@ -204,9 +210,11 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
 | 
				
			|||||||
        /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
 | 
					        /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
 | 
				
			||||||
        event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
 | 
					        event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
 | 
				
			||||||
        event.SetCurrentFocus( win );
 | 
					        event.SetCurrentFocus( win );
 | 
				
			||||||
        if (!page->m_client->GetEventHandler()->ProcessEvent( event ))
 | 
					
 | 
				
			||||||
 | 
					        wxNotebookPage *client = win->GetPage(sel);
 | 
				
			||||||
 | 
					        if ( !client->GetEventHandler()->ProcessEvent( event ) )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
             page->m_client->SetFocus();
 | 
					             client->SetFocus();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" );
 | 
					        gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" );
 | 
				
			||||||
@@ -238,8 +246,7 @@ END_EVENT_TABLE()
 | 
				
			|||||||
void wxNotebook::Init()
 | 
					void wxNotebook::Init()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    m_imageList = (wxImageList *) NULL;
 | 
					    m_imageList = (wxImageList *) NULL;
 | 
				
			||||||
    m_ownsImageList = FALSE;
 | 
					    m_pagesData.DeleteContents( TRUE );
 | 
				
			||||||
    m_pages.DeleteContents( TRUE );
 | 
					 | 
				
			||||||
    m_selection = -1;
 | 
					    m_selection = -1;
 | 
				
			||||||
    m_themeEnabled = TRUE;
 | 
					    m_themeEnabled = TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -264,12 +271,11 @@ wxNotebook::~wxNotebook()
 | 
				
			|||||||
      GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
 | 
					      GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    DeleteAllPages();
 | 
					    DeleteAllPages();
 | 
				
			||||||
    if (m_ownsImageList) delete m_imageList;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
 | 
					bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
 | 
				
			||||||
      const wxPoint& pos, const wxSize& size,
 | 
					                        const wxPoint& pos, const wxSize& size,
 | 
				
			||||||
      long style, const wxString& name )
 | 
					                        long style, const wxString& name )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    m_needParent = TRUE;
 | 
					    m_needParent = TRUE;
 | 
				
			||||||
    m_acceptsFocus = TRUE;
 | 
					    m_acceptsFocus = TRUE;
 | 
				
			||||||
@@ -368,45 +374,30 @@ wxGtkNotebookPage* wxNotebook::GetNotebookPage( int page ) const
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, (wxGtkNotebookPage*) NULL, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, (wxGtkNotebookPage*) NULL, wxT("invalid notebook") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxCHECK_MSG( page < (int)m_pages.GetCount(), (wxGtkNotebookPage*) NULL, wxT("invalid notebook index") );
 | 
					    wxCHECK_MSG( page < (int)m_pagesData.GetCount(), (wxGtkNotebookPage*) NULL, wxT("invalid notebook index") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxNode *node = m_pages.Nth( page );
 | 
					    return m_pagesData.Item(page)->GetData();
 | 
				
			||||||
 | 
					 | 
				
			||||||
    return (wxGtkNotebookPage *) node->Data();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int wxNotebook::SetSelection( int page )
 | 
					int wxNotebook::SetSelection( int page )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxCHECK_MSG( page < (int)m_pages.GetCount(), -1, wxT("invalid notebook index") );
 | 
					    wxCHECK_MSG( page < (int)m_pagesData.GetCount(), -1, wxT("invalid notebook index") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int selOld = GetSelection();
 | 
					    int selOld = GetSelection();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // cache the selection
 | 
					    // cache the selection
 | 
				
			||||||
    m_selection = page;
 | 
					    m_selection = page;
 | 
				
			||||||
    gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page );
 | 
					    gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page );
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    wxGtkNotebookPage* g_page = GetNotebookPage( page );
 | 
					    wxNotebookPage *client = GetPage(page);
 | 
				
			||||||
    if (g_page->m_client) 
 | 
					    if ( client )
 | 
				
			||||||
        g_page->m_client->SetFocus();
 | 
					        client->SetFocus();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return selOld;
 | 
					    return selOld;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxNotebook::SetImageList( wxImageList* imageList )
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    if (m_ownsImageList) delete m_imageList;
 | 
					 | 
				
			||||||
    m_imageList = imageList;
 | 
					 | 
				
			||||||
    m_ownsImageList = FALSE;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void wxNotebook::AssignImageList( wxImageList* imageList )
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    SetImageList(imageList);
 | 
					 | 
				
			||||||
    m_ownsImageList = TRUE;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
bool wxNotebook::SetPageText( int page, const wxString &text )
 | 
					bool wxNotebook::SetPageText( int page, const wxString &text )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
				
			||||||
@@ -526,8 +517,10 @@ bool wxNotebook::DeleteAllPages()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while (m_pages.GetCount() > 0)
 | 
					    while (m_pagesData.GetCount() > 0)
 | 
				
			||||||
        DeletePage( m_pages.GetCount()-1 );
 | 
					        DeletePage( m_pagesData.GetCount()-1 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    wxASSERT_MSG( GetPageCount() == 0, _T("all pages must have been deleted") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -542,17 +535,16 @@ bool wxNotebook::DeletePage( int page )
 | 
				
			|||||||
    if ( m_selection == -1 )
 | 
					    if ( m_selection == -1 )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        m_selection = GetSelection();
 | 
					        m_selection = GetSelection();
 | 
				
			||||||
        if ( m_selection == (int)m_pages.GetCount() - 1 )
 | 
					        if ( m_selection == (int)m_pagesData.GetCount() - 1 )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // the index will become invalid after the page is deleted
 | 
					            // the index will become invalid after the page is deleted
 | 
				
			||||||
            m_selection = -1;
 | 
					            m_selection = -1;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nb_page->m_client->Destroy();
 | 
					    m_pagesData.DeleteObject( nb_page );
 | 
				
			||||||
    m_pages.DeleteObject( nb_page );
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return wxNotebookBase::DeletePage(page);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxNotebookPage *wxNotebook::DoRemovePage( int page )
 | 
					wxNotebookPage *wxNotebook::DoRemovePage( int page )
 | 
				
			||||||
@@ -561,26 +553,32 @@ wxNotebookPage *wxNotebook::DoRemovePage( int page )
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    wxCHECK_MSG( nb_page, NULL, _T("wxNotebook::RemovePage: invalid page") );
 | 
					    wxCHECK_MSG( nb_page, NULL, _T("wxNotebook::RemovePage: invalid page") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gtk_widget_ref( nb_page->m_client->m_widget );
 | 
					    wxNotebookPage *client = GetPage(page);
 | 
				
			||||||
    gtk_widget_unrealize( nb_page->m_client->m_widget );
 | 
					    gtk_widget_ref( client->m_widget );
 | 
				
			||||||
    gtk_widget_unparent( nb_page->m_client->m_widget );
 | 
					    gtk_widget_unrealize( client->m_widget );
 | 
				
			||||||
        
 | 
					    gtk_widget_unparent( client->m_widget );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page );
 | 
					    gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxNotebookPage *pageRemoved = (wxNotebookPage *)m_pages[page];
 | 
					    m_pagesData.DeleteObject( nb_page );
 | 
				
			||||||
    m_pages.DeleteObject( nb_page );
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return pageRemoved;
 | 
					    return client;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxNotebook::InsertPage( int position, wxNotebookPage* win, const wxString& text,
 | 
					bool wxNotebook::InsertPage( int position,
 | 
				
			||||||
                             bool select, int imageId )
 | 
					                             wxNotebookPage* win,
 | 
				
			||||||
 | 
					                             const wxString& text,
 | 
				
			||||||
 | 
					                             bool select,
 | 
				
			||||||
 | 
					                             int imageId )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxCHECK_MSG( win->GetParent() == this, FALSE,
 | 
					    wxCHECK_MSG( win->GetParent() == this, FALSE,
 | 
				
			||||||
               wxT("Can't add a page whose parent is not the notebook!") );
 | 
					               wxT("Can't add a page whose parent is not the notebook!") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    wxCHECK_MSG( position >= 0 && position <= GetPageCount(), FALSE,
 | 
				
			||||||
 | 
					                 _T("invalid page index in wxNotebookPage::InsertPage()") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* don't receive switch page during addition */
 | 
					    /* don't receive switch page during addition */
 | 
				
			||||||
    gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget),
 | 
					    gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget),
 | 
				
			||||||
      GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
 | 
					      GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
 | 
				
			||||||
@@ -592,12 +590,12 @@ bool wxNotebook::InsertPage( int position, wxNotebookPage* win, const wxString&
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    wxGtkNotebookPage *page = new wxGtkNotebookPage();
 | 
					    wxGtkNotebookPage *page = new wxGtkNotebookPage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (position < 0)
 | 
					    if ( position == GetPageCount() )
 | 
				
			||||||
        m_pages.Append( page );
 | 
					        m_pagesData.Append( page );
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        m_pages.Insert( m_pages.Nth( position ), page );
 | 
					        m_pagesData.Insert( m_pagesData.Item( position ), page );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    page->m_client = win;
 | 
					    m_pages.Insert(win, position);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    page->m_box = gtk_hbox_new( FALSE, 0 );
 | 
					    page->m_box = gtk_hbox_new( FALSE, 0 );
 | 
				
			||||||
    gtk_container_border_width( GTK_CONTAINER(page->m_box), 2 );
 | 
					    gtk_container_border_width( GTK_CONTAINER(page->m_box), 2 );
 | 
				
			||||||
@@ -644,7 +642,7 @@ bool wxNotebook::InsertPage( int position, wxNotebookPage* win, const wxString&
 | 
				
			|||||||
    /* show the label */
 | 
					    /* show the label */
 | 
				
			||||||
    gtk_widget_show( GTK_WIDGET(page->m_label) );
 | 
					    gtk_widget_show( GTK_WIDGET(page->m_label) );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (select && (m_pages.GetCount() > 1))
 | 
					    if (select && (m_pagesData.GetCount() > 1))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (position < 0)
 | 
					        if (position < 0)
 | 
				
			||||||
            SetSelection( GetPageCount()-1 );
 | 
					            SetSelection( GetPageCount()-1 );
 | 
				
			||||||
@@ -658,12 +656,6 @@ bool wxNotebook::InsertPage( int position, wxNotebookPage* win, const wxString&
 | 
				
			|||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxNotebook::AddPage(wxNotebookPage* win, const wxString& text,
 | 
					 | 
				
			||||||
                         bool select, int imageId)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    return InsertPage( -1, win, text, select, imageId );
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
 | 
					void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (event.IsWindowChange())
 | 
					    if (event.IsWindowChange())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 | 
				
			||||||
ALL_SOURCES = \
 | 
					ALL_SOURCES = \
 | 
				
			||||||
		generic/accel.cpp \
 | 
							generic/accel.cpp \
 | 
				
			||||||
@@ -114,6 +114,7 @@ ALL_SOURCES = \
 | 
				
			|||||||
		common/mimecmn.cpp \
 | 
							common/mimecmn.cpp \
 | 
				
			||||||
		common/module.cpp \
 | 
							common/module.cpp \
 | 
				
			||||||
		common/mstream.cpp \
 | 
							common/mstream.cpp \
 | 
				
			||||||
 | 
							common/nbkbase.cpp \
 | 
				
			||||||
		common/object.cpp \
 | 
							common/object.cpp \
 | 
				
			||||||
		common/objstrm.cpp \
 | 
							common/objstrm.cpp \
 | 
				
			||||||
		common/paper.cpp \
 | 
							common/paper.cpp \
 | 
				
			||||||
@@ -656,6 +657,7 @@ COMMONOBJS = \
 | 
				
			|||||||
		mimecmn.o \
 | 
							mimecmn.o \
 | 
				
			||||||
		module.o \
 | 
							module.o \
 | 
				
			||||||
		mstream.o \
 | 
							mstream.o \
 | 
				
			||||||
 | 
							nbkbase.o \
 | 
				
			||||||
		object.o \
 | 
							object.o \
 | 
				
			||||||
		objstrm.o \
 | 
							objstrm.o \
 | 
				
			||||||
		paper.o \
 | 
							paper.o \
 | 
				
			||||||
@@ -770,6 +772,7 @@ COMMONDEPS = \
 | 
				
			|||||||
		mimecmn.d \
 | 
							mimecmn.d \
 | 
				
			||||||
		module.d \
 | 
							module.d \
 | 
				
			||||||
		mstream.d \
 | 
							mstream.d \
 | 
				
			||||||
 | 
							nbkbase.d \
 | 
				
			||||||
		object.d \
 | 
							object.d \
 | 
				
			||||||
		objstrm.d \
 | 
							objstrm.d \
 | 
				
			||||||
		paper.d \
 | 
							paper.d \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ extern bool g_isIdle;
 | 
				
			|||||||
// data
 | 
					// data
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern bool   g_blockEventsOnDrag;
 | 
					extern bool g_blockEventsOnDrag;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
// debug
 | 
					// debug
 | 
				
			||||||
@@ -60,15 +60,20 @@ extern void debug_focus_in( GtkWidget* widget, const wxChar* name, const wxChar
 | 
				
			|||||||
// wxGtkNotebookPage
 | 
					// wxGtkNotebookPage
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// VZ: this is rather ugly as we keep the pages themselves in an array (it
 | 
				
			||||||
 | 
					//     allows us to have quite a few functions implemented in the base class)
 | 
				
			||||||
 | 
					//     but the page data is kept in a separate list, so we must maintain them
 | 
				
			||||||
 | 
					//     in sync manually... of course, the list had been there before the base
 | 
				
			||||||
 | 
					//     class which explains it but it still would be nice to do something
 | 
				
			||||||
 | 
					//     about this one day
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class wxGtkNotebookPage: public wxObject
 | 
					class wxGtkNotebookPage: public wxObject
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
  wxGtkNotebookPage()
 | 
					  wxGtkNotebookPage()
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    m_text = "";
 | 
					 | 
				
			||||||
    m_image = -1;
 | 
					    m_image = -1;
 | 
				
			||||||
    m_page = (GtkNotebookPage *) NULL;
 | 
					    m_page = (GtkNotebookPage *) NULL;
 | 
				
			||||||
    m_client = (wxNotebookPage *) NULL;
 | 
					 | 
				
			||||||
    m_box = (GtkWidget *) NULL;
 | 
					    m_box = (GtkWidget *) NULL;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -76,10 +81,12 @@ public:
 | 
				
			|||||||
  int                m_image;
 | 
					  int                m_image;
 | 
				
			||||||
  GtkNotebookPage   *m_page;
 | 
					  GtkNotebookPage   *m_page;
 | 
				
			||||||
  GtkLabel          *m_label;
 | 
					  GtkLabel          *m_label;
 | 
				
			||||||
  wxNotebookPage    *m_client;
 | 
					 | 
				
			||||||
  GtkWidget         *m_box;     // in which the label and image are packed
 | 
					  GtkWidget         *m_box;     // in which the label and image are packed
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wx/listimpl.cpp"
 | 
				
			||||||
 | 
					WX_DEFINE_LIST(wxGtkNotebookPagesList);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
// "switch_page"
 | 
					// "switch_page"
 | 
				
			||||||
//-----------------------------------------------------------------------------
 | 
					//-----------------------------------------------------------------------------
 | 
				
			||||||
@@ -192,10 +199,9 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
 | 
				
			|||||||
    /* win is a control: tab can be propagated up */
 | 
					    /* win is a control: tab can be propagated up */
 | 
				
			||||||
    if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab))
 | 
					    if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        wxNode *node = win->m_pages.Nth( win->GetSelection() );
 | 
					        int sel = win->GetSelection();
 | 
				
			||||||
        if (!node) return FALSE;
 | 
					        wxGtkNotebookPage *page = win->GetNotebookPage(sel);
 | 
				
			||||||
 | 
					        wxCHECK_MSG( page, FALSE, _T("invalid selection in wxNotebook") );
 | 
				
			||||||
        wxGtkNotebookPage *page = (wxGtkNotebookPage*) node->Data();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        wxNavigationKeyEvent event;
 | 
					        wxNavigationKeyEvent event;
 | 
				
			||||||
        event.SetEventObject( win );
 | 
					        event.SetEventObject( win );
 | 
				
			||||||
@@ -204,9 +210,11 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk
 | 
				
			|||||||
        /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
 | 
					        /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
 | 
				
			||||||
        event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
 | 
					        event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
 | 
				
			||||||
        event.SetCurrentFocus( win );
 | 
					        event.SetCurrentFocus( win );
 | 
				
			||||||
        if (!page->m_client->GetEventHandler()->ProcessEvent( event ))
 | 
					
 | 
				
			||||||
 | 
					        wxNotebookPage *client = win->GetPage(sel);
 | 
				
			||||||
 | 
					        if ( !client->GetEventHandler()->ProcessEvent( event ) )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
             page->m_client->SetFocus();
 | 
					             client->SetFocus();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" );
 | 
					        gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "key_press_event" );
 | 
				
			||||||
@@ -238,8 +246,7 @@ END_EVENT_TABLE()
 | 
				
			|||||||
void wxNotebook::Init()
 | 
					void wxNotebook::Init()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    m_imageList = (wxImageList *) NULL;
 | 
					    m_imageList = (wxImageList *) NULL;
 | 
				
			||||||
    m_ownsImageList = FALSE;
 | 
					    m_pagesData.DeleteContents( TRUE );
 | 
				
			||||||
    m_pages.DeleteContents( TRUE );
 | 
					 | 
				
			||||||
    m_selection = -1;
 | 
					    m_selection = -1;
 | 
				
			||||||
    m_themeEnabled = TRUE;
 | 
					    m_themeEnabled = TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -264,12 +271,11 @@ wxNotebook::~wxNotebook()
 | 
				
			|||||||
      GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
 | 
					      GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    DeleteAllPages();
 | 
					    DeleteAllPages();
 | 
				
			||||||
    if (m_ownsImageList) delete m_imageList;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
 | 
					bool wxNotebook::Create(wxWindow *parent, wxWindowID id,
 | 
				
			||||||
      const wxPoint& pos, const wxSize& size,
 | 
					                        const wxPoint& pos, const wxSize& size,
 | 
				
			||||||
      long style, const wxString& name )
 | 
					                        long style, const wxString& name )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    m_needParent = TRUE;
 | 
					    m_needParent = TRUE;
 | 
				
			||||||
    m_acceptsFocus = TRUE;
 | 
					    m_acceptsFocus = TRUE;
 | 
				
			||||||
@@ -368,45 +374,30 @@ wxGtkNotebookPage* wxNotebook::GetNotebookPage( int page ) const
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, (wxGtkNotebookPage*) NULL, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, (wxGtkNotebookPage*) NULL, wxT("invalid notebook") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxCHECK_MSG( page < (int)m_pages.GetCount(), (wxGtkNotebookPage*) NULL, wxT("invalid notebook index") );
 | 
					    wxCHECK_MSG( page < (int)m_pagesData.GetCount(), (wxGtkNotebookPage*) NULL, wxT("invalid notebook index") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxNode *node = m_pages.Nth( page );
 | 
					    return m_pagesData.Item(page)->GetData();
 | 
				
			||||||
 | 
					 | 
				
			||||||
    return (wxGtkNotebookPage *) node->Data();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int wxNotebook::SetSelection( int page )
 | 
					int wxNotebook::SetSelection( int page )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid notebook") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxCHECK_MSG( page < (int)m_pages.GetCount(), -1, wxT("invalid notebook index") );
 | 
					    wxCHECK_MSG( page < (int)m_pagesData.GetCount(), -1, wxT("invalid notebook index") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int selOld = GetSelection();
 | 
					    int selOld = GetSelection();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // cache the selection
 | 
					    // cache the selection
 | 
				
			||||||
    m_selection = page;
 | 
					    m_selection = page;
 | 
				
			||||||
    gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page );
 | 
					    gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page );
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    wxGtkNotebookPage* g_page = GetNotebookPage( page );
 | 
					    wxNotebookPage *client = GetPage(page);
 | 
				
			||||||
    if (g_page->m_client) 
 | 
					    if ( client )
 | 
				
			||||||
        g_page->m_client->SetFocus();
 | 
					        client->SetFocus();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return selOld;
 | 
					    return selOld;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wxNotebook::SetImageList( wxImageList* imageList )
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    if (m_ownsImageList) delete m_imageList;
 | 
					 | 
				
			||||||
    m_imageList = imageList;
 | 
					 | 
				
			||||||
    m_ownsImageList = FALSE;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void wxNotebook::AssignImageList( wxImageList* imageList )
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    SetImageList(imageList);
 | 
					 | 
				
			||||||
    m_ownsImageList = TRUE;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
bool wxNotebook::SetPageText( int page, const wxString &text )
 | 
					bool wxNotebook::SetPageText( int page, const wxString &text )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
				
			||||||
@@ -526,8 +517,10 @@ bool wxNotebook::DeleteAllPages()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while (m_pages.GetCount() > 0)
 | 
					    while (m_pagesData.GetCount() > 0)
 | 
				
			||||||
        DeletePage( m_pages.GetCount()-1 );
 | 
					        DeletePage( m_pagesData.GetCount()-1 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    wxASSERT_MSG( GetPageCount() == 0, _T("all pages must have been deleted") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -542,17 +535,16 @@ bool wxNotebook::DeletePage( int page )
 | 
				
			|||||||
    if ( m_selection == -1 )
 | 
					    if ( m_selection == -1 )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        m_selection = GetSelection();
 | 
					        m_selection = GetSelection();
 | 
				
			||||||
        if ( m_selection == (int)m_pages.GetCount() - 1 )
 | 
					        if ( m_selection == (int)m_pagesData.GetCount() - 1 )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // the index will become invalid after the page is deleted
 | 
					            // the index will become invalid after the page is deleted
 | 
				
			||||||
            m_selection = -1;
 | 
					            m_selection = -1;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nb_page->m_client->Destroy();
 | 
					    m_pagesData.DeleteObject( nb_page );
 | 
				
			||||||
    m_pages.DeleteObject( nb_page );
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return wxNotebookBase::DeletePage(page);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxNotebookPage *wxNotebook::DoRemovePage( int page )
 | 
					wxNotebookPage *wxNotebook::DoRemovePage( int page )
 | 
				
			||||||
@@ -561,26 +553,32 @@ wxNotebookPage *wxNotebook::DoRemovePage( int page )
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    wxCHECK_MSG( nb_page, NULL, _T("wxNotebook::RemovePage: invalid page") );
 | 
					    wxCHECK_MSG( nb_page, NULL, _T("wxNotebook::RemovePage: invalid page") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gtk_widget_ref( nb_page->m_client->m_widget );
 | 
					    wxNotebookPage *client = GetPage(page);
 | 
				
			||||||
    gtk_widget_unrealize( nb_page->m_client->m_widget );
 | 
					    gtk_widget_ref( client->m_widget );
 | 
				
			||||||
    gtk_widget_unparent( nb_page->m_client->m_widget );
 | 
					    gtk_widget_unrealize( client->m_widget );
 | 
				
			||||||
        
 | 
					    gtk_widget_unparent( client->m_widget );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page );
 | 
					    gtk_notebook_remove_page( GTK_NOTEBOOK(m_widget), page );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxNotebookPage *pageRemoved = (wxNotebookPage *)m_pages[page];
 | 
					    m_pagesData.DeleteObject( nb_page );
 | 
				
			||||||
    m_pages.DeleteObject( nb_page );
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return pageRemoved;
 | 
					    return client;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxNotebook::InsertPage( int position, wxNotebookPage* win, const wxString& text,
 | 
					bool wxNotebook::InsertPage( int position,
 | 
				
			||||||
                             bool select, int imageId )
 | 
					                             wxNotebookPage* win,
 | 
				
			||||||
 | 
					                             const wxString& text,
 | 
				
			||||||
 | 
					                             bool select,
 | 
				
			||||||
 | 
					                             int imageId )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
					    wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid notebook") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wxCHECK_MSG( win->GetParent() == this, FALSE,
 | 
					    wxCHECK_MSG( win->GetParent() == this, FALSE,
 | 
				
			||||||
               wxT("Can't add a page whose parent is not the notebook!") );
 | 
					               wxT("Can't add a page whose parent is not the notebook!") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    wxCHECK_MSG( position >= 0 && position <= GetPageCount(), FALSE,
 | 
				
			||||||
 | 
					                 _T("invalid page index in wxNotebookPage::InsertPage()") );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* don't receive switch page during addition */
 | 
					    /* don't receive switch page during addition */
 | 
				
			||||||
    gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget),
 | 
					    gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget),
 | 
				
			||||||
      GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
 | 
					      GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback), (gpointer) this );
 | 
				
			||||||
@@ -592,12 +590,12 @@ bool wxNotebook::InsertPage( int position, wxNotebookPage* win, const wxString&
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    wxGtkNotebookPage *page = new wxGtkNotebookPage();
 | 
					    wxGtkNotebookPage *page = new wxGtkNotebookPage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (position < 0)
 | 
					    if ( position == GetPageCount() )
 | 
				
			||||||
        m_pages.Append( page );
 | 
					        m_pagesData.Append( page );
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        m_pages.Insert( m_pages.Nth( position ), page );
 | 
					        m_pagesData.Insert( m_pagesData.Item( position ), page );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    page->m_client = win;
 | 
					    m_pages.Insert(win, position);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    page->m_box = gtk_hbox_new( FALSE, 0 );
 | 
					    page->m_box = gtk_hbox_new( FALSE, 0 );
 | 
				
			||||||
    gtk_container_border_width( GTK_CONTAINER(page->m_box), 2 );
 | 
					    gtk_container_border_width( GTK_CONTAINER(page->m_box), 2 );
 | 
				
			||||||
@@ -644,7 +642,7 @@ bool wxNotebook::InsertPage( int position, wxNotebookPage* win, const wxString&
 | 
				
			|||||||
    /* show the label */
 | 
					    /* show the label */
 | 
				
			||||||
    gtk_widget_show( GTK_WIDGET(page->m_label) );
 | 
					    gtk_widget_show( GTK_WIDGET(page->m_label) );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (select && (m_pages.GetCount() > 1))
 | 
					    if (select && (m_pagesData.GetCount() > 1))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (position < 0)
 | 
					        if (position < 0)
 | 
				
			||||||
            SetSelection( GetPageCount()-1 );
 | 
					            SetSelection( GetPageCount()-1 );
 | 
				
			||||||
@@ -658,12 +656,6 @@ bool wxNotebook::InsertPage( int position, wxNotebookPage* win, const wxString&
 | 
				
			|||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxNotebook::AddPage(wxNotebookPage* win, const wxString& text,
 | 
					 | 
				
			||||||
                         bool select, int imageId)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    return InsertPage( -1, win, text, select, imageId );
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
 | 
					void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (event.IsWindowChange())
 | 
					    if (event.IsWindowChange())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,12 +20,14 @@
 | 
				
			|||||||
#pragma hdrstop
 | 
					#pragma hdrstop
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "wx/defs.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if wxUSE_HTML && wxUSE_STREAMS
 | 
					#if wxUSE_HTML && wxUSE_STREAMS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef WX_PRECOMP
 | 
				
			||||||
 | 
					    #include "wx/app.h"
 | 
				
			||||||
 | 
					    #include "wx/intl.h"
 | 
				
			||||||
 | 
					#endif // WX_PRECOMP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "wx/html/helpctrl.h"
 | 
					#include "wx/html/helpctrl.h"
 | 
				
			||||||
#include "wx/wx.h"
 | 
					 | 
				
			||||||
#include "wx/busyinfo.h"
 | 
					#include "wx/busyinfo.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if wxUSE_HELP
 | 
					#if wxUSE_HELP
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,12 +21,20 @@
 | 
				
			|||||||
#pragma hdrstop
 | 
					#pragma hdrstop
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "wx/defs.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if wxUSE_HTML && wxUSE_STREAMS
 | 
					#if wxUSE_HTML && wxUSE_STREAMS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef WXPRECOMP
 | 
					#ifndef WXPRECOMP
 | 
				
			||||||
#include "wx/wx.h"
 | 
					    #include "wx/intl.h"
 | 
				
			||||||
#endif
 | 
					    #include "wx/log.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #include "wx/object.h"
 | 
				
			||||||
 | 
					    #include "wx/layout.h"
 | 
				
			||||||
 | 
					    #include "wx/sizer.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #include "wx/bmpbuttn.h"
 | 
				
			||||||
 | 
					    #include "wx/statbox.h"
 | 
				
			||||||
 | 
					    #include "wx/radiobox.h"
 | 
				
			||||||
 | 
					#endif // WXPRECOMP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "wx/html/helpfrm.h"
 | 
					#include "wx/html/helpfrm.h"
 | 
				
			||||||
#include "wx/html/helpctrl.h"
 | 
					#include "wx/html/helpctrl.h"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
 | 
				
			||||||
ALL_SOURCES = \
 | 
					ALL_SOURCES = \
 | 
				
			||||||
		generic/busyinfo.cpp \
 | 
							generic/busyinfo.cpp \
 | 
				
			||||||
@@ -116,6 +116,7 @@ ALL_SOURCES = \
 | 
				
			|||||||
		common/mimecmn.cpp \
 | 
							common/mimecmn.cpp \
 | 
				
			||||||
		common/module.cpp \
 | 
							common/module.cpp \
 | 
				
			||||||
		common/mstream.cpp \
 | 
							common/mstream.cpp \
 | 
				
			||||||
 | 
							common/nbkbase.cpp \
 | 
				
			||||||
		common/object.cpp \
 | 
							common/object.cpp \
 | 
				
			||||||
		common/objstrm.cpp \
 | 
							common/objstrm.cpp \
 | 
				
			||||||
		common/paper.cpp \
 | 
							common/paper.cpp \
 | 
				
			||||||
@@ -651,6 +652,7 @@ COMMONOBJS = \
 | 
				
			|||||||
		mimecmn.o \
 | 
							mimecmn.o \
 | 
				
			||||||
		module.o \
 | 
							module.o \
 | 
				
			||||||
		mstream.o \
 | 
							mstream.o \
 | 
				
			||||||
 | 
							nbkbase.o \
 | 
				
			||||||
		object.o \
 | 
							object.o \
 | 
				
			||||||
		objstrm.o \
 | 
							objstrm.o \
 | 
				
			||||||
		paper.o \
 | 
							paper.o \
 | 
				
			||||||
@@ -765,6 +767,7 @@ COMMONDEPS = \
 | 
				
			|||||||
		mimecmn.d \
 | 
							mimecmn.d \
 | 
				
			||||||
		module.d \
 | 
							module.d \
 | 
				
			||||||
		mstream.d \
 | 
							mstream.d \
 | 
				
			||||||
 | 
							nbkbase.d \
 | 
				
			||||||
		object.d \
 | 
							object.d \
 | 
				
			||||||
		objstrm.d \
 | 
							objstrm.d \
 | 
				
			||||||
		paper.d \
 | 
							paper.d \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T!
 | 
				
			||||||
ALL_SOURCES = \
 | 
					ALL_SOURCES = \
 | 
				
			||||||
		generic/busyinfo.cpp \
 | 
							generic/busyinfo.cpp \
 | 
				
			||||||
@@ -99,6 +99,7 @@ ALL_SOURCES = \
 | 
				
			|||||||
		common/mimecmn.cpp \
 | 
							common/mimecmn.cpp \
 | 
				
			||||||
		common/module.cpp \
 | 
							common/module.cpp \
 | 
				
			||||||
		common/mstream.cpp \
 | 
							common/mstream.cpp \
 | 
				
			||||||
 | 
							common/nbkbase.cpp \
 | 
				
			||||||
		common/object.cpp \
 | 
							common/object.cpp \
 | 
				
			||||||
		common/objstrm.cpp \
 | 
							common/objstrm.cpp \
 | 
				
			||||||
		common/paper.cpp \
 | 
							common/paper.cpp \
 | 
				
			||||||
@@ -705,6 +706,7 @@ COMMONOBJS = \
 | 
				
			|||||||
		mimecmn.o \
 | 
							mimecmn.o \
 | 
				
			||||||
		module.o \
 | 
							module.o \
 | 
				
			||||||
		mstream.o \
 | 
							mstream.o \
 | 
				
			||||||
 | 
							nbkbase.o \
 | 
				
			||||||
		object.o \
 | 
							object.o \
 | 
				
			||||||
		objstrm.o \
 | 
							objstrm.o \
 | 
				
			||||||
		paper.o \
 | 
							paper.o \
 | 
				
			||||||
@@ -819,6 +821,7 @@ COMMONDEPS = \
 | 
				
			|||||||
		mimecmn.d \
 | 
							mimecmn.d \
 | 
				
			||||||
		module.d \
 | 
							module.d \
 | 
				
			||||||
		mstream.d \
 | 
							mstream.d \
 | 
				
			||||||
 | 
							nbkbase.d \
 | 
				
			||||||
		object.d \
 | 
							object.d \
 | 
				
			||||||
		objstrm.d \
 | 
							objstrm.d \
 | 
				
			||||||
		paper.d \
 | 
							paper.d \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@@ -183,6 +183,7 @@ COMMONOBJS = \
 | 
				
			|||||||
		$(MSWDIR)\mimecmn.obj \
 | 
							$(MSWDIR)\mimecmn.obj \
 | 
				
			||||||
		$(MSWDIR)\module.obj \
 | 
							$(MSWDIR)\module.obj \
 | 
				
			||||||
		$(MSWDIR)\mstream.obj \
 | 
							$(MSWDIR)\mstream.obj \
 | 
				
			||||||
 | 
							$(MSWDIR)\nbkbase.obj \
 | 
				
			||||||
		$(MSWDIR)\object.obj \
 | 
							$(MSWDIR)\object.obj \
 | 
				
			||||||
		$(MSWDIR)\objstrm.obj \
 | 
							$(MSWDIR)\objstrm.obj \
 | 
				
			||||||
		$(MSWDIR)\odbc.obj \
 | 
							$(MSWDIR)\odbc.obj \
 | 
				
			||||||
@@ -750,6 +751,8 @@ $(MSWDIR)\module.obj: $(COMMDIR)\module.$(SRCSUFF)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
$(MSWDIR)\mstream.obj: $(COMMDIR)\mstream.$(SRCSUFF)
 | 
					$(MSWDIR)\mstream.obj: $(COMMDIR)\mstream.$(SRCSUFF)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(MSWDIR)\nbkbase.obj: $(COMMDIR)\nbkbase.$(SRCSUFF)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
 | 
					$(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF)
 | 
					$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@@ -162,6 +162,7 @@ COMMONOBJS = \
 | 
				
			|||||||
		$(MSWDIR)\menucmn.obj \
 | 
							$(MSWDIR)\menucmn.obj \
 | 
				
			||||||
		$(MSWDIR)\module.obj \
 | 
							$(MSWDIR)\module.obj \
 | 
				
			||||||
		$(MSWDIR)\mstream.obj \
 | 
							$(MSWDIR)\mstream.obj \
 | 
				
			||||||
 | 
							$(MSWDIR)\nbkbase.obj \
 | 
				
			||||||
		$(MSWDIR)\object.obj \
 | 
							$(MSWDIR)\object.obj \
 | 
				
			||||||
		$(MSWDIR)\objstrm.obj \
 | 
							$(MSWDIR)\objstrm.obj \
 | 
				
			||||||
		$(MSWDIR)\paper.obj \
 | 
							$(MSWDIR)\paper.obj \
 | 
				
			||||||
@@ -602,6 +603,8 @@ $(MSWDIR)\module.obj: $(COMMDIR)\module.$(SRCSUFF)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
$(MSWDIR)\mstream.obj: $(COMMDIR)\mstream.$(SRCSUFF)
 | 
					$(MSWDIR)\mstream.obj: $(COMMDIR)\mstream.$(SRCSUFF)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(MSWDIR)\nbkbase.obj: $(COMMDIR)\nbkbase.$(SRCSUFF)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
 | 
					$(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF)
 | 
					$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@@ -146,6 +146,7 @@ COMMONOBJS1 = \
 | 
				
			|||||||
		$(COMMDIR)\menucmn.obj \
 | 
							$(COMMDIR)\menucmn.obj \
 | 
				
			||||||
		$(COMMDIR)\module.obj \
 | 
							$(COMMDIR)\module.obj \
 | 
				
			||||||
		$(COMMDIR)\mstream.obj \
 | 
							$(COMMDIR)\mstream.obj \
 | 
				
			||||||
 | 
							$(COMMDIR)\nbkbase.obj \
 | 
				
			||||||
		$(COMMDIR)\object.obj \
 | 
							$(COMMDIR)\object.obj \
 | 
				
			||||||
		$(COMMDIR)\objstrm.obj \
 | 
							$(COMMDIR)\objstrm.obj \
 | 
				
			||||||
		$(COMMDIR)\odbc.obj
 | 
							$(COMMDIR)\odbc.obj
 | 
				
			||||||
@@ -1050,6 +1051,11 @@ $(COMMDIR)/mstream.obj:     $*.$(SRCSUFF)
 | 
				
			|||||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 | 
					$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 | 
				
			||||||
<<
 | 
					<<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(COMMDIR)/nbkbase.obj:     $*.$(SRCSUFF)
 | 
				
			||||||
 | 
					        cl @<<
 | 
				
			||||||
 | 
					$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 | 
				
			||||||
 | 
					<<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(COMMDIR)/object.obj:     $*.$(SRCSUFF)
 | 
					$(COMMDIR)/object.obj:     $*.$(SRCSUFF)
 | 
				
			||||||
        cl @<<
 | 
					        cl @<<
 | 
				
			||||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 | 
					$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@@ -168,6 +168,7 @@ COMMONOBJS  = \
 | 
				
			|||||||
		$(COMMDIR)/mimecmn.$(OBJSUFF) \
 | 
							$(COMMDIR)/mimecmn.$(OBJSUFF) \
 | 
				
			||||||
		$(COMMDIR)/module.$(OBJSUFF) \
 | 
							$(COMMDIR)/module.$(OBJSUFF) \
 | 
				
			||||||
		$(COMMDIR)/mstream.$(OBJSUFF) \
 | 
							$(COMMDIR)/mstream.$(OBJSUFF) \
 | 
				
			||||||
 | 
							$(COMMDIR)/nbkbase.$(OBJSUFF) \
 | 
				
			||||||
		$(COMMDIR)/object.$(OBJSUFF) \
 | 
							$(COMMDIR)/object.$(OBJSUFF) \
 | 
				
			||||||
		$(COMMDIR)/objstrm.$(OBJSUFF) \
 | 
							$(COMMDIR)/objstrm.$(OBJSUFF) \
 | 
				
			||||||
		$(COMMDIR)/paper.$(OBJSUFF) \
 | 
							$(COMMDIR)/paper.$(OBJSUFF) \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Symantec C++ makefile for the msw objects
 | 
					# Symantec C++ makefile for the msw objects
 | 
				
			||||||
@@ -126,6 +126,7 @@ COMMONOBJS = \
 | 
				
			|||||||
		$(COMMDIR)\mimecmn.obj \
 | 
							$(COMMDIR)\mimecmn.obj \
 | 
				
			||||||
		$(COMMDIR)\module.obj \
 | 
							$(COMMDIR)\module.obj \
 | 
				
			||||||
		$(COMMDIR)\mstream.obj \
 | 
							$(COMMDIR)\mstream.obj \
 | 
				
			||||||
 | 
							$(COMMDIR)\nbkbase.obj \
 | 
				
			||||||
		$(COMMDIR)\object.obj \
 | 
							$(COMMDIR)\object.obj \
 | 
				
			||||||
		$(COMMDIR)\objstrm.obj \
 | 
							$(COMMDIR)\objstrm.obj \
 | 
				
			||||||
		$(COMMDIR)\odbc.obj \
 | 
							$(COMMDIR)\odbc.obj \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# File:     makefile.vc
 | 
					# File:     makefile.vc
 | 
				
			||||||
@@ -209,6 +209,7 @@ COMMONOBJS = \
 | 
				
			|||||||
		..\common\$D\mimecmn.obj \
 | 
							..\common\$D\mimecmn.obj \
 | 
				
			||||||
		..\common\$D\module.obj \
 | 
							..\common\$D\module.obj \
 | 
				
			||||||
		..\common\$D\mstream.obj \
 | 
							..\common\$D\mstream.obj \
 | 
				
			||||||
 | 
							..\common\$D\nbkbase.obj \
 | 
				
			||||||
		..\common\$D\object.obj \
 | 
							..\common\$D\object.obj \
 | 
				
			||||||
		..\common\$D\objstrm.obj \
 | 
							..\common\$D\objstrm.obj \
 | 
				
			||||||
		..\common\$D\odbc.obj \
 | 
							..\common\$D\odbc.obj \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/binb/wmake.exe
 | 
					#!/binb/wmake.exe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@@ -165,6 +165,7 @@ COMMONOBJS = &
 | 
				
			|||||||
	mimecmn.obj &
 | 
						mimecmn.obj &
 | 
				
			||||||
	module.obj &
 | 
						module.obj &
 | 
				
			||||||
	mstream.obj &
 | 
						mstream.obj &
 | 
				
			||||||
 | 
						nbkbase.obj &
 | 
				
			||||||
	object.obj &
 | 
						object.obj &
 | 
				
			||||||
	objstrm.obj &
 | 
						objstrm.obj &
 | 
				
			||||||
	odbc.obj &
 | 
						odbc.obj &
 | 
				
			||||||
@@ -894,6 +895,9 @@ module.obj:     $(COMMDIR)\module.cpp
 | 
				
			|||||||
mstream.obj:     $(COMMDIR)\mstream.cpp
 | 
					mstream.obj:     $(COMMDIR)\mstream.cpp
 | 
				
			||||||
  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 | 
					  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					nbkbase.obj:     $(COMMDIR)\nbkbase.cpp
 | 
				
			||||||
 | 
					  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
object.obj:     $(COMMDIR)\object.cpp
 | 
					object.obj:     $(COMMDIR)\object.cpp
 | 
				
			||||||
  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 | 
					  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -110,7 +110,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
 | 
				
			|||||||
// common part of all ctors
 | 
					// common part of all ctors
 | 
				
			||||||
void wxNotebook::Init()
 | 
					void wxNotebook::Init()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  m_bOwnsImageList = FALSE;
 | 
					 | 
				
			||||||
  m_imageList = NULL;
 | 
					  m_imageList = NULL;
 | 
				
			||||||
  m_nSelection = -1;
 | 
					  m_nSelection = -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -193,16 +192,10 @@ bool wxNotebook::Create(wxWindow *parent,
 | 
				
			|||||||
  return TRUE;
 | 
					  return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// dtor
 | 
					 | 
				
			||||||
wxNotebook::~wxNotebook()
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  if (m_bOwnsImageList)
 | 
					 | 
				
			||||||
      delete m_imageList;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
// wxNotebook accessors
 | 
					// wxNotebook accessors
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int wxNotebook::GetPageCount() const
 | 
					int wxNotebook::GetPageCount() const
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  // consistency check
 | 
					  // consistency check
 | 
				
			||||||
@@ -276,21 +269,12 @@ bool wxNotebook::SetPageImage(int nPage, int nImage)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void wxNotebook::SetImageList(wxImageList* imageList)
 | 
					void wxNotebook::SetImageList(wxImageList* imageList)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  if ( m_bOwnsImageList )
 | 
					  wxNotebookBase::SetImageList(imageList);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if ( imageList )
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
      delete m_imageList;
 | 
					    TabCtrl_SetImageList(m_hwnd, (HIMAGELIST)imageList->GetHIMAGELIST());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					 | 
				
			||||||
  m_bOwnsImageList = FALSE;
 | 
					 | 
				
			||||||
  m_imageList = imageList;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  TabCtrl_SetImageList(m_hwnd, (HIMAGELIST)imageList->GetHIMAGELIST());
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void wxNotebook::AssignImageList(wxImageList* imageList)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  SetImageList(imageList);
 | 
					 | 
				
			||||||
  m_bOwnsImageList = TRUE;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ----------------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file was automatically generated by tmake at 14:52, 2001/07/02
 | 
					# This file was automatically generated by tmake at 20:23, 2001/07/02
 | 
				
			||||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 | 
					# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 | 
				
			||||||
UNIVOBJS = \
 | 
					UNIVOBJS = \
 | 
				
			||||||
		bmpbuttn.o \
 | 
							bmpbuttn.o \
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user