wx/wxprec.h already includes wx/defs.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-18 09:05:00 +00:00
parent ce3e37f1ec
commit 18f3decb46
28 changed files with 710 additions and 638 deletions

View File

@@ -19,7 +19,6 @@
#include "wx/app.h" #include "wx/app.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/defs.h"
#include "wx/object.h" #include "wx/object.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/timer.h" #include "wx/timer.h"
@@ -2301,4 +2300,3 @@ IMPLEMENT_DYNAMIC_CLASS(wxSocketModule, wxModule)
#endif #endif
// wxUSE_SOCKETS // wxUSE_SOCKETS

View File

@@ -1,21 +1,20 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: generic/imaglist.cpp // Name: src/mac/carbon/imaglist.cpp
// Purpose: // Purpose:
// Author: Robert Roebling // Author: Robert Roebling
// Id: $id$ // RCS_ID: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_IMAGLIST
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/defs.h" #if wxUSE_IMAGLIST
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/image.h" #include "wx/image.h"
@@ -262,4 +261,3 @@ bool wxImageList::Draw(
} }
#endif // wxUSE_IMAGLIST #endif // wxUSE_IMAGLIST

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: app.cpp // Name: src/mac/classic/app.cpp
// Purpose: wxApp // Purpose: wxApp
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -9,7 +9,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/window.h" #include "wx/window.h"
#include "wx/frame.h" #include "wx/frame.h"
@@ -72,10 +76,10 @@ extern size_t g_numberOfThreads;
// statics for implementation // statics for implementation
static bool s_inYield = FALSE; static bool s_inYield = false;
#if TARGET_CARBON #if TARGET_CARBON
static bool s_inReceiveEvent = FALSE ; static bool s_inReceiveEvent = false ;
static EventTime sleepTime = kEventDurationNoWait ; static EventTime sleepTime = kEventDurationNoWait ;
#else #else
static long sleepTime = 0 ; static long sleepTime = 0 ;
@@ -229,7 +233,7 @@ short wxApp::MacHandleAEQuit(const WXEVENTREF WXUNUSED(event) , WXEVENTREF WXUNU
{ {
wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, s_macExitMenuItemId); wxCommandEvent exitEvent(wxEVT_COMMAND_MENU_SELECTED, s_macExitMenuItemId);
if (!win->ProcessEvent(exitEvent)) if (!win->ProcessEvent(exitEvent))
win->Close(TRUE ) ; win->Close(true) ;
} }
else else
{ {
@@ -273,7 +277,7 @@ void wxApp::MacPrintFile(const wxString & fileName )
if (printout) if (printout)
{ {
wxPrinter printer; wxPrinter printer;
printer.Print(view->GetFrame(), printout, TRUE); printer.Print(view->GetFrame(), printout, true);
delete printout; delete printout;
} }
} }
@@ -629,7 +633,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
UMAShowArrowCursor() ; UMAShowArrowCursor() ;
ParamText("\pFatal Error", message, (ConstStr255Param)"\p", (ConstStr255Param)"\p"); ParamText("\pFatal Error", message, (ConstStr255Param)"\p", (ConstStr255Param)"\p");
itemHit = Alert(128, nil); itemHit = Alert(128, nil);
return FALSE ; return false ;
} }
#ifndef __DARWIN__ #ifndef __DARWIN__
@@ -735,7 +739,7 @@ bool wxApp::OnInitGui()
#endif #endif
} }
return TRUE ; return true ;
} }
void wxApp::CleanUp() void wxApp::CleanUp()
@@ -1069,18 +1073,18 @@ pascal OSStatus wxMacApplicationEventHandler( EventHandlerCallRef handler , Even
wxApp::wxApp() wxApp::wxApp()
{ {
m_printMode = wxPRINT_WINDOWS; m_printMode = wxPRINT_WINDOWS;
m_auto3D = TRUE; m_auto3D = true;
m_macCurrentEvent = NULL ; m_macCurrentEvent = NULL ;
#if TARGET_CARBON #if TARGET_CARBON
m_macCurrentEventHandlerCallRef = NULL ; m_macCurrentEventHandlerCallRef = NULL ;
#endif #endif
} }
int wxApp::MainLoop() int wxApp::MainLoop()
{ {
m_keepGoing = TRUE; m_keepGoing = true;
while (m_keepGoing) while (m_keepGoing)
{ {
@@ -1092,7 +1096,7 @@ int wxApp::MainLoop()
void wxApp::ExitMainLoop() void wxApp::ExitMainLoop()
{ {
m_keepGoing = FALSE; m_keepGoing = false;
} }
// Is a message/event pending? // Is a message/event pending?
@@ -1145,7 +1149,7 @@ void wxApp::Exit()
void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event)) void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event))
{ {
if (GetTopWindow()) if (GetTopWindow())
GetTopWindow()->Close(TRUE); GetTopWindow()->Close(true);
} }
// Default behaviour: close the application with prompts. The // Default behaviour: close the application with prompts. The
@@ -1155,7 +1159,7 @@ void wxApp::OnQueryEndSession(wxCloseEvent& event)
if (GetTopWindow()) if (GetTopWindow())
{ {
if (!GetTopWindow()->Close(!event.CanVeto())) if (!GetTopWindow()->Close(!event.CanVeto()))
event.Veto(TRUE); event.Veto(true);
} }
} }
@@ -1176,10 +1180,10 @@ bool wxApp::Yield(bool onlyIfNeeded)
wxFAIL_MSG( wxT("wxYield called recursively" ) ); wxFAIL_MSG( wxT("wxYield called recursively" ) );
} }
return FALSE; return false;
} }
s_inYield = TRUE; s_inYield = true;
#if wxUSE_THREADS #if wxUSE_THREADS
YieldToAnyThread() ; YieldToAnyThread() ;
@@ -1230,9 +1234,9 @@ bool wxApp::Yield(bool onlyIfNeeded)
#endif #endif
wxMacProcessNotifierAndPendingEvents() ; wxMacProcessNotifierAndPendingEvents() ;
s_inYield = FALSE; s_inYield = false;
return TRUE; return true;
} }
// platform specifics // platform specifics
@@ -1508,7 +1512,7 @@ void wxApp::MacHandleHighLevelEvent( WXEVENTREF evr )
{ {
// we must avoid reentrancy problems when processing high level events eg printing // we must avoid reentrancy problems when processing high level events eg printing
bool former = s_inYield ; bool former = s_inYield ;
s_inYield = TRUE ; s_inYield = true ;
EventRecord* ev = (EventRecord*) evr ; EventRecord* ev = (EventRecord*) evr ;
::AEProcessAppleEvent( ev ) ; ::AEProcessAppleEvent( ev ) ;
s_inYield = former ; s_inYield = former ;
@@ -1973,7 +1977,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
} }
if (!handled) if (!handled)
{ {
event.Skip( FALSE ) ; event.Skip( false ) ;
event.SetEventType( wxEVT_CHAR ) ; event.SetEventType( wxEVT_CHAR ) ;
// raw value again // raw value again
event.m_keyCode = realkeyval ; event.m_keyCode = realkeyval ;
@@ -2202,7 +2206,7 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr )
bool controlDown = ev->modifiers & controlKey ; // for simulating right mouse bool controlDown = ev->modifiers & controlKey ; // for simulating right mouse
event.m_leftDown = isDown && !controlDown; event.m_leftDown = isDown && !controlDown;
event.m_middleDown = FALSE; event.m_middleDown = false;
event.m_rightDown = isDown && controlDown; event.m_rightDown = isDown && controlDown;
event.m_shiftDown = ev->modifiers & shiftKey; event.m_shiftDown = ev->modifiers & shiftKey;
event.m_controlDown = ev->modifiers & controlKey; event.m_controlDown = ev->modifiers & controlKey;
@@ -2303,7 +2307,7 @@ void wxApp::MacHandleMouseMovedEvent(wxInt32 x , wxInt32 y ,wxUint32 modifiers ,
event.m_leftDown = isDown && !controlDown; event.m_leftDown = isDown && !controlDown;
event.m_middleDown = FALSE; event.m_middleDown = false;
event.m_rightDown = isDown && controlDown; event.m_rightDown = isDown && controlDown;
event.m_shiftDown = modifiers & shiftKey; event.m_shiftDown = modifiers & shiftKey;

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: bitmap.cpp // Name: src/mac/classic/bitmap.cpp
// Purpose: wxBitmap // Purpose: wxBitmap
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -9,7 +9,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/icon.h" #include "wx/icon.h"
@@ -353,7 +357,7 @@ wxBitmapRefData::wxBitmapRefData()
: m_width(0) : m_width(0)
, m_height(0) , m_height(0)
, m_depth(0) , m_depth(0)
, m_ok(FALSE) , m_ok(false)
, m_numColors(0) , m_numColors(0)
, m_quality(0) , m_quality(0)
{ {
@@ -508,12 +512,12 @@ wxBitmap::wxBitmap(const wxString& filename, wxBitmapType type)
bool wxBitmap::CreateFromXpm(const char **bits) bool wxBitmap::CreateFromXpm(const char **bits)
{ {
wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") ); wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") );
wxXPMDecoder decoder; wxXPMDecoder decoder;
wxImage img = decoder.ReadData(bits); wxImage img = decoder.ReadData(bits);
wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") ); wxCHECK_MSG( img.Ok(), false, wxT("invalid bitmap data") );
*this = wxBitmap(img); *this = wxBitmap(img);
return TRUE; return true;
} }
wxBitmap::wxBitmap(const char **bits) wxBitmap::wxBitmap(const char **bits)
@@ -710,7 +714,7 @@ bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int
if ( handler == NULL ) { if ( handler == NULL ) {
wxLogWarning(wxT("no bitmap handler for type %d defined."), type); wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
return FALSE; return false;
} }
return handler->Create(this, data, type, width, height, depth); return handler->Create(this, data, type, width, height, depth);
@@ -1162,7 +1166,7 @@ bool wxMask::Create(const wxBitmap& bitmap)
UnlockPixels( GetGWorldPixMap( (GWorldPtr) m_maskBitmap) ); UnlockPixels( GetGWorldPixMap( (GWorldPtr) m_maskBitmap) );
UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP()) ); UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP()) );
return FALSE; return false;
} }
// Create a mask from a bitmap and a palette index indicating // Create a mask from a bitmap and a palette index indicating
@@ -1171,7 +1175,7 @@ bool wxMask::Create(const wxBitmap& bitmap, int paletteIndex)
{ {
// TODO // TODO
wxCHECK_MSG( 0, false, wxT("wxMask::Create not yet implemented")); wxCHECK_MSG( 0, false, wxT("wxMask::Create not yet implemented"));
return FALSE; return false;
} }
// Create a mask from a bitmap and a colour indicating // Create a mask from a bitmap and a colour indicating
@@ -1226,7 +1230,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP() ) ) ; UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP() ) ) ;
SetGWorld( origPort , origDevice ) ; SetGWorld( origPort , origDevice ) ;
return TRUE; return true;
} }
bool wxMask::PointMasked(int x, int y) bool wxMask::PointMasked(int x, int y)
@@ -1260,18 +1264,18 @@ wxBitmapHandler::~wxBitmapHandler()
bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth) bool wxBitmapHandler::Create(wxBitmap *bitmap, void *data, long type, int width, int height, int depth)
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags, bool wxBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight) int desiredWidth, int desiredHeight)
{ {
return FALSE; return false;
} }
bool wxBitmapHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette) bool wxBitmapHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette)
{ {
return FALSE; return false;
} }
/* /*
@@ -1317,9 +1321,9 @@ bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, lo
M_BITMAPHANDLERDATA->m_numColors = theInfo.uniqueColors ; M_BITMAPHANDLERDATA->m_numColors = theInfo.uniqueColors ;
// M_BITMAPHANDLERDATA->m_bitmapPalette; // M_BITMAPHANDLERDATA->m_bitmapPalette;
// M_BITMAPHANDLERDATA->m_quality; // M_BITMAPHANDLERDATA->m_quality;
return TRUE ; return true ;
} }
return FALSE ; return false ;
} }
void wxBitmap::InitStandardHandlers() void wxBitmap::InitStandardHandlers()

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: button.cpp // Name: src/mac/classic/button.cpp
// Purpose: wxButton // Purpose: wxButton
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/button.h" #include "wx/button.h"
#include "wx/panel.h" #include "wx/panel.h"
@@ -53,7 +57,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl,
MacPostControlCreate() ; MacPostControlCreate() ;
return TRUE; return true;
} }
void wxButton::SetDefault() void wxButton::SetDefault()
@@ -84,13 +88,13 @@ void wxButton::SetDefault()
wxSize wxButton::DoGetBestSize() const wxSize wxButton::DoGetBestSize() const
{ {
wxSize sz = GetDefaultSize() ; wxSize sz = GetDefaultSize() ;
int wBtn = m_label.Length() * 8 + 12 + 2 * kMacOSXHorizontalBorder ; int wBtn = m_label.Length() * 8 + 12 + 2 * kMacOSXHorizontalBorder ;
if (wBtn > sz.x) sz.x = wBtn; if (wBtn > sz.x) sz.x = wBtn;
return sz ; return sz ;
} }
wxSize wxButton::GetDefaultSize() wxSize wxButton::GetDefaultSize()
@@ -128,4 +132,3 @@ void wxButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 contr
ProcessCommand(event); ProcessCommand(event);
} }
} }

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: checkbox.cpp // Name: src/mac/classic/checkbox.cpp
// Purpose: wxCheckBox // Purpose: wxCheckBox
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/checkbox.h" #include "wx/checkbox.h"
@@ -44,7 +48,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
MacPostControlCreate() ; MacPostControlCreate() ;
return TRUE; return true;
} }
void wxCheckBox::SetValue(bool val) void wxCheckBox::SetValue(bool val)
@@ -143,7 +147,7 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id,
// TODO: Create the bitmap checkbox // TODO: Create the bitmap checkbox
return FALSE; return false;
} }
void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap) void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap)
@@ -167,7 +171,5 @@ bool wxBitmapCheckBox::GetValue() const
{ {
// TODO // TODO
wxFAIL_MSG(wxT("wxBitmapCheckBox::GetValue() not yet implemented")); wxFAIL_MSG(wxT("wxBitmapCheckBox::GetValue() not yet implemented"));
return FALSE; return false;
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: control.cpp // Name: src/mac/classic/control.cpp
// Purpose: wxControl class // Purpose: wxControl class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -9,7 +9,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/control.h" #include "wx/control.h"
#include "wx/panel.h" #include "wx/panel.h"
@@ -178,7 +182,7 @@ bool wxControl::Create(wxWindow *parent, wxWindowID id,
wxControl::~wxControl() wxControl::~wxControl()
{ {
m_isBeingDeleted = TRUE; m_isBeingDeleted = true;
wxRemoveMacControlAssociation( this ) ; wxRemoveMacControlAssociation( this ) ;
// If we delete an item, we should initialize the parent panel, // If we delete an item, we should initialize the parent panel,
// because it could now be invalid. // because it could now be invalid.
@@ -203,7 +207,7 @@ void wxControl::SetLabel(const wxString& title)
if ( m_macControl ) if ( m_macControl )
{ {
UMASetControlTitle( (ControlHandle) m_macControl , m_label , m_font.GetEncoding() ) ; UMASetControlTitle( (ControlHandle) m_macControl , m_label , m_font.GetEncoding() ) ;
} }
Refresh() ; Refresh() ;
} }
@@ -452,7 +456,7 @@ void wxControl::MacAdjustControlRect()
m_height += 2 * m_macVerticalBorder + MacGetTopBorderSize() + MacGetBottomBorderSize() ; m_height += 2 * m_macVerticalBorder + MacGetTopBorderSize() + MacGetBottomBorderSize() ;
} }
MacUpdateDimensions() ; MacUpdateDimensions() ;
} }
} }
@@ -512,7 +516,7 @@ void wxControl::MacSuperChangedPosition()
void wxControl::MacSuperEnabled( bool enabled ) void wxControl::MacSuperEnabled( bool enabled )
{ {
Refresh(FALSE) ; Refresh(false) ;
wxWindow::MacSuperEnabled( enabled ) ; wxWindow::MacSuperEnabled( enabled ) ;
} }
@@ -569,7 +573,7 @@ void wxControl::DoSetSize(int x, int y,
bool wxControl::Show(bool show) bool wxControl::Show(bool show)
{ {
if ( !wxWindow::Show( show ) ) if ( !wxWindow::Show( show ) )
return FALSE ; return false ;
if ( (ControlHandle) m_macControl ) if ( (ControlHandle) m_macControl )
{ {
@@ -590,13 +594,13 @@ bool wxControl::Show(bool show)
} }
} }
} }
return TRUE ; return true ;
} }
bool wxControl::Enable(bool enable) bool wxControl::Enable(bool enable)
{ {
if ( !wxWindow::Enable(enable) ) if ( !wxWindow::Enable(enable) )
return FALSE; return false;
if ( (ControlHandle) m_macControl ) if ( (ControlHandle) m_macControl )
{ {
@@ -605,7 +609,7 @@ bool wxControl::Enable(bool enable)
else else
UMADeactivateControl( (ControlHandle) m_macControl ) ; UMADeactivateControl( (ControlHandle) m_macControl ) ;
} }
return TRUE ; return true ;
} }
void wxControl::Refresh(bool eraseBack, const wxRect *rect) void wxControl::Refresh(bool eraseBack, const wxRect *rect)
@@ -729,7 +733,7 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
} }
else else
{ {
event.Skip() ; event.Skip() ;
} }
} }
@@ -756,9 +760,9 @@ void wxControl::DoSetWindowVariant( wxWindowVariant variant )
} }
m_windowVariant = variant ; m_windowVariant = variant ;
ControlSize size ; ControlSize size ;
ControlFontStyleRec fontStyle; ControlFontStyleRec fontStyle;
fontStyle.flags = kControlUseFontMask ; fontStyle.flags = kControlUseFontMask ;
// we will get that from the settings later // we will get that from the settings later
// and make this NORMAL later, but first // and make this NORMAL later, but first
@@ -776,33 +780,33 @@ void wxControl::DoSetWindowVariant( wxWindowVariant variant )
{ {
case wxWINDOW_VARIANT_NORMAL : case wxWINDOW_VARIANT_NORMAL :
size = kControlSizeNormal; size = kControlSizeNormal;
fontStyle.font = kControlFontBigSystemFont; fontStyle.font = kControlFontBigSystemFont;
break ; break ;
case wxWINDOW_VARIANT_SMALL : case wxWINDOW_VARIANT_SMALL :
size = kControlSizeSmall; size = kControlSizeSmall;
fontStyle.font = kControlFontSmallSystemFont; fontStyle.font = kControlFontSmallSystemFont;
break ; break ;
case wxWINDOW_VARIANT_MINI : case wxWINDOW_VARIANT_MINI :
if (UMAGetSystemVersion() >= 0x1030 ) if (UMAGetSystemVersion() >= 0x1030 )
{ {
size = 3 ; // not always defined in the header size = 3 ; // not always defined in the header
fontStyle.font = -5 ; // not always defined in the header fontStyle.font = -5 ; // not always defined in the header
} }
else else
{ {
size = kControlSizeSmall; size = kControlSizeSmall;
fontStyle.font = kControlFontSmallSystemFont; fontStyle.font = kControlFontSmallSystemFont;
} }
break; break;
break ; break ;
case wxWINDOW_VARIANT_LARGE : case wxWINDOW_VARIANT_LARGE :
size = kControlSizeLarge; size = kControlSizeLarge;
fontStyle.font = kControlFontBigSystemFont; fontStyle.font = kControlFontBigSystemFont;
break ; break ;
default: default:
wxFAIL_MSG(_T("unexpected window variant")); wxFAIL_MSG(_T("unexpected window variant"));
break ; break ;
} }
::SetControlData( (ControlHandle) m_macControl , kControlEntireControl, kControlSizeTag, sizeof( ControlSize ), &size ); ::SetControlData( (ControlHandle) m_macControl , kControlEntireControl, kControlSizeTag, sizeof( ControlSize ), &size );
::SetControlFontStyle( (ControlHandle) m_macControl , &fontStyle ); ::SetControlFontStyle( (ControlHandle) m_macControl , &fontStyle );
} }

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: cursor.cpp // Name: src/mac/classic/cursor.cpp
// Purpose: wxCursor class // Purpose: wxCursor class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/cursor.h" #include "wx/cursor.h"
@@ -94,12 +98,12 @@ wxCursor::wxCursor(char **bits)
bool wxCursor::CreateFromXpm(const char **bits) bool wxCursor::CreateFromXpm(const char **bits)
{ {
wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid cursor data") ); wxCHECK_MSG( bits != NULL, false, wxT("invalid cursor data") );
wxXPMDecoder decoder; wxXPMDecoder decoder;
wxImage img = decoder.ReadData(bits); wxImage img = decoder.ReadData(bits);
wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid cursor data") ); wxCHECK_MSG( img.Ok(), false, wxT("invalid cursor data") );
CreateFromImage( img ) ; CreateFromImage( img ) ;
return TRUE; return true;
} }
short GetCTabIndex( CTabHandle colors , RGBColor *col ) short GetCTabIndex( CTabHandle colors , RGBColor *col )
@@ -305,7 +309,7 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho
if ( flags == wxBITMAP_TYPE_MACCURSOR_RESOURCE ) if ( flags == wxBITMAP_TYPE_MACCURSOR_RESOURCE )
{ {
Str255 theName ; Str255 theName ;
wxMacStringToPascal( cursor_file , theName ) ; wxMacStringToPascal( cursor_file , theName ) ;
wxStAppResource resload ; wxStAppResource resload ;
Handle resHandle = ::GetNamedResource( 'crsr' , theName ) ; Handle resHandle = ::GetNamedResource( 'crsr' , theName ) ;
@@ -514,5 +518,3 @@ void wxSetCursor(const wxCursor& cursor)
{ {
cursor.MacInstall() ; cursor.MacInstall() ;
} }

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: mac/dataobj.cpp // Name: src/mac/classic/dataobj.cpp
// Purpose: implementation of wxDataObject class // Purpose: implementation of wxDataObject class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -9,6 +9,12 @@
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// ============================================================================ // ============================================================================
// declarations // declarations
// ============================================================================ // ============================================================================
@@ -17,13 +23,9 @@
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#endif #endif
#include "wx/defs.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/dataobj.h" #include "wx/dataobj.h"
@@ -166,9 +168,7 @@ bool wxDataObject::IsSupportedFormat(
// wxFileDataObject // wxFileDataObject
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
bool wxFileDataObject::GetDataHere( bool wxFileDataObject::GetDataHere( void* pBuf ) const
void* pBuf
) const
{ {
wxString sFilenames; wxString sFilenames;
@@ -179,7 +179,7 @@ bool wxFileDataObject::GetDataHere(
} }
memcpy(pBuf, sFilenames.mbc_str(), sFilenames.Len() + 1); memcpy(pBuf, sFilenames.mbc_str(), sFilenames.Len() + 1);
return TRUE; return true;
} }
size_t wxFileDataObject::GetDataSize() const size_t wxFileDataObject::GetDataSize() const
@@ -204,7 +204,7 @@ bool wxFileDataObject::SetData(
AddFile(wxString::FromAscii((char*)pBuf)); AddFile(wxString::FromAscii((char*)pBuf));
return TRUE; return true;
} }
void wxFileDataObject::AddFile( void wxFileDataObject::AddFile(
@@ -267,17 +267,15 @@ void wxBitmapDataObject::Clear()
m_pictHandle = NULL ; m_pictHandle = NULL ;
} }
bool wxBitmapDataObject::GetDataHere( bool wxBitmapDataObject::GetDataHere( void* pBuf ) const
void* pBuf
) const
{ {
if (!m_pictHandle) if (!m_pictHandle)
{ {
wxFAIL_MSG(wxT("attempt to copy empty bitmap failed")); wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
return FALSE; return false;
} }
memcpy(pBuf, *(Handle)m_pictHandle, GetHandleSize((Handle)m_pictHandle)); memcpy(pBuf, *(Handle)m_pictHandle, GetHandleSize((Handle)m_pictHandle));
return TRUE; return true;
} }
size_t wxBitmapDataObject::GetDataSize() const size_t wxBitmapDataObject::GetDataSize() const

View File

@@ -1,15 +1,20 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dirdlg.cpp // Name: src/mac/classic/dirdlg.cpp
// Purpose: wxDirDialog // Purpose: wxDirDialog
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/dirdlg.h" #include "wx/dirdlg.h"
@@ -86,7 +91,7 @@ int wxDirDialog::ShowModal()
0L); // User Data 0L); // User Data
if ( (err != noErr) && (err != userCanceledErr) ) { if ( (err != noErr) && (err != userCanceledErr) ) {
m_path = wxT("") ; m_path = wxEmptyString ;
return wxID_CANCEL ; return wxID_CANCEL ;
} }
@@ -98,7 +103,7 @@ int wxDirDialog::ShowModal()
OSErr err = ::AECoerceDesc( &mNavReply.selection , typeFSS, &specDesc); OSErr err = ::AECoerceDesc( &mNavReply.selection , typeFSS, &specDesc);
if ( err != noErr ) { if ( err != noErr ) {
m_path = wxT("") ; m_path = wxEmptyString ;
return wxID_CANCEL ; return wxID_CANCEL ;
} }
folderInfo = **(FSSpec**) specDesc.dataHandle; folderInfo = **(FSSpec**) specDesc.dataHandle;
@@ -124,7 +129,7 @@ int wxDirDialog::ShowModal()
err = ::PBGetCatInfoSync(&thePB); err = ::PBGetCatInfoSync(&thePB);
if ( err != noErr ) { if ( err != noErr ) {
m_path = wxT("") ; m_path = wxEmptyString;
return wxID_CANCEL ; return wxID_CANCEL ;
} }
// Create cannonical FSSpec // Create cannonical FSSpec
@@ -137,4 +142,3 @@ int wxDirDialog::ShowModal()
} }
return wxID_CANCEL; return wxID_CANCEL;
} }

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: dnd.cpp // Name: src/mac/classic/dnd.cpp
// Purpose: wxDropTarget, wxDropSource, wxDataObject implementation // Purpose: wxDropTarget, wxDropSource, wxDataObject implementation
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -9,7 +9,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
@@ -56,7 +60,7 @@ wxDragResult wxDropTarget::OnDragOver( wxCoord WXUNUSED(x),
bool wxDropTarget::OnDrop( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y) ) bool wxDropTarget::OnDrop( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y) )
{ {
if (!m_dataObject) if (!m_dataObject)
return FALSE; return false;
return CurrentDragHasSupportedFormat() ; return CurrentDragHasSupportedFormat() ;
} }
@@ -126,10 +130,10 @@ bool wxDropTarget::CurrentDragHasSupportedFormat()
bool wxDropTarget::GetData() bool wxDropTarget::GetData()
{ {
if (!m_dataObject) if (!m_dataObject)
return FALSE; return false;
if ( !CurrentDragHasSupportedFormat() ) if ( !CurrentDragHasSupportedFormat() )
return FALSE ; return false ;
bool transferred = false ; bool transferred = false ;
if ( gTrackingGlobals.m_currentSource != NULL ) if ( gTrackingGlobals.m_currentSource != NULL )
@@ -228,7 +232,7 @@ bool wxDropTarget::GetData()
} }
} }
} }
return TRUE ; return true ;
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -388,11 +392,11 @@ bool wxDropSource::MacInstallDefaultCursor(wxDragResult effect)
{ {
cursor.MacInstall() ; cursor.MacInstall() ;
return TRUE; return true;
} }
else else
{ {
return FALSE; return false;
} }
} }
@@ -487,11 +491,11 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind
trackingGlobals->m_currentTarget = win->GetDropTarget() ; trackingGlobals->m_currentTarget = win->GetDropTarget() ;
{ {
if ( trackingGlobals->m_currentTarget ) if ( trackingGlobals->m_currentTarget )
{ {
trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag ) ; trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag ) ;
result = trackingGlobals->m_currentTarget->OnEnter( result = trackingGlobals->m_currentTarget->OnEnter(
localx , localy , result ) ; localx , localy , result ) ;
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: filedlg.cpp // Name: src/mac/classic/filedlg.cpp
// Purpose: wxFileDialog // Purpose: wxFileDialog
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -9,7 +9,12 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/app.h" #include "wx/app.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dialog.h" #include "wx/dialog.h"
@@ -183,7 +188,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
// an explanatory text, in that case the first part is name and extension at the same time // an explanatory text, in that case the first part is name and extension at the same time
wxASSERT_MSG( filterIndex == 0 || !isName , wxT("incorrect format of format string") ) ; wxASSERT_MSG( filterIndex == 0 || !isName , wxT("incorrect format of format string") ) ;
if ( current.IsEmpty() ) if ( current.empty() )
myData->extensions.Add( myData->name[filterIndex] ) ; myData->extensions.Add( myData->name[filterIndex] ) ;
else else
myData->extensions.Add( current.MakeUpper() ) ; myData->extensions.Add( current.MakeUpper() ) ;
@@ -200,11 +205,11 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
wxString extension = myData->extensions[i]; wxString extension = myData->extensions[i];
if (extension.GetChar(0) == '*') if (extension.GetChar(0) == '*')
extension = extension.Mid(1); // Remove leading * extension = extension.Mid(1); // Remove leading *
if (extension.GetChar(0) == '.') if (extension.GetChar(0) == '.')
{ {
extension = extension.Mid(1); // Remove leading . extension = extension.Mid(1); // Remove leading .
} }
if (wxFileName::MacFindDefaultTypeAndCreator( extension, &fileType, &creator )) if (wxFileName::MacFindDefaultTypeAndCreator( extension, &fileType, &creator ))
@@ -213,8 +218,8 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
} }
else else
{ {
myData->filtermactypes.Add( '****' ) ; // We'll fail safe if it's not recognized myData->filtermactypes.Add( '****' ) ; // We'll fail safe if it's not recognized
} }
} }
} }
} }
@@ -319,16 +324,16 @@ pascal Boolean CrossPlatformFilterCallback (
CFURLRef fullURLRef; CFURLRef fullURLRef;
fullURLRef = ::CFURLCreateFromFSRef(NULL, &fsref); fullURLRef = ::CFURLCreateFromFSRef(NULL, &fsref);
#ifdef __UNIX__ #ifdef __UNIX__
CFURLPathStyle pathstyle = kCFURLPOSIXPathStyle; CFURLPathStyle pathstyle = kCFURLPOSIXPathStyle;
#else #else
CFURLPathStyle pathstyle = kCFURLHFSPathStyle; CFURLPathStyle pathstyle = kCFURLHFSPathStyle;
#endif #endif
CFStringRef cfString = CFURLCopyFileSystemPath(fullURLRef, pathstyle); CFStringRef cfString = CFURLCopyFileSystemPath(fullURLRef, pathstyle);
::CFRelease( fullURLRef ) ; ::CFRelease( fullURLRef ) ;
wxString file = wxMacCFStringHolder(cfString).AsString(wxFont::GetDefaultEncoding()); wxString file = wxMacCFStringHolder(cfString).AsString(wxFont::GetDefaultEncoding());
display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ; display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
} }
@@ -615,7 +620,7 @@ int wxFileDialog::ShowModal()
OSErr err = ::AEGetNthDesc( &mNavReply.selection , i , typeFSS, &keyWord , &specDesc); OSErr err = ::AEGetNthDesc( &mNavReply.selection , i , typeFSS, &keyWord , &specDesc);
if ( err != noErr ) if ( err != noErr )
{ {
m_path = wxT("") ; m_path = wxEmptyString ;
return wxID_CANCEL ; return wxID_CANCEL ;
} }
outFileSpec = **(FSSpec**) specDesc.dataHandle; outFileSpec = **(FSSpec**) specDesc.dataHandle;
@@ -638,4 +643,3 @@ int wxFileDialog::ShowModal()
return wxID_CANCEL; return wxID_CANCEL;
#endif // TARGET_CARBON #endif // TARGET_CARBON
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: font.cpp // Name: src/mac/classic/font.cpp
// Purpose: wxFont class // Purpose: wxFont class
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
@@ -9,7 +9,12 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/string.h" #include "wx/string.h"
#include "wx/font.h" #include "wx/font.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
@@ -33,7 +38,7 @@ public:
, m_family(wxDEFAULT) , m_family(wxDEFAULT)
, m_style(wxNORMAL) , m_style(wxNORMAL)
, m_weight(wxNORMAL) , m_weight(wxNORMAL)
, m_underlined(FALSE) , m_underlined(false)
, m_faceName(wxT("Geneva")) , m_faceName(wxT("Geneva"))
, m_encoding(wxFONTENCODING_DEFAULT) , m_encoding(wxFONTENCODING_DEFAULT)
, m_macFontNum(0) , m_macFontNum(0)
@@ -41,7 +46,7 @@ public:
, m_macFontStyle(0) , m_macFontStyle(0)
, m_macATSUFontID() , m_macATSUFontID()
{ {
Init(10, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE, Init(10, wxDEFAULT, wxNORMAL, wxNORMAL, false,
wxT("Geneva"), wxFONTENCODING_DEFAULT); wxT("Geneva"), wxFONTENCODING_DEFAULT);
} }
@@ -88,7 +93,7 @@ public:
} }
virtual ~wxFontRefData(); virtual ~wxFontRefData();
void SetNoAntiAliasing( bool no = TRUE ) { m_noAA = no; } void SetNoAntiAliasing( bool no = true ) { m_noAA = no; }
bool GetNoAntiAliasing() const { return m_noAA; } bool GetNoAntiAliasing() const { return m_noAA; }
protected: protected:
@@ -110,7 +115,7 @@ protected:
bool m_underlined; bool m_underlined;
wxString m_faceName; wxString m_faceName;
wxFontEncoding m_encoding; wxFontEncoding m_encoding;
bool m_noAA; // No anti-aliasing bool m_noAA; // No anti-aliasing
public: public:
short m_macFontNum; short m_macFontNum;
@@ -152,7 +157,7 @@ void wxFontRefData::Init(int pointSize,
m_macFontSize = 0; m_macFontSize = 0;
m_macFontStyle = 0; m_macFontStyle = 0;
m_fontId = 0; m_fontId = 0;
m_noAA = FALSE; m_noAA = false;
} }
wxFontRefData::~wxFontRefData() wxFontRefData::~wxFontRefData()
@@ -257,7 +262,7 @@ bool wxFont::Create(int pointSize,
RealizeResource(); RealizeResource();
return TRUE; return true;
} }
wxFont::~wxFont() wxFont::~wxFont()
@@ -267,7 +272,7 @@ wxFont::~wxFont()
bool wxFont::RealizeResource() bool wxFont::RealizeResource()
{ {
M_FONTDATA->MacFindFont() ; M_FONTDATA->MacFindFont() ;
return TRUE; return true;
} }
void wxFont::SetEncoding(wxFontEncoding encoding) void wxFont::SetEncoding(wxFontEncoding encoding)
@@ -434,4 +439,3 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
return &(M_FONTDATA->m_info); return &(M_FONTDATA->m_info);
} }

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: mac/mimetype.cpp // Name: src/mac/classic/mimetype.cpp
// Purpose: classes and functions to manage MIME types // Purpose: classes and functions to manage MIME types
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
@@ -16,10 +16,6 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#if wxUSE_GUI #if wxUSE_GUI

View File

@@ -9,7 +9,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_PALETTE #if wxUSE_PALETTE

View File

@@ -1,28 +1,26 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: printwin.cpp // Name: src/mac/classic/printwin.cpp
// Purpose: wxMacPrinter framework // Purpose: wxMacPrinter framework
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/defs.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#endif #endif
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -193,7 +191,7 @@ void wxMacCarbonPrintData::TransferTo( wxPrintData* data )
// PMDuplexMode not yet accessible via API // PMDuplexMode not yet accessible via API
// PMQualityMode not yet accessible via API // PMQualityMode not yet accessible via API
// todo paperSize // todo paperSize
PMRect rPaper; PMRect rPaper;
err = PMGetUnadjustedPaperRect( m_macPageFormat, &rPaper); err = PMGetUnadjustedPaperRect( m_macPageFormat, &rPaper);
if ( err == noErr ) if ( err == noErr )
{ {
@@ -215,7 +213,7 @@ void wxMacCarbonPrintData::TransferFrom( wxPageSetupData *data )
void wxMacCarbonPrintData::TransferTo( wxPageSetupData* data ) void wxMacCarbonPrintData::TransferTo( wxPageSetupData* data )
{ {
PMRect rPaper; PMRect rPaper;
OSStatus err = PMGetUnadjustedPaperRect(m_macPageFormat, &rPaper); OSStatus err = PMGetUnadjustedPaperRect(m_macPageFormat, &rPaper);
if ( err == noErr ) if ( err == noErr )
{ {
@@ -224,14 +222,14 @@ void wxMacCarbonPrintData::TransferTo( wxPageSetupData* data )
if ( err == noErr ) if ( err == noErr )
{ {
data->SetMinMarginTopLeft( wxPoint ( data->SetMinMarginTopLeft( wxPoint (
(int)(((double) rPage.left - rPaper.left ) * pt2mm) , (int)(((double) rPage.left - rPaper.left ) * pt2mm) ,
(int)(((double) rPage.top - rPaper.top ) * pt2mm) ) ) ; (int)(((double) rPage.top - rPaper.top ) * pt2mm) ) ) ;
data->SetMinMarginBottomRight( wxPoint ( data->SetMinMarginBottomRight( wxPoint (
(wxCoord)(((double) rPaper.right - rPage.right ) * pt2mm), (wxCoord)(((double) rPaper.right - rPage.right ) * pt2mm),
(wxCoord)(((double) rPaper.bottom - rPage.bottom ) * pt2mm)) ) ; (wxCoord)(((double) rPaper.bottom - rPage.bottom ) * pt2mm)) ) ;
} }
} }
} }
void wxMacCarbonPrintData::TransferTo( wxPrintDialogData* data ) void wxMacCarbonPrintData::TransferTo( wxPrintDialogData* data )
@@ -266,34 +264,34 @@ void wxMacCarbonPrintData::CopyFrom( wxNativePrintData* d )
{ {
wxMacCarbonPrintData *data = (wxMacCarbonPrintData*) d ; wxMacCarbonPrintData *data = (wxMacCarbonPrintData*) d ;
if ( data->m_macPrintSession != kPMNoReference ) if ( data->m_macPrintSession != kPMNoReference )
PMRetain( data->m_macPrintSession ) ; PMRetain( data->m_macPrintSession ) ;
if ( m_macPrintSession != kPMNoReference ) if ( m_macPrintSession != kPMNoReference )
{ {
PMRelease( m_macPrintSession ) ; PMRelease( m_macPrintSession ) ;
m_macPrintSession = kPMNoReference ; m_macPrintSession = kPMNoReference ;
} }
if ( data->m_macPrintSession != kPMNoReference ) if ( data->m_macPrintSession != kPMNoReference )
m_macPrintSession = data->m_macPrintSession ; m_macPrintSession = data->m_macPrintSession ;
if ( data->m_macPrintSettings != kPMNoPrintSettings ) if ( data->m_macPrintSettings != kPMNoPrintSettings )
PMRetain( data->m_macPrintSettings ) ; PMRetain( data->m_macPrintSettings ) ;
if ( m_macPrintSettings != kPMNoPrintSettings ) if ( m_macPrintSettings != kPMNoPrintSettings )
{ {
PMRelease( m_macPrintSettings ) ; PMRelease( m_macPrintSettings ) ;
m_macPrintSettings = kPMNoPrintSettings ; m_macPrintSettings = kPMNoPrintSettings ;
} }
if ( data->m_macPrintSettings != kPMNoPrintSettings ) if ( data->m_macPrintSettings != kPMNoPrintSettings )
m_macPrintSettings = data->m_macPrintSettings ; m_macPrintSettings = data->m_macPrintSettings ;
if ( data->m_macPageFormat != kPMNoPageFormat ) if ( data->m_macPageFormat != kPMNoPageFormat )
PMRetain( data->m_macPageFormat ) ; PMRetain( data->m_macPageFormat ) ;
if ( m_macPageFormat != kPMNoPageFormat ) if ( m_macPageFormat != kPMNoPageFormat )
{ {
PMRelease( m_macPageFormat ) ; PMRelease( m_macPageFormat ) ;
m_macPageFormat = kPMNoPageFormat ; m_macPageFormat = kPMNoPageFormat ;
} }
if ( data->m_macPageFormat != kPMNoPageFormat ) if ( data->m_macPageFormat != kPMNoPageFormat )
m_macPageFormat = data->m_macPageFormat ; m_macPageFormat = data->m_macPageFormat ;
} }
int wxMacCarbonPrintData::ShowPrintDialog() int wxMacCarbonPrintData::ShowPrintDialog()
@@ -479,7 +477,7 @@ int wxMacClassicPrintData::ShowPrintDialog()
else else
{ {
message.Printf( wxT("Print Error %d"), err ) ; message.Printf( wxT("Print Error %d"), err ) ;
wxMessageDialog dialog( NULL , message , wxT(""), wxICON_HAND | wxOK) ; wxMessageDialog dialog( NULL , message , wxEmptyString, wxICON_HAND | wxOK) ;
dialog.ShowModal(); dialog.ShowModal();
} }
::UMAPrClose() ; ::UMAPrClose() ;
@@ -529,13 +527,13 @@ wxMacPrinter::~wxMacPrinter(void)
bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
{ {
sm_abortIt = FALSE; sm_abortIt = false;
sm_abortWindow = NULL; sm_abortWindow = NULL;
if (!printout) if (!printout)
return FALSE; return false;
printout->SetIsPreview(FALSE); printout->SetIsPreview(false);
if (m_printDialogData.GetMinPage() < 1) if (m_printDialogData.GetMinPage() < 1)
m_printDialogData.SetMinPage(1); m_printDialogData.SetMinPage(1);
if (m_printDialogData.GetMaxPage() < 1) if (m_printDialogData.GetMaxPage() < 1)
@@ -562,7 +560,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
if (!dc || !dc->Ok()) if (!dc || !dc->Ok())
{ {
if (dc) delete dc; if (dc) delete dc;
return FALSE; return false;
} }
// on the mac we have always pixels as addressing mode with 72 dpi // on the mac we have always pixels as addressing mode with 72 dpi
@@ -593,7 +591,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
if (maxPage == 0) if (maxPage == 0)
{ {
wxEndBusyCursor(); wxEndBusyCursor();
return FALSE; return false;
} }
// Only set min and max, because from and to have been // Only set min and max, because from and to have been
@@ -609,15 +607,15 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
wxEndBusyCursor(); wxEndBusyCursor();
wxMessageBox(wxT("Sorry, could not create an abort dialog."), wxT("Print Error"), wxOK, parent); wxMessageBox(wxT("Sorry, could not create an abort dialog."), wxT("Print Error"), wxOK, parent);
delete dc; delete dc;
return FALSE; return false;
} }
sm_abortWindow = win; sm_abortWindow = win;
sm_abortWindow->Show(TRUE); sm_abortWindow->Show(true);
wxSafeYield(win,true); wxSafeYield(win,true);
printout->OnBeginPrinting(); printout->OnBeginPrinting();
bool keepGoing = TRUE; bool keepGoing = true;
int copyCount; int copyCount;
for (copyCount = 1; copyCount <= m_printDialogData.GetNoCopies(); copyCount ++) for (copyCount = 1; copyCount <= m_printDialogData.GetNoCopies(); copyCount ++)
@@ -637,7 +635,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
{ {
if (sm_abortIt) if (sm_abortIt)
{ {
keepGoing = FALSE; keepGoing = false;
break; break;
} }
else else
@@ -663,7 +661,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
if (sm_abortWindow) if (sm_abortWindow)
{ {
sm_abortWindow->Show(FALSE); sm_abortWindow->Show(false);
delete sm_abortWindow; delete sm_abortWindow;
sm_abortWindow = NULL; sm_abortWindow = NULL;
} }
@@ -672,7 +670,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
delete dc; delete dc;
return TRUE; return true;
} }
wxDC* wxMacPrinter::PrintDialog(wxWindow *parent) wxDC* wxMacPrinter::PrintDialog(wxWindow *parent)
@@ -695,7 +693,7 @@ bool wxMacPrinter::Setup(wxWindow *parent)
{ {
#if 0 #if 0
wxPrintDialog dialog(parent, & m_printDialogData); wxPrintDialog dialog(parent, & m_printDialogData);
dialog.GetPrintDialogData().SetSetupDialog(TRUE); dialog.GetPrintDialogData().SetSetupDialog(true);
int ret = dialog.ShowModal(); int ret = dialog.ShowModal();
@@ -734,7 +732,7 @@ wxMacPrintPreview::~wxMacPrintPreview(void)
bool wxMacPrintPreview::Print(bool interactive) bool wxMacPrintPreview::Print(bool interactive)
{ {
if (!m_printPrintout) if (!m_printPrintout)
return FALSE; return false;
wxMacPrinter printer(&m_printDialogData); wxMacPrinter printer(&m_printDialogData);
return printer.Print(m_previewFrame, m_printPrintout, interactive); return printer.Print(m_previewFrame, m_printPrintout, interactive);
} }

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: radiobut.cpp // Name: src/mac/classic/radiobut.cpp
// Purpose: wxRadioButton // Purpose: wxRadioButton
// Author: AUTHOR // Author: AUTHOR
// Modified by: JS Lair (99/11/15) adding the cyclic groupe notion for radiobox // Modified by: JS Lair (99/11/15) adding the cyclic groupe notion for radiobox
// Created: ??/??/98 // Created: ??/??/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) AUTHOR
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/radiobut.h" #include "wx/radiobut.h"
@@ -37,30 +41,30 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
MacPostControlCreate() ; MacPostControlCreate() ;
m_cycle = this ; m_cycle = this ;
if (HasFlag(wxRB_GROUP)) if (HasFlag(wxRB_GROUP))
{
AddInCycle( NULL ) ;
}
else
{
/* search backward for last group start */
wxRadioButton *chief = (wxRadioButton*) NULL;
wxWindowList::Node *node = parent->GetChildren().GetLast();
while (node)
{ {
wxWindow *child = node->GetData(); AddInCycle( NULL ) ;
if (child->IsKindOf( CLASSINFO( wxRadioButton ) ) )
{
chief = (wxRadioButton*) child;
if (child->HasFlag(wxRB_GROUP)) break;
}
node = node->GetPrevious();
} }
AddInCycle( chief ) ; else
} {
return TRUE; /* search backward for last group start */
wxRadioButton *chief = (wxRadioButton*) NULL;
wxWindowList::Node *node = parent->GetChildren().GetLast();
while (node)
{
wxWindow *child = node->GetData();
if (child->IsKindOf( CLASSINFO( wxRadioButton ) ) )
{
chief = (wxRadioButton*) child;
if (child->HasFlag(wxRB_GROUP)) break;
}
node = node->GetPrevious();
}
AddInCycle( chief ) ;
}
return true;
} }
void wxRadioButton::SetValue(bool val) void wxRadioButton::SetValue(bool val)
@@ -97,9 +101,9 @@ void wxRadioButton::Command (wxCommandEvent & event)
void wxRadioButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED(mouseStillDown)) void wxRadioButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED(mouseStillDown))
{ {
if ( GetValue() ) if ( GetValue() )
return ; return ;
wxRadioButton *cycle, *old = NULL ; wxRadioButton *cycle, *old = NULL ;
cycle=this->NextInCycle(); cycle=this->NextInCycle();
if (cycle!=NULL) { if (cycle!=NULL) {
while (cycle!=this) { while (cycle!=this) {

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: scrolbar.cpp // Name: src/mac/classic/scrolbar.cpp
// Purpose: wxScrollBar // Purpose: wxScrollBar
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
@@ -34,7 +38,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
const wxString& name) const wxString& name)
{ {
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return FALSE; return false;
Rect bounds ; Rect bounds ;
Str255 title ; Str255 title ;
@@ -51,7 +55,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
MacPostControlCreate() ; MacPostControlCreate() ;
return TRUE; return true;
} }
wxScrollBar::~wxScrollBar() wxScrollBar::~wxScrollBar()
@@ -174,4 +178,3 @@ void wxScrollBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart
else else
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);
} }

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: slider.cpp // Name: src/mac/classic/slider.cpp
// Purpose: wxSlider // Purpose: wxSlider
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_SLIDER #if wxUSE_SLIDER

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: spinbutt.cpp // Name: src/mac/classic/spinbutt.cpp
// Purpose: wxSpinButton // Purpose: wxSpinButton
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_SPINBTN #if wxUSE_SPINBTN

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: spinbutt.cpp // Name: src/mac/classic/spinbutt.cpp
// Purpose: wxSpinCtrl // Purpose: wxSpinCtrl
// Author: Robert // Author: Robert
// Modified by: Mark Newsam (Based on GTK file) // Modified by: Mark Newsam (Based on GTK file)
@@ -8,14 +8,18 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_SPINCTRL
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/textctrl.h" #include "wx/textctrl.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#if wxUSE_SPINCTRL
#include "wx/spinbutt.h" #include "wx/spinbutt.h"
#include "wx/spinctrl.h" #include "wx/spinctrl.h"
@@ -58,7 +62,7 @@ protected:
{ {
// Hand button down events to wxSpinCtrl. Doesn't work. // Hand button down events to wxSpinCtrl. Doesn't work.
if (event.GetEventType() == wxEVT_LEFT_DOWN && m_spin->ProcessEvent( event )) if (event.GetEventType() == wxEVT_LEFT_DOWN && m_spin->ProcessEvent( event ))
return TRUE; return true;
return wxTextCtrl::ProcessEvent( event ); return wxTextCtrl::ProcessEvent( event );
} }
@@ -145,7 +149,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style, if ( !wxControl::Create(parent, id, wxDefaultPosition, wxDefaultSize, style,
wxDefaultValidator, name) ) wxDefaultValidator, name) )
{ {
return FALSE; return false;
} }
// the string value overrides the numeric one (for backwards compatibility // the string value overrides the numeric one (for backwards compatibility
@@ -171,7 +175,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
} }
DoSetSize(pos.x , pos.y , csize.x, csize.y); DoSetSize(pos.x , pos.y , csize.x, csize.y);
return TRUE; return true;
} }
wxSpinCtrl::~wxSpinCtrl() wxSpinCtrl::~wxSpinCtrl()
@@ -216,15 +220,15 @@ void wxSpinCtrl::DoMoveWindow(int x, int y, int width, int height)
bool wxSpinCtrl::Enable(bool enable) bool wxSpinCtrl::Enable(bool enable)
{ {
if ( !wxControl::Enable(enable) ) if ( !wxControl::Enable(enable) )
return FALSE; return false;
return TRUE; return true;
} }
bool wxSpinCtrl::Show(bool show) bool wxSpinCtrl::Show(bool show)
{ {
if ( !wxControl::Show(show) ) if ( !wxControl::Show(show) )
return FALSE; return false;
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -237,18 +241,18 @@ bool wxSpinCtrl::GetTextValue(int *val) const
if ( !m_text->GetValue().ToLong(&l) ) if ( !m_text->GetValue().ToLong(&l) )
{ {
// not a number at all // not a number at all
return FALSE; return false;
} }
if ( l < GetMin() || l > GetMax() ) if ( l < GetMin() || l > GetMax() )
{ {
// out of range // out of range
return FALSE; return false;
} }
*val = l; *val = l;
return TRUE; return true;
} }
int wxSpinCtrl::GetValue() const int wxSpinCtrl::GetValue() const

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: statbmp.cpp // Name: src/mac/classic/statbmp.cpp
// Purpose: wxStaticBitmap // Purpose: wxStaticBitmap
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/statbmp.h" #include "wx/statbmp.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
@@ -71,11 +75,10 @@ void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) )
wxPaintDC dc(this); wxPaintDC dc(this);
PrepareDC(dc); PrepareDC(dc);
dc.DrawBitmap( m_bitmap , 0 , 0 , TRUE ) ; dc.DrawBitmap( m_bitmap , 0 , 0 , true ) ;
} }
wxSize wxStaticBitmap::DoGetBestSize() const wxSize wxStaticBitmap::DoGetBestSize() const
{ {
return wxWindow::DoGetBestSize() ; return wxWindow::DoGetBestSize() ;
} }

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: statbox.cpp // Name: src/mac/classic/statbox.cpp
// Purpose: wxStaticBox // Purpose: wxStaticBox
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/statbox.h" #include "wx/statbox.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -45,5 +49,5 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
MacPostControlCreate() ; MacPostControlCreate() ;
return TRUE; return true;
} }

