1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/ObjcPose.h
3 // Purpose: Macros for initializing poseAs, among other things
4 // Author: David Elliott
8 // Copyright: (c) 2002 David Elliott <dfe@cox.net>
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_PRIVATE_POSER_H__
13 #define __WX_COCOA_PRIVATE_POSER_H__
15 /*-------------------------------------------------------------------------
16 Objective-C Poser class initialization
17 -------------------------------------------------------------------------*/
19 #import <objc/objc-class.h>
21 class wxPoseAsInitializer
24 wxPoseAsInitializer(Class poser
)
30 ~wxPoseAsInitializer()
32 class_poseAs(m_poser
,m_poser
->super_class
);
35 static void InitializePosers()
44 wxPoseAsInitializer
*m_next
;
45 static wxPoseAsInitializer
*sm_first
;
48 class wxDummyForPoseAsInitializer
51 wxDummyForPoseAsInitializer(void*) {}
54 #define WX_IMPLEMENT_POSER(poser) \
55 wxDummyForPoseAsInitializer wxDummyPoseAsInitializerFor##poser(new wxPoseAsInitializer([poser class]))
58 #warning "Objective-C++ Only!"
61 #endif // __WX_COCOA_PRIVATE_POSER_H__