Move Objective-C interfaces into separate header files in preparation for being able to use them from other source files.

No new or changed code.  Work on behalf of Software 2000 Ltd.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2007-04-20 20:21:52 +00:00
parent 781a8d7f3e
commit ad3628fa86
6 changed files with 96 additions and 39 deletions

View File

@@ -0,0 +1,28 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/cocoa/objc/NSMenu.h
// Purpose: wxPoserNSMenu class
// Author: David Elliott
// Modified by:
// Created: 2007/04/20 (move from NSMenu.mm)
// RCS-ID: $Id$
// Copyright: (c) 2002 David Elliott
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef __WX_COCOA_OBJC_NSMENU_H__
#define __WX_COCOA_OBJC_NSMENU_H__
#import <AppKit/NSMenu.h>
// ============================================================================
// @class wxPoserNSMenu
// ============================================================================
@interface wxPoserNSMenu : NSMenu
{
}
- (void)dealloc;
@end // wxPoserNSMenu
#endif //ndef __WX_COCOA_OBJC_NSMENU_H__

View File

@@ -0,0 +1,40 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/cocoa/objc/NSView.h
// Purpose: wxPoserNSView class
// Author: David Elliott
// Modified by:
// Created: 2007/04/20 (move from NSView.mm)
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef __WX_COCOA_OBJC_NSVIEW_H__
#define __WX_COCOA_OBJC_NSVIEW_H__
#import <AppKit/NSView.h>
// ============================================================================
// @class wxPoserNSView
// ============================================================================
@interface wxPoserNSView : NSView
{
}
- (void)drawRect: (NSRect)rect;
- (void)mouseDown:(NSEvent *)theEvent;
- (void)mouseDragged:(NSEvent *)theEvent;
- (void)mouseUp:(NSEvent *)theEvent;
- (void)mouseMoved:(NSEvent *)theEvent;
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseExited:(NSEvent *)theEvent;
- (void)rightMouseDown:(NSEvent *)theEvent;
- (void)rightMouseDragged:(NSEvent *)theEvent;
- (void)rightMouseUp:(NSEvent *)theEvent;
- (void)otherMouseDown:(NSEvent *)theEvent;
- (void)otherMouseDragged:(NSEvent *)theEvent;
- (void)otherMouseUp:(NSEvent *)theEvent;
- (void)resetCursorRects;
@end // wxPoserNSView
#endif //ndef __WX_COCOA_OBJC_NSVIEW_H__

View File

@@ -0,0 +1,24 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/cocoa/objc/NSWindow.h
// Purpose: wxPoserNSWindow class
// Author: David Elliott
// Modified by:
// Created: 2007/04/20 (move from NSWindow.mm)
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#import <AppKit/NSWindow.h>
// ============================================================================
// @class wxPoserNSWindow
// ============================================================================
@interface wxPoserNSWindow : NSWindow
{
}
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
@end // wxPoserNSwindow

View File

@@ -19,18 +19,11 @@
#include "wx/cocoa/ObjcPose.h" #include "wx/cocoa/ObjcPose.h"
#import <Foundation/NSNotification.h> #import <Foundation/NSNotification.h>
#import <AppKit/NSMenu.h> #include "wx/cocoa/objc/NSMenu.h"
// ============================================================================ // ============================================================================
// @class wxPoserNSMenu // @class wxPoserNSMenu
// ============================================================================ // ============================================================================
@interface wxPoserNSMenu : NSMenu
{
}
- (void)dealloc;
@end // wxPoserNSMenu
WX_IMPLEMENT_POSER(wxPoserNSMenu); WX_IMPLEMENT_POSER(wxPoserNSMenu);
@implementation wxPoserNSMenu : NSMenu @implementation wxPoserNSMenu : NSMenu

View File

@@ -4,7 +4,7 @@
// Author: David Elliott // Author: David Elliott
// Modified by: // Modified by:
// Created: 2003/02/15 // Created: 2003/02/15
// RCS-ID: $Id: // RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott // Copyright: (c) 2003 David Elliott
// Licence: wxWidgets licence // Licence: wxWidgets licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -25,9 +25,9 @@
#include "wx/cocoa/ObjcPose.h" #include "wx/cocoa/ObjcPose.h"
#include "wx/cocoa/NSView.h" #include "wx/cocoa/NSView.h"
#import <AppKit/NSView.h>
#import <Foundation/NSNotification.h> #import <Foundation/NSNotification.h>
#import <Foundation/NSString.h> #import <Foundation/NSString.h>
#include "wx/cocoa/objc/NSView.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// globals // globals
@@ -56,26 +56,6 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView)
// ============================================================================ // ============================================================================
// @class wxPoserNSView // @class wxPoserNSView
// ============================================================================ // ============================================================================
@interface wxPoserNSView : NSView
{
}
- (void)drawRect: (NSRect)rect;
- (void)mouseDown:(NSEvent *)theEvent;
- (void)mouseDragged:(NSEvent *)theEvent;
- (void)mouseUp:(NSEvent *)theEvent;
- (void)mouseMoved:(NSEvent *)theEvent;
- (void)mouseEntered:(NSEvent *)theEvent;
- (void)mouseExited:(NSEvent *)theEvent;
- (void)rightMouseDown:(NSEvent *)theEvent;
- (void)rightMouseDragged:(NSEvent *)theEvent;
- (void)rightMouseUp:(NSEvent *)theEvent;
- (void)otherMouseDown:(NSEvent *)theEvent;
- (void)otherMouseDragged:(NSEvent *)theEvent;
- (void)otherMouseUp:(NSEvent *)theEvent;
- (void)resetCursorRects;
@end // wxPoserNSView
WX_IMPLEMENT_POSER(wxPoserNSView); WX_IMPLEMENT_POSER(wxPoserNSView);
@implementation wxPoserNSView : NSView @implementation wxPoserNSView : NSView

View File

@@ -26,9 +26,9 @@
#include "wx/cocoa/ObjcPose.h" #include "wx/cocoa/ObjcPose.h"
#include "wx/cocoa/NSWindow.h" #include "wx/cocoa/NSWindow.h"
#import <AppKit/NSWindow.h>
#import <Foundation/NSNotification.h> #import <Foundation/NSNotification.h>
#import <Foundation/NSString.h> #import <Foundation/NSString.h>
#include "wx/cocoa/objc/NSWindow.h"
// ============================================================================ // ============================================================================
// @class wxNSWindowDelegate // @class wxNSWindowDelegate
@@ -189,14 +189,6 @@ wxMenuBar* wxCocoaNSWindow::GetAppMenuBar(wxCocoaNSWindow *win)
// ============================================================================ // ============================================================================
// @class wxPoserNSWindow // @class wxPoserNSWindow
// ============================================================================ // ============================================================================
@interface wxPoserNSWindow : NSWindow
{
}
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
@end // wxPoserNSwindow
WX_IMPLEMENT_POSER(wxPoserNSWindow); WX_IMPLEMENT_POSER(wxPoserNSWindow);
@implementation wxPoserNSWindow : NSWindow @implementation wxPoserNSWindow : NSWindow