View File

@@ -1,15 +1,19 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: tabctrl.cpp // Name: src/mac/classic/tabctrl.cpp
// Purpose: wxTabCtrl // Purpose: wxTabCtrl
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 1998-01-01 // Created: 1998-01-01
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_TAB_DIALOG #if wxUSE_TAB_DIALOG
@@ -45,7 +49,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
kControlTabSmallProc , (long) this ) ; kControlTabSmallProc , (long) this ) ;
MacPostControlCreate() ; MacPostControlCreate() ;
return TRUE ; return true ;
} }
wxTabCtrl::~wxTabCtrl() wxTabCtrl::~wxTabCtrl()
@@ -60,14 +64,14 @@ void wxTabCtrl::Command(wxCommandEvent& event)
bool wxTabCtrl::DeleteAllItems() bool wxTabCtrl::DeleteAllItems()
{ {
// TODO // TODO
return FALSE; return false;
} }
// Delete an item // Delete an item
bool wxTabCtrl::DeleteItem(int item) bool wxTabCtrl::DeleteItem(int item)
{ {
// TODO // TODO
return FALSE; return false;
} }
// Get the selection // Get the selection
@@ -101,7 +105,7 @@ int wxTabCtrl::GetItemCount() const
bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const bool wxTabCtrl::GetItemRect(int item, wxRect& wxrect) const
{ {
// TODO // TODO
return FALSE; return false;
} }
// Get the number of rows // Get the number of rows
@@ -143,7 +147,7 @@ int wxTabCtrl::HitTest(const wxPoint& pt, long& flags)
bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data) bool wxTabCtrl::InsertItem(int item, const wxString& text, int imageId, void* data)
{ {
// TODO // TODO
return FALSE; return false;
} }
// Set the selection // Set the selection
@@ -163,21 +167,21 @@ void wxTabCtrl::SetImageList(wxImageList* imageList)
bool wxTabCtrl::SetItemText(int item, const wxString& text) bool wxTabCtrl::SetItemText(int item, const wxString& text)
{ {
// TODO // TODO
return FALSE; return false;
} }
// Set the image for an item // Set the image for an item
bool wxTabCtrl::SetItemImage(int item, int image) bool wxTabCtrl::SetItemImage(int item, int image)
{ {
// TODO // TODO
return FALSE; return false;
} }
// Set the data for an item // Set the data for an item
bool wxTabCtrl::SetItemData(int item, void* data) bool wxTabCtrl::SetItemData(int item, void* data)
{ {
// TODO // TODO
return FALSE; return false;
} }
// Set the size for a fixed-width tab control // Set the size for a fixed-width tab control

