remove unused stuff

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2006-10-09 05:14:39 +00:00
parent eea2724a28
commit 716d032736
20 changed files with 29 additions and 131 deletions

View File

@ -71,10 +71,6 @@
// Keep linker from discarding wxStockGDIMac
wxFORCE_LINK_MODULE(gdiobj)
#if wxUSE_THREADS
extern size_t g_numberOfThreads;
#endif
// statics for implementation
static bool s_inYield = false;
static bool s_inReceiveEvent = false ;
@ -90,9 +86,7 @@ END_EVENT_TABLE()
// platform specific static variables
const short kMacMinHeap = (29 * 1024) ;
const short kwxMacMenuBarResource = 1 ;
const short kwxMacAppleMenuId = 1 ;
static const short kwxMacAppleMenuId = 1 ;
wxWindow* wxApp::s_captureWindow = NULL ;
long wxApp::s_lastModifiers = 0 ;

View File

@ -59,7 +59,6 @@ static const int TEXTFOCUSBORDER = 3 ;
static const wxCoord MARGIN = 2;
static const int TEXTFOCUSBORDER = 0 ;
#endif
static const int POPUPHEIGHT = 23;
// ----------------------------------------------------------------------------
@ -119,7 +118,7 @@ protected:
wxCommandEvent event( wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() );
event.SetEventObject(def);
def->Command(event);
}
}
}
return;

View File

@ -46,8 +46,7 @@ protected:
long m_themeCursor;
};
#define M_CURSORDATA ((wxCursorRefData *)m_refData)
#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
#define M_CURSORDATA wx_static_cast(wxCursorRefData*, m_refData)
const short kwxCursorBullseye = 0;
const short kwxCursorBlank = 1;

View File

@ -55,9 +55,6 @@ const double RAD2DEG = 180.0 / M_PI;
const short kEmulatedMode = -1 ;
const short kUnsupportedMode = -2 ;
extern TECObjectRef s_TECNativeCToUnicode ;
wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) :
m_ph( (GrafPtr) dc->m_macPort )
{
@ -154,13 +151,6 @@ wxMacWindowStateSaver::~wxMacWindowStateSaver()
SetThemeDrawingState( m_themeDrawingState , true ) ;
}
//-----------------------------------------------------------------------------
// Local functions
//-----------------------------------------------------------------------------
static inline double dmin(double a, double b) { return a < b ? a : b; }
static inline double dmax(double a, double b) { return a > b ? a : b; }
static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; }
//-----------------------------------------------------------------------------
// wxDC
//-----------------------------------------------------------------------------

View File

