mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
34
Externals/wxWidgets3/include/wx/osx/accel.h
vendored
Normal file
34
Externals/wxWidgets3/include/wx/osx/accel.h
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/accel.h
|
||||
// Purpose: wxAcceleratorTable class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: accel.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCEL_H_
|
||||
#define _WX_ACCEL_H_
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxAcceleratorTable: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
||||
public:
|
||||
wxAcceleratorTable();
|
||||
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array
|
||||
|
||||
virtual ~wxAcceleratorTable();
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
|
||||
int GetCommand( wxKeyEvent &event );
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_ACCEL_H_
|
144
Externals/wxWidgets3/include/wx/osx/app.h
vendored
Normal file
144
Externals/wxWidgets3/include/wx/osx/app.h
vendored
Normal file
@ -0,0 +1,144 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/app.h
|
||||
// Purpose: wxApp class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: app.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_APP_H_
|
||||
#define _WX_APP_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFrame;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindowMac;
|
||||
class WXDLLIMPEXP_FWD_CORE wxApp ;
|
||||
class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
|
||||
class WXDLLIMPEXP_FWD_BASE wxLog;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMacAutoreleasePool;
|
||||
|
||||
// Force an exit from main loop
|
||||
void WXDLLIMPEXP_CORE wxExit();
|
||||
|
||||
// Yield to other apps/messages
|
||||
bool WXDLLIMPEXP_CORE wxYield();
|
||||
|
||||
// Represents the application. Derive OnInit and declare
|
||||
// a new App object to start application
|
||||
class WXDLLIMPEXP_CORE wxApp: public wxAppBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
|
||||
wxApp();
|
||||
virtual ~wxApp();
|
||||
|
||||
virtual void WakeUpIdle();
|
||||
|
||||
virtual void SetPrintMode(int mode) { m_printMode = mode; }
|
||||
virtual int GetPrintMode() const { return m_printMode; }
|
||||
|
||||
// calling OnInit with an auto-release pool ready ...
|
||||
virtual bool CallOnInit();
|
||||
#if wxUSE_GUI
|
||||
// setting up all MacOS Specific Event-Handlers etc
|
||||
virtual bool OnInitGui();
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
virtual int OnRun();
|
||||
|
||||
virtual bool ProcessIdle();
|
||||
|
||||
// implementation only
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnEndSession(wxCloseEvent& event);
|
||||
void OnQueryEndSession(wxCloseEvent& event);
|
||||
|
||||
protected:
|
||||
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
|
||||
wxMacAutoreleasePool* m_macPool;
|
||||
|
||||
public:
|
||||
|
||||
static bool sm_isEmbedded;
|
||||
// Implementation
|
||||
virtual bool Initialize(int& argc, wxChar **argv);
|
||||
virtual void CleanUp();
|
||||
|
||||
// the installed application event handler
|
||||
WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
|
||||
WXEVENTHANDLERREF MacGetCurrentEventHandlerCallRef() { return m_macCurrentEventHandlerCallRef ; }
|
||||
void MacSetCurrentEvent( WXEVENTREF event , WXEVENTHANDLERCALLREF handler )
|
||||
{ m_macCurrentEvent = event ; m_macCurrentEventHandlerCallRef = handler ; }
|
||||
|
||||
// adding a CFType object to be released only at the end of the current event cycle (increases the
|
||||
// refcount of the object passed), needed in case we are in the middle of an event concering an object
|
||||
// we want to delete and cannot do it immediately
|
||||
// TODO change semantics to be in line with cocoa (make autrelease NOT increase the count)
|
||||
void MacAddToAutorelease( void* cfrefobj );
|
||||
void MacReleaseAutoreleasePool();
|
||||
public:
|
||||
static wxWindow* s_captureWindow ;
|
||||
static long s_lastModifiers ;
|
||||
|
||||
int m_nCmdShow;
|
||||
|
||||
private:
|
||||
// mac specifics
|
||||
virtual bool DoInitGui();
|
||||
virtual void DoCleanUp();
|
||||
|
||||
WXEVENTHANDLERREF m_macEventHandler ;
|
||||
WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ;
|
||||
WXEVENTREF m_macCurrentEvent ;
|
||||
|
||||
public:
|
||||
static long s_macAboutMenuItemId ;
|
||||
static long s_macPreferencesMenuItemId ;
|
||||
static long s_macExitMenuItemId ;
|
||||
static wxString s_macHelpMenuTitleName ;
|
||||
|
||||
WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
|
||||
|
||||
// For embedded use. By default does nothing.
|
||||
virtual void MacHandleUnhandledEvent( WXEVENTREF ev );
|
||||
|
||||
bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ;
|
||||
bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ;
|
||||
bool MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ;
|
||||
void MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ;
|
||||
#if wxOSX_USE_CARBON
|
||||
// we only have applescript on these
|
||||
virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||
virtual short MacHandleAEGURL(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||
virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||
virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||
virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||
#endif
|
||||
// in response of an open-document apple event
|
||||
virtual void MacOpenFile(const wxString &fileName) ;
|
||||
// in response of a get-url apple event
|
||||
virtual void MacOpenURL(const wxString &url) ;
|
||||
// in response of a print-document apple event
|
||||
virtual void MacPrintFile(const wxString &fileName) ;
|
||||
// in response of a open-application apple event
|
||||
virtual void MacNewFile() ;
|
||||
// in response of a reopen-application apple event
|
||||
virtual void MacReopenApp() ;
|
||||
|
||||
// Hide the application windows the same as the system hide command would do it.
|
||||
void MacHideApp();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_APP_H_
|
||||
|
198
Externals/wxWidgets3/include/wx/osx/bitmap.h
vendored
Normal file
198
Externals/wxWidgets3/include/wx/osx/bitmap.h
vendored
Normal file
@ -0,0 +1,198 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/bitmap.h
|
||||
// Purpose: wxBitmap class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: bitmap.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BITMAP_H_
|
||||
#define _WX_BITMAP_H_
|
||||
|
||||
#include "wx/palette.h"
|
||||
|
||||
// Bitmap
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class wxBitmapRefData ;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
|
||||
class WXDLLIMPEXP_FWD_CORE wxControl;
|
||||
class WXDLLIMPEXP_FWD_CORE wxCursor;
|
||||
class WXDLLIMPEXP_FWD_CORE wxDC;
|
||||
class WXDLLIMPEXP_FWD_CORE wxIcon;
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPixelDataBase;
|
||||
|
||||
// A mask is a bitmap used for drawing bitmaps
|
||||
// Internally it is stored as a 8 bit deep memory chunk, 0 = black means the source will be drawn
|
||||
// 255 = white means the source will not be drawn, no other values will be present
|
||||
// 8 bit is chosen only for performance reasons, note also that this is the inverse value range
|
||||
// from alpha, where 0 = invisible , 255 = fully drawn
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMask: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
|
||||
public:
|
||||
wxMask();
|
||||
|
||||
// Copy constructor
|
||||
wxMask(const wxMask& mask);
|
||||
|
||||
// Construct a mask from a bitmap and a colour indicating
|
||||
// the transparent area
|
||||
wxMask(const wxBitmap& bitmap, const wxColour& colour);
|
||||
|
||||
// Construct a mask from a mono bitmap (black meaning show pixels, white meaning transparent)
|
||||
wxMask(const wxBitmap& bitmap);
|
||||
|
||||
// implementation helper only : construct a mask from a 32 bit memory buffer
|
||||
wxMask(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ;
|
||||
|
||||
virtual ~wxMask();
|
||||
|
||||
bool Create(const wxBitmap& bitmap, const wxColour& colour);
|
||||
bool Create(const wxBitmap& bitmap);
|
||||
bool Create(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ;
|
||||
|
||||
// Implementation below
|
||||
|
||||
void Init() ;
|
||||
|
||||
// a 8 bit depth mask
|
||||
void* GetRawAccess() const;
|
||||
int GetBytesPerRow() const { return m_bytesPerRow ; }
|
||||
// renders/updates native representation when necessary
|
||||
void RealizeNative() ;
|
||||
|
||||
WXHBITMAP GetHBITMAP() const ;
|
||||
|
||||
|
||||
private:
|
||||
wxMemoryBuffer m_memBuf ;
|
||||
int m_bytesPerRow ;
|
||||
int m_width ;
|
||||
int m_height ;
|
||||
|
||||
WXHBITMAP m_maskBitmap ;
|
||||
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
|
||||
|
||||
public:
|
||||
wxBitmap() {} // Platform-specific
|
||||
|
||||
// Initialize with raw data.
|
||||
wxBitmap(const char bits[], int width, int height, int depth = 1);
|
||||
|
||||
// Initialize with XPM data
|
||||
wxBitmap(const char* const* bits);
|
||||
|
||||
// Load a file or resource
|
||||
wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
|
||||
|
||||
// Constructor for generalised creation from data
|
||||
wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1);
|
||||
|
||||
// creates an bitmap from the native image format
|
||||
wxBitmap(CGImageRef image);
|
||||
|
||||
// If depth is omitted, will create a bitmap compatible with the display
|
||||
wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); }
|
||||
wxBitmap(const wxSize& sz, int depth = -1) { (void)Create(sz, depth); }
|
||||
|
||||
// Convert from wxImage:
|
||||
wxBitmap(const wxImage& image, int depth = -1);
|
||||
|
||||
// Convert from wxIcon
|
||||
wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); }
|
||||
|
||||
virtual ~wxBitmap() {}
|
||||
|
||||
wxImage ConvertToImage() const;
|
||||
|
||||
// get the given part of bitmap
|
||||
wxBitmap GetSubBitmap( const wxRect& rect ) const;
|
||||
|
||||
virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
|
||||
virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
|
||||
{ return Create(sz.GetWidth(), sz.GetHeight(), depth); }
|
||||
|
||||
virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1);
|
||||
bool Create( CGImageRef image );
|
||||
|
||||
// virtual bool Create( WXHICON icon) ;
|
||||
virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
|
||||
virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const;
|
||||
|
||||
wxBitmapRefData *GetBitmapData() const
|
||||
{ return (wxBitmapRefData *)m_refData; }
|
||||
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
virtual bool CopyFromIcon(const wxIcon& icon);
|
||||
|
||||
int GetWidth() const;
|
||||
int GetHeight() const;
|
||||
int GetDepth() const;
|
||||
void SetWidth(int w);
|
||||
void SetHeight(int h);
|
||||
void SetDepth(int d);
|
||||
void SetOk(bool isOk);
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
wxPalette* GetPalette() const;
|
||||
void SetPalette(const wxPalette& palette);
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask(wxMask *mask) ;
|
||||
|
||||
static void InitStandardHandlers();
|
||||
|
||||
// raw bitmap access support functions, for internal use only
|
||||
void *GetRawData(wxPixelDataBase& data, int bpp);
|
||||
void UngetRawData(wxPixelDataBase& data);
|
||||
|
||||
// these functions are internal and shouldn't be used, they risk to
|
||||
// disappear in the future
|
||||
bool HasAlpha() const;
|
||||
void UseAlpha();
|
||||
|
||||
// returns the 'native' implementation, a GWorldPtr for the content and one for the mask
|
||||
WXHBITMAP GetHBITMAP( WXHBITMAP * mask = NULL ) const;
|
||||
|
||||
// returns a CGImageRef which must released after usage with CGImageRelease
|
||||
CGImageRef CreateCGImage() const ;
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
// returns an autoreleased version of the image
|
||||
WX_NSImage GetNSImage() const;
|
||||
#endif
|
||||
#if wxOSX_USE_IPHONE
|
||||
// returns an autoreleased version of the image
|
||||
WX_UIImage GetUIImage() const;
|
||||
#endif
|
||||
// returns a IconRef which must be retained before and released after usage
|
||||
IconRef GetIconRef() const;
|
||||
// returns a IconRef which must be released after usage
|
||||
IconRef CreateIconRef() const;
|
||||
// get read only access to the underlying buffer
|
||||
void *GetRawAccess() const ;
|
||||
// brackets to the underlying OS structure for read/write access
|
||||
// makes sure that no cached images will be constructed until terminated
|
||||
void *BeginRawAccess() ;
|
||||
void EndRawAccess() ;
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
};
|
||||
|
||||
#endif // _WX_BITMAP_H_
|
49
Externals/wxWidgets3/include/wx/osx/bmpbuttn.h
vendored
Normal file
49
Externals/wxWidgets3/include/wx/osx/bmpbuttn.h
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/bmpbuttn.h
|
||||
// Purpose: wxBitmapButton class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: bmpbuttn.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_BMPBUTTN_H_
|
||||
#define _WX_OSX_BMPBUTTN_H_
|
||||
|
||||
#include "wx/button.h"
|
||||
|
||||
#define wxDEFAULT_BUTTON_MARGIN 4
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase
|
||||
{
|
||||
public:
|
||||
wxBitmapButton()
|
||||
{
|
||||
SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN);
|
||||
}
|
||||
|
||||
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
protected:
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_BMPBUTTN_H_
|
58
Externals/wxWidgets3/include/wx/osx/brush.h
vendored
Normal file
58
Externals/wxWidgets3/include/wx/osx/brush.h
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/brush.h
|
||||
// Purpose: wxBrush class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: brush.h 54874 2008-07-31 09:59:04Z SC $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BRUSH_H_
|
||||
#define _WX_BRUSH_H_
|
||||
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBrush;
|
||||
|
||||
// Brush
|
||||
class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
|
||||
{
|
||||
public:
|
||||
wxBrush();
|
||||
wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
|
||||
#endif
|
||||
wxBrush(const wxBitmap& stipple);
|
||||
virtual ~wxBrush();
|
||||
|
||||
virtual void SetColour(const wxColour& col) ;
|
||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
virtual void SetStyle(wxBrushStyle style) ;
|
||||
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||
|
||||
bool operator==(const wxBrush& brush) const;
|
||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||
|
||||
wxColour GetColour() const;
|
||||
wxBrushStyle GetStyle() const ;
|
||||
wxBitmap *GetStipple() const ;
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
||||
{ SetStyle((wxBrushStyle)style); }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBrush)
|
||||
};
|
||||
|
||||
#endif // _WX_BRUSH_H_
|
125
Externals/wxWidgets3/include/wx/osx/button.h
vendored
Normal file
125
Externals/wxWidgets3/include/wx/osx/button.h
vendored
Normal file
@ -0,0 +1,125 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/button.h
|
||||
// Purpose: wxButton class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: button.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_BUTTON_H_
|
||||
#define _WX_OSX_BUTTON_H_
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
// Pushbutton
|
||||
class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
|
||||
{
|
||||
public:
|
||||
wxButton() {}
|
||||
wxButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxWindow *SetDefault();
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// osx specific event handling common for all osx-ports
|
||||
|
||||
virtual bool OSXHandleClicked( double timestampsec );
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const ;
|
||||
|
||||
void OnEnterWindow( wxMouseEvent& event);
|
||||
void OnLeaveWindow( wxMouseEvent& event);
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State which) const;
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
virtual void DoSetBitmapPosition(wxDirection dir);
|
||||
|
||||
virtual void DoSetBitmapMargins(int x, int y)
|
||||
{
|
||||
m_marginX = x;
|
||||
m_marginY = y;
|
||||
InvalidateBestSize();
|
||||
}
|
||||
|
||||
#if wxUSE_MARKUP && wxOSX_USE_COCOA
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP && wxOSX_USE_COCOA
|
||||
|
||||
|
||||
// the margins around the bitmap
|
||||
int m_marginX;
|
||||
int m_marginY;
|
||||
|
||||
// the bitmaps for the different state of the buttons, all of them may be
|
||||
// invalid and the button only shows a bitmap at all if State_Normal bitmap
|
||||
// is valid
|
||||
wxBitmap m_bitmaps[State_Max];
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxButton)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// OS X specific class, not part of public wx API
|
||||
class WXDLLIMPEXP_CORE wxDisclosureTriangle : public wxControl
|
||||
{
|
||||
public:
|
||||
wxDisclosureTriangle(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER_NONE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxBORDER_NONE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
void SetOpen( bool open );
|
||||
bool IsOpen() const;
|
||||
|
||||
// osx specific event handling common for all osx-ports
|
||||
|
||||
virtual bool OSXHandleClicked( double timestampsec );
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const ;
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_BUTTON_H_
|
60
Externals/wxWidgets3/include/wx/osx/carbon/chkconf.h
vendored
Normal file
60
Externals/wxWidgets3/include/wx/osx/carbon/chkconf.h
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Name: wx/osx/carbon/chkconf.h
|
||||
* Purpose: Compiler-specific configuration checking
|
||||
* Author: Julian Smart
|
||||
* Modified by:
|
||||
* Created: 01/02/97
|
||||
* RCS-ID: $Id: chkconf.h 61926 2009-09-14 13:07:23Z SC $
|
||||
* Copyright: (c) Julian Smart
|
||||
* Licence: wxWindows licence
|
||||
*/
|
||||
|
||||
#ifndef _WX_OSX_CARBON_CHKCONF_H_
|
||||
#define _WX_OSX_CARBON_CHKCONF_H_
|
||||
|
||||
/*
|
||||
* native (1) or emulated (0) toolbar
|
||||
* also support old notation wxMAC_USE_NATIVE_TOOLBAR
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef wxMAC_USE_NATIVE_TOOLBAR
|
||||
#define wxOSX_USE_NATIVE_TOOLBAR wxMAC_USE_NATIVE_TOOLBAR
|
||||
#endif
|
||||
|
||||
#ifndef wxOSX_USE_NATIVE_TOOLBAR
|
||||
#define wxOSX_USE_NATIVE_TOOLBAR 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* text rendering system
|
||||
*/
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
|
||||
#define wxOSX_USE_CORE_TEXT 1
|
||||
// MLTE-TextControl uses ATSU
|
||||
#define wxOSX_USE_ATSU_TEXT 1
|
||||
|
||||
#else // platform < 10.5
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
||||
#define wxOSX_USE_CORE_TEXT 1
|
||||
#else
|
||||
#define wxOSX_USE_CORE_TEXT 0
|
||||
#endif
|
||||
#define wxOSX_USE_ATSU_TEXT 1
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Audio System
|
||||
*/
|
||||
|
||||
#define wxOSX_USE_QUICKTIME 1
|
||||
#define wxOSX_USE_AUDIOTOOLBOX 0
|
||||
|
||||
#endif
|
||||
/* _WX_OSX_CARBON_CHKCONF_H_ */
|
||||
|
479
Externals/wxWidgets3/include/wx/osx/carbon/dataview.h
vendored
Normal file
479
Externals/wxWidgets3/include/wx/osx/carbon/dataview.h
vendored
Normal file
@ -0,0 +1,479 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/dataview.h
|
||||
// Purpose: wxDataViewCtrl native implementation header for carbon
|
||||
// Author:
|
||||
// Id: $Id: dataview.h 57374 2009-01-27
|
||||
// Copyright: (c) 2009
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DATAVIEWCTRL_CARBON_H_
|
||||
#define _WX_DATAVIEWCTRL_CARBON_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
#include "wx/osx/core/dataview.h"
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
// ============================================================================
|
||||
// wxDataViewColumnNativeData
|
||||
// ============================================================================
|
||||
class wxDataViewColumnNativeData
|
||||
{
|
||||
public:
|
||||
//
|
||||
// constructors / destructor
|
||||
//
|
||||
wxDataViewColumnNativeData()
|
||||
{
|
||||
}
|
||||
wxDataViewColumnNativeData(DataBrowserPropertyID initPropertyID)
|
||||
:m_PropertyID(initPropertyID)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// data access methods
|
||||
//
|
||||
DataBrowserPropertyID GetPropertyID() const
|
||||
{
|
||||
return m_PropertyID;
|
||||
}
|
||||
|
||||
void SetPropertyID(DataBrowserPropertyID newPropertyID)
|
||||
{
|
||||
m_PropertyID = newPropertyID;
|
||||
}
|
||||
|
||||
protected:
|
||||
private:
|
||||
//
|
||||
// variables
|
||||
//
|
||||
DataBrowserPropertyID m_PropertyID; // each column is identified by its unique property ID (NOT by the column's index)
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// wxDataViewRendererNativeData
|
||||
// ============================================================================
|
||||
class wxDataViewRendererNativeData
|
||||
{
|
||||
public:
|
||||
//
|
||||
// constructors / destructor
|
||||
//
|
||||
wxDataViewRendererNativeData()
|
||||
{
|
||||
}
|
||||
wxDataViewRendererNativeData(DataBrowserPropertyType initPropertyType, DataBrowserItemDataRef initItemDataRef=NULL)
|
||||
:m_ItemDataRef(initItemDataRef), m_PropertyType(initPropertyType)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// data access methods
|
||||
//
|
||||
DataBrowserItemDataRef GetItemDataRef() const
|
||||
{
|
||||
return m_ItemDataRef;
|
||||
}
|
||||
DataBrowserPropertyType GetPropertyType() const
|
||||
{
|
||||
return m_PropertyType;
|
||||
}
|
||||
|
||||
void SetItemDataRef(DataBrowserItemDataRef newItemDataRef)
|
||||
{
|
||||
m_ItemDataRef = newItemDataRef;
|
||||
}
|
||||
void SetPropertyType(DataBrowserPropertyType newPropertyType)
|
||||
{
|
||||
m_PropertyType = newPropertyType;
|
||||
}
|
||||
|
||||
protected:
|
||||
private:
|
||||
//
|
||||
// variables
|
||||
//
|
||||
DataBrowserItemDataRef m_ItemDataRef;
|
||||
|
||||
DataBrowserPropertyType m_PropertyType;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// wxMacDataBrowserTableViewControl
|
||||
// ============================================================================
|
||||
//
|
||||
// This is a wrapper class for the Mac OS X data browser environment.
|
||||
// It covers all data brower functionality for the native browser's list
|
||||
// and column style.
|
||||
//
|
||||
|
||||
// data browser's property IDs have a reserved ID range from 0 - 1023
|
||||
// therefore, the first usable property ID is 'kMinPropertyID'
|
||||
DataBrowserPropertyID const kMinPropertyID = 1024;
|
||||
|
||||
// array of data browser item IDs
|
||||
WX_DEFINE_ARRAY_SIZE_T(size_t,wxArrayDataBrowserItemID);
|
||||
|
||||
class wxMacDataBrowserTableViewControl : public wxMacControl
|
||||
{
|
||||
public:
|
||||
//
|
||||
// constructors / destructor
|
||||
//
|
||||
wxMacDataBrowserTableViewControl(wxWindow* peer, const wxPoint& pos, const wxSize& size, long style);
|
||||
wxMacDataBrowserTableViewControl()
|
||||
{
|
||||
}
|
||||
~wxMacDataBrowserTableViewControl();
|
||||
|
||||
//
|
||||
// callback handling
|
||||
//
|
||||
OSStatus SetCallbacks (DataBrowserCallbacks const* callbacks);
|
||||
OSStatus SetCustomCallbacks(DataBrowserCustomCallbacks const* customCallbacks);
|
||||
|
||||
//
|
||||
// DnD handling
|
||||
//
|
||||
OSStatus EnableAutomaticDragTracking(bool enable=true);
|
||||
|
||||
//
|
||||
// header handling
|
||||
//
|
||||
OSStatus GetHeaderDesc(DataBrowserPropertyID property, DataBrowserListViewHeaderDesc* desc) const;
|
||||
|
||||
OSStatus SetHeaderDesc(DataBrowserPropertyID property, DataBrowserListViewHeaderDesc* desc);
|
||||
|
||||
//
|
||||
// layout handling
|
||||
//
|
||||
OSStatus AutoSizeColumns();
|
||||
|
||||
OSStatus EnableCellSizeModification(bool enableHeight=true, bool enableWidth=true); // enables or disables the column width and row height modification (default: false)
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||
OSStatus GetAttributes (OptionBits* attributes);
|
||||
#endif
|
||||
OSStatus GetColumnWidth (DataBrowserPropertyID column, UInt16 *width ) const; // returns the column width in pixels
|
||||
OSStatus GetDefaultColumnWidth(UInt16 *width ) const; // returns the default column width in pixels
|
||||
OSStatus GetDefaultRowHeight (UInt16 * height ) const;
|
||||
OSStatus GetHeaderButtonHeight(UInt16 *height );
|
||||
OSStatus GetPartBounds (DataBrowserItemID item, DataBrowserPropertyID property, DataBrowserPropertyPart part, Rect* bounds);
|
||||
OSStatus GetRowHeight (DataBrowserItemID item , UInt16 *height) const;
|
||||
OSStatus GetScrollPosition (UInt32* top, UInt32 *left) const;
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
||||
OSStatus SetAttributes (OptionBits attributes);
|
||||
#endif
|
||||
OSStatus SetColumnWidth(DataBrowserPropertyID column, UInt16 width); // sets the column width in pixels
|
||||
OSStatus SetDefaultColumnWidth( UInt16 width );
|
||||
OSStatus SetDefaultRowHeight( UInt16 height );
|
||||
OSStatus SetHasScrollBars( bool horiz, bool vert );
|
||||
OSStatus SetHeaderButtonHeight( UInt16 height );
|
||||
OSStatus SetHiliteStyle(DataBrowserTableViewHiliteStyle hiliteStyle);
|
||||
OSStatus SetIndent(float Indent);
|
||||
OSStatus SetItemRowHeight( DataBrowserItemID item , UInt16 height);
|
||||
OSStatus SetScrollPosition( UInt32 top , UInt32 left );
|
||||
|
||||
//
|
||||
// column handling
|
||||
//
|
||||
OSStatus GetColumnCount (UInt32* numColumns) const;
|
||||
OSStatus GetColumnIndex (DataBrowserPropertyID propertyID, DataBrowserTableViewColumnIndex* index) const; // returns for the passed property the corresponding column index
|
||||
OSStatus GetFreePropertyID(DataBrowserPropertyID* propertyID) const; // this method returns a property id that is valid and currently not used; if it cannot be found 'errDataBrowerPropertyNotSupported' is returned
|
||||
OSStatus GetPropertyFlags (DataBrowserPropertyID propertyID, DataBrowserPropertyFlags *flags ) const;
|
||||
OSStatus GetPropertyID (DataBrowserItemDataRef itemData, DataBrowserPropertyID* propertyID) const; // returns for the passed item data reference the corresponding property ID
|
||||
OSStatus GetPropertyID (DataBrowserTableViewColumnIndex index, DataBrowserPropertyID* propertyID) const; // returns for the passed column index the corresponding property ID
|
||||
|
||||
OSStatus IsUsedPropertyID(DataBrowserPropertyID propertyID) const; // checks if passed property id is used by the control; no error is returned if the id exists
|
||||
|
||||
OSStatus RemoveColumnByProperty(DataBrowserTableViewColumnID propertyID);
|
||||
OSStatus RemoveColumnByIndex (DataBrowserTableViewColumnIndex index);
|
||||
|
||||
OSStatus SetColumnIndex (DataBrowserPropertyID propertyID, DataBrowserTableViewColumnIndex index);
|
||||
OSStatus SetDisclosureColumn(DataBrowserPropertyID propertyID, Boolean expandableRows=false);
|
||||
OSStatus SetPropertyFlags (DataBrowserPropertyID propertyID, DataBrowserPropertyFlags flags);
|
||||
|
||||
//
|
||||
// item handling
|
||||
//
|
||||
OSStatus AddItem(DataBrowserItemID container, DataBrowserItemID const* itemID) // adds a single item
|
||||
{
|
||||
return AddItems(container,1,itemID,kDataBrowserItemNoProperty);
|
||||
}
|
||||
OSStatus AddItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty); // adds items to the data browser
|
||||
|
||||
OSStatus GetFreeItemID(DataBrowserItemID* id) const; // this method returns an item id that is valid and currently not used; if it cannot be found 'errDataBrowserItemNotAdded' is returned
|
||||
OSStatus GetItemCount (ItemCount* numItems) const
|
||||
{
|
||||
return GetItemCount(kDataBrowserNoItem,true,kDataBrowserItemAnyState,numItems);
|
||||
}
|
||||
OSStatus GetItemCount (DataBrowserItemID container, Boolean recurse, DataBrowserItemState state, ItemCount* numItems) const;
|
||||
OSStatus GetItemID (DataBrowserTableViewRowIndex row, DataBrowserItemID* item) const;
|
||||
OSStatus GetItems (DataBrowserItemID container, Boolean recurse, DataBrowserItemState state, Handle items) const;
|
||||
OSStatus GetItemRow (DataBrowserItemID item, DataBrowserTableViewRowIndex* row) const;
|
||||
OSStatus GetItemState (DataBrowserItemID item, DataBrowserItemState* state) const;
|
||||
|
||||
OSStatus IsUsedItemID(DataBrowserItemID itemID) const; // checks if the passed id is in use
|
||||
|
||||
OSStatus RevealItem(DataBrowserItemID item, DataBrowserPropertyID propertyID, DataBrowserRevealOptions options) const;
|
||||
|
||||
OSStatus RemoveItem(DataBrowserItemID container, DataBrowserItemID const* itemID) // removes a single item
|
||||
{
|
||||
return RemoveItems(container,1,itemID,kDataBrowserItemNoProperty);
|
||||
}
|
||||
OSStatus RemoveItems(void) // removes all items
|
||||
{
|
||||
return RemoveItems(kDataBrowserNoItem,0,NULL,kDataBrowserItemNoProperty);
|
||||
}
|
||||
OSStatus RemoveItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty);
|
||||
|
||||
OSStatus UpdateItem(DataBrowserItemID container, DataBrowserItemID const* item) // updates all columns of the passed item
|
||||
{
|
||||
return UpdateItems(container,1,item,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty);
|
||||
}
|
||||
OSStatus UpdateItems(void) // updates all items
|
||||
{
|
||||
return UpdateItems(kDataBrowserNoItem,0,NULL,kDataBrowserItemNoProperty,kDataBrowserItemNoProperty);
|
||||
}
|
||||
OSStatus UpdateItems(DataBrowserItemID container, UInt32 numItems, DataBrowserItemID const* items, DataBrowserPropertyID preSortProperty, DataBrowserPropertyID propertyID) const;
|
||||
|
||||
//
|
||||
// item selection
|
||||
//
|
||||
size_t GetSelectedItemIDs(wxArrayDataBrowserItemID& itemIDs) const; // returns the number of selected item and the item IDs in the array
|
||||
OSStatus GetSelectionAnchor(DataBrowserItemID *first, DataBrowserItemID *last) const;
|
||||
OSStatus GetSelectionFlags (DataBrowserSelectionFlags* flags) const;
|
||||
|
||||
bool IsItemSelected(DataBrowserItemID item) const;
|
||||
|
||||
OSStatus SetSelectionFlags(DataBrowserSelectionFlags flags);
|
||||
OSStatus SetSelectedItems (UInt32 numItems, DataBrowserItemID const* itemIDs, DataBrowserSetOption operation);
|
||||
|
||||
//
|
||||
// item sorting
|
||||
//
|
||||
OSStatus GetSortOrder (DataBrowserSortOrder* order) const;
|
||||
OSStatus GetSortProperty(DataBrowserPropertyID* propertyID) const;
|
||||
|
||||
OSStatus Resort(DataBrowserItemID container=kDataBrowserNoItem, Boolean sortChildren=true);
|
||||
|
||||
OSStatus SetSortOrder (DataBrowserSortOrder order);
|
||||
OSStatus SetSortProperty(DataBrowserPropertyID propertyID);
|
||||
|
||||
//
|
||||
// container handling
|
||||
//
|
||||
OSStatus CloseContainer(DataBrowserItemID containerID);
|
||||
|
||||
OSStatus OpenContainer(DataBrowserItemID containerID);
|
||||
|
||||
protected :
|
||||
//
|
||||
// standard callback functions
|
||||
//
|
||||
static pascal Boolean DataBrowserCompareProc (ControlRef browser, DataBrowserItemID itemOneID, DataBrowserItemID itemTwoID, DataBrowserPropertyID sortProperty);
|
||||
static pascal void DataBrowserGetContextualMenuProc(ControlRef browser, MenuRef* menu, UInt32* helpType, CFStringRef* helpItemString, AEDesc* selection);
|
||||
static pascal OSStatus DataBrowserGetSetItemDataProc (ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean getValue);
|
||||
static pascal void DataBrowserItemNotificationProc (ControlRef browser, DataBrowserItemID itemID, DataBrowserItemNotification message, DataBrowserItemDataRef itemData);
|
||||
|
||||
virtual Boolean DataBrowserCompareProc (DataBrowserItemID itemOneID, DataBrowserItemID itemTwoID, DataBrowserPropertyID sortProperty) = 0;
|
||||
virtual void DataBrowserGetContextualMenuProc(MenuRef* menu, UInt32* helpType, CFStringRef* helpItemString, AEDesc* selection) = 0;
|
||||
virtual OSStatus DataBrowserGetSetItemDataProc (DataBrowserItemID itemID, DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean getValue) = 0;
|
||||
virtual void DataBrowserItemNotificationProc (DataBrowserItemID itemID, DataBrowserItemNotification message, DataBrowserItemDataRef itemData) = 0;
|
||||
|
||||
//
|
||||
// callback functions for customized types
|
||||
//
|
||||
static pascal void DataBrowserDrawItemProc(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID propertyID, DataBrowserItemState state, Rect const* rectangle, SInt16 bitDepth, Boolean colorDevice);
|
||||
static pascal Boolean DataBrowserEditItemProc(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID propertyID, CFStringRef theString, Rect* maxEditTextRect, Boolean* shrinkToFit);
|
||||
static pascal Boolean DataBrowserHitTestProc (ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Rect const* mouseRect);
|
||||
static pascal DataBrowserTrackingResult DataBrowserTrackingProc(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Point startPt, EventModifiers modifiers);
|
||||
|
||||
virtual void DataBrowserDrawItemProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, DataBrowserItemState state, Rect const* rectangle, SInt16 bitDepth, Boolean colorDevice) = 0;
|
||||
virtual Boolean DataBrowserEditItemProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, CFStringRef theString, Rect* maxEditTextRect, Boolean* shrinkToFit) = 0;
|
||||
virtual Boolean DataBrowserHitTestProc (DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Rect const* mouseRect) = 0;
|
||||
virtual DataBrowserTrackingResult DataBrowserTrackingProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Point startPt, EventModifiers modifiers) = 0;
|
||||
|
||||
//
|
||||
// callback functions for drag & drop
|
||||
///
|
||||
static pascal Boolean DataBrowserAcceptDragProc (ControlRef browser, DragReference dragRef, DataBrowserItemID itemID);
|
||||
static pascal Boolean DataBrowserAddDragItemProc(ControlRef browser, DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef);
|
||||
static pascal Boolean DataBrowserReceiveDragProc(ControlRef browser, DragReference dragRef, DataBrowserItemID itemID);
|
||||
|
||||
virtual Boolean DataBrowserAcceptDragProc (DragReference dragRef, DataBrowserItemID itemID) = 0;
|
||||
virtual Boolean DataBrowserAddDragItemProc(DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef) = 0;
|
||||
virtual Boolean DataBrowserReceiveDragProc(DragReference dragRef, DataBrowserItemID itemID) = 0;
|
||||
|
||||
//
|
||||
// event handler for hit testing
|
||||
///
|
||||
void* m_macDataViewCtrlEventHandler;
|
||||
|
||||
private:
|
||||
//
|
||||
// wxWidget internal stuff
|
||||
//
|
||||
DECLARE_ABSTRACT_CLASS(wxMacDataBrowserTableViewControl)
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// wxMacDataBrowserListViewControl
|
||||
// ============================================================================
|
||||
//
|
||||
// This class is a wrapper for the native browser's list view style. It expands
|
||||
// the inherited functionality of the table view control class.
|
||||
// The term list view is in this case Mac OS X specific and is not related
|
||||
// to any wxWidget naming conventions.
|
||||
//
|
||||
class wxMacDataBrowserListViewControl : public wxMacDataBrowserTableViewControl
|
||||
{
|
||||
public:
|
||||
//
|
||||
// constructors / destructor
|
||||
//
|
||||
wxMacDataBrowserListViewControl(wxWindow* peer, wxPoint const& pos, wxSize const& size, long style) : wxMacDataBrowserTableViewControl(peer,pos,size,style)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// column handling
|
||||
//
|
||||
OSStatus AddColumn(DataBrowserListViewColumnDesc *columnDesc, DataBrowserTableViewColumnIndex position);
|
||||
|
||||
protected:
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// wxMacDataViewDataBrowserListViewControl
|
||||
// ============================================================================
|
||||
//
|
||||
// This is the internal interface class between wxDataViewCtrl (wxWidget) and
|
||||
// the native data browser (Mac OS X carbon).
|
||||
//
|
||||
class wxMacDataViewDataBrowserListViewControl : public wxMacDataBrowserListViewControl, public wxDataViewWidgetImpl
|
||||
{
|
||||
public:
|
||||
//
|
||||
// constructors / destructor
|
||||
//
|
||||
wxMacDataViewDataBrowserListViewControl(wxWindow* peer, wxPoint const& pos, wxSize const& size, long style);
|
||||
|
||||
//
|
||||
// column related methods (inherited from wxDataViewWidgetImpl)
|
||||
//
|
||||
virtual bool ClearColumns ();
|
||||
virtual bool DeleteColumn (wxDataViewColumn* columnPtr);
|
||||
virtual void DoSetExpanderColumn(wxDataViewColumn const* columnPtr);
|
||||
virtual wxDataViewColumn* GetColumn (unsigned int pos) const;
|
||||
virtual int GetColumnPosition (wxDataViewColumn const* columnPtr) const;
|
||||
virtual bool InsertColumn (unsigned int pos, wxDataViewColumn* columnPtr);
|
||||
virtual void FitColumnWidthToContent(unsigned int WXUNUSED(pos)) { /*not implemented*/ }
|
||||
|
||||
//
|
||||
// item related methods (inherited from wxDataViewWidgetImpl)
|
||||
//
|
||||
virtual bool Add (wxDataViewItem const& parent, wxDataViewItem const& item);
|
||||
virtual bool Add (wxDataViewItem const& parent, wxDataViewItemArray const& items);
|
||||
virtual void Collapse (wxDataViewItem const& item);
|
||||
virtual void EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr);
|
||||
virtual void Expand (wxDataViewItem const& item);
|
||||
virtual unsigned int GetCount () const;
|
||||
virtual wxRect GetRectangle (wxDataViewItem const& item, wxDataViewColumn const* columnPtr);
|
||||
virtual bool IsExpanded (wxDataViewItem const& item) const;
|
||||
virtual bool Reload ();
|
||||
virtual bool Remove (wxDataViewItem const& parent, wxDataViewItem const& item);
|
||||
virtual bool Remove (wxDataViewItem const& parent, wxDataViewItemArray const& item);
|
||||
virtual bool Update (wxDataViewColumn const* columnPtr);
|
||||
virtual bool Update (wxDataViewItem const& parent, wxDataViewItem const& item);
|
||||
virtual bool Update (wxDataViewItem const& parent, wxDataViewItemArray const& items);
|
||||
|
||||
//
|
||||
// model related methods
|
||||
//
|
||||
virtual bool AssociateModel(wxDataViewModel* model);
|
||||
|
||||
//
|
||||
// selection related methods (inherited from wxDataViewWidgetImpl)
|
||||
//
|
||||
virtual wxDataViewItem GetCurrentItem() const;
|
||||
virtual void SetCurrentItem(const wxDataViewItem& item);
|
||||
virtual int GetSelections(wxDataViewItemArray& sel) const;
|
||||
virtual bool IsSelected (wxDataViewItem const& item) const;
|
||||
virtual void Select (wxDataViewItem const& item);
|
||||
virtual void SelectAll ();
|
||||
virtual void Unselect (wxDataViewItem const& item);
|
||||
virtual void UnselectAll ();
|
||||
|
||||
//
|
||||
// sorting related methods
|
||||
//
|
||||
virtual wxDataViewColumn* GetSortingColumn () const;
|
||||
virtual void Resort ();
|
||||
|
||||
//
|
||||
// other methods (inherited from wxDataViewWidgetImpl)
|
||||
//
|
||||
virtual void DoSetIndent (int indent);
|
||||
virtual void HitTest (wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const;
|
||||
virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height);
|
||||
virtual void OnSize ();
|
||||
|
||||
//
|
||||
// other methods
|
||||
//
|
||||
wxDataViewCtrl* GetDataViewCtrl() const
|
||||
{
|
||||
return dynamic_cast<wxDataViewCtrl*>(GetWXPeer());
|
||||
}
|
||||
|
||||
protected:
|
||||
//
|
||||
// standard callback functions (inherited from wxMacDataBrowserTableViewControl)
|
||||
//
|
||||
virtual Boolean DataBrowserCompareProc (DataBrowserItemID itemOneID, DataBrowserItemID itemTwoID, DataBrowserPropertyID sortProperty);
|
||||
virtual void DataBrowserItemNotificationProc (DataBrowserItemID itemID, DataBrowserItemNotification message, DataBrowserItemDataRef itemData);
|
||||
virtual void DataBrowserGetContextualMenuProc(MenuRef* menu, UInt32* helpType, CFStringRef* helpItemString, AEDesc* selection);
|
||||
virtual OSStatus DataBrowserGetSetItemDataProc (DataBrowserItemID itemID, DataBrowserPropertyID propertyID, DataBrowserItemDataRef itemData, Boolean getValue);
|
||||
|
||||
//
|
||||
// callback functions for customized types (inherited from wxMacDataBrowserTableViewControl)
|
||||
//
|
||||
virtual void DataBrowserDrawItemProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, DataBrowserItemState state, Rect const* rectangle, SInt16 bitDepth, Boolean colorDevice);
|
||||
virtual Boolean DataBrowserEditItemProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, CFStringRef theString, Rect* maxEditTextRect, Boolean* shrinkToFit);
|
||||
virtual Boolean DataBrowserHitTestProc (DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Rect const* mouseRect);
|
||||
virtual DataBrowserTrackingResult DataBrowserTrackingProc(DataBrowserItemID itemID, DataBrowserPropertyID propertyID, Rect const* theRect, Point startPt, EventModifiers modifiers);
|
||||
|
||||
//
|
||||
// callback functions for drag & drop (inherited from wxMacDataBrowserTableViewControl)
|
||||
//
|
||||
virtual Boolean DataBrowserAcceptDragProc (DragReference dragRef, DataBrowserItemID itemID);
|
||||
virtual Boolean DataBrowserAddDragItemProc(DragReference dragRef, DataBrowserItemID itemID, ItemReference* itemRef);
|
||||
virtual Boolean DataBrowserReceiveDragProc(DragReference dragRef, DataBrowserItemID itemID);
|
||||
|
||||
//
|
||||
// drag & drop helper methods
|
||||
//
|
||||
wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects);
|
||||
wxDataObjectComposite* GetDnDDataObjects(DragReference dragRef, ItemReference itemRef) const; // create the data objects from the native dragged object
|
||||
|
||||
//
|
||||
// other methods
|
||||
//
|
||||
wxDataViewColumn* GetColumnPtr(DataBrowserPropertyID propertyID) const; // returns for the passed property the corresponding pointer to a column; NULL is returned if not found
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
typedef wxMacDataViewDataBrowserListViewControl* wxMacDataViewDataBrowserListViewControlPointer;
|
||||
|
||||
#endif // WX_GUI
|
||||
#endif // _WX_MACCARBONDATAVIEWCTRL_H_
|
71
Externals/wxWidgets3/include/wx/osx/carbon/drawer.h
vendored
Normal file
71
Externals/wxWidgets3/include/wx/osx/carbon/drawer.h
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/drawer.h
|
||||
// Purpose: Drawer child window class.
|
||||
// Drawer windows appear under their parent window and
|
||||
// behave like a drawer, opening and closing to reveal
|
||||
// content that does not need to be visible at all times.
|
||||
// Author: Jason Bagley
|
||||
// Modified by:
|
||||
// Created: 2004-30-01
|
||||
// RCS-ID: $Id: drawer.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Jason Bagley; Art & Logic, Inc.
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DRAWERWINDOW_H_
|
||||
#define _WX_DRAWERWINDOW_H_
|
||||
|
||||
#include "wx/toplevel.h"
|
||||
|
||||
//
|
||||
// NB: This is currently a private undocumented class -
|
||||
// it is stable, but the API is not and will change in the
|
||||
// near future
|
||||
//
|
||||
|
||||
#if ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDrawerWindow : public wxTopLevelWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDrawerWindow)
|
||||
|
||||
public:
|
||||
|
||||
wxDrawerWindow();
|
||||
|
||||
wxDrawerWindow(wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
wxSize size = wxDefaultSize,
|
||||
wxDirection edge = wxLEFT,
|
||||
const wxString& name = wxT("drawerwindow"))
|
||||
{
|
||||
this->Create(parent, id, title, size, edge, name);
|
||||
}
|
||||
|
||||
virtual ~wxDrawerWindow();
|
||||
|
||||
// Create a drawer window.
|
||||
// If parent is NULL, create as a tool window.
|
||||
// If parent is not NULL, then wxTopLevelWindow::Attach this window to parent.
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
wxSize size = wxDefaultSize,
|
||||
wxDirection edge = wxLEFT,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
bool Open(bool show = true); // open or close the drawer, possibility for async param, i.e. animate
|
||||
bool Close() { return this->Open(false); }
|
||||
bool IsOpen() const;
|
||||
|
||||
// Set the edge of the parent where the drawer attaches.
|
||||
bool SetPreferredEdge(wxDirection edge);
|
||||
wxDirection GetPreferredEdge() const;
|
||||
wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints
|
||||
};
|
||||
|
||||
#endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
|
||||
|
||||
#endif
|
||||
// _WX_DRAWERWINDOW_H_
|
34
Externals/wxWidgets3/include/wx/osx/carbon/evtloop.h
vendored
Normal file
34
Externals/wxWidgets3/include/wx/osx/carbon/evtloop.h
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/evtloop.h
|
||||
// Purpose: declaration of wxEventLoop for wxMac
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 2006-01-12
|
||||
// RCS-ID: $Id: evtloop.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_CARBON_EVTLOOP_H_
|
||||
#define _WX_MAC_CARBON_EVTLOOP_H_
|
||||
|
||||
struct OpaqueEventRef;
|
||||
typedef OpaqueEventRef *EventRef;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop
|
||||
{
|
||||
public:
|
||||
wxGUIEventLoop();
|
||||
|
||||
protected:
|
||||
virtual int DoDispatchTimeout(unsigned long timeout);
|
||||
|
||||
virtual void DoRun();
|
||||
|
||||
virtual void DoStop();
|
||||
|
||||
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_CARBON_EVTLOOP_H_
|
||||
|
118
Externals/wxWidgets3/include/wx/osx/carbon/mimetype.h
vendored
Normal file
118
Externals/wxWidgets3/include/wx/osx/carbon/mimetype.h
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/mimetype.h
|
||||
// Purpose: Mac Carbon implementation for wx mime-related classes
|
||||
// Author: Ryan Norton
|
||||
// Modified by:
|
||||
// Created: 04/16/2005
|
||||
// RCS-ID: $Id: mimetype.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) 2005 Ryan Norton (<wxprojects@comcast.net>)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MIMETYPE_IMPL_H
|
||||
#define _MIMETYPE_IMPL_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mimetype.h"
|
||||
|
||||
|
||||
class wxMimeTypesManagerImpl
|
||||
{
|
||||
public :
|
||||
//kinda kooky but in wxMimeTypesManager::EnsureImpl it doesn't call
|
||||
//intialize, so we do it ourselves
|
||||
wxMimeTypesManagerImpl() : m_hIC(NULL) { Initialize(); }
|
||||
~wxMimeTypesManagerImpl() { ClearData(); }
|
||||
|
||||
// load all data into memory - done when it is needed for the first time
|
||||
void Initialize(int mailcapStyles = wxMAILCAP_STANDARD,
|
||||
const wxString& extraDir = wxEmptyString);
|
||||
|
||||
// and delete the data here
|
||||
void ClearData();
|
||||
|
||||
// implement containing class functions
|
||||
wxFileType *GetFileTypeFromExtension(const wxString& ext);
|
||||
wxFileType *GetOrAllocateFileTypeFromExtension(const wxString& ext) ;
|
||||
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
|
||||
|
||||
size_t EnumAllFileTypes(wxArrayString& mimetypes);
|
||||
|
||||
void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); }
|
||||
|
||||
// create a new filetype association
|
||||
wxFileType *Associate(const wxFileTypeInfo& ftInfo);
|
||||
// remove association
|
||||
bool Unassociate(wxFileType *ft);
|
||||
|
||||
private:
|
||||
wxArrayFileTypeInfo m_fallbacks;
|
||||
void* m_hIC;
|
||||
void** m_hDatabase;
|
||||
long m_lCount;
|
||||
|
||||
void* pReserved1;
|
||||
void* pReserved2;
|
||||
void* pReserved3;
|
||||
void* pReserved4;
|
||||
void* pReserved5;
|
||||
void* pReserved6;
|
||||
|
||||
friend class wxFileTypeImpl;
|
||||
};
|
||||
|
||||
class wxFileTypeImpl
|
||||
{
|
||||
public:
|
||||
//kind of nutty, but mimecmn.cpp creates one with an empty new
|
||||
wxFileTypeImpl() : m_manager(NULL) {}
|
||||
~wxFileTypeImpl() {} //for those broken compilers
|
||||
|
||||
// implement accessor functions
|
||||
bool GetExtensions(wxArrayString& extensions);
|
||||
bool GetMimeType(wxString *mimeType) const;
|
||||
bool GetMimeTypes(wxArrayString& mimeTypes) const;
|
||||
bool GetIcon(wxIconLocation *iconLoc) const;
|
||||
bool GetDescription(wxString *desc) const;
|
||||
bool GetOpenCommand(wxString *openCmd,
|
||||
const wxFileType::MessageParameters&) const;
|
||||
bool GetPrintCommand(wxString *printCmd,
|
||||
const wxFileType::MessageParameters&) const;
|
||||
|
||||
size_t GetAllCommands(wxArrayString * verbs, wxArrayString * commands,
|
||||
const wxFileType::MessageParameters& params) const;
|
||||
|
||||
// remove the record for this file type
|
||||
// probably a mistake to come here, use wxMimeTypesManager.Unassociate (ft) instead
|
||||
bool Unassociate(wxFileType *ft)
|
||||
{
|
||||
return m_manager->Unassociate(ft);
|
||||
}
|
||||
|
||||
// set an arbitrary command, ask confirmation if it already exists and
|
||||
// overwriteprompt is TRUE
|
||||
bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = true);
|
||||
bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0);
|
||||
|
||||
private:
|
||||
void Init(wxMimeTypesManagerImpl *manager, long lIndex)
|
||||
{ m_manager=(manager); m_lIndex=(lIndex); }
|
||||
|
||||
// helper function
|
||||
wxString GetCommand(const wxString& verb) const;
|
||||
|
||||
wxMimeTypesManagerImpl *m_manager;
|
||||
long m_lIndex;
|
||||
|
||||
void* pReserved1;
|
||||
void* pReserved2;
|
||||
void* pReserved3;
|
||||
void* pReserved4;
|
||||
void* pReserved5;
|
||||
void* pReserved6;
|
||||
|
||||
friend class wxMimeTypesManagerImpl;
|
||||
};
|
||||
|
||||
#endif
|
||||
//_MIMETYPE_H
|
1062
Externals/wxWidgets3/include/wx/osx/carbon/private.h
vendored
Normal file
1062
Externals/wxWidgets3/include/wx/osx/carbon/private.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
53
Externals/wxWidgets3/include/wx/osx/carbon/private/mactext.h
vendored
Normal file
53
Externals/wxWidgets3/include/wx/osx/carbon/private/mactext.h
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/private/mactext.h
|
||||
// Purpose: private wxMacTextControl base class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id: mactext.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_PRIVATE_MACTEXT_H_
|
||||
#define _WX_MAC_PRIVATE_MACTEXT_H_
|
||||
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
// implementation exposed, so that search control can pull it
|
||||
|
||||
class wxMacUnicodeTextControl : public wxMacControl, public wxTextWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxMacUnicodeTextControl( wxTextCtrl *wxPeer ) ;
|
||||
wxMacUnicodeTextControl( wxTextCtrl *wxPeer,
|
||||
const wxString& str,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size, long style ) ;
|
||||
virtual ~wxMacUnicodeTextControl();
|
||||
|
||||
virtual bool CanFocus() const
|
||||
{ return true; }
|
||||
virtual void VisibilityChanged(bool shown);
|
||||
virtual wxString GetStringValue() const ;
|
||||
virtual void SetStringValue( const wxString &str) ;
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
virtual bool CanPaste() const;
|
||||
virtual void SetEditable(bool editable) ;
|
||||
virtual void GetSelection( long* from, long* to) const ;
|
||||
virtual void SetSelection( long from , long to ) ;
|
||||
virtual void WriteText(const wxString& str) ;
|
||||
|
||||
protected :
|
||||
void InstallEventHandlers();
|
||||
|
||||
// contains the tag for the content (is different for password and non-password controls)
|
||||
OSType m_valueTag ;
|
||||
WXEVENTHANDLERREF m_macTextCtrlEventHandler ;
|
||||
public :
|
||||
ControlEditTextSelectionRec m_selection ;
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_PRIVATE_MACTEXT_H_
|
58
Externals/wxWidgets3/include/wx/osx/carbon/private/overlay.h
vendored
Normal file
58
Externals/wxWidgets3/include/wx/osx/carbon/private/overlay.h
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/private/overlay.h
|
||||
// Purpose: wxOverlayImpl declaration
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 2006-10-20
|
||||
// RCS-ID: $Id: overlay.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_CARBON_PRIVATE_OVERLAY_H_
|
||||
#define _WX_MAC_CARBON_PRIVATE_OVERLAY_H_
|
||||
|
||||
#include "wx/osx/private.h"
|
||||
#include "wx/toplevel.h"
|
||||
#include "wx/graphics.h"
|
||||
|
||||
class wxOverlayImpl
|
||||
{
|
||||
public:
|
||||
wxOverlayImpl() ;
|
||||
~wxOverlayImpl() ;
|
||||
|
||||
|
||||
// clears the overlay without restoring the former state
|
||||
// to be done eg when the window content has been changed and repainted
|
||||
void Reset();
|
||||
|
||||
// returns true if it has been setup
|
||||
bool IsOk();
|
||||
|
||||
void Init( wxDC* dc, int x , int y , int width , int height );
|
||||
|
||||
void BeginDrawing( wxDC* dc);
|
||||
|
||||
void EndDrawing( wxDC* dc);
|
||||
|
||||
void Clear( wxDC* dc);
|
||||
|
||||
private:
|
||||
OSStatus CreateOverlayWindow();
|
||||
|
||||
void MacGetBounds( Rect *bounds );
|
||||
|
||||
WindowRef m_overlayWindow;
|
||||
WindowRef m_overlayParentWindow;
|
||||
CGContextRef m_overlayContext ;
|
||||
// we store the window in case we would have to issue a Refresh()
|
||||
wxWindow* m_window ;
|
||||
|
||||
int m_x ;
|
||||
int m_y ;
|
||||
int m_width ;
|
||||
int m_height ;
|
||||
} ;
|
||||
|
||||
#endif // _WX_MAC_CARBON_PRIVATE_OVERLAY_H_
|
93
Externals/wxWidgets3/include/wx/osx/carbon/private/print.h
vendored
Normal file
93
Externals/wxWidgets3/include/wx/osx/carbon/private/print.h
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/private/print.h
|
||||
// Purpose: private implementation for printing on OS X
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id: print.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_PRIVATE_PRINT_H_
|
||||
#define _WX_MAC_PRIVATE_PRINT_H_
|
||||
|
||||
#include "wx/cmndata.h"
|
||||
#include "wx/print.h"
|
||||
|
||||
// for PrintingManager
|
||||
#include "ApplicationServices/ApplicationServices.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxOSXPrintData : public wxPrintNativeDataBase
|
||||
{
|
||||
public:
|
||||
wxOSXPrintData();
|
||||
virtual ~wxOSXPrintData();
|
||||
|
||||
virtual bool TransferTo( wxPrintData &data );
|
||||
virtual bool TransferFrom( const wxPrintData &data );
|
||||
|
||||
virtual bool IsOk() const ;
|
||||
|
||||
virtual void TransferFrom( wxPageSetupDialogData * );
|
||||
virtual void TransferTo( wxPageSetupDialogData * );
|
||||
|
||||
virtual void TransferFrom( wxPrintDialogData * );
|
||||
virtual void TransferTo( wxPrintDialogData * );
|
||||
|
||||
PMPrintSession GetPrintSession() { return m_macPrintSession; }
|
||||
PMPageFormat GetPageFormat() { return m_macPageFormat; }
|
||||
PMPrintSettings GetPrintSettings() { return m_macPrintSettings; }
|
||||
protected :
|
||||
virtual void TransferPrinterNameFrom( const wxPrintData &data );
|
||||
virtual void TransferPaperInfoFrom( const wxPrintData &data );
|
||||
virtual void TransferResolutionFrom( const wxPrintData &data );
|
||||
|
||||
virtual void TransferPrinterNameTo( wxPrintData &data );
|
||||
virtual void TransferPaperInfoTo( wxPrintData &data );
|
||||
virtual void TransferResolutionTo( wxPrintData &data );
|
||||
|
||||
|
||||
virtual void UpdateFromPMState();
|
||||
virtual void UpdateToPMState();
|
||||
|
||||
PMPrintSession m_macPrintSession ;
|
||||
PMPageFormat m_macPageFormat ;
|
||||
PMPrintSettings m_macPrintSettings ;
|
||||
PMPaper m_macPaper;
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxOSXPrintData)
|
||||
} ;
|
||||
|
||||
WXDLLIMPEXP_CORE wxPrintNativeDataBase* wxOSXCreatePrintData();
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
class WXDLLIMPEXP_CORE wxOSXCarbonPrintData : public wxOSXPrintData
|
||||
{
|
||||
public:
|
||||
wxOSXCarbonPrintData();
|
||||
virtual ~wxOSXCarbonPrintData();
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxOSXCarbonPrintData)
|
||||
} ;
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
class WXDLLIMPEXP_CORE wxOSXCocoaPrintData : public wxOSXPrintData
|
||||
{
|
||||
public:
|
||||
wxOSXCocoaPrintData();
|
||||
virtual ~wxOSXCocoaPrintData();
|
||||
|
||||
WX_NSPrintInfo GetNSPrintInfo() { return m_macPrintInfo; }
|
||||
protected:
|
||||
virtual void UpdateFromPMState();
|
||||
virtual void UpdateToPMState();
|
||||
|
||||
WX_NSPrintInfo m_macPrintInfo;
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxOSXCocoaPrintData)
|
||||
} ;
|
||||
#endif
|
||||
|
||||
#endif // _WX_MAC_PRIVATE_PRINT_H_
|
33
Externals/wxWidgets3/include/wx/osx/carbon/private/timer.h
vendored
Normal file
33
Externals/wxWidgets3/include/wx/osx/carbon/private/timer.h
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/private/timer.h
|
||||
// Purpose: wxTimer class
|
||||
// Author: Stefan Csomor
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: timer.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_PRIVATE_TIMER_H_
|
||||
#define _WX_MAC_PRIVATE_TIMER_H_
|
||||
|
||||
#include "wx/private/timer.h"
|
||||
|
||||
struct MacTimerInfo;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCarbonTimerImpl : public wxTimerImpl
|
||||
{
|
||||
public:
|
||||
wxCarbonTimerImpl(wxTimer *timer);
|
||||
virtual ~wxCarbonTimerImpl();
|
||||
|
||||
virtual bool Start(int milliseconds = -1, bool one_shot = false);
|
||||
virtual void Stop();
|
||||
|
||||
virtual bool IsRunning() const;
|
||||
|
||||
private:
|
||||
MacTimerInfo *m_info;
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_PRIVATE_TIMER_H_
|
100
Externals/wxWidgets3/include/wx/osx/carbon/region.h
vendored
Normal file
100
Externals/wxWidgets3/include/wx/osx/carbon/region.h
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/region.h
|
||||
// Purpose: wxRegion class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: region.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_CARBON_REGION_H_
|
||||
#define _WX_MAC_CARBON_REGION_H_
|
||||
|
||||
#include "wx/list.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxRegion : public wxRegionWithCombine
|
||||
{
|
||||
public:
|
||||
wxRegion(long x, long y, long w, long h);
|
||||
wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
|
||||
wxRegion(const wxRect& rect);
|
||||
wxRegion( WXHRGN hRegion );
|
||||
wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
|
||||
wxRegion();
|
||||
wxRegion(const wxBitmap& bmp)
|
||||
{
|
||||
Union(bmp);
|
||||
}
|
||||
wxRegion(const wxBitmap& bmp,
|
||||
const wxColour& transColour, int tolerance = 0)
|
||||
{
|
||||
Union(bmp, transColour, tolerance);
|
||||
}
|
||||
|
||||
virtual ~wxRegion();
|
||||
|
||||
// wxRegionBase methods
|
||||
virtual void Clear();
|
||||
virtual bool IsEmpty() const;
|
||||
|
||||
// Internal
|
||||
WXHRGN GetWXHRGN() const ;
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
virtual bool DoIsEqual(const wxRegion& region) const;
|
||||
virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const;
|
||||
virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const;
|
||||
virtual wxRegionContain DoContainsRect(const wxRect& rect) const;
|
||||
|
||||
virtual bool DoOffset(wxCoord x, wxCoord y);
|
||||
virtual bool DoCombine(const wxRegion& region, wxRegionOp op);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxRegion)
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxRegionIterator;
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxRegionIterator : public wxObject
|
||||
{
|
||||
public:
|
||||
wxRegionIterator();
|
||||
wxRegionIterator(const wxRegion& region);
|
||||
wxRegionIterator(const wxRegionIterator& iterator);
|
||||
virtual ~wxRegionIterator();
|
||||
|
||||
wxRegionIterator& operator=(const wxRegionIterator& iterator);
|
||||
|
||||
void Reset() { m_current = 0; }
|
||||
void Reset(const wxRegion& region);
|
||||
|
||||
operator bool () const { return m_current < m_numRects; }
|
||||
bool HaveRects() const { return m_current < m_numRects; }
|
||||
|
||||
wxRegionIterator& operator++();
|
||||
wxRegionIterator operator++(int);
|
||||
|
||||
long GetX() const;
|
||||
long GetY() const;
|
||||
long GetW() const;
|
||||
long GetWidth() const { return GetW(); }
|
||||
long GetH() const;
|
||||
long GetHeight() const { return GetH(); }
|
||||
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
|
||||
|
||||
private:
|
||||
void SetRects(long numRects, wxRect *rects);
|
||||
|
||||
long m_current;
|
||||
long m_numRects;
|
||||
wxRegion m_region;
|
||||
wxRect* m_rects;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxRegionIterator)
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_CARBON_REGION_H_
|
65
Externals/wxWidgets3/include/wx/osx/carbon/statbmp.h
vendored
Normal file
65
Externals/wxWidgets3/include/wx/osx/carbon/statbmp.h
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/statbmp.h
|
||||
// Purpose: wxStaticBitmap class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: statbmp.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_STATBMP_H_
|
||||
#define _WX_STATBMP_H_
|
||||
|
||||
#include "wx/icon.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxStaticBitmap: public wxStaticBitmapBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||
public:
|
||||
wxStaticBitmap() { }
|
||||
|
||||
wxStaticBitmap(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr);
|
||||
|
||||
virtual void SetBitmap(const wxBitmap& bitmap);
|
||||
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
void OnPaint( wxPaintEvent &event ) ;
|
||||
|
||||
wxBitmap GetBitmap() const { return m_bitmap; }
|
||||
wxIcon GetIcon() const
|
||||
{
|
||||
// icons and bitmaps are really the same thing in wxMac
|
||||
return (const wxIcon &)m_bitmap;
|
||||
}
|
||||
void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; }
|
||||
|
||||
// overriden base class virtuals
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
wxBitmap m_bitmap;
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_STATBMP_H_
|
44
Externals/wxWidgets3/include/wx/osx/carbon/uma.h
vendored
Normal file
44
Externals/wxWidgets3/include/wx/osx/carbon/uma.h
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/carbon/uma.h
|
||||
// Purpose: Universal MacOS API
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id: uma.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef H_UMA
|
||||
#define H_UMA
|
||||
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
// menu manager
|
||||
|
||||
MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding) ;
|
||||
void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding) ;
|
||||
void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
|
||||
|
||||
void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , wxAcceleratorEntry *entry = NULL ) ;
|
||||
void UMAInsertMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ;
|
||||
void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ;
|
||||
|
||||
void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title , wxFontEncoding encoding ) ;
|
||||
|
||||
// Retrieves the Help menu handle. Warning: As a side-effect this functions also
|
||||
// creates the Help menu if it didn't exist yet.
|
||||
OSStatus UMAGetHelpMenu(
|
||||
MenuRef * outHelpMenu,
|
||||
MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
|
||||
|
||||
// Same as UMAGetHelpMenu, but doesn't create the Help menu if UMAGetHelpMenu hasn't been called yet.
|
||||
OSStatus UMAGetHelpMenuDontCreate(
|
||||
MenuRef * outHelpMenu,
|
||||
MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#endif
|
83
Externals/wxWidgets3/include/wx/osx/checkbox.h
vendored
Normal file
83
Externals/wxWidgets3/include/wx/osx/checkbox.h
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/checkbox.h
|
||||
// Purpose: wxCheckBox class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: checkbox.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHECKBOX_H_
|
||||
#define _WX_CHECKBOX_H_
|
||||
|
||||
// Checkbox item (single checkbox)
|
||||
class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase
|
||||
{
|
||||
public:
|
||||
wxCheckBox() { }
|
||||
wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
virtual void SetValue(bool);
|
||||
virtual bool GetValue() const;
|
||||
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// osx specific event handling common for all osx-ports
|
||||
|
||||
virtual bool OSXHandleClicked( double timestampsec );
|
||||
protected:
|
||||
void DoSet3StateValue(wxCheckBoxState val);
|
||||
virtual wxCheckBoxState DoGet3StateValue() const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_CORE wxBitmapCheckBox: public wxCheckBox
|
||||
{
|
||||
public:
|
||||
int checkWidth;
|
||||
int checkHeight;
|
||||
|
||||
wxBitmapCheckBox()
|
||||
: checkWidth(-1), checkHeight(-1)
|
||||
{ }
|
||||
|
||||
wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
virtual void SetValue(bool);
|
||||
virtual bool GetValue() const;
|
||||
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void SetLabel(const wxBitmap *bitmap);
|
||||
virtual void SetLabel( const wxString & WXUNUSED(name) ) {}
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
|
||||
};
|
||||
#endif
|
||||
// _WX_CHECKBOX_H_
|
94
Externals/wxWidgets3/include/wx/osx/checklst.h
vendored
Normal file
94
Externals/wxWidgets3/include/wx/osx/checklst.h
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/checklst.h
|
||||
// Purpose: wxCheckListBox class - a listbox with checkable items
|
||||
// Note: this is an optional class.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: checklst.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_CHECKLST_H_
|
||||
#define _WX_MAC_CHECKLST_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxCheckListBox() { Init(); }
|
||||
wxCheckListBox(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int nStrings = 0,
|
||||
const wxString *choices = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, pos, size, nStrings, choices, style, validator, name);
|
||||
}
|
||||
wxCheckListBox(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int nStrings = 0,
|
||||
const wxString *choices = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
// items may be checked
|
||||
bool IsChecked(unsigned int uiIndex) const;
|
||||
void Check(unsigned int uiIndex, bool bCheck = true);
|
||||
|
||||
// data callbacks
|
||||
virtual void GetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value );
|
||||
virtual void SetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value );
|
||||
|
||||
protected:
|
||||
// override all methods which add/delete items to update m_checks array as
|
||||
// well
|
||||
virtual void OnItemInserted(unsigned int pos);
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual void DoClear();
|
||||
|
||||
// the array containing the checked status of the items
|
||||
wxArrayInt m_checks;
|
||||
|
||||
wxListWidgetColumn* m_checkColumn ;
|
||||
|
||||
void Init();
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_CHECKLST_H_
|
110
Externals/wxWidgets3/include/wx/osx/chkconf.h
vendored
Normal file
110
Externals/wxWidgets3/include/wx/osx/chkconf.h
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Name: wx/osx/chkconf.h
|
||||
* Purpose: Mac-specific config settings checks
|
||||
* Author: Vadim Zeitlin
|
||||
* Modified by:
|
||||
* Created: 2005-04-05 (extracted from wx/chkconf.h)
|
||||
* RCS-ID: $Id: chkconf.h 66955 2011-02-18 18:44:43Z SC $
|
||||
* Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
* Licence: wxWindows licence
|
||||
*/
|
||||
|
||||
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
|
||||
|
||||
#ifndef _WX_OSX_CHKCONF_H_
|
||||
#define _WX_OSX_CHKCONF_H_
|
||||
|
||||
|
||||
#if wxUSE_STACKWALKER
|
||||
/* not supported under Mac */
|
||||
# undef wxUSE_STACKWALKER
|
||||
# define wxUSE_STACKWALKER 0
|
||||
#endif /* wxUSE_STACKWALKER */
|
||||
|
||||
/*
|
||||
* disable the settings which don't work for some compilers
|
||||
*/
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
/* DS: Fixes compilation when wxUSE_ON_FATAL_EXCEPTION is 1 */
|
||||
#ifndef wxTYPE_SA_HANDLER
|
||||
#define wxTYPE_SA_HANDLER int
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* check graphics context option, must be on for every os x platform
|
||||
* we only use core graphics now on all builds, try to catch attempts
|
||||
* to configure the build otherwise and give error messages
|
||||
*/
|
||||
|
||||
#if wxUSE_GUI && (!wxUSE_GRAPHICS_CONTEXT || \
|
||||
( defined( wxMAC_USE_CORE_GRAPHICS ) && !wxMAC_USE_CORE_GRAPHICS ))
|
||||
# error "OS X builds use CoreGraphics in this wx version, you cannot turn back to QuickDraw completely"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* using mixins of cocoa functionality
|
||||
*/
|
||||
|
||||
#ifdef __WXOSX_COCOA__
|
||||
#define wxOSX_USE_COCOA 1
|
||||
#else
|
||||
#define wxOSX_USE_COCOA 0
|
||||
#endif
|
||||
|
||||
#ifdef __WXOSX_CARBON__
|
||||
#define wxOSX_USE_CARBON 1
|
||||
#else
|
||||
#define wxOSX_USE_CARBON 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* setting flags according to the platform
|
||||
*/
|
||||
|
||||
#ifdef __LP64__
|
||||
#if wxOSX_USE_COCOA == 0
|
||||
#undef wxOSX_USE_COCOA
|
||||
#define wxOSX_USE_COCOA 1
|
||||
#endif
|
||||
#if wxOSX_USE_CARBON
|
||||
#error "Carbon does not support 64bit"
|
||||
#endif
|
||||
#define wxOSX_USE_IPHONE 0
|
||||
#else
|
||||
#ifdef __WXOSX_IPHONE__
|
||||
#define wxOSX_USE_IPHONE 1
|
||||
#else
|
||||
#define wxOSX_USE_IPHONE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* combination flags
|
||||
*/
|
||||
|
||||
#if wxOSX_USE_COCOA || wxOSX_USE_CARBON
|
||||
#define wxOSX_USE_COCOA_OR_CARBON 1
|
||||
#else
|
||||
#define wxOSX_USE_COCOA_OR_CARBON 0
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_COCOA || wxOSX_USE_IPHONE
|
||||
#define wxOSX_USE_COCOA_OR_IPHONE 1
|
||||
#else
|
||||
#define wxOSX_USE_COCOA_OR_IPHONE 0
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_IPHONE
|
||||
#include "wx/osx/iphone/chkconf.h"
|
||||
#elif wxOSX_USE_CARBON
|
||||
#include "wx/osx/carbon/chkconf.h"
|
||||
#elif wxOSX_USE_COCOA
|
||||
#include "wx/osx/cocoa/chkconf.h"
|
||||
#endif
|
||||
|
||||
#endif // _WX_OSX_CHKCONF_H_
|
99
Externals/wxWidgets3/include/wx/osx/choice.h
vendored
Normal file
99
Externals/wxWidgets3/include/wx/osx/choice.h
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: choice.h 66993 2011-02-22 13:25:38Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICE_H_
|
||||
#define _WX_CHOICE_H_
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
WX_DEFINE_ARRAY( char * , wxChoiceDataArray ) ;
|
||||
|
||||
// Choice item
|
||||
class WXDLLIMPEXP_CORE wxChoice: public wxChoiceBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
|
||||
public:
|
||||
wxChoice()
|
||||
: m_strings(), m_datas()
|
||||
{}
|
||||
|
||||
virtual ~wxChoice() ;
|
||||
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
|
||||
virtual unsigned int GetCount() const ;
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(unsigned int n) const ;
|
||||
virtual void SetString(unsigned int pos, const wxString& s);
|
||||
// osx specific event handling common for all osx-ports
|
||||
|
||||
virtual bool OSXHandleClicked( double timestampsec );
|
||||
|
||||
protected:
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual void DoClear();
|
||||
|
||||
virtual wxSize DoGetBestSize() const ;
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
|
||||
virtual void DoSetItemClientData(unsigned int n, void* clientData);
|
||||
virtual void* DoGetItemClientData(unsigned int n) const;
|
||||
|
||||
wxArrayString m_strings;
|
||||
wxChoiceDataArray m_datas ;
|
||||
wxMenu* m_popUpMenu ;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CHOICE_H_
|
68
Externals/wxWidgets3/include/wx/osx/clipbrd.h
vendored
Normal file
68
Externals/wxWidgets3/include/wx/osx/clipbrd.h
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/clipbrd.h
|
||||
// Purpose: Clipboard functionality.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: clipbrd.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CLIPBRD_H_
|
||||
#define _WX_CLIPBRD_H_
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
|
||||
#include "wx/osx/core/cfref.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClipboard
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
|
||||
{
|
||||
public:
|
||||
wxClipboard();
|
||||
virtual ~wxClipboard();
|
||||
|
||||
// open the clipboard before SetData() and GetData()
|
||||
virtual bool Open();
|
||||
|
||||
// close the clipboard after SetData() and GetData()
|
||||
virtual void Close();
|
||||
|
||||
// query whether the clipboard is opened
|
||||
virtual bool IsOpened() const;
|
||||
|
||||
// set the clipboard data. all other formats will be deleted.
|
||||
virtual bool SetData( wxDataObject *data );
|
||||
|
||||
// add to the clipboard data.
|
||||
virtual bool AddData( wxDataObject *data );
|
||||
|
||||
// ask if data in correct format is available
|
||||
virtual bool IsSupported( const wxDataFormat& format );
|
||||
|
||||
// fill data with data on the clipboard (if available)
|
||||
virtual bool GetData( wxDataObject& data );
|
||||
|
||||
// clears wxTheClipboard and the system's clipboard if possible
|
||||
virtual void Clear();
|
||||
|
||||
// flushes the clipboard: this means that the data which is currently on
|
||||
// clipboard will stay available even after the application exits (possibly
|
||||
// eating memory), otherwise the clipboard will be emptied on exit
|
||||
virtual bool Flush();
|
||||
|
||||
private:
|
||||
wxDataObject *m_data;
|
||||
bool m_open;
|
||||
wxCFRef<PasteboardRef> m_pasteboard;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxClipboard)
|
||||
};
|
||||
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
|
||||
#endif // _WX_CLIPBRD_H_
|
61
Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h
vendored
Normal file
61
Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Name: wx/osx/cocoa/chkconf.h
|
||||
* Purpose: Compiler-specific configuration checking
|
||||
* Author: Stefan Csomor
|
||||
* Modified by:
|
||||
* Created: 2008-07-30
|
||||
* RCS-ID: $Id: chkconf.h 67232 2011-03-18 15:10:15Z DS $
|
||||
* Copyright: (c) Stefan Csomor
|
||||
* Licence: wxWindows licence
|
||||
*/
|
||||
|
||||
#ifndef _WX_OSX_COCOA_CHKCONF_H_
|
||||
#define _WX_OSX_COCOA_CHKCONF_H_
|
||||
|
||||
/*
|
||||
* native (1) or emulated (0) toolbar
|
||||
*/
|
||||
|
||||
#ifndef wxOSX_USE_NATIVE_TOOLBAR
|
||||
#define wxOSX_USE_NATIVE_TOOLBAR 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* text rendering system
|
||||
*/
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
|
||||
#define wxOSX_USE_CORE_TEXT 1
|
||||
#define wxOSX_USE_ATSU_TEXT 0
|
||||
|
||||
#else // platform < 10.5
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
||||
#define wxOSX_USE_CORE_TEXT 1
|
||||
#else
|
||||
#define wxOSX_USE_CORE_TEXT 0
|
||||
#endif
|
||||
#define wxOSX_USE_ATSU_TEXT 1
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Audio System
|
||||
*/
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
#define wxOSX_USE_QUICKTIME 0
|
||||
#define wxOSX_USE_AUDIOTOOLBOX 1
|
||||
#else // platform < 10.5
|
||||
#define wxOSX_USE_QUICKTIME 1
|
||||
#define wxOSX_USE_AUDIOTOOLBOX 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* turning off capabilities that don't work under cocoa yet
|
||||
*/
|
||||
|
||||
#endif
|
||||
/* _WX_MAC_CHKCONF_H_ */
|
||||
|
515
Externals/wxWidgets3/include/wx/osx/cocoa/dataview.h
vendored
Normal file
515
Externals/wxWidgets3/include/wx/osx/cocoa/dataview.h
vendored
Normal file
@ -0,0 +1,515 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/cocoa/dataview.h
|
||||
// Purpose: wxDataViewCtrl native implementation header for carbon
|
||||
// Author:
|
||||
// Id: $Id: dataview.h 57374 2009-01-27
|
||||
// Copyright: (c) 2009
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DATAVIEWCTRL_COCOOA_H_
|
||||
#define _WX_DATAVIEWCTRL_COCOOA_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "wx/osx/core/dataview.h"
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
// Forward declaration
|
||||
class wxCocoaDataViewControl;
|
||||
|
||||
/*
|
||||
Dramatis personae:
|
||||
|
||||
[vertical arrows indicate inheritance, horizontal -- aggregation]
|
||||
|
||||
|
||||
wxWindow ---> wxWidgetCocoaImpl wxDataViewWidgetImpl NSOutlineView
|
||||
| \ / |
|
||||
| \ / |
|
||||
| \ / |
|
||||
v \/ \/ v
|
||||
wxDataViewCtrl -------> wxCocoaDataViewControl <-------> wxCocoaOutlineView
|
||||
|
||||
|
||||
The right most classes are Objective-C only and can't be used from (pure)
|
||||
C++ code.
|
||||
*/
|
||||
|
||||
// ============================================================================
|
||||
// wxPointerObject: simply stores a pointer, without taking its ownership
|
||||
// ============================================================================
|
||||
|
||||
// Two pointer objects are equal if the containing pointers are equal. This
|
||||
// means also that the hash value of a pointer object depends only on the
|
||||
// stored pointer.
|
||||
|
||||
@interface wxPointerObject : NSObject
|
||||
{
|
||||
void* pointer;
|
||||
}
|
||||
|
||||
-(id) initWithPointer:(void*)initPointer;
|
||||
|
||||
-(void*) pointer;
|
||||
-(void) setPointer:(void*)newPointer;
|
||||
@end
|
||||
|
||||
// ============================================================================
|
||||
// wxSortDescriptorObject: helper class to use native sorting facilities
|
||||
// ============================================================================
|
||||
|
||||
@interface wxSortDescriptorObject : NSSortDescriptor<NSCopying>
|
||||
{
|
||||
wxDataViewColumn* columnPtr; // pointer to the sorting column
|
||||
|
||||
wxDataViewModel* modelPtr; // pointer to model
|
||||
}
|
||||
|
||||
-(id)
|
||||
initWithModelPtr:(wxDataViewModel*)initModelPtr
|
||||
sortingColumnPtr:(wxDataViewColumn*)initColumnPtr
|
||||
ascending:(BOOL)sortAscending;
|
||||
|
||||
-(wxDataViewColumn*) columnPtr;
|
||||
-(wxDataViewModel*) modelPtr;
|
||||
|
||||
-(void) setColumnPtr:(wxDataViewColumn*)newColumnPtr;
|
||||
-(void) setModelPtr:(wxDataViewModel*)newModelPtr;
|
||||
@end
|
||||
|
||||
// ============================================================================
|
||||
// wxDataViewColumnNativeData: extra data for wxDataViewColumn
|
||||
// ============================================================================
|
||||
|
||||
class wxDataViewColumnNativeData
|
||||
{
|
||||
public:
|
||||
wxDataViewColumnNativeData() : m_NativeColumnPtr(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
wxDataViewColumnNativeData(NSTableColumn* initNativeColumnPtr)
|
||||
: m_NativeColumnPtr(initNativeColumnPtr)
|
||||
{
|
||||
}
|
||||
|
||||
NSTableColumn* GetNativeColumnPtr() const
|
||||
{
|
||||
return m_NativeColumnPtr;
|
||||
}
|
||||
|
||||
void SetNativeColumnPtr(NSTableColumn* newNativeColumnPtr)
|
||||
{
|
||||
m_NativeColumnPtr = newNativeColumnPtr;
|
||||
}
|
||||
|
||||
private:
|
||||
// not owned by us
|
||||
NSTableColumn* m_NativeColumnPtr;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// wxDataViewRendererNativeData: extra data for wxDataViewRenderer
|
||||
// ============================================================================
|
||||
|
||||
class wxDataViewRendererNativeData
|
||||
{
|
||||
public:
|
||||
wxDataViewRendererNativeData()
|
||||
: m_Object(NULL), m_ColumnCell(NULL)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxDataViewRendererNativeData(NSCell* initColumnCell)
|
||||
: m_Object(NULL), m_ColumnCell([initColumnCell retain])
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxDataViewRendererNativeData(NSCell* initColumnCell, id initObject)
|
||||
: m_Object([initObject retain]), m_ColumnCell([initColumnCell retain])
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
~wxDataViewRendererNativeData()
|
||||
{
|
||||
[m_ColumnCell release];
|
||||
[m_Object release];
|
||||
|
||||
[m_origFont release];
|
||||
[m_origTextColour release];
|
||||
}
|
||||
|
||||
NSCell* GetColumnCell() const { return m_ColumnCell; }
|
||||
NSTableColumn* GetColumnPtr() const { return m_TableColumnPtr; }
|
||||
id GetItem() const { return m_Item; }
|
||||
NSCell* GetItemCell() const { return m_ItemCell; }
|
||||
id GetObject() const { return m_Object; }
|
||||
|
||||
void SetColumnCell(NSCell* newCell)
|
||||
{
|
||||
[newCell retain];
|
||||
[m_ColumnCell release];
|
||||
m_ColumnCell = newCell;
|
||||
}
|
||||
void SetColumnPtr(NSTableColumn* newColumnPtr)
|
||||
{
|
||||
m_TableColumnPtr = newColumnPtr;
|
||||
}
|
||||
void SetItem(id newItem)
|
||||
{
|
||||
m_Item = newItem;
|
||||
}
|
||||
void SetItemCell(NSCell* newCell)
|
||||
{
|
||||
m_ItemCell = newCell;
|
||||
}
|
||||
void SetObject(id newObject)
|
||||
{
|
||||
[newObject retain];
|
||||
[m_Object release];
|
||||
m_Object = newObject;
|
||||
}
|
||||
|
||||
// The original cell font and text colour stored here are NULL by default
|
||||
// and are only initialized to the values retrieved from the cell when we
|
||||
// change them from wxCocoaOutlineView:willDisplayCell:forTableColumn:item:
|
||||
// which calls our SaveOriginalXXX() methods before changing the cell
|
||||
// attributes.
|
||||
//
|
||||
// This allows us to avoid doing anything for the columns without any
|
||||
// attributes but still be able to restore the correct attributes for the
|
||||
// ones that do.
|
||||
NSFont *GetOriginalFont() const { return m_origFont; }
|
||||
NSColor *GetOriginalTextColour() const { return m_origTextColour; }
|
||||
|
||||
void SaveOriginalFont(NSFont *font)
|
||||
{
|
||||
m_origFont = [font retain];
|
||||
}
|
||||
|
||||
void SaveOriginalTextColour(NSColor *textColour)
|
||||
{
|
||||
m_origTextColour = [textColour retain];
|
||||
}
|
||||
|
||||
// The ellipsization mode which we need to set for each cell being rendered.
|
||||
void SetEllipsizeMode(wxEllipsizeMode mode) { m_ellipsizeMode = mode; }
|
||||
wxEllipsizeMode GetEllipsizeMode() const { return m_ellipsizeMode; }
|
||||
|
||||
// Set the line break mode for the given cell using our m_ellipsizeMode
|
||||
void ApplyLineBreakMode(NSCell *cell);
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
id m_Item; // item NOT owned by renderer
|
||||
|
||||
// object that can be used by renderer for storing special data (owned by
|
||||
// renderer)
|
||||
id m_Object;
|
||||
|
||||
NSCell* m_ColumnCell; // column's cell is owned by renderer
|
||||
NSCell* m_ItemCell; // item's cell is NOT owned by renderer
|
||||
|
||||
NSTableColumn* m_TableColumnPtr; // column NOT owned by renderer
|
||||
|
||||
// we own those if they're non-NULL
|
||||
NSFont *m_origFont;
|
||||
NSColor *m_origTextColour;
|
||||
|
||||
wxEllipsizeMode m_ellipsizeMode;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// wxCocoaOutlineDataSource
|
||||
// ============================================================================
|
||||
|
||||
// This class implements the data source delegate for the outline view.
|
||||
// As only an informal protocol exists this class inherits from NSObject only.
|
||||
//
|
||||
// As mentioned in the documentation for NSOutlineView the native control does
|
||||
// not own any data. Therefore, it has to be done by the data source.
|
||||
// Unfortunately, wxWidget's data source is a C++ data source but
|
||||
// NSOutlineDataSource requires objects as data. Therefore, the data (or better
|
||||
// the native item objects) have to be stored additionally in the native data
|
||||
// source.
|
||||
// NSOutlineView requires quick access to the item objects and quick linear
|
||||
// access to an item's children. This requires normally a hash type of storage
|
||||
// for the item object itself and an array structure for each item's children.
|
||||
// This means that basically two times the whole structure of wxWidget's model
|
||||
// class has to be stored.
|
||||
// This implementation is using a compromise: all items that are in use by the
|
||||
// control are stored in a set (from there they can be easily retrieved) and
|
||||
// owned by the set. Furthermore, children of the last parent are stored
|
||||
// in a linear list.
|
||||
//
|
||||
@interface wxCocoaOutlineDataSource : NSObject wxOSX_10_6_AND_LATER(<NSOutlineViewDataSource>)
|
||||
{
|
||||
// descriptors specifying the sorting (currently the array only holds one
|
||||
// object only)
|
||||
NSArray* sortDescriptors;
|
||||
|
||||
NSMutableArray* children; // buffered children
|
||||
|
||||
NSMutableSet* items; // stores all items that are in use by the control
|
||||
|
||||
wxCocoaDataViewControl* implementation;
|
||||
|
||||
wxDataViewModel* model;
|
||||
|
||||
// parent of the buffered children; the object is owned
|
||||
wxPointerObject* currentParentItem;
|
||||
}
|
||||
|
||||
// methods of informal protocol:
|
||||
-(BOOL)
|
||||
outlineView:(NSOutlineView*)outlineView
|
||||
acceptDrop:(id<NSDraggingInfo>)info
|
||||
item:(id)item
|
||||
childIndex:(NSInteger)index;
|
||||
|
||||
-(id)
|
||||
outlineView:(NSOutlineView*)outlineView
|
||||
child:(NSInteger)index
|
||||
ofItem:(id)item;
|
||||
|
||||
-(id)
|
||||
outlineView:(NSOutlineView*)outlineView
|
||||
objectValueForTableColumn:(NSTableColumn*)tableColumn
|
||||
byItem:(id)item;
|
||||
|
||||
-(BOOL)
|
||||
outlineView:(NSOutlineView*)outlineView
|
||||
isItemExpandable:(id)item;
|
||||
|
||||
-(NSInteger)
|
||||
outlineView:(NSOutlineView*)outlineView
|
||||
numberOfChildrenOfItem:(id)item;
|
||||
|
||||
-(NSDragOperation)
|
||||
outlineView:(NSOutlineView*)outlineView
|
||||
validateDrop:(id<NSDraggingInfo>)info
|
||||
proposedItem:(id)item
|
||||
proposedChildIndex:(NSInteger)index;
|
||||
|
||||
-(BOOL)
|
||||
outlineView:(NSOutlineView*)outlineView
|
||||
writeItems:(NSArray*)items
|
||||
toPasteboard:(NSPasteboard*)pasteboard;
|
||||
|
||||
// buffer for items handling
|
||||
-(void) addToBuffer:(wxPointerObject*)item;
|
||||
-(void) clearBuffer;
|
||||
// returns the item in the buffer that has got the same pointer as "item",
|
||||
// if such an item does not exist nil is returned
|
||||
-(wxPointerObject*) getDataViewItemFromBuffer:(const wxDataViewItem&)item;
|
||||
-(wxPointerObject*) getItemFromBuffer:(wxPointerObject*)item;
|
||||
-(BOOL) isInBuffer:(wxPointerObject*)item;
|
||||
-(void) removeFromBuffer:(wxPointerObject*)item;
|
||||
|
||||
// buffered children handling
|
||||
-(void) appendChild:(wxPointerObject*)item;
|
||||
-(void) clearChildren;
|
||||
-(wxPointerObject*) getChild:(NSUInteger)index;
|
||||
-(NSUInteger) getChildCount;
|
||||
-(void) removeChild:(NSUInteger)index;
|
||||
|
||||
// buffer handling
|
||||
-(void) clearBuffers;
|
||||
|
||||
// sorting
|
||||
-(NSArray*) sortDescriptors;
|
||||
-(void) setSortDescriptors:(NSArray*)newSortDescriptors;
|
||||
|
||||
// access to wxWidgets variables
|
||||
-(wxPointerObject*) currentParentItem;
|
||||
-(wxCocoaDataViewControl*) implementation;
|
||||
-(wxDataViewModel*) model;
|
||||
-(void) setCurrentParentItem:(wxPointerObject*)newCurrentParentItem;
|
||||
-(void) setImplementation:(wxCocoaDataViewControl*)newImplementation;
|
||||
-(void) setModel:(wxDataViewModel*)newModel;
|
||||
|
||||
// other methods
|
||||
-(void)
|
||||
bufferItem:(wxPointerObject*)parentItem
|
||||
withChildren:(wxDataViewItemArray*)dataViewChildrenPtr;
|
||||
@end
|
||||
|
||||
// ============================================================================
|
||||
// wxCustomCell: used for custom renderers
|
||||
// ============================================================================
|
||||
|
||||
@interface wxCustomCell : NSTextFieldCell
|
||||
{
|
||||
}
|
||||
|
||||
-(NSSize) cellSize;
|
||||
@end
|
||||
|
||||
// ============================================================================
|
||||
// wxImageTextCell
|
||||
// ============================================================================
|
||||
//
|
||||
// As the native cocoa environment does not have a cell displaying an icon/
|
||||
// image and text at the same time, it has to be implemented by the user.
|
||||
// This implementation follows the implementation of Chuck Pisula in Apple's
|
||||
// DragNDropOutline sample application.
|
||||
// Although in wxDataViewCtrl icons are used on OSX icons do not exist for
|
||||
// display. Therefore, the cell is also called wxImageTextCell.
|
||||
// Instead of displaying images of any size (which is possible) this cell uses
|
||||
// a fixed size for displaying the image. Larger images are scaled to fit
|
||||
// into their reserved space. Smaller or not existing images use the fixed
|
||||
// reserved size and are scaled if necessary.
|
||||
//
|
||||
@interface wxImageTextCell : NSTextFieldCell
|
||||
{
|
||||
@private
|
||||
CGFloat xImageShift; // shift for the image in x-direction from border
|
||||
CGFloat spaceImageText; // space between image and text
|
||||
|
||||
NSImage* image; // the image itself
|
||||
|
||||
NSSize imageSize; // largest size of the image; default size is (16, 16)
|
||||
|
||||
// the text alignment is used to align the whole cell (image and text)
|
||||
NSTextAlignment cellAlignment;
|
||||
}
|
||||
|
||||
-(NSTextAlignment) alignment;
|
||||
-(void) setAlignment:(NSTextAlignment)newAlignment;
|
||||
|
||||
-(NSImage*) image;
|
||||
-(void) setImage:(NSImage*)newImage;
|
||||
|
||||
-(NSSize) imageSize;
|
||||
-(void) setImageSize:(NSSize) newImageSize;
|
||||
|
||||
-(NSSize) cellSize;
|
||||
@end
|
||||
|
||||
// ============================================================================
|
||||
// wxCocoaOutlineView
|
||||
// ============================================================================
|
||||
|
||||
@interface wxCocoaOutlineView : NSOutlineView wxOSX_10_6_AND_LATER(<NSOutlineViewDelegate>)
|
||||
{
|
||||
@private
|
||||
// column and row of the cell being edited or -1 if none
|
||||
int currentlyEditedColumn,
|
||||
currentlyEditedRow;
|
||||
|
||||
wxCocoaDataViewControl* implementation;
|
||||
}
|
||||
|
||||
-(wxCocoaDataViewControl*) implementation;
|
||||
-(void) setImplementation:(wxCocoaDataViewControl*) newImplementation;
|
||||
@end
|
||||
|
||||
// ============================================================================
|
||||
// wxCocoaDataViewControl
|
||||
// ============================================================================
|
||||
|
||||
// This is the internal interface class between wxDataViewCtrl (wxWidget) and
|
||||
// the native source view (Mac OS X cocoa).
|
||||
class wxCocoaDataViewControl : public wxWidgetCocoaImpl,
|
||||
public wxDataViewWidgetImpl
|
||||
{
|
||||
public:
|
||||
// constructors / destructor
|
||||
wxCocoaDataViewControl(wxWindow* peer,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style);
|
||||
virtual ~wxCocoaDataViewControl();
|
||||
|
||||
wxDataViewCtrl* GetDataViewCtrl() const
|
||||
{
|
||||
return static_cast<wxDataViewCtrl*>(GetWXPeer());
|
||||
}
|
||||
|
||||
// column related methods (inherited from wxDataViewWidgetImpl)
|
||||
virtual bool ClearColumns();
|
||||
virtual bool DeleteColumn(wxDataViewColumn* columnPtr);
|
||||
virtual void DoSetExpanderColumn(wxDataViewColumn const* columnPtr);
|
||||
virtual wxDataViewColumn* GetColumn(unsigned int pos) const;
|
||||
virtual int GetColumnPosition(wxDataViewColumn const* columnPtr) const;
|
||||
virtual bool InsertColumn(unsigned int pos, wxDataViewColumn* columnPtr);
|
||||
virtual void FitColumnWidthToContent(unsigned int pos);
|
||||
|
||||
// item related methods (inherited from wxDataViewWidgetImpl)
|
||||
virtual bool Add(const wxDataViewItem& parent, const wxDataViewItem& item);
|
||||
virtual bool Add(const wxDataViewItem& parent,
|
||||
const wxDataViewItemArray& items);
|
||||
virtual void Collapse(const wxDataViewItem& item);
|
||||
virtual void EnsureVisible(const wxDataViewItem& item,
|
||||
wxDataViewColumn const* columnPtr);
|
||||
virtual void Expand(const wxDataViewItem& item);
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual wxRect GetRectangle(const wxDataViewItem& item,
|
||||
wxDataViewColumn const* columnPtr);
|
||||
virtual bool IsExpanded(const wxDataViewItem& item) const;
|
||||
virtual bool Reload();
|
||||
virtual bool Remove(const wxDataViewItem& parent,
|
||||
const wxDataViewItem& item);
|
||||
virtual bool Remove(const wxDataViewItem& parent,
|
||||
const wxDataViewItemArray& item);
|
||||
virtual bool Update(const wxDataViewColumn* columnPtr);
|
||||
virtual bool Update(const wxDataViewItem& parent,
|
||||
const wxDataViewItem& item);
|
||||
virtual bool Update(const wxDataViewItem& parent,
|
||||
const wxDataViewItemArray& items);
|
||||
|
||||
// model related methods
|
||||
virtual bool AssociateModel(wxDataViewModel* model);
|
||||
|
||||
//
|
||||
// selection related methods (inherited from wxDataViewWidgetImpl)
|
||||
//
|
||||
virtual wxDataViewItem GetCurrentItem() const;
|
||||
virtual void SetCurrentItem(const wxDataViewItem& item);
|
||||
virtual int GetSelections(wxDataViewItemArray& sel) const;
|
||||
virtual bool IsSelected(const wxDataViewItem& item) const;
|
||||
virtual void Select(const wxDataViewItem& item);
|
||||
virtual void SelectAll();
|
||||
virtual void Unselect(const wxDataViewItem& item);
|
||||
virtual void UnselectAll();
|
||||
|
||||
//
|
||||
// sorting related methods
|
||||
//
|
||||
virtual wxDataViewColumn* GetSortingColumn () const;
|
||||
virtual void Resort();
|
||||
|
||||
//
|
||||
// other methods (inherited from wxDataViewWidgetImpl)
|
||||
//
|
||||
virtual void DoSetIndent(int indent);
|
||||
virtual void HitTest(const wxPoint& point,
|
||||
wxDataViewItem& item,
|
||||
wxDataViewColumn*& columnPtr) const;
|
||||
virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height);
|
||||
virtual void OnSize();
|
||||
|
||||
// drag & drop helper methods
|
||||
wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects);
|
||||
wxDataObjectComposite* GetDnDDataObjects(NSData* dataObject) const;
|
||||
|
||||
// Cocoa-specific helpers
|
||||
id GetItemAtRow(int row) const;
|
||||
|
||||
private:
|
||||
void InitOutlineView(long style);
|
||||
|
||||
wxCocoaOutlineDataSource* m_DataSource;
|
||||
|
||||
wxCocoaOutlineView* m_OutlineView;
|
||||
};
|
||||
|
||||
#endif // _WX_DATAVIEWCTRL_COCOOA_H_
|
38
Externals/wxWidgets3/include/wx/osx/cocoa/evtloop.h
vendored
Normal file
38
Externals/wxWidgets3/include/wx/osx/cocoa/evtloop.h
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/cocoa/evtloop.h
|
||||
// Purpose: declaration of wxGUIEventLoop for wxOSX/Cocoa
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2008-12-28
|
||||
// RCS-ID: $Id: evtloop.h 67129 2011-03-05 12:21:20Z SC $
|
||||
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_COCOA_EVTLOOP_H_
|
||||
#define _WX_OSX_COCOA_EVTLOOP_H_
|
||||
|
||||
class WXDLLIMPEXP_BASE wxGUIEventLoop : public wxCFEventLoop
|
||||
{
|
||||
public:
|
||||
wxGUIEventLoop();
|
||||
~wxGUIEventLoop();
|
||||
|
||||
void BeginModalSession( wxWindow* modalWindow );
|
||||
|
||||
void EndModalSession();
|
||||
|
||||
protected:
|
||||
virtual int DoDispatchTimeout(unsigned long timeout);
|
||||
|
||||
virtual void DoRun();
|
||||
|
||||
virtual void DoStop();
|
||||
|
||||
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
|
||||
|
||||
void* m_modalSession;
|
||||
WXWindow m_dummyWindow;
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_COCOA_EVTLOOP_H_
|
||||
|
404
Externals/wxWidgets3/include/wx/osx/cocoa/private.h
vendored
Normal file
404
Externals/wxWidgets3/include/wx/osx/cocoa/private.h
vendored
Normal file
@ -0,0 +1,404 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/cocoa/private.h
|
||||
// Purpose: Private declarations: as this header is only included by
|
||||
// wxWidgets itself, it may contain identifiers which don't start
|
||||
// with "wx".
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: private.h 67233 2011-03-18 15:45:51Z SC $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PRIVATE_COCOA_H_
|
||||
#define _WX_PRIVATE_COCOA_H_
|
||||
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
|
||||
// available in 10.4 but not in the headers
|
||||
enum {
|
||||
kEventMouseScroll = 11
|
||||
};
|
||||
#endif
|
||||
//
|
||||
// shared between Cocoa and Carbon
|
||||
//
|
||||
|
||||
// bring in theming types without pulling in the headers
|
||||
|
||||
#if wxUSE_GUI
|
||||
typedef SInt16 ThemeBrush;
|
||||
CGColorRef WXDLLIMPEXP_CORE wxMacCreateCGColorFromHITheme( ThemeBrush brush ) ;
|
||||
OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage(
|
||||
CGContextRef inContext,
|
||||
const CGRect * inBounds,
|
||||
CGImageRef inImage) ;
|
||||
WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image );
|
||||
CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage );
|
||||
wxBitmap WXDLLIMPEXP_CORE wxOSXCreateSystemBitmap(const wxString& id, const wxString &client, const wxSize& size);
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDialog;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWidgetCocoaImpl : public wxWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false, bool isUserPane = false ) ;
|
||||
wxWidgetCocoaImpl() ;
|
||||
~wxWidgetCocoaImpl();
|
||||
|
||||
void Init();
|
||||
|
||||
virtual bool IsVisible() const ;
|
||||
virtual void SetVisibility(bool);
|
||||
|
||||
// we provide a static function which can be reused from
|
||||
// wxNonOwnedWindowCocoaImpl too
|
||||
static bool ShowViewOrWindowWithEffect(wxWindow *win,
|
||||
bool show,
|
||||
wxShowEffect effect,
|
||||
unsigned timeout);
|
||||
|
||||
virtual bool ShowWithEffect(bool show,
|
||||
wxShowEffect effect,
|
||||
unsigned timeout);
|
||||
|
||||
virtual void Raise();
|
||||
|
||||
virtual void Lower();
|
||||
|
||||
virtual void ScrollRect( const wxRect *rect, int dx, int dy );
|
||||
|
||||
virtual WXWidget GetWXWidget() const { return m_osxView; }
|
||||
|
||||
virtual void SetBackgroundColour(const wxColour&);
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style);
|
||||
|
||||
virtual void GetContentArea( int &left , int &top , int &width , int &height ) const;
|
||||
virtual void Move(int x, int y, int width, int height);
|
||||
virtual void GetPosition( int &x, int &y ) const;
|
||||
virtual void GetSize( int &width, int &height ) const;
|
||||
virtual void SetControlSize( wxWindowVariant variant );
|
||||
|
||||
virtual void SetNeedsDisplay( const wxRect* where = NULL );
|
||||
virtual bool GetNeedsDisplay() const;
|
||||
|
||||
virtual bool CanFocus() const;
|
||||
// return true if successful
|
||||
virtual bool SetFocus();
|
||||
virtual bool HasFocus() const;
|
||||
|
||||
void RemoveFromParent();
|
||||
void Embed( wxWidgetImpl *parent );
|
||||
|
||||
void SetDefaultButton( bool isDefault );
|
||||
void PerformClick();
|
||||
virtual void SetLabel(const wxString& title, wxFontEncoding encoding);
|
||||
|
||||
void SetCursor( const wxCursor & cursor );
|
||||
void CaptureMouse();
|
||||
void ReleaseMouse();
|
||||
|
||||
wxInt32 GetValue() const;
|
||||
void SetValue( wxInt32 v );
|
||||
wxBitmap GetBitmap() const;
|
||||
void SetBitmap( const wxBitmap& bitmap );
|
||||
void SetBitmapPosition( wxDirection dir );
|
||||
void SetupTabs( const wxNotebook ¬ebook );
|
||||
void GetBestRect( wxRect *r ) const;
|
||||
bool IsEnabled() const;
|
||||
void Enable( bool enable );
|
||||
bool ButtonClickDidStateChange() { return true ;}
|
||||
void SetMinimum( wxInt32 v );
|
||||
void SetMaximum( wxInt32 v );
|
||||
wxInt32 GetMinimum() const;
|
||||
wxInt32 GetMaximum() const;
|
||||
void PulseGauge();
|
||||
void SetScrollThumb( wxInt32 value, wxInt32 thumbSize );
|
||||
|
||||
void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true );
|
||||
void SetToolTip( wxToolTip* tooltip );
|
||||
|
||||
void InstallEventHandler( WXWidget control = NULL );
|
||||
|
||||
virtual bool DoHandleMouseEvent(NSEvent *event);
|
||||
virtual bool DoHandleKeyEvent(NSEvent *event);
|
||||
virtual bool DoHandleCharEvent(NSEvent *event, NSString *text);
|
||||
virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow);
|
||||
|
||||
virtual void SetupKeyEvent(wxKeyEvent &wxevent, NSEvent * nsEvent, NSString* charString = NULL);
|
||||
virtual void SetupMouseEvent(wxMouseEvent &wxevent, NSEvent * nsEvent);
|
||||
|
||||
|
||||
void SetFlipped(bool flipped);
|
||||
virtual bool IsFlipped() const { return m_isFlipped; }
|
||||
|
||||
// cocoa thunk connected calls
|
||||
|
||||
virtual unsigned int draggingEntered(void* sender, WXWidget slf, void* _cmd);
|
||||
virtual void draggingExited(void* sender, WXWidget slf, void* _cmd);
|
||||
virtual unsigned int draggingUpdated(void* sender, WXWidget slf, void* _cmd);
|
||||
virtual bool performDragOperation(void* sender, WXWidget slf, void* _cmd);
|
||||
virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void* _cmd);
|
||||
virtual void keyEvent(WX_NSEvent event, WXWidget slf, void* _cmd);
|
||||
virtual void insertText(NSString* text, WXWidget slf, void* _cmd);
|
||||
virtual bool performKeyEquivalent(WX_NSEvent event, WXWidget slf, void* _cmd);
|
||||
virtual bool acceptsFirstResponder(WXWidget slf, void* _cmd);
|
||||
virtual bool becomeFirstResponder(WXWidget slf, void* _cmd);
|
||||
virtual bool resignFirstResponder(WXWidget slf, void* _cmd);
|
||||
virtual void resetCursorRects(WXWidget slf, void* _cmd);
|
||||
virtual bool isFlipped(WXWidget slf, void* _cmd);
|
||||
virtual void drawRect(void* rect, WXWidget slf, void* _cmd);
|
||||
|
||||
virtual void controlAction(WXWidget slf, void* _cmd, void* sender);
|
||||
virtual void controlDoubleAction(WXWidget slf, void* _cmd, void *sender);
|
||||
|
||||
// for wxTextCtrl-derived classes, put here since they don't all derive
|
||||
// from the same pimpl class.
|
||||
virtual void controlTextDidChange();
|
||||
|
||||
protected:
|
||||
WXWidget m_osxView;
|
||||
NSEvent* m_lastKeyDownEvent;
|
||||
bool m_isFlipped;
|
||||
// if it the control has an editor, that editor will already send some
|
||||
// events, don't resend them
|
||||
bool m_hasEditor;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxWidgetCocoaImpl)
|
||||
};
|
||||
|
||||
DECLARE_WXCOCOA_OBJC_CLASS( wxNSWindow );
|
||||
|
||||
class wxNonOwnedWindowCocoaImpl : public wxNonOwnedWindowImpl
|
||||
{
|
||||
public :
|
||||
wxNonOwnedWindowCocoaImpl( wxNonOwnedWindow* nonownedwnd) ;
|
||||
wxNonOwnedWindowCocoaImpl();
|
||||
|
||||
virtual ~wxNonOwnedWindowCocoaImpl();
|
||||
|
||||
virtual void WillBeDestroyed() ;
|
||||
void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size,
|
||||
long style, long extraStyle, const wxString& name ) ;
|
||||
void Create( wxWindow* parent, WXWindow nativeWindow );
|
||||
|
||||
WXWindow GetWXWindow() const;
|
||||
void Raise();
|
||||
void Lower();
|
||||
bool Show(bool show);
|
||||
|
||||
virtual bool ShowWithEffect(bool show,
|
||||
wxShowEffect effect,
|
||||
unsigned timeout);
|
||||
|
||||
void Update();
|
||||
bool SetTransparent(wxByte alpha);
|
||||
bool SetBackgroundColour(const wxColour& col );
|
||||
void SetExtraStyle( long exStyle );
|
||||
void SetWindowStyleFlag( long style );
|
||||
bool SetBackgroundStyle(wxBackgroundStyle style);
|
||||
bool CanSetTransparent();
|
||||
|
||||
void MoveWindow(int x, int y, int width, int height);
|
||||
void GetPosition( int &x, int &y ) const;
|
||||
void GetSize( int &width, int &height ) const;
|
||||
|
||||
void GetContentArea( int &left , int &top , int &width , int &height ) const;
|
||||
bool SetShape(const wxRegion& region);
|
||||
|
||||
virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ;
|
||||
|
||||
virtual bool IsMaximized() const;
|
||||
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
virtual void Iconize( bool iconize );
|
||||
|
||||
virtual void Maximize(bool maximize);
|
||||
|
||||
virtual bool IsFullScreen() const;
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style);
|
||||
|
||||
virtual void ShowWithoutActivating();
|
||||
|
||||
virtual void RequestUserAttention(int flags);
|
||||
|
||||
virtual void ScreenToWindow( int *x, int *y );
|
||||
|
||||
virtual void WindowToScreen( int *x, int *y );
|
||||
|
||||
virtual bool IsActive();
|
||||
|
||||
virtual void SetModified(bool modified);
|
||||
virtual bool IsModified() const;
|
||||
|
||||
wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
|
||||
|
||||
CGWindowLevel GetWindowLevel() const { return m_macWindowLevel; }
|
||||
void RestoreWindowLevel();
|
||||
protected :
|
||||
CGWindowLevel m_macWindowLevel;
|
||||
WXWindow m_macWindow;
|
||||
void * m_macFullScreenData ;
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCocoaImpl)
|
||||
};
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
WXDLLIMPEXP_CORE NSScreen* wxOSXGetMenuScreen();
|
||||
WXDLLIMPEXP_CORE NSRect wxToNSRect( NSView* parent, const wxRect& r );
|
||||
WXDLLIMPEXP_CORE wxRect wxFromNSRect( NSView* parent, const NSRect& rect );
|
||||
WXDLLIMPEXP_CORE NSPoint wxToNSPoint( NSView* parent, const wxPoint& p );
|
||||
WXDLLIMPEXP_CORE wxPoint wxFromNSPoint( NSView* parent, const NSPoint& p );
|
||||
|
||||
NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size ,
|
||||
bool adjustForOrigin = true );
|
||||
|
||||
// used for many wxControls
|
||||
|
||||
@interface wxNSButton : NSButton
|
||||
{
|
||||
NSTrackingRectTag rectTag;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface wxNSBox : NSBox
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface wxNSTextFieldEditor : NSTextView
|
||||
{
|
||||
NSEvent* lastKeyDownEvent;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface wxNSTextField : NSTextField wxOSX_10_6_AND_LATER(<NSTextFieldDelegate>)
|
||||
{
|
||||
wxNSTextFieldEditor* fieldEditor;
|
||||
}
|
||||
|
||||
- (wxNSTextFieldEditor*) fieldEditor;
|
||||
- (void) setFieldEditor:(wxNSTextFieldEditor*) fieldEditor;
|
||||
|
||||
@end
|
||||
|
||||
@interface wxNSSecureTextField : NSSecureTextField wxOSX_10_6_AND_LATER(<NSTextFieldDelegate>)
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface wxNSTextView : NSTextView wxOSX_10_6_AND_LATER(<NSTextViewDelegate>)
|
||||
{
|
||||
}
|
||||
|
||||
- (void)textDidChange:(NSNotification *)aNotification;
|
||||
|
||||
@end
|
||||
|
||||
@interface wxNSMenu : NSMenu
|
||||
{
|
||||
wxMenuImpl* impl;
|
||||
}
|
||||
|
||||
- (void) setImplementation:(wxMenuImpl*) item;
|
||||
- (wxMenuImpl*) implementation;
|
||||
|
||||
@end
|
||||
|
||||
@interface wxNSMenuItem : NSMenuItem
|
||||
{
|
||||
wxMenuItemImpl* impl;
|
||||
}
|
||||
|
||||
- (void) setImplementation:(wxMenuItemImpl*) item;
|
||||
- (wxMenuItemImpl*) implementation;
|
||||
|
||||
- (void)clickedAction:(id)sender;
|
||||
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem;
|
||||
|
||||
@end
|
||||
|
||||
void WXDLLIMPEXP_CORE wxOSXCocoaClassAddWXMethods(Class c);
|
||||
|
||||
/*
|
||||
We need this for ShowModal, as the sheet just disables the parent window and
|
||||
returns control to the app, whereas we don't want to return from ShowModal
|
||||
until the sheet has been dismissed.
|
||||
*/
|
||||
@interface ModalDialogDelegate : NSObject
|
||||
{
|
||||
BOOL sheetFinished;
|
||||
int resultCode;
|
||||
wxDialog* impl;
|
||||
}
|
||||
|
||||
- (void)setImplementation: (wxDialog *)dialog;
|
||||
- (BOOL)finished;
|
||||
- (int)code;
|
||||
- (void)waitForSheetToFinish;
|
||||
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
|
||||
@end
|
||||
|
||||
@interface wxNSAppController : NSObject wxOSX_10_6_AND_LATER(<NSApplicationDelegate>)
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif // __OBJC__
|
||||
|
||||
// NSCursor
|
||||
|
||||
WX_NSCursor wxMacCocoaCreateStockCursor( int cursor_type );
|
||||
WX_NSCursor wxMacCocoaCreateCursorFromCGImage( CGImageRef cgImageRef, float hotSpotX, float hotSpotY );
|
||||
void wxMacCocoaSetCursor( WX_NSCursor cursor );
|
||||
void wxMacCocoaHideCursor();
|
||||
void wxMacCocoaShowCursor();
|
||||
|
||||
typedef struct tagClassicCursor
|
||||
{
|
||||
wxUint16 bits[16];
|
||||
wxUint16 mask[16];
|
||||
wxInt16 hotspot[2];
|
||||
}ClassicCursor;
|
||||
|
||||
const short kwxCursorBullseye = 0;
|
||||
const short kwxCursorBlank = 1;
|
||||
const short kwxCursorPencil = 2;
|
||||
const short kwxCursorMagnifier = 3;
|
||||
const short kwxCursorNoEntry = 4;
|
||||
const short kwxCursorPaintBrush = 5;
|
||||
const short kwxCursorPointRight = 6;
|
||||
const short kwxCursorPointLeft = 7;
|
||||
const short kwxCursorQuestionArrow = 8;
|
||||
const short kwxCursorRightArrow = 9;
|
||||
const short kwxCursorSizeNS = 10;
|
||||
const short kwxCursorSize = 11;
|
||||
const short kwxCursorSizeNESW = 12;
|
||||
const short kwxCursorSizeNWSE = 13;
|
||||
const short kwxCursorRoller = 14;
|
||||
const short kwxCursorWatch = 15;
|
||||
const short kwxCursorLast = kwxCursorWatch;
|
||||
|
||||
// exposing our fallback cursor map
|
||||
|
||||
extern ClassicCursor gMacCursors[];
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_PRIVATE_COCOA_H_
|
||||
|
120
Externals/wxWidgets3/include/wx/osx/cocoa/private/markuptoattr.h
vendored
Normal file
120
Externals/wxWidgets3/include/wx/osx/cocoa/private/markuptoattr.h
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/cocoa/private/markuptoattr.h
|
||||
// Purpose: Class to convert markup to Cocoa attributed strings.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-02-22
|
||||
// RCS-ID: $Id: markuptoattr.h 67069 2011-02-27 12:48:46Z VZ $
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_COCOA_PRIVATE_MARKUPTOATTR_H_
|
||||
#define _WX_OSX_COCOA_PRIVATE_MARKUPTOATTR_H_
|
||||
|
||||
#include "wx/private/markupparserattr.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMarkupToAttrString: create NSAttributedString from markup.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxMarkupToAttrString : public wxMarkupParserAttrOutput
|
||||
{
|
||||
public:
|
||||
// We don't care about the original colours because we never use them but
|
||||
// we do need the correct initial font as we apply modifiers (e.g. create a
|
||||
// font larger than it) to it and so it must be valid.
|
||||
wxMarkupToAttrString(wxWindow *win, const wxString& markup)
|
||||
: wxMarkupParserAttrOutput(win->GetFont(), wxColour(), wxColour())
|
||||
{
|
||||
const wxCFStringRef
|
||||
label(wxControl::RemoveMnemonics(wxMarkupParser::Strip(markup)));
|
||||
m_attrString = [[NSMutableAttributedString alloc]
|
||||
initWithString: label.AsNSString()];
|
||||
|
||||
m_pos = 0;
|
||||
|
||||
[m_attrString beginEditing];
|
||||
|
||||
// First thing we do is change the default string font: as mentioned in
|
||||
// Apple documentation, attributed strings use "Helvetica 12" font by
|
||||
// default which is different from the system "Lucida Grande" font. So
|
||||
// we need to explicitly change the font for the entire string.
|
||||
[m_attrString addAttribute:NSFontAttributeName
|
||||
value:win->GetFont().OSXGetNSFont()
|
||||
range:NSMakeRange(0, [m_attrString length])];
|
||||
|
||||
// Now translate the markup tags to corresponding attributes.
|
||||
wxMarkupParser parser(*this);
|
||||
parser.Parse(markup);
|
||||
|
||||
[m_attrString endEditing];
|
||||
}
|
||||
|
||||
~wxMarkupToAttrString()
|
||||
{
|
||||
[m_attrString release];
|
||||
}
|
||||
|
||||
// Accessor for the users of this class.
|
||||
//
|
||||
// We keep ownership of the returned string.
|
||||
NSMutableAttributedString *GetNSAttributedString() const
|
||||
{
|
||||
return m_attrString;
|
||||
}
|
||||
|
||||
|
||||
// Implement base class pure virtual methods to process markup tags.
|
||||
virtual void OnText(const wxString& text)
|
||||
{
|
||||
m_pos += wxControl::RemoveMnemonics(text).length();
|
||||
}
|
||||
|
||||
virtual void OnAttrStart(const Attr& WXUNUSED(attr))
|
||||
{
|
||||
// Just remember the starting position of the range, we can't really
|
||||
// set the attribute until we find the end of it.
|
||||
m_rangeStarts.push(m_pos);
|
||||
}
|
||||
|
||||
virtual void OnAttrEnd(const Attr& attr)
|
||||
{
|
||||
unsigned start = m_rangeStarts.top();
|
||||
m_rangeStarts.pop();
|
||||
|
||||
const NSRange range = NSMakeRange(start, m_pos - start);
|
||||
|
||||
[m_attrString addAttribute:NSFontAttributeName
|
||||
value:attr.font.OSXGetNSFont()
|
||||
range:range];
|
||||
|
||||
if ( attr.foreground.IsOk() )
|
||||
{
|
||||
[m_attrString addAttribute:NSForegroundColorAttributeName
|
||||
value:attr.foreground.OSXGetNSColor()
|
||||
range:range];
|
||||
}
|
||||
|
||||
if ( attr.background.IsOk() )
|
||||
{
|
||||
[m_attrString addAttribute:NSBackgroundColorAttributeName
|
||||
value:attr.background.OSXGetNSColor()
|
||||
range:range];
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
// The attributed string we're building.
|
||||
NSMutableAttributedString *m_attrString;
|
||||
|
||||
// The current position in the output string.
|
||||
unsigned m_pos;
|
||||
|
||||
// The positions of starting ranges.
|
||||
wxStack<unsigned> m_rangeStarts;
|
||||
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxMarkupToAttrString);
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_COCOA_PRIVATE_MARKUPTOATTR_H_
|
56
Externals/wxWidgets3/include/wx/osx/cocoa/private/overlay.h
vendored
Normal file
56
Externals/wxWidgets3/include/wx/osx/cocoa/private/overlay.h
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/cocoa/private/overlay.h
|
||||
// Purpose: wxOverlayImpl declaration
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 2006-10-20
|
||||
// RCS-ID: $Id: overlay.h 67232 2011-03-18 15:10:15Z DS $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_COCOA_PRIVATE_OVERLAY_H_
|
||||
#define _WX_OSX_COCOA_PRIVATE_OVERLAY_H_
|
||||
|
||||
#include "wx/osx/private.h"
|
||||
#include "wx/toplevel.h"
|
||||
#include "wx/graphics.h"
|
||||
|
||||
class wxOverlayImpl
|
||||
{
|
||||
public:
|
||||
wxOverlayImpl() ;
|
||||
~wxOverlayImpl() ;
|
||||
|
||||
|
||||
// clears the overlay without restoring the former state
|
||||
// to be done eg when the window content has been changed and repainted
|
||||
void Reset();
|
||||
|
||||
// returns true if it has been setup
|
||||
bool IsOk();
|
||||
|
||||
void Init( wxDC* dc, int x , int y , int width , int height );
|
||||
|
||||
void BeginDrawing( wxDC* dc);
|
||||
|
||||
void EndDrawing( wxDC* dc);
|
||||
|
||||
void Clear( wxDC* dc);
|
||||
|
||||
private:
|
||||
void CreateOverlayWindow();
|
||||
|
||||
WXWindow m_overlayWindow;
|
||||
WXWindow m_overlayParentWindow;
|
||||
CGContextRef m_overlayContext ;
|
||||
// we store the window in case we would have to issue a Refresh()
|
||||
wxWindow* m_window ;
|
||||
|
||||
int m_x ;
|
||||
int m_y ;
|
||||
int m_width ;
|
||||
int m_height ;
|
||||
} ;
|
||||
|
||||
#endif // _WX_MAC_CARBON_PRIVATE_OVERLAY_H_
|
112
Externals/wxWidgets3/include/wx/osx/cocoa/private/textimpl.h
vendored
Normal file
112
Externals/wxWidgets3/include/wx/osx/cocoa/private/textimpl.h
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/cocoa/private/textimpl.h
|
||||
// Purpose: textcontrol implementation classes that have to be exposed
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id: textimpl.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
||||
#define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
||||
|
||||
#include "wx/combobox.h"
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
// implementation exposed, so that search control can pull it
|
||||
|
||||
class wxNSTextFieldControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl
|
||||
{
|
||||
public :
|
||||
// wxNSTextFieldControl must always be associated with a wxTextEntry. If
|
||||
// it's associated with a wxTextCtrl then we can get the associated entry
|
||||
// from it but otherwise the second ctor should be used to explicitly pass
|
||||
// us the entry.
|
||||
wxNSTextFieldControl( wxTextCtrl *text, WXWidget w );
|
||||
wxNSTextFieldControl( wxWindow *wxPeer, wxTextEntry *entry, WXWidget w );
|
||||
virtual ~wxNSTextFieldControl();
|
||||
|
||||
virtual wxString GetStringValue() const ;
|
||||
virtual void SetStringValue( const wxString &str) ;
|
||||
virtual void Copy() ;
|
||||
virtual void Cut() ;
|
||||
virtual void Paste() ;
|
||||
virtual bool CanPaste() const ;
|
||||
virtual void SetEditable(bool editable) ;
|
||||
virtual void GetSelection( long* from, long* to) const ;
|
||||
virtual void SetSelection( long from , long to );
|
||||
virtual void WriteText(const wxString& str) ;
|
||||
virtual bool HasOwnContextMenu() const { return true; }
|
||||
virtual bool SetHint(const wxString& hint);
|
||||
|
||||
virtual void controlAction(WXWidget slf, void* _cmd, void *sender);
|
||||
|
||||
protected :
|
||||
NSTextField* m_textField;
|
||||
long m_selStart;
|
||||
long m_selEnd;
|
||||
|
||||
private:
|
||||
// Common part of both ctors.
|
||||
void Init(WXWidget w);
|
||||
};
|
||||
|
||||
class wxNSTextViewControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl
|
||||
{
|
||||
public:
|
||||
wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w );
|
||||
virtual ~wxNSTextViewControl();
|
||||
|
||||
virtual wxString GetStringValue() const ;
|
||||
virtual void SetStringValue( const wxString &str) ;
|
||||
virtual void Copy() ;
|
||||
virtual void Cut() ;
|
||||
virtual void Paste() ;
|
||||
virtual bool CanPaste() const ;
|
||||
virtual void SetEditable(bool editable) ;
|
||||
virtual void GetSelection( long* from, long* to) const ;
|
||||
virtual void SetSelection( long from , long to );
|
||||
virtual void WriteText(const wxString& str) ;
|
||||
virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true );
|
||||
|
||||
virtual bool GetStyle(long position, wxTextAttr& style);
|
||||
virtual void SetStyle(long start, long end, const wxTextAttr& style);
|
||||
|
||||
virtual bool CanFocus() const;
|
||||
|
||||
virtual bool HasOwnContextMenu() const { return true; }
|
||||
|
||||
virtual void CheckSpelling(bool check);
|
||||
virtual wxSize GetBestSize() const;
|
||||
|
||||
protected:
|
||||
NSScrollView* m_scrollView;
|
||||
NSTextView* m_textView;
|
||||
};
|
||||
|
||||
class wxNSComboBoxControl : public wxNSTextFieldControl, public wxComboWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxNSComboBoxControl( wxComboBox *wxPeer, WXWidget w );
|
||||
virtual ~wxNSComboBoxControl();
|
||||
|
||||
virtual int GetSelectedItem() const;
|
||||
virtual void SetSelectedItem(int item);
|
||||
|
||||
virtual int GetNumberOfItems() const;
|
||||
|
||||
virtual void InsertItem(int pos, const wxString& item);
|
||||
virtual void RemoveItem(int pos);
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual wxString GetStringAtIndex(int pos) const;
|
||||
|
||||
virtual int FindString(const wxString& text) const;
|
||||
private:
|
||||
NSComboBox* m_comboBox;
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
40
Externals/wxWidgets3/include/wx/osx/colordlg.h
vendored
Normal file
40
Externals/wxWidgets3/include/wx/osx/colordlg.h
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/colordlg.h
|
||||
// Purpose: wxColourDialog class. Use generic version if no
|
||||
// platform-specific implementation.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: colordlg.h 66615 2011-01-07 05:26:57Z PC $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLORDLG_H_
|
||||
#define _WX_COLORDLG_H_
|
||||
|
||||
#include "wx/dialog.h"
|
||||
|
||||
/*
|
||||
* Platform-specific colour dialog implementation
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxColourDialog)
|
||||
public:
|
||||
wxColourDialog();
|
||||
wxColourDialog(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
bool Create(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
int ShowModal();
|
||||
wxColourData& GetColourData() { return m_colourData; }
|
||||
|
||||
protected:
|
||||
wxColourData m_colourData;
|
||||
wxWindow* m_dialogParent;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_COLORDLG_H_
|
1
Externals/wxWidgets3/include/wx/osx/colour.h
vendored
Normal file
1
Externals/wxWidgets3/include/wx/osx/colour.h
vendored
Normal file
@ -0,0 +1 @@
|
||||
#include "wx/osx/core/colour.h"
|
196
Externals/wxWidgets3/include/wx/osx/combobox.h
vendored
Normal file
196
Externals/wxWidgets3/include/wx/osx/combobox.h
vendored
Normal file
@ -0,0 +1,196 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/combobox.h
|
||||
// Purpose: wxComboBox class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: combobox.h 66993 2011-02-22 13:25:38Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COMBOBOX_H_
|
||||
#define _WX_COMBOBOX_H_
|
||||
|
||||
#include "wx/containr.h"
|
||||
#include "wx/choice.h"
|
||||
#include "wx/textctrl.h"
|
||||
|
||||
WX_DEFINE_ARRAY( char * , wxComboBoxDataArray ) ;
|
||||
|
||||
// forward declaration of private implementation classes
|
||||
|
||||
class wxComboBoxText;
|
||||
class wxComboBoxChoice;
|
||||
class wxComboWidgetImpl;
|
||||
|
||||
// Combobox item
|
||||
class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
||||
|
||||
public:
|
||||
virtual ~wxComboBox();
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
// forward these functions to all subcontrols
|
||||
virtual bool Enable(bool enable = true);
|
||||
virtual bool Show(bool show = true);
|
||||
#endif
|
||||
|
||||
// callback functions
|
||||
virtual void DelegateTextChanged( const wxString& value );
|
||||
virtual void DelegateChoice( const wxString& value );
|
||||
|
||||
wxComboBox() { Init(); }
|
||||
|
||||
wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, value, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
virtual int GetSelection() const;
|
||||
virtual void GetSelection(long *from, long *to) const;
|
||||
virtual void SetSelection(int n);
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
virtual wxString GetStringSelection() const;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
|
||||
// these methods are provided by wxTextEntry for the native impl.
|
||||
#if wxOSX_USE_CARBON
|
||||
// Text field functions
|
||||
virtual void SetValue(const wxString& value);
|
||||
virtual wxString GetValue() const;
|
||||
virtual void WriteText(const wxString& text);
|
||||
|
||||
// Clipboard operations
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual void SetInsertionPointEnd();
|
||||
virtual long GetInsertionPoint() const;
|
||||
virtual wxTextPos GetLastPosition() const;
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
virtual void Remove(long from, long to);
|
||||
virtual void SetEditable(bool editable);
|
||||
virtual bool IsEditable() const;
|
||||
|
||||
virtual void Undo();
|
||||
virtual void Redo();
|
||||
virtual void SelectAll();
|
||||
|
||||
virtual bool CanCopy() const;
|
||||
virtual bool CanCut() const;
|
||||
virtual bool CanPaste() const;
|
||||
virtual bool CanUndo() const;
|
||||
virtual bool CanRedo() const;
|
||||
|
||||
virtual wxClientDataType GetClientDataType() const;
|
||||
|
||||
virtual wxTextWidgetImpl* GetTextPeer() const;
|
||||
#endif // wxOSX_USE_CARBON
|
||||
|
||||
|
||||
|
||||
// osx specific event handling common for all osx-ports
|
||||
|
||||
virtual bool OSXHandleClicked( double timestampsec );
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
|
||||
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
wxComboWidgetImpl* GetComboPeer() const;
|
||||
#endif
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// List functions
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual void DoClear();
|
||||
|
||||
// wxTextEntry functions
|
||||
#if wxOSX_USE_CARBON
|
||||
virtual wxString DoGetValue() const;
|
||||
#endif
|
||||
virtual wxWindow *GetEditableWindow() { return this; }
|
||||
|
||||
// override the base class virtuals involved in geometry calculations
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
#if wxOSX_USE_CARBON
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
#endif
|
||||
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
|
||||
virtual void DoSetItemClientData(unsigned int n, void* clientData);
|
||||
virtual void * DoGetItemClientData(unsigned int n) const;
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
virtual void SetClientDataType(wxClientDataType clientDataItemsType);
|
||||
#endif
|
||||
|
||||
virtual void EnableTextChangedEvents(bool enable);
|
||||
|
||||
// the subcontrols
|
||||
wxComboBoxText* m_text;
|
||||
wxComboBoxChoice* m_choice;
|
||||
|
||||
wxComboBoxDataArray m_datas;
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
DECLARE_EVENT_TABLE()
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // _WX_COMBOBOX_H_
|
161
Externals/wxWidgets3/include/wx/osx/config_xcode.h
vendored
Normal file
161
Externals/wxWidgets3/include/wx/osx/config_xcode.h
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/config_xcode.h
|
||||
// Purpose: configurations for xcode builds
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 29.04.04
|
||||
// RCS-ID: $Id: config_xcode.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// from config.log confdefs
|
||||
|
||||
#define HAVE_SSIZE_T 1
|
||||
#define STDC_HEADERS 1
|
||||
#ifdef __BIG_ENDIAN__
|
||||
#define WORDS_BIGENDIAN 1
|
||||
#endif
|
||||
#define wxUSE_UNIX 1
|
||||
#define __UNIX__ 1
|
||||
#define __BSD__ 1
|
||||
#define __DARWIN__ 1
|
||||
#define wx_USE_NANOX 0
|
||||
#define TARGET_CARBON 1
|
||||
|
||||
#define HAVE_EXPLICIT 1
|
||||
#define HAVE_VA_COPY 1
|
||||
#define HAVE_VARIADIC_MACROS 1
|
||||
#define HAVE_STD_WSTRING 1
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||
#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 2 )
|
||||
#define HAVE_TR1_UNORDERED_MAP 1
|
||||
#define HAVE_TR1_UNORDERED_SET 1
|
||||
#define HAVE_TR1_TYPE_TRAITS 1
|
||||
#define HAVE_GCC_ATOMIC_BUILTINS 1
|
||||
#endif
|
||||
#endif
|
||||
#define HAVE_VISIBILITY 1
|
||||
#define wxHAVE_PTHREAD_CLEANUP 1
|
||||
#define CONST_COMPATIBILITY 0
|
||||
#define WX_TIMEZONE timezone
|
||||
#define WX_SOCKLEN_T socklen_t
|
||||
#define SOCKOPTLEN_T socklen_t
|
||||
#define WX_STATFS_T struct statfs
|
||||
#define wxTYPE_SA_HANDLER int
|
||||
#define WX_GMTOFF_IN_TM 1
|
||||
#define HAVE_PW_GECOS 1
|
||||
#define HAVE_DLOPEN 1
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
|
||||
/* #undef HAVE_CXA_DEMANGLE */
|
||||
#else
|
||||
#define HAVE_CXA_DEMANGLE 1
|
||||
#endif
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_FSYNC 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_SCHED_YIELD 1
|
||||
#define HAVE_PTHREAD_MUTEXATTR_T 1
|
||||
#define HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL 1
|
||||
#define HAVE_PTHREAD_CANCEL 1
|
||||
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_SNPRINTF_DECL 1
|
||||
#define HAVE_UNIX98_PRINTF 1
|
||||
#define HAVE_STATFS 1
|
||||
#define HAVE_STATFS_DECL 1
|
||||
#define HAVE_STRPTIME 1
|
||||
#define HAVE_STRPTIME_DECL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_THREAD_PRIORITY_FUNCTIONS 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_VSNPRINTF_DECL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSSCANF_DECL 1
|
||||
#define HAVE_USLEEP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
#define SIZEOF_SHORT 2
|
||||
#define SIZEOF_INT 4
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOID_P 8
|
||||
#define SIZEOF_LONG 8
|
||||
#define SIZEOF_SIZE_T 8
|
||||
#else
|
||||
#define SIZEOF_VOID_P 4
|
||||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_SIZE_T 4
|
||||
#endif
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define wxSIZE_T_IS_ULONG 1
|
||||
#define wxWCHAR_T_IS_REAL_TYPE 1
|
||||
#define HAVE_DLERROR 1
|
||||
#define HAVE_FCNTL 1
|
||||
#define HAVE_GETHOSTBYNAME 1
|
||||
#define HAVE_GETSERVBYNAME 1
|
||||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_INET_ADDR 1
|
||||
#define HAVE_INET_ATON 1
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
#define HAVE_MKSTEMP 1
|
||||
#define HAVE_SETENV 1
|
||||
/* #define HAVE_PUTENV 1 */
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_UNAME 1
|
||||
#define HAVE_USLEEP 1
|
||||
#define HAVE_X11_XKBLIB_H 1
|
||||
#define HAVE_SCHED_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
/* better to use the built-in CF conversions, also avoid iconv versioning problems */
|
||||
/* #undef HAVE_ICONV */
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
|
||||
#define ICONV_CONST const
|
||||
#else
|
||||
#define ICONV_CONST
|
||||
#endif
|
||||
#define HAVE_LANGINFO_H 1
|
||||
#define HAVE_WCSRTOMBS 1
|
||||
#define HAVE_FPUTWS 1
|
||||
#define HAVE_STRCASECMP_IN_STRING_H 1
|
||||
#define HAVE_WPRINTF 1
|
||||
#define HAVE_VSWPRINTF 1
|
||||
#define HAVE_VSWSCANF 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
#define HAVE_FDOPEN 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_GETPWUID_R 1
|
||||
#define HAVE_GETGRGID_R 1
|
||||
#define HAVE_LOCALE_T 1
|
||||
#define wxHAS_KQUEUE 1
|
||||
|
||||
#define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh"
|
||||
#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
|
||||
#define PACKAGE_NAME "wxWidgets"
|
||||
#define PACKAGE_STRING "wxWidgets 2.9.2"
|
||||
#define PACKAGE_TARNAME "wxwidgets"
|
||||
#define PACKAGE_VERSION "2.9.2"
|
||||
|
||||
// for regex
|
||||
#define WX_NO_REGEX_ADVANCED 1
|
||||
|
||||
// for jpeg
|
||||
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
// OBSOLETE ?
|
||||
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
#define HAVE_REGCOMP 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_X11_XLIB_H 1
|
||||
#define SOCKLEN_T socklen_t
|
||||
#define _FILE_OFFSET_BITS 64
|
52
Externals/wxWidgets3/include/wx/osx/control.h
vendored
Normal file
52
Externals/wxWidgets3/include/wx/osx/control.h
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/control.h
|
||||
// Purpose: wxControl class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: control.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CONTROL_H_
|
||||
#define _WX_CONTROL_H_
|
||||
|
||||
WXDLLIMPEXP_DATA_CORE(extern const char) wxControlNameStr[];
|
||||
|
||||
// General item class
|
||||
class WXDLLIMPEXP_CORE wxControl : public wxControlBase
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxControl)
|
||||
|
||||
public:
|
||||
wxControl();
|
||||
wxControl(wxWindow *parent, wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr)
|
||||
{
|
||||
Create(parent, winid, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr);
|
||||
|
||||
// Simulates an event
|
||||
virtual void Command(wxCommandEvent& event) { ProcessCommand(event); }
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// Calls the callback and appropriate event handlers
|
||||
bool ProcessCommand(wxCommandEvent& event);
|
||||
|
||||
void OnKeyDown( wxKeyEvent &event ) ;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_CONTROL_H_
|
97
Externals/wxWidgets3/include/wx/osx/core/cfdataref.h
vendored
Normal file
97
Externals/wxWidgets3/include/wx/osx/core/cfdataref.h
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/cfdataref.h
|
||||
// Purpose: wxCFDataRef class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 2007/05/10
|
||||
// RCS-ID: $Id: cfdataref.h 67232 2011-03-18 15:10:15Z DS $
|
||||
// Copyright: (c) 2007 Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
// Notes: See http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBinaryData/index.html
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/*! @header wx/osx/core/cfdataref.h
|
||||
@abstract wxCFDataRef template class
|
||||
*/
|
||||
|
||||
#ifndef _WX_MAC_COREFOUNDATION_CFDATAREF_H__
|
||||
#define _WX_MAC_COREFOUNDATION_CFDATAREF_H__
|
||||
|
||||
#include "wx/osx/core/cfref.h"
|
||||
|
||||
#include <CoreFoundation/CFData.h>
|
||||
|
||||
/*! @class wxCFDataRef
|
||||
@discussion Properly retains/releases reference to CoreFoundation data objects
|
||||
*/
|
||||
class wxCFDataRef : public wxCFRef< CFDataRef >
|
||||
{
|
||||
public:
|
||||
/*! @method wxCFDataRef
|
||||
@abstract Creates a NULL data ref
|
||||
*/
|
||||
wxCFDataRef()
|
||||
{}
|
||||
|
||||
typedef wxCFRef<CFDataRef> super_type;
|
||||
|
||||
/*! @method wxCFDataRef
|
||||
@abstract Assumes ownership of p and creates a reference to it.
|
||||
@templatefield otherType Any type.
|
||||
@param p The raw pointer to assume ownership of. May be NULL.
|
||||
@discussion Like shared_ptr, it is assumed that the caller has a strong reference to p and intends
|
||||
to transfer ownership of that reference to this ref holder. If the object comes from
|
||||
a Create or Copy method then this is the correct behavior. If the object comes from
|
||||
a Get method then you must CFRetain it yourself before passing it to this constructor.
|
||||
A handy way to do this is to use the non-member wxCFRefFromGet factory funcion.
|
||||
This method is templated and takes an otherType *p. This prevents implicit conversion
|
||||
using an operator refType() in a different ref-holding class type.
|
||||
*/
|
||||
explicit wxCFDataRef(CFDataRef r)
|
||||
: super_type(r)
|
||||
{}
|
||||
|
||||
/*! @method wxCFDataRef
|
||||
@abstract Copies a ref holder of the same type
|
||||
@param otherRef The other ref holder to copy.
|
||||
@discussion Ownership will be shared by the original ref and the newly created ref. That is,
|
||||
the object will be explicitly retained by this new ref.
|
||||
*/
|
||||
wxCFDataRef(const wxCFDataRef& otherRef)
|
||||
: super_type( otherRef )
|
||||
{}
|
||||
|
||||
/*! @method wxCFDataRef
|
||||
@abstract Copies raw data into a data ref
|
||||
@param data The raw data.
|
||||
@param length The data length.
|
||||
*/
|
||||
wxCFDataRef(const UInt8* data, CFIndex length)
|
||||
: super_type(CFDataCreate(kCFAllocatorDefault, data, length))
|
||||
{
|
||||
}
|
||||
|
||||
/*! @method GetLength
|
||||
@abstract returns the length in bytes of the data stored
|
||||
*/
|
||||
CFIndex GetLength() const
|
||||
{
|
||||
if ( m_ptr )
|
||||
return CFDataGetLength( *this );
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! @method GetBytes
|
||||
@abstract Copies the data into an external buffer
|
||||
@param range The desired range.
|
||||
@param buffer The target buffer.
|
||||
*/
|
||||
void GetBytes( CFRange range, UInt8 *buffer ) const
|
||||
{
|
||||
if ( m_ptr )
|
||||
CFDataGetBytes(m_ptr, range, buffer);
|
||||
}
|
||||
};
|
||||
|
||||
#endif //ifndef _WX_MAC_COREFOUNDATION_CFDATAREF_H__
|
||||
|
401
Externals/wxWidgets3/include/wx/osx/core/cfref.h
vendored
Normal file
401
Externals/wxWidgets3/include/wx/osx/core/cfref.h
vendored
Normal file
@ -0,0 +1,401 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/cfref.h
|
||||
// Purpose: wxCFRef template class
|
||||
// Author: David Elliott <dfe@cox.net>
|
||||
// Modified by: Stefan Csomor
|
||||
// Created: 2007/05/10
|
||||
// RCS-ID: $Id: cfref.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) 2007 David Elliott <dfe@cox.net>, Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
// Notes: See http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/index.html
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/*! @header wx/osx/core/cfref.h
|
||||
@abstract wxCFRef template class
|
||||
@discussion FIXME: Convert doc tags to something less buggy with C++
|
||||
*/
|
||||
|
||||
#ifndef _WX_MAC_COREFOUNDATION_CFREF_H__
|
||||
#define _WX_MAC_COREFOUNDATION_CFREF_H__
|
||||
|
||||
// Include unistd to ensure that NULL is defined
|
||||
#include <unistd.h>
|
||||
// Include AvailabilityMacros for DEPRECATED_ATTRIBUTE
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
// #include <CoreFoundation/CFBase.h>
|
||||
/* Don't include CFBase.h such that this header can be included from public
|
||||
* headers with minimal namespace pollution.
|
||||
* Note that Darwin CF uses extern for CF_EXPORT. If we need this on Win32
|
||||
* or non-Darwin Mac OS we'll need to define the appropriate __declspec.
|
||||
*/
|
||||
typedef const void *CFTypeRef;
|
||||
extern "C" {
|
||||
extern /* CF_EXPORT */
|
||||
CFTypeRef CFRetain(CFTypeRef cf);
|
||||
extern /* CF_EXPORT */
|
||||
void CFRelease(CFTypeRef cf);
|
||||
} // extern "C"
|
||||
|
||||
|
||||
/*! @function wxCFRelease
|
||||
@abstract A CFRelease variant that checks for NULL before releasing.
|
||||
@discussion The parameter is template not for type safety but to ensure the argument
|
||||
is a raw pointer and not a ref holder of any type.
|
||||
*/
|
||||
template <class Type>
|
||||
inline void wxCFRelease(Type *r)
|
||||
{
|
||||
if ( r != NULL )
|
||||
::CFRelease((CFTypeRef)r);
|
||||
}
|
||||
|
||||
/*! @function wxCFRetain
|
||||
@abstract A typesafe CFRetain variant that checks for NULL.
|
||||
*/
|
||||
template <class Type>
|
||||
inline Type* wxCFRetain(Type *r)
|
||||
{
|
||||
// NOTE(DE): Setting r to the result of CFRetain improves efficiency on both x86 and PPC
|
||||
// Casting r to CFTypeRef ensures we are calling the real C version defined in CFBase.h
|
||||
// and not any possibly templated/overloaded CFRetain.
|
||||
if ( r != NULL )
|
||||
r = (Type*)::CFRetain((CFTypeRef)r);
|
||||
return r;
|
||||
}
|
||||
|
||||
template <class refType>
|
||||
class wxCFRef;
|
||||
|
||||
/*! @class wxCFWeakRef
|
||||
@templatefield refType The CF reference type (e.g. CFStringRef, CFRunLoopRef, etc.)
|
||||
It should already be a pointer. This is different from
|
||||
shared_ptr where the template parameter is the pointee type.
|
||||
@discussion Wraps a raw pointer without any retain or release.
|
||||
Provides a way to get what amounts to a raw pointer from a wxCFRef without
|
||||
using a raw pointer. Unlike a raw pointer, constructing a wxCFRef from this
|
||||
class will cause it to be retained because it is assumed that a wxCFWeakRef
|
||||
does not own its pointer.
|
||||
*/
|
||||
template <class refType>
|
||||
class wxCFWeakRef
|
||||
{
|
||||
template <class refTypeA, class otherRefType>
|
||||
friend wxCFWeakRef<refTypeA> static_cfref_cast(const wxCFRef<otherRefType> &otherRef);
|
||||
public:
|
||||
/*! @method wxCFWeakRef
|
||||
@abstract Creates a NULL reference
|
||||
*/
|
||||
wxCFWeakRef()
|
||||
: m_ptr(NULL)
|
||||
{}
|
||||
|
||||
// Default copy constructor is fine.
|
||||
// Default destructor is fine but we'll set NULL to avoid bugs
|
||||
~wxCFWeakRef()
|
||||
{ m_ptr = NULL; }
|
||||
|
||||
// Do not implement a raw-pointer constructor.
|
||||
|
||||
/*! @method wxCFWeakRef
|
||||
@abstract Copies another ref holder where its type can be converted to ours
|
||||
@templatefield otherRefType Any type held by another wxCFWeakRef.
|
||||
@param otherRef The other weak ref holder to copy.
|
||||
@discussion This is merely a copy or implicit cast.
|
||||
*/
|
||||
template <class otherRefType>
|
||||
wxCFWeakRef(const wxCFWeakRef<otherRefType>& otherRef)
|
||||
: m_ptr(otherRef.get()) // Implicit conversion from otherRefType to refType should occur
|
||||
{}
|
||||
|
||||
/*! @method wxCFWeakRef
|
||||
@abstract Copies a strong ref holder where its type can be converted to ours
|
||||
@templatefield otherRefType Any type held by a wxCFRef.
|
||||
@param otherRef The strong ref holder to copy.
|
||||
@discussion This ref is merely a pointer copy, the strong ref still holds the pointer.
|
||||
*/
|
||||
template <class otherRefType>
|
||||
wxCFWeakRef(const wxCFRef<otherRefType>& otherRef)
|
||||
: m_ptr(otherRef.get()) // Implicit conversion from otherRefType to refType should occur
|
||||
{}
|
||||
|
||||
/*! @method get
|
||||
@abstract Explicit conversion to the underlying pointer type
|
||||
@discussion Allows the caller to explicitly get the underlying pointer.
|
||||
*/
|
||||
refType get() const
|
||||
{ return m_ptr; }
|
||||
|
||||
/*! @method operator refType
|
||||
@abstract Implicit conversion to the underlying pointer type
|
||||
@discussion Allows the ref to be used in CF function calls.
|
||||
*/
|
||||
operator refType() const
|
||||
{ return m_ptr; }
|
||||
|
||||
protected:
|
||||
/*! @method wxCFWeakRef
|
||||
@abstract Constructs a weak reference to the raw pointer
|
||||
@templatefield otherType Any type.
|
||||
@param p The raw pointer to assume ownership of. May be NULL.
|
||||
@discussion This method is private so that the friend static_cfref_cast can use it
|
||||
*/
|
||||
template <class otherType>
|
||||
explicit wxCFWeakRef(otherType *p)
|
||||
: m_ptr(p) // Implicit conversion from otherType* to refType should occur.
|
||||
{}
|
||||
|
||||
/*! @var m_ptr The raw pointer.
|
||||
*/
|
||||
refType m_ptr;
|
||||
};
|
||||
|
||||
/*! @class wxCFRef
|
||||
@templatefield refType The CF reference type (e.g. CFStringRef, CFRunLoopRef, etc.)
|
||||
It should already be a pointer. This is different from
|
||||
shared_ptr where the template parameter is the pointee type.
|
||||
@discussion Properly retains/releases reference to CoreFoundation objects
|
||||
*/
|
||||
template <class refType>
|
||||
class wxCFRef
|
||||
{
|
||||
public:
|
||||
/*! @method wxCFRef
|
||||
@abstract Creates a NULL reference
|
||||
*/
|
||||
wxCFRef()
|
||||
: m_ptr(NULL)
|
||||
{}
|
||||
|
||||
/*! @method wxCFRef
|
||||
@abstract Assumes ownership of p and creates a reference to it.
|
||||
@templatefield otherType Any type.
|
||||
@param p The raw pointer to assume ownership of. May be NULL.
|
||||
@discussion Like shared_ptr, it is assumed that the caller has a strong reference to p and intends
|
||||
to transfer ownership of that reference to this ref holder. If the object comes from
|
||||
a Create or Copy method then this is the correct behavior. If the object comes from
|
||||
a Get method then you must CFRetain it yourself before passing it to this constructor.
|
||||
A handy way to do this is to use the non-member wxCFRefFromGet factory funcion.
|
||||
This method is templated and takes an otherType *p. This prevents implicit conversion
|
||||
using an operator refType() in a different ref-holding class type.
|
||||
*/
|
||||
template <class otherType>
|
||||
explicit wxCFRef(otherType *p)
|
||||
: m_ptr(p) // Implicit conversion from otherType* to refType should occur.
|
||||
{}
|
||||
|
||||
/*! @method wxCFRef
|
||||
@abstract Copies a ref holder of the same type
|
||||
@param otherRef The other ref holder to copy.
|
||||
@discussion Ownership will be shared by the original ref and the newly created ref. That is,
|
||||
the object will be explicitly retained by this new ref.
|
||||
*/
|
||||
wxCFRef(const wxCFRef& otherRef)
|
||||
: m_ptr(wxCFRetain(otherRef.m_ptr))
|
||||
{}
|
||||
|
||||
/*! @method wxCFRef
|
||||
@abstract Copies a ref holder where its type can be converted to ours
|
||||
@templatefield otherRefType Any type held by another wxCFRef.
|
||||
@param otherRef The other ref holder to copy.
|
||||
@discussion Ownership will be shared by the original ref and the newly created ref. That is,
|
||||
the object will be explicitly retained by this new ref.
|
||||
*/
|
||||
template <class otherRefType>
|
||||
wxCFRef(const wxCFRef<otherRefType>& otherRef)
|
||||
: m_ptr(wxCFRetain(otherRef.get())) // Implicit conversion from otherRefType to refType should occur
|
||||
{}
|
||||
|
||||
/*! @method wxCFRef
|
||||
@abstract Copies a weak ref holder where its type can be converted to ours
|
||||
@templatefield otherRefType Any type held by a wxCFWeakRef.
|
||||
@param otherRef The weak ref holder to copy.
|
||||
@discussion Ownership will be taken by this newly created ref. That is,
|
||||
the object will be explicitly retained by this new ref.
|
||||
Ownership is most likely shared with some other ref as well.
|
||||
*/
|
||||
template <class otherRefType>
|
||||
wxCFRef(const wxCFWeakRef<otherRefType>& otherRef)
|
||||
: m_ptr(wxCFRetain(otherRef.get())) // Implicit conversion from otherRefType to refType should occur
|
||||
{}
|
||||
|
||||
/*! @method ~wxCFRef
|
||||
@abstract Releases (potentially shared) ownership of the ref.
|
||||
@discussion A ref holder instance is always assumed to have ownership so ownership is always
|
||||
released (CFRelease called) upon destruction.
|
||||
*/
|
||||
~wxCFRef()
|
||||
{ reset(); }
|
||||
|
||||
/*! @method operator=
|
||||
@abstract Assigns the other ref's pointer to us when the otherRef is the same type.
|
||||
@param otherRef The other ref holder to copy.
|
||||
@discussion The incoming pointer is retained, the original pointer is released, and this object
|
||||
is made to point to the new pointer.
|
||||
*/
|
||||
wxCFRef& operator=(const wxCFRef& otherRef)
|
||||
{
|
||||
if (this != &otherRef)
|
||||
{
|
||||
wxCFRetain(otherRef.m_ptr);
|
||||
wxCFRelease(m_ptr);
|
||||
m_ptr = otherRef.m_ptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*! @method operator=
|
||||
@abstract Assigns the other ref's pointer to us when the other ref can be converted to our type.
|
||||
@templatefield otherRefType Any type held by another wxCFRef
|
||||
@param otherRef The other ref holder to copy.
|
||||
@discussion The incoming pointer is retained, the original pointer is released, and this object
|
||||
is made to point to the new pointer.
|
||||
*/
|
||||
template <class otherRefType>
|
||||
wxCFRef& operator=(const wxCFRef<otherRefType>& otherRef)
|
||||
{
|
||||
wxCFRetain(otherRef.get());
|
||||
wxCFRelease(m_ptr);
|
||||
m_ptr = otherRef.get(); // Implicit conversion from otherRefType to refType should occur
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*! @method get
|
||||
@abstract Explicit conversion to the underlying pointer type
|
||||
@discussion Allows the caller to explicitly get the underlying pointer.
|
||||
*/
|
||||
refType get() const
|
||||
{ return m_ptr; }
|
||||
|
||||
/*! @method operator refType
|
||||
@abstract Implicit conversion to the underlying pointer type
|
||||
@discussion Allows the ref to be used in CF function calls.
|
||||
*/
|
||||
operator refType() const
|
||||
{ return m_ptr; }
|
||||
|
||||
#if 0
|
||||
< // HeaderDoc is retarded and thinks the GT from operator-> is part of a template param.
|
||||
// So give it that < outside of a comment to fake it out. (if 0 is not a comment to HeaderDoc)
|
||||
#endif
|
||||
|
||||
/*! @method operator->
|
||||
@abstract Implicit conversion to the underlying pointer type
|
||||
@discussion This is nearly useless for CF types which are nearly always opaque
|
||||
*/
|
||||
refType operator-> () const
|
||||
{ return m_ptr; }
|
||||
|
||||
/*! @method reset
|
||||
@abstract Nullifies the reference
|
||||
@discussion Releases ownership (calls CFRelease) before nullifying the pointer.
|
||||
*/
|
||||
void reset()
|
||||
{
|
||||
wxCFRelease(m_ptr);
|
||||
m_ptr = NULL;
|
||||
}
|
||||
|
||||
/*! @method reset
|
||||
@abstract Sets this to a new reference
|
||||
@templatefield otherType Any type.
|
||||
@param p The raw pointer to assume ownership of
|
||||
@discussion The existing reference is released (like destruction). It is assumed that the caller
|
||||
has a strong reference to the new p and intends to transfer ownership of that reference
|
||||
to this ref holder. Take care to call CFRetain if you received the object from a Get method.
|
||||
This method is templated and takes an otherType *p. This prevents implicit conversion
|
||||
using an operator refType() in a different ref-holding class type.
|
||||
*/
|
||||
template <class otherType>
|
||||
void reset(otherType* p)
|
||||
{
|
||||
wxCFRelease(m_ptr);
|
||||
m_ptr = p; // Automatic conversion should occur
|
||||
}
|
||||
|
||||
// Release the pointer, i.e. give up its ownership.
|
||||
refType release()
|
||||
{
|
||||
refType p = m_ptr;
|
||||
m_ptr = NULL;
|
||||
return p;
|
||||
}
|
||||
|
||||
protected:
|
||||
/*! @var m_ptr The raw pointer.
|
||||
*/
|
||||
refType m_ptr;
|
||||
};
|
||||
|
||||
/*! @function wxCFRefFromGet
|
||||
@abstract Factory function to create wxCFRef from a raw pointer obtained from a Get-rule function
|
||||
@param p The pointer to retain and create a wxCFRef from. May be NULL.
|
||||
@discussion Unlike the wxCFRef raw pointer constructor, this function explicitly retains its
|
||||
argument. This can be used for functions such as CFDictionaryGetValue() or
|
||||
CFAttributedStringGetString() which return a temporary reference (Get-rule functions).
|
||||
FIXME: Anybody got a better name?
|
||||
*/
|
||||
template <typename Type>
|
||||
inline wxCFRef<Type*> wxCFRefFromGet(Type *p)
|
||||
{
|
||||
return wxCFRef<Type*>(wxCFRetain(p));
|
||||
}
|
||||
|
||||
/*! @function static_cfref_cast
|
||||
@abstract Works like static_cast but with a wxCFRef as the argument.
|
||||
@param refType Template parameter. The destination raw pointer type
|
||||
@param otherRef Normal parameter. The source wxCFRef<> object.
|
||||
@discussion This is intended to be a clever way to make static_cast work while allowing
|
||||
the return value to be converted to either a strong ref or a raw pointer
|
||||
while ensuring that the retain count is updated appropriately.
|
||||
|
||||
This is modeled after shared_ptr's static_pointer_cast. Just as wxCFRef is
|
||||
parameterized on a pointer to an opaque type so is this class. Note that
|
||||
this differs from shared_ptr which is parameterized on the pointee type.
|
||||
|
||||
FIXME: Anybody got a better name?
|
||||
*/
|
||||
template <class refType, class otherRefType>
|
||||
inline wxCFWeakRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &otherRef);
|
||||
|
||||
template <class refType, class otherRefType>
|
||||
inline wxCFWeakRef<refType> static_cfref_cast(const wxCFRef<otherRefType> &otherRef)
|
||||
{
|
||||
return wxCFWeakRef<refType>(static_cast<refType>(otherRef.get()));
|
||||
}
|
||||
|
||||
/*! @function CFRelease
|
||||
@abstract Overloads CFRelease so that the user is warned of bad behavior.
|
||||
@discussion It is rarely appropriate to retain or release a wxCFRef. If one absolutely
|
||||
must do it he can explicitly get() the raw pointer
|
||||
Normally, this function is unimplemented resulting in a linker error if used.
|
||||
*/
|
||||
template <class T>
|
||||
inline void CFRelease(const wxCFRef<T*> & cfref) DEPRECATED_ATTRIBUTE;
|
||||
|
||||
/*! @function CFRetain
|
||||
@abstract Overloads CFRetain so that the user is warned of bad behavior.
|
||||
@discussion It is rarely appropriate to retain or release a wxCFRef. If one absolutely
|
||||
must do it he can explicitly get() the raw pointer
|
||||
Normally, this function is unimplemented resulting in a linker error if used.
|
||||
*/
|
||||
template <class T>
|
||||
inline void CFRetain(const wxCFRef<T*>& cfref) DEPRECATED_ATTRIBUTE;
|
||||
|
||||
// Change the 0 to a 1 if you want the functions to work (no link errors)
|
||||
// Neither function will cause retain/release side-effects if implemented.
|
||||
#if 0
|
||||
template <class T>
|
||||
void CFRelease(const wxCFRef<T*> & cfref)
|
||||
{
|
||||
CFRelease(cfref.get());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void CFRetain(const wxCFRef<T*> & cfref)
|
||||
{
|
||||
CFRetain(cfref.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //ndef _WX_MAC_COREFOUNDATION_CFREF_H__
|
||||
|
101
Externals/wxWidgets3/include/wx/osx/core/cfstring.h
vendored
Normal file
101
Externals/wxWidgets3/include/wx/osx/core/cfstring.h
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/cfstring.h
|
||||
// Purpose: wxCFStringRef and other string functions
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 2004-10-29 (from code in wx/mac/carbon/private.h)
|
||||
// RCS-ID: $Id: cfstring.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
// Usage: Darwin (base library)
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_CFSTRINGHOLDER_H__
|
||||
#define __WX_CFSTRINGHOLDER_H__
|
||||
|
||||
#include <CoreFoundation/CFString.h>
|
||||
|
||||
#include "wx/dlimpexp.h"
|
||||
#include "wx/fontenc.h"
|
||||
#include "wx/osx/core/cfref.h"
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#define kCFStringEncodingUTF32Native kCFStringEncodingUTF32BE
|
||||
#else
|
||||
#define kCFStringEncodingUTF32Native kCFStringEncodingUTF32LE
|
||||
#endif
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxString;
|
||||
|
||||
WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( wxString *data ) ;
|
||||
WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( wxString *data ) ;
|
||||
|
||||
WXDLLIMPEXP_BASE void wxMacConvertNewlines13To10( char * data ) ;
|
||||
WXDLLIMPEXP_BASE void wxMacConvertNewlines10To13( char * data ) ;
|
||||
|
||||
WXDLLIMPEXP_BASE wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding) ;
|
||||
WXDLLIMPEXP_BASE wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) ;
|
||||
WXDLLIMPEXP_BASE void wxMacWakeUp() ;
|
||||
|
||||
class WXDLLIMPEXP_BASE wxCFStringRef : public wxCFRef< CFStringRef >
|
||||
{
|
||||
public:
|
||||
wxCFStringRef()
|
||||
{
|
||||
}
|
||||
|
||||
wxCFStringRef(const wxString &str,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT) ;
|
||||
|
||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||
wxCFStringRef(NSString* ref)
|
||||
: wxCFRef< CFStringRef >((CFStringRef) ref)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
wxCFStringRef(CFStringRef ref)
|
||||
: wxCFRef< CFStringRef >(ref)
|
||||
{
|
||||
}
|
||||
|
||||
wxCFStringRef(const wxCFStringRef& otherRef )
|
||||
: wxCFRef< CFStringRef >(otherRef)
|
||||
{
|
||||
}
|
||||
|
||||
~wxCFStringRef()
|
||||
{
|
||||
}
|
||||
|
||||
wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) const;
|
||||
|
||||
static wxString AsString( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||
static wxString AsString( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||
NSString* AsNSString() const { return (NSString*)(CFStringRef) *this; }
|
||||
#endif
|
||||
private:
|
||||
} ;
|
||||
|
||||
// corresponding class for holding UniChars (native unicode characters)
|
||||
|
||||
class WXDLLIMPEXP_BASE wxMacUniCharBuffer
|
||||
{
|
||||
public :
|
||||
wxMacUniCharBuffer( const wxString &str ) ;
|
||||
|
||||
~wxMacUniCharBuffer() ;
|
||||
|
||||
UniCharPtr GetBuffer() ;
|
||||
|
||||
UniCharCount GetChars() ;
|
||||
|
||||
private :
|
||||
UniCharPtr m_ubuf ;
|
||||
UniCharCount m_chars ;
|
||||
};
|
||||
#endif //__WXCFSTRINGHOLDER_H__
|
88
Externals/wxWidgets3/include/wx/osx/core/colour.h
vendored
Normal file
88
Externals/wxWidgets3/include/wx/osx/core/colour.h
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/colour.h
|
||||
// Purpose: wxColour class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: colour.h 67068 2011-02-27 12:48:42Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLOUR_H_
|
||||
#define _WX_COLOUR_H_
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
#include "wx/osx/core/cfref.h"
|
||||
|
||||
struct RGBColor;
|
||||
|
||||
// Colour
|
||||
class WXDLLIMPEXP_CORE wxColour: public wxColourBase
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
// ------------
|
||||
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
|
||||
|
||||
// default copy ctor and dtor are ok
|
||||
|
||||
// accessors
|
||||
virtual bool IsOk() const { return m_cgColour != NULL; }
|
||||
|
||||
virtual WXDLLIMPEXP_INLINE_CORE ChannelType Red() const { return m_red; }
|
||||
virtual WXDLLIMPEXP_INLINE_CORE ChannelType Green() const { return m_green; }
|
||||
virtual WXDLLIMPEXP_INLINE_CORE ChannelType Blue() const { return m_blue; }
|
||||
virtual WXDLLIMPEXP_INLINE_CORE ChannelType Alpha() const { return m_alpha; }
|
||||
|
||||
// comparison
|
||||
bool operator == (const wxColour& colour) const;
|
||||
|
||||
bool operator != (const wxColour& colour) const { return !(*this == colour); }
|
||||
|
||||
CGColorRef GetPixel() const { return m_cgColour; };
|
||||
|
||||
CGColorRef GetCGColor() const { return m_cgColour; };
|
||||
CGColorRef CreateCGColor() const { return wxCFRetain( (CGColorRef)m_cgColour ); };
|
||||
|
||||
#if wxOSX_USE_COCOA_OR_CARBON
|
||||
void GetRGBColor( RGBColor *col ) const;
|
||||
#endif
|
||||
|
||||
// Mac-specific ctor and assignment operator from the native colour
|
||||
// assumes ownership of CGColorRef
|
||||
wxColour( CGColorRef col );
|
||||
#if wxOSX_USE_COCOA_OR_CARBON
|
||||
wxColour(const RGBColor& col);
|
||||
wxColour& operator=(const RGBColor& col);
|
||||
#endif
|
||||
#if wxOSX_USE_COCOA
|
||||
wxColour(WX_NSColor color);
|
||||
WX_NSColor OSXGetNSColor() const;
|
||||
#endif
|
||||
wxColour& operator=(CGColorRef col);
|
||||
wxColour& operator=(const wxColour& col);
|
||||
|
||||
protected :
|
||||
virtual void
|
||||
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a);
|
||||
#if wxOSX_USE_COCOA_OR_CARBON
|
||||
void InitRGBColor( const RGBColor& col );
|
||||
#endif
|
||||
void InitCGColorRef( CGColorRef col );
|
||||
void InitFromComponents(const CGFloat* components, size_t numComponents );
|
||||
private:
|
||||
wxCFRef<CGColorRef> m_cgColour;
|
||||
|
||||
ChannelType m_red;
|
||||
ChannelType m_blue;
|
||||
ChannelType m_green;
|
||||
ChannelType m_alpha;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxColour)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_COLOUR_H_
|
114
Externals/wxWidgets3/include/wx/osx/core/dataview.h
vendored
Normal file
114
Externals/wxWidgets3/include/wx/osx/core/dataview.h
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/dataview.h
|
||||
// Purpose: wxDataViewCtrl native implementation header for OSX
|
||||
// Author:
|
||||
// Id: $Id: dataview.h 57374 2009-01-27
|
||||
// Copyright: (c) 2009
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DATAVIEWCTRL_CORE_H_
|
||||
#define _WX_DATAVIEWCTRL_CORE_H_
|
||||
|
||||
#include "wx/dataview.h"
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
typedef wxMacControl wxWidgetImplType;
|
||||
#else
|
||||
typedef wxWidgetImpl wxWidgetImplType;
|
||||
#endif
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// Helper functions for dataview implementation on OSX
|
||||
// ---------------------------------------------------------
|
||||
wxWidgetImplType* CreateDataView(wxWindowMac* wxpeer, wxWindowMac* parent, wxWindowID id,
|
||||
wxPoint const& pos, wxSize const& size,
|
||||
long style, long extraStyle);
|
||||
wxString ConcatenateDataViewItemValues(wxDataViewCtrl const* dataViewCtrlPtr, wxDataViewItem const& dataViewItem); // concatenates all data of the visible columns of the passed control
|
||||
// and item TAB separated into a string and returns it
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewWidgetImpl
|
||||
// Common interface of the native dataview implementation
|
||||
// for the carbon and cocoa environment.
|
||||
// ATTENTION
|
||||
// All methods assume that the passed column pointers are
|
||||
// valid (unless a NULL pointer is explicitely allowed
|
||||
// to be passed)!
|
||||
// ATTENTION
|
||||
// ---------------------------------------------------------
|
||||
class WXDLLIMPEXP_CORE wxDataViewWidgetImpl
|
||||
{
|
||||
public:
|
||||
//
|
||||
// constructors / destructor
|
||||
//
|
||||
virtual ~wxDataViewWidgetImpl(void)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// column related methods
|
||||
//
|
||||
virtual bool ClearColumns (void) = 0; // deletes all columns in the native control
|
||||
virtual bool DeleteColumn (wxDataViewColumn* columnPtr) = 0; // deletes the column in the native control
|
||||
virtual void DoSetExpanderColumn(wxDataViewColumn const* columnPtr) = 0; // sets the disclosure column in the native control
|
||||
virtual wxDataViewColumn* GetColumn (unsigned int pos) const = 0; // returns the column belonging to 'pos' in the native control
|
||||
virtual int GetColumnPosition (wxDataViewColumn const* columnPtr) const = 0; // returns the position of the passed column in the native control
|
||||
virtual bool InsertColumn (unsigned int pos, wxDataViewColumn* columnPtr) = 0; // inserts a column at pos in the native control;
|
||||
// the method can assume that the column's owner is already set
|
||||
virtual void FitColumnWidthToContent(unsigned int pos) = 0; // resizes column to fit its content
|
||||
|
||||
//
|
||||
// item related methods
|
||||
//
|
||||
virtual bool Add (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // adds an item to the native control
|
||||
virtual bool Add (wxDataViewItem const& parent, wxDataViewItemArray const& itesm) = 0; // adds a items to the native control
|
||||
virtual void Collapse (wxDataViewItem const& item) = 0; // collapses the passed item in the native control
|
||||
virtual void EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr) = 0; // ensures that the passed item's value in the passed column is visible (column pointer can be NULL)
|
||||
virtual void Expand (wxDataViewItem const& item) = 0; // expands the passed item in the native control
|
||||
virtual unsigned int GetCount (void) const = 0; // returns the number of items in the native control
|
||||
virtual wxRect GetRectangle (wxDataViewItem const& item, wxDataViewColumn const* columnPtr) = 0; // returns the rectangle that is used by the passed item and column in the native control
|
||||
virtual bool IsExpanded (wxDataViewItem const& item) const = 0; // checks if the passed item is expanded in the native control
|
||||
virtual bool Reload (void) = 0; // clears the native control and reloads all data
|
||||
virtual bool Remove (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // removes an item from the native control
|
||||
virtual bool Remove (wxDataViewItem const& parent, wxDataViewItemArray const& item) = 0; // removes items from the native control
|
||||
virtual bool Update (wxDataViewColumn const* columnPtr) = 0; // updates the items in the passed column of the native control
|
||||
virtual bool Update (wxDataViewItem const& parent, wxDataViewItem const& item) = 0; // updates the passed item in the native control
|
||||
virtual bool Update (wxDataViewItem const& parent, wxDataViewItemArray const& items) = 0; // updates the passed items in the native control
|
||||
|
||||
//
|
||||
// model related methods
|
||||
//
|
||||
virtual bool AssociateModel(wxDataViewModel* model) = 0; // informs the native control that a model is present
|
||||
|
||||
//
|
||||
// selection related methods
|
||||
//
|
||||
virtual wxDataViewItem GetCurrentItem() const = 0;
|
||||
virtual void SetCurrentItem(const wxDataViewItem& item) = 0;
|
||||
|
||||
virtual int GetSelections(wxDataViewItemArray& sel) const = 0; // returns all selected items in the native control
|
||||
virtual bool IsSelected (wxDataViewItem const& item) const = 0; // checks if the passed item is selected in the native control
|
||||
virtual void Select (wxDataViewItem const& item) = 0; // selects the passed item in the native control
|
||||
virtual void SelectAll (void) = 0; // selects all items in the native control
|
||||
virtual void Unselect (wxDataViewItem const& item) = 0; // unselects the passed item in the native control
|
||||
virtual void UnselectAll (void) = 0; // unselects all items in the native control
|
||||
|
||||
//
|
||||
// sorting related methods
|
||||
//
|
||||
virtual wxDataViewColumn* GetSortingColumn (void) const = 0; // returns the column that is primarily responsible for sorting in the native control
|
||||
virtual void Resort (void) = 0; // asks the native control to start a resorting process
|
||||
|
||||
//
|
||||
// other methods
|
||||
//
|
||||
virtual void DoSetIndent (int indent) = 0; // sets the indention in the native control
|
||||
virtual void HitTest (wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const = 0; // return the item and column pointer that contains with the passed point
|
||||
virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height) = 0; // sets the height of the row containg the passed item in the native control
|
||||
virtual void OnSize (void) = 0; // updates the layout of the native control after a size event
|
||||
};
|
||||
|
||||
#endif // _WX_DATAVIEWCTRL_CORE_H_
|
116
Externals/wxWidgets3/include/wx/osx/core/hid.h
vendored
Normal file
116
Externals/wxWidgets3/include/wx/osx/core/hid.h
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/hid.h
|
||||
// Purpose: DARWIN HID layer for WX
|
||||
// Author: Ryan Norton
|
||||
// Modified by:
|
||||
// Created: 11/11/2003
|
||||
// RCS-ID: $Id: hid.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ===========================================================================
|
||||
// declarations
|
||||
// ===========================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// headers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifndef _WX_MACCARBONHID_H_
|
||||
#define _WX_MACCARBONHID_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
//Mac OSX only
|
||||
#ifdef __DARWIN__
|
||||
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOKit/IOCFPlugIn.h>
|
||||
#include <IOKit/hid/IOHIDLib.h>
|
||||
#include <IOKit/hid/IOHIDKeys.h>
|
||||
#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
|
||||
|
||||
//Darn apple - doesn't properly wrap their headers in extern "C"!
|
||||
//http://www.macosx.com/forums/archive/index.php/t-68069.html
|
||||
//Needed for codewarrior link error with mach_port_deallocate()
|
||||
extern "C" {
|
||||
#include <mach/mach_port.h>
|
||||
}
|
||||
|
||||
#include <mach/mach.h> //this actually includes mach_port.h (see above)
|
||||
|
||||
// ===========================================================================
|
||||
// definitions
|
||||
// ===========================================================================
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxHIDDevice
|
||||
//
|
||||
// A wrapper around OS X HID Manager procedures.
|
||||
// The tutorial "Working With HID Class Device Interfaces" Is
|
||||
// Quite good, as is the sample program associated with it
|
||||
// (Depite the author's protests!).
|
||||
// ---------------------------------------------------------------------------
|
||||
class WXDLLIMPEXP_CORE wxHIDDevice
|
||||
{
|
||||
public:
|
||||
wxHIDDevice() : m_ppDevice(NULL), m_ppQueue(NULL), m_pCookies(NULL) {}
|
||||
|
||||
bool Create (int nClass = -1, int nType = -1, int nDev = 1);
|
||||
|
||||
static size_t GetCount(int nClass = -1, int nType = -1);
|
||||
|
||||
void AddCookie(CFTypeRef Data, int i);
|
||||
void AddCookieInQueue(CFTypeRef Data, int i);
|
||||
void InitCookies(size_t dwSize, bool bQueue = false);
|
||||
|
||||
//Must be implemented by derived classes
|
||||
//builds the cookie array -
|
||||
//first call InitCookies to initialize the cookie
|
||||
//array, then AddCookie to add a cookie at a certain point in an array
|
||||
virtual void BuildCookies(CFArrayRef Array) = 0;
|
||||
|
||||
//checks to see whether the cookie at nIndex is active (element value != 0)
|
||||
bool IsActive(int nIndex);
|
||||
|
||||
//checks to see whether an element in the internal cookie array
|
||||
//exists
|
||||
bool HasElement(int nIndex);
|
||||
|
||||
//closes the device and cleans the queue and cookies
|
||||
virtual ~wxHIDDevice();
|
||||
|
||||
protected:
|
||||
IOHIDDeviceInterface** m_ppDevice; //this, essentially
|
||||
IOHIDQueueInterface** m_ppQueue; //queue (if we want one)
|
||||
IOHIDElementCookie* m_pCookies; //cookies
|
||||
|
||||
wxString m_szProductName; //product name
|
||||
int m_nProductId; //product id
|
||||
int m_nManufacturerId; //manufacturer id
|
||||
mach_port_t m_pPort; //mach port to use
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxHIDKeyboard
|
||||
//
|
||||
// Semi-simple implementation that opens a connection to the first
|
||||
// keyboard of the machine. Used in wxGetKeyState.
|
||||
// ---------------------------------------------------------------------------
|
||||
class WXDLLIMPEXP_CORE wxHIDKeyboard : public wxHIDDevice
|
||||
{
|
||||
public:
|
||||
static int GetCount();
|
||||
bool Create(int nDev = 1);
|
||||
void AddCookie(CFTypeRef Data, int i);
|
||||
virtual void BuildCookies(CFArrayRef Array);
|
||||
void DoBuildCookies(CFArrayRef Array);
|
||||
};
|
||||
|
||||
#endif //__DARWIN__
|
||||
|
||||
#endif
|
||||
// _WX_MACCARBONHID_H_
|
93
Externals/wxWidgets3/include/wx/osx/core/joystick.h
vendored
Normal file
93
Externals/wxWidgets3/include/wx/osx/core/joystick.h
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/joystick.h
|
||||
// Purpose: wxJoystick class
|
||||
// Author: Ryan Norton
|
||||
// Modified by:
|
||||
// Created: 2/13/2005
|
||||
// RCS-ID: $Id: joystick.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_JOYSTICK_H_
|
||||
#define _WX_JOYSTICK_H_
|
||||
|
||||
#include "wx/event.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxJoystickThread;
|
||||
|
||||
class WXDLLIMPEXP_ADV wxJoystick: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxJoystick)
|
||||
public:
|
||||
|
||||
wxJoystick(int joystick = wxJOYSTICK1);
|
||||
virtual ~wxJoystick();
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxPoint GetPosition() const;
|
||||
int GetPosition(unsigned axis) const;
|
||||
bool GetButtonState(unsigned button) const;
|
||||
int GetZPosition() const;
|
||||
int GetButtonState() const;
|
||||
int GetPOVPosition() const;
|
||||
int GetPOVCTSPosition() const;
|
||||
int GetRudderPosition() const;
|
||||
int GetUPosition() const;
|
||||
int GetVPosition() const;
|
||||
int GetMovementThreshold() const;
|
||||
void SetMovementThreshold(int threshold) ;
|
||||
|
||||
// Capabilities
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool IsOk() const; // Checks that the joystick is functioning
|
||||
static int GetNumberJoysticks() ;
|
||||
int GetManufacturerId() const ;
|
||||
int GetProductId() const ;
|
||||
wxString GetProductName() const ;
|
||||
int GetXMin() const;
|
||||
int GetYMin() const;
|
||||
int GetZMin() const;
|
||||
int GetXMax() const;
|
||||
int GetYMax() const;
|
||||
int GetZMax() const;
|
||||
int GetNumberButtons() const;
|
||||
int GetNumberAxes() const;
|
||||
int GetMaxButtons() const;
|
||||
int GetMaxAxes() const;
|
||||
int GetPollingMin() const;
|
||||
int GetPollingMax() const;
|
||||
int GetRudderMin() const;
|
||||
int GetRudderMax() const;
|
||||
int GetUMin() const;
|
||||
int GetUMax() const;
|
||||
int GetVMin() const;
|
||||
int GetVMax() const;
|
||||
|
||||
bool HasRudder() const;
|
||||
bool HasZ() const;
|
||||
bool HasU() const;
|
||||
bool HasV() const;
|
||||
bool HasPOV() const;
|
||||
bool HasPOV4Dir() const;
|
||||
bool HasPOVCTS() const;
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// pollingFreq = 0 means that movement events are sent when above the threshold.
|
||||
// If pollingFreq > 0, events are received every this many milliseconds.
|
||||
bool SetCapture(wxWindow* win, int pollingFreq = 0);
|
||||
bool ReleaseCapture();
|
||||
|
||||
protected:
|
||||
int m_joystick;
|
||||
wxJoystickThread* m_thread;
|
||||
class wxHIDJoystick* m_hid;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_JOYSTICK_H_
|
119
Externals/wxWidgets3/include/wx/osx/core/mimetype.h
vendored
Normal file
119
Externals/wxWidgets3/include/wx/osx/core/mimetype.h
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/mimetype.h
|
||||
// Purpose: Mac implementation for wx mime-related classes
|
||||
// Author: Neil Perkins
|
||||
// Modified by:
|
||||
// Created: 2010-05-15
|
||||
// RCS-ID: $Id: mimetype.h 67232 2011-03-18 15:10:15Z DS $
|
||||
// Copyright: (C) 2010 Neil Perkins
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MIMETYPE_IMPL_H
|
||||
#define _MIMETYPE_IMPL_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_MIMETYPE
|
||||
|
||||
#include "wx/mimetype.h"
|
||||
#include "wx/hashmap.h"
|
||||
#include "wx/iconloc.h"
|
||||
|
||||
|
||||
// This class implements mime type functionality for Mac OS X using UTIs and Launch Services
|
||||
// Currently only the GetFileTypeFromXXXX public functions have been implemented
|
||||
class WXDLLIMPEXP_BASE wxMimeTypesManagerImpl
|
||||
{
|
||||
public:
|
||||
|
||||
wxMimeTypesManagerImpl();
|
||||
virtual ~wxMimeTypesManagerImpl();
|
||||
|
||||
// These functions are not needed on Mac OS X and have no-op implementations
|
||||
void Initialize(int mailcapStyles = wxMAILCAP_STANDARD, const wxString& extraDir = wxEmptyString);
|
||||
void ClearData();
|
||||
|
||||
// Functions to look up types by ext, mime or UTI
|
||||
wxFileType *GetFileTypeFromExtension(const wxString& ext);
|
||||
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
|
||||
wxFileType *GetFileTypeFromUti(const wxString& uti);
|
||||
|
||||
// These functions are only stubs on Mac OS X
|
||||
size_t EnumAllFileTypes(wxArrayString& mimetypes);
|
||||
wxFileType *Associate(const wxFileTypeInfo& ftInfo);
|
||||
bool Unassociate(wxFileType *ft);
|
||||
|
||||
private:
|
||||
|
||||
// The work of querying the OS for type data is done in these two functions
|
||||
void LoadTypeDataForUti(const wxString& uti);
|
||||
void LoadDisplayDataForUti(const wxString& uti);
|
||||
|
||||
// These functions are pass-throughs from wxFileTypeImpl
|
||||
bool GetExtensions(const wxString& uti, wxArrayString& extensions);
|
||||
bool GetMimeType(const wxString& uti, wxString *mimeType);
|
||||
bool GetMimeTypes(const wxString& uti, wxArrayString& mimeTypes);
|
||||
bool GetIcon(const wxString& uti, wxIconLocation *iconLoc);
|
||||
bool GetDescription(const wxString& uti, wxString *desc);
|
||||
|
||||
// Structure to represent file types
|
||||
typedef struct FileTypeData
|
||||
{
|
||||
wxArrayString extensions;
|
||||
wxArrayString mimeTypes;
|
||||
wxIconLocation iconLoc;
|
||||
wxString description;
|
||||
}
|
||||
FileTypeInfo;
|
||||
|
||||
// Map types
|
||||
WX_DECLARE_STRING_HASH_MAP( wxString, TagMap );
|
||||
WX_DECLARE_STRING_HASH_MAP( FileTypeData, UtiMap );
|
||||
|
||||
// Data store
|
||||
TagMap m_extMap;
|
||||
TagMap m_mimeMap;
|
||||
UtiMap m_utiMap;
|
||||
|
||||
friend class wxFileTypeImpl;
|
||||
};
|
||||
|
||||
|
||||
// This class provides the interface between wxFileType and wxMimeTypesManagerImple for Mac OS X
|
||||
// Currently only extension, mimetype, description and icon information is available
|
||||
// All other methods have no-op implementation
|
||||
class WXDLLIMPEXP_BASE wxFileTypeImpl
|
||||
{
|
||||
public:
|
||||
|
||||
wxFileTypeImpl();
|
||||
virtual ~wxFileTypeImpl();
|
||||
|
||||
bool GetExtensions(wxArrayString& extensions) const ;
|
||||
bool GetMimeType(wxString *mimeType) const ;
|
||||
bool GetMimeTypes(wxArrayString& mimeTypes) const ;
|
||||
bool GetIcon(wxIconLocation *iconLoc) const ;
|
||||
bool GetDescription(wxString *desc) const ;
|
||||
|
||||
// These functions are only stubs on Mac OS X
|
||||
bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const;
|
||||
bool GetPrintCommand(wxString *printCmd, const wxFileType::MessageParameters& params) const;
|
||||
size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands, const wxFileType::MessageParameters& params) const;
|
||||
bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE);
|
||||
bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0);
|
||||
bool Unassociate(wxFileType *ft);
|
||||
|
||||
private:
|
||||
|
||||
// All that is needed to query type info - UTI and pointer to the manager
|
||||
wxString m_uti;
|
||||
wxMimeTypesManagerImpl* m_manager;
|
||||
|
||||
friend class wxMimeTypesManagerImpl;
|
||||
};
|
||||
|
||||
#endif // wxUSE_MIMETYPE
|
||||
#endif //_MIMETYPE_IMPL_H
|
||||
|
||||
|
895
Externals/wxWidgets3/include/wx/osx/core/private.h
vendored
Normal file
895
Externals/wxWidgets3/include/wx/osx/core/private.h
vendored
Normal file
@ -0,0 +1,895 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/private.h
|
||||
// Purpose: Private declarations: as this header is only included by
|
||||
// wxWidgets itself, it may contain identifiers which don't start
|
||||
// with "wx".
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: private.h 67233 2011-03-18 15:45:51Z SC $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PRIVATE_CORE_H_
|
||||
#define _WX_PRIVATE_CORE_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#include "wx/osx/core/cfstring.h"
|
||||
#include "wx/osx/core/cfdataref.h"
|
||||
|
||||
// Define helper macros allowing to insert small snippets of code to be
|
||||
// compiled for high enough OS X version only: this shouldn't be abused for
|
||||
// anything big but it's handy for e.g. specifying OS X 10.6-only protocols in
|
||||
// the Objective C classes declarations when they're not supported under the
|
||||
// previous versions
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||
#define wxOSX_10_6_AND_LATER(x) x
|
||||
#else
|
||||
#define wxOSX_10_6_AND_LATER(x)
|
||||
#endif
|
||||
|
||||
#if !wxUSE_GUI || wxOSX_USE_COCOA_OR_CARBON
|
||||
|
||||
// Carbon functions are currently still used in wxOSX/Cocoa too (including
|
||||
// wxBase part of it).
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
WXDLLIMPEXP_BASE long UMAGetSystemVersion() ;
|
||||
|
||||
void WXDLLIMPEXP_CORE wxMacStringToPascal( const wxString&from , unsigned char * to );
|
||||
wxString WXDLLIMPEXP_CORE wxMacMakeStringFromPascal( const unsigned char * from );
|
||||
|
||||
WXDLLIMPEXP_BASE wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent = NULL );
|
||||
WXDLLIMPEXP_BASE OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef );
|
||||
WXDLLIMPEXP_BASE wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname );
|
||||
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
#if wxOSX_USE_IPHONE
|
||||
#include <CoreGraphics/CoreGraphics.h>
|
||||
#else
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#endif
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/window.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMacCGContextStateSaver
|
||||
{
|
||||
wxDECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver);
|
||||
|
||||
public:
|
||||
wxMacCGContextStateSaver( CGContextRef cg )
|
||||
{
|
||||
m_cg = cg;
|
||||
CGContextSaveGState( cg );
|
||||
}
|
||||
~wxMacCGContextStateSaver()
|
||||
{
|
||||
CGContextRestoreGState( m_cg );
|
||||
}
|
||||
private:
|
||||
CGContextRef m_cg;
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDeferredObjectDeleter : public wxObject
|
||||
{
|
||||
public :
|
||||
wxDeferredObjectDeleter( wxObject* obj ) : m_obj(obj)
|
||||
{
|
||||
}
|
||||
virtual ~wxDeferredObjectDeleter()
|
||||
{
|
||||
delete m_obj;
|
||||
}
|
||||
protected :
|
||||
wxObject* m_obj ;
|
||||
} ;
|
||||
|
||||
// Quartz
|
||||
|
||||
WXDLLIMPEXP_CORE CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap );
|
||||
|
||||
WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithCFData( CFDataRef data );
|
||||
WXDLLIMPEXP_CORE CGDataConsumerRef wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data );
|
||||
WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf );
|
||||
|
||||
CGColorSpaceRef WXDLLIMPEXP_CORE wxMacGetGenericRGBColorSpace(void);
|
||||
|
||||
class wxWindowMac;
|
||||
// to
|
||||
extern wxWindow* g_MacLastWindow;
|
||||
class wxNonOwnedWindow;
|
||||
|
||||
// temporary typedef so that no additional casts are necessary within carbon code at the moment
|
||||
|
||||
class wxMacControl;
|
||||
class wxWidgetImpl;
|
||||
class wxComboBox;
|
||||
class wxNotebook;
|
||||
class wxTextCtrl;
|
||||
class wxSearchCtrl;
|
||||
|
||||
WXDLLIMPEXP_CORE wxWindowMac * wxFindWindowFromWXWidget(WXWidget inControl );
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
typedef wxMacControl wxWidgetImplType;
|
||||
#else
|
||||
typedef wxWidgetImpl wxWidgetImplType;
|
||||
#endif
|
||||
|
||||
#if wxUSE_MENUS
|
||||
class wxMenuItemImpl : public wxObject
|
||||
{
|
||||
public :
|
||||
wxMenuItemImpl( wxMenuItem* peer ) : m_peer(peer)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~wxMenuItemImpl() ;
|
||||
virtual void SetBitmap( const wxBitmap& bitmap ) = 0;
|
||||
virtual void Enable( bool enable ) = 0;
|
||||
virtual void Check( bool check ) = 0;
|
||||
virtual void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) = 0;
|
||||
virtual void Hide( bool hide = true ) = 0;
|
||||
|
||||
virtual void * GetHMenuItem() = 0;
|
||||
|
||||
wxMenuItem* GetWXPeer() { return m_peer ; }
|
||||
|
||||
static wxMenuItemImpl* Create( wxMenuItem* peer, wxMenu *pParentMenu,
|
||||
int id,
|
||||
const wxString& text,
|
||||
wxAcceleratorEntry *entry,
|
||||
const wxString& strHelp,
|
||||
wxItemKind kind,
|
||||
wxMenu *pSubMenu );
|
||||
|
||||
// handle OS specific menu items if they weren't handled during normal processing
|
||||
virtual bool DoDefault() { return false; }
|
||||
protected :
|
||||
wxMenuItem* m_peer;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxMenuItemImpl)
|
||||
} ;
|
||||
|
||||
class wxMenuImpl : public wxObject
|
||||
{
|
||||
public :
|
||||
wxMenuImpl( wxMenu* peer ) : m_peer(peer)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~wxMenuImpl() ;
|
||||
virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) = 0;
|
||||
virtual void Remove( wxMenuItem *pItem ) = 0;
|
||||
|
||||
virtual void MakeRoot() = 0;
|
||||
|
||||
virtual void SetTitle( const wxString& text ) = 0;
|
||||
|
||||
virtual WXHMENU GetHMenu() = 0;
|
||||
|
||||
wxMenu* GetWXPeer() { return m_peer ; }
|
||||
|
||||
virtual void PopUp( wxWindow *win, int x, int y ) = 0;
|
||||
|
||||
static wxMenuImpl* Create( wxMenu* peer, const wxString& title );
|
||||
static wxMenuImpl* CreateRootMenu( wxMenu* peer );
|
||||
protected :
|
||||
wxMenu* m_peer;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxMenuItemImpl)
|
||||
} ;
|
||||
#endif
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWidgetImpl : public wxObject
|
||||
{
|
||||
public :
|
||||
wxWidgetImpl( wxWindowMac* peer , bool isRootControl = false, bool isUserPane = false );
|
||||
wxWidgetImpl();
|
||||
virtual ~wxWidgetImpl();
|
||||
|
||||
void Init();
|
||||
|
||||
bool IsRootControl() const { return m_isRootControl; }
|
||||
|
||||
bool IsUserPane() const { return m_isUserPane; }
|
||||
|
||||
wxWindowMac* GetWXPeer() const { return m_wxPeer; }
|
||||
|
||||
bool IsOk() const { return GetWXWidget() != NULL; }
|
||||
|
||||
// not only the control itself, but also all its parents must be visible
|
||||
// in order for this function to return true
|
||||
virtual bool IsVisible() const = 0;
|
||||
// set the visibility of this widget (maybe latent)
|
||||
virtual void SetVisibility( bool visible ) = 0;
|
||||
|
||||
virtual bool ShowWithEffect(bool WXUNUSED(show),
|
||||
wxShowEffect WXUNUSED(effect),
|
||||
unsigned WXUNUSED(timeout))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void Raise() = 0;
|
||||
|
||||
virtual void Lower() = 0;
|
||||
|
||||
virtual void ScrollRect( const wxRect *rect, int dx, int dy ) = 0;
|
||||
|
||||
virtual WXWidget GetWXWidget() const = 0;
|
||||
|
||||
virtual void SetBackgroundColour( const wxColour& col ) = 0;
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style) = 0;
|
||||
|
||||
// all coordinates in native parent widget relative coordinates
|
||||
virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0;
|
||||
virtual void Move(int x, int y, int width, int height) = 0;
|
||||
virtual void GetPosition( int &x, int &y ) const = 0;
|
||||
virtual void GetSize( int &width, int &height ) const = 0;
|
||||
virtual void SetControlSize( wxWindowVariant variant ) = 0;
|
||||
virtual float GetContentScaleFactor() const
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
// the native coordinates may have an 'aura' for shadows etc, if this is the case the layout
|
||||
// inset indicates on which insets the real control is drawn
|
||||
virtual void GetLayoutInset(int &left , int &top , int &right, int &bottom) const
|
||||
{
|
||||
left = top = right = bottom = 0;
|
||||
}
|
||||
|
||||
// native view coordinates are topleft to bottom right (flipped regarding CoreGraphics origin)
|
||||
virtual bool IsFlipped() const { return true; }
|
||||
|
||||
virtual void SetNeedsDisplay( const wxRect* where = NULL ) = 0;
|
||||
virtual bool GetNeedsDisplay() const = 0;
|
||||
|
||||
virtual bool NeedsFocusRect() const;
|
||||
virtual void SetNeedsFocusRect( bool needs );
|
||||
|
||||
virtual bool NeedsFrame() const;
|
||||
virtual void SetNeedsFrame( bool needs );
|
||||
|
||||
virtual bool CanFocus() const = 0;
|
||||
// return true if successful
|
||||
virtual bool SetFocus() = 0;
|
||||
virtual bool HasFocus() const = 0;
|
||||
|
||||
virtual void RemoveFromParent() = 0;
|
||||
virtual void Embed( wxWidgetImpl *parent ) = 0;
|
||||
|
||||
virtual void SetDefaultButton( bool isDefault ) = 0;
|
||||
virtual void PerformClick() = 0;
|
||||
virtual void SetLabel( const wxString& title, wxFontEncoding encoding ) = 0;
|
||||
#if wxUSE_MARKUP && wxOSX_USE_COCOA
|
||||
virtual void SetLabelMarkup( const wxString& WXUNUSED(markup) ) { }
|
||||
#endif
|
||||
|
||||
virtual void SetCursor( const wxCursor & cursor ) = 0;
|
||||
virtual void CaptureMouse() = 0;
|
||||
virtual void ReleaseMouse() = 0;
|
||||
|
||||
virtual wxInt32 GetValue() const = 0;
|
||||
virtual void SetValue( wxInt32 v ) = 0;
|
||||
virtual wxBitmap GetBitmap() const = 0;
|
||||
virtual void SetBitmap( const wxBitmap& bitmap ) = 0;
|
||||
virtual void SetBitmapPosition( wxDirection dir ) = 0;
|
||||
virtual void SetupTabs( const wxNotebook ¬ebook ) =0;
|
||||
virtual void GetBestRect( wxRect *r ) const = 0;
|
||||
virtual bool IsEnabled() const = 0;
|
||||
virtual void Enable( bool enable ) = 0;
|
||||
virtual void SetMinimum( wxInt32 v ) = 0;
|
||||
virtual void SetMaximum( wxInt32 v ) = 0;
|
||||
virtual wxInt32 GetMinimum() const = 0;
|
||||
virtual wxInt32 GetMaximum() const = 0;
|
||||
virtual void PulseGauge() = 0;
|
||||
virtual void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) = 0;
|
||||
|
||||
virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ) = 0;
|
||||
|
||||
virtual void SetToolTip(wxToolTip* WXUNUSED(tooltip)) { }
|
||||
|
||||
// is the clicked event sent AFTER the state already changed, so no additional
|
||||
// state changing logic is required from the outside
|
||||
virtual bool ButtonClickDidStateChange() = 0;
|
||||
|
||||
virtual void InstallEventHandler( WXWidget control = NULL ) = 0;
|
||||
|
||||
// Mechanism used to keep track of whether a change should send an event
|
||||
// Do SendEvents(false) when starting actions that would trigger programmatic events
|
||||
// and SendEvents(true) at the end of the block.
|
||||
virtual void SendEvents(bool shouldSendEvents) { m_shouldSendEvents = shouldSendEvents; }
|
||||
virtual bool ShouldSendEvents() { return m_shouldSendEvents; }
|
||||
|
||||
// static methods for associating native controls and their implementations
|
||||
|
||||
static wxWidgetImpl*
|
||||
FindFromWXWidget(WXWidget control);
|
||||
|
||||
static void RemoveAssociations( wxWidgetImpl* impl);
|
||||
|
||||
static void Associate( WXWidget control, wxWidgetImpl *impl );
|
||||
|
||||
static WXWidget FindFocus();
|
||||
|
||||
// static creation methods, must be implemented by all toolkits
|
||||
|
||||
static wxWidgetImplType* CreateUserPane( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle) ;
|
||||
static wxWidgetImplType* CreateContentView( wxNonOwnedWindow* now ) ;
|
||||
|
||||
static wxWidgetImplType* CreateButton( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle) ;
|
||||
|
||||
static wxWidgetImplType* CreateDisclosureTriangle( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle) ;
|
||||
|
||||
static wxWidgetImplType* CreateStaticLine( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle) ;
|
||||
|
||||
static wxWidgetImplType* CreateGroupBox( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle) ;
|
||||
|
||||
static wxWidgetImplType* CreateStaticText( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle) ;
|
||||
|
||||
static wxWidgetImplType* CreateTextControl( wxTextCtrl* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& content,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle) ;
|
||||
|
||||
static wxWidgetImplType* CreateSearchControl( wxSearchCtrl* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& content,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle) ;
|
||||
|
||||
static wxWidgetImplType* CreateCheckBox( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateRadioButton( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateToggleButton( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateBitmapToggleButton( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& bitmap,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateBitmapButton( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& bitmap,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateTabView( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateGauge( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
wxInt32 value,
|
||||
wxInt32 minimum,
|
||||
wxInt32 maximum,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateSlider( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
wxInt32 value,
|
||||
wxInt32 minimum,
|
||||
wxInt32 maximum,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateSpinButton( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
wxInt32 value,
|
||||
wxInt32 minimum,
|
||||
wxInt32 maximum,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateScrollBar( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateChoice( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
wxMenu* menu,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
static wxWidgetImplType* CreateListBox( wxWindowMac* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
static wxWidgetImplType* CreateComboBox( wxComboBox* wxpeer,
|
||||
wxWindowMac* parent,
|
||||
wxWindowID id,
|
||||
wxMenu* menu,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
long extraStyle);
|
||||
#endif
|
||||
|
||||
// converts from Toplevel-Content relative to local
|
||||
static void Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to );
|
||||
protected :
|
||||
bool m_isRootControl;
|
||||
bool m_isUserPane;
|
||||
wxWindowMac* m_wxPeer;
|
||||
bool m_needsFocusRect;
|
||||
bool m_needsFrame;
|
||||
bool m_shouldSendEvents;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxWidgetImpl)
|
||||
};
|
||||
|
||||
//
|
||||
// the interface to be implemented eg by a listbox
|
||||
//
|
||||
|
||||
class WXDLLIMPEXP_CORE wxListWidgetColumn
|
||||
{
|
||||
public :
|
||||
virtual ~wxListWidgetColumn() {}
|
||||
} ;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxListWidgetCellValue
|
||||
{
|
||||
public :
|
||||
wxListWidgetCellValue() {}
|
||||
virtual ~wxListWidgetCellValue() {}
|
||||
|
||||
virtual void Set( CFStringRef value ) = 0;
|
||||
virtual void Set( const wxString& value ) = 0;
|
||||
virtual void Set( int value ) = 0;
|
||||
virtual void Check( bool check );
|
||||
|
||||
virtual bool IsChecked() const;
|
||||
virtual int GetIntValue() const = 0;
|
||||
virtual wxString GetStringValue() const = 0;
|
||||
} ;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxListWidgetImpl
|
||||
{
|
||||
public:
|
||||
wxListWidgetImpl() {}
|
||||
virtual ~wxListWidgetImpl() { }
|
||||
|
||||
virtual wxListWidgetColumn* InsertTextColumn( unsigned pos, const wxString& title, bool editable = false,
|
||||
wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ;
|
||||
virtual wxListWidgetColumn* InsertCheckColumn( unsigned pos , const wxString& title, bool editable = false,
|
||||
wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ;
|
||||
|
||||
// add and remove
|
||||
|
||||
// TODO will be replaced
|
||||
virtual void ListDelete( unsigned int n ) = 0;
|
||||
virtual void ListInsert( unsigned int n ) = 0;
|
||||
virtual void ListClear() = 0;
|
||||
|
||||
// selecting
|
||||
|
||||
virtual void ListDeselectAll() = 0;
|
||||
virtual void ListSetSelection( unsigned int n, bool select, bool multi ) = 0;
|
||||
virtual int ListGetSelection() const = 0;
|
||||
virtual int ListGetSelections( wxArrayInt& aSelections ) const = 0;
|
||||
virtual bool ListIsSelected( unsigned int n ) const = 0;
|
||||
|
||||
// display
|
||||
|
||||
virtual void ListScrollTo( unsigned int n ) = 0;
|
||||
virtual void UpdateLine( unsigned int n, wxListWidgetColumn* col = NULL ) = 0;
|
||||
virtual void UpdateLineToEnd( unsigned int n) = 0;
|
||||
|
||||
// accessing content
|
||||
|
||||
virtual unsigned int ListGetCount() const = 0;
|
||||
|
||||
virtual int DoListHitTest( const wxPoint& inpoint ) const = 0;
|
||||
};
|
||||
|
||||
//
|
||||
// interface to be implemented by a textcontrol
|
||||
//
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxTextAttr;
|
||||
class WXDLLIMPEXP_FWD_CORE wxTextEntry;
|
||||
|
||||
// common interface for all implementations
|
||||
class WXDLLIMPEXP_CORE wxTextWidgetImpl
|
||||
|
||||
{
|
||||
public :
|
||||
// Any widgets implementing this interface must be associated with a
|
||||
// wxTextEntry so instead of requiring the derived classes to implement
|
||||
// another (pure) virtual function, just take the pointer to this entry in
|
||||
// our ctor and implement GetTextEntry() ourselves.
|
||||
wxTextWidgetImpl(wxTextEntry *entry) : m_entry(entry) {}
|
||||
|
||||
virtual ~wxTextWidgetImpl() {}
|
||||
|
||||
wxTextEntry *GetTextEntry() const { return m_entry; }
|
||||
|
||||
virtual bool CanFocus() const { return true; }
|
||||
|
||||
virtual wxString GetStringValue() const = 0 ;
|
||||
virtual void SetStringValue( const wxString &val ) = 0 ;
|
||||
virtual void SetSelection( long from, long to ) = 0 ;
|
||||
virtual void GetSelection( long* from, long* to ) const = 0 ;
|
||||
virtual void WriteText( const wxString& str ) = 0 ;
|
||||
|
||||
virtual bool GetStyle( long position, wxTextAttr& style);
|
||||
virtual void SetStyle( long start, long end, const wxTextAttr& style ) ;
|
||||
virtual void Copy() ;
|
||||
virtual void Cut() ;
|
||||
virtual void Paste() ;
|
||||
virtual bool CanPaste() const ;
|
||||
virtual void SetEditable( bool editable ) ;
|
||||
virtual long GetLastPosition() const ;
|
||||
virtual void Replace( long from, long to, const wxString &str ) ;
|
||||
virtual void Remove( long from, long to ) ;
|
||||
|
||||
|
||||
virtual bool HasOwnContextMenu() const
|
||||
{ return false ; }
|
||||
|
||||
virtual bool SetupCursor( const wxPoint& WXUNUSED(pt) )
|
||||
{ return false ; }
|
||||
|
||||
virtual void Clear() ;
|
||||
virtual bool CanUndo() const;
|
||||
virtual void Undo() ;
|
||||
virtual bool CanRedo() const;
|
||||
virtual void Redo() ;
|
||||
virtual int GetNumberOfLines() const ;
|
||||
virtual long XYToPosition(long x, long y) const;
|
||||
virtual bool PositionToXY(long pos, long *x, long *y) const ;
|
||||
virtual void ShowPosition(long WXUNUSED(pos)) ;
|
||||
virtual int GetLineLength(long lineNo) const ;
|
||||
virtual wxString GetLineText(long lineNo) const ;
|
||||
virtual void CheckSpelling(bool WXUNUSED(check)) { }
|
||||
|
||||
virtual wxSize GetBestSize() const { return wxDefaultSize; }
|
||||
|
||||
virtual bool SetHint(const wxString& WXUNUSED(hint)) { return false; }
|
||||
private:
|
||||
wxTextEntry * const m_entry;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxTextWidgetImpl);
|
||||
};
|
||||
|
||||
// common interface for all implementations
|
||||
class WXDLLIMPEXP_CORE wxComboWidgetImpl
|
||||
|
||||
{
|
||||
public :
|
||||
wxComboWidgetImpl() {}
|
||||
|
||||
virtual ~wxComboWidgetImpl() {}
|
||||
|
||||
virtual int GetSelectedItem() const { return -1; };
|
||||
virtual void SetSelectedItem(int WXUNUSED(item)) {};
|
||||
|
||||
virtual int GetNumberOfItems() const { return -1; };
|
||||
|
||||
virtual void InsertItem(int WXUNUSED(pos), const wxString& WXUNUSED(item)) {}
|
||||
|
||||
virtual void RemoveItem(int WXUNUSED(pos)) {}
|
||||
|
||||
virtual void Clear() {}
|
||||
|
||||
virtual wxString GetStringAtIndex(int WXUNUSED(pos)) const { return wxEmptyString; }
|
||||
|
||||
virtual int FindString(const wxString& WXUNUSED(text)) const { return -1; }
|
||||
};
|
||||
|
||||
//
|
||||
// common interface for buttons
|
||||
//
|
||||
|
||||
class wxButtonImpl
|
||||
{
|
||||
public :
|
||||
wxButtonImpl(){}
|
||||
virtual ~wxButtonImpl(){}
|
||||
|
||||
virtual void SetPressedBitmap( const wxBitmap& bitmap ) = 0;
|
||||
} ;
|
||||
|
||||
//
|
||||
// common interface for search controls
|
||||
//
|
||||
|
||||
class wxSearchWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxSearchWidgetImpl(){}
|
||||
virtual ~wxSearchWidgetImpl(){}
|
||||
|
||||
// search field options
|
||||
virtual void ShowSearchButton( bool show ) = 0;
|
||||
virtual bool IsSearchButtonVisible() const = 0;
|
||||
|
||||
virtual void ShowCancelButton( bool show ) = 0;
|
||||
virtual bool IsCancelButtonVisible() const = 0;
|
||||
|
||||
virtual void SetSearchMenu( wxMenu* menu ) = 0;
|
||||
|
||||
virtual void SetDescriptiveText(const wxString& text) = 0;
|
||||
} ;
|
||||
|
||||
//
|
||||
// toplevel window implementation class
|
||||
//
|
||||
|
||||
class wxNonOwnedWindowImpl : public wxObject
|
||||
{
|
||||
public :
|
||||
wxNonOwnedWindowImpl( wxNonOwnedWindow* nonownedwnd) : m_wxPeer(nonownedwnd)
|
||||
{
|
||||
}
|
||||
wxNonOwnedWindowImpl()
|
||||
{
|
||||
}
|
||||
virtual ~wxNonOwnedWindowImpl()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void WillBeDestroyed()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size,
|
||||
long style, long extraStyle, const wxString& name ) = 0;
|
||||
|
||||
|
||||
virtual WXWindow GetWXWindow() const = 0;
|
||||
|
||||
virtual void Raise()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void Lower()
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool Show(bool WXUNUSED(show))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool ShowWithEffect(bool show, wxShowEffect WXUNUSED(effect), unsigned WXUNUSED(timeout))
|
||||
{
|
||||
return Show(show);
|
||||
}
|
||||
|
||||
virtual void Update()
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool SetTransparent(wxByte WXUNUSED(alpha))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool SetBackgroundColour(const wxColour& WXUNUSED(col) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void SetExtraStyle( long WXUNUSED(exStyle) )
|
||||
{
|
||||
}
|
||||
|
||||
virtual void SetWindowStyleFlag( long WXUNUSED(style) )
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style))
|
||||
{
|
||||
return false ;
|
||||
}
|
||||
|
||||
virtual bool CanSetTransparent()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0;
|
||||
virtual void MoveWindow(int x, int y, int width, int height) = 0;
|
||||
virtual void GetPosition( int &x, int &y ) const = 0;
|
||||
virtual void GetSize( int &width, int &height ) const = 0;
|
||||
|
||||
virtual bool SetShape(const wxRegion& WXUNUSED(region))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) = 0;
|
||||
|
||||
virtual bool IsMaximized() const = 0;
|
||||
|
||||
virtual bool IsIconized() const= 0;
|
||||
|
||||
virtual void Iconize( bool iconize )= 0;
|
||||
|
||||
virtual void Maximize(bool maximize) = 0;
|
||||
|
||||
virtual bool IsFullScreen() const= 0;
|
||||
|
||||
virtual void ShowWithoutActivating() { Show(true); }
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style)= 0;
|
||||
|
||||
virtual void RequestUserAttention(int flags) = 0;
|
||||
|
||||
virtual void ScreenToWindow( int *x, int *y ) = 0;
|
||||
|
||||
virtual void WindowToScreen( int *x, int *y ) = 0;
|
||||
|
||||
virtual bool IsActive() = 0;
|
||||
|
||||
wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
|
||||
|
||||
static wxNonOwnedWindowImpl*
|
||||
FindFromWXWindow(WXWindow window);
|
||||
|
||||
static void RemoveAssociations( wxNonOwnedWindowImpl* impl);
|
||||
|
||||
static void Associate( WXWindow window, wxNonOwnedWindowImpl *impl );
|
||||
|
||||
// static creation methods, must be implemented by all toolkits
|
||||
|
||||
static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, WXWindow native) ;
|
||||
|
||||
static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size,
|
||||
long style, long extraStyle, const wxString& name ) ;
|
||||
|
||||
virtual void SetModified(bool WXUNUSED(modified)) { }
|
||||
virtual bool IsModified() const { return false; }
|
||||
|
||||
#if wxOSX_USE_IPHONE
|
||||
virtual CGFloat GetWindowLevel() const { return 0.0; }
|
||||
#else
|
||||
virtual CGWindowLevel GetWindowLevel() const { return kCGNormalWindowLevel; }
|
||||
#endif
|
||||
virtual void RestoreWindowLevel() {}
|
||||
protected :
|
||||
wxNonOwnedWindow* m_wxPeer;
|
||||
DECLARE_ABSTRACT_CLASS(wxNonOwnedWindowImpl)
|
||||
};
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// cocoa bridging utilities
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool wxMacInitCocoa();
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMacAutoreleasePool
|
||||
{
|
||||
public :
|
||||
wxMacAutoreleasePool();
|
||||
~wxMacAutoreleasePool();
|
||||
private :
|
||||
void* m_pool;
|
||||
};
|
||||
|
||||
// NSObject
|
||||
|
||||
void wxMacCocoaRelease( void* obj );
|
||||
void wxMacCocoaAutorelease( void* obj );
|
||||
void* wxMacCocoaRetain( void* obj );
|
||||
|
||||
|
||||
#endif
|
||||
// _WX_PRIVATE_CORE_H_
|
338
Externals/wxWidgets3/include/wx/osx/core/private/strconv_cf.h
vendored
Normal file
338
Externals/wxWidgets3/include/wx/osx/core/private/strconv_cf.h
vendored
Normal file
@ -0,0 +1,338 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/private/strconv_cf.h
|
||||
// Purpose: Unicode conversion classes
|
||||
// Author: David Elliott, Ryan Norton
|
||||
// Modified by:
|
||||
// Created: 2007-07-06
|
||||
// RCS-ID: $Id: strconv_cf.h 67215 2011-03-16 10:55:30Z SC $
|
||||
// Copyright: (c) 2004 Ryan Norton
|
||||
// (c) 2007 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "wx/strconv.h"
|
||||
|
||||
#include <CoreFoundation/CFString.h>
|
||||
#include <CoreFoundation/CFStringEncodingExt.h>
|
||||
|
||||
// ============================================================================
|
||||
// CoreFoundation conversion classes
|
||||
// ============================================================================
|
||||
|
||||
inline CFStringEncoding wxCFStringEncFromFontEnc(wxFontEncoding encoding)
|
||||
{
|
||||
CFStringEncoding enc = kCFStringEncodingInvalidId ;
|
||||
|
||||
switch (encoding)
|
||||
{
|
||||
case wxFONTENCODING_DEFAULT :
|
||||
enc = CFStringGetSystemEncoding();
|
||||
break ;
|
||||
|
||||
case wxFONTENCODING_ISO8859_1 :
|
||||
enc = kCFStringEncodingISOLatin1 ;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_2 :
|
||||
enc = kCFStringEncodingISOLatin2;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_3 :
|
||||
enc = kCFStringEncodingISOLatin3 ;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_4 :
|
||||
enc = kCFStringEncodingISOLatin4;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_5 :
|
||||
enc = kCFStringEncodingISOLatinCyrillic;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_6 :
|
||||
enc = kCFStringEncodingISOLatinArabic;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_7 :
|
||||
enc = kCFStringEncodingISOLatinGreek;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_8 :
|
||||
enc = kCFStringEncodingISOLatinHebrew;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_9 :
|
||||
enc = kCFStringEncodingISOLatin5;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_10 :
|
||||
enc = kCFStringEncodingISOLatin6;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_11 :
|
||||
enc = kCFStringEncodingISOLatinThai;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_13 :
|
||||
enc = kCFStringEncodingISOLatin7;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_14 :
|
||||
enc = kCFStringEncodingISOLatin8;
|
||||
break ;
|
||||
case wxFONTENCODING_ISO8859_15 :
|
||||
enc = kCFStringEncodingISOLatin9;
|
||||
break ;
|
||||
|
||||
case wxFONTENCODING_KOI8 :
|
||||
enc = kCFStringEncodingKOI8_R;
|
||||
break ;
|
||||
case wxFONTENCODING_ALTERNATIVE : // MS-DOS CP866
|
||||
enc = kCFStringEncodingDOSRussian;
|
||||
break ;
|
||||
|
||||
// case wxFONTENCODING_BULGARIAN :
|
||||
// enc = ;
|
||||
// break ;
|
||||
|
||||
case wxFONTENCODING_CP437 :
|
||||
enc = kCFStringEncodingDOSLatinUS ;
|
||||
break ;
|
||||
case wxFONTENCODING_CP850 :
|
||||
enc = kCFStringEncodingDOSLatin1;
|
||||
break ;
|
||||
case wxFONTENCODING_CP852 :
|
||||
enc = kCFStringEncodingDOSLatin2;
|
||||
break ;
|
||||
case wxFONTENCODING_CP855 :
|
||||
enc = kCFStringEncodingDOSCyrillic;
|
||||
break ;
|
||||
case wxFONTENCODING_CP866 :
|
||||
enc = kCFStringEncodingDOSRussian ;
|
||||
break ;
|
||||
case wxFONTENCODING_CP874 :
|
||||
enc = kCFStringEncodingDOSThai;
|
||||
break ;
|
||||
case wxFONTENCODING_CP932 :
|
||||
enc = kCFStringEncodingDOSJapanese;
|
||||
break ;
|
||||
case wxFONTENCODING_CP936 :
|
||||
enc = kCFStringEncodingDOSChineseSimplif ;
|
||||
break ;
|
||||
case wxFONTENCODING_CP949 :
|
||||
enc = kCFStringEncodingDOSKorean;
|
||||
break ;
|
||||
case wxFONTENCODING_CP950 :
|
||||
enc = kCFStringEncodingDOSChineseTrad;
|
||||
break ;
|
||||
case wxFONTENCODING_CP1250 :
|
||||
enc = kCFStringEncodingWindowsLatin2;
|
||||
break ;
|
||||
case wxFONTENCODING_CP1251 :
|
||||
enc = kCFStringEncodingWindowsCyrillic ;
|
||||
break ;
|
||||
case wxFONTENCODING_CP1252 :
|
||||
enc = kCFStringEncodingWindowsLatin1 ;
|
||||
break ;
|
||||
case wxFONTENCODING_CP1253 :
|
||||
enc = kCFStringEncodingWindowsGreek;
|
||||
break ;
|
||||
case wxFONTENCODING_CP1254 :
|
||||
enc = kCFStringEncodingWindowsLatin5;
|
||||
break ;
|
||||
case wxFONTENCODING_CP1255 :
|
||||
enc = kCFStringEncodingWindowsHebrew ;
|
||||
break ;
|
||||
case wxFONTENCODING_CP1256 :
|
||||
enc = kCFStringEncodingWindowsArabic ;
|
||||
break ;
|
||||
case wxFONTENCODING_CP1257 :
|
||||
enc = kCFStringEncodingWindowsBalticRim;
|
||||
break ;
|
||||
// This only really encodes to UTF7 (if that) evidently
|
||||
// case wxFONTENCODING_UTF7 :
|
||||
// enc = kCFStringEncodingNonLossyASCII ;
|
||||
// break ;
|
||||
case wxFONTENCODING_UTF8 :
|
||||
enc = kCFStringEncodingUTF8 ;
|
||||
break ;
|
||||
case wxFONTENCODING_EUC_JP :
|
||||
enc = kCFStringEncodingEUC_JP;
|
||||
break ;
|
||||
/* Don't support conversion to/from UTF16 as wxWidgets can do this better.
|
||||
* In particular, ToWChar would fail miserably using strlen on an input UTF16.
|
||||
case wxFONTENCODING_UTF16 :
|
||||
enc = kCFStringEncodingUnicode ;
|
||||
break ;
|
||||
*/
|
||||
case wxFONTENCODING_MACROMAN :
|
||||
enc = kCFStringEncodingMacRoman ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACJAPANESE :
|
||||
enc = kCFStringEncodingMacJapanese ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACCHINESETRAD :
|
||||
enc = kCFStringEncodingMacChineseTrad ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACKOREAN :
|
||||
enc = kCFStringEncodingMacKorean ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACARABIC :
|
||||
enc = kCFStringEncodingMacArabic ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACHEBREW :
|
||||
enc = kCFStringEncodingMacHebrew ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACGREEK :
|
||||
enc = kCFStringEncodingMacGreek ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACCYRILLIC :
|
||||
enc = kCFStringEncodingMacCyrillic ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACDEVANAGARI :
|
||||
enc = kCFStringEncodingMacDevanagari ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACGURMUKHI :
|
||||
enc = kCFStringEncodingMacGurmukhi ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACGUJARATI :
|
||||
enc = kCFStringEncodingMacGujarati ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACORIYA :
|
||||
enc = kCFStringEncodingMacOriya ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACBENGALI :
|
||||
enc = kCFStringEncodingMacBengali ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACTAMIL :
|
||||
enc = kCFStringEncodingMacTamil ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACTELUGU :
|
||||
enc = kCFStringEncodingMacTelugu ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACKANNADA :
|
||||
enc = kCFStringEncodingMacKannada ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACMALAJALAM :
|
||||
enc = kCFStringEncodingMacMalayalam ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACSINHALESE :
|
||||
enc = kCFStringEncodingMacSinhalese ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACBURMESE :
|
||||
enc = kCFStringEncodingMacBurmese ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACKHMER :
|
||||
enc = kCFStringEncodingMacKhmer ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACTHAI :
|
||||
enc = kCFStringEncodingMacThai ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACLAOTIAN :
|
||||
enc = kCFStringEncodingMacLaotian ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACGEORGIAN :
|
||||
enc = kCFStringEncodingMacGeorgian ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACARMENIAN :
|
||||
enc = kCFStringEncodingMacArmenian ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACCHINESESIMP :
|
||||
enc = kCFStringEncodingMacChineseSimp ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACTIBETAN :
|
||||
enc = kCFStringEncodingMacTibetan ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACMONGOLIAN :
|
||||
enc = kCFStringEncodingMacMongolian ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACETHIOPIC :
|
||||
enc = kCFStringEncodingMacEthiopic ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACCENTRALEUR :
|
||||
enc = kCFStringEncodingMacCentralEurRoman ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACVIATNAMESE :
|
||||
enc = kCFStringEncodingMacVietnamese ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACARABICEXT :
|
||||
enc = kCFStringEncodingMacExtArabic ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACSYMBOL :
|
||||
enc = kCFStringEncodingMacSymbol ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACDINGBATS :
|
||||
enc = kCFStringEncodingMacDingbats ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACTURKISH :
|
||||
enc = kCFStringEncodingMacTurkish ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACCROATIAN :
|
||||
enc = kCFStringEncodingMacCroatian ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACICELANDIC :
|
||||
enc = kCFStringEncodingMacIcelandic ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACROMANIAN :
|
||||
enc = kCFStringEncodingMacRomanian ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACCELTIC :
|
||||
enc = kCFStringEncodingMacCeltic ;
|
||||
break ;
|
||||
case wxFONTENCODING_MACGAELIC :
|
||||
enc = kCFStringEncodingMacGaelic ;
|
||||
break ;
|
||||
/* CFString is known to support this back to the original CarbonLib */
|
||||
/* http://developer.apple.com/samplecode/CarbonMDEF/listing2.html */
|
||||
case wxFONTENCODING_MACKEYBOARD :
|
||||
/* We don't wish to pollute the namespace too much, even though we're a private header. */
|
||||
/* The constant is well-defined as 41 and is not expected to change. */
|
||||
enc = 41 /*kTextEncodingMacKeyboardGlyphs*/ ;
|
||||
break ;
|
||||
|
||||
default :
|
||||
// because gcc is picky
|
||||
break ;
|
||||
}
|
||||
|
||||
return enc ;
|
||||
}
|
||||
|
||||
|
||||
class wxMBConv_cf : public wxMBConv
|
||||
{
|
||||
public:
|
||||
wxMBConv_cf()
|
||||
{
|
||||
Init(CFStringGetSystemEncoding()) ;
|
||||
}
|
||||
|
||||
wxMBConv_cf(const wxMBConv_cf& conv) : wxMBConv()
|
||||
{
|
||||
m_encoding = conv.m_encoding;
|
||||
}
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
wxMBConv_cf(const char* name)
|
||||
{
|
||||
Init( wxCFStringEncFromFontEnc(wxFontMapperBase::Get()->CharsetToEncoding(name, false) ) ) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
wxMBConv_cf(wxFontEncoding encoding)
|
||||
{
|
||||
Init( wxCFStringEncFromFontEnc(encoding) );
|
||||
}
|
||||
|
||||
virtual ~wxMBConv_cf()
|
||||
{
|
||||
}
|
||||
|
||||
void Init( CFStringEncoding encoding)
|
||||
{
|
||||
m_encoding = encoding ;
|
||||
}
|
||||
|
||||
virtual size_t ToWChar(wchar_t * dst, size_t dstSize, const char * src, size_t srcSize = wxNO_LEN) const;
|
||||
virtual size_t FromWChar(char *dst, size_t dstSize, const wchar_t *src, size_t srcSize = wxNO_LEN) const;
|
||||
|
||||
virtual wxMBConv *Clone() const { return new wxMBConv_cf(*this); }
|
||||
|
||||
bool IsOk() const
|
||||
{
|
||||
return m_encoding != kCFStringEncodingInvalidId &&
|
||||
CFStringIsEncodingAvailable(m_encoding);
|
||||
}
|
||||
|
||||
private:
|
||||
CFStringEncoding m_encoding ;
|
||||
};
|
||||
|
33
Externals/wxWidgets3/include/wx/osx/core/private/timer.h
vendored
Normal file
33
Externals/wxWidgets3/include/wx/osx/core/private/timer.h
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/private/timer.h
|
||||
// Purpose: wxTimer class based on core foundation
|
||||
// Author: Stefan Csomor
|
||||
// Created: 2008-07-16
|
||||
// RCS-ID: $Id: timer.h 67232 2011-03-18 15:10:15Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_CORE_PRIVATE_TIMER_H_
|
||||
#define _WX_OSX_CORE_PRIVATE_TIMER_H_
|
||||
|
||||
#include "wx/private/timer.h"
|
||||
|
||||
struct wxOSXTimerInfo;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxOSXTimerImpl : public wxTimerImpl
|
||||
{
|
||||
public:
|
||||
wxOSXTimerImpl(wxTimer *timer);
|
||||
virtual ~wxOSXTimerImpl();
|
||||
|
||||
virtual bool Start(int milliseconds = -1, bool one_shot = false);
|
||||
virtual void Stop();
|
||||
|
||||
virtual bool IsRunning() const;
|
||||
|
||||
private:
|
||||
wxOSXTimerInfo *m_info;
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_CORE_PRIVATE_TIMER_H_
|
67
Externals/wxWidgets3/include/wx/osx/core/stdpaths.h
vendored
Normal file
67
Externals/wxWidgets3/include/wx/osx/core/stdpaths.h
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/core/stdpaths.h
|
||||
// Purpose: wxStandardPaths for CoreFoundation systems
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2004-10-27
|
||||
// RCS-ID: $Id: stdpaths.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) 2004 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_STDPATHS_H_
|
||||
#define _WX_MAC_STDPATHS_H_
|
||||
|
||||
struct __CFBundle;
|
||||
struct __CFURL;
|
||||
|
||||
typedef const __CFURL * wxCFURLRef;
|
||||
typedef __CFBundle * wxCFBundleRef;
|
||||
|
||||
// we inherit the GUI CF-based wxStandardPaths implementation from the Unix one
|
||||
// used for console programs if possible (i.e. if we're under a Unix system at
|
||||
// all)
|
||||
#if defined(__UNIX__)
|
||||
#include "wx/unix/stdpaths.h"
|
||||
#define wxStandardPathsCFBase wxStandardPaths
|
||||
#else
|
||||
#define wxStandardPathsCFBase wxStandardPathsBase
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxStandardPaths
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxStandardPathsCF : public wxStandardPathsCFBase
|
||||
{
|
||||
public:
|
||||
wxStandardPathsCF();
|
||||
virtual ~wxStandardPathsCF();
|
||||
|
||||
// wxMac specific: allow user to specify a different bundle
|
||||
wxStandardPathsCF(wxCFBundleRef bundle);
|
||||
void SetBundle(wxCFBundleRef bundle);
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual wxString GetExecutablePath() const;
|
||||
virtual wxString GetConfigDir() const;
|
||||
virtual wxString GetUserConfigDir() const;
|
||||
virtual wxString GetDataDir() const;
|
||||
virtual wxString GetLocalDataDir() const;
|
||||
virtual wxString GetUserDataDir() const;
|
||||
virtual wxString GetPluginsDir() const;
|
||||
virtual wxString GetResourcesDir() const;
|
||||
virtual wxString
|
||||
GetLocalizedResourcesDir(const wxString& lang,
|
||||
ResourceCat category = ResourceCat_None) const;
|
||||
virtual wxString GetDocumentsDir() const;
|
||||
|
||||
protected:
|
||||
// this function can be called with any of CFBundleCopyXXXURL function
|
||||
// pointer as parameter
|
||||
wxString GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const;
|
||||
|
||||
wxCFBundleRef m_bundle;
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_STDPATHS_H_
|
53
Externals/wxWidgets3/include/wx/osx/cursor.h
vendored
Normal file
53
Externals/wxWidgets3/include/wx/osx/cursor.h
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/cursor.h
|
||||
// Purpose: wxCursor class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: cursor.h 62771 2009-12-03 17:20:15Z PC $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CURSOR_H_
|
||||
#define _WX_CURSOR_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
// Cursor
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
|
||||
wxCursor(const wxImage & image) ;
|
||||
wxCursor(const wxString& name,
|
||||
wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
|
||||
wxCursor(wxStockCursor id) { InitFromStock(id); }
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
|
||||
#endif
|
||||
virtual ~wxCursor();
|
||||
|
||||
void MacInstall() const ;
|
||||
|
||||
void SetHCURSOR(WXHCURSOR cursor);
|
||||
WXHCURSOR GetHCURSOR() const;
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
void InitFromStock(wxStockCursor);
|
||||
|
||||
void CreateFromImage(const wxImage & image) ;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxCursor)
|
||||
};
|
||||
|
||||
extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor);
|
||||
|
||||
#endif // _WX_CURSOR_H_
|
69
Externals/wxWidgets3/include/wx/osx/dataform.h
vendored
Normal file
69
Externals/wxWidgets3/include/wx/osx/dataform.h
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dataform.h
|
||||
// Purpose: declaration of the wxDataFormat class
|
||||
// Author: Stefan Csomor (lifted from dnd.h)
|
||||
// Modified by:
|
||||
// Created: 10/21/99
|
||||
// RCS-ID: $Id: dataform.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1999 Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_DATAFORM_H
|
||||
#define _WX_MAC_DATAFORM_H
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDataFormat
|
||||
{
|
||||
public:
|
||||
typedef unsigned long NativeFormat;
|
||||
|
||||
wxDataFormat();
|
||||
wxDataFormat(wxDataFormatId vType);
|
||||
wxDataFormat(const wxDataFormat& rFormat);
|
||||
wxDataFormat(const wxString& rId);
|
||||
wxDataFormat(const wxChar* pId);
|
||||
wxDataFormat(NativeFormat vFormat);
|
||||
~wxDataFormat();
|
||||
|
||||
wxDataFormat& operator=(NativeFormat vFormat)
|
||||
{ SetId(vFormat); return *this; }
|
||||
|
||||
// comparison (must have both versions)
|
||||
bool operator==(const wxDataFormat& format) const ;
|
||||
bool operator!=(const wxDataFormat& format) const
|
||||
{ return ! ( *this == format ); }
|
||||
bool operator==(wxDataFormatId format) const
|
||||
{ return m_type == (wxDataFormatId)format; }
|
||||
bool operator!=(wxDataFormatId format) const
|
||||
{ return m_type != (wxDataFormatId)format; }
|
||||
|
||||
wxDataFormat& operator=(const wxDataFormat& format);
|
||||
|
||||
// explicit and implicit conversions to NativeFormat which is one of
|
||||
// standard data types (implicit conversion is useful for preserving the
|
||||
// compatibility with old code)
|
||||
NativeFormat GetFormatId() const { return m_format; }
|
||||
operator NativeFormat() const { return m_format; }
|
||||
|
||||
void SetId(NativeFormat format);
|
||||
|
||||
// string ids are used for custom types - this SetId() must be used for
|
||||
// application-specific formats
|
||||
wxString GetId() const;
|
||||
void SetId(const wxString& pId);
|
||||
|
||||
// implementation
|
||||
wxDataFormatId GetType() const { return m_type; }
|
||||
void SetType( wxDataFormatId type );
|
||||
|
||||
// returns true if the format is one of those defined in wxDataFormatId
|
||||
bool IsStandard() const { return m_type > 0 && m_type < wxDF_PRIVATE; }
|
||||
|
||||
private:
|
||||
wxDataFormatId m_type;
|
||||
NativeFormat m_format;
|
||||
// indicates the type in case of wxDF_PRIVATE :
|
||||
wxString m_id ;
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_DATAFORM_H
|
37
Externals/wxWidgets3/include/wx/osx/dataobj.h
vendored
Normal file
37
Externals/wxWidgets3/include/wx/osx/dataobj.h
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dataobj.h
|
||||
// Purpose: declaration of the wxDataObject
|
||||
// Author: Stefan Csomor (adapted from Robert Roebling's gtk port)
|
||||
// Modified by:
|
||||
// Created: 10/21/99
|
||||
// RCS-ID: $Id: dataobj.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_DATAOBJ_H_
|
||||
#define _WX_MAC_DATAOBJ_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDataObject is the same as wxDataObjectBase under wxGTK
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase
|
||||
{
|
||||
public:
|
||||
wxDataObject();
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxDataObject() { }
|
||||
#endif
|
||||
|
||||
virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const;
|
||||
void AddToPasteboard( void * pasteboardRef , int itemID );
|
||||
// returns true if the passed in format is present in the pasteboard
|
||||
static bool IsFormatInPasteboard( void * pasteboardRef, const wxDataFormat &dataFormat );
|
||||
// returns true if any of the accepted formats of this dataobj is in the pasteboard
|
||||
bool HasDataInPasteboard( void * pasteboardRef );
|
||||
bool GetFromPasteboard( void * pasteboardRef );
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_DATAOBJ_H_
|
||||
|
94
Externals/wxWidgets3/include/wx/osx/dataobj2.h
vendored
Normal file
94
Externals/wxWidgets3/include/wx/osx/dataobj2.h
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dataobj2.h
|
||||
// Purpose: declaration of standard wxDataObjectSimple-derived classes
|
||||
// Author: David Webster (adapted from Robert Roebling's gtk port
|
||||
// Modified by:
|
||||
// Created: 10/21/99
|
||||
// RCS-ID: $Id: dataobj2.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_DATAOBJ2_H_
|
||||
#define _WX_MAC_DATAOBJ2_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxBitmapDataObject();
|
||||
wxBitmapDataObject(const wxBitmap& bitmap);
|
||||
|
||||
// destr
|
||||
virtual ~wxBitmapDataObject();
|
||||
|
||||
// override base class virtual to update PNG data too
|
||||
virtual void SetBitmap(const wxBitmap& bitmap);
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
virtual size_t GetDataSize() const ;
|
||||
virtual bool GetDataHere(void *buf) const ;
|
||||
virtual bool SetData(size_t len, const void *buf);
|
||||
// Must provide overloads to avoid hiding them (and warnings about it)
|
||||
virtual size_t GetDataSize(const wxDataFormat&) const
|
||||
{
|
||||
return GetDataSize();
|
||||
}
|
||||
virtual bool GetDataHere(const wxDataFormat&, void *buf) const
|
||||
{
|
||||
return GetDataHere(buf);
|
||||
}
|
||||
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
|
||||
{
|
||||
return SetData(len, buf);
|
||||
}
|
||||
|
||||
protected :
|
||||
void Init() ;
|
||||
void Clear() ;
|
||||
|
||||
void* m_pictHandle ;
|
||||
bool m_pictCreated ;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFileDataObject is a specialization of wxDataObject for file names
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase
|
||||
{
|
||||
public:
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
void AddFile( const wxString &filename );
|
||||
|
||||
virtual size_t GetDataSize() const;
|
||||
virtual bool GetDataHere(void *buf) const;
|
||||
virtual bool SetData(size_t len, const void *buf);
|
||||
// Must provide overloads to avoid hiding them (and warnings about it)
|
||||
virtual size_t GetDataSize(const wxDataFormat&) const
|
||||
{
|
||||
return GetDataSize();
|
||||
}
|
||||
virtual bool GetDataHere(const wxDataFormat&, void *buf) const
|
||||
{
|
||||
return GetDataHere(buf);
|
||||
}
|
||||
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
|
||||
{
|
||||
return SetData(len, buf);
|
||||
}
|
||||
protected:
|
||||
// translates the filenames stored into a utf8 encoded char stream
|
||||
void GetFileNames(wxCharBuffer &buf) const ;
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_DATAOBJ2_H_
|
||||
|
306
Externals/wxWidgets3/include/wx/osx/dataview.h
vendored
Normal file
306
Externals/wxWidgets3/include/wx/osx/dataview.h
vendored
Normal file
@ -0,0 +1,306 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dataview.h
|
||||
// Purpose: wxDataViewCtrl native implementation header for OSX
|
||||
// Author:
|
||||
// Id: $Id: dataview.h 66634 2011-01-07 18:26:58Z VS $
|
||||
// Copyright: (c) 2009
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DATAVIEWCTRL_OSX_H_
|
||||
#define _WX_DATAVIEWCTRL_OSX_H_
|
||||
|
||||
#ifdef __WXMAC_CLASSIC__
|
||||
# error "Native wxDataViewCtrl for classic environment not defined. Please use generic control."
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Class declarations to mask native types
|
||||
// --------------------------------------------------------
|
||||
class wxDataViewColumnNativeData; // class storing environment dependent data for the native implementation
|
||||
class wxDataViewWidgetImpl; // class used as a common interface for carbon and cocoa implementation
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewColumn
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewColumn: public wxDataViewColumnBase
|
||||
{
|
||||
public:
|
||||
// constructors / destructor
|
||||
wxDataViewColumn(const wxString& title,
|
||||
wxDataViewRenderer* renderer,
|
||||
unsigned int model_column,
|
||||
int width = wxDVC_DEFAULT_WIDTH,
|
||||
wxAlignment align = wxALIGN_CENTER,
|
||||
int flags = wxDATAVIEW_COL_RESIZABLE);
|
||||
wxDataViewColumn(const wxBitmap& bitmap,
|
||||
wxDataViewRenderer* renderer,
|
||||
unsigned int model_column,
|
||||
int width = wxDVC_DEFAULT_WIDTH,
|
||||
wxAlignment align = wxALIGN_CENTER,
|
||||
int flags = wxDATAVIEW_COL_RESIZABLE);
|
||||
virtual ~wxDataViewColumn();
|
||||
|
||||
// implement wxHeaderColumnBase pure virtual methods
|
||||
virtual wxAlignment GetAlignment() const { return m_alignment; }
|
||||
virtual int GetFlags() const { return m_flags; }
|
||||
virtual int GetMaxWidth() const { return m_maxWidth; }
|
||||
virtual int GetMinWidth() const { return m_minWidth; }
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
virtual int GetWidth() const;
|
||||
virtual bool IsSortOrderAscending() const { return m_ascending; }
|
||||
virtual bool IsSortKey() const;
|
||||
virtual bool IsHidden() const;
|
||||
|
||||
virtual void SetAlignment (wxAlignment align);
|
||||
virtual void SetBitmap (wxBitmap const& bitmap);
|
||||
virtual void SetFlags (int flags) { SetIndividualFlags(flags); }
|
||||
virtual void SetHidden (bool hidden);
|
||||
virtual void SetMaxWidth (int maxWidth);
|
||||
virtual void SetMinWidth (int minWidth);
|
||||
virtual void SetReorderable(bool reorderable);
|
||||
virtual void SetResizeable (bool resizeable);
|
||||
virtual void SetSortable (bool sortable);
|
||||
virtual void SetSortOrder (bool ascending);
|
||||
virtual void SetTitle (wxString const& title);
|
||||
virtual void SetWidth (int width);
|
||||
virtual void SetAsSortKey (bool sort = true);
|
||||
|
||||
// implementation only
|
||||
wxDataViewColumnNativeData* GetNativeData() const
|
||||
{
|
||||
return m_NativeDataPtr;
|
||||
}
|
||||
|
||||
void SetNativeData(wxDataViewColumnNativeData* newNativeDataPtr); // class takes ownership of pointer
|
||||
int GetWidthVariable() const
|
||||
{
|
||||
return m_width;
|
||||
}
|
||||
void SetWidthVariable(int NewWidth)
|
||||
{
|
||||
m_width = NewWidth;
|
||||
}
|
||||
void SetSortOrderVariable(bool NewOrder)
|
||||
{
|
||||
m_ascending = NewOrder;
|
||||
}
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void InitCommon(int width, wxAlignment align, int flags)
|
||||
{
|
||||
m_ascending = true;
|
||||
m_flags = flags & ~wxDATAVIEW_COL_HIDDEN; // TODO
|
||||
m_maxWidth = 30000;
|
||||
m_minWidth = 0;
|
||||
m_alignment = align;
|
||||
SetWidth(width);
|
||||
}
|
||||
|
||||
bool m_ascending; // sorting order
|
||||
|
||||
int m_flags; // flags for the column
|
||||
int m_maxWidth; // maximum width for the column
|
||||
int m_minWidth; // minimum width for the column
|
||||
int m_width; // column width
|
||||
|
||||
wxAlignment m_alignment; // column header alignment
|
||||
|
||||
wxDataViewColumnNativeData* m_NativeDataPtr; // storing environment dependent data for the native implementation
|
||||
|
||||
wxString m_title; // column title
|
||||
};
|
||||
|
||||
//
|
||||
// type definitions related to wxDataViewColumn
|
||||
//
|
||||
WX_DEFINE_ARRAY(wxDataViewColumn*,wxDataViewColumnPtrArrayType);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewCtrl
|
||||
// ---------------------------------------------------------
|
||||
class WXDLLIMPEXP_ADV wxDataViewCtrl: public wxDataViewCtrlBase
|
||||
{
|
||||
public:
|
||||
// Constructors / destructor:
|
||||
wxDataViewCtrl()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
wxDataViewCtrl(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxDataViewCtrlNameStr )
|
||||
{
|
||||
Init();
|
||||
Create(parent, winid, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
~wxDataViewCtrl();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxDataViewCtrlNameStr);
|
||||
|
||||
virtual wxControl* GetMainWindow() // not used for the native implementation
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
// inherited methods from wxDataViewCtrlBase:
|
||||
virtual bool AssociateModel(wxDataViewModel* model);
|
||||
|
||||
virtual bool AppendColumn (wxDataViewColumn* columnPtr);
|
||||
virtual bool ClearColumns ();
|
||||
virtual bool DeleteColumn (wxDataViewColumn* columnPtr);
|
||||
virtual wxDataViewColumn* GetColumn (unsigned int pos) const;
|
||||
virtual unsigned int GetColumnCount () const;
|
||||
virtual int GetColumnPosition(const wxDataViewColumn* columnPtr) const;
|
||||
virtual wxDataViewColumn* GetSortingColumn () const;
|
||||
virtual bool InsertColumn (unsigned int pos, wxDataViewColumn *col);
|
||||
virtual bool PrependColumn (wxDataViewColumn* columnPtr);
|
||||
|
||||
virtual void Collapse( const wxDataViewItem& item);
|
||||
virtual void EnsureVisible(const wxDataViewItem& item, const wxDataViewColumn* columnPtr=NULL);
|
||||
virtual void Expand(const wxDataViewItem& item);
|
||||
virtual bool IsExpanded(const wxDataViewItem & item) const;
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual wxRect GetItemRect(const wxDataViewItem& item, const wxDataViewColumn* columnPtr) const;
|
||||
virtual wxDataViewItem GetSelection() const;
|
||||
virtual int GetSelections(wxDataViewItemArray& sel) const;
|
||||
|
||||
virtual void HitTest(const wxPoint& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const;
|
||||
|
||||
virtual bool IsSelected(const wxDataViewItem& item) const;
|
||||
|
||||
virtual void SelectAll();
|
||||
virtual void Select(const wxDataViewItem& item);
|
||||
virtual void SetSelections(const wxDataViewItemArray& sel);
|
||||
|
||||
virtual void Unselect(const wxDataViewItem& item);
|
||||
virtual void UnselectAll();
|
||||
|
||||
//
|
||||
// implementation
|
||||
//
|
||||
// returns a pointer to the native implementation
|
||||
wxDataViewWidgetImpl* GetDataViewPeer() const;
|
||||
|
||||
// adds all children of the passed parent to the control; if 'parentItem' is invalid the root(s) is/are added:
|
||||
void AddChildren(wxDataViewItem const& parentItem);
|
||||
|
||||
// finishes editing of custom items; if no custom item is currently edited the method does nothing
|
||||
void FinishCustomItemEditing();
|
||||
|
||||
// returns the n-th pointer to a column;
|
||||
// this method is different from GetColumn(unsigned int pos) because here 'n' is not a position in the control but the n-th
|
||||
// position in the internal list/array of column pointers
|
||||
wxDataViewColumn* GetColumnPtr(size_t n) const
|
||||
{
|
||||
return m_ColumnPtrs[n];
|
||||
}
|
||||
// returns the current being rendered item of the customized renderer (this item is only valid during editing)
|
||||
wxDataViewItem const& GetCustomRendererItem() const
|
||||
{
|
||||
return m_CustomRendererItem;
|
||||
}
|
||||
// returns a pointer to a customized renderer (this pointer is only valid during editing)
|
||||
wxDataViewCustomRenderer* GetCustomRendererPtr() const
|
||||
{
|
||||
return m_CustomRendererPtr;
|
||||
}
|
||||
|
||||
// checks if currently a delete process is running
|
||||
bool IsDeleting() const
|
||||
{
|
||||
return m_Deleting;
|
||||
}
|
||||
|
||||
// with CG, we need to get the context from an kEventControlDraw event
|
||||
// unfortunately, the DataBrowser callbacks don't provide the context
|
||||
// and we need it, so we need to set/remove it before and after draw
|
||||
// events so we can access it in the callbacks.
|
||||
void MacSetDrawingContext(void* context)
|
||||
{
|
||||
m_cgContext = context;
|
||||
}
|
||||
void* MacGetDrawingContext() const
|
||||
{
|
||||
return m_cgContext;
|
||||
}
|
||||
|
||||
// sets the currently being edited item of the custom renderer
|
||||
void SetCustomRendererItem(wxDataViewItem const& NewItem)
|
||||
{
|
||||
m_CustomRendererItem = NewItem;
|
||||
}
|
||||
// sets the custom renderer
|
||||
void SetCustomRendererPtr(wxDataViewCustomRenderer* NewCustomRendererPtr)
|
||||
{
|
||||
m_CustomRendererPtr = NewCustomRendererPtr;
|
||||
}
|
||||
// sets the flag indicating a deletion process:
|
||||
void SetDeleting(bool deleting)
|
||||
{
|
||||
m_Deleting = deleting;
|
||||
}
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
}
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
// inherited methods from wxDataViewCtrlBase
|
||||
virtual void DoSetExpanderColumn();
|
||||
virtual void DoSetIndent();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// event handling
|
||||
void OnSize(wxSizeEvent &event);
|
||||
void OnMouse(wxMouseEvent &event);
|
||||
|
||||
private:
|
||||
// initializing of local variables:
|
||||
void Init();
|
||||
|
||||
virtual wxDataViewItem DoGetCurrentItem() const;
|
||||
virtual void DoSetCurrentItem(const wxDataViewItem& item);
|
||||
|
||||
//
|
||||
// variables
|
||||
//
|
||||
bool m_Deleting; // flag indicating if a delete process is running; this flag is necessary because the notifier indicating an item deletion in the model may be called
|
||||
// after the actual deletion of the item; then, native callback functions/delegates may try to update data of variables that are already deleted;
|
||||
// if this flag is set all native variable update requests will be ignored
|
||||
|
||||
void* m_cgContext; // pointer to core graphics context
|
||||
|
||||
wxDataViewCustomRenderer* m_CustomRendererPtr; // pointer to a valid custom renderer while editing; this class does NOT own the pointer
|
||||
|
||||
wxDataViewItem m_CustomRendererItem; // currently edited item by the customrenderer; it is invalid while not editing a custom item
|
||||
|
||||
wxDataViewColumnPtrArrayType m_ColumnPtrs; // all column pointers are stored in an array
|
||||
|
||||
// wxWidget internal stuff:
|
||||
DECLARE_DYNAMIC_CLASS(wxDataViewCtrl)
|
||||
DECLARE_NO_COPY_CLASS(wxDataViewCtrl)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_DATAVIEWCTRL_OSX_H_
|
||||
|
15
Externals/wxWidgets3/include/wx/osx/dc.h
vendored
Normal file
15
Externals/wxWidgets3/include/wx/osx/dc.h
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dc.h
|
||||
// Purpose: wxDC class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: dc.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DC_H_
|
||||
#define _WX_DC_H_
|
||||
|
||||
#endif // _WX_DC_H_
|
72
Externals/wxWidgets3/include/wx/osx/dcclient.h
vendored
Normal file
72
Externals/wxWidgets3/include/wx/osx/dcclient.h
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dcclient.h
|
||||
// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: dcclient.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCCLIENT_H_
|
||||
#define _WX_DCCLIENT_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/dcgraph.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxPaintDC;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWindowDCImpl: public wxGCDCImpl
|
||||
{
|
||||
public:
|
||||
wxWindowDCImpl( wxDC *owner );
|
||||
wxWindowDCImpl( wxDC *owner, wxWindow *window );
|
||||
virtual ~wxWindowDCImpl();
|
||||
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
|
||||
|
||||
protected:
|
||||
bool m_release;
|
||||
int m_width;
|
||||
int m_height;
|
||||
|
||||
DECLARE_CLASS(wxWindowDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
|
||||
};
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxClientDCImpl( wxDC *owner );
|
||||
wxClientDCImpl( wxDC *owner, wxWindow *window );
|
||||
virtual ~wxClientDCImpl();
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxClientDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
|
||||
};
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxPaintDCImpl( wxDC *owner );
|
||||
wxPaintDCImpl( wxDC *owner, wxWindow *win );
|
||||
virtual ~wxPaintDCImpl();
|
||||
|
||||
protected:
|
||||
DECLARE_CLASS(wxPaintDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
// _WX_DCCLIENT_H_
|
46
Externals/wxWidgets3/include/wx/osx/dcmemory.h
vendored
Normal file
46
Externals/wxWidgets3/include/wx/osx/dcmemory.h
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dcmemory.h
|
||||
// Purpose: wxMemoryDC class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: dcmemory.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCMEMORY_H_
|
||||
#define _WX_DCMEMORY_H_
|
||||
|
||||
#include "wx/osx/dcclient.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPaintDCImpl
|
||||
{
|
||||
public:
|
||||
wxMemoryDCImpl( wxMemoryDC *owner );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
|
||||
|
||||
virtual ~wxMemoryDCImpl();
|
||||
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
|
||||
{ return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
|
||||
virtual void DoSelect(const wxBitmap& bitmap);
|
||||
|
||||
virtual const wxBitmap& GetSelectedBitmap() const
|
||||
{ return m_selected; }
|
||||
virtual wxBitmap& GetSelectedBitmap()
|
||||
{ return m_selected; }
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
wxBitmap m_selected;
|
||||
|
||||
DECLARE_CLASS(wxMemoryDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DCMEMORY_H_
|
52
Externals/wxWidgets3/include/wx/osx/dcprint.h
vendored
Normal file
52
Externals/wxWidgets3/include/wx/osx/dcprint.h
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dcprint.h
|
||||
// Purpose: wxPrinterDC class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: dcprint.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCPRINT_H_
|
||||
#define _WX_DCPRINT_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/dcgraph.h"
|
||||
#include "wx/cmndata.h"
|
||||
|
||||
class wxNativePrinterDC ;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPrinterDCImpl: public wxGCDCImpl
|
||||
{
|
||||
public:
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& printdata );
|
||||
virtual ~wxPrinterDCImpl();
|
||||
|
||||
virtual bool StartDoc( const wxString& WXUNUSED(message) ) ;
|
||||
virtual void EndDoc(void) ;
|
||||
virtual void StartPage(void) ;
|
||||
virtual void EndPage(void) ;
|
||||
|
||||
wxRect GetPaperRect() const;
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
virtual wxSize GetPPI() const;
|
||||
|
||||
protected:
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
|
||||
wxPrintData m_printData ;
|
||||
wxNativePrinterDC* m_nativePrinterDC ;
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxPrinterDC)
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DCPRINT_H_
|
||||
|
35
Externals/wxWidgets3/include/wx/osx/dcscreen.h
vendored
Normal file
35
Externals/wxWidgets3/include/wx/osx/dcscreen.h
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dcscreen.h
|
||||
// Purpose: wxScreenDC class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: dcscreen.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DCSCREEN_H_
|
||||
#define _WX_DCSCREEN_H_
|
||||
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/osx/dcclient.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxScreenDCImpl: public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxScreenDCImpl( wxDC *owner );
|
||||
virtual ~wxScreenDCImpl();
|
||||
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
|
||||
private:
|
||||
void* m_overlayWindow;
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxScreenDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl);
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DCSCREEN_H_
|
||||
|
96
Externals/wxWidgets3/include/wx/osx/dialog.h
vendored
Normal file
96
Externals/wxWidgets3/include/wx/osx/dialog.h
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dialog.h
|
||||
// Purpose: wxDialog class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: dialog.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DIALOG_H_
|
||||
#define _WX_DIALOG_H_
|
||||
|
||||
#include "wx/panel.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMacToolTip ;
|
||||
class WXDLLIMPEXP_FWD_CORE wxModalEventLoop ;
|
||||
|
||||
// Dialog boxes
|
||||
class WXDLLIMPEXP_CORE wxDialog : public wxDialogBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
|
||||
public:
|
||||
wxDialog() { Init(); }
|
||||
|
||||
// Constructor with no modal flag - the new convention.
|
||||
wxDialog(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr);
|
||||
|
||||
virtual ~wxDialog();
|
||||
|
||||
// virtual bool Destroy();
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
// return true if we're showing the dialog modally
|
||||
virtual bool IsModal() const;
|
||||
|
||||
// show the dialog modally and return the value passed to EndModal()
|
||||
virtual int ShowModal();
|
||||
|
||||
virtual void ShowWindowModal();
|
||||
|
||||
// may be called to terminate the dialog with the given return code
|
||||
virtual void EndModal(int retCode);
|
||||
|
||||
static bool OSXHasModalDialogsOpen();
|
||||
static void OSXBeginModalDialog();
|
||||
static void OSXEndModalDialog();
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
wxDialogModality GetModality() const;
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void ModalFinishedCallback(void* WXUNUSED(panel), int WXUNUSED(returnCode)) {}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// show window modal dialog
|
||||
void DoShowWindowModal();
|
||||
|
||||
// end window modal dialog.
|
||||
void EndWindowModal();
|
||||
|
||||
// mac also takes command-period as cancel
|
||||
virtual bool IsEscapeKey(const wxKeyEvent& event);
|
||||
|
||||
|
||||
wxDialogModality m_modality;
|
||||
|
||||
wxModalEventLoop* m_eventLoop;
|
||||
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DIALOG_H_
|
39
Externals/wxWidgets3/include/wx/osx/dirdlg.h
vendored
Normal file
39
Externals/wxWidgets3/include/wx/osx/dirdlg.h
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dirdlg.h
|
||||
// Purpose: wxDirDialog class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: dirdlg.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DIRDLG_H_
|
||||
#define _WX_DIRDLG_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
|
||||
{
|
||||
public:
|
||||
wxDirDialog(wxWindow *parent,
|
||||
const wxString& message = wxDirSelectorPromptStr,
|
||||
const wxString& defaultPath = wxT(""),
|
||||
long style = wxDD_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const wxString& name = wxDirDialogNameStr);
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void ShowWindowModal();
|
||||
virtual void ModalFinishedCallback(void* panel, int returnCode);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDirDialog)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_DIRDLG_H_
|
109
Externals/wxWidgets3/include/wx/osx/dnd.h
vendored
Normal file
109
Externals/wxWidgets3/include/wx/osx/dnd.h
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dnd.h
|
||||
// Purpose: Declaration of the wxDropTarget, wxDropSource class etc.
|
||||
// Author: Stefan Csomor
|
||||
// RCS-ID: $Id: dnd.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) 1998 Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DND_H_
|
||||
#define _WX_DND_H_
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/dataobj.h"
|
||||
#include "wx/cursor.h"
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// classes
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDropTarget;
|
||||
class WXDLLIMPEXP_FWD_CORE wxTextDropTarget;
|
||||
class WXDLLIMPEXP_FWD_CORE wxFileDropTarget;
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDropSource;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// this macro may be used instead for wxDropSource ctor arguments: it will use
|
||||
// the icon 'name' from an XPM file under GTK, but will expand to something
|
||||
// else under MSW. If you don't use it, you will have to use #ifdef in the
|
||||
// application code.
|
||||
#define wxDROP_ICON(X) wxCursor(X##_xpm)
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropTarget
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase
|
||||
{
|
||||
public:
|
||||
|
||||
wxDropTarget(wxDataObject *dataObject = NULL );
|
||||
|
||||
virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool OnDrop(wxCoord x, wxCoord y);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool GetData();
|
||||
// NOTE: This is needed by the generic wxDataViewCtrl, not sure how to implement.
|
||||
virtual wxDataFormat GetMatchingPair();
|
||||
|
||||
bool CurrentDragHasSupportedFormat() ;
|
||||
void SetCurrentDragPasteboard( void* dragpasteboard ) { m_currentDragPasteboard = dragpasteboard ; }
|
||||
protected :
|
||||
void* m_currentDragPasteboard ;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropSource
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase
|
||||
{
|
||||
public:
|
||||
// ctors: if you use default ctor you must call SetData() later!
|
||||
//
|
||||
// NB: the "wxWindow *win" parameter is unused and is here only for wxGTK
|
||||
// compatibility, as well as both icon parameters
|
||||
wxDropSource( wxWindow *win = NULL,
|
||||
const wxCursor &cursorCopy = wxNullCursor,
|
||||
const wxCursor &cursorMove = wxNullCursor,
|
||||
const wxCursor &cursorStop = wxNullCursor);
|
||||
|
||||
/* constructor for setting one data object */
|
||||
wxDropSource( wxDataObject& data,
|
||||
wxWindow *win,
|
||||
const wxCursor &cursorCopy = wxNullCursor,
|
||||
const wxCursor &cursorMove = wxNullCursor,
|
||||
const wxCursor &cursorStop = wxNullCursor);
|
||||
|
||||
virtual ~wxDropSource();
|
||||
|
||||
// do it (call this in response to a mouse button press, for example)
|
||||
// params: if bAllowMove is false, data can be only copied
|
||||
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
|
||||
|
||||
wxWindow* GetWindow() { return m_window ; }
|
||||
void SetCurrentDragPasteboard( void* dragpasteboard ) { m_currentDragPasteboard = dragpasteboard ; }
|
||||
bool MacInstallDefaultCursor(wxDragResult effect) ;
|
||||
static wxDropSource* GetCurrentDropSource();
|
||||
protected :
|
||||
|
||||
wxWindow *m_window;
|
||||
void* m_currentDragPasteboard ;
|
||||
};
|
||||
|
||||
#endif // wxUSE_DRAG_AND_DROP
|
||||
|
||||
#endif
|
||||
//_WX_DND_H_
|
112
Externals/wxWidgets3/include/wx/osx/dvrenderer.h
vendored
Normal file
112
Externals/wxWidgets3/include/wx/osx/dvrenderer.h
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dvrenderer.h
|
||||
// Purpose: wxDataViewRenderer for OS X wxDataViewCtrl implementations
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2009-11-07 (extracted from wx/osx/dataview.h)
|
||||
// RCS-ID: $Id: dvrenderer.h 66403 2010-12-19 15:02:56Z VZ $
|
||||
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_DVRENDERER_H_
|
||||
#define _WX_OSX_DVRENDERER_H_
|
||||
|
||||
class wxDataViewRendererNativeData;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDataViewRenderer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewRenderer : public wxDataViewRendererBase
|
||||
{
|
||||
public:
|
||||
// constructors / destructor
|
||||
// -------------------------
|
||||
|
||||
wxDataViewRenderer(const wxString& varianttype,
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT);
|
||||
|
||||
virtual ~wxDataViewRenderer();
|
||||
|
||||
// inherited methods from wxDataViewRendererBase
|
||||
// ---------------------------------------------
|
||||
|
||||
virtual int GetAlignment() const
|
||||
{
|
||||
return m_alignment;
|
||||
}
|
||||
virtual wxDataViewCellMode GetMode() const
|
||||
{
|
||||
return m_mode;
|
||||
}
|
||||
virtual bool GetValue(wxVariant& value) const
|
||||
{
|
||||
value = m_value;
|
||||
return true;
|
||||
}
|
||||
|
||||
// NB: in Carbon this is always identical to the header alignment
|
||||
virtual void SetAlignment(int align);
|
||||
virtual void SetMode(wxDataViewCellMode mode);
|
||||
virtual bool SetValue(const wxVariant& newValue)
|
||||
{
|
||||
m_value = newValue;
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE);
|
||||
virtual wxEllipsizeMode GetEllipsizeMode() const;
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
const wxVariant& GetValue() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
wxDataViewRendererNativeData* GetNativeData() const
|
||||
{
|
||||
return m_NativeDataPtr;
|
||||
}
|
||||
|
||||
// a call to the native data browser function to render the data;
|
||||
// returns true if the data value could be rendered, false otherwise
|
||||
virtual bool MacRender() = 0;
|
||||
|
||||
void SetNativeData(wxDataViewRendererNativeData* newNativeDataPtr);
|
||||
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
// called when a value was edited by user
|
||||
virtual void OSXOnCellChanged(NSObject *value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
|
||||
// called to ensure that the given attribute will be used for rendering the
|
||||
// next cell (which had been already associated with this renderer before)
|
||||
virtual void OSXApplyAttr(const wxDataViewItemAttr& attr);
|
||||
|
||||
// called to set the state of the next cell to be rendered
|
||||
virtual void OSXApplyEnabled(bool enabled);
|
||||
#endif // Cocoa
|
||||
|
||||
private:
|
||||
// contains the alignment flags
|
||||
int m_alignment;
|
||||
|
||||
// storing the mode that determines how the cell is going to be shown
|
||||
wxDataViewCellMode m_mode;
|
||||
|
||||
// data used by implementation of the native renderer
|
||||
wxDataViewRendererNativeData* m_NativeDataPtr;
|
||||
|
||||
// value that is going to be rendered
|
||||
wxVariant m_value;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer)
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_DVRENDERER_H_
|
||||
|
207
Externals/wxWidgets3/include/wx/osx/dvrenderers.h
vendored
Normal file
207
Externals/wxWidgets3/include/wx/osx/dvrenderers.h
vendored
Normal file
@ -0,0 +1,207 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/dvrenderers.h
|
||||
// Purpose: All OS X wxDataViewCtrl renderer classes
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2009-11-07 (extracted from wx/osx/dataview.h)
|
||||
// RCS-ID: $Id: dvrenderers.h 64140 2010-04-25 21:33:16Z FM $
|
||||
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_DVRENDERERS_H_
|
||||
#define _WX_OSX_DVRENDERERS_H_
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewCustomRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewCustomRenderer : public wxDataViewCustomRendererBase
|
||||
{
|
||||
public:
|
||||
wxDataViewCustomRenderer(const wxString& varianttype = "string",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT);
|
||||
|
||||
virtual ~wxDataViewCustomRenderer();
|
||||
|
||||
|
||||
// implementation only
|
||||
// -------------------
|
||||
|
||||
virtual bool MacRender();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void OSXApplyAttr(const wxDataViewItemAttr& attr);
|
||||
#endif // Cocoa
|
||||
|
||||
virtual wxDC* GetDC(); // creates a device context and keeps it
|
||||
void SetDC(wxDC* newDCPtr); // this method takes ownership of the pointer
|
||||
|
||||
private:
|
||||
wxControl* m_editorCtrlPtr; // pointer to an in-place editor control
|
||||
|
||||
wxDC* m_DCPtr;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewTextRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewTextRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewTextRenderer(const wxString& varianttype = "string",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT);
|
||||
|
||||
virtual bool MacRender();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void OSXOnCellChanged(NSObject *value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
#endif // Cocoa
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewBitmapRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewBitmapRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewBitmapRenderer(const wxString& varianttype = "wxBitmap",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT);
|
||||
|
||||
virtual bool MacRender();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewBitmapRenderer)
|
||||
};
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
|
||||
// -------------------------------------
|
||||
// wxDataViewChoiceRenderer
|
||||
// -------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewChoiceRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewChoiceRenderer(const wxArrayString& choices,
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
|
||||
int alignment = wxDVR_DEFAULT_ALIGNMENT );
|
||||
|
||||
virtual bool MacRender();
|
||||
|
||||
wxString GetChoice(size_t index) const { return m_choices[index]; }
|
||||
const wxArrayString& GetChoices() const { return m_choices; }
|
||||
|
||||
private:
|
||||
wxArrayString m_choices;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewChoiceRenderer)
|
||||
};
|
||||
|
||||
#endif // wxOSX_USE_COCOA
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewIconTextRenderer
|
||||
// ---------------------------------------------------------
|
||||
class WXDLLIMPEXP_ADV wxDataViewIconTextRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewIconTextRenderer(const wxString& varianttype = "wxDataViewIconText",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT);
|
||||
|
||||
virtual bool MacRender();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void OSXOnCellChanged(NSObject *value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
#endif // Cocoa
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewToggleRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewToggleRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewToggleRenderer(const wxString& varianttype = "bool",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT);
|
||||
|
||||
virtual bool MacRender();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void OSXOnCellChanged(NSObject *value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
#endif // Cocoa
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewProgressRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewProgressRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewProgressRenderer(const wxString& label = wxEmptyString,
|
||||
const wxString& varianttype = "long",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT);
|
||||
|
||||
virtual bool MacRender();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void OSXOnCellChanged(NSObject *value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
#endif // Cocoa
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewDateRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewDateRenderer(const wxString& varianttype = "datetime",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT);
|
||||
|
||||
virtual bool MacRender();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void OSXOnCellChanged(NSObject *value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
#endif // Cocoa
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer)
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_DVRENDERERS_H_
|
||||
|
117
Externals/wxWidgets3/include/wx/osx/evtloop.h
vendored
Normal file
117
Externals/wxWidgets3/include/wx/osx/evtloop.h
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/evtloop.h
|
||||
// Purpose: simply forwards to wx/osx/carbon/evtloop.h or
|
||||
// wx/osx/cocoa/evtloop.h for consistency with the other Mac
|
||||
// headers
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 2006-01-12
|
||||
// RCS-ID: $Id: evtloop.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_EVTLOOP_H_
|
||||
#define _WX_OSX_EVTLOOP_H_
|
||||
|
||||
DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoop );
|
||||
DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoopObserver );
|
||||
|
||||
class WXDLLIMPEXP_BASE wxCFEventLoop : public wxEventLoopBase
|
||||
{
|
||||
public:
|
||||
wxCFEventLoop();
|
||||
virtual ~wxCFEventLoop();
|
||||
|
||||
// enters a loop calling OnNextIteration(), Pending() and Dispatch() and
|
||||
// terminating when Exit() is called
|
||||
virtual int Run();
|
||||
|
||||
// sets the "should exit" flag and wakes up the loop so that it terminates
|
||||
// soon
|
||||
virtual void Exit(int rc = 0);
|
||||
|
||||
// return true if any events are available
|
||||
virtual bool Pending() const;
|
||||
|
||||
// dispatch a single event, return false if we should exit from the loop
|
||||
virtual bool Dispatch();
|
||||
|
||||
// same as Dispatch() but doesn't wait for longer than the specified (in
|
||||
// ms) timeout, return true if an event was processed, false if we should
|
||||
// exit the loop or -1 if timeout expired
|
||||
virtual int DispatchTimeout(unsigned long timeout);
|
||||
|
||||
// implement this to wake up the loop: usually done by posting a dummy event
|
||||
// to it (can be called from non main thread)
|
||||
virtual void WakeUp();
|
||||
|
||||
virtual bool YieldFor(long eventsToProcess);
|
||||
|
||||
#if wxUSE_EVENTLOOP_SOURCE
|
||||
virtual wxEventLoopSource *
|
||||
AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags);
|
||||
#endif // wxUSE_EVENTLOOP_SOURCE
|
||||
|
||||
void ObserverCallBack(CFRunLoopObserverRef observer, int activity);
|
||||
|
||||
protected:
|
||||
// get the currently executing CFRunLoop
|
||||
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
|
||||
|
||||
virtual int DoDispatchTimeout(unsigned long timeout);
|
||||
|
||||
virtual void DoRun();
|
||||
|
||||
virtual void DoStop();
|
||||
|
||||
// should we exit the loop?
|
||||
bool m_shouldExit;
|
||||
|
||||
// the loop exit code
|
||||
int m_exitcode;
|
||||
|
||||
// cfrunloop
|
||||
CFRunLoopRef m_runLoop;
|
||||
|
||||
// runloop observer
|
||||
CFRunLoopObserverRef m_runLoopObserver;
|
||||
|
||||
private:
|
||||
// process all already pending events and dispatch a new one (blocking
|
||||
// until it appears in the event queue if necessary)
|
||||
//
|
||||
// returns the return value of DoDispatchTimeout()
|
||||
int DoProcessEvents();
|
||||
};
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
#ifdef __WXOSX_COCOA__
|
||||
#include "wx/osx/cocoa/evtloop.h"
|
||||
#else
|
||||
#include "wx/osx/carbon/evtloop.h"
|
||||
#endif
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxNonOwnedWindow;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxModalEventLoop : public wxGUIEventLoop
|
||||
{
|
||||
public:
|
||||
wxModalEventLoop(wxWindow *modalWindow);
|
||||
wxModalEventLoop(WXWindow modalNativeWindow);
|
||||
|
||||
protected:
|
||||
virtual void DoRun();
|
||||
|
||||
virtual void DoStop();
|
||||
|
||||
// (in case) the modal window for this event loop
|
||||
wxNonOwnedWindow* m_modalWindow;
|
||||
WXWindow m_modalNativeWindow;
|
||||
};
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#endif // _WX_OSX_EVTLOOP_H_
|
41
Externals/wxWidgets3/include/wx/osx/evtloopsrc.h
vendored
Normal file
41
Externals/wxWidgets3/include/wx/osx/evtloopsrc.h
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/evtloopsrc.h
|
||||
// Purpose: wxCFEventLoopSource class
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2009-10-21
|
||||
// RCS-ID: $Id: evtloopsrc.h 64140 2010-04-25 21:33:16Z FM $
|
||||
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_EVTLOOPSRC_H_
|
||||
#define _WX_OSX_EVTLOOPSRC_H_
|
||||
|
||||
typedef struct __CFFileDescriptor *CFFileDescriptorRef;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCFEventLoopSource: CoreFoundation-based wxEventLoopSource for OS X
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxCFEventLoopSource : public wxEventLoopSource
|
||||
{
|
||||
public:
|
||||
wxCFEventLoopSource(wxEventLoopSourceHandler *handler, int flags)
|
||||
: wxEventLoopSource(handler, flags)
|
||||
{
|
||||
m_cffd = NULL;
|
||||
}
|
||||
|
||||
// we take ownership of this CFFileDescriptorRef
|
||||
void SetFileDescriptor(CFFileDescriptorRef cffd);
|
||||
|
||||
virtual ~wxCFEventLoopSource();
|
||||
|
||||
private:
|
||||
CFFileDescriptorRef m_cffd;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxCFEventLoopSource);
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_EVTLOOPSRC_H_
|
||||
|
86
Externals/wxWidgets3/include/wx/osx/filedlg.h
vendored
Normal file
86
Externals/wxWidgets3/include/wx/osx/filedlg.h
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/filedlg.h
|
||||
// Purpose: wxFileDialog class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: filedlg.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FILEDLG_H_
|
||||
#define _WX_FILEDLG_H_
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxChoice;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxFileDialog
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
// set this system option to 1 in order to always show the filetypes popup in
|
||||
// file open dialogs if possible
|
||||
|
||||
#define wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES wxT("osx.openfiledialog.always-show-types")
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFileDialog)
|
||||
protected:
|
||||
wxArrayString m_fileNames;
|
||||
wxArrayString m_paths;
|
||||
|
||||
public:
|
||||
wxFileDialog(wxWindow *parent,
|
||||
const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultDir = wxEmptyString,
|
||||
const wxString& defaultFile = wxEmptyString,
|
||||
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
||||
long style = wxFD_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
const wxString& name = wxFileDialogNameStr);
|
||||
|
||||
virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
|
||||
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void ShowWindowModal();
|
||||
virtual void ModalFinishedCallback(void* panel, int resultCode);
|
||||
#endif
|
||||
|
||||
virtual bool SupportsExtraControl() const;
|
||||
|
||||
// implementation only
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
// returns true if the file can be shown as active
|
||||
bool CheckFile( const wxString& filename );
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// not supported for file dialog, RR
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
|
||||
void SetupExtraControls(WXWindow nativeWindow);
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
|
||||
virtual void OnFilterSelected(wxCommandEvent &event);
|
||||
|
||||
wxArrayString m_filterExtensions;
|
||||
wxArrayString m_filterNames;
|
||||
wxChoice* m_filterChoice;
|
||||
wxWindow* m_filterPanel;
|
||||
bool m_useFileTypeFilter;
|
||||
int m_firstFileTypeFilter;
|
||||
wxArrayString m_currentExtensions;
|
||||
WX_NSObject m_delegate;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // _WX_FILEDLG_H_
|
178
Externals/wxWidgets3/include/wx/osx/font.h
vendored
Normal file
178
Externals/wxWidgets3/include/wx/osx/font.h
vendored
Normal file
@ -0,0 +1,178 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/font.h
|
||||
// Purpose: wxFont class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id: font.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FONT_H_
|
||||
#define _WX_FONT_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFont
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// font styles
|
||||
enum wxOSXSystemFont
|
||||
{
|
||||
wxOSX_SYSTEM_FONT_NONE = 0,
|
||||
wxOSX_SYSTEM_FONT_NORMAL,
|
||||
wxOSX_SYSTEM_FONT_BOLD,
|
||||
wxOSX_SYSTEM_FONT_SMALL,
|
||||
wxOSX_SYSTEM_FONT_SMALL_BOLD,
|
||||
wxOSX_SYSTEM_FONT_MINI,
|
||||
wxOSX_SYSTEM_FONT_MINI_BOLD,
|
||||
wxOSX_SYSTEM_FONT_LABELS,
|
||||
wxOSX_SYSTEM_FONT_VIEWS
|
||||
};
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFont : public wxFontBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxFont() { }
|
||||
|
||||
wxFont( wxOSXSystemFont systemFont );
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
wxFont(WX_NSFont nsfont);
|
||||
#endif
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxFont(int size,
|
||||
int family,
|
||||
int style,
|
||||
int weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
(void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
|
||||
}
|
||||
#endif
|
||||
|
||||
wxFont(int size,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
Create(size, family, style, weight, underlined, face, encoding);
|
||||
}
|
||||
|
||||
wxFont(const wxSize& pixelSize,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
Create(10, family, style, weight, underlined, face, encoding);
|
||||
SetPixelSize(pixelSize);
|
||||
}
|
||||
|
||||
bool Create(int size,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
wxFont(const wxNativeFontInfo& info)
|
||||
{
|
||||
(void)Create(info);
|
||||
}
|
||||
|
||||
wxFont(const wxString& fontDesc);
|
||||
|
||||
bool Create(const wxNativeFontInfo& info);
|
||||
|
||||
virtual ~wxFont();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int GetPointSize() const;
|
||||
virtual wxSize GetPixelSize() const;
|
||||
virtual wxFontStyle GetStyle() const;
|
||||
virtual wxFontWeight GetWeight() const;
|
||||
virtual bool GetUnderlined() const;
|
||||
virtual wxString GetFaceName() const;
|
||||
virtual wxFontEncoding GetEncoding() const;
|
||||
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
|
||||
|
||||
virtual void SetPointSize(int pointSize);
|
||||
virtual void SetFamily(wxFontFamily family);
|
||||
virtual void SetStyle(wxFontStyle style);
|
||||
virtual void SetWeight(wxFontWeight weight);
|
||||
virtual bool SetFaceName(const wxString& faceName);
|
||||
virtual void SetUnderlined(bool underlined);
|
||||
virtual void SetEncoding(wxFontEncoding encoding);
|
||||
|
||||
wxDECLARE_COMMON_FONT_METHODS();
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
virtual bool RealizeResource();
|
||||
|
||||
// Mac-specific, risks to change, don't use in portable code
|
||||
|
||||
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
|
||||
wxUint16 MacGetThemeFontID() const ;
|
||||
|
||||
// 'old' Quickdraw accessors
|
||||
short MacGetFontNum() const;
|
||||
wxByte MacGetFontStyle() const;
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_COCOA_OR_CARBON
|
||||
CGFontRef OSXGetCGFont() const;
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_CORE_TEXT
|
||||
CTFontRef OSXGetCTFont() const;
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_ATSU_TEXT
|
||||
// Returns an ATSUStyle not ATSUStyle*
|
||||
void* MacGetATSUStyle() const ;
|
||||
void* OSXGetATSUStyle() const { return MacGetATSUStyle() ; }
|
||||
|
||||
wxDEPRECATED( wxUint32 MacGetATSUFontID() const );
|
||||
wxDEPRECATED( wxUint32 MacGetATSUAdditionalQDStyles() const );
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
WX_NSFont OSXGetNSFont() const;
|
||||
static WX_NSFont OSXCreateNSFont(wxOSXSystemFont font, wxNativeFontInfo* info);
|
||||
static WX_NSFont OSXCreateNSFont(const wxNativeFontInfo* info);
|
||||
static void SetNativeInfoFromNSFont(WX_NSFont nsfont, wxNativeFontInfo* info);
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_IPHONE
|
||||
WX_UIFont OSXGetUIFont() const;
|
||||
static WX_UIFont OSXCreateUIFont(wxOSXSystemFont font, wxNativeFontInfo* info);
|
||||
static WX_UIFont OSXCreateUIFont(const wxNativeFontInfo* info);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info);
|
||||
virtual wxFontFamily DoGetFamily() const;
|
||||
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
};
|
||||
|
||||
#endif // _WX_FONT_H_
|
172
Externals/wxWidgets3/include/wx/osx/fontdlg.h
vendored
Normal file
172
Externals/wxWidgets3/include/wx/osx/fontdlg.h
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/fontdlg.h
|
||||
// Purpose: wxFontDialog class using fonts window services (10.2+).
|
||||
// Author: Ryan Norton
|
||||
// Modified by:
|
||||
// Created: 2004-09-25
|
||||
// RCS-ID: $Id: fontdlg.h 66615 2011-01-07 05:26:57Z PC $
|
||||
// Copyright: (c) Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FONTDLG_H_
|
||||
#define _WX_FONTDLG_H_
|
||||
|
||||
#include "wx/dialog.h"
|
||||
|
||||
/*
|
||||
* Font dialog
|
||||
*/
|
||||
|
||||
/*
|
||||
* support old notation
|
||||
*/
|
||||
#ifdef wxMAC_USE_EXPERIMENTAL_FONTDIALOG
|
||||
#define wxOSX_USE_EXPERIMENTAL_FONTDIALOG wxMAC_USE_EXPERIMENTAL_FONTDIALOG
|
||||
#endif
|
||||
|
||||
#ifndef wxOSX_USE_EXPERIMENTAL_FONTDIALOG
|
||||
#define wxOSX_USE_EXPERIMENTAL_FONTDIALOG 1
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_EXPERIMENTAL_FONTDIALOG
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFontDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
wxFontDialog();
|
||||
wxFontDialog(wxWindow *parent, const wxFontData& data);
|
||||
virtual ~wxFontDialog();
|
||||
|
||||
bool Create(wxWindow *parent, const wxFontData& data);
|
||||
|
||||
int ShowModal();
|
||||
wxFontData& GetFontData() { return m_fontData; }
|
||||
|
||||
protected:
|
||||
wxFontData m_fontData;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxFontDialog)
|
||||
};
|
||||
|
||||
extern "C" int RunMixedFontDialog(wxFontDialog* dialog) ;
|
||||
|
||||
#else // wxOSX_USE_EXPERIMENTAL_FONTDIALOG
|
||||
|
||||
#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
||||
|
||||
/*!
|
||||
* Forward declarations
|
||||
*/
|
||||
|
||||
class wxFontColourSwatchCtrl;
|
||||
class wxFontPreviewCtrl;
|
||||
class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
|
||||
class WXDLLIMPEXP_FWD_CORE wxSpinEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxListBox;
|
||||
class WXDLLIMPEXP_FWD_CORE wxChoice;
|
||||
class WXDLLIMPEXP_FWD_CORE wxButton;
|
||||
class WXDLLIMPEXP_FWD_CORE wxStaticText;
|
||||
class WXDLLIMPEXP_FWD_CORE wxCheckBox;
|
||||
|
||||
/*!
|
||||
* Control identifiers
|
||||
*/
|
||||
|
||||
#define wxID_FONTDIALOG_FACENAME 20001
|
||||
#define wxID_FONTDIALOG_FONTSIZE 20002
|
||||
#define wxID_FONTDIALOG_BOLD 20003
|
||||
#define wxID_FONTDIALOG_ITALIC 20004
|
||||
#define wxID_FONTDIALOG_UNDERLINED 20005
|
||||
#define wxID_FONTDIALOG_COLOUR 20006
|
||||
#define wxID_FONTDIALOG_PREVIEW 20007
|
||||
|
||||
#endif
|
||||
// !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFontDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxFontDialog)
|
||||
|
||||
#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
||||
DECLARE_EVENT_TABLE()
|
||||
#endif
|
||||
|
||||
public:
|
||||
wxFontDialog();
|
||||
wxFontDialog(wxWindow *parent, const wxFontData& data);
|
||||
virtual ~wxFontDialog();
|
||||
|
||||
bool Create(wxWindow *parent, const wxFontData& data);
|
||||
|
||||
int ShowModal();
|
||||
wxFontData& GetFontData() { return m_fontData; }
|
||||
bool IsShown() const;
|
||||
void OnPanelClose();
|
||||
void SetData(const wxFontData& data);
|
||||
|
||||
#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
||||
|
||||
/// Creates the controls and sizers
|
||||
void CreateControls();
|
||||
|
||||
/// Initialize font
|
||||
void InitializeFont();
|
||||
|
||||
/// Set controls according to current font
|
||||
void InitializeControls();
|
||||
|
||||
/// Respond to font change
|
||||
void ChangeFont();
|
||||
|
||||
/// Respond to colour change
|
||||
void OnColourChanged(wxCommandEvent& event);
|
||||
|
||||
/// wxEVT_COMMAND_LISTBOX_SELECTED event handler for wxID_FONTDIALOG_FACENAME
|
||||
void OnFontdialogFacenameSelected( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for wxID_FONTDIALOG_FONTSIZE
|
||||
void OnFontdialogFontsizeUpdated( wxSpinEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_TEXT_UPDATED event handler for wxID_FONTDIALOG_FONTSIZE
|
||||
void OnFontdialogFontsizeTextUpdated( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_BOLD
|
||||
void OnFontdialogBoldClick( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_ITALIC
|
||||
void OnFontdialogItalicClick( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_UNDERLINED
|
||||
void OnFontdialogUnderlinedClick( wxCommandEvent& event );
|
||||
|
||||
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
|
||||
void OnOkClick( wxCommandEvent& event );
|
||||
|
||||
/// Should we show tooltips?
|
||||
static bool ShowToolTips();
|
||||
|
||||
wxListBox* m_facenameCtrl;
|
||||
wxSpinCtrl* m_sizeCtrl;
|
||||
wxCheckBox* m_boldCtrl;
|
||||
wxCheckBox* m_italicCtrl;
|
||||
wxCheckBox* m_underlinedCtrl;
|
||||
wxFontColourSwatchCtrl* m_colourCtrl;
|
||||
wxFontPreviewCtrl* m_previewCtrl;
|
||||
|
||||
wxFont m_dialogFont;
|
||||
bool m_suppressUpdates;
|
||||
|
||||
#endif
|
||||
// !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
||||
|
||||
protected:
|
||||
wxWindow* m_dialogParent;
|
||||
wxFontData m_fontData;
|
||||
void* m_pEventHandlerRef;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_FONTDLG_H_
|
118
Externals/wxWidgets3/include/wx/osx/frame.h
vendored
Normal file
118
Externals/wxWidgets3/include/wx/osx/frame.h
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/frame.h
|
||||
// Purpose: wxFrame class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: frame.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FRAME_H_
|
||||
#define _WX_FRAME_H_
|
||||
|
||||
#include "wx/toolbar.h"
|
||||
#include "wx/accel.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMacToolTip ;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFrame: public wxFrameBase
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
wxFrame() { Init(); }
|
||||
wxFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxFrame();
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// get the origin of the client area (which may be different from (0, 0)
|
||||
// if the frame has a toolbar) in client coordinates
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
// override some more virtuals
|
||||
virtual bool Enable(bool enable = true) ;
|
||||
|
||||
// event handlers
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
// Toolbar
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
virtual void SetToolBar(wxToolBar *toolbar);
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// Status bar
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual wxStatusBar* OnCreateStatusBar(int number = 1,
|
||||
long style = wxSTB_DEFAULT_STYLE,
|
||||
wxWindowID id = 0,
|
||||
const wxString& name = wxStatusLineNameStr);
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// called by wxWindow whenever it gets focus
|
||||
void SetLastFocus(wxWindow *win) { m_winLastFocused = win; }
|
||||
wxWindow *GetLastFocus() const { return m_winLastFocused; }
|
||||
|
||||
void PositionBars();
|
||||
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
virtual void PositionToolBar();
|
||||
#endif
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
#endif
|
||||
|
||||
// override base class virtuals
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void DetachMenuBar();
|
||||
virtual void AttachMenuBar(wxMenuBar *menubar);
|
||||
#endif
|
||||
|
||||
// the last focused child: we restore focus to it on activation
|
||||
wxWindow *m_winLastFocused;
|
||||
|
||||
virtual bool MacIsChildOfClientArea( const wxWindow* child ) const ;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_FRAME_H_
|
54
Externals/wxWidgets3/include/wx/osx/gauge.h
vendored
Normal file
54
Externals/wxWidgets3/include/wx/osx/gauge.h
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/gauge.h
|
||||
// Purpose: wxGauge class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: gauge.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GAUGE_H_
|
||||
#define _WX_GAUGE_H_
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
// Group box
|
||||
class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase
|
||||
{
|
||||
public:
|
||||
inline wxGauge() { }
|
||||
|
||||
inline wxGauge(wxWindow *parent, wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr)
|
||||
{
|
||||
Create(parent, id, range, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr);
|
||||
|
||||
// set gauge range/value
|
||||
virtual void SetRange(int range);
|
||||
virtual void SetValue(int pos);
|
||||
virtual int GetValue() const ;
|
||||
|
||||
void Pulse();
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GAUGE_H_
|
163
Externals/wxWidgets3/include/wx/osx/glcanvas.h
vendored
Normal file
163
Externals/wxWidgets3/include/wx/osx/glcanvas.h
vendored
Normal file
@ -0,0 +1,163 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/glcanvas.h
|
||||
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Macintosh
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: glcanvas.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GLCANVAS_H_
|
||||
#define _WX_GLCANVAS_H_
|
||||
|
||||
#ifdef __WXOSX_IPHONE__
|
||||
#import <OpenGLES/ES1/gl.h>
|
||||
#import <OpenGLES/ES1/glext.h>
|
||||
#define wxUSE_OPENGL_EMULATION 1
|
||||
#else
|
||||
#include <OpenGL/gl.h>
|
||||
#endif
|
||||
|
||||
#include "wx/vector.h"
|
||||
|
||||
// low level calls
|
||||
|
||||
WXDLLIMPEXP_GL WXGLContext WXGLCreateContext( WXGLPixelFormat pixelFormat, WXGLContext shareContext );
|
||||
WXDLLIMPEXP_GL void WXGLDestroyContext( WXGLContext context );
|
||||
|
||||
WXDLLIMPEXP_GL WXGLContext WXGLGetCurrentContext();
|
||||
WXDLLIMPEXP_GL bool WXGLSetCurrentContext(WXGLContext context);
|
||||
|
||||
WXDLLIMPEXP_GL WXGLPixelFormat WXGLChoosePixelFormat(const int *attribList);
|
||||
WXDLLIMPEXP_GL void WXGLDestroyPixelFormat( WXGLPixelFormat pixelFormat );
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLContext : public wxGLContextBase
|
||||
{
|
||||
public:
|
||||
wxGLContext(wxGLCanvas *win, const wxGLContext *other = NULL);
|
||||
virtual ~wxGLContext();
|
||||
|
||||
virtual bool SetCurrent(const wxGLCanvas& win) const;
|
||||
|
||||
// Mac-specific
|
||||
WXGLContext GetWXGLContext() const { return m_glContext; }
|
||||
|
||||
private:
|
||||
WXGLContext m_glContext;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxGLContext);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasBase
|
||||
{
|
||||
public:
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const int *attribList = NULL,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
virtual ~wxGLCanvas();
|
||||
|
||||
// implement wxGLCanvasBase methods
|
||||
virtual bool SwapBuffers();
|
||||
|
||||
|
||||
// Mac-specific functions
|
||||
// ----------------------
|
||||
|
||||
// return true if multisample extension is supported
|
||||
static bool IsAGLMultiSampleAvailable();
|
||||
|
||||
// return the pixel format used by this window
|
||||
WXGLPixelFormat GetWXGLPixelFormat() const { return m_glFormat; }
|
||||
|
||||
// update the view port of the current context to match this window
|
||||
void SetViewport();
|
||||
|
||||
|
||||
// deprecated methods
|
||||
// ------------------
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxDEPRECATED(
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette)
|
||||
);
|
||||
|
||||
wxDEPRECATED(
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
const wxGLContext *shared,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette)
|
||||
);
|
||||
|
||||
wxDEPRECATED(
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
const wxGLCanvas *shared,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette)
|
||||
);
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
// implementation-only from now on
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
// Unlike some other platforms, this must get called if you override it,
|
||||
// i.e. don't forget "event.Skip()" in your EVT_SIZE handler
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
virtual void MacSuperChangedPosition();
|
||||
virtual void MacTopLevelWindowChangedPosition();
|
||||
virtual void MacVisibilityChanged();
|
||||
|
||||
void MacUpdateView();
|
||||
|
||||
GLint GetAglBufferName() const { return m_bufferName; }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
WXGLPixelFormat m_glFormat;
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
bool m_macCanvasIsShown,
|
||||
m_needsUpdate;
|
||||
WXGLContext m_dummyContext;
|
||||
GLint m_bufferName;
|
||||
#endif
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_CLASS(wxGLCanvas)
|
||||
};
|
||||
|
||||
#endif // _WX_GLCANVAS_H_
|
49
Externals/wxWidgets3/include/wx/osx/helpxxxx.h
vendored
Normal file
49
Externals/wxWidgets3/include/wx/osx/helpxxxx.h
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/helpxxxx.h
|
||||
// Purpose: Help system: native implementation for your system. Replace
|
||||
// XXXX with suitable name.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: helpxxxx.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_HELPXXXX_H_
|
||||
#define _WX_HELPXXXX_H_
|
||||
|
||||
#include "wx/wx.h"
|
||||
|
||||
#include "wx/helpbase.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxXXXXHelpController: public wxHelpControllerBase
|
||||
{
|
||||
DECLARE_CLASS(wxXXXXHelpController)
|
||||
|
||||
public:
|
||||
wxXXXXHelpController();
|
||||
virtual ~wxXXXXHelpController();
|
||||
|
||||
// Must call this to set the filename and server name
|
||||
virtual bool Initialize(const wxString& file);
|
||||
|
||||
// If file is "", reloads file given in Initialize
|
||||
virtual bool LoadFile(const wxString& file = "");
|
||||
virtual bool DisplayContents();
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
virtual bool KeywordSearch(const wxString& k,
|
||||
wxHelpSearchMode mode = wxHELP_SEARCH_ALL);
|
||||
|
||||
virtual bool Quit();
|
||||
virtual void OnQuit();
|
||||
|
||||
inline wxString GetHelpFile() const { return m_helpFile; }
|
||||
|
||||
protected:
|
||||
wxString m_helpFile;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_HELPXXXX_H_
|
97
Externals/wxWidgets3/include/wx/osx/icon.h
vendored
Normal file
97
Externals/wxWidgets3/include/wx/osx/icon.h
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/icon.h
|
||||
// Purpose: wxIcon class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: icon.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ICON_H_
|
||||
#define _WX_ICON_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
// Icon
|
||||
class WXDLLIMPEXP_CORE wxIcon : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxIcon();
|
||||
|
||||
wxIcon(const char* const* data);
|
||||
wxIcon(const char bits[], int width , int height );
|
||||
wxIcon(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
wxIcon(const wxIconLocation& loc)
|
||||
{
|
||||
LoadFile(loc.GetFileName(), wxBITMAP_TYPE_ICON);
|
||||
}
|
||||
|
||||
wxIcon(WXHICON icon, const wxSize& size);
|
||||
|
||||
virtual ~wxIcon();
|
||||
|
||||
bool LoadFile(const wxString& name, wxBitmapType flags = wxICON_DEFAULT_TYPE,
|
||||
int desiredWidth = -1, int desiredHeight = -1);
|
||||
|
||||
|
||||
// create from bitmap (which should have a mask unless it's monochrome):
|
||||
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
|
||||
// ctors, assignment operators...), but it's ok to have such function
|
||||
void CopyFromBitmap(const wxBitmap& bmp);
|
||||
|
||||
int GetWidth() const;
|
||||
int GetHeight() const;
|
||||
int GetDepth() const;
|
||||
void SetWidth(int w);
|
||||
void SetHeight(int h);
|
||||
void SetDepth(int d);
|
||||
void SetOk(bool isOk);
|
||||
|
||||
wxSize GetSize() const { return wxSize(GetWidth(), GetHeight()); }
|
||||
|
||||
WXHICON GetHICON() const;
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxIcon)
|
||||
|
||||
bool LoadIconFromSystemResource(const wxString& resourceName, int desiredWidth, int desiredHeight);
|
||||
bool LoadIconFromBundleResource(const wxString& resourceName, int desiredWidth, int desiredHeight);
|
||||
bool LoadIconFromFile(const wxString& filename, int desiredWidth, int desiredHeight);
|
||||
bool LoadIconAsBitmap(const wxString& filename, wxBitmapType flags = wxICON_DEFAULT_TYPE, int desiredWidth = -1, int desiredHeight = -1);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxICONResourceHandler: public wxBitmapHandler
|
||||
{
|
||||
public:
|
||||
wxICONResourceHandler()
|
||||
{
|
||||
SetName(wxT("ICON resource"));
|
||||
SetExtension(wxEmptyString);
|
||||
SetType(wxBITMAP_TYPE_ICON_RESOURCE);
|
||||
}
|
||||
|
||||
virtual bool LoadFile(wxBitmap *bitmap,
|
||||
const wxString& name,
|
||||
wxBitmapType flags,
|
||||
int desiredWidth = -1,
|
||||
int desiredHeight = -1);
|
||||
|
||||
// unhide the base class virtual
|
||||
virtual bool LoadFile(wxBitmap *bitmap,
|
||||
const wxString& name,
|
||||
wxBitmapType flags)
|
||||
{ return LoadFile(bitmap, name, flags, -1, -1); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxICONResourceHandler)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_ICON_H_
|
60
Externals/wxWidgets3/include/wx/osx/imaglist.h
vendored
Normal file
60
Externals/wxWidgets3/include/wx/osx/imaglist.h
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/imaglist.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling, Stefan Csomor
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_IMAGLIST_H_
|
||||
#define _WX_IMAGLIST_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/list.h"
|
||||
#include "wx/icon.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDC;
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxImageList: public wxObject
|
||||
{
|
||||
public:
|
||||
wxImageList() { m_width = m_height = 0; }
|
||||
wxImageList( int width, int height, bool mask = true, int initialCount = 1 );
|
||||
virtual ~wxImageList();
|
||||
bool Create( int width, int height, bool mask = true, int initialCount = 1 );
|
||||
bool Create();
|
||||
|
||||
virtual int GetImageCount() const;
|
||||
virtual bool GetSize( int index, int &width, int &height ) const;
|
||||
|
||||
int Add( const wxIcon& bitmap );
|
||||
int Add( const wxBitmap& bitmap );
|
||||
int Add( const wxBitmap& bitmap, const wxBitmap& mask );
|
||||
int Add( const wxBitmap& bitmap, const wxColour& maskColour );
|
||||
wxBitmap GetBitmap(int index) const;
|
||||
wxIcon GetIcon(int index) const;
|
||||
bool Replace( int index, const wxIcon &bitmap );
|
||||
bool Replace( int index, const wxBitmap &bitmap );
|
||||
bool Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask );
|
||||
bool Remove( int index );
|
||||
bool RemoveAll();
|
||||
|
||||
virtual bool Draw(int index, wxDC& dc, int x, int y,
|
||||
int flags = wxIMAGELIST_DRAW_NORMAL,
|
||||
bool solidBackground = false);
|
||||
|
||||
private:
|
||||
wxList m_images;
|
||||
|
||||
int m_width;
|
||||
int m_height;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxImageList)
|
||||
};
|
||||
|
||||
#endif // _WX_IMAGLIST_H_
|
||||
|
353
Externals/wxWidgets3/include/wx/osx/iphone/chkconf.h
vendored
Normal file
353
Externals/wxWidgets3/include/wx/osx/iphone/chkconf.h
vendored
Normal file
@ -0,0 +1,353 @@
|
||||
/*
|
||||
* Name: wx/osx/iphone/chkconf.h
|
||||
* Purpose: Compiler-specific configuration checking
|
||||
* Author: Stefan Csomor
|
||||
* Modified by:
|
||||
* Created: 2008-07-30
|
||||
* RCS-ID: $Id: chkconf.h 67232 2011-03-18 15:10:15Z DS $
|
||||
* Copyright: (c) Stefan Csomor
|
||||
* Licence: wxWindows licence
|
||||
*/
|
||||
|
||||
#ifndef _WX_OSX_IPHONE_CHKCONF_H_
|
||||
#define _WX_OSX_IPHONE_CHKCONF_H_
|
||||
|
||||
/*
|
||||
* text rendering system
|
||||
*/
|
||||
|
||||
/* we have different options and we turn on all that make sense
|
||||
* under a certain platform
|
||||
*/
|
||||
|
||||
#define wxOSX_USE_CORE_TEXT 0
|
||||
#define wxOSX_USE_ATSU_TEXT 0
|
||||
#define wxHAS_OPENGL_ES
|
||||
|
||||
#define wxOSX_USE_QUICKTIME 0
|
||||
#define wxOSX_USE_AUDIOTOOLBOX 1
|
||||
|
||||
/*
|
||||
* turning off capabilities that don't work under iphone yet
|
||||
*/
|
||||
|
||||
#if wxUSE_MIMETYPE
|
||||
#undef wxUSE_MIMETYPE
|
||||
#define wxUSE_MIMETYPE 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_MDI
|
||||
#undef wxUSE_MDI
|
||||
#define wxUSE_MDI 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_MDI_ARCHITECTURE
|
||||
#undef wxUSE_MDI_ARCHITECTURE
|
||||
#define wxUSE_MDI_ARCHITECTURE 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
#undef wxUSE_DRAG_AND_DROP
|
||||
#define wxUSE_DRAG_AND_DROP 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_TASKBARICON
|
||||
#undef wxUSE_TASKBARICON
|
||||
#define wxUSE_TASKBARICON 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
#undef wxUSE_TOOLTIPS
|
||||
#define wxUSE_TOOLTIPS 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_DATAVIEWCTRL
|
||||
#undef wxUSE_DATAVIEWCTRL
|
||||
#define wxUSE_DATAVIEWCTRL 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
#undef wxUSE_DRAG_AND_DROP
|
||||
#define wxUSE_DRAG_AND_DROP 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_TASKBARICON
|
||||
#undef wxUSE_TASKBARICON
|
||||
#define wxUSE_TASKBARICON 0
|
||||
#endif
|
||||
|
||||
#define wxUSE_BUTTON 1
|
||||
|
||||
#if wxUSE_CARET
|
||||
#undef wxUSE_CARET
|
||||
#define wxUSE_CARET 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_CHOICE
|
||||
#undef wxUSE_CHOICE
|
||||
#define wxUSE_CHOICE 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_COMBOBOX
|
||||
#undef wxUSE_COMBOBOX
|
||||
#define wxUSE_COMBOBOX 0
|
||||
#endif
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
#undef wxUSE_SCROLLBAR
|
||||
#define wxUSE_SCROLLBAR 0
|
||||
#endif
|
||||
|
||||
#undef wxUSE_STATUSBAR
|
||||
#undef wxUSE_NATIVE_STATUSBAR
|
||||
#undef wxUSE_ABOUTDLG
|
||||
#undef wxUSE_STATLINE
|
||||
#undef wxUSE_COLLPANE
|
||||
#undef wxUSE_STATBMP
|
||||
#undef wxUSE_STATBOX
|
||||
#undef wxUSE_RADIOBTN
|
||||
#undef wxUSE_RADIOBOX
|
||||
#undef wxUSE_TOGGLEBTN
|
||||
|
||||
|
||||
#define wxUSE_STATUSBAR 0
|
||||
#define wxUSE_NATIVE_STATUSBAR 0
|
||||
#define wxUSE_ABOUTDLG 0
|
||||
#define wxUSE_STATLINE 0
|
||||
#define wxUSE_COLLPANE 0
|
||||
#define wxUSE_STATBMP 0
|
||||
#define wxUSE_STATBOX 0
|
||||
#define wxUSE_RADIOBTN 0
|
||||
#define wxUSE_RADIOBOX 0
|
||||
#define wxUSE_TOGGLEBTN 0
|
||||
|
||||
#undef wxUSE_HTML
|
||||
|
||||
#define wxUSE_HTML 0
|
||||
|
||||
#undef wxUSE_RICHTEXT
|
||||
#define wxUSE_RICHTEXT 0
|
||||
|
||||
#undef wxUSE_ANIMATIONCTRL
|
||||
#undef wxUSE_CALENDARCTRL
|
||||
#undef wxUSE_COMBOCTRL
|
||||
#undef wxUSE_ODCOMBOBOX
|
||||
#undef wxUSE_BITMAPCOMBOBOX
|
||||
#undef wxUSE_BMPBUTTON
|
||||
#undef wxUSE_CHECKLISTBOX
|
||||
#undef wxUSE_GRID
|
||||
#undef wxUSE_LISTBOX
|
||||
#undef wxUSE_LISTCTRL
|
||||
#undef wxUSE_NOTEBOOK
|
||||
#undef wxUSE_SPINBTN
|
||||
#undef wxUSE_SPINCTRL
|
||||
#undef wxUSE_TREECTRL
|
||||
#undef wxUSE_DATEPICKCTRL
|
||||
#undef wxUSE_DATAVIEWCTRL
|
||||
#undef wxUSE_EDITABLELISTBOX
|
||||
#undef wxUSE_FILEPICKERCTRL
|
||||
#undef wxUSE_DIRPICKERCTRL
|
||||
#undef wxUSE_FILECTRL
|
||||
#undef wxUSE_COLOURPICKERCTRL
|
||||
#undef wxUSE_FONTPICKERCTRL
|
||||
#undef wxUSE_DEBUGREPORT
|
||||
#undef wxUSE_HYPERLINKCTRL
|
||||
#undef wxUSE_STC
|
||||
#undef wxUSE_AUI
|
||||
#undef wxUSE_BUSYINFO
|
||||
#undef wxUSE_SEARCHCTRL
|
||||
|
||||
#define wxUSE_ANIMATIONCTRL 0
|
||||
#define wxUSE_CALENDARCTRL 0
|
||||
#define wxUSE_COMBOCTRL 0
|
||||
#define wxUSE_ODCOMBOBOX 0
|
||||
#define wxUSE_BITMAPCOMBOBOX 0
|
||||
#define wxUSE_BMPBUTTON 0
|
||||
#define wxUSE_CHECKLISTBOX 0
|
||||
#define wxUSE_GRID 0
|
||||
#define wxUSE_LISTBOX 0
|
||||
#define wxUSE_LISTCTRL 0
|
||||
#define wxUSE_NOTEBOOK 0
|
||||
#define wxUSE_SPINBTN 0
|
||||
#define wxUSE_SPINCTRL 0
|
||||
#define wxUSE_TREECTRL 0
|
||||
#define wxUSE_DATEPICKCTRL 0
|
||||
#define wxUSE_DATAVIEWCTRL 0
|
||||
#define wxUSE_EDITABLELISTBOX 0
|
||||
#define wxUSE_FILEPICKERCTRL 0
|
||||
#define wxUSE_DIRPICKERCTRL 0
|
||||
#define wxUSE_FILECTRL 0
|
||||
#define wxUSE_COLOURPICKERCTRL 0
|
||||
#define wxUSE_FONTPICKERCTRL 0
|
||||
#define wxUSE_DEBUGREPORT 0
|
||||
#define wxUSE_HYPERLINKCTRL 0
|
||||
#define wxUSE_STC 0
|
||||
#define wxUSE_AUI 0
|
||||
#define wxUSE_BUSYINFO 0
|
||||
#define wxUSE_SEARCHCTRL 0
|
||||
|
||||
#undef wxUSE_LOGWINDOW
|
||||
#undef wxUSE_LOG_DIALOG
|
||||
#undef wxUSE_LISTBOOK
|
||||
#undef wxUSE_CHOICEBOOK
|
||||
#undef wxUSE_TREEBOOK
|
||||
#undef wxUSE_TOOLBOOK
|
||||
#undef wxUSE_CHOICEDLG
|
||||
#undef wxUSE_HELP
|
||||
#undef wxUSE_PROGRESSDLG
|
||||
#undef wxUSE_FONTDLG
|
||||
#undef wxUSE_FILEDLG
|
||||
#undef wxUSE_CHOICEDLG
|
||||
#undef wxUSE_NUMBERDLG
|
||||
#undef wxUSE_TEXTDLG
|
||||
#undef wxUSE_DIRDLG
|
||||
#undef wxUSE_STARTUP_TIPS
|
||||
#undef wxUSE_WIZARDDLG
|
||||
#undef wxUSE_TOOLBAR_NATIVE
|
||||
#undef wxUSE_FINDREPLDLG
|
||||
#undef wxUSE_TASKBARICON
|
||||
#undef wxUSE_REARRANGECTRL
|
||||
|
||||
#define wxUSE_LOGWINDOW 0
|
||||
#define wxUSE_LOG_DIALOG 0
|
||||
#define wxUSE_LISTBOOK 0
|
||||
#define wxUSE_CHOICEBOOK 0
|
||||
#define wxUSE_TREEBOOK 0
|
||||
#define wxUSE_TOOLBOOK 0
|
||||
#define wxUSE_CHOICEDLG 0
|
||||
#define wxUSE_HELP 0
|
||||
#define wxUSE_PROGRESSDLG 0
|
||||
#define wxUSE_FONTDLG 0
|
||||
#define wxUSE_FILEDLG 0
|
||||
#define wxUSE_CHOICEDLG 0
|
||||
#define wxUSE_NUMBERDLG 0
|
||||
#define wxUSE_TEXTDLG 0
|
||||
#define wxUSE_DIRDLG 0
|
||||
#define wxUSE_STARTUP_TIPS 0
|
||||
#define wxUSE_WIZARDDLG 0
|
||||
#define wxUSE_TOOLBAR_NATIVE 0
|
||||
#define wxUSE_FINDREPLDLG 0
|
||||
#define wxUSE_TASKBARICON 0
|
||||
#define wxUSE_REARRANGECTRL 0
|
||||
|
||||
#if wxUSE_WXHTML_HELP
|
||||
#undef wxUSE_WXHTML_HELP
|
||||
#define wxUSE_WXHTML_HELP 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_DOC_VIEW_ARCHITECTURE
|
||||
#undef wxUSE_DOC_VIEW_ARCHITECTURE
|
||||
#define wxUSE_DOC_VIEW_ARCHITECTURE 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
#undef wxUSE_PRINTING_ARCHITECTURE
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_MENUS
|
||||
#undef wxUSE_MENUS
|
||||
#define wxUSE_MENUS 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if wxUSE_POPUPWIN
|
||||
#undef wxUSE_POPUPWIN
|
||||
#define wxUSE_POPUPWIN 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_COMBOBOX
|
||||
#undef wxUSE_COMBOBOX
|
||||
#define wxUSE_COMBOBOX 0
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if wxUSE_CALENDARCTRL
|
||||
#undef wxUSE_CALENDARCTRL
|
||||
#define wxUSE_CALENDARCTRL 0
|
||||
#endif
|
||||
|
||||
*/
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
#undef wxUSE_CLIPBOARD
|
||||
#define wxUSE_CLIPBOARD 0
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
|
||||
/*
|
||||
#if wxUSE_GLCANVAS
|
||||
#undef wxUSE_GLCANVAS
|
||||
#define wxUSE_GLCANVAS 0
|
||||
#endif // wxUSE_GLCANVAS
|
||||
*/
|
||||
|
||||
#if wxUSE_COLOURDLG
|
||||
#undef wxUSE_COLOURDLG
|
||||
#define wxUSE_COLOURDLG 0
|
||||
#endif // wxUSE_COLOURDLG
|
||||
|
||||
// iphone has a toolbar that is a regular UIView
|
||||
|
||||
#ifdef wxOSX_USE_NATIVE_TOOLBAR
|
||||
#if wxOSX_USE_NATIVE_TOOLBAR
|
||||
#undef wxOSX_USE_NATIVE_TOOLBAR
|
||||
#define wxOSX_USE_NATIVE_TOOLBAR 0
|
||||
#endif
|
||||
#else
|
||||
#define wxOSX_USE_NATIVE_TOOLBAR 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_RIBBON
|
||||
#undef wxUSE_RIBBON
|
||||
#define wxUSE_RIBBON 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_INFOBAR
|
||||
#undef wxUSE_INFOBAR
|
||||
#define wxUSE_INFOBAR 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_FILE_HISTORY
|
||||
#undef wxUSE_FILE_HISTORY
|
||||
#define wxUSE_FILE_HISTORY 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_NOTIFICATION_MESSAGE
|
||||
#undef wxUSE_NOTIFICATION_MESSAGE
|
||||
#define wxUSE_NOTIFICATION_MESSAGE 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_PROPGRID
|
||||
#undef wxUSE_PROPGRID
|
||||
#define wxUSE_PROPGRID 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_WEBKIT
|
||||
#undef wxUSE_WEBKIT
|
||||
#define wxUSE_WEBKIT 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_DATAOBJ
|
||||
#undef wxUSE_DATAOBJ
|
||||
#define wxUSE_DATAOBJ 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
#undef wxUSE_UIACTIONSIMULATOR
|
||||
#define wxUSE_UIACTIONSIMULATOR 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_RICHMSGDLG
|
||||
#undef wxUSE_RICHMSGDLG
|
||||
#define wxUSE_RICHMSGDLG 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_RICHTEXT
|
||||
#undef wxUSE_RICHTEXT
|
||||
#define wxUSE_RICHTEXT 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* _WX_OSX_IPHONE_CHKCONF_H_ */
|
||||
|
217
Externals/wxWidgets3/include/wx/osx/iphone/private.h
vendored
Normal file
217
Externals/wxWidgets3/include/wx/osx/iphone/private.h
vendored
Normal file
@ -0,0 +1,217 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/iphone/private.h
|
||||
// Purpose: Private declarations: as this header is only included by
|
||||
// wxWidgets itself, it may contain identifiers which don't start
|
||||
// with "wx".
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: private.h 67233 2011-03-18 15:45:51Z SC $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PRIVATE_IPHONE_H_
|
||||
#define _WX_PRIVATE_IPHONE_H_
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage(
|
||||
CGContextRef inContext,
|
||||
const CGRect * inBounds,
|
||||
CGImageRef inImage) ;
|
||||
|
||||
WX_UIImage WXDLLIMPEXP_CORE wxOSXGetUIImageFromCGImage( CGImageRef image );
|
||||
wxBitmap WXDLLIMPEXP_CORE wxOSXCreateSystemBitmap(const wxString& id, const wxString &client, const wxSize& size);
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWidgetIPhoneImpl : public wxWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false, bool isUserPane = false ) ;
|
||||
wxWidgetIPhoneImpl() ;
|
||||
~wxWidgetIPhoneImpl();
|
||||
|
||||
void Init();
|
||||
|
||||
virtual bool IsVisible() const ;
|
||||
virtual void SetVisibility( bool visible );
|
||||
|
||||
virtual void Raise();
|
||||
|
||||
virtual void Lower();
|
||||
|
||||
virtual void ScrollRect( const wxRect *rect, int dx, int dy );
|
||||
|
||||
virtual WXWidget GetWXWidget() const { return m_osxView; }
|
||||
|
||||
virtual void SetBackgroundColour( const wxColour& col ) ;
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style) ;
|
||||
|
||||
virtual void GetContentArea( int &left , int &top , int &width , int &height ) const;
|
||||
virtual void Move(int x, int y, int width, int height);
|
||||
virtual void GetPosition( int &x, int &y ) const;
|
||||
virtual void GetSize( int &width, int &height ) const;
|
||||
virtual void SetControlSize( wxWindowVariant variant );
|
||||
virtual float GetContentScaleFactor() const ;
|
||||
|
||||
virtual void SetNeedsDisplay( const wxRect* where = NULL );
|
||||
virtual bool GetNeedsDisplay() const;
|
||||
|
||||
virtual bool CanFocus() const;
|
||||
// return true if successful
|
||||
virtual bool SetFocus();
|
||||
virtual bool HasFocus() const;
|
||||
|
||||
void RemoveFromParent();
|
||||
void Embed( wxWidgetImpl *parent );
|
||||
|
||||
void SetDefaultButton( bool isDefault );
|
||||
void PerformClick();
|
||||
virtual void SetLabel(const wxString& title, wxFontEncoding encoding);
|
||||
|
||||
void SetCursor( const wxCursor & cursor );
|
||||
void CaptureMouse();
|
||||
void ReleaseMouse();
|
||||
|
||||
wxInt32 GetValue() const;
|
||||
void SetValue( wxInt32 v );
|
||||
|
||||
virtual wxBitmap GetBitmap() const;
|
||||
virtual void SetBitmap( const wxBitmap& bitmap );
|
||||
virtual void SetBitmapPosition( wxDirection dir );
|
||||
|
||||
void SetupTabs( const wxNotebook ¬ebook );
|
||||
void GetBestRect( wxRect *r ) const;
|
||||
bool IsEnabled() const;
|
||||
void Enable( bool enable );
|
||||
bool ButtonClickDidStateChange() { return true ;}
|
||||
void SetMinimum( wxInt32 v );
|
||||
void SetMaximum( wxInt32 v );
|
||||
wxInt32 GetMinimum() const;
|
||||
wxInt32 GetMaximum() const;
|
||||
void PulseGauge();
|
||||
void SetScrollThumb( wxInt32 value, wxInt32 thumbSize );
|
||||
|
||||
void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true );
|
||||
|
||||
void InstallEventHandler( WXWidget control = NULL );
|
||||
|
||||
virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow);
|
||||
|
||||
// thunk connected calls
|
||||
|
||||
virtual void drawRect(CGRect* rect, WXWidget slf, void* _cmd);
|
||||
virtual void touchEvent(WX_NSSet touches, WX_UIEvent event, WXWidget slf, void* _cmd);
|
||||
virtual bool becomeFirstResponder(WXWidget slf, void* _cmd);
|
||||
virtual bool resignFirstResponder(WXWidget slf, void* _cmd);
|
||||
|
||||
// action
|
||||
|
||||
virtual void controlAction(void* sender, wxUint32 controlEvent, WX_UIEvent rawEvent);
|
||||
virtual void controlTextDidChange();
|
||||
protected:
|
||||
WXWidget m_osxView;
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxWidgetIPhoneImpl)
|
||||
};
|
||||
|
||||
class wxNonOwnedWindowIPhoneImpl : public wxNonOwnedWindowImpl
|
||||
{
|
||||
public :
|
||||
wxNonOwnedWindowIPhoneImpl( wxNonOwnedWindow* nonownedwnd) ;
|
||||
wxNonOwnedWindowIPhoneImpl();
|
||||
|
||||
virtual ~wxNonOwnedWindowIPhoneImpl();
|
||||
|
||||
virtual void WillBeDestroyed() ;
|
||||
void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size,
|
||||
long style, long extraStyle, const wxString& name ) ;
|
||||
void Create( wxWindow* parent, WXWindow nativeWindow );
|
||||
|
||||
WXWindow GetWXWindow() const;
|
||||
void Raise();
|
||||
void Lower();
|
||||
bool Show(bool show);
|
||||
bool ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout);
|
||||
|
||||
void Update();
|
||||
bool SetTransparent(wxByte alpha);
|
||||
bool SetBackgroundColour(const wxColour& col );
|
||||
void SetExtraStyle( long exStyle );
|
||||
bool SetBackgroundStyle(wxBackgroundStyle style);
|
||||
bool CanSetTransparent();
|
||||
|
||||
void MoveWindow(int x, int y, int width, int height);
|
||||
void GetPosition( int &x, int &y ) const;
|
||||
void GetSize( int &width, int &height ) const;
|
||||
|
||||
void GetContentArea( int &left , int &top , int &width , int &height ) const;
|
||||
bool SetShape(const wxRegion& region);
|
||||
|
||||
virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ;
|
||||
|
||||
virtual bool IsMaximized() const;
|
||||
|
||||
virtual bool IsIconized() const;
|
||||
|
||||
virtual void Iconize( bool iconize );
|
||||
|
||||
virtual void Maximize(bool maximize);
|
||||
|
||||
virtual bool IsFullScreen() const;
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style);
|
||||
|
||||
virtual void RequestUserAttention(int flags);
|
||||
|
||||
virtual void ScreenToWindow( int *x, int *y );
|
||||
|
||||
virtual void WindowToScreen( int *x, int *y );
|
||||
|
||||
// FIXME: Does iPhone have a concept of inactive windows?
|
||||
virtual bool IsActive() { return true; }
|
||||
|
||||
wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
|
||||
|
||||
virtual bool InitialShowEventSent() { return m_initialShowSent; }
|
||||
protected :
|
||||
WX_UIWindow m_macWindow;
|
||||
void * m_macFullScreenData ;
|
||||
bool m_initialShowSent;
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowIPhoneImpl)
|
||||
};
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
WXDLLIMPEXP_CORE CGRect wxToNSRect( UIView* parent, const wxRect& r );
|
||||
WXDLLIMPEXP_CORE wxRect wxFromNSRect( UIView* parent, const CGRect& rect );
|
||||
WXDLLIMPEXP_CORE CGPoint wxToNSPoint( UIView* parent, const wxPoint& p );
|
||||
WXDLLIMPEXP_CORE wxPoint wxFromNSPoint( UIView* parent, const CGPoint& p );
|
||||
|
||||
CGRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size ,
|
||||
bool adjustForOrigin = true );
|
||||
|
||||
@interface wxUIButton : UIButton
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface wxUIView : UIView
|
||||
{
|
||||
}
|
||||
|
||||
@end // wxUIView
|
||||
|
||||
|
||||
void WXDLLIMPEXP_CORE wxOSXIPhoneClassAddWXMethods(Class c);
|
||||
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#endif
|
||||
// _WX_PRIVATE_IPHONE_H_
|
108
Externals/wxWidgets3/include/wx/osx/iphone/private/textimpl.h
vendored
Normal file
108
Externals/wxWidgets3/include/wx/osx/iphone/private/textimpl.h
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/iphone/private/textimpl.h
|
||||
// Purpose: textcontrol implementation classes that have to be exposed
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id: textimpl.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
||||
#define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
||||
|
||||
#include "wx/combobox.h"
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
// implementation exposed, so that search control can pull it
|
||||
|
||||
class wxUITextFieldControl : public wxWidgetIPhoneImpl, public wxTextWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxUITextFieldControl( wxTextCtrl *wxPeer, UITextField* w );
|
||||
virtual ~wxUITextFieldControl();
|
||||
|
||||
virtual wxString GetStringValue() const ;
|
||||
virtual void SetStringValue( const wxString &str) ;
|
||||
virtual void Copy() ;
|
||||
virtual void Cut() ;
|
||||
virtual void Paste() ;
|
||||
virtual bool CanPaste() const ;
|
||||
virtual void SetEditable(bool editable) ;
|
||||
virtual void GetSelection( long* from, long* to) const ;
|
||||
virtual void SetSelection( long from , long to );
|
||||
virtual void WriteText(const wxString& str) ;
|
||||
virtual bool HasOwnContextMenu() const { return true; }
|
||||
|
||||
virtual wxSize GetBestSize() const;
|
||||
|
||||
virtual bool SetHint(const wxString& hint);
|
||||
|
||||
virtual void controlAction(WXWidget slf, void* _cmd, void *sender);
|
||||
protected :
|
||||
UITextField* m_textField;
|
||||
NSObject<UITextFieldDelegate>* m_delegate;
|
||||
long m_selStart;
|
||||
long m_selEnd;
|
||||
};
|
||||
|
||||
class wxUITextViewControl : public wxWidgetIPhoneImpl, public wxTextWidgetImpl
|
||||
{
|
||||
public:
|
||||
wxUITextViewControl( wxTextCtrl *wxPeer, UITextView* w );
|
||||
virtual ~wxUITextViewControl();
|
||||
|
||||
virtual wxString GetStringValue() const ;
|
||||
virtual void SetStringValue( const wxString &str) ;
|
||||
virtual void Copy() ;
|
||||
virtual void Cut() ;
|
||||
virtual void Paste() ;
|
||||
virtual bool CanPaste() const ;
|
||||
virtual void SetEditable(bool editable) ;
|
||||
virtual void GetSelection( long* from, long* to) const ;
|
||||
virtual void SetSelection( long from , long to );
|
||||
virtual void WriteText(const wxString& str) ;
|
||||
virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true );
|
||||
|
||||
virtual bool GetStyle(long position, wxTextAttr& style);
|
||||
virtual void SetStyle(long start, long end, const wxTextAttr& style);
|
||||
|
||||
virtual bool CanFocus() const;
|
||||
|
||||
virtual bool HasOwnContextMenu() const { return true; }
|
||||
|
||||
virtual void CheckSpelling(bool check);
|
||||
virtual wxSize GetBestSize() const;
|
||||
|
||||
protected:
|
||||
NSObject<UITextViewDelegate>* m_delegate;
|
||||
UITextView* m_textView;
|
||||
};
|
||||
|
||||
#if 0
|
||||
class wxNSComboBoxControl : public wxUITextFieldControl, public wxComboWidgetImpl
|
||||
{
|
||||
public :
|
||||
wxNSComboBoxControl( wxWindow *wxPeer, WXWidget w );
|
||||
virtual ~wxNSComboBoxControl();
|
||||
|
||||
virtual int GetSelectedItem() const;
|
||||
virtual void SetSelectedItem(int item);
|
||||
|
||||
virtual int GetNumberOfItems() const;
|
||||
|
||||
virtual void InsertItem(int pos, const wxString& item);
|
||||
virtual void RemoveItem(int pos);
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual wxString GetStringAtIndex(int pos) const;
|
||||
|
||||
virtual int FindString(const wxString& text) const;
|
||||
private:
|
||||
NSComboBox* m_comboBox;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
91
Externals/wxWidgets3/include/wx/osx/joystick.h
vendored
Normal file
91
Externals/wxWidgets3/include/wx/osx/joystick.h
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/joystick.h
|
||||
// Purpose: wxJoystick class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: joystick.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_JOYSTICK_H_
|
||||
#define _WX_JOYSTICK_H_
|
||||
|
||||
#include "wx/event.h"
|
||||
|
||||
class WXDLLIMPEXP_ADV wxJoystick: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxJoystick)
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; };
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxPoint GetPosition() const;
|
||||
int GetPosition(unsigned axis) const;
|
||||
bool GetButtonState(unsigned button) const;
|
||||
int GetZPosition() const;
|
||||
int GetButtonState() const;
|
||||
int GetPOVPosition() const;
|
||||
int GetPOVCTSPosition() const;
|
||||
int GetRudderPosition() const;
|
||||
int GetUPosition() const;
|
||||
int GetVPosition() const;
|
||||
int GetMovementThreshold() const;
|
||||
void SetMovementThreshold(int threshold) ;
|
||||
|
||||
// Capabilities
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool IsOk() const; // Checks that the joystick is functioning
|
||||
static int GetNumberJoysticks() ;
|
||||
int GetManufacturerId() const ;
|
||||
int GetProductId() const ;
|
||||
wxString GetProductName() const ;
|
||||
int GetXMin() const;
|
||||
int GetYMin() const;
|
||||
int GetZMin() const;
|
||||
int GetXMax() const;
|
||||
int GetYMax() const;
|
||||
int GetZMax() const;
|
||||
int GetNumberButtons() const;
|
||||
int GetNumberAxes() const;
|
||||
int GetMaxButtons() const;
|
||||
int GetMaxAxes() const;
|
||||
int GetPollingMin() const;
|
||||
int GetPollingMax() const;
|
||||
int GetRudderMin() const;
|
||||
int GetRudderMax() const;
|
||||
int GetUMin() const;
|
||||
int GetUMax() const;
|
||||
int GetVMin() const;
|
||||
int GetVMax() const;
|
||||
|
||||
bool HasRudder() const;
|
||||
bool HasZ() const;
|
||||
bool HasU() const;
|
||||
bool HasV() const;
|
||||
bool HasPOV() const;
|
||||
bool HasPOV4Dir() const;
|
||||
bool HasPOVCTS() const;
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// pollingFreq = 0 means that movement events are sent when above the threshold.
|
||||
// If pollingFreq > 0, events are received every this many milliseconds.
|
||||
bool SetCapture(wxWindow* win, int pollingFreq = 0);
|
||||
bool ReleaseCapture();
|
||||
|
||||
protected:
|
||||
int m_joystick;
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_JOYSTICK_H_
|
180
Externals/wxWidgets3/include/wx/osx/listbox.h
vendored
Normal file
180
Externals/wxWidgets3/include/wx/osx/listbox.h
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/listbox.h
|
||||
// Purpose: wxListBox class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: listbox.h 65940 2010-10-28 10:27:32Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_LISTBOX_H_
|
||||
#define _WX_LISTBOX_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// simple types
|
||||
// ----------------------------------------------------------------------------
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
// forward decl for GetSelections()
|
||||
class wxArrayInt;
|
||||
|
||||
// forward decl for wxListWidgetImpl implementation type.
|
||||
class wxListWidgetImpl;
|
||||
|
||||
// List box item
|
||||
|
||||
WX_DEFINE_ARRAY( char* , wxListDataArray );
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// List box control
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxListWidgetColumn;
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxListWidgetCellValue;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxListBox();
|
||||
|
||||
wxListBox(
|
||||
wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr)
|
||||
{
|
||||
Create(parent, winid, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
wxListBox(
|
||||
wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr)
|
||||
{
|
||||
Create(parent, winid, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(
|
||||
wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0,
|
||||
const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
bool Create(
|
||||
wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
virtual ~wxListBox();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Refresh(bool eraseBack = true, const wxRect *rect = NULL);
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
|
||||
// data callbacks
|
||||
virtual void GetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value );
|
||||
virtual void SetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value );
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual int GetSelection() const;
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||
|
||||
virtual void EnsureVisible(int n);
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
}
|
||||
|
||||
// wxCheckListBox support
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
wxListWidgetImpl* GetListPeer() const;
|
||||
|
||||
bool MacGetBlockEvents() const { return m_blockEvents; }
|
||||
|
||||
virtual void HandleLineEvent( unsigned int n, bool doubleClick );
|
||||
protected:
|
||||
// callback for derived classes which may have to insert additional data
|
||||
// at a certain line - which cannot be predetermined for sorted list data
|
||||
virtual void OnItemInserted(unsigned int pos);
|
||||
|
||||
virtual void DoClear();
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
|
||||
// from wxItemContainer
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
|
||||
virtual void DoSetItemClientData(unsigned int n, void* clientData);
|
||||
virtual void* DoGetItemClientData(unsigned int n) const;
|
||||
|
||||
// from wxListBoxBase
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
virtual void DoSetFirstItem(int n);
|
||||
virtual int DoListHitTest(const wxPoint& point) const;
|
||||
|
||||
// free memory (common part of Clear() and dtor)
|
||||
// prevent collision with some BSD definitions of macro Free()
|
||||
void FreeData();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
bool m_blockEvents;
|
||||
|
||||
wxListWidgetColumn* m_textColumn;
|
||||
|
||||
// data storage (copied from univ)
|
||||
|
||||
// the array containing all items (it is sorted if the listbox has
|
||||
// wxLB_SORT style)
|
||||
union
|
||||
{
|
||||
wxArrayString *unsorted;
|
||||
wxSortedArrayString *sorted;
|
||||
} m_strings;
|
||||
|
||||
// and this one the client data (either void or wxClientData)
|
||||
wxArrayPtrVoid m_itemsClientData;
|
||||
|
||||
private:
|
||||
#ifdef __WXOSX_CARBON__
|
||||
// It needs to call our CalcAndSendEvent().
|
||||
friend class wxMacDataBrowserListControl;
|
||||
#endif // Carbon
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_LISTBOX_H_
|
426
Externals/wxWidgets3/include/wx/osx/listctrl.h
vendored
Normal file
426
Externals/wxWidgets3/include/wx/osx/listctrl.h
vendored
Normal file
@ -0,0 +1,426 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/listctrl.h
|
||||
// Purpose: wxListCtrl class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: listctrl.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_LISTCTRL_H_
|
||||
#define _WX_LISTCTRL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/generic/listctrl.h"
|
||||
|
||||
#define wxMAC_ALWAYS_USE_GENERIC_LISTCTRL wxT("mac.listctrl.always_use_generic")
|
||||
|
||||
class wxMacDataBrowserListCtrlControl;
|
||||
class wxListCtrlTextCtrlWrapper;
|
||||
class wxListCtrlRenameTimer;
|
||||
|
||||
WX_DECLARE_EXPORTED_LIST(wxListItem, wxColumnList);
|
||||
|
||||
class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListCtrl)
|
||||
public:
|
||||
/*
|
||||
* Public interface
|
||||
*/
|
||||
|
||||
wxListCtrl() { Init(); }
|
||||
|
||||
wxListCtrl(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListCtrlNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
virtual ~wxListCtrl();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLC_ICON,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListCtrlNameStr);
|
||||
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Gets information about this column
|
||||
bool GetColumn(int col, wxListItem& item) const;
|
||||
|
||||
// Sets information about this column
|
||||
// TODO: NOT const to be compatible with wxGenericListCtrl API
|
||||
bool SetColumn(int col, wxListItem& item) ;
|
||||
|
||||
// Gets the column width
|
||||
int GetColumnWidth(int col) const;
|
||||
|
||||
// Sets the column width
|
||||
bool SetColumnWidth(int col, int width) ;
|
||||
|
||||
// Gets the number of items that can fit vertically in the
|
||||
// visible area of the list control (list or report view)
|
||||
// or the total number of items in the list control (icon
|
||||
// or small icon view)
|
||||
int GetCountPerPage() const;
|
||||
|
||||
// Gets the edit control for editing labels.
|
||||
wxTextCtrl* GetEditControl() const;
|
||||
|
||||
// Gets information about the item
|
||||
bool GetItem(wxListItem& info) const ;
|
||||
|
||||
// Sets information about the item
|
||||
bool SetItem(wxListItem& info) ;
|
||||
|
||||
// Sets a string field at a particular column
|
||||
long SetItem(long index, int col, const wxString& label, int imageId = -1);
|
||||
|
||||
// Gets the item state
|
||||
int GetItemState(long item, long stateMask) const ;
|
||||
|
||||
// Sets the item state
|
||||
bool SetItemState(long item, long state, long stateMask) ;
|
||||
|
||||
void AssignImageList(wxImageList *imageList, int which);
|
||||
|
||||
// Sets the item image
|
||||
bool SetItemImage(long item, int image, int selImage = -1) ;
|
||||
bool SetItemColumnImage(long item, long column, int image);
|
||||
|
||||
// Gets the item text
|
||||
wxString GetItemText(long item, int col = 0) const ;
|
||||
|
||||
// Sets the item text
|
||||
void SetItemText(long item, const wxString& str) ;
|
||||
|
||||
void SetItemTextColour(long item, const wxColour& colour) ;
|
||||
wxColour GetItemTextColour(long item) const;
|
||||
|
||||
void SetItemBackgroundColour(long item, const wxColour& colour) ;
|
||||
wxColour GetItemBackgroundColour(long item) const;
|
||||
|
||||
void SetItemFont( long item, const wxFont &f);
|
||||
wxFont GetItemFont( long item ) const;
|
||||
|
||||
// Gets the item data
|
||||
long GetItemData(long item) const ;
|
||||
|
||||
// Sets the item data
|
||||
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||
bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }
|
||||
|
||||
// Gets the item rectangle
|
||||
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
|
||||
|
||||
// Gets the item rectangle of a subitem
|
||||
bool GetSubItemRect( long item, long subItem, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
|
||||
|
||||
// Gets the item position
|
||||
bool GetItemPosition(long item, wxPoint& pos) const ;
|
||||
|
||||
// Sets the item position
|
||||
bool SetItemPosition(long item, const wxPoint& pos) ;
|
||||
|
||||
// Gets the number of items in the list control
|
||||
int GetItemCount() const;
|
||||
|
||||
// Gets the number of columns in the list control
|
||||
int GetColumnCount() const;
|
||||
|
||||
void SetItemSpacing( int spacing, bool isSmall = false );
|
||||
wxSize GetItemSpacing() const;
|
||||
|
||||
// Gets the number of selected items in the list control
|
||||
int GetSelectedItemCount() const;
|
||||
|
||||
wxRect GetViewRect() const;
|
||||
|
||||
// Gets the text colour of the listview
|
||||
wxColour GetTextColour() const;
|
||||
|
||||
// Sets the text colour of the listview
|
||||
void SetTextColour(const wxColour& col);
|
||||
|
||||
// Gets the index of the topmost visible item when in
|
||||
// list or report view
|
||||
long GetTopItem() const ;
|
||||
|
||||
// are we in report mode?
|
||||
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
||||
|
||||
bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
|
||||
|
||||
// Add or remove a single window style
|
||||
void SetSingleStyle(long style, bool add = true) ;
|
||||
|
||||
// Set the whole window style
|
||||
void SetWindowStyleFlag(long style) ;
|
||||
|
||||
// Searches for an item, starting from 'item'.
|
||||
// item can be -1 to find the first item that matches the
|
||||
// specified flags.
|
||||
// Returns the item or -1 if unsuccessful.
|
||||
long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ;
|
||||
|
||||
// Implementation: converts wxWidgets style to MSW style.
|
||||
// Can be a single style flag or a bit list.
|
||||
// oldStyle is 'normalised' so that it doesn't contain
|
||||
// conflicting styles.
|
||||
long ConvertToMSWStyle(long& oldStyle, long style) const;
|
||||
|
||||
// Gets one of the three image lists
|
||||
wxImageList *GetImageList(int which) const ;
|
||||
|
||||
// Sets the image list
|
||||
// N.B. There's a quirk in the Win95 list view implementation.
|
||||
// If in wxLC_LIST mode, it'll *still* display images by the labels if
|
||||
// there's a small-icon image list set for the control - even though you
|
||||
// haven't specified wxLIST_MASK_IMAGE when inserting.
|
||||
// So you have to set a NULL small-icon image list to be sure that
|
||||
// the wxLC_LIST mode works without icons. Of course, you may want icons...
|
||||
void SetImageList(wxImageList *imageList, int which) ;
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Arranges the items
|
||||
bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
|
||||
|
||||
// Deletes an item
|
||||
bool DeleteItem(long item);
|
||||
|
||||
// Deletes all items
|
||||
bool DeleteAllItems() ;
|
||||
|
||||
// Deletes a column
|
||||
bool DeleteColumn(int col);
|
||||
|
||||
// Deletes all columns
|
||||
bool DeleteAllColumns();
|
||||
|
||||
// Clears items, and columns if there are any.
|
||||
void ClearAll();
|
||||
|
||||
// Edit the label
|
||||
wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl));
|
||||
|
||||
// End label editing, optionally cancelling the edit
|
||||
bool EndEditLabel(bool cancel);
|
||||
|
||||
// Ensures this item is visible
|
||||
bool EnsureVisible(long item) ;
|
||||
|
||||
// Find an item whose label matches this string, starting from the item after 'start'
|
||||
// or the beginning if 'start' is -1.
|
||||
long FindItem(long start, const wxString& str, bool partial = false);
|
||||
|
||||
// Find an item whose data matches this data, starting from the item after 'start'
|
||||
// or the beginning if 'start' is -1.
|
||||
long FindItem(long start, long data);
|
||||
|
||||
// Find an item nearest this position in the specified direction, starting from
|
||||
// the item after 'start' or the beginning if 'start' is -1.
|
||||
long FindItem(long start, const wxPoint& pt, int direction);
|
||||
|
||||
// Determines which item (if any) is at the specified point,
|
||||
// giving details in 'flags' (see wxLIST_HITTEST_... flags above)
|
||||
// Request the subitem number as well at the given coordinate.
|
||||
long HitTest(const wxPoint& point, int& flags, long* ptrSubItem = NULL) const;
|
||||
|
||||
// Inserts an item, returning the index of the new item if successful,
|
||||
// -1 otherwise.
|
||||
// TOD: Should also have some further convenience functions
|
||||
// which don't require setting a wxListItem object
|
||||
long InsertItem(wxListItem& info);
|
||||
|
||||
// Insert a string item
|
||||
long InsertItem(long index, const wxString& label);
|
||||
|
||||
// Insert an image item
|
||||
long InsertItem(long index, int imageIndex);
|
||||
|
||||
// Insert an image/string item
|
||||
long InsertItem(long index, const wxString& label, int imageIndex);
|
||||
|
||||
// For list view mode (only), inserts a column.
|
||||
long InsertColumn(long col, wxListItem& info);
|
||||
|
||||
long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT,
|
||||
int width = -1);
|
||||
|
||||
// Scrolls the list control. If in icon, small icon or report view mode,
|
||||
// x specifies the number of pixels to scroll. If in list view mode, x
|
||||
// specifies the number of columns to scroll.
|
||||
// If in icon, small icon or list view mode, y specifies the number of pixels
|
||||
// to scroll. If in report view mode, y specifies the number of lines to scroll.
|
||||
bool ScrollList(int dx, int dy);
|
||||
|
||||
// Sort items.
|
||||
|
||||
// fn is a function which takes 3 long arguments: item1, item2, data.
|
||||
// item1 is the long data associated with a first item (NOT the index).
|
||||
// item2 is the long data associated with a second item (NOT the index).
|
||||
// data is the same value as passed to SortItems.
|
||||
// The return value is a negative number if the first item should precede the second
|
||||
// item, a positive number of the second item should precede the first,
|
||||
// or zero if the two items are equivalent.
|
||||
|
||||
// data is arbitrary data to be passed to the sort function.
|
||||
bool SortItems(wxListCtrlCompare fn, wxIntPtr data);
|
||||
|
||||
wxMacDataBrowserListCtrlControl* GetListPeer() const;
|
||||
|
||||
// these functions are only used for virtual list view controls, i.e. the
|
||||
// ones with wxLC_VIRTUAL style
|
||||
|
||||
void SetItemCount(long count);
|
||||
void RefreshItem(long item);
|
||||
void RefreshItems(long itemFrom, long itemTo);
|
||||
|
||||
// return the text for the given column of the given item
|
||||
virtual wxString OnGetItemText(long item, long column) const;
|
||||
|
||||
// return the icon for the given item. In report view, OnGetItemImage will
|
||||
// only be called for the first column. See OnGetItemColumnImage for
|
||||
// details.
|
||||
virtual int OnGetItemImage(long item) const;
|
||||
|
||||
// return the icon for the given item and column.
|
||||
virtual int OnGetItemColumnImage(long item, long column) const;
|
||||
|
||||
// return the attribute for the item (may return NULL if none)
|
||||
virtual wxListItemAttr *OnGetItemAttr(long item) const;
|
||||
|
||||
/* Why should we need this function? Leave for now.
|
||||
* We might need it because item data may have changed,
|
||||
* but the display needs refreshing (in string callback mode)
|
||||
// Updates an item. If the list control has the wxLI_AUTO_ARRANGE style,
|
||||
// the items will be rearranged.
|
||||
bool Update(long item);
|
||||
*/
|
||||
|
||||
void Command(wxCommandEvent& event) { ProcessCommand(event); };
|
||||
|
||||
wxListCtrlCompare GetCompareFunc() { return m_compareFunc; };
|
||||
wxIntPtr GetCompareFuncData() { return m_compareFuncData; };
|
||||
|
||||
|
||||
// public overrides needed for pimpl approach
|
||||
virtual bool SetFont(const wxFont& font);
|
||||
virtual bool SetForegroundColour(const wxColour& colour);
|
||||
virtual bool SetBackgroundColour(const wxColour& colour);
|
||||
virtual wxColour GetBackgroundColour() const;
|
||||
|
||||
virtual void Freeze ();
|
||||
virtual void Thaw ();
|
||||
virtual void Update ();
|
||||
|
||||
// functions for editing/timer
|
||||
void OnRenameTimer();
|
||||
bool OnRenameAccept(long itemEdit, const wxString& value);
|
||||
void OnRenameCancelled(long itemEdit);
|
||||
|
||||
void ChangeCurrent(long current);
|
||||
void ResetCurrent() { ChangeCurrent((long)-1); }
|
||||
bool HasCurrent() const { return m_current != (long)-1; }
|
||||
|
||||
void OnLeftDown(wxMouseEvent& event);
|
||||
void OnDblClick(wxMouseEvent& event);
|
||||
|
||||
void FinishEditing(wxTextCtrl *text)
|
||||
{
|
||||
delete text;
|
||||
m_textctrlWrapper = NULL;
|
||||
SetFocus();
|
||||
}
|
||||
|
||||
virtual int GetScrollPos(int orient) const;
|
||||
|
||||
void OnRightDown(wxMouseEvent& event);
|
||||
void OnMiddleDown(wxMouseEvent& event);
|
||||
void OnChar(wxKeyEvent& event);
|
||||
virtual void SetFocus();
|
||||
void FireMouseEvent(wxEventType eventType, wxPoint position);
|
||||
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
||||
virtual wxDropTarget* GetDropTarget() const;
|
||||
|
||||
// with CG, we need to get the context from an kEventControlDraw event
|
||||
// unfortunately, the DataBrowser callbacks don't provide the context
|
||||
// and we need it, so we need to set/remove it before and after draw
|
||||
// events so we can access it in the callbacks.
|
||||
void MacSetDrawingContext(void* context) { m_cgContext = context; }
|
||||
void* MacGetDrawingContext() { return m_cgContext; }
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const
|
||||
{
|
||||
return GetClassDefaultAttributes(GetWindowVariant());
|
||||
}
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
|
||||
// protected overrides needed for pimpl approach
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
long m_current;
|
||||
wxListCtrlTextCtrlWrapper *m_textctrlWrapper;
|
||||
wxListCtrlRenameTimer *m_renameTimer;
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
wxGenericListCtrl* m_genericImpl; // allow use of the generic impl.
|
||||
wxMacDataBrowserListCtrlControl* m_dbImpl;
|
||||
void* m_macListCtrlEventHandler;
|
||||
void* m_cgContext;
|
||||
wxListCtrlCompare m_compareFunc;
|
||||
wxIntPtr m_compareFuncData;
|
||||
|
||||
wxTextCtrl* m_textCtrl; // The control used for editing a label
|
||||
wxImageList * m_imageListNormal; // The image list for normal icons
|
||||
wxImageList * m_imageListSmall; // The image list for small icons
|
||||
wxImageList * m_imageListState; // The image list state icons (not implemented yet)
|
||||
|
||||
wxColumnList m_colsInfo; // for storing info about each column
|
||||
wxColour m_textColor;
|
||||
wxColour m_bgColor;
|
||||
|
||||
// keep track of whether or not we should delete the image list ourselves.
|
||||
bool m_ownsImageListNormal,
|
||||
m_ownsImageListSmall,
|
||||
m_ownsImageListState;
|
||||
|
||||
long m_baseStyle; // Basic Windows style flags, for recreation purposes
|
||||
int m_colCount; // Windows doesn't have GetColumnCount so must
|
||||
// keep track of inserted/deleted columns
|
||||
|
||||
int m_count; // for virtual lists, store item count
|
||||
|
||||
private:
|
||||
int CalcColumnAutoWidth(int col) const;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_LISTCTRL_H_
|
154
Externals/wxWidgets3/include/wx/osx/mdi.h
vendored
Normal file
154
Externals/wxWidgets3/include/wx/osx/mdi.h
vendored
Normal file
@ -0,0 +1,154 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/mdi.h
|
||||
// Purpose: MDI (Multiple Document Interface) classes.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: mdi.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// (c) 2008 Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_CARBON_MDI_H_
|
||||
#define _WX_OSX_CARBON_MDI_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase
|
||||
{
|
||||
public:
|
||||
wxMDIParentFrame() { Init(); }
|
||||
wxMDIParentFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxMDIParentFrame();
|
||||
|
||||
// implement/override base class [pure] virtuals
|
||||
// ---------------------------------------------
|
||||
|
||||
static bool IsTDI() { return false; }
|
||||
|
||||
virtual void AddChild(wxWindowBase *child);
|
||||
virtual void RemoveChild(wxWindowBase *child);
|
||||
|
||||
virtual void ActivateNext() { /* TODO */ }
|
||||
virtual void ActivatePrevious() { /* TODO */ }
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
|
||||
// Mac-specific implementation from now on
|
||||
// ---------------------------------------
|
||||
|
||||
// Mac OS activate event
|
||||
virtual void MacActivate(long timestamp, bool activating);
|
||||
|
||||
// wxWidgets activate event
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
void SetMenuBar(wxMenuBar *menu_bar);
|
||||
|
||||
// Get rect to be used to center top-level children
|
||||
virtual void GetRectForTopLevelChildren(int *x, int *y, int *w, int *h);
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// returns true if this frame has some contents and so should be visible,
|
||||
// false if it's used solely as container for its children
|
||||
bool ShouldBeVisible() const;
|
||||
|
||||
|
||||
wxMenu *m_windowMenu;
|
||||
|
||||
// true if MDI Frame is intercepting commands, not child
|
||||
bool m_parentFrameActive;
|
||||
|
||||
// true if the frame should be shown but is not because it is empty and
|
||||
// useless otherwise than a container for its children
|
||||
bool m_shouldBeShown;
|
||||
|
||||
private:
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxMDIChildFrameBase
|
||||
{
|
||||
public:
|
||||
wxMDIChildFrame() { Init(); }
|
||||
wxMDIChildFrame(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init() ;
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxMDIChildFrame();
|
||||
|
||||
// un-override the base class override
|
||||
virtual bool IsTopLevel() const { return true; }
|
||||
|
||||
// implement MDI operations
|
||||
virtual void Activate();
|
||||
|
||||
|
||||
// Mac OS activate event
|
||||
virtual void MacActivate(long timestamp, bool activating);
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase
|
||||
{
|
||||
public:
|
||||
wxMDIClientWindow() { }
|
||||
virtual ~wxMDIClientWindow();
|
||||
|
||||
virtual bool CreateClient(wxMDIParentFrame *parent,
|
||||
long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
protected:
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_CARBON_MDI_H_
|
182
Externals/wxWidgets3/include/wx/osx/menu.h
vendored
Normal file
182
Externals/wxWidgets3/include/wx/osx/menu.h
vendored
Normal file
@ -0,0 +1,182 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/menu.h
|
||||
// Purpose: wxMenu, wxMenuBar classes
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: menu.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MENU_H_
|
||||
#define _WX_MENU_H_
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFrame;
|
||||
|
||||
#include "wx/arrstr.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenuImpl ;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase
|
||||
{
|
||||
public:
|
||||
// ctors & dtor
|
||||
wxMenu(const wxString& title, long style = 0)
|
||||
: wxMenuBase(title, style) { Init(); }
|
||||
|
||||
wxMenu(long style = 0) : wxMenuBase(style) { Init(); }
|
||||
|
||||
virtual ~wxMenu();
|
||||
|
||||
virtual void Attach(wxMenuBarBase *menubar) ;
|
||||
|
||||
virtual void Break();
|
||||
|
||||
virtual void SetTitle(const wxString& title);
|
||||
|
||||
bool ProcessCommand(wxCommandEvent& event);
|
||||
|
||||
// get the menu handle
|
||||
WXHMENU GetHMenu() const ;
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
bool HandleCommandUpdateStatus( wxMenuItem* menuItem, wxWindow* senderWindow = NULL);
|
||||
bool HandleCommandProcess( wxMenuItem* menuItem, wxWindow* senderWindow = NULL);
|
||||
void HandleMenuItemHighlighted( wxMenuItem* menuItem );
|
||||
void HandleMenuOpened();
|
||||
void HandleMenuClosed();
|
||||
|
||||
wxMenuImpl* GetPeer() { return m_peer; }
|
||||
|
||||
// make sure we can veto
|
||||
void SetAllowRearrange( bool allow );
|
||||
bool AllowRearrange() const { return m_allowRearrange; }
|
||||
|
||||
// if a menu is used purely for internal implementation reasons (eg wxChoice)
|
||||
// we don't want native menu events being triggered
|
||||
void SetNoEventsMode( bool noEvents );
|
||||
bool GetNoEventsMode() const { return m_noEventsMode; }
|
||||
protected:
|
||||
// hide special menu items like exit, preferences etc
|
||||
// that are expected in the app menu
|
||||
void DoRearrange() ;
|
||||
|
||||
bool DoHandleMenuEvent( wxEvent& evt );
|
||||
virtual wxMenuItem* DoAppend(wxMenuItem *item);
|
||||
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
|
||||
virtual wxMenuItem* DoRemove(wxMenuItem *item);
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// common part of Append/Insert (behaves as Append is pos == (size_t)-1)
|
||||
bool DoInsertOrAppend(wxMenuItem *item, size_t pos = (size_t)-1);
|
||||
|
||||
// terminate the current radio group, if any
|
||||
void EndRadioGroup();
|
||||
|
||||
// if TRUE, insert a breal before appending the next item
|
||||
bool m_doBreak;
|
||||
|
||||
// in this menu rearranging of menu items (esp hiding) is allowed
|
||||
bool m_allowRearrange;
|
||||
|
||||
// don't trigger native events
|
||||
bool m_noEventsMode;
|
||||
|
||||
// the position of the first item in the current radio group or -1
|
||||
int m_startRadioGroup;
|
||||
|
||||
wxMenuImpl* m_peer;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
};
|
||||
|
||||
#if wxOSX_USE_COCOA_OR_CARBON
|
||||
|
||||
// the iphone only has popup-menus
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu Bar (a la Windows)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase
|
||||
{
|
||||
public:
|
||||
// ctors & dtor
|
||||
// default constructor
|
||||
wxMenuBar();
|
||||
// unused under MSW
|
||||
wxMenuBar(long style);
|
||||
// menubar takes ownership of the menus arrays but copies the titles
|
||||
wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0);
|
||||
virtual ~wxMenuBar();
|
||||
|
||||
// menubar construction
|
||||
virtual bool Append( wxMenu *menu, const wxString &title );
|
||||
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
|
||||
virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
|
||||
virtual wxMenu *Remove(size_t pos);
|
||||
|
||||
virtual void EnableTop( size_t pos, bool flag );
|
||||
virtual void SetMenuLabel( size_t pos, const wxString& label );
|
||||
virtual wxString GetMenuLabel( size_t pos ) const;
|
||||
virtual bool Enable( bool enable = true );
|
||||
// for virtual function hiding
|
||||
virtual void Enable( int itemid, bool enable )
|
||||
{
|
||||
wxMenuBarBase::Enable( itemid, enable );
|
||||
}
|
||||
|
||||
// implementation from now on
|
||||
void Detach();
|
||||
|
||||
// returns TRUE if we're attached to a frame
|
||||
bool IsAttached() const { return m_menuBarFrame != NULL; }
|
||||
// get the frame we live in
|
||||
wxFrame *GetFrame() const { return m_menuBarFrame; }
|
||||
// attach to a frame
|
||||
void Attach(wxFrame *frame);
|
||||
|
||||
// if the menubar is modified, the display is not updated automatically,
|
||||
// call this function to update it (m_menuBarFrame should be !NULL)
|
||||
void Refresh(bool eraseBackground = true, const wxRect *rect = NULL);
|
||||
|
||||
static void SetAutoWindowMenu( bool enable ) { s_macAutoWindowMenu = enable ; }
|
||||
static bool GetAutoWindowMenu() { return s_macAutoWindowMenu ; }
|
||||
|
||||
void MacInstallMenuBar() ;
|
||||
static wxMenuBar* MacGetInstalledMenuBar() { return s_macInstalledMenuBar ; }
|
||||
static void MacSetCommonMenuBar(wxMenuBar* menubar) { s_macCommonMenuBar=menubar; }
|
||||
static wxMenuBar* MacGetCommonMenuBar() { return s_macCommonMenuBar; }
|
||||
|
||||
|
||||
static WXHMENU MacGetWindowMenuHMenu() { return s_macWindowMenuHandle ; }
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
static bool s_macAutoWindowMenu ;
|
||||
static WXHMENU s_macWindowMenuHandle ;
|
||||
|
||||
private:
|
||||
static wxMenuBar* s_macInstalledMenuBar ;
|
||||
static wxMenuBar* s_macCommonMenuBar ;
|
||||
|
||||
wxMenu* m_rootMenu;
|
||||
wxMenu* m_appleMenu;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_MENU_H_
|
83
Externals/wxWidgets3/include/wx/osx/menuitem.h
vendored
Normal file
83
Externals/wxWidgets3/include/wx/osx/menuitem.h
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/menuitem.h
|
||||
// Purpose: wxMenuItem class
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 11.11.97
|
||||
// RCS-ID: $Id: menuitem.h 66904 2011-02-16 16:37:24Z SC $
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MENUITEM_H
|
||||
#define _MENUITEM_H
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenuItemImpl ;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuItem: public wxMenuItemBase
|
||||
{
|
||||
public:
|
||||
// ctor & dtor
|
||||
wxMenuItem(wxMenu *parentMenu = NULL,
|
||||
int id = wxID_SEPARATOR,
|
||||
const wxString& name = wxEmptyString,
|
||||
const wxString& help = wxEmptyString,
|
||||
wxItemKind kind = wxITEM_NORMAL,
|
||||
wxMenu *subMenu = NULL);
|
||||
virtual ~wxMenuItem();
|
||||
|
||||
// override base class virtuals
|
||||
virtual void SetItemLabel(const wxString& strName);
|
||||
|
||||
virtual void Enable(bool bDoEnable = true);
|
||||
virtual void Check(bool bDoCheck = true);
|
||||
|
||||
virtual void SetBitmap(const wxBitmap& bitmap) ;
|
||||
virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
|
||||
|
||||
// update the os specific representation
|
||||
void UpdateItemBitmap() ;
|
||||
void UpdateItemText() ;
|
||||
void UpdateItemStatus() ;
|
||||
|
||||
// mark item as belonging to the given radio group
|
||||
void SetAsRadioGroupStart();
|
||||
void SetRadioGroupStart(int start);
|
||||
void SetRadioGroupEnd(int end);
|
||||
|
||||
wxMenuItemImpl* GetPeer() { return m_peer; }
|
||||
private:
|
||||
void UncheckRadio() ;
|
||||
|
||||
// the positions of the first and last items of the radio group this item
|
||||
// belongs to or -1: start is the radio group start and is valid for all
|
||||
// but first radio group items (m_isRadioGroupStart == FALSE), end is valid
|
||||
// only for the first one
|
||||
union
|
||||
{
|
||||
int start;
|
||||
int end;
|
||||
} m_radioGroup;
|
||||
|
||||
// does this item start a radio group?
|
||||
bool m_isRadioGroupStart;
|
||||
|
||||
wxBitmap m_bitmap; // Bitmap for menuitem, if any
|
||||
|
||||
wxMenuItemImpl* m_peer;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuItem)
|
||||
};
|
||||
|
||||
#endif //_MENUITEM_H
|
178
Externals/wxWidgets3/include/wx/osx/metafile.h
vendored
Normal file
178
Externals/wxWidgets3/include/wx/osx/metafile.h
vendored
Normal file
@ -0,0 +1,178 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/metafile.h
|
||||
// Purpose: wxMetaFile, wxMetaFileDC classes.
|
||||
// This probably should be restricted to Windows platforms,
|
||||
// but if there is an equivalent on your platform, great.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: metafile.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_METAFIILE_H_
|
||||
#define _WX_METAFIILE_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
#if wxUSE_DATAOBJ
|
||||
#include "wx/dataobj.h"
|
||||
#endif
|
||||
|
||||
#include "wx/osx/dcclient.h"
|
||||
|
||||
/*
|
||||
* Metafile and metafile device context classes
|
||||
*
|
||||
*/
|
||||
|
||||
#define wxMetaFile wxMetafile
|
||||
#define wxMetaFileDC wxMetafileDC
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMetafile;
|
||||
class wxMetafileRefData ;
|
||||
|
||||
#define M_METAFILEDATA ((wxMetafileRefData *)m_refData)
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMetafile : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxMetafile(const wxString& file = wxEmptyString);
|
||||
virtual ~wxMetafile(void);
|
||||
|
||||
// After this is called, the metafile cannot be used for anything
|
||||
// since it is now owned by the clipboard.
|
||||
virtual bool SetClipboard(int width = 0, int height = 0);
|
||||
|
||||
virtual bool Play(wxDC *dc);
|
||||
|
||||
wxSize GetSize() const;
|
||||
int GetWidth() const { return GetSize().x; }
|
||||
int GetHeight() const { return GetSize().y; }
|
||||
|
||||
// Implementation
|
||||
WXHMETAFILE GetHMETAFILE() const ;
|
||||
void SetHMETAFILE(WXHMETAFILE mf) ;
|
||||
#if wxOSX_USE_COCOA_OR_CARBON && !defined( __LP64__ )
|
||||
// Since the native metafile format is PDF for Quartz
|
||||
// we need a call that allows setting PICT content for
|
||||
// backwards compatibility
|
||||
void SetPICT(void* pictHandle) ;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMetafile)
|
||||
};
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMetafileDCImpl: public wxGCDCImpl
|
||||
{
|
||||
public:
|
||||
wxMetafileDCImpl( wxDC *owner,
|
||||
const wxString& filename,
|
||||
int width, int height,
|
||||
const wxString& description );
|
||||
|
||||
virtual ~wxMetafileDCImpl();
|
||||
|
||||
// Should be called at end of drawing
|
||||
virtual wxMetafile *Close();
|
||||
|
||||
// Implementation
|
||||
wxMetafile *GetMetaFile(void) const { return m_metaFile; }
|
||||
void SetMetaFile(wxMetafile *mf) { m_metaFile = mf; }
|
||||
|
||||
protected:
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
wxMetafile* m_metaFile;
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxMetafileDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxMetafileDCImpl);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMetafileDC: public wxDC
|
||||
{
|
||||
public:
|
||||
// the ctor parameters specify the filename (empty for memory metafiles),
|
||||
// the metafile picture size and the optional description/comment
|
||||
wxMetafileDC( const wxString& filename = wxEmptyString,
|
||||
int width = 0, int height = 0,
|
||||
const wxString& description = wxEmptyString ) :
|
||||
wxDC( new wxMetafileDCImpl( this, filename, width, height, description) )
|
||||
{ }
|
||||
|
||||
wxMetafile *GetMetafile() const
|
||||
{ return ((wxMetafileDCImpl*)m_pimpl)->GetMetaFile(); }
|
||||
|
||||
wxMetafile *Close()
|
||||
{ return ((wxMetafileDCImpl*)m_pimpl)->Close(); }
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxMetafileDC)
|
||||
wxDECLARE_NO_COPY_CLASS(wxMetafileDC);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Pass filename of existing non-placeable metafile, and bounding box.
|
||||
* Adds a placeable metafile header, sets the mapping mode to anisotropic,
|
||||
* and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
|
||||
*
|
||||
*/
|
||||
|
||||
// No origin or extent
|
||||
#define wxMakeMetaFilePlaceable wxMakeMetafilePlaceable
|
||||
bool WXDLLIMPEXP_CORE wxMakeMetafilePlaceable(const wxString& filename, float scale = 1.0);
|
||||
|
||||
// Optional origin and extent
|
||||
bool WXDLLIMPEXP_CORE wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = true);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMetafileDataObject is a specialization of wxDataObject for metafile data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_DATAOBJ
|
||||
class WXDLLIMPEXP_CORE wxMetafileDataObject : public wxDataObjectSimple
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxMetafileDataObject()
|
||||
: wxDataObjectSimple(wxDF_METAFILE) { };
|
||||
wxMetafileDataObject(const wxMetafile& metafile)
|
||||
: wxDataObjectSimple(wxDF_METAFILE), m_metafile(metafile) { }
|
||||
|
||||
// virtual functions which you may override if you want to provide data on
|
||||
// demand only - otherwise, the trivial default versions will be used
|
||||
virtual void SetMetafile(const wxMetafile& metafile)
|
||||
{ m_metafile = metafile; }
|
||||
virtual wxMetafile GetMetafile() const
|
||||
{ return m_metafile; }
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual size_t GetDataSize() const;
|
||||
virtual bool GetDataHere(void *buf) const;
|
||||
virtual bool SetData(size_t len, const void *buf);
|
||||
|
||||
virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const
|
||||
{ return GetDataSize(); }
|
||||
virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format),
|
||||
void *buf) const
|
||||
{ return GetDataHere(buf); }
|
||||
virtual bool SetData(const wxDataFormat& WXUNUSED(format),
|
||||
size_t len, const void *buf)
|
||||
{ return SetData(len, buf); }
|
||||
protected:
|
||||
wxMetafile m_metafile;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_METAFIILE_H_
|
1
Externals/wxWidgets3/include/wx/osx/mimetype.h
vendored
Normal file
1
Externals/wxWidgets3/include/wx/osx/mimetype.h
vendored
Normal file
@ -0,0 +1 @@
|
||||
#include "wx/osx/core/mimetype.h"
|
42
Externals/wxWidgets3/include/wx/osx/minifram.h
vendored
Normal file
42
Externals/wxWidgets3/include/wx/osx/minifram.h
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/minifram.h
|
||||
// Purpose: wxMiniFrame class. A small frame for e.g. floating toolbars.
|
||||
// If there is no equivalent on your platform, just make it a
|
||||
// normal frame.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: minifram.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MINIFRAM_H_
|
||||
#define _WX_MINIFRAM_H_
|
||||
|
||||
#include "wx/frame.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame {
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
|
||||
|
||||
public:
|
||||
inline wxMiniFrame() {}
|
||||
inline wxMiniFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
// Use wxFrame constructor in absence of more specific code.
|
||||
Create(parent, id, title, pos, size, style | wxFRAME_TOOL_WINDOW | wxFRAME_FLOAT_ON_PARENT , name);
|
||||
}
|
||||
|
||||
virtual ~wxMiniFrame() {}
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_MINIFRAM_H_
|
48
Externals/wxWidgets3/include/wx/osx/msgdlg.h
vendored
Normal file
48
Externals/wxWidgets3/include/wx/osx/msgdlg.h
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/msgdlg.h
|
||||
// Purpose: wxMessageDialog class. Use generic version if no
|
||||
// platform-specific implementation.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: msgdlg.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSGBOXDLG_H_
|
||||
#define _WX_MSGBOXDLG_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase
|
||||
{
|
||||
public:
|
||||
wxMessageDialog(wxWindow *parent,
|
||||
const wxString& message,
|
||||
const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE,
|
||||
const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void ShowWindowModal();
|
||||
virtual void ModalFinishedCallback(void* panel, int resultCode);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// not supported for message dialog
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
void* ConstructNSAlert();
|
||||
#endif
|
||||
|
||||
int m_buttonId[3];
|
||||
int m_buttonCount;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
|
||||
};
|
||||
|
||||
#endif // _WX_MSGBOXDLG_H_
|
144
Externals/wxWidgets3/include/wx/osx/nonownedwnd.h
vendored
Normal file
144
Externals/wxWidgets3/include/wx/osx/nonownedwnd.h
vendored
Normal file
@ -0,0 +1,144 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/nonownedwnd.h
|
||||
// Purpose: declares wxNonOwnedWindow class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 2008-03-24
|
||||
// RCS-ID: $Id: nonownedwnd.h 67232 2011-03-18 15:10:15Z DS $
|
||||
// Copyright: (c) 2008 Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_NONOWNEDWND_H_
|
||||
#define _WX_MAC_NONOWNEDWND_H_
|
||||
|
||||
#include "wx/window.h"
|
||||
|
||||
#if wxUSE_SYSTEM_OPTIONS
|
||||
#define wxMAC_WINDOW_PLAIN_TRANSITION wxT("mac.window-plain-transition")
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxNonOwnedWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// This class represents "non-owned" window. A window is owned by another
|
||||
// window if it has a parent and is positioned within the parent. For example,
|
||||
// wxFrame is non-owned, because even though it can have a parent, it's
|
||||
// location is independent of it. This class is for internal use only, it's
|
||||
// the base class for wxTopLevelWindow and wxPopupWindow.
|
||||
|
||||
class wxNonOwnedWindowImpl;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxWindow
|
||||
{
|
||||
public:
|
||||
// constructors and such
|
||||
wxNonOwnedWindow() { Init(); }
|
||||
|
||||
wxNonOwnedWindow(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
bool Create(wxWindow *parent, WXWindow nativeWindow);
|
||||
|
||||
virtual ~wxNonOwnedWindow();
|
||||
|
||||
virtual void SubclassWin(WXWindow nativeWindow);
|
||||
virtual void UnsubclassWin();
|
||||
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
// implement base class pure virtuals
|
||||
|
||||
virtual bool SetTransparent(wxByte alpha);
|
||||
virtual bool CanSetTransparent();
|
||||
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style);
|
||||
|
||||
virtual void Update();
|
||||
|
||||
WXWindow GetWXWindow() const ;
|
||||
static wxNonOwnedWindow* GetFromWXWindow( WXWindow win );
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
virtual bool DoSetShape(const wxRegion& region);
|
||||
const wxRegion& GetShape() const { return m_shape; }
|
||||
|
||||
// activation hooks only necessary for MDI Implementation
|
||||
static void MacDelayedDeactivation(long timestamp);
|
||||
virtual void MacActivate( long timestamp , bool inIsActivating ) ;
|
||||
|
||||
virtual void SetWindowStyleFlag(long flags);
|
||||
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
virtual bool Show( bool show = true );
|
||||
|
||||
virtual void SetExtraStyle(long exStyle) ;
|
||||
|
||||
virtual bool SetBackgroundColour( const wxColour &colour );
|
||||
|
||||
wxNonOwnedWindowImpl* GetNonOwnedPeer() const { return m_nowpeer; }
|
||||
|
||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||
// override the base class method to return an NSWindow instead of NSView
|
||||
virtual void *OSXGetViewOrWindow() const { return GetWXWindow(); }
|
||||
#endif // Cocoa
|
||||
|
||||
// osx specific event handling common for all osx-ports
|
||||
|
||||
virtual void HandleActivated( double timestampsec, bool didActivate );
|
||||
virtual void HandleResized( double timestampsec );
|
||||
virtual void HandleMoved( double timestampsec );
|
||||
virtual void HandleResizing( double timestampsec, wxRect* rect );
|
||||
|
||||
virtual bool Destroy();
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
virtual void DoGetPosition( int *x, int *y ) const;
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
||||
virtual bool OSXShowWithEffect(bool show,
|
||||
wxShowEffect effect,
|
||||
unsigned timeout);
|
||||
|
||||
virtual void WillBeDestroyed();
|
||||
|
||||
wxNonOwnedWindowImpl* m_nowpeer ;
|
||||
|
||||
// wxWindowMac* m_macFocus ;
|
||||
|
||||
static wxNonOwnedWindow *s_macDeactivateWindow;
|
||||
|
||||
private :
|
||||
wxRegion m_shape;
|
||||
};
|
||||
|
||||
// list of all frames and modeless dialogs
|
||||
extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxModelessWindows;
|
||||
|
||||
|
||||
#endif // _WX_MAC_NONOWNEDWND_H_
|
142
Externals/wxWidgets3/include/wx/osx/notebook.h
vendored
Normal file
142
Externals/wxWidgets3/include/wx/osx/notebook.h
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/notebook.h
|
||||
// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet)
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// RCS-ID: $Id: notebook.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_NOTEBOOK_H_
|
||||
#define _WX_NOTEBOOK_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
#include "wx/event.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// fwd declarations
|
||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNotebook
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
// -----
|
||||
// default for dynamic class
|
||||
wxNotebook() { }
|
||||
// the same arguments as for wxControl (@@@ any special styles?)
|
||||
wxNotebook(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxNotebookNameStr)
|
||||
{ Create( parent, id, pos, size, style, name ); }
|
||||
// Create() function
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxNotebookNameStr);
|
||||
// dtor
|
||||
virtual ~wxNotebook();
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
// set the currently selected page, return the index of the previously
|
||||
// selected one (or wxNOT_FOUND on error)
|
||||
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
|
||||
int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); }
|
||||
|
||||
// changes selected page without sending events
|
||||
int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); }
|
||||
|
||||
// set/get the title of a page
|
||||
bool SetPageText(size_t nPage, const wxString& strText);
|
||||
wxString GetPageText(size_t nPage) const;
|
||||
|
||||
// sets/returns item's image index in the current image list
|
||||
int GetPageImage(size_t nPage) const;
|
||||
bool SetPageImage(size_t nPage, int nImage);
|
||||
|
||||
// control the appearance of the notebook pages
|
||||
// set the size (the same for all pages)
|
||||
virtual void SetPageSize(const wxSize& size);
|
||||
// set the padding between tabs (in pixels)
|
||||
virtual void SetPadding(const wxSize& padding);
|
||||
// sets the size of the tabs (assumes all tabs are the same size)
|
||||
virtual void SetTabSize(const wxSize& sz);
|
||||
|
||||
// hit test
|
||||
virtual int HitTest(const wxPoint& pt, long *flags = NULL) const;
|
||||
|
||||
// calculate size for wxNotebookSizer
|
||||
wxSize CalcSizeFromPage(const wxSize& sizePage) const;
|
||||
wxRect GetPageRect() const ;
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
// remove all pages
|
||||
bool DeleteAllPages();
|
||||
// the same as AddPage(), but adds it at the specified position
|
||||
bool InsertPage(size_t nPage,
|
||||
wxNotebookPage *pPage,
|
||||
const wxString& strText,
|
||||
bool bSelect = false,
|
||||
int imageId = -1);
|
||||
|
||||
// callbacks
|
||||
// ---------
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnSelChange(wxBookCtrlEvent& event);
|
||||
void OnSetFocus(wxFocusEvent& event);
|
||||
void OnNavigationKey(wxNavigationKeyEvent& event);
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
#if wxUSE_CONSTRAINTS
|
||||
virtual void SetConstraintSizes(bool recurse = true);
|
||||
virtual bool DoPhase(int nPhase);
|
||||
|
||||
#endif
|
||||
|
||||
// base class virtuals
|
||||
// -------------------
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
// osx specific event handling common for all osx-ports
|
||||
|
||||
virtual bool OSXHandleClicked( double timestampsec );
|
||||
|
||||
protected:
|
||||
virtual wxNotebookPage *DoRemovePage(size_t page) ;
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// helper functions
|
||||
void ChangePage(int nOldSel, int nSel); // change pages
|
||||
void MacSetupTabs();
|
||||
|
||||
int DoSetSelection(size_t nPage, int flags = 0);
|
||||
|
||||
// the icon indices
|
||||
wxArrayInt m_images;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebook)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_NOTEBOOK_H_
|
41
Externals/wxWidgets3/include/wx/osx/palette.h
vendored
Normal file
41
Externals/wxWidgets3/include/wx/osx/palette.h
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/palette.h
|
||||
// Purpose: wxPalette class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: palette.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PALETTE_H_
|
||||
#define _WX_PALETTE_H_
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
#define M_PALETTEDATA ((wxPaletteRefData *)m_refData)
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
|
||||
{
|
||||
public:
|
||||
wxPalette();
|
||||
|
||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||
virtual ~wxPalette();
|
||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||
|
||||
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||
|
||||
virtual int GetColoursCount() const;
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPalette)
|
||||
};
|
||||
|
||||
#endif // _WX_PALETTE_H_
|
77
Externals/wxWidgets3/include/wx/osx/pen.h
vendored
Normal file
77
Externals/wxWidgets3/include/wx/osx/pen.h
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/pen.h
|
||||
// Purpose: wxPen class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: pen.h 58739 2009-02-07 23:23:18Z KO $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PEN_H_
|
||||
#define _WX_PEN_H_
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/colour.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
// Pen
|
||||
class WXDLLIMPEXP_CORE wxPen : public wxPenBase
|
||||
{
|
||||
public:
|
||||
wxPen();
|
||||
wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
|
||||
#endif
|
||||
|
||||
wxPen(const wxBitmap& stipple, int width);
|
||||
virtual ~wxPen();
|
||||
|
||||
bool operator==(const wxPen& pen) const;
|
||||
bool operator!=(const wxPen& pen) const { return !(*this == pen); }
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col) ;
|
||||
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
||||
|
||||
void SetWidth(int width) ;
|
||||
void SetStyle(wxPenStyle style) ;
|
||||
void SetStipple(const wxBitmap& stipple) ;
|
||||
void SetDashes(int nb_dashes, const wxDash *dash) ;
|
||||
void SetJoin(wxPenJoin join) ;
|
||||
void SetCap(wxPenCap cap) ;
|
||||
|
||||
wxColour GetColour() const ;
|
||||
int GetWidth() const;
|
||||
wxPenStyle GetStyle() const;
|
||||
wxPenJoin GetJoin() const;
|
||||
wxPenCap GetCap() const;
|
||||
int GetDashes(wxDash **ptr) const;
|
||||
int GetDashCount() const;
|
||||
|
||||
wxBitmap *GetStipple() const ;
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
||||
{ SetStyle((wxPenStyle)style); }
|
||||
#endif
|
||||
|
||||
// Implementation
|
||||
|
||||
// Useful helper: create the brush resource
|
||||
bool RealizeResource();
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
void Unshare();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_PEN_H_
|
39
Externals/wxWidgets3/include/wx/osx/pnghand.h
vendored
Normal file
39
Externals/wxWidgets3/include/wx/osx/pnghand.h
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/pnghand.h
|
||||
// Purpose: PNG bitmap handler
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id: pnghand.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PNGHAND_H_
|
||||
#define _WX_PNGHAND_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_LIBPNG
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPNGFileHandler: public wxBitmapHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPNGFileHandler)
|
||||
public:
|
||||
inline wxPNGFileHandler(void)
|
||||
{
|
||||
SetName(wxT("PNG bitmap file"));
|
||||
SetExtension(wxT("bmp"));
|
||||
SetType(wxBITMAP_TYPE_PNG);
|
||||
};
|
||||
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
||||
int desiredWidth, int desiredHeight);
|
||||
virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name, int type, const wxPalette *palette = NULL);
|
||||
};
|
||||
|
||||
#endif //wxUSE_LIBPNG
|
||||
|
||||
#endif
|
||||
// _WX_PNGHAND_H_
|
||||
|
287
Externals/wxWidgets3/include/wx/osx/pngread.h
vendored
Normal file
287
Externals/wxWidgets3/include/wx/osx/pngread.h
vendored
Normal file
@ -0,0 +1,287 @@
|
||||
/*
|
||||
* File: pngread.h
|
||||
* Purpose: PNG file reader
|
||||
* Author: Alejandro Aguilar Sierra/Julian Smart
|
||||
* Created: 1995
|
||||
* Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WX_PNGREAD__
|
||||
#define _WX_PNGREAD__
|
||||
|
||||
#ifndef byte
|
||||
typedef unsigned char byte;
|
||||
#endif
|
||||
|
||||
#define WXIMA_COLORS DIB_PAL_COLORS
|
||||
|
||||
typedef byte * ImagePointerType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
byte red;
|
||||
byte green;
|
||||
byte blue;
|
||||
} rgb_color_struct;
|
||||
|
||||
|
||||
#define COLORTYPE_PALETTE 1
|
||||
#define COLORTYPE_COLOR 2
|
||||
#define COLORTYPE_ALPHA 4
|
||||
|
||||
class wxPNGReader
|
||||
{
|
||||
protected:
|
||||
int filetype;
|
||||
char filename[255];
|
||||
ImagePointerType RawImage; // Image data
|
||||
|
||||
int Width, Height; // Dimensions
|
||||
int Depth; // (bits x pixel)
|
||||
int ColorType; // Bit 1 = Palette used
|
||||
// Bit 2 = Color used
|
||||
// Bit 3 = Alpha used
|
||||
|
||||
long EfeWidth; // Efective Width
|
||||
|
||||
void *lpbi;
|
||||
int bgindex;
|
||||
wxPalette* m_palette;
|
||||
bool imageOK;
|
||||
friend class wxPNGReaderIter;
|
||||
public:
|
||||
wxPNGReader(void);
|
||||
wxPNGReader (char* ImageFileName); // Read an image file
|
||||
virtual ~wxPNGReader ();
|
||||
|
||||
void Create(int width, int height, int deep, int colortype=-1);
|
||||
|
||||
bool ReadFile( char* ImageFileName=0 );
|
||||
bool SaveFile( char* ImageFileName=0 );
|
||||
bool SaveXPM(char *filename, char *name = 0);
|
||||
int GetWidth( void ) const { return Width; };
|
||||
int GetHeight( void ) const { return Height; };
|
||||
int GetDepth( void ) const { return Depth; };
|
||||
int GetColorType( void ) const { return ColorType; };
|
||||
|
||||
int GetIndex(int x, int y);
|
||||
bool GetRGB(int x, int y, byte* r, byte* g, byte* b);
|
||||
|
||||
bool SetIndex(int x, int y, int index);
|
||||
bool SetRGB(int x, int y, byte r, byte g, byte b);
|
||||
|
||||
// ColorMap settings
|
||||
bool SetPalette(wxPalette* colourmap);
|
||||
bool SetPalette(int n, rgb_color_struct *rgb_struct);
|
||||
bool SetPalette(int n, byte *r, byte *g=0, byte *b=0);
|
||||
wxPalette* GetPalette() const { return m_palette; }
|
||||
|
||||
void NullData();
|
||||
inline int GetBGIndex(void) { return bgindex; }
|
||||
|
||||
inline bool Inside(int x, int y)
|
||||
{ return (0<=y && y<Height && 0<=x && x<Width); }
|
||||
|
||||
virtual wxBitmap *GetBitmap(void);
|
||||
virtual bool InstantiateBitmap(wxBitmap *bitmap);
|
||||
wxMask *CreateMask(void);
|
||||
|
||||
inline bool Ok() const { return IsOk(); }
|
||||
inline bool IsOk(void) { return imageOK; }
|
||||
};
|
||||
|
||||
class wxPNGReaderIter
|
||||
{
|
||||
protected:
|
||||
int Itx, Ity; // Counters
|
||||
int Stepx, Stepy;
|
||||
ImagePointerType IterImage; // Image pointer
|
||||
wxPNGReader *ima;
|
||||
public:
|
||||
// Constructors
|
||||
wxPNGReaderIter ( void );
|
||||
wxPNGReaderIter ( wxPNGReader *imax );
|
||||
operator wxPNGReader* ();
|
||||
|
||||
// Iterators
|
||||
bool ItOK ();
|
||||
void reset ();
|
||||
void upset ();
|
||||
void SetRow(byte *buf, int n);
|
||||
void GetRow(byte *buf, int n);
|
||||
byte GetByte( ) { return IterImage[Itx]; }
|
||||
void SetByte(byte b) { IterImage[Itx] = b; }
|
||||
ImagePointerType GetRow(void);
|
||||
bool NextRow();
|
||||
bool PrevRow();
|
||||
bool NextByte();
|
||||
bool PrevByte();
|
||||
|
||||
void SetSteps(int x, int y=0) { Stepx = x; Stepy = y; }
|
||||
void GetSteps(int *x, int *y) { *x = Stepx; *y = Stepy; }
|
||||
bool NextStep();
|
||||
bool PrevStep();
|
||||
|
||||
////////////////////////// AD - for interlace ///////////////////////////////
|
||||
void SetY(int y);
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
wxPNGReaderIter::wxPNGReaderIter(void)
|
||||
{
|
||||
ima = 0;
|
||||
IterImage = 0;
|
||||
Itx = Ity = 0;
|
||||
Stepx = Stepy = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
wxPNGReaderIter::wxPNGReaderIter(wxPNGReader *imax): ima(imax)
|
||||
{
|
||||
if (ima)
|
||||
IterImage = ima->RawImage;
|
||||
Itx = Ity = 0;
|
||||
Stepx = Stepy = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
wxPNGReaderIter::operator wxPNGReader* ()
|
||||
{
|
||||
return ima;
|
||||
}
|
||||
|
||||
inline
|
||||
bool wxPNGReaderIter::ItOK ()
|
||||
{
|
||||
if (ima)
|
||||
return ima->Inside(Itx, Ity);
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
inline void wxPNGReaderIter::reset()
|
||||
{
|
||||
IterImage = ima->RawImage;
|
||||
Itx = Ity = 0;
|
||||
}
|
||||
|
||||
inline void wxPNGReaderIter::upset()
|
||||
{
|
||||
Itx = 0;
|
||||
Ity = ima->Height-1;
|
||||
IterImage = ima->RawImage + ima->EfeWidth*(ima->Height-1);
|
||||
}
|
||||
|
||||
inline bool wxPNGReaderIter::NextRow()
|
||||
{
|
||||
if (++Ity >= ima->Height) return 0;
|
||||
IterImage += ima->EfeWidth;
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline bool wxPNGReaderIter::PrevRow()
|
||||
{
|
||||
if (--Ity < 0) return 0;
|
||||
IterImage -= ima->EfeWidth;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////// AD - for interlace ///////////////////////////////
|
||||
inline void wxPNGReaderIter::SetY(int y)
|
||||
{
|
||||
if ((y < 0) || (y > ima->Height)) return;
|
||||
Ity = y;
|
||||
IterImage = ima->RawImage + ima->EfeWidth*y;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void wxPNGReaderIter::SetRow(byte *buf, int n)
|
||||
{
|
||||
// Here should be bcopy or memcpy
|
||||
//_fmemcpy(IterImage, (void far *)buf, n);
|
||||
if (n<0)
|
||||
n = ima->GetWidth();
|
||||
|
||||
for (int i=0; i<n; i++) IterImage[i] = buf[i];
|
||||
}
|
||||
|
||||
inline void wxPNGReaderIter::GetRow(byte *buf, int n)
|
||||
{
|
||||
for (int i=0; i<n; i++) buf[i] = IterImage[i];
|
||||
}
|
||||
|
||||
inline ImagePointerType wxPNGReaderIter::GetRow()
|
||||
{
|
||||
return IterImage;
|
||||
}
|
||||
|
||||
inline bool wxPNGReaderIter::NextByte()
|
||||
{
|
||||
if (++Itx < ima->EfeWidth)
|
||||
return 1;
|
||||
else
|
||||
if (++Ity < ima->Height)
|
||||
{
|
||||
IterImage += ima->EfeWidth;
|
||||
Itx = 0;
|
||||
return 1;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline bool wxPNGReaderIter::PrevByte()
|
||||
{
|
||||
if (--Itx >= 0)
|
||||
return 1;
|
||||
else
|
||||
if (--Ity >= 0)
|
||||
{
|
||||
IterImage -= ima->EfeWidth;
|
||||
Itx = 0;
|
||||
return 1;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline bool wxPNGReaderIter::NextStep()
|
||||
{
|
||||
Itx += Stepx;
|
||||
if (Itx < ima->EfeWidth)
|
||||
return 1;
|
||||
else {
|
||||
Ity += Stepy;
|
||||
if (Ity < ima->Height)
|
||||
{
|
||||
IterImage += ima->EfeWidth;
|
||||
Itx = 0;
|
||||
return 1;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool wxPNGReaderIter::PrevStep()
|
||||
{
|
||||
Itx -= Stepx;
|
||||
if (Itx >= 0)
|
||||
return 1;
|
||||
else {
|
||||
Ity -= Stepy;
|
||||
if (Ity >= 0 && Ity < ima->Height)
|
||||
{
|
||||
IterImage -= ima->EfeWidth;
|
||||
Itx = 0;
|
||||
return 1;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
37
Externals/wxWidgets3/include/wx/osx/popupwin.h
vendored
Normal file
37
Externals/wxWidgets3/include/wx/osx/popupwin.h
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/popupwin.h
|
||||
// Purpose: wxPopupWindow class for wxMac
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created:
|
||||
// RCS-ID: $Id: popupwin.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) 2006 Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MAC_POPUPWIN_H_
|
||||
#define _WX_MAC_POPUPWIN_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPopupWindow
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPopupWindow : public wxPopupWindowBase
|
||||
{
|
||||
public:
|
||||
wxPopupWindow() { }
|
||||
~wxPopupWindow();
|
||||
|
||||
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
|
||||
{ (void)Create(parent, flags); }
|
||||
|
||||
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
|
||||
|
||||
virtual bool Show(bool show);
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow)
|
||||
};
|
||||
|
||||
#endif // _WX_MAC_POPUPWIN_H_
|
||||
|
112
Externals/wxWidgets3/include/wx/osx/printdlg.h
vendored
Normal file
112
Externals/wxWidgets3/include/wx/osx/printdlg.h
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/printdlg.h
|
||||
// Purpose: wxPrintDialog, wxPageSetupDialog classes.
|
||||
// Use generic, PostScript version if no
|
||||
// platform-specific implementation.
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 1998-01-01
|
||||
// RCS-ID: $Id: printdlg.h 64943 2010-07-13 13:29:58Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PRINTDLG_H_
|
||||
#define _WX_PRINTDLG_H_
|
||||
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/cmndata.h"
|
||||
#include "wx/printdlg.h"
|
||||
#include "wx/prntbase.h"
|
||||
|
||||
/*
|
||||
* wxMacPrintDialog
|
||||
* The Mac dialog for printing
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDC;
|
||||
class WXDLLIMPEXP_CORE wxMacPrintDialog: public wxPrintDialogBase
|
||||
{
|
||||
public:
|
||||
wxMacPrintDialog();
|
||||
wxMacPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL);
|
||||
wxMacPrintDialog(wxWindow *parent, wxPrintData* data );
|
||||
virtual ~wxMacPrintDialog();
|
||||
|
||||
bool Create(wxWindow *parent, wxPrintDialogData* data = NULL);
|
||||
virtual int ShowModal();
|
||||
|
||||
virtual wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
|
||||
virtual wxPrintData& GetPrintData() { return m_printDialogData.GetPrintData(); }
|
||||
virtual wxDC *GetPrintDC();
|
||||
|
||||
private:
|
||||
wxPrintDialogData m_printDialogData;
|
||||
wxDC* m_printerDC;
|
||||
bool m_destroyDC;
|
||||
wxWindow* m_dialogParent;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintDialog)
|
||||
};
|
||||
|
||||
/*
|
||||
* wxMacPageSetupDialog
|
||||
* The Mac page setup dialog
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMacPageSetupDialog: public wxPageSetupDialogBase
|
||||
{
|
||||
public:
|
||||
wxMacPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
|
||||
virtual ~wxMacPageSetupDialog();
|
||||
|
||||
virtual wxPageSetupData& GetPageSetupDialogData();
|
||||
|
||||
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
|
||||
virtual int ShowModal();
|
||||
|
||||
private:
|
||||
wxPageSetupData m_pageSetupData;
|
||||
wxWindow* m_dialogParent;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog)
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
|
||||
|
||||
/*
|
||||
* wxMacPageMarginsDialog
|
||||
* A Mac dialog for setting the page margins separately from page setup since
|
||||
* (native) wxMacPageSetupDialog doesn't let you set margins.
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMacPageMarginsDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupData* data);
|
||||
bool TransferToWindow();
|
||||
bool TransferDataFromWindow();
|
||||
|
||||
virtual wxPageSetupData& GetPageSetupDialogData() { return *m_pageSetupDialogData; }
|
||||
|
||||
private:
|
||||
wxPageSetupData* m_pageSetupDialogData;
|
||||
|
||||
wxPoint m_MinMarginTopLeft;
|
||||
wxPoint m_MinMarginBottomRight;
|
||||
wxTextCtrl *m_LeftMargin;
|
||||
wxTextCtrl *m_TopMargin;
|
||||
wxTextCtrl *m_RightMargin;
|
||||
wxTextCtrl *m_BottomMargin;
|
||||
|
||||
void GetMinMargins();
|
||||
bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog)
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_PRINTDLG_H_
|
60
Externals/wxWidgets3/include/wx/osx/printmac.h
vendored
Normal file
60
Externals/wxWidgets3/include/wx/osx/printmac.h
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/osx/printmac.h
|
||||
// Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id: printmac.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PRINTWIN_H_
|
||||
#define _WX_PRINTWIN_H_
|
||||
|
||||
#include "wx/prntbase.h"
|
||||
|
||||
/*
|
||||
* Represents the printer: manages printing a wxPrintout object
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMacPrinter: public wxPrinterBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMacPrinter)
|
||||
|
||||
public:
|
||||
wxMacPrinter(wxPrintDialogData *data = NULL);
|
||||
virtual ~wxMacPrinter();
|
||||
|
||||
virtual bool Print(wxWindow *parent,
|
||||
wxPrintout *printout,
|
||||
bool prompt = true);
|
||||
virtual wxDC* PrintDialog(wxWindow *parent);
|
||||
virtual bool Setup(wxWindow *parent);
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* wxPrintPreview
|
||||
* Programmer creates an object of this class to preview a wxPrintout.
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMacPrintPreview: public wxPrintPreviewBase
|
||||
{
|
||||
DECLARE_CLASS(wxMacPrintPreview)
|
||||
|
||||
public:
|
||||
wxMacPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting = NULL,
|
||||
wxPrintDialogData *data = NULL);
|
||||
wxMacPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data);
|
||||
virtual ~wxMacPrintPreview();
|
||||
|
||||
virtual bool Print(bool interactive);
|
||||
virtual void DetermineScaling();
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_PRINTWIN_H_
|
16
Externals/wxWidgets3/include/wx/osx/private.h
vendored
Normal file
16
Externals/wxWidgets3/include/wx/osx/private.h
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef _WX_PRIVATE_OSX_H_
|
||||
#define _WX_PRIVATE_OSX_H_
|
||||
|
||||
#include "wx/osx/core/private.h"
|
||||
|
||||
#if wxOSX_USE_IPHONE
|
||||
#include "wx/osx/iphone/private.h"
|
||||
#elif wxOSX_USE_CARBON
|
||||
#include "wx/osx/carbon/private.h"
|
||||
#elif wxOSX_USE_COCOA
|
||||
#include "wx/osx/cocoa/private.h"
|
||||
#elif wxUSE_GUI
|
||||
#error "Must include wx/defs.h first"
|
||||
#endif
|
||||
|
||||
#endif
|
13
Externals/wxWidgets3/include/wx/osx/private/glgrab.h
vendored
Normal file
13
Externals/wxWidgets3/include/wx/osx/private/glgrab.h
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#if defined __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
CGImageRef grabViaOpenGL(CGDirectDisplayID display,
|
||||
CGRect srcRect);
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
5
Externals/wxWidgets3/include/wx/osx/private/print.h
vendored
Normal file
5
Externals/wxWidgets3/include/wx/osx/private/print.h
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
#ifdef __WXMAC_CLASSIC__
|
||||
#include "wx/osx/classic/private/print.h"
|
||||
#else
|
||||
#include "wx/osx/carbon/private/print.h"
|
||||
#endif
|
11
Externals/wxWidgets3/include/wx/osx/private/timer.h
vendored
Normal file
11
Externals/wxWidgets3/include/wx/osx/private/timer.h
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/* common warning snippet for all osx direct includes */
|
||||
|
||||
#ifndef wxOSX_USE_CARBON
|
||||
#error "this files should only be included after platform.h was included"
|
||||
#endif
|
||||
|
||||
#if 1 // revert to wxOSX_USE_COCOA_OR_IPHONE in case of problems
|
||||
#include "wx/osx/core/private/timer.h"
|
||||
#elif wxOSX_USE_CARBON
|
||||
#include "wx/osx/carbon/private/timer.h"
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user