projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed rpmfiles.lst
[wxWidgets.git]
/
src
/
mac
/
notebmac.cpp
diff --git
a/src/mac/notebmac.cpp
b/src/mac/notebmac.cpp
index 9d0b2c4593ac775fe13c9b03577f2de74319bc1d..88e098ac96b03b8c1618c9979b6df9331d91ce5a 100644
(file)
--- a/
src/mac/notebmac.cpp
+++ b/
src/mac/notebmac.cpp
@@
-17,14
+17,14
@@
// headers
// ----------------------------------------------------------------------------
#ifdef __GNUG__
// headers
// ----------------------------------------------------------------------------
#ifdef __GNUG__
-#pragma implementation "notebook.h"
+
#pragma implementation "notebook.h"
#endif
#endif
-#include
<wx/string.h>
-#include
<wx/log.h>
-#include
<wx/imaglist.h>
-#include
<wx/notebook.h>
-#include
<wx/mac/uma.h>
+#include
"wx/string.h"
+#include
"wx/log.h"
+#include
"wx/imaglist.h"
+#include
"wx/notebook.h"
+#include
"wx/mac/uma.h"
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
@@
-32,7
+32,7
@@
// check that the page index is valid
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
// check that the page index is valid
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
-#ifdef __
WXMAC_X
__
+#ifdef __
DARWIN
__
// I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam)
const short kwxMacTabLeftMargin = 20 ;
const short kwxMacTabTopMargin = 38 ;
// I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam)
const short kwxMacTabLeftMargin = 20 ;
const short kwxMacTabTopMargin = 38 ;
@@
-76,7
+76,7
@@
IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
// common part of all ctors
void wxNotebook::Init()
{
// common part of all ctors
void wxNotebook::Init()
{
-#ifdef __
WXMAC_X
__
+#ifdef __
DARWIN
__
m_macHorizontalBorder = 7;
m_macVerticalBorder = 8;
#endif
m_macHorizontalBorder = 7;
m_macVerticalBorder = 8;
#endif
@@
-115,7
+115,7
@@
bool wxNotebook::Create(wxWindow *parent,
MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
MacPreControlCreate( parent , id , "" , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
- m_macControl =
UMA
NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1,
+ m_macControl =
::
NewControl( parent->GetMacRootWindow() , &bounds , title , false , 0 , 0 , 1,
kControlTabSmallProc , (long) this ) ;
MacPostControlCreate() ;
kControlTabSmallProc , (long) this ) ;
MacPostControlCreate() ;
@@
-149,7
+149,8
@@
void wxNotebook::SetPageSize(const wxSize& size)
int wxNotebook::SetSelection(int nPage)
{
int wxNotebook::SetSelection(int nPage)
{
- wxASSERT( IS_VALID_PAGE(nPage) );
+ if( !IS_VALID_PAGE(nPage) )
+ return m_nSelection ;
ChangePage(m_nSelection, nPage);
SetControlValue( m_macControl , m_nSelection + 1 ) ;
ChangePage(m_nSelection, nPage);
SetControlValue( m_macControl , m_nSelection + 1 ) ;
@@
-202,7
+203,7
@@
wxNotebookPage* wxNotebook::DoRemovePage(int nPage)
{
wxCHECK( IS_VALID_PAGE(nPage), NULL );
wxNotebookPage* page = m_pages[nPage] ;
{
wxCHECK( IS_VALID_PAGE(nPage), NULL );
wxNotebookPage* page = m_pages[nPage] ;
- m_pages.Remove(nPage);
+ m_pages.Remove
At
(nPage);
MacSetupTabs();
MacSetupTabs();