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.
\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.
@@ -141,7 +141,7 @@ the list.
\membersection{wxNotebook::Create}\label{wxnotebookcreate}
\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
of the parameters.

View File

@@ -31,7 +31,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNOTEBOOK_NAME)
const wxString& name = wxNotebookNameStr)
{
Create(parent, winid, pos, size, style, name);
}
@@ -40,7 +40,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNOTEBOOK_NAME);
const wxString& name = wxNotebookNameStr);
virtual ~wxNotebook();
// ------------------------------------------------------------------------
@@ -94,7 +94,7 @@ public:
bool InsertPage( size_t position,
wxNotebookPage *win,
const wxString& strText,
bool bSelect = FALSE,
bool bSelect = false,
int imageId = -1 );
protected:

View File

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

View File

@@ -39,14 +39,14 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("notebook"));
const wxString& name = wxNotebookNameStr);
// Create() function
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("notebook"));
const wxString& name = wxNotebookNameStr);
// dtor
virtual ~wxNotebook();
@@ -89,7 +89,7 @@ public:
bool InsertPage( size_t position,
wxNotebookPage *win,
const wxString& strText,
bool bSelect = FALSE,
bool bSelect = false,
int imageId = -1 );
// handler for tab navigation
@@ -127,7 +127,7 @@ public:
// selection internally instead of querying the notebook for it
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;
protected:

View File

@@ -39,14 +39,14 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("notebook"));
const wxString& name = wxNotebookNameStr);
// Create() function
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("notebook"));
const wxString& name = wxNotebookNameStr);
// dtor
virtual ~wxNotebook();
@@ -89,7 +89,7 @@ public:
bool InsertPage( size_t position,
wxNotebookPage *win,
const wxString& strText,
bool bSelect = FALSE,
bool bSelect = false,
int imageId = -1 );
// handler for tab navigation
@@ -127,7 +127,7 @@ public:
// selection internally instead of querying the notebook for it
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;
protected:

View File

