Common default notebook name.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-01-13 20:30:21 +00:00
parent 2ad1ff540f
commit 630ad6c6b6
13 changed files with 134 additions and 234 deletions

View File

@@ -54,7 +54,7 @@ See also \helpref{window styles overview}{windowstyles}.
Default constructor. Default constructor.
\func{}{wxNotebook}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \func{}{wxNotebook}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
\param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0}, \param{const wxString\& }{name = "notebook"}} \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0}, \param{const wxString\& }{name = wxNotebookNameStr}}
Constructs a notebook control. Constructs a notebook control.
@@ -141,7 +141,7 @@ the list.
\membersection{wxNotebook::Create}\label{wxnotebookcreate} \membersection{wxNotebook::Create}\label{wxnotebookcreate}
\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, \func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition},
\param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = "notebook"}} \param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = wxNotebookNameStr}}
Creates a notebook control. See \helpref{wxNotebook::wxNotebook}{wxnotebookctor} for a description Creates a notebook control. See \helpref{wxNotebook::wxNotebook}{wxnotebookctor} for a description
of the parameters. of the parameters.
@@ -233,7 +233,7 @@ used instead in this case.
\func{int}{HitTest}{\param{const wxPoint\&}{ pt}, \param{long}{ *flags = {\tt NULL}}} \func{int}{HitTest}{\param{const wxPoint\&}{ pt}, \param{long}{ *flags = {\tt NULL}}}
Returns the index of the tab at the specified position or {\tt wxNOT\_FOUND} Returns the index of the tab at the specified position or {\tt wxNOT\_FOUND}
if none. If {\it flags} parameter is non {\tt NULL}, the position of the point if none. If {\it flags} parameter is non {\tt NULL}, the position of the point
inside the tab is returned as well. inside the tab is returned as well.

View File

@@ -6,7 +6,7 @@
// Created: 2004/04/08 // Created: 2004/04/08
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) 2004 David Elliott // Copyright: (c) 2004 David Elliott
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COCOA_NOTEBOOK_H__ #ifndef _WX_COCOA_NOTEBOOK_H__
@@ -31,7 +31,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxNOTEBOOK_NAME) const wxString& name = wxNotebookNameStr)
{ {
Create(parent, winid, pos, size, style, name); Create(parent, winid, pos, size, style, name);
} }
@@ -40,7 +40,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxNOTEBOOK_NAME); const wxString& name = wxNotebookNameStr);
virtual ~wxNotebook(); virtual ~wxNotebook();
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
@@ -94,7 +94,7 @@ public:
bool InsertPage( size_t position, bool InsertPage( size_t position,
wxNotebookPage *win, wxNotebookPage *win,
const wxString& strText, const wxString& strText,
bool bSelect = FALSE, bool bSelect = false,
int imageId = -1 ); int imageId = -1 );
protected: protected:

View File

@@ -47,14 +47,14 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxT("notebook")); const wxString& name = wxNotebookNameStr);
// Create() function // Create() function
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxT("notebook")); const wxString& name = wxNotebookNameStr);
// dtor // dtor
~wxNotebook(); ~wxNotebook();

View File

@@ -39,14 +39,14 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxT("notebook")); const wxString& name = wxNotebookNameStr);
// Create() function // Create() function
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxT("notebook")); const wxString& name = wxNotebookNameStr);
// dtor // dtor
virtual ~wxNotebook(); virtual ~wxNotebook();
@@ -89,7 +89,7 @@ public:
bool InsertPage( size_t position, bool InsertPage( size_t position,
wxNotebookPage *win, wxNotebookPage *win,
const wxString& strText, const wxString& strText,
bool bSelect = FALSE, bool bSelect = false,
int imageId = -1 ); int imageId = -1 );
// handler for tab navigation // handler for tab navigation
@@ -99,7 +99,7 @@ public:
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
// implementation // implementation
// -------------- // --------------
@@ -127,7 +127,7 @@ public:
// selection internally instead of querying the notebook for it // selection internally instead of querying the notebook for it
int m_selection; int m_selection;
// flag set to TRUE while we're inside "switch_page" callback // flag set to true while we're inside "switch_page" callback
bool m_inSwitchPage; bool m_inSwitchPage;
protected: protected:

View File