@ -29,8 +29,6 @@
// constants
//-----------------------------------------------------------------------------
#define RAD2DEG 57.2957795131
//-----------------------------------------------------------------------------
// wxPaintDC
//-----------------------------------------------------------------------------
@ -124,7 +122,6 @@ wxWindowDC::wxWindowDC(wxWindow *window)
WindowRef windowref = (WindowRef) rootwindow->MacGetWindowRef() ;
int x , y ;
x = y = 0 ;
wxSize size = window->GetSize() ;
window->MacWindowToRootWindow( &x , &y ) ;
m_macPort = UMAGetWindowPort( windowref ) ;
m_ok = true ;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: msw/dir.cpp
// Name: mac/dirmac.cpp
// Purpose: wxDir implementation for Mac
// Author: Stefan Csomor
// Modified by:
@ -24,37 +24,17 @@
#pragma hdrstop
#endif
#include "wx/dir.h"
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
#endif // PCH
#include "wx/dir.h"
#include "wx/filefn.h" // for wxDirExists()
#ifndef __DARWIN__
#include <windows.h>
#endif
#include "wx/filename.h"
#include "wx/mac/private.h"
#include "MoreFilesX.h"
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
#ifndef MAX_PATH
#define MAX_PATH 260 // from VC++ headers
#endif
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
#define M_DIR ((wxDirData *)m_data)
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
@ -226,7 +206,7 @@ wxDir::wxDir(const wxString& dirname)
bool wxDir::Open(const wxString& dirname)
{
delete M_DIR;
delete m_data;
m_data = new wxDirData(dirname);
return true;
@ -242,7 +222,7 @@ wxString wxDir::GetName() const
wxString name;
if ( m_data )
{
name = M_DIR->GetName();
name = m_data->GetName();
if ( !name.empty() && (name.Last() == _T('/')) )
{
// chop off the last (back)slash
@ -255,10 +235,8 @@ wxString wxDir::GetName() const
wxDir::~wxDir()
{
if (M_DIR != NULL) {
delete M_DIR;
m_data = NULL;
}
delete m_data;
m_data = NULL;
}
// ----------------------------------------------------------------------------
@ -271,10 +249,10 @@ bool wxDir::GetFirst(wxString *filename,
{
wxCHECK_MSG( IsOpened(), false, _T("must wxDir::Open() first") );
M_DIR->Rewind();
m_data->Rewind();
M_DIR->SetFileSpec(filespec);
M_DIR->SetFlags(flags);
m_data->SetFileSpec(filespec);
m_data->SetFlags(flags);
return GetNext(filename);
}
@ -285,5 +263,5 @@ bool wxDir::GetNext(wxString *filename) const
wxCHECK_MSG( filename, false, _T("bad pointer in wxDir::GetNext()") );
return M_DIR->Read(filename);
return m_data->Read(filename);
}

View File

@ -17,7 +17,6 @@
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/window.h"
#include "wx/toplevel.h"
#include "wx/gdicmn.h"
#endif // WX_PRECOMP
@ -38,8 +37,7 @@ typedef struct
wxWindow *m_currentTargetWindow;
wxDropTarget *m_currentTarget;
wxDropSource *m_currentSource;
}
MacTrackingGlobals;
} MacTrackingGlobals;
MacTrackingGlobals gTrackingGlobals;
@ -113,7 +111,6 @@ bool wxDropTarget::CurrentDragHasSupportedFormat()
if ( !supported )
{
UInt16 items;
OSErr result;
ItemReference theItem;
FlavorType theType;
UInt16 flavors = 0;
@ -127,7 +124,7 @@ bool wxDropTarget::CurrentDragHasSupportedFormat()
for ( UInt16 flavor = 1; flavor <= flavors; ++flavor )
{
result = GetFlavorType( (DragReference)m_currentDrag, theItem, flavor, &theType );
GetFlavorType( (DragReference)m_currentDrag, theItem, flavor, &theType );
if ( m_dataObject->IsSupportedFormat( wxDataFormat( theType ) ) )
{
supported = true;
@ -338,11 +335,10 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
if ((m_data == NULL) || (m_data->GetFormatCount() == 0))
return (wxDragResult)wxDragNone;
OSStatus result;
DragReference theDrag;
RgnHandle dragRegion;
if ((result = NewDrag( &theDrag )) != noErr)
if (NewDrag( &theDrag ) != noErr)
return wxDragNone;
// add data to drag
@ -454,7 +450,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
// only when drag was successfully completed
gTrackingGlobals.m_currentSource = this;
result = TrackDrag( theDrag, ev, dragRegion );
TrackDrag( theDrag, ev, dragRegion );
DisposeRgn( dragRegion );
DisposeDrag( theDrag );
gTrackingGlobals.m_currentSource = NULL;

View File

@ -30,12 +30,8 @@
#include "PLStringFuncs.h"
#endif
#include "MoreFilesX.h"
IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase)
extern bool gUseNavServices;
// the data we need to pass to our standard file hook routine
// includes a pointer to the dialog, a pointer to the standard
// file reply record (so we can inspect the current selection)
@ -319,7 +315,6 @@ int wxFileDialog::ShowModal()
NavDialogRef dialog;
NavObjectFilterUPP navFilterUPP = NULL;
CFArrayRef cfArray = NULL; // for popupExtension
OpenUserDataRec myData;
myData.defaultLocation = m_dir;
@ -386,8 +381,6 @@ int wxFileDialog::ShowModal()
// clean up filter related data, etc.
if (navFilterUPP)
::DisposeNavObjectFilterUPP(navFilterUPP);
if (cfArray)
::CFRelease(cfArray);
if (err != noErr)
return wxID_CANCEL;

View File

@ -42,20 +42,11 @@ END_EVENT_TABLE()
static const wxChar *TRACE_MDI = _T("mdi");
static const int IDM_WINDOWTILE = 4001;
static const int IDM_WINDOWTILEHOR = 4001;
static const int IDM_WINDOWCASCADE = 4002;
static const int IDM_WINDOWICONS = 4003;
static const int IDM_WINDOWNEXT = 4004;
static const int IDM_WINDOWTILEVERT = 4005;
static const int IDM_WINDOWPREV = 4006;
// This range gives a maximum of 500 MDI children. Should be enough :-)
static const int wxFIRST_MDI_CHILD = 4100;
static const int wxLAST_MDI_CHILD = 4600;
// Status border dimensions
static const int wxTHICK_LINE_BORDER = 3;
// ----------------------------------------------------------------------------
// Parent frame

View File

@ -24,7 +24,6 @@
#include "wx/log.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/menuitem.h"
#endif
@ -41,8 +40,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler)
// the (popup) menu title has this special id
static const int idMenuTitle = -3;
const short kwxMacMenuBarResource = 1 ;
const short kwxMacAppleMenuId = 1 ;
static const short kwxMacAppleMenuId = 1 ;
// Find an item given the Macintosh Menu Reference
@ -488,12 +486,10 @@ void wxMenu::MacAfterDisplay( bool isSubMenu )
if ( isSubMenu )
::DeleteMenu(MacGetMenuId());
wxMenuItem* previousItem = NULL ;
wxMenuItemList::compatibility_iterator node;
wxMenuItem *item;
int pos ;
for (pos = 0, node = GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++)
for (node = GetMenuItems().GetFirst(); node; node = node->GetNext())
{
item = (wxMenuItem *)node->GetData();
wxMenu* subMenu = item->GetSubMenu() ;
@ -505,8 +501,6 @@ void wxMenu::MacAfterDisplay( bool isSubMenu )
{
// no need to undo hidings
}
previousItem = item ;
}
}
@ -663,12 +657,11 @@ void wxMenuBar::MacInstallMenuBar()
{
wxMenuItemList::compatibility_iterator node;
wxMenuItem *item;
int pos ;
wxMenu* menu = menuIter->GetData() , *subMenu = NULL ;
if ( m_titles[i] == wxT("?") || m_titles[i] == wxT("&?") || m_titles[i] == wxApp::s_macHelpMenuTitleName )
{
for (pos = 0 , node = menu->GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++)
for (node = menu->GetMenuItems().GetFirst(); node; node = node->GetNext())
{
item = (wxMenuItem *)node->GetData();
subMenu = item->GetSubMenu() ;

View File

@ -48,10 +48,6 @@ private:
#endif
};
extern bool wxClipboardIsOpen;
wxMetafileRefData::wxMetafileRefData()
{
m_metafile = NULL;

View File

@ -1311,7 +1311,6 @@ private:
// ----------------------------------------------------------------------------
#define wxCFDATA_RELEASEBUFFER 1
#define wxCFDATA_RETAINBUFFER 0
class wxCFData
{

View File

@ -321,14 +321,11 @@ void wxRadioBox::Command( wxCommandEvent& event )
//
void wxRadioBox::SetFocus()
{
int i;
wxRadioButton *current;
i = 0;
current = m_radioButtonCycle;
while (!current->GetValue())
{
i++;
current = current->NextInCycle();
}

View File

@ -143,7 +143,7 @@ wxInt32 wxRadioButton::MacControlHit( WXEVENTHANDLERREF WXUNUSED(handler), WXEVE
wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle)
{
wxRadioButton *next, *current;
wxRadioButton *current;
if (cycle == NULL)
{
@ -152,7 +152,7 @@ wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle)
else
{
current = cycle;
while ((next = current->m_cycle) != cycle)
while (current->m_cycle != cycle)
current = current->m_cycle;
m_cycle = cycle;

View File

@ -22,7 +22,6 @@ BEGIN_EVENT_TABLE(wxSlider, wxControl)
END_EVENT_TABLE()
// The dimensions of the different styles of sliders (from Aqua document)
#define wxSLIDER_DIMENSIONACROSS 15
#define wxSLIDER_DIMENSIONACROSS_WITHTICKMARKS 24
#define wxSLIDER_DIMENSIONACROSS_ARROW 18
@ -416,13 +415,11 @@ wxSize wxSlider::DoGetBestSize() const
void wxSlider::DoSetSize(int x, int y, int w, int h, int sizeFlags)
{
int xborder, yborder;
int yborder = 0;
int minValWidth, maxValWidth, textheight;
int sliderBreadth;
int width = w;
xborder = yborder = 0;
if (GetWindowStyle() & wxSL_LABELS)
{
wxString text;

View File

@ -64,13 +64,6 @@
#include "wx/mac/uma.h"
// if this is set to 1 then under OSX 10.2 the 'classic' MLTE implementation will be used
// if set to 0 then the unicode textctrl will be used
#ifndef wxMAC_AWAYS_USE_MLTE
#define wxMAC_AWAYS_USE_MLTE 1
#endif
#ifndef __WXMAC_OSX__
enum
{

View File

@ -26,9 +26,6 @@
#include "wx/mac/uma.h"
// Button
static const int kMacOSXHorizontalBorder = 2 ;
static const int kMacOSXVerticalBorder = 4 ;
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------

View File

@ -392,8 +392,6 @@ void wxToolBarTool::SetPosition( const wxPoint& position )
m_x = position.x;
m_y = position.y;
int x, y;
x = y = 0;
int mac_x = position.x;
int mac_y = position.y;
@ -714,6 +712,7 @@ CantCreateEvent :
return result ;
}
#if wxMAC_USE_NATIVE_TOOLBAR
static const EventTypeSpec kToolbarEvents[] =
{
{ kEventClassToolbar, kEventToolbarGetDefaultIdentifiers },
@ -777,6 +776,7 @@ static OSStatus ToolbarDelegateHandler( EventHandlerCallRef inCallRef, EventRef
}
return result ;
}
#endif // wxMAC_USE_NATIVE_TOOLBAR
// also for the toolbar we have the dual implementation:
// only when MacInstallNativeToolbar is called is the native toolbar set as the window toolbar
@ -1070,7 +1070,6 @@ bool wxToolBar::Realize()
bool lastIsRadio = false;
bool curIsRadio = false;
bool setChoiceInGroup = false;
#if wxMAC_USE_NATIVE_TOOLBAR
CFIndex currentPosition = 0;
@ -1165,8 +1164,6 @@ bool wxToolBar::Realize()
{
if ( tool->IsToggled() )
DoToggleTool( tool, true );
setChoiceInGroup = false;
}
else
{
@ -1175,7 +1172,6 @@ bool wxToolBar::Realize()
if ( tool->Toggle( true ) )
{
DoToggleTool( tool, true );
setChoiceInGroup = true;
}
}
else if ( tool->IsToggled() )

View File

@ -81,8 +81,6 @@ END_EVENT_TABLE()
// Carbon Events
// ---------------------------------------------------------------------------
extern long wxMacTranslateKey(unsigned char key, unsigned char code) ;
static const EventTypeSpec eventList[] =
{
// TODO: remove control related event like key and mouse (except for WindowLeave events)
@ -884,8 +882,7 @@ typedef struct
wxPoint m_position ;
wxSize m_size ;
bool m_wasResizable ;
}
FullScreenData ;
} FullScreenData ;
void wxTopLevelWindowMac::Init()
{
@ -1530,19 +1527,17 @@ void wxTopLevelWindowMac::MacPerformUpdates()
EventRef currentEvent = (EventRef) wxTheApp->MacGetCurrentEvent() ;
UInt32 currentEventClass = 0 ;
UInt32 currentEventKind = 0 ;
if ( currentEvent != NULL )
{
currentEventClass = ::GetEventClass( currentEvent ) ;
currentEventKind = ::GetEventKind( currentEvent ) ;
::GetEventKind( currentEvent ) ;
}
if ( currentEventClass != kEventClassMenu )
{
// when tracking a menu, strange redraw errors occur if we flush now, so leave..
EventRef theEvent;
OSStatus status = noErr ;
status = ReceiveNextEvent( 0 , NULL , kEventDurationNoWait , false , &theEvent ) ;
ReceiveNextEvent( 0 , NULL , kEventDurationNoWait , false , &theEvent ) ;
}
}
}

View File

@ -48,8 +48,6 @@ static bool sUMAHasAquaLayout = false ;
static bool sUMAHasInittedAppearance = false;
extern int gAGABackgroundColor ;
bool UMAHasAppearance() { return sUMAHasAppearance ; }
long UMAGetAppearanceVersion() { return sUMAAppearanceVersion ; }
long UMAGetSystemVersion() { return sUMASystemVersion ; }