@@ -48,14 +48,14 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("notebook"));
const wxString& name = wxNotebookNameStr);
// Create() function
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxT("notebook"));
const wxString& name = wxNotebookNameStr);
// dtor
~wxNotebook();
@@ -92,7 +92,7 @@ public:
int GetPageCount() const;
// 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
@@ -107,7 +107,7 @@ public:
bool InsertPage(size_t nPage,
wxNotebookPage *pPage,
const wxString& strText,
bool bSelect = FALSE,
bool bSelect = false,
int imageId = -1);
/*
// get the panel which represents the given page
@@ -124,7 +124,7 @@ public:
// --------------
#if wxUSE_CONSTRAINTS
virtual void SetConstraintSizes(bool recurse = TRUE);
virtual void SetConstraintSizes(bool recurse = true);
virtual bool DoPhase(int nPhase);
#endif

View File

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

View File

@@ -41,7 +41,11 @@ enum
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
@@ -60,7 +64,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNOTEBOOK_NAME) ;
const wxString& name = wxNotebookNameStr) ;
// wxNotebook-specific additions to wxBookCtrlBase interface
// ---------------------------------------------------------

View File

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

View File

@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// 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
// Modified by:
// Created: 10/13/04
@@ -57,25 +57,29 @@ class WXDLLEXPORT wxNotebook : public wxNotebookBase
public:
// ctors
// -----
// default for dynamic class
wxNotebook();
// the same arguments as for wxControl (@@@ any special styles?)
wxNotebook(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNOTEBOOK_NAME);
const wxString& name = wxNotebookNameStr);
// Create() function
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxNOTEBOOK_NAME);
const wxString& name = wxNotebookNameStr);
// accessors
// ---------
// get number of pages in the dialog
virtual size_t GetPageCount() const;
@@ -83,6 +87,7 @@ public:
// selected one (or -1 on error)
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
int SetSelection(size_t nPage);
// get the currently selected page
int GetSelection() const { return m_nSelection; }
@@ -112,9 +117,6 @@ public:
// set the padding between tabs (in pixels)
void SetPadding(const wxSize& padding);
// Windows only: attempts to get colour for UX theme page background
wxColour GetThemeBackgroundColour();
// operations
// ----------
// remove all pages
@@ -125,7 +127,7 @@ public:
bool InsertPage(size_t nPage,
wxNotebookPage *pPage,
const wxString& strText,
bool bSelect = FALSE,
bool bSelect = false,
int imageId = -1);
void AddPageInfo( wxNotebookPageInfo* info ) { AddPage( info->GetPage() , info->GetText() , info->GetSelected() , info->GetImageId() ) ; }
@@ -135,9 +137,6 @@ public:
// style.
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
virtual int HitTest(const wxPoint& pt, long *flags = NULL) const;
@@ -153,13 +152,8 @@ public:
// 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
virtual void SetConstraintSizes(bool recurse = TRUE);
virtual void SetConstraintSizes(bool recurse = true);
virtual bool DoPhase(int nPhase);
#endif // wxUSE_CONSTRAINTS
@@ -167,20 +161,12 @@ protected:
// common part of all ctors
void Init();
// translate wxWin styles to the Windows ones
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
// remove one page from the notebook, without deleting
virtual wxNotebookPage *DoRemovePage(size_t nPage);
// set the size of the given page to fit in the notebook
void AdjustPageSize(wxNotebookPage *page);
// override WndProc.
#if wxUSE_UXTHEME
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
#endif
// the current selection (-1 if none)
int m_nSelection;

View File

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

View File

@@ -110,6 +110,7 @@ wxColour wxNullColour;
// Default window names
WXDLLEXPORT_DATA(const wxChar *) wxControlNameStr = wxT("control");
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 *) wxCheckBoxNameStr = wxT("check");
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 *) wxStaticBitmapNameStr = wxT("message");
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 *) wxRadioBoxNameStr = wxT("radioBox");
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 *) wxSliderNameStr = wxT("slider");
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 *) wxTextCtrlNameStr = wxT("text");
WXDLLEXPORT_DATA(const wxChar *) wxVirtListBoxNameStr = wxT("virtListBox");
WXDLLEXPORT_DATA(const wxChar *) wxButtonBarNameStr = wxT("buttonbar");
WXDLLEXPORT_DATA(const wxChar *) wxTreeCtrlNameStr = wxT("treeCtrl");
WXDLLEXPORT_DATA(const wxChar *) wxEnhDialogNameStr = wxT("Shell");
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 *) wxGetPasswordFromUserPromptStr = wxT("Enter Password");
WXDLLEXPORT_DATA(const wxChar *) wxMessageBoxCaptionStr = wxT("Message");
WXDLLEXPORT_DATA(const wxChar *) wxFileSelectorPromptStr = wxT("Select a file");
// Other default strings
WXDLLEXPORT_DATA(const wxChar *) wxFileSelectorDefaultWildcardStr =
#if defined(__WXMSW__) || defined(__WXOS2__)
wxT("*.*")
@@ -147,7 +153,6 @@ WXDLLEXPORT_DATA(const wxChar *) wxFileSelectorDefaultWildcardStr =
wxT("*")
#endif
;
WXDLLEXPORT_DATA(const wxChar *) wxTreeCtrlNameStr = wxT("treeCtrl");
WXDLLEXPORT_DATA(const wxChar *) wxDirDialogNameStr = wxT("wxDirCtrl");
WXDLLEXPORT_DATA(const wxChar *) wxDirDialogDefaultFolderStr = wxT("/");

View File

@@ -27,32 +27,6 @@
#include "wx/string.h"
#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
// ----------------------------------------------------------------------------
@@ -60,26 +34,6 @@
// check that the page index is valid
#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
// ----------------------------------------------------------------------------
@@ -225,11 +179,6 @@ bool wxNotebook::Create(wxWindow *parent,
return false;
}
WXDWORD wxNotebook::MSWGetStyle(long style, WXDWORD *exstyle) const
{
return 0;
}
// ----------------------------------------------------------------------------
// wxNotebook accessors
// ----------------------------------------------------------------------------
@@ -256,9 +205,7 @@ bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
wxString wxNotebook::GetPageText(size_t nPage) const
{
wxString str;
return str;
return wxEmptyString;
}
int wxNotebook::GetPageImage(size_t nPage) const
@@ -344,11 +291,6 @@ void wxNotebook::OnSelChange(wxNotebookEvent& event)
{
}
bool wxNotebook::MSWTranslateMessage(WXMSG *wxmsg)
{
return false;
}
void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
{
}
@@ -372,41 +314,4 @@ bool wxNotebook::DoPhase(int WXUNUSED(nPhase))
#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