@@ -39,14 +39,14 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxT("notebook")); const wxString& name = wxNotebookNameStr);
// Create() function // Create() function
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxT("notebook")); const wxString& name = wxNotebookNameStr);
// dtor // dtor
virtual ~wxNotebook(); virtual ~wxNotebook();
@@ -89,7 +89,7 @@ public:
bool InsertPage( size_t position, bool InsertPage( size_t position,
wxNotebookPage *win, wxNotebookPage *win,
const wxString& strText, const wxString& strText,
bool bSelect = FALSE, bool bSelect = false,
int imageId = -1 ); int imageId = -1 );
// handler for tab navigation // handler for tab navigation
@@ -99,7 +99,7 @@ public:
static wxVisualAttributes static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
// implementation // implementation
// -------------- // --------------
@@ -127,7 +127,7 @@ public:
// selection internally instead of querying the notebook for it // selection internally instead of querying the notebook for it
int m_selection; int m_selection;
// flag set to TRUE while we're inside "switch_page" callback // flag set to true while we're inside "switch_page" callback
bool m_inSwitchPage; bool m_inSwitchPage;
protected: protected:

View File

@@ -44,18 +44,18 @@ public:
wxNotebook(); wxNotebook();
// the same arguments as for wxControl (@@@ any special styles?) // the same arguments as for wxControl (@@@ any special styles?)
wxNotebook(wxWindow *parent, wxNotebook(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxT("notebook")); const wxString& name = wxNotebookNameStr);
// Create() function // Create() function
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxT("notebook")); const wxString& name = wxNotebookNameStr);
// dtor // dtor
~wxNotebook(); ~wxNotebook();
@@ -83,7 +83,7 @@ public:
virtual void SetPadding(const wxSize& padding); virtual void SetPadding(const wxSize& padding);
// sets the size of the tabs (assumes all tabs are the same size) // sets the size of the tabs (assumes all tabs are the same size)
virtual void SetTabSize(const wxSize& sz); virtual void SetTabSize(const wxSize& sz);
// calculate size for wxNotebookSizer // calculate size for wxNotebookSizer
wxSize CalcSizeFromPage(const wxSize& sizePage) const; wxSize CalcSizeFromPage(const wxSize& sizePage) const;
wxRect GetPageRect() const ; wxRect GetPageRect() const ;
@@ -92,7 +92,7 @@ public:
int GetPageCount() const; int GetPageCount() const;
// cycle thru the tabs // cycle thru the tabs
void AdvanceSelection(bool bForward = TRUE); void AdvanceSelection(bool bForward = true);
// currently it's always 1 because wxGTK doesn't support multi-row // currently it's always 1 because wxGTK doesn't support multi-row
@@ -107,7 +107,7 @@ public:
bool InsertPage(size_t nPage, bool InsertPage(size_t nPage,
wxNotebookPage *pPage, wxNotebookPage *pPage,
const wxString& strText, const wxString& strText,
bool bSelect = FALSE, bool bSelect = false,
int imageId = -1); int imageId = -1);
/* /*
// get the panel which represents the given page // get the panel which represents the given page
@@ -124,7 +124,7 @@ public:
// -------------- // --------------
#if wxUSE_CONSTRAINTS #if wxUSE_CONSTRAINTS
virtual void SetConstraintSizes(bool recurse = TRUE); virtual void SetConstraintSizes(bool recurse = true);
virtual bool DoPhase(int nPhase); virtual bool DoPhase(int nPhase);
#endif #endif

View File

@@ -64,14 +64,14 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxNOTEBOOK_NAME); const wxString& name = wxNotebookNameStr);
// Create() function // Create() function
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxNOTEBOOK_NAME); const wxString& name = wxNotebookNameStr);
virtual ~wxNotebook(); virtual ~wxNotebook();
// accessors // accessors

View File

@@ -41,7 +41,11 @@ enum
typedef wxWindow wxNotebookPage; // so far, any window can be a page typedef wxWindow wxNotebookPage; // so far, any window can be a page
#define wxNOTEBOOK_NAME _T("notebook") WXDLLEXPORT_DATA(extern const wxChar*) wxNotebookNameStr;
#if WXWIN_COMPATIBILITY_2_4
#define wxNOTEBOOK_NAME wxNotebookNameStr
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxNotebookBase: define wxNotebook interface // wxNotebookBase: define wxNotebook interface
@@ -60,7 +64,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxNOTEBOOK_NAME) ; const wxString& name = wxNotebookNameStr) ;
// wxNotebook-specific additions to wxBookCtrlBase interface // wxNotebook-specific additions to wxBookCtrlBase interface
// --------------------------------------------------------- // ---------------------------------------------------------

View File

@@ -41,7 +41,7 @@ public:
,const wxPoint& rPos = wxDefaultPosition ,const wxPoint& rPos = wxDefaultPosition
,const wxSize& rSize = wxDefaultSize ,const wxSize& rSize = wxDefaultSize
,long lStyle = 0 ,long lStyle = 0
,const wxString& rsName = "notebook" ,const wxString& rsName = wxNotebookNameStr
); );
bool Create( wxWindow* pParent bool Create( wxWindow* pParent
@@ -49,7 +49,7 @@ public:
,const wxPoint& rPos = wxDefaultPosition ,const wxPoint& rPos = wxDefaultPosition
,const wxSize& rSize = wxDefaultSize ,const wxSize& rSize = wxDefaultSize
,long lStyle = 0 ,long lStyle = 0
,const wxString& rsName = "notebook" ,const wxString& rsName = wxNotebookNameStr
); );
// //
@@ -127,7 +127,7 @@ public:
// //
bool AddPage( wxNotebookPage* pPage bool AddPage( wxNotebookPage* pPage
,const wxString& rsStrText ,const wxString& rsStrText
,bool bSelect = FALSE ,bool bSelect = false
,int nImageId = -1 ,int nImageId = -1
); );
@@ -137,7 +137,7 @@ public:
bool InsertPage( size_t nPage bool InsertPage( size_t nPage
,wxNotebookPage* pPage ,wxNotebookPage* pPage
,const wxString& rsStrText ,const wxString& rsStrText
,bool bSelect = FALSE ,bool bSelect = false
,int nImageId = -1 ,int nImageId = -1
); );
@@ -165,7 +165,7 @@ public:
,WXWORD wPos ,WXWORD wPos
,WXHWND hControl ,WXHWND hControl
); );
virtual void SetConstraintSizes(bool bRecurse = TRUE); virtual void SetConstraintSizes(bool bRecurse = true);
virtual bool DoPhase(int nPhase); virtual bool DoPhase(int nPhase);
protected: protected:

View File

@@ -1,10 +1,10 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: palmos/notebook.h // Name: palmos/notebook.h
// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) // Purpose: notebook interface (a.k.a. property sheet)
// Author: William Osborne // Author: William Osborne
// Modified by: // Modified by:
// Created: 10/13/04 // Created: 10/13/04
// RCS-ID: $Id: // RCS-ID: $Id:
// Copyright: (c) William Osborne // Copyright: (c) William Osborne
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ public :
wxNotebookPageInfo() { m_page = NULL ; m_imageId = -1 ; m_selected = false ; } wxNotebookPageInfo() { m_page = NULL ; m_imageId = -1 ; m_selected = false ; }
virtual ~wxNotebookPageInfo() { } virtual ~wxNotebookPageInfo() { }
void Create( wxNotebookPage *page , const wxString &text , bool selected , int imageId ) void Create( wxNotebookPage *page , const wxString &text , bool selected , int imageId )
{ m_page = page ; m_text = text ; m_selected = selected ; m_imageId = imageId ; } { m_page = page ; m_text = text ; m_selected = selected ; m_imageId = imageId ; }
wxNotebookPage* GetPage() const { return m_page ; } wxNotebookPage* GetPage() const { return m_page ; }
wxString GetText() const { return m_text ; } wxString GetText() const { return m_text ; }
@@ -55,140 +55,126 @@ WX_DECLARE_EXPORTED_LIST(wxNotebookPageInfo, wxNotebookPageInfoList );
class WXDLLEXPORT wxNotebook : public wxNotebookBase class WXDLLEXPORT wxNotebook : public wxNotebookBase
{ {
public: public:
// ctors // ctors
// ----- // -----
// default for dynamic class
wxNotebook(); // default for dynamic class
// the same arguments as for wxControl (@@@ any special styles?) wxNotebook();
wxNotebook(wxWindow *parent,
wxWindowID id, // the same arguments as for wxControl (@@@ any special styles?)
const wxPoint& pos = wxDefaultPosition, wxNotebook(wxWindow *parent,
const wxSize& size = wxDefaultSize, wxWindowID id,
long style = 0, const wxPoint& pos = wxDefaultPosition,
const wxString& name = wxNOTEBOOK_NAME); const wxSize& size = wxDefaultSize,
// Create() function long style = 0,
bool Create(wxWindow *parent, const wxString& name = wxNotebookNameStr);
wxWindowID id,
const wxPoint& pos = wxDefaultPosition, // Create() function
const wxSize& size = wxDefaultSize, bool Create(wxWindow *parent,
long style = 0, wxWindowID id,
const wxString& name = wxNOTEBOOK_NAME); const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNotebookNameStr);
// accessors
// ---------
// accessors
// ---------
// get number of pages in the dialog // get number of pages in the dialog
virtual size_t GetPageCount() const; virtual size_t GetPageCount() const;
// set the currently selected page, return the index of the previously // set the currently selected page, return the index of the previously
// selected one (or -1 on error) // selected one (or -1 on error)
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
int SetSelection(size_t nPage); int SetSelection(size_t nPage);
// get the currently selected page // get the currently selected page
int GetSelection() const { return m_nSelection; } int GetSelection() const { return m_nSelection; }
// set/get the title of a page // set/get the title of a page
bool SetPageText(size_t nPage, const wxString& strText); bool SetPageText(size_t nPage, const wxString& strText);
wxString GetPageText(size_t nPage) const; wxString GetPageText(size_t nPage) const;
// 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
// the images belong to an image list, so you have to // the images belong to an image list, so you have to
// 1) create an image list // 1) create an image list
// 2) associate it with the notebook // 2) associate it with the notebook
// 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);
// sets/returns item's image index in the current image list // sets/returns item's image index in the current image list
int GetPageImage(size_t nPage) const; int GetPageImage(size_t nPage) const;
bool SetPageImage(size_t nPage, int nImage); bool SetPageImage(size_t nPage, int nImage);
// currently it's always 1 because wxGTK doesn't support multi-row // currently it's always 1 because wxGTK doesn't support multi-row
// tab controls // tab controls
int GetRowCount() const; int GetRowCount() const;
// control the appearance of the notebook pages // control the appearance of the notebook pages
// set the size (the same for all pages) // set the size (the same for all pages)
void SetPageSize(const wxSize& size); void SetPageSize(const wxSize& size);
// set the padding between tabs (in pixels) // set the padding between tabs (in pixels)
void SetPadding(const wxSize& padding); void SetPadding(const wxSize& padding);
// Windows only: attempts to get colour for UX theme page background // operations
wxColour GetThemeBackgroundColour(); // ----------
// operations
// ----------
// remove all pages // remove all pages
bool DeleteAllPages(); bool DeleteAllPages();
// inserts a new page to the notebook (it will be deleted ny the notebook, // inserts 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 InsertPage(size_t nPage, bool InsertPage(size_t nPage,
wxNotebookPage *pPage, wxNotebookPage *pPage,
const wxString& strText, const wxString& strText,
bool bSelect = FALSE, bool bSelect = false,
int imageId = -1); int imageId = -1);
void AddPageInfo( wxNotebookPageInfo* info ) { AddPage( info->GetPage() , info->GetText() , info->GetSelected() , info->GetImageId() ) ; } void AddPageInfo( wxNotebookPageInfo* info ) { AddPage( info->GetPage() , info->GetText() , info->GetSelected() , info->GetImageId() ) ; }
const wxNotebookPageInfoList& GetPageInfos() const ; const wxNotebookPageInfoList& GetPageInfos() const ;
// Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH // Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH
// style. // style.
void SetTabSize(const wxSize& sz); void SetTabSize(const wxSize& sz);
// Windows only: attempts to apply the UX theme page background to this page
void ApplyThemeBackground(wxWindow* window, const wxColour& colour);
// hit test // hit test
virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; virtual int HitTest(const wxPoint& pt, long *flags = NULL) const;
// 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) const; virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
// callbacks // callbacks
// --------- // ---------
void OnSize(wxSizeEvent& event); void OnSize(wxSizeEvent& event);
void OnSelChange(wxNotebookEvent& event); void OnSelChange(wxNotebookEvent& event);
void OnNavigationKey(wxNavigationKeyEvent& event); void OnNavigationKey(wxNavigationKeyEvent& event);
// base class virtuals // base class virtuals
// ------------------- // -------------------
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
virtual bool MSWOnScroll(int orientation, WXWORD nSBCode,
WXWORD pos, WXHWND control);
virtual bool MSWTranslateMessage(WXMSG *wxmsg);
#if wxUSE_CONSTRAINTS #if wxUSE_CONSTRAINTS
virtual void SetConstraintSizes(bool recurse = TRUE); virtual void SetConstraintSizes(bool recurse = true);
virtual bool DoPhase(int nPhase); virtual bool DoPhase(int nPhase);
#endif // wxUSE_CONSTRAINTS #endif // wxUSE_CONSTRAINTS
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
// translate wxWin styles to the Windows ones // remove one page from the notebook, without deleting
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; virtual wxNotebookPage *DoRemovePage(size_t nPage);
// remove one page from the notebook, without deleting // set the size of the given page to fit in the notebook
virtual wxNotebookPage *DoRemovePage(size_t nPage); void AdjustPageSize(wxNotebookPage *page);
// set the size of the given page to fit in the notebook // the current selection (-1 if none)
void AdjustPageSize(wxNotebookPage *page); int m_nSelection;
// override WndProc. wxNotebookPageInfoList m_pageInfos ;
#if wxUSE_UXTHEME
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif
// the current selection (-1 if none)
int m_nSelection;
wxNotebookPageInfoList m_pageInfos ;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxNotebook) DECLARE_DYNAMIC_CLASS_NO_COPY(wxNotebook)
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
#endif // wxUSE_NOTEBOOK #endif // wxUSE_NOTEBOOK

View File

@@ -46,7 +46,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxNOTEBOOK_NAME) const wxString& name = wxNotebookNameStr)
{ {
Init(); Init();
@@ -59,7 +59,7 @@ public:
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = 0, long style = 0,
const wxString& name = wxNOTEBOOK_NAME); const wxString& name = wxNotebookNameStr);
// dtor // dtor
virtual ~wxNotebook(); virtual ~wxNotebook();

View File

@@ -110,6 +110,7 @@ wxColour wxNullColour;
// Default window names // Default window names
WXDLLEXPORT_DATA(const wxChar *) wxControlNameStr = wxT("control"); WXDLLEXPORT_DATA(const wxChar *) wxControlNameStr = wxT("control");
WXDLLEXPORT_DATA(const wxChar *) wxButtonNameStr = wxT("button"); WXDLLEXPORT_DATA(const wxChar *) wxButtonNameStr = wxT("button");
WXDLLEXPORT_DATA(const wxChar *) wxButtonBarNameStr = wxT("buttonbar");
WXDLLEXPORT_DATA(const wxChar *) wxCanvasNameStr = wxT("canvas"); WXDLLEXPORT_DATA(const wxChar *) wxCanvasNameStr = wxT("canvas");
WXDLLEXPORT_DATA(const wxChar *) wxCheckBoxNameStr = wxT("check"); WXDLLEXPORT_DATA(const wxChar *) wxCheckBoxNameStr = wxT("check");
WXDLLEXPORT_DATA(const wxChar *) wxChoiceNameStr = wxT("choice"); WXDLLEXPORT_DATA(const wxChar *) wxChoiceNameStr = wxT("choice");
@@ -122,6 +123,7 @@ WXDLLEXPORT_DATA(const wxChar *) wxListBoxNameStr = wxT("listBox");
WXDLLEXPORT_DATA(const wxChar *) wxStaticTextNameStr = wxT("message"); WXDLLEXPORT_DATA(const wxChar *) wxStaticTextNameStr = wxT("message");
WXDLLEXPORT_DATA(const wxChar *) wxStaticBitmapNameStr = wxT("message"); WXDLLEXPORT_DATA(const wxChar *) wxStaticBitmapNameStr = wxT("message");
WXDLLEXPORT_DATA(const wxChar *) wxMultiTextNameStr = wxT("multitext"); WXDLLEXPORT_DATA(const wxChar *) wxMultiTextNameStr = wxT("multitext");
WXDLLEXPORT_DATA(const wxChar *) wxNotebookNameStr = wxT("notebook");
WXDLLEXPORT_DATA(const wxChar *) wxPanelNameStr = wxT("panel"); WXDLLEXPORT_DATA(const wxChar *) wxPanelNameStr = wxT("panel");
WXDLLEXPORT_DATA(const wxChar *) wxRadioBoxNameStr = wxT("radioBox"); WXDLLEXPORT_DATA(const wxChar *) wxRadioBoxNameStr = wxT("radioBox");
WXDLLEXPORT_DATA(const wxChar *) wxRadioButtonNameStr = wxT("radioButton"); WXDLLEXPORT_DATA(const wxChar *) wxRadioButtonNameStr = wxT("radioButton");
@@ -129,17 +131,21 @@ WXDLLEXPORT_DATA(const wxChar *) wxBitmapRadioButtonNameStr = wxT("radioButton")
WXDLLEXPORT_DATA(const wxChar *) wxScrollBarNameStr = wxT("scrollBar"); WXDLLEXPORT_DATA(const wxChar *) wxScrollBarNameStr = wxT("scrollBar");
WXDLLEXPORT_DATA(const wxChar *) wxSliderNameStr = wxT("slider"); WXDLLEXPORT_DATA(const wxChar *) wxSliderNameStr = wxT("slider");
WXDLLEXPORT_DATA(const wxChar *) wxStaticNameStr = wxT("static"); WXDLLEXPORT_DATA(const wxChar *) wxStaticNameStr = wxT("static");
WXDLLEXPORT_DATA(const wxChar *) wxStatusLineNameStr = wxT("status_line");
WXDLLEXPORT_DATA(const wxChar *) wxTextCtrlWindowNameStr = wxT("textWindow"); WXDLLEXPORT_DATA(const wxChar *) wxTextCtrlWindowNameStr = wxT("textWindow");
WXDLLEXPORT_DATA(const wxChar *) wxTextCtrlNameStr = wxT("text"); WXDLLEXPORT_DATA(const wxChar *) wxTextCtrlNameStr = wxT("text");
WXDLLEXPORT_DATA(const wxChar *) wxVirtListBoxNameStr = wxT("virtListBox"); WXDLLEXPORT_DATA(const wxChar *) wxTreeCtrlNameStr = wxT("treeCtrl");
WXDLLEXPORT_DATA(const wxChar *) wxButtonBarNameStr = wxT("buttonbar");
WXDLLEXPORT_DATA(const wxChar *) wxEnhDialogNameStr = wxT("Shell"); WXDLLEXPORT_DATA(const wxChar *) wxEnhDialogNameStr = wxT("Shell");
WXDLLEXPORT_DATA(const wxChar *) wxToolBarNameStr = wxT("toolbar"); WXDLLEXPORT_DATA(const wxChar *) wxToolBarNameStr = wxT("toolbar");
WXDLLEXPORT_DATA(const wxChar *) wxStatusLineNameStr = wxT("status_line"); WXDLLEXPORT_DATA(const wxChar *) wxVirtListBoxNameStr = wxT("virtListBox");
// Default messages
WXDLLEXPORT_DATA(const wxChar *) wxGetTextFromUserPromptStr = wxT("Input Text"); WXDLLEXPORT_DATA(const wxChar *) wxGetTextFromUserPromptStr = wxT("Input Text");
WXDLLEXPORT_DATA(const wxChar *) wxGetPasswordFromUserPromptStr = wxT("Enter Password"); WXDLLEXPORT_DATA(const wxChar *) wxGetPasswordFromUserPromptStr = wxT("Enter Password");
WXDLLEXPORT_DATA(const wxChar *) wxMessageBoxCaptionStr = wxT("Message"); WXDLLEXPORT_DATA(const wxChar *) wxMessageBoxCaptionStr = wxT("Message");
WXDLLEXPORT_DATA(const wxChar *) wxFileSelectorPromptStr = wxT("Select a file"); WXDLLEXPORT_DATA(const wxChar *) wxFileSelectorPromptStr = wxT("Select a file");
// Other default strings
WXDLLEXPORT_DATA(const wxChar *) wxFileSelectorDefaultWildcardStr = WXDLLEXPORT_DATA(const wxChar *) wxFileSelectorDefaultWildcardStr =
#if defined(__WXMSW__) || defined(__WXOS2__) #if defined(__WXMSW__) || defined(__WXOS2__)
wxT("*.*") wxT("*.*")
@@ -147,7 +153,6 @@ WXDLLEXPORT_DATA(const wxChar *) wxFileSelectorDefaultWildcardStr =
wxT("*") wxT("*")
#endif #endif
; ;
WXDLLEXPORT_DATA(const wxChar *) wxTreeCtrlNameStr = wxT("treeCtrl");
WXDLLEXPORT_DATA(const wxChar *) wxDirDialogNameStr = wxT("wxDirCtrl"); WXDLLEXPORT_DATA(const wxChar *) wxDirDialogNameStr = wxT("wxDirCtrl");
WXDLLEXPORT_DATA(const wxChar *) wxDirDialogDefaultFolderStr = wxT("/"); WXDLLEXPORT_DATA(const wxChar *) wxDirDialogDefaultFolderStr = wxT("/");

View File

@@ -27,32 +27,6 @@
#include "wx/string.h" #include "wx/string.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/log.h"
#include "wx/imaglist.h"
#include "wx/event.h"
#include "wx/control.h"
#include "wx/notebook.h"
#include "wx/app.h"
#include "wx/palmos/private.h"
#include "wx/palmos/winundef.h"
#if wxUSE_UXTHEME
#include "wx/palmos/uxtheme.h"
#include "wx/radiobut.h"
#include "wx/radiobox.h"
#include "wx/checkbox.h"
#include "wx/bmpbuttn.h"
#include "wx/statline.h"
#include "wx/statbox.h"
#include "wx/stattext.h"
#include "wx/slider.h"
#include "wx/scrolwin.h"
#include "wx/panel.h"
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// macros // macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -60,26 +34,6 @@
// check that the page index is valid // check that the page index is valid
#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) #define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
// hide the ugly cast
#define m_hwnd (HWND)GetHWND()
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// This is a work-around for missing defines in gcc-2.95 headers
#ifndef TCS_RIGHT
#define TCS_RIGHT 0x0002
#endif
#ifndef TCS_VERTICAL
#define TCS_VERTICAL 0x0080
#endif
#ifndef TCS_BOTTOM
#define TCS_BOTTOM TCS_RIGHT
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event table // event table
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -225,23 +179,18 @@ bool wxNotebook::Create(wxWindow *parent,
return false; return false;
} }
WXDWORD wxNotebook::MSWGetStyle(long style, WXDWORD *exstyle) const
{
return 0;
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxNotebook accessors // wxNotebook accessors
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
size_t wxNotebook::GetPageCount() const size_t wxNotebook::GetPageCount() const
{ {
return 0; return 0;
} }
int wxNotebook::GetRowCount() const int wxNotebook::GetRowCount() const
{ {
return 0; return 0;
} }
int wxNotebook::SetSelection(size_t nPage) int wxNotebook::SetSelection(size_t nPage)
@@ -256,14 +205,12 @@ bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
wxString wxNotebook::GetPageText(size_t nPage) const wxString wxNotebook::GetPageText(size_t nPage) const
{ {
wxString str; return wxEmptyString;
return str;
} }
int wxNotebook::GetPageImage(size_t nPage) const int wxNotebook::GetPageImage(size_t nPage) const
{ {
return -1; return -1;
} }
bool wxNotebook::SetPageImage(size_t nPage, int nImage) bool wxNotebook::SetPageImage(size_t nPage, int nImage)
@@ -313,7 +260,7 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
// remove all pages // remove all pages
bool wxNotebook::DeleteAllPages() bool wxNotebook::DeleteAllPages()
{ {
return true; return true;
} }
// same as AddPage() but does it at given position // same as AddPage() but does it at given position
@@ -344,11 +291,6 @@ void wxNotebook::OnSelChange(wxNotebookEvent& event)
{ {
} }
bool wxNotebook::MSWTranslateMessage(WXMSG *wxmsg)
{
return false;
}
void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event) void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
{ {
} }
@@ -372,41 +314,4 @@ bool wxNotebook::DoPhase(int WXUNUSED(nPhase))
#endif // wxUSE_CONSTRAINTS #endif // wxUSE_CONSTRAINTS
// ----------------------------------------------------------------------------
// wxNotebook Windows message handlers
// ----------------------------------------------------------------------------
bool wxNotebook::MSWOnScroll(int orientation, WXWORD nSBCode,
WXWORD pos, WXHWND control)
{
return false;
}
bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result)
{
return false;
}
// Windows only: attempts to get colour for UX theme page background
wxColour wxNotebook::GetThemeBackgroundColour()
{
return wxColour;
}
// Windows only: attempts to apply the UX theme page background to this page
#if wxUSE_UXTHEME
void wxNotebook::ApplyThemeBackground(wxWindow* window, const wxColour& colour)
#else
void wxNotebook::ApplyThemeBackground(wxWindow*, const wxColour&)
#endif
{
}
#if wxUSE_UXTHEME
WXLRESULT wxNotebook::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
return 0;
}
#endif // #if wxUSE_UXTHEME
#endif // wxUSE_NOTEBOOK #endif // wxUSE_NOTEBOOK