View File

@@ -9,7 +9,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_TEXTCTRL #if wxUSE_TEXTCTRL

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: src/mac/tglbtn.cpp // Name: src/mac/classic/tglbtn.cpp
// Purpose: Definition of the wxToggleButton class, which implements a // Purpose: Definition of the wxToggleButton class, which implements a
// toggle button under wxMac. // toggle button under wxMac.
// Author: Stefan Csomor // Author: Stefan Csomor
@@ -10,6 +10,12 @@
// License: Rocketeer license // License: Rocketeer license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// ============================================================================ // ============================================================================
// declatations // declatations
// ============================================================================ // ============================================================================
@@ -18,7 +24,6 @@
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/defs.h"
#include "wx/tglbtn.h" #include "wx/tglbtn.h"
#if wxUSE_TOGGLEBTN #if wxUSE_TOGGLEBTN
@@ -72,7 +77,7 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id,
MacPostControlCreate() ; MacPostControlCreate() ;
return TRUE; return true;
} }
wxSize wxToggleButton::DoGetBestSize() const wxSize wxToggleButton::DoGetBestSize() const
@@ -120,4 +125,3 @@ void wxToggleButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16
} }
#endif // wxUSE_TOGGLEBTN #endif // wxUSE_TOGGLEBTN

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: tooltip.cpp // Name: src/mac/classic/tooltip.cpp
// Purpose: wxToolTip implementation // Purpose: wxToolTip implementation
// Author: Robert Roebling // Author: Robert Roebling
// Id: $Id$ // Id: $Id$
@@ -7,7 +7,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
@@ -401,4 +405,3 @@ void wxMacToolTip::Clear()
} }
#endif #endif

View File

@@ -9,7 +9,11 @@
// Licence: The wxWindows licence // Licence: The wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_GUI #if wxUSE_GUI