Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from all the non-generated files. This should hopefully avoid future commits mixing significant changes with insignificant whitespace ones.
This commit is contained in:
@@ -160,7 +160,7 @@
|
||||
#pragma comment(lib, wxBASE_LIB_NAME("net"))
|
||||
#endif
|
||||
#if wxUSE_XML && !defined(wxNO_XML_LIB)
|
||||
#pragma comment(lib, wxBASE_LIB_NAME("xml"))
|
||||
#pragma comment(lib, wxBASE_LIB_NAME("xml"))
|
||||
#endif
|
||||
#endif // defined(wxMONOLITHIC) && wxMONOLITHIC == 1
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
#if wxUSE_HTML && !defined(wxNO_HTML_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("html"))
|
||||
#endif
|
||||
#endif
|
||||
#if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("qa"))
|
||||
#endif
|
||||
@@ -227,7 +227,7 @@
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("media"))
|
||||
#endif
|
||||
#if wxUSE_STC && !defined(wxNO_STC_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("stc"))
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("stc"))
|
||||
#endif
|
||||
#if wxUSE_WEBVIEW && !defined(wxNO_WEBVIEW_LIB)
|
||||
#pragma comment(lib, wxTOOLKIT_LIB_NAME("webview"))
|
||||
|
@@ -33,7 +33,7 @@ enum wxAcceleratorEntryFlags
|
||||
wxACCEL_CTRL = 0x0002, // hold Ctrl key down
|
||||
wxACCEL_SHIFT = 0x0004, // hold Shift key down
|
||||
#if defined(__WXMAC__)
|
||||
wxACCEL_RAW_CTRL= 0x0008, //
|
||||
wxACCEL_RAW_CTRL= 0x0008, //
|
||||
#else
|
||||
wxACCEL_RAW_CTRL= wxACCEL_CTRL,
|
||||
#endif
|
||||
|
@@ -104,7 +104,7 @@ public:
|
||||
|
||||
// Called before the first events are handled, called from within MainLoop()
|
||||
virtual void OnLaunched();
|
||||
|
||||
|
||||
// This is called by wxEventLoopBase::SetActive(): you should put the code
|
||||
// which needs an active event loop here.
|
||||
// Note that this function is called whenever an event loop is activated;
|
||||
|
@@ -350,7 +350,7 @@ public:
|
||||
|
||||
virtual int ChangeSelection(size_t n) wxOVERRIDE;
|
||||
|
||||
virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
|
||||
virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
|
||||
int imageId) wxOVERRIDE;
|
||||
virtual bool DeleteAllPages() wxOVERRIDE;
|
||||
virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
|
||||
|
@@ -118,7 +118,7 @@ public:
|
||||
virtual ChannelType Blue() const = 0;
|
||||
virtual ChannelType Alpha() const
|
||||
{ return wxALPHA_OPAQUE ; }
|
||||
|
||||
|
||||
virtual bool IsSolid() const
|
||||
{ return true; }
|
||||
|
||||
|
@@ -345,11 +345,11 @@ public:
|
||||
virtual size_t GetLength() const { return m_html.Len() + 1; }
|
||||
virtual wxString GetHTML() const { return m_html; }
|
||||
virtual void SetHTML(const wxString& html) { m_html = html; }
|
||||
|
||||
|
||||
virtual size_t GetDataSize() const wxOVERRIDE;
|
||||
virtual bool GetDataHere(void *buf) const wxOVERRIDE;
|
||||
virtual bool SetData(size_t len, const void *buf) wxOVERRIDE;
|
||||
|
||||
|
||||
// Must provide overloads to avoid hiding them (and warnings about it)
|
||||
virtual size_t GetDataSize(const wxDataFormat&) const wxOVERRIDE
|
||||
{
|
||||
|
@@ -283,7 +283,7 @@ public:
|
||||
}
|
||||
|
||||
virtual void* GetHandle() const { return NULL; }
|
||||
|
||||
|
||||
// query dimension, colour deps, resolution
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const = 0;
|
||||
@@ -528,7 +528,7 @@ public:
|
||||
|
||||
// this needs to overidden if the axis is inverted
|
||||
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
|
||||
|
||||
|
||||
virtual double GetContentScaleFactor() const { return m_contentScaleFactor; }
|
||||
|
||||
#ifdef __WXMSW__
|
||||
@@ -722,7 +722,7 @@ protected:
|
||||
double m_scaleX, m_scaleY; // calculated from logical scale and user scale
|
||||
|
||||
int m_signX, m_signY; // Used by SetAxisOrientation() to invert the axes
|
||||
|
||||
|
||||
double m_contentScaleFactor; // used by high resolution displays (retina)
|
||||
|
||||
// Pixel per mm in horizontal and vertical directions.
|
||||
|
@@ -134,7 +134,7 @@ private:
|
||||
int m_style;
|
||||
|
||||
wxSize m_area;
|
||||
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxBufferedDC);
|
||||
wxDECLARE_NO_COPY_CLASS(wxBufferedDC);
|
||||
};
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
wxGCDC( const wxEnhMetaFileDC& dc );
|
||||
#endif
|
||||
wxGCDC(wxGraphicsContext* context);
|
||||
|
||||
|
||||
wxGCDC();
|
||||
virtual ~wxGCDC();
|
||||
|
||||
|
@@ -129,7 +129,7 @@ public:
|
||||
#elif defined(__WXOSX__)
|
||||
public:
|
||||
wxNativeFontInfo(const wxNativeFontInfo& info) { Init(info); }
|
||||
|
||||
|
||||
~wxNativeFontInfo() { Free(); }
|
||||
|
||||
wxNativeFontInfo& operator=(const wxNativeFontInfo& info)
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
void Init(const wxNativeFontInfo& info);
|
||||
|
||||
void Free();
|
||||
|
||||
|
||||
wxString GetFamilyName() const;
|
||||
wxString GetStyleName() const;
|
||||
|
||||
@@ -157,8 +157,8 @@ public:
|
||||
static CGFloat GetCTWeight( CTFontRef font );
|
||||
static CGFloat GetCTWeight( CTFontDescriptorRef font );
|
||||
static CGFloat GetCTSlant( CTFontDescriptorRef font );
|
||||
|
||||
|
||||
|
||||
|
||||
CTFontDescriptorRef GetCTFontDescriptor() const;
|
||||
private:
|
||||
// attributes for regenerating a CTFontDescriptor, stay close to native values
|
||||
@@ -167,7 +167,7 @@ private:
|
||||
wxFontStyle m_style;
|
||||
CGFloat m_ctSize;
|
||||
wxFontFamily m_family;
|
||||
|
||||
|
||||
wxString m_styleName;
|
||||
wxString m_familyName;
|
||||
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
// implement base class pure virtuals
|
||||
virtual void DoSetCount(unsigned int count) wxOVERRIDE;
|
||||
|
@@ -35,7 +35,7 @@ enum wxInterpolationQuality
|
||||
// default interpolation
|
||||
wxINTERPOLATION_DEFAULT,
|
||||
// no interpolation
|
||||
wxINTERPOLATION_NONE,
|
||||
wxINTERPOLATION_NONE,
|
||||
// fast interpolation, suited for interactivity
|
||||
wxINTERPOLATION_FAST,
|
||||
// better quality
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
#if wxUSE_IMAGE
|
||||
wxImage ConvertToImage() const;
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
|
||||
void* GetNativeBitmap() const;
|
||||
|
||||
const wxGraphicsBitmapData* GetBitmapData() const
|
||||
@@ -601,10 +601,10 @@ public:
|
||||
|
||||
// returns the current interpolation quality
|
||||
virtual wxInterpolationQuality GetInterpolationQuality() const { return m_interpolation; }
|
||||
|
||||
|
||||
// sets the interpolation quality, returns true if it supported
|
||||
virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation) = 0;
|
||||
|
||||
|
||||
// returns the current compositing operator
|
||||
virtual wxCompositionMode GetCompositionMode() const { return m_composition; }
|
||||
|
||||
@@ -754,14 +754,14 @@ public:
|
||||
|
||||
// helper to determine if a 0.5 offset should be applied for the drawing operation
|
||||
virtual bool ShouldOffset() const { return false; }
|
||||
|
||||
// indicates whether the context should try to offset for pixel boundaries, this only makes sense on
|
||||
|
||||
// indicates whether the context should try to offset for pixel boundaries, this only makes sense on
|
||||
// bitmap devices like screen, by default this is turned off
|
||||
virtual void EnableOffset(bool enable = true);
|
||||
|
||||
|
||||
void DisableOffset() { EnableOffset(false); }
|
||||
bool OffsetEnabled() { return m_enableOffset; }
|
||||
|
||||
|
||||
protected:
|
||||
// These fields must be initialized in the derived class ctors.
|
||||
wxDouble m_width,
|
||||
|
@@ -136,7 +136,7 @@ public:
|
||||
|
||||
virtual GdkWindow* GetGDKWindow() const { return NULL; }
|
||||
virtual void* GetHandle() const wxOVERRIDE { return GetGDKWindow(); }
|
||||
|
||||
|
||||
// base class pure virtuals implemented here
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE;
|
||||
virtual void DoGetSizeMM(int* width, int* height) const wxOVERRIDE;
|
||||
|
@@ -39,7 +39,7 @@ public:
|
||||
virtual void DoGetSize( int *width, int *height ) const wxOVERRIDE;
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const wxOVERRIDE;
|
||||
virtual void* GetHandle() const wxOVERRIDE;
|
||||
|
||||
|
||||
// overridden for wxMemoryDC Impl
|
||||
virtual void DoSelect(const wxBitmap& bitmap) wxOVERRIDE;
|
||||
|
||||
|
@@ -226,7 +226,7 @@ public:
|
||||
|
||||
virtual void* GetCairoContext() const wxOVERRIDE;
|
||||
virtual void* GetHandle() const wxOVERRIDE;
|
||||
|
||||
|
||||
bool CanDrawBitmap() const wxOVERRIDE { return true; }
|
||||
void Clear() wxOVERRIDE;
|
||||
void SetFont( const wxFont& font ) wxOVERRIDE;
|
||||
|
@@ -46,7 +46,7 @@ class WXDLLIMPEXP_HTML wxHtmlHelpController : public wxHelpControllerBase // wxE
|
||||
public:
|
||||
wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE, wxWindow* parentWindow = NULL);
|
||||
wxHtmlHelpController(wxWindow* parentWindow, int style = wxHF_DEFAULT_STYLE);
|
||||
|
||||
|
||||
virtual ~wxHtmlHelpController();
|
||||
|
||||
void SetShouldPreventAppExit(bool enable);
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
|
||||
protected:
|
||||
void Init(int style);
|
||||
|
||||
|
||||
virtual wxWindow* CreateHelpWindow();
|
||||
virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData *data);
|
||||
virtual wxHtmlHelpDialog* CreateHelpDialog(wxHtmlHelpData *data);
|
||||
|
@@ -107,11 +107,11 @@ private:
|
||||
wxString m_pageTitle;
|
||||
|
||||
OSXWebViewPtr m_webView;
|
||||
|
||||
|
||||
WX_NSObject m_frameLoadMonitor;
|
||||
WX_NSObject m_policyDelegate;
|
||||
WX_NSObject m_UIDelegate;
|
||||
|
||||
|
||||
// we may use this later to setup our own mouse events,
|
||||
// so leave it in for now.
|
||||
void* m_webKitCtrlEventHandler;
|
||||
|
@@ -65,10 +65,10 @@ public:
|
||||
|
||||
// accessors for individual modifier keys
|
||||
bool ControlDown() const { return m_controlDown; }
|
||||
bool RawControlDown() const
|
||||
{
|
||||
bool RawControlDown() const
|
||||
{
|
||||
#ifdef __WXOSX__
|
||||
return m_rawControlDown;
|
||||
return m_rawControlDown;
|
||||
#else
|
||||
return m_controlDown;
|
||||
#endif
|
||||
@@ -91,12 +91,12 @@ public:
|
||||
// ---------------------------------------------------
|
||||
|
||||
void SetControlDown(bool down) { m_controlDown = down; }
|
||||
void SetRawControlDown(bool down)
|
||||
{
|
||||
void SetRawControlDown(bool down)
|
||||
{
|
||||
#ifdef __WXOSX__
|
||||
m_rawControlDown = down;
|
||||
m_rawControlDown = down;
|
||||
#else
|
||||
m_controlDown = down;
|
||||
m_controlDown = down;
|
||||
#endif
|
||||
}
|
||||
void SetShiftDown(bool down) { m_shiftDown = down; }
|
||||
|
@@ -406,7 +406,7 @@ private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxMenuBase);
|
||||
};
|
||||
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// XTI accessor
|
||||
@@ -417,17 +417,17 @@ class WXDLLEXPORT wxMenuInfoHelper : public wxObject
|
||||
public:
|
||||
wxMenuInfoHelper() { m_menu = NULL; }
|
||||
virtual ~wxMenuInfoHelper() { }
|
||||
|
||||
|
||||
bool Create( wxMenu *menu, const wxString &title )
|
||||
{
|
||||
m_menu = menu;
|
||||
m_title = title;
|
||||
{
|
||||
m_menu = menu;
|
||||
m_title = title;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
wxMenu* GetMenu() const { return m_menu; }
|
||||
wxString GetTitle() const { return m_title; }
|
||||
|
||||
|
||||
private:
|
||||
wxMenu *m_menu;
|
||||
wxString m_title;
|
||||
@@ -555,13 +555,13 @@ public:
|
||||
|
||||
virtual bool CanBeOutsideClientArea() const wxOVERRIDE { return true; }
|
||||
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
// XTI helpers:
|
||||
bool AppendMenuInfo( const wxMenuInfoHelper *info )
|
||||
{ return Append( info->GetMenu(), info->GetTitle() ); }
|
||||
const wxMenuInfoHelperList& GetMenuInfos() const;
|
||||
#endif
|
||||
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
// get or change the label of the menu at given position
|
||||
// Deprecated in favour of SetMenuLabel
|
||||
@@ -574,11 +574,11 @@ protected:
|
||||
// the list of all our menus
|
||||
wxMenuList m_menus;
|
||||
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
#if wxUSE_EXTENDED_RTTI
|
||||
// used by XTI
|
||||
wxMenuInfoHelperList m_menuInfos;
|
||||
#endif
|
||||
|
||||
|
||||
// the frame we are attached to (may be NULL)
|
||||
wxFrame *m_menuBarFrame;
|
||||
|
||||
|
@@ -125,7 +125,7 @@ public:
|
||||
}
|
||||
|
||||
void* GetHandle() const wxOVERRIDE { return (void*)GetHDC(); }
|
||||
|
||||
|
||||
const wxBitmap& GetSelectedBitmap() const wxOVERRIDE { return m_selectedBitmap; }
|
||||
wxBitmap& GetSelectedBitmap() wxOVERRIDE { return m_selectedBitmap; }
|
||||
|
||||
|
@@ -58,7 +58,7 @@ protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
|
||||
|
||||
|
||||
private:
|
||||
// implement base class pure virtuals
|
||||
virtual void DoSetCount(unsigned int count) wxOVERRIDE;
|
||||
|
@@ -262,7 +262,7 @@
|
||||
#define TVM_GETEXTENDEDSTYLE (TV_FIRST + 45)
|
||||
#endif
|
||||
|
||||
// Various defines used by the webview library that are needed by mingw
|
||||
// Various defines used by the webview library that are needed by mingw
|
||||
|
||||
#ifndef DISPID_COMMANDSTATECHANGE
|
||||
#define DISPID_COMMANDSTATECHANGE 105
|
||||
|
@@ -82,7 +82,7 @@ public:
|
||||
// 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 ;
|
||||
@@ -95,7 +95,7 @@ protected:
|
||||
// override for support of custom app controllers
|
||||
virtual WX_NSObject OSXCreateAppController();
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
virtual bool DoInitGui();
|
||||
virtual void DoCleanUp();
|
||||
@@ -155,14 +155,14 @@ private:
|
||||
wxArrayString m_openFiles;
|
||||
wxArrayString m_printFiles;
|
||||
wxString m_getURL;
|
||||
|
||||
|
||||
public:
|
||||
bool OSXInitWasCalled() { return m_inited; }
|
||||
void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
|
||||
void OSXStorePrintFiles(const wxArrayString &files ) { m_printFiles = files ; }
|
||||
void OSXStoreOpenURL(const wxString &url ) { m_getURL = url ; }
|
||||
#endif
|
||||
|
||||
|
||||
// Hide the application windows the same as the system hide command would do it.
|
||||
void MacHideApp();
|
||||
|
||||
|
@@ -107,7 +107,7 @@ public:
|
||||
|
||||
// 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, double scale = 1.0);
|
||||
wxBitmap(WXImage image);
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
|
||||
// Create a bitmap compatible with the given DC
|
||||
wxBitmap(int width, int height, const wxDC& dc);
|
||||
|
||||
|
||||
// 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); }
|
||||
@@ -141,13 +141,13 @@ public:
|
||||
bool Create( CGImageRef image, double scale = 1.0 );
|
||||
bool Create( WXImage image );
|
||||
bool Create( CGContextRef bitmapcontext);
|
||||
|
||||
|
||||
// Create a bitmap compatible with the given DC, inheriting its magnification factor
|
||||
bool Create(int width, int height, const wxDC& dc);
|
||||
|
||||
// Create a bitmap with a scale factor, width and height are multiplied with that factor
|
||||
bool CreateScaled(int logwidth, int logheight, int depth, double logicalScale);
|
||||
|
||||
|
||||
// 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;
|
||||
|
@@ -22,7 +22,7 @@
|
||||
/*
|
||||
* leave is isFlipped and don't override
|
||||
*/
|
||||
#ifndef wxOSX_USE_NATIVE_FLIPPED
|
||||
#ifndef wxOSX_USE_NATIVE_FLIPPED
|
||||
#define wxOSX_USE_NATIVE_FLIPPED 1
|
||||
#endif
|
||||
|
||||
|
@@ -532,7 +532,7 @@ public:
|
||||
virtual void SetRowHeight(int height);
|
||||
virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height);
|
||||
virtual void OnSize();
|
||||
|
||||
|
||||
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
|
||||
|
||||
// drag & drop helper methods
|
||||
|
@@ -15,16 +15,16 @@ class WXDLLIMPEXP_BASE wxGUIEventLoop : public wxCFEventLoop
|
||||
public:
|
||||
wxGUIEventLoop();
|
||||
~wxGUIEventLoop();
|
||||
|
||||
|
||||
void BeginModalSession( wxWindow* modalWindow );
|
||||
|
||||
|
||||
void EndModalSession();
|
||||
|
||||
virtual void WakeUp();
|
||||
|
||||
void OSXUseLowLevelWakeup(bool useIt)
|
||||
{ m_osxLowLevelWakeUp = useIt ; }
|
||||
|
||||
|
||||
protected:
|
||||
virtual int DoDispatchTimeout(unsigned long timeout);
|
||||
|
||||
@@ -32,15 +32,15 @@ protected:
|
||||
virtual void OSXDoStop();
|
||||
|
||||
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
|
||||
|
||||
|
||||
void* m_modalSession;
|
||||
|
||||
|
||||
wxWindow* m_modalWindow;
|
||||
|
||||
|
||||
WXWindow m_dummyWindow;
|
||||
|
||||
|
||||
int m_modalNestedLevel;
|
||||
|
||||
|
||||
bool m_osxLowLevelWakeUp;
|
||||
};
|
||||
|
||||
|
@@ -163,7 +163,7 @@ public :
|
||||
#endif
|
||||
|
||||
virtual double GetContentScaleFactor() const;
|
||||
|
||||
|
||||
// cocoa thunk connected calls
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
@@ -281,20 +281,20 @@ public :
|
||||
virtual void SetRepresentedFilename(const wxString& filename) wxOVERRIDE;
|
||||
|
||||
wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
|
||||
|
||||
|
||||
CGWindowLevel GetWindowLevel() const wxOVERRIDE { return m_macWindowLevel; }
|
||||
void RestoreWindowLevel() wxOVERRIDE;
|
||||
|
||||
|
||||
static WX_NSResponder GetNextFirstResponder() ;
|
||||
static WX_NSResponder GetFormerFirstResponder() ;
|
||||
protected :
|
||||
CGWindowLevel m_macWindowLevel;
|
||||
WXWindow m_macWindow;
|
||||
void * m_macFullScreenData ;
|
||||
|
||||
|
||||
private:
|
||||
void SetUpForModalParent();
|
||||
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCocoaImpl);
|
||||
};
|
||||
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
#if wxUSE_MARKUP
|
||||
virtual void SetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
|
||||
void SetPressedBitmap( const wxBitmap& bitmap );
|
||||
void GetLayoutInset(int &left , int &top , int &right, int &bottom) const;
|
||||
void SetAcceleratorFromLabel(const wxString& label);
|
||||
|
@@ -97,7 +97,7 @@ public:
|
||||
virtual ~wxNSTextViewControl();
|
||||
|
||||
virtual void insertText(NSString* text, WXWidget slf, void *_cmd) wxOVERRIDE;
|
||||
|
||||
|
||||
virtual wxString GetStringValue() const wxOVERRIDE ;
|
||||
virtual void SetStringValue( const wxString &str) wxOVERRIDE ;
|
||||
virtual void Copy() wxOVERRIDE ;
|
||||
|
@@ -119,7 +119,7 @@ public:
|
||||
{
|
||||
SetValue(key, wxCFNumberRef(v));
|
||||
}
|
||||
|
||||
|
||||
CFMutableDictionaryRef CreateCopy() const
|
||||
{
|
||||
return CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, this->m_ptr);
|
||||
|
@@ -176,7 +176,7 @@ public:
|
||||
*/
|
||||
wxCFRef(refType p) : m_ptr(p)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/*! @method wxCFRef
|
||||
@abstract Assumes ownership of p and creates a reference to it.
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
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.
|
||||
|
@@ -47,10 +47,10 @@ public:
|
||||
|
||||
// This ctor does take ownership of the color.
|
||||
wxColour( CGColorRef col );
|
||||
|
||||
|
||||
// don't take ownership of the returned value
|
||||
CGColorRef GetCGColor() const;
|
||||
|
||||
|
||||
// do take ownership of the returned value
|
||||
CGColorRef CreateCGColor() const { return wxCFRetain(GetCGColor()); }
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
explicit wxColour(WX_NSColor color);
|
||||
WX_NSColor OSXGetNSColor() const;
|
||||
#endif
|
||||
|
||||
|
||||
protected :
|
||||
virtual void
|
||||
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) wxOVERRIDE;
|
||||
@@ -87,19 +87,19 @@ class wxColourRefData : public wxGDIRefData
|
||||
public:
|
||||
wxColourRefData() {}
|
||||
virtual ~wxColourRefData() {}
|
||||
|
||||
|
||||
virtual CGFloat Red() const = 0;
|
||||
virtual CGFloat Green() const = 0;
|
||||
virtual CGFloat Blue() const = 0;
|
||||
virtual CGFloat Alpha() const = 0;
|
||||
|
||||
|
||||
virtual bool IsSolid() const
|
||||
{ return true; }
|
||||
|
||||
virtual CGColorRef GetCGColor() const = 0;
|
||||
|
||||
|
||||
virtual wxColourRefData* Clone() const = 0;
|
||||
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual WX_NSColor GetNSColor() const;
|
||||
#endif
|
||||
|
@@ -43,7 +43,7 @@ public:
|
||||
virtual void WakeUp();
|
||||
|
||||
bool ShouldProcessIdleEvents() const { return m_processIdleEvents ; }
|
||||
|
||||
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
// notifies Yield and Dispatch to wait for at least one event before
|
||||
// returning, this is necessary, because the synthesized events need to be
|
||||
|
@@ -168,7 +168,7 @@ public :
|
||||
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 :
|
||||
@@ -197,7 +197,7 @@ public :
|
||||
wxMenu* GetWXPeer() { return m_peer ; }
|
||||
|
||||
virtual void PopUp( wxWindow *win, int x, int y ) = 0;
|
||||
|
||||
|
||||
virtual void GetMenuBarDimensions(int &x, int &y, int &width, int &height) const
|
||||
{
|
||||
x = y = width = height = -1;
|
||||
@@ -232,13 +232,13 @@ public :
|
||||
void Init();
|
||||
|
||||
bool IsRootControl() const { return m_isRootControl; }
|
||||
|
||||
|
||||
// is a custom control that has all events handled in wx code, no built-ins
|
||||
bool IsUserPane() const { return m_isUserPane; }
|
||||
|
||||
// we are doing keyboard handling in wx code, other events might be handled natively
|
||||
virtual bool HasUserKeyHandling() const { return m_wantsUserKey; }
|
||||
|
||||
|
||||
// we are doing mouse handling in wx code, other events might be handled natively
|
||||
virtual bool HasUserMouseHandling() const { return m_wantsUserMouse; }
|
||||
|
||||
@@ -280,7 +280,7 @@ public :
|
||||
{
|
||||
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
|
||||
@@ -299,7 +299,7 @@ public :
|
||||
|
||||
virtual bool NeedsFrame() const;
|
||||
virtual void SetNeedsFrame( bool needs );
|
||||
|
||||
|
||||
virtual void SetDrawingEnabled(bool enabled);
|
||||
|
||||
virtual bool CanFocus() const = 0;
|
||||
@@ -322,7 +322,7 @@ public :
|
||||
virtual void SetCursor( const wxCursor & cursor ) = 0;
|
||||
virtual void CaptureMouse() = 0;
|
||||
virtual void ReleaseMouse() = 0;
|
||||
|
||||
|
||||
virtual void SetDropTarget( wxDropTarget * WXUNUSED(dropTarget) ) {}
|
||||
|
||||
virtual wxInt32 GetValue() const = 0;
|
||||
@@ -371,7 +371,7 @@ public :
|
||||
// of a known control
|
||||
static wxWidgetImpl*
|
||||
FindBestFromWXWidget(WXWidget control);
|
||||
|
||||
|
||||
static void RemoveAssociations( wxWidgetImpl* impl);
|
||||
static void RemoveAssociation(WXWidget control);
|
||||
|
||||
@@ -955,7 +955,7 @@ public :
|
||||
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; }
|
||||
|
@@ -30,7 +30,7 @@ public:
|
||||
// returns true if any of the accepted formats of this dataobj is in the pasteboard
|
||||
bool HasDataInPasteboard( void * pasteboardRef );
|
||||
bool GetFromPasteboard( void * pasteboardRef );
|
||||
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void AddSupportedTypes( void* cfarray);
|
||||
#endif
|
||||
|
@@ -205,7 +205,7 @@ public:
|
||||
|
||||
// finishes editing of custom items; if no custom item is currently edited the method does nothing
|
||||
void FinishCustomItemEditing();
|
||||
|
||||
|
||||
virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) wxOVERRIDE;
|
||||
|
||||
// returns the n-th pointer to a column;
|
||||
|
@@ -62,7 +62,7 @@ public:
|
||||
static bool OSXHasModalDialogsOpen();
|
||||
void OSXBeginModalDialog();
|
||||
void OSXEndModalDialog();
|
||||
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
bool OSXGetWorksWhenModal();
|
||||
void OSXSetWorksWhenModal(bool worksWhenModal);
|
||||
@@ -94,7 +94,7 @@ protected:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
|
||||
static wxVector<wxDialog*> s_modalStack;
|
||||
#if wxOSX_USE_COCOA
|
||||
static wxVector<bool> s_modalWorksStack;
|
||||
|
@@ -23,7 +23,7 @@ class WXDLLIMPEXP_CORE wxModalEventLoop : public wxGUIEventLoop
|
||||
public:
|
||||
wxModalEventLoop(wxWindow *modalWindow);
|
||||
wxModalEventLoop(WXWindow modalNativeWindow);
|
||||
|
||||
|
||||
#ifdef __WXOSX_COCOA__
|
||||
// skip wxGUIEventLoop to avoid missing Enter/Exit notifications
|
||||
virtual int Run() { return wxCFEventLoop::Run(); }
|
||||
|
@@ -17,7 +17,7 @@ class WXDLLIMPEXP_FWD_CORE wxChoice;
|
||||
// wxFileDialog
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
// set this system option to 1 in order to always show the filetypes popup in
|
||||
// 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")
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
#if wxOSX_USE_COCOA
|
||||
~wxFileDialog();
|
||||
#endif
|
||||
|
||||
|
||||
virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
|
||||
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
|
||||
|
||||
@@ -71,9 +71,9 @@ public:
|
||||
#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 );
|
||||
@@ -86,7 +86,7 @@ protected:
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
|
||||
void SetupExtraControls(WXWindow nativeWindow);
|
||||
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
|
||||
void DoOnFilterSelected(int index);
|
||||
|
@@ -63,7 +63,7 @@ public :
|
||||
virtual void GetSize( int &width, int &height ) const;
|
||||
virtual void SetControlSize( wxWindowVariant variant );
|
||||
virtual double GetContentScaleFactor() const ;
|
||||
|
||||
|
||||
virtual void SetNeedsDisplay( const wxRect* where = NULL );
|
||||
virtual bool GetNeedsDisplay() const;
|
||||
|
||||
@@ -176,7 +176,7 @@ public :
|
||||
virtual bool IsFullScreen() const;
|
||||
|
||||
virtual bool EnableFullScreenView(bool enable);
|
||||
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style);
|
||||
|
||||
virtual void RequestUserAttention(int flags);
|
||||
|
@@ -34,10 +34,10 @@ public :
|
||||
virtual void WriteText(const wxString& str) ;
|
||||
virtual bool HasOwnContextMenu() const { return true; }
|
||||
|
||||
virtual wxSize GetBestSize() const;
|
||||
|
||||
virtual wxSize GetBestSize() const;
|
||||
|
||||
virtual bool SetHint(const wxString& hint);
|
||||
|
||||
|
||||
virtual void controlAction(WXWidget slf, void* _cmd, void *sender);
|
||||
protected :
|
||||
UITextField* m_textField;
|
||||
|
@@ -170,7 +170,7 @@ public:
|
||||
|
||||
|
||||
static WXHMENU MacGetWindowMenuHMenu() { return s_macWindowMenuHandle ; }
|
||||
|
||||
|
||||
virtual void DoGetPosition(int *x, int *y) const;
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
@@ -24,7 +24,7 @@ public:
|
||||
#if wxOSX_USE_COCOA
|
||||
~wxMessageDialog();
|
||||
#endif
|
||||
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
virtual void UnsubclassWin();
|
||||
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
|
||||
// implement base class pure virtuals
|
||||
|
||||
virtual bool SetTransparent(wxByte alpha);
|
||||
@@ -151,7 +151,7 @@ protected:
|
||||
|
||||
private :
|
||||
static clock_t s_lastFlush;
|
||||
|
||||
|
||||
wxRegion m_shape;
|
||||
#if wxUSE_GRAPHICS_CONTEXT
|
||||
wxGraphicsPath m_shapePath;
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow);
|
||||
};
|
||||
|
||||
|
@@ -95,9 +95,9 @@ public:
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
|
||||
void DoLayout();
|
||||
|
||||
|
||||
void DoSetSize(int x, int y, int width, int height, int sizeFlags) wxOVERRIDE;
|
||||
|
||||
#ifndef __WXOSX_IPHONE__
|
||||
|
@@ -82,7 +82,7 @@ public:
|
||||
|
||||
virtual void SetLabel(const wxString& label) wxOVERRIDE { SetTitle( label ); }
|
||||
virtual wxString GetLabel() const wxOVERRIDE { return GetTitle(); }
|
||||
|
||||
|
||||
virtual void OSXSetModified(bool modified) wxOVERRIDE;
|
||||
virtual bool OSXIsModified() const wxOVERRIDE;
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX__)
|
||||
#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX__)
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/webview.h"
|
||||
@@ -86,10 +86,10 @@ public:
|
||||
|
||||
//Find function
|
||||
virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) wxOVERRIDE
|
||||
{
|
||||
{
|
||||
wxUnusedVar(text);
|
||||
wxUnusedVar(flags);
|
||||
return wxNOT_FOUND;
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
//Clipboard functions
|
||||
|
@@ -52,7 +52,7 @@ public:
|
||||
const wxString& name = wxPanelNameStr );
|
||||
|
||||
virtual void SendSizeEvent(int flags = 0) wxOVERRIDE;
|
||||
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void SetLabel( const wxString& label ) wxOVERRIDE;
|
||||
virtual wxString GetLabel() const wxOVERRIDE;
|
||||
@@ -92,10 +92,10 @@ public:
|
||||
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style) wxOVERRIDE;
|
||||
virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const wxOVERRIDE;
|
||||
|
||||
|
||||
virtual int GetCharHeight() const wxOVERRIDE;
|
||||
virtual int GetCharWidth() const wxOVERRIDE;
|
||||
|
||||
|
||||
public:
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = true ) wxOVERRIDE;
|
||||
@@ -117,11 +117,11 @@ public:
|
||||
#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON
|
||||
// hot keys (system wide accelerators)
|
||||
// -----------------------------------
|
||||
|
||||
|
||||
virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode) wxOVERRIDE;
|
||||
virtual bool UnregisterHotKey(int hotkeyId) wxOVERRIDE;
|
||||
#endif // wxUSE_HOTKEY
|
||||
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE;
|
||||
|
||||
@@ -255,7 +255,7 @@ public:
|
||||
|
||||
// the 'true' OS level control for this wxWindow
|
||||
wxOSXWidgetImpl* GetPeer() const;
|
||||
|
||||
|
||||
// optimization to avoid creating a user pane in wxWindow::Create if we already know
|
||||
// we will replace it with our own peer
|
||||
void DontCreatePeer();
|
||||
@@ -263,10 +263,10 @@ public:
|
||||
// return true unless DontCreatePeer() had been called
|
||||
bool ShouldCreatePeer() const;
|
||||
|
||||
// sets the native implementation wrapper, can replace an existing peer, use peer = NULL to
|
||||
// sets the native implementation wrapper, can replace an existing peer, use peer = NULL to
|
||||
// release existing peer
|
||||
void SetPeer(wxOSXWidgetImpl* peer);
|
||||
|
||||
|
||||
// wraps the already existing peer with the wrapper
|
||||
void SetWrappingPeer(wxOSXWidgetImpl* wrapper);
|
||||
|
||||
@@ -289,9 +289,9 @@ public:
|
||||
virtual void OSXSimulateFocusEvents();
|
||||
|
||||
bool IsNativeWindowWrapper() const { return m_isNativeWindowWrapper; }
|
||||
|
||||
|
||||
double GetContentScaleFactor() const wxOVERRIDE;
|
||||
|
||||
|
||||
// internal response to size events
|
||||
virtual void MacOnInternalSize() {}
|
||||
|
||||
|
@@ -66,7 +66,7 @@ protected:
|
||||
void SetActive(bool active)
|
||||
{
|
||||
m_active = active;
|
||||
|
||||
|
||||
// Delete the implementation if the notification is detached
|
||||
if (!m_notification && !active)
|
||||
delete this;
|
||||
|
@@ -52,8 +52,8 @@ protected:
|
||||
// ref counting code
|
||||
virtual wxObjectRefData *CreateRefData() const;
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS(wxAcceleratorTable);
|
||||
};
|
||||
|
||||
|
@@ -15,15 +15,15 @@ class WXDLLIMPEXP_CORE wxApp : public wxAppBase
|
||||
public:
|
||||
wxApp();
|
||||
~wxApp();
|
||||
|
||||
|
||||
virtual bool Initialize(int& argc, wxChar **argv);
|
||||
|
||||
private:
|
||||
QApplication *m_qtApplication;
|
||||
int m_qtArgc;
|
||||
char **m_qtArgv;
|
||||
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxApp );
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_QT_APP_H_
|
||||
|
@@ -29,7 +29,7 @@ public:
|
||||
wxBitmap(const char* const* bits);
|
||||
wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
|
||||
wxBitmap(const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH, double scale = 1.0);
|
||||
|
||||
|
||||
// Convert from wxIcon / wxCursor
|
||||
wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); }
|
||||
explicit wxBitmap(const wxCursor& cursor);
|
||||
|
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
wxDEPRECATED_MSG("use wxBRUSHSTYLE_XXX constants")
|
||||
void SetStyle(int style) { SetStyle((wxBrushStyle)style); }
|
||||
|
||||
|
||||
QBrush GetHandle() const;
|
||||
|
||||
protected:
|
||||
|
@@ -14,7 +14,7 @@ class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase
|
||||
{
|
||||
public:
|
||||
wxChoice();
|
||||
|
||||
|
||||
wxChoice( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr );
|
||||
|
||||
|
||||
wxChoice( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr );
|
||||
|
||||
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@@ -64,7 +64,7 @@ protected:
|
||||
void **clientData,
|
||||
wxClientDataType type);
|
||||
virtual int DoInsertOneItem(const wxString& item, unsigned int pos);
|
||||
|
||||
|
||||
virtual void DoSetItemClientData(unsigned int n, void *clientData);
|
||||
virtual void *DoGetItemClientData(unsigned int n) const;
|
||||
|
||||
|
@@ -29,7 +29,7 @@ public:
|
||||
|
||||
virtual wxPoint GetHotSpot() const;
|
||||
QCursor &GetHandle() const;
|
||||
|
||||
|
||||
protected:
|
||||
void InitFromStock( wxStockCursor cursorId );
|
||||
#if wxUSE_IMAGE
|
||||
|
@@ -20,7 +20,7 @@ public:
|
||||
wxDataFormat(const wxChar *id);
|
||||
|
||||
void SetId( const wxChar *id );
|
||||
|
||||
|
||||
bool operator==(wxDataFormatId format) const;
|
||||
bool operator!=(wxDataFormatId format) const;
|
||||
bool operator==(const wxDataFormat& format) const;
|
||||
|
@@ -15,7 +15,7 @@ class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase
|
||||
public:
|
||||
wxDataObject();
|
||||
~wxDataObject();
|
||||
|
||||
|
||||
virtual bool IsSupportedFormat(const wxDataFormat& format, Direction dir) const;
|
||||
virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const;
|
||||
virtual size_t GetFormatCount(Direction dir = Get) const;
|
||||
|
@@ -112,7 +112,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual QPixmap *GetQPixmap() { return m_qtPixmap; }
|
||||
|
||||
|
||||
QPainter *m_qtPainter;
|
||||
QPixmap *m_qtPixmap;
|
||||
|
||||
@@ -132,7 +132,7 @@ private:
|
||||
|
||||
wxDECLARE_CLASS(wxQtDCImpl);
|
||||
wxDECLARE_NO_COPY_CLASS(wxQtDCImpl);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // _WX_QT_DC_H_
|
||||
|
@@ -14,7 +14,7 @@ class WXDLLIMPEXP_CORE wxPrinterDCImpl : public wxDCImpl
|
||||
{
|
||||
public:
|
||||
wxPrinterDCImpl( wxPrinterDC *, const wxPrintData & );
|
||||
|
||||
|
||||
virtual bool CanDrawBitmap() const;
|
||||
virtual bool CanGetTextExtent() const;
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
virtual void SetLogicalFunction(wxRasterOperationMode function);
|
||||
|
||||
|
||||
virtual wxCoord GetCharHeight() const;
|
||||
virtual wxCoord GetCharWidth() const;
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL) const;
|
||||
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
||||
wxFloodFillStyle style = wxFLOOD_SURFACE);
|
||||
|
||||
|
||||
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
|
||||
|
||||
virtual void DoDrawPoint(wxCoord x, wxCoord y);
|
||||
|
@@ -12,6 +12,6 @@
|
||||
|
||||
typedef class QWidget *WXWidget;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _WX_QT_DEFS_H_ */
|
||||
|
@@ -23,7 +23,7 @@ public:
|
||||
const wxString &name = wxDialogNameStr );
|
||||
|
||||
virtual ~wxDialog();
|
||||
|
||||
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
|
@@ -14,7 +14,7 @@ class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase
|
||||
{
|
||||
public:
|
||||
wxDropTarget(wxDataObject *dataObject = NULL );
|
||||
|
||||
|
||||
virtual bool OnDrop(wxCoord x, wxCoord y);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool GetData();
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
const wxIcon © = wxNullIcon,
|
||||
const wxIcon &move = wxNullIcon,
|
||||
const wxIcon &none = wxNullIcon);
|
||||
|
||||
|
||||
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
|
||||
};
|
||||
#endif // _WX_QT_DND_H_
|
||||
|
@@ -71,11 +71,11 @@ public:
|
||||
virtual void SetUnderlined( bool underlined );
|
||||
virtual void SetStrikethrough(bool strikethrough) wxOVERRIDE;
|
||||
virtual void SetEncoding(wxFontEncoding encoding);
|
||||
|
||||
|
||||
wxDECLARE_COMMON_FONT_METHODS();
|
||||
|
||||
virtual QFont GetHandle() const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
@@ -16,10 +16,10 @@ public:
|
||||
wxFontDialog() { }
|
||||
wxFontDialog(wxWindow *parent) { Create(parent); }
|
||||
wxFontDialog(wxWindow *parent, const wxFontData& data) { Create(parent, data); }
|
||||
|
||||
|
||||
protected:
|
||||
bool DoCreate(wxWindow *parent);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
wxFontData m_data;
|
||||
|
@@ -45,7 +45,7 @@ public:
|
||||
virtual void SetMenuBar(wxMenuBar *menubar);
|
||||
virtual void SetStatusBar(wxStatusBar *statusBar );
|
||||
virtual void SetToolBar(wxToolBar *toolbar);
|
||||
|
||||
|
||||
virtual void SetWindowStyleFlag( long style );
|
||||
|
||||
virtual void AddChild( wxWindowBase *child );
|
||||
|
@@ -51,11 +51,11 @@ public:
|
||||
|
||||
virtual bool IsSelected(int n) const wxOVERRIDE;
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const wxOVERRIDE;
|
||||
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
|
||||
|
||||
virtual int GetSelection() const;
|
||||
|
||||
virtual QWidget *GetHandle() const;
|
||||
@@ -66,16 +66,16 @@ protected:
|
||||
virtual void DoSetFirstItem(int n) wxOVERRIDE;
|
||||
|
||||
virtual void DoSetSelection(int n, bool select) wxOVERRIDE;
|
||||
|
||||
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter & items,
|
||||
unsigned int pos,
|
||||
void **clientData,
|
||||
wxClientDataType type);
|
||||
virtual int DoInsertOneItem(const wxString& item, unsigned int pos);
|
||||
|
||||
|
||||
virtual void DoSetItemClientData(unsigned int n, void *clientData);
|
||||
virtual void *DoGetItemClientData(unsigned int n) const;
|
||||
|
||||
|
||||
virtual void DoClear();
|
||||
virtual void DoDeleteOneItem(unsigned int pos);
|
||||
|
||||
|
@@ -75,7 +75,7 @@ class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase
|
||||
{
|
||||
public:
|
||||
wxMDIClientWindow();
|
||||
|
||||
|
||||
virtual bool CreateClient(wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL);
|
||||
wxDECLARE_DYNAMIC_CLASS(wxMDIClientWindow);
|
||||
};
|
||||
|
@@ -25,7 +25,7 @@ public:
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
return wxFrame::Create(parent, id, title, pos, size,
|
||||
style | wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR,
|
||||
style | wxFRAME_TOOL_WINDOW | wxFRAME_NO_TASKBAR,
|
||||
name);
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxNotebookNameStr);
|
||||
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
|
@@ -13,9 +13,9 @@ class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
|
||||
public:
|
||||
wxPalette();
|
||||
wxPalette(int n, unsigned char *red, unsigned char *green, unsigned char *blue);
|
||||
|
||||
|
||||
bool Create(int n, unsigned char *red, unsigned char *green, unsigned char *blue);
|
||||
|
||||
|
||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||
|
||||
|
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants")
|
||||
void SetStyle(int style) { SetStyle((wxPenStyle)style); }
|
||||
|
||||
|
||||
QPen GetHandle() const;
|
||||
|
||||
protected:
|
||||
|
@@ -15,12 +15,12 @@ class WXDLLIMPEXP_CORE wxQtPrintNativeData: public wxPrintNativeDataBase
|
||||
{
|
||||
public:
|
||||
wxQtPrintNativeData();
|
||||
|
||||
|
||||
virtual bool TransferTo( wxPrintData &data );
|
||||
virtual bool TransferFrom( const wxPrintData &data );
|
||||
|
||||
virtual bool IsOk() const;
|
||||
|
||||
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_CORE wxQtPrintDialog : public wxPrintDialogBase
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
wxQtPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data);
|
||||
|
||||
|
||||
virtual bool Print(bool interactive);
|
||||
virtual void DetermineScaling();
|
||||
|
||||
|
@@ -29,7 +29,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void timerEvent( QTimerEvent * event );
|
||||
|
||||
|
||||
private:
|
||||
int m_timerId;
|
||||
};
|
||||
|
@@ -253,7 +253,7 @@ protected:
|
||||
else
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
||||
//wxMoveEvent
|
||||
virtual void moveEvent ( QMoveEvent * event )
|
||||
{
|
||||
@@ -265,7 +265,7 @@ protected:
|
||||
else
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
||||
//wxEraseEvent then wxPaintEvent
|
||||
virtual void paintEvent ( QPaintEvent * event )
|
||||
{
|
||||
@@ -301,7 +301,7 @@ protected:
|
||||
else
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
||||
//wxMouseEvent
|
||||
virtual void wheelEvent ( QWheelEvent * event )
|
||||
{
|
||||
|
@@ -23,7 +23,7 @@ public:
|
||||
wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
|
||||
wxRegion(const wxBitmap& bmp);
|
||||
wxRegion(const wxBitmap& bmp, const wxColour& transp, int tolerance = 0);
|
||||
|
||||
|
||||
virtual bool IsEmpty() const;
|
||||
virtual void Clear();
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
wxCoord GetH() const;
|
||||
wxCoord GetHeight() const;
|
||||
wxRect GetRect() const;
|
||||
|
||||
|
||||
private:
|
||||
QVector < QRect > *m_qtRects;
|
||||
int m_pos;
|
||||
|
@@ -14,7 +14,7 @@ class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase
|
||||
{
|
||||
public:
|
||||
wxStaticBox();
|
||||
|
||||
|
||||
wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
|
||||
QStatusBar *GetQStatusBar() const { return m_qtStatusBar; }
|
||||
QWidget *GetHandle() const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void DoUpdateStatusText(int number);
|
||||
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
|
||||
virtual bool GetStyle(long position, wxTextAttr& style);
|
||||
virtual bool SetDefaultStyle(const wxTextAttr& style);
|
||||
|
||||
|
||||
virtual long XYToPosition(long x, long y) const;
|
||||
virtual bool PositionToXY(long pos, long *x, long *y) const;
|
||||
|
||||
|
@@ -20,7 +20,7 @@ public:
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
|
||||
|
||||
virtual void Undo();
|
||||
virtual void Redo();
|
||||
virtual bool CanUndo() const;
|
||||
@@ -32,10 +32,10 @@ public:
|
||||
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void GetSelection(long *from, long *to) const;
|
||||
|
||||
|
||||
virtual bool IsEditable() const;
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
|
||||
protected:
|
||||
virtual wxString DoGetValue() const;
|
||||
virtual void DoSetValue(const wxString& value, int flags=0);
|
||||
|
@@ -25,7 +25,7 @@ public:
|
||||
static void SetAutoPop(long milliseconds);
|
||||
// set the delay between subsequent tooltips to appear
|
||||
static void SetReshow(long milliseconds);
|
||||
|
||||
|
||||
wxToolTip(const wxString &tip);
|
||||
|
||||
void SetTip(const wxString& tip);
|
||||
|
@@ -28,7 +28,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
|
||||
virtual bool Show(bool show = true) wxOVERRIDE;
|
||||
virtual void Maximize(bool maximize = true);
|
||||
virtual void Restore();
|
||||
@@ -41,10 +41,10 @@ public:
|
||||
virtual void SetTitle(const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
virtual void SetIcons(const wxIconBundle& icons);
|
||||
|
||||
|
||||
// Styles
|
||||
virtual void SetWindowStyleFlag( long style );
|
||||
virtual long GetWindowStyleFlag() const;
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_QT_TOPLEVEL_H_
|
||||
|
@@ -29,7 +29,7 @@ public:
|
||||
const wxString& name = wxTreeCtrlNameStr);
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
|
||||
|
||||
virtual unsigned int GetIndent() const;
|
||||
virtual void SetIndent(unsigned int indent);
|
||||
|
||||
@@ -55,15 +55,15 @@ public:
|
||||
virtual void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
|
||||
virtual void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col);
|
||||
virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font);
|
||||
|
||||
|
||||
virtual bool IsVisible(const wxTreeItemId& item) const;
|
||||
virtual bool ItemHasChildren(const wxTreeItemId& item) const;
|
||||
virtual bool IsExpanded(const wxTreeItemId& item) const;
|
||||
virtual bool IsSelected(const wxTreeItemId& item) const;
|
||||
virtual bool IsBold(const wxTreeItemId& item) const;
|
||||
|
||||
|
||||
virtual size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true) const;
|
||||
|
||||
|
||||
virtual wxTreeItemId GetRootItem() const;
|
||||
virtual wxTreeItemId GetSelection() const;
|
||||
virtual size_t GetSelections(wxArrayTreeItemIds& selections) const;
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
virtual wxTreeItemId GetFocusedItem() const;
|
||||
|
||||
virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
|
||||
|
||||
|
||||
virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
|
||||
virtual wxTreeItemId GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) const;
|
||||
virtual wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
|
||||
|
@@ -171,7 +171,7 @@ typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxImagePixelFormat;
|
||||
#define wxPIXEL_FORMAT_ALPHA 3
|
||||
#elif defined(__WXQT__)
|
||||
typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat;
|
||||
|
||||
|
||||
#define wxPIXEL_FORMAT_ALPHA 3
|
||||
#endif
|
||||
|
||||
|
@@ -3905,7 +3905,7 @@ protected:
|
||||
covers common needs especially for simple, static fields using text or a bitmap.
|
||||
|
||||
Register field types on application initialisation with the static function
|
||||
wxRichTextBuffer::AddFieldType. They will be deleted automatically on
|
||||
wxRichTextBuffer::AddFieldType. They will be deleted automatically on
|
||||
application exit.
|
||||
|
||||
An application can write a field to a control with wxRichTextCtrl::WriteField,
|
||||
@@ -6122,7 +6122,7 @@ public:
|
||||
|
||||
/**
|
||||
Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none.
|
||||
*/
|
||||
*/
|
||||
virtual wxPosition GetFocusedCell() const;
|
||||
|
||||
// Operations
|
||||
@@ -6206,7 +6206,7 @@ public:
|
||||
wxRichTextTableBlock(const wxRichTextTableBlock& block) { Copy(block); }
|
||||
|
||||
void Init() { m_colStart = 0; m_colEnd = 0; m_rowStart = 0; m_rowEnd = 0; }
|
||||
|
||||
|
||||
void Copy(const wxRichTextTableBlock& block)
|
||||
{
|
||||
m_colStart = block.m_colStart; m_colEnd = block.m_colEnd; m_rowStart = block.m_rowStart; m_rowEnd = block.m_rowEnd;
|
||||
|
@@ -87,7 +87,7 @@ public:
|
||||
/// be removed from the page. By default, these effects are not shown as they
|
||||
/// have no effect in the editor.
|
||||
static int GetAllowedTextEffects() { return sm_allowedTextEffects; }
|
||||
|
||||
|
||||
/// Sets the allowed text effects in the page.
|
||||
static void SetAllowedTextEffects(int allowed) { sm_allowedTextEffects = allowed; }
|
||||
|
||||
|
@@ -44,7 +44,7 @@ class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextObjectPropertiesDialog: public wxRichTextFormattingDialog
|
||||
{
|
||||
{
|
||||
wxDECLARE_DYNAMIC_CLASS(wxRichTextObjectPropertiesDialog);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// Name: wx/richtext/richtextmarginspage.h
|
||||
// Purpose: Declares the rich text formatting dialog margins page.
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Modified by:
|
||||
// Created: 20/10/2010 10:27:34
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
@@ -70,11 +70,11 @@ public:
|
||||
|
||||
/// Gets the attributes from the formatting dialog
|
||||
wxRichTextAttr* GetAttributes();
|
||||
|
||||
|
||||
/// Data transfer
|
||||
virtual bool TransferDataToWindow() wxOVERRIDE;
|
||||
virtual bool TransferDataFromWindow() wxOVERRIDE;
|
||||
|
||||
|
||||
////@begin wxRichTextMarginsPage event handler declarations
|
||||
|
||||
/// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT_MARGIN
|
||||
|
@@ -26,7 +26,7 @@
|
||||
wxRichTextFormattingDialog::GetHelpInfo().SetHelpId(ID_HELP_FORMATTINGDIALOG);
|
||||
wxRichTextFormattingDialog::GetHelpInfo().SetUICustomization(& wxGetApp().GetRichTextUICustomization());
|
||||
wxRichTextBordersPage::GetHelpInfo().SetHelpId(ID_HELP_BORDERSPAGE);
|
||||
|
||||
|
||||
Only the wxRichTextFormattingDialog class needs to have its customization object and help id set,
|
||||
though the application set them for individual pages if it wants.
|
||||
**/
|
||||
@@ -46,17 +46,17 @@ public:
|
||||
This class is used as a static member of dialogs, to store the help topic for the dialog
|
||||
and also the customization object that will allow help to be shown appropriately for the application.
|
||||
**/
|
||||
|
||||
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextHelpInfo
|
||||
{
|
||||
public:
|
||||
wxRichTextHelpInfo()
|
||||
{
|
||||
m_helpTopic = -1;
|
||||
m_uiCustomization = NULL;
|
||||
m_uiCustomization = NULL;
|
||||
}
|
||||
virtual ~wxRichTextHelpInfo() {}
|
||||
|
||||
|
||||
virtual bool ShowHelp(wxWindow* win)
|
||||
{
|
||||
if ( !m_uiCustomization || m_helpTopic == -1 )
|
||||
|
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
void OutputString(wxOutputStream& stream, const wxString& str);
|
||||
void OutputStringEnt(wxOutputStream& stream, const wxString& str);
|
||||
|
||||
|
||||
static void AddString(wxString& str, const int& v) { str << wxString::Format(wxT("%d"), v); }
|
||||
static void AddString(wxString& str, const long& v) { str << wxString::Format(wxT("%ld"), v); }
|
||||
static void AddString(wxString& str, const double& v) { str << wxString::Format(wxT("%.2f"), (float) v); }
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
|
||||
/// Create a string containing style attributes, plus further object 'attributes' (shown, id)
|
||||
static wxString AddAttributes(wxRichTextObject* obj, bool isPara = false);
|
||||
|
||||
|
||||
virtual bool ExportStyleDefinition(wxOutputStream& stream, wxRichTextStyleDefinition* def, int level);
|
||||
|
||||
virtual bool WriteProperties(wxOutputStream& stream, const wxRichTextProperties& properties, int level);
|
||||
|
@@ -85,9 +85,9 @@ public:
|
||||
// If it based on wxObject return the ClassInfo.
|
||||
virtual wxClassInfo* GetValueClassInfo() { return NULL; }
|
||||
|
||||
int GetRefCount() const
|
||||
int GetRefCount() const
|
||||
{ return m_count; }
|
||||
void IncRef()
|
||||
void IncRef()
|
||||
{ m_count++; }
|
||||
void DecRef()
|
||||
{
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
wxVariantBase(const wxVariantBase& variant);
|
||||
wxVariantBase(wxVariantData* data, const wxString& name = wxEmptyString);
|
||||
|
||||
template<typename T>
|
||||
template<typename T>
|
||||
wxVariantBase(const T& data, const wxString& name = wxEmptyString) :
|
||||
m_data(new wxVariantDataT<T>(data)), m_name(name) {}
|
||||
|
||||
@@ -207,19 +207,19 @@ public:
|
||||
// FIXME wxXTI methods:
|
||||
|
||||
// get the typeinfo of the stored object
|
||||
const wxTypeInfo* GetTypeInfo() const
|
||||
{
|
||||
const wxTypeInfo* GetTypeInfo() const
|
||||
{
|
||||
if (!m_data)
|
||||
return NULL;
|
||||
return m_data->GetTypeInfo();
|
||||
return m_data->GetTypeInfo();
|
||||
}
|
||||
|
||||
// get a ref to the stored data
|
||||
template<typename T> T& Get()
|
||||
{
|
||||
wxVariantDataT<T> *dataptr =
|
||||
wxVariantDataT<T> *dataptr =
|
||||
wx_dynamic_cast(wxVariantDataT<T>*, m_data);
|
||||
wxASSERT_MSG( dataptr,
|
||||
wxASSERT_MSG( dataptr,
|
||||
wxString::Format(wxT("Cast to %s not possible"), typeid(T).name()) );
|
||||
return dataptr->Get();
|
||||
}
|
||||
@@ -227,16 +227,16 @@ public:
|
||||
// get a const ref to the stored data
|
||||
template<typename T> const T& Get() const
|
||||
{
|
||||
const wxVariantDataT<T> *dataptr =
|
||||
const wxVariantDataT<T> *dataptr =
|
||||
wx_dynamic_cast(const wxVariantDataT<T>*, m_data);
|
||||
wxASSERT_MSG( dataptr,
|
||||
wxASSERT_MSG( dataptr,
|
||||
wxString::Format(wxT("Cast to %s not possible"), typeid(T).name()) );
|
||||
return dataptr->Get();
|
||||
}
|
||||
|
||||
template<typename T> bool HasData() const
|
||||
{
|
||||
const wxVariantDataT<T> *dataptr =
|
||||
const wxVariantDataT<T> *dataptr =
|
||||
wx_dynamic_cast(const wxVariantDataT<T>*, m_data);
|
||||
return dataptr != NULL;
|
||||
}
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
// returns this value as string
|
||||
wxString GetAsString() const;
|
||||
|
||||
// gets the stored data casted to a wxObject*,
|
||||
// gets the stored data casted to a wxObject*,
|
||||
// returning NULL if cast is not possible
|
||||
wxObject* GetAsObject();
|
||||
|
||||
|
@@ -195,9 +195,9 @@ public:
|
||||
|
||||
virtual ~wxClassInfo();
|
||||
|
||||
// allocates an instance of this class, this object does not have to be
|
||||
// allocates an instance of this class, this object does not have to be
|
||||
// initialized or fully constructed as this call will be followed by a call to Create
|
||||
virtual wxObject *AllocateObject() const
|
||||
virtual wxObject *AllocateObject() const
|
||||
{ return m_objectConstructor ? (*m_objectConstructor)() : 0; }
|
||||
|
||||
// 'old naming' for AllocateObject staying here for backward compatibility
|
||||
@@ -207,8 +207,8 @@ public:
|
||||
wxObject *ConstructObject(int ParamCount, wxAny *Params) const;
|
||||
|
||||
bool NeedsDirectConstruction() const;
|
||||
|
||||
const wxChar *GetClassName() const
|
||||
|
||||
const wxChar *GetClassName() const
|
||||
{ return m_className; }
|
||||
const wxChar *GetBaseClassName1() const
|
||||
{ return m_parents[0] ? m_parents[0]->GetClassName() : NULL; }
|
||||
@@ -220,25 +220,25 @@ public:
|
||||
const wxClassInfo *GetBaseClass2() const
|
||||
{ return m_parents[0] ? m_parents[1] : NULL; }
|
||||
|
||||
const wxChar *GetIncludeName() const
|
||||
const wxChar *GetIncludeName() const
|
||||
{ return m_unitName; }
|
||||
const wxClassInfo **GetParents() const
|
||||
const wxClassInfo **GetParents() const
|
||||
{ return m_parents; }
|
||||
int GetSize() const
|
||||
int GetSize() const
|
||||
{ return m_objectSize; }
|
||||
bool IsDynamic() const
|
||||
bool IsDynamic() const
|
||||
{ return (NULL != m_objectConstructor); }
|
||||
|
||||
wxObjectConstructorFn GetConstructor() const
|
||||
wxObjectConstructorFn GetConstructor() const
|
||||
{ return m_objectConstructor; }
|
||||
const wxClassInfo *GetNext() const
|
||||
const wxClassInfo *GetNext() const
|
||||
{ return m_next; }
|
||||
|
||||
// statics:
|
||||
|
||||
static void CleanUp();
|
||||
static wxClassInfo *FindClass(const wxString& className);
|
||||
static const wxClassInfo *GetFirst()
|
||||
static const wxClassInfo *GetFirst()
|
||||
{ return sm_first; }
|
||||
|
||||
|
||||
@@ -254,18 +254,18 @@ public:
|
||||
// this object by returning false, if this class has not registered a
|
||||
// callback, the search will go up the inheritance tree if no callback has
|
||||
// been registered true will be returned by default
|
||||
bool BeforeWriteObject( const wxObject *obj, wxObjectWriter *streamer,
|
||||
bool BeforeWriteObject( const wxObject *obj, wxObjectWriter *streamer,
|
||||
wxObjectWriterCallback *writercallback, const wxStringToAnyHashMap &metadata) const;
|
||||
|
||||
// gets the streaming callback from this class or any superclass
|
||||
wxObjectStreamingCallback GetStreamingCallback() const;
|
||||
|
||||
// returns the first property
|
||||
wxPropertyInfo* GetFirstProperty() const
|
||||
wxPropertyInfo* GetFirstProperty() const
|
||||
{ EnsureInfosInited(); return m_firstProperty; }
|
||||
|
||||
// returns the first handler
|
||||
wxHandlerInfo* GetFirstHandler() const
|
||||
wxHandlerInfo* GetFirstHandler() const
|
||||
{ EnsureInfosInited(); return m_firstHandler; }
|
||||
|
||||
// Call the Create upon an instance of the class, in the end the object is fully
|
||||
@@ -273,26 +273,26 @@ public:
|
||||
virtual bool Create (wxObject *object, int ParamCount, wxAny *Params) const;
|
||||
|
||||
// get number of parameters for constructor
|
||||
virtual int GetCreateParamCount() const
|
||||
virtual int GetCreateParamCount() const
|
||||
{ return m_constructorPropertiesCount; }
|
||||
|
||||
// get n-th constructor parameter
|
||||
virtual const wxChar* GetCreateParamName(int n) const
|
||||
virtual const wxChar* GetCreateParamName(int n) const
|
||||
{ return m_constructorProperties[n]; }
|
||||
|
||||
// Runtime access to objects for simple properties (get/set) by property
|
||||
// Runtime access to objects for simple properties (get/set) by property
|
||||
// name and variant data
|
||||
virtual void SetProperty (wxObject *object, const wxChar *propertyName,
|
||||
virtual void SetProperty (wxObject *object, const wxChar *propertyName,
|
||||
const wxAny &value) const;
|
||||
virtual wxAny GetProperty (wxObject *object, const wxChar *propertyName) const;
|
||||
|
||||
// Runtime access to objects for collection properties by property name
|
||||
virtual wxAnyList GetPropertyCollection(wxObject *object,
|
||||
virtual wxAnyList GetPropertyCollection(wxObject *object,
|
||||
const wxChar *propertyName) const;
|
||||
virtual void AddToPropertyCollection(wxObject *object, const wxChar *propertyName,
|
||||
virtual void AddToPropertyCollection(wxObject *object, const wxChar *propertyName,
|
||||
const wxAny& value) const;
|
||||
|
||||
// we must be able to cast variants to wxObject pointers, templates seem
|
||||
// we must be able to cast variants to wxObject pointers, templates seem
|
||||
// not to be suitable
|
||||
void CallOnAny( const wxAny &data, wxObjectFunctor* functor ) const;
|
||||
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
// find handler by name
|
||||
virtual wxHandlerInfo *FindHandlerInfoInThisClass (const wxChar *handlerName) const;
|
||||
|
||||
// puts all the properties of this class and its superclasses in the map,
|
||||
// puts all the properties of this class and its superclasses in the map,
|
||||
// as long as there is not yet an entry with the same name (overriding mechanism)
|
||||
void GetProperties( wxPropertyInfoMap &map ) const;
|
||||
|
||||
@@ -385,7 +385,7 @@ class WXDLLIMPEXP_BASE wxDynamicClassInfo : public wxClassInfo
|
||||
friend class WXDLLIMPEXP_BASE wxDynamicObject;
|
||||
|
||||
public:
|
||||
wxDynamicClassInfo( const wxChar *_UnitName, const wxChar *_ClassName,
|
||||
wxDynamicClassInfo( const wxChar *_UnitName, const wxChar *_ClassName,
|
||||
const wxClassInfo* superClass );
|
||||
virtual ~wxDynamicClassInfo();
|
||||
|
||||
@@ -402,7 +402,7 @@ public:
|
||||
virtual const wxChar* GetCreateParamName(int i) const;
|
||||
|
||||
// Runtime access to objects by property name, and variant data
|
||||
virtual void SetProperty (wxObject *object, const wxChar *PropertyName,
|
||||
virtual void SetProperty (wxObject *object, const wxChar *PropertyName,
|
||||
const wxAny &Value) const;
|
||||
virtual wxAny GetProperty (wxObject *object, const wxChar *PropertyName) const;
|
||||
|
||||
@@ -416,7 +416,7 @@ public:
|
||||
void RenameProperty( const wxChar *oldPropertyName, const wxChar *newPropertyName );
|
||||
|
||||
// as a handler to this class at runtime
|
||||
void AddHandler( const wxChar *handlerName, wxObjectEventFunction address,
|
||||
void AddHandler( const wxChar *handlerName, wxObjectEventFunction address,
|
||||
const wxClassInfo* eventClassInfo );
|
||||
|
||||
// removes an existing runtime-handler
|
||||
|
@@ -92,7 +92,7 @@ private :
|
||||
|
||||
#define _DEFAULT_CONSTRUCTOR(name) \
|
||||
wxObject* wxConstructorFor##name() \
|
||||
{ return new name; }
|
||||
{ return new name; }
|
||||
|
||||
#define _DEFAULT_CONVERTERS(name) \
|
||||
wxObject* wxVariantOfPtrToObjectConverter##name ( const wxAny &data ) \
|
||||
@@ -258,28 +258,28 @@ template<typename T>
|
||||
void wxStringWriteValue( wxString &s, const T &data);
|
||||
|
||||
template<typename T>
|
||||
void wxToStringConverter( const wxAny &v, wxString &s )
|
||||
void wxToStringConverter( const wxAny &v, wxString &s )
|
||||
{ wxStringWriteValue(s, v.As<T>()); }
|
||||
|
||||
template<typename T>
|
||||
void wxFromStringConverter( const wxString &s, wxAny &v)
|
||||
void wxFromStringConverter( const wxString &s, wxAny &v)
|
||||
{ T d; wxStringReadValue(s, d); v = wxAny(d); }
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Collection Support
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
template<typename iter, typename collection_t > void wxListCollectionToAnyList(
|
||||
template<typename iter, typename collection_t > void wxListCollectionToAnyList(
|
||||
const collection_t& coll, wxAnyList &value )
|
||||
{
|
||||
for ( iter current = coll.GetFirst(); current;
|
||||
for ( iter current = coll.GetFirst(); current;
|
||||
current = current->GetNext() )
|
||||
{
|
||||
value.Append( new wxAny(current->GetData()) );
|
||||
}
|
||||
}
|
||||
|
||||
template<typename collection_t> void wxArrayCollectionToVariantArray(
|
||||
template<typename collection_t> void wxArrayCollectionToVariantArray(
|
||||
const collection_t& coll, wxAnyList &value )
|
||||
{
|
||||
for( size_t i = 0; i < coll.GetCount(); i++ )
|
||||
|
@@ -159,47 +159,47 @@ public: \
|
||||
class WXDLLIMPEXP_BASE wxPropertyAccessor
|
||||
{
|
||||
public:
|
||||
wxPropertyAccessor( wxPropertySetter *setter, wxPropertyGetter *getter,
|
||||
wxPropertyAccessor( wxPropertySetter *setter, wxPropertyGetter *getter,
|
||||
wxPropertyCollectionAdder *adder, wxPropertyCollectionGetter *collectionGetter )
|
||||
{ m_setter = setter; m_getter = getter; m_adder = adder;
|
||||
{ m_setter = setter; m_getter = getter; m_adder = adder;
|
||||
m_collectionGetter = collectionGetter; }
|
||||
|
||||
virtual ~wxPropertyAccessor() {}
|
||||
|
||||
// Setting a simple property (non-collection)
|
||||
virtual void SetProperty(wxObject *object, const wxAny &value) const
|
||||
{
|
||||
if ( m_setter )
|
||||
m_setter->Set( object, value );
|
||||
else
|
||||
wxLogError( wxGetTranslation("SetProperty called w/o valid setter") );
|
||||
{
|
||||
if ( m_setter )
|
||||
m_setter->Set( object, value );
|
||||
else
|
||||
wxLogError( wxGetTranslation("SetProperty called w/o valid setter") );
|
||||
}
|
||||
|
||||
// Getting a simple property (non-collection)
|
||||
virtual void GetProperty(const wxObject *object, wxAny &result) const
|
||||
{
|
||||
if ( m_getter )
|
||||
m_getter->Get( object, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation("GetProperty called w/o valid getter") );
|
||||
{
|
||||
if ( m_getter )
|
||||
m_getter->Get( object, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation("GetProperty called w/o valid getter") );
|
||||
}
|
||||
|
||||
// Adding an element to a collection property
|
||||
virtual void AddToPropertyCollection(wxObject *object, const wxAny &value) const
|
||||
{
|
||||
if ( m_adder )
|
||||
m_adder->Add( object, value );
|
||||
else
|
||||
wxLogError( wxGetTranslation("AddToPropertyCollection called w/o valid adder") );
|
||||
{
|
||||
if ( m_adder )
|
||||
m_adder->Add( object, value );
|
||||
else
|
||||
wxLogError( wxGetTranslation("AddToPropertyCollection called w/o valid adder") );
|
||||
}
|
||||
|
||||
// Getting a collection property
|
||||
virtual void GetPropertyCollection( const wxObject *obj, wxAnyList &result) const
|
||||
{
|
||||
if ( m_collectionGetter )
|
||||
m_collectionGetter->Get( obj, result);
|
||||
else
|
||||
wxLogError( wxGetTranslation("GetPropertyCollection called w/o valid collection getter") );
|
||||
{
|
||||
if ( m_collectionGetter )
|
||||
m_collectionGetter->Get( obj, result);
|
||||
else
|
||||
wxLogError( wxGetTranslation("GetPropertyCollection called w/o valid collection getter") );
|
||||
}
|
||||
|
||||
virtual bool HasSetter() const { return m_setter != NULL; }
|
||||
@@ -249,17 +249,17 @@ public:
|
||||
virtual void GetProperty(const wxObject *object, wxAny &value) const;
|
||||
|
||||
// Adding an element to a collection property
|
||||
virtual void AddToPropertyCollection(wxObject *WXUNUSED(object),
|
||||
virtual void AddToPropertyCollection(wxObject *WXUNUSED(object),
|
||||
const wxAny &WXUNUSED(value)) const
|
||||
{
|
||||
wxLogError( wxGetTranslation("AddToPropertyCollection called on a generic accessor") );
|
||||
{
|
||||
wxLogError( wxGetTranslation("AddToPropertyCollection called on a generic accessor") );
|
||||
}
|
||||
|
||||
// Getting a collection property
|
||||
virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj),
|
||||
virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj),
|
||||
wxAnyList &WXUNUSED(result)) const
|
||||
{
|
||||
wxLogError ( wxGetTranslation("GetPropertyCollection called on a generic accessor") );
|
||||
{
|
||||
wxLogError ( wxGetTranslation("GetPropertyCollection called on a generic accessor") );
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -271,7 +271,7 @@ private:
|
||||
};
|
||||
|
||||
typedef long wxPropertyInfoFlags;
|
||||
enum
|
||||
enum
|
||||
{
|
||||
// will be removed in future releases
|
||||
wxPROP_DEPRECATED = 0x00000001,
|
||||
@@ -279,11 +279,11 @@ enum
|
||||
// object graph property, will be streamed with priority (after constructor properties)
|
||||
wxPROP_OBJECT_GRAPH = 0x00000002,
|
||||
|
||||
// this will only be streamed out and in as enum/set, the internal representation
|
||||
// this will only be streamed out and in as enum/set, the internal representation
|
||||
// is still a long
|
||||
wxPROP_ENUM_STORE_LONG = 0x00000004,
|
||||
|
||||
// don't stream out this property, needed eg to avoid streaming out children
|
||||
// don't stream out this property, needed eg to avoid streaming out children
|
||||
// that are always created by their parents
|
||||
wxPROP_DONT_STREAM = 0x00000008
|
||||
};
|
||||
@@ -442,7 +442,7 @@ private:
|
||||
|
||||
// stl is giving problems when forwarding declarations, therefore we define it as a subclass
|
||||
|
||||
WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo*, wxPropertyInfoMapBase,
|
||||
WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo*, wxPropertyInfoMapBase,
|
||||
class WXDLLIMPEXP_BASE );
|
||||
|
||||
class WXDLLIMPEXP_BASE wxPropertyInfoMap : public wxPropertyInfoMapBase {
|
||||
|
@@ -54,58 +54,58 @@ public:
|
||||
virtual ~wxObjectWriterCallback() {}
|
||||
|
||||
// will be called before an object is written, may veto by returning false
|
||||
virtual bool BeforeWriteObject( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxClassInfo *WXUNUSED(classInfo),
|
||||
const wxStringToAnyHashMap &WXUNUSED(metadata))
|
||||
virtual bool BeforeWriteObject( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxClassInfo *WXUNUSED(classInfo),
|
||||
const wxStringToAnyHashMap &WXUNUSED(metadata))
|
||||
{ return true; }
|
||||
|
||||
// will be called after this object has been written, may be
|
||||
// will be called after this object has been written, may be
|
||||
// needed for adjusting stacks
|
||||
virtual void AfterWriteObject( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxClassInfo *WXUNUSED(classInfo) )
|
||||
virtual void AfterWriteObject( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxClassInfo *WXUNUSED(classInfo) )
|
||||
{}
|
||||
|
||||
// will be called before a property gets written, may change the value,
|
||||
// eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
|
||||
// will be called before a property gets written, may change the value,
|
||||
// eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
|
||||
// or veto writing that property at all by returning false
|
||||
virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxPropertyInfo *WXUNUSED(propInfo),
|
||||
const wxAny &WXUNUSED(value) )
|
||||
virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxPropertyInfo *WXUNUSED(propInfo),
|
||||
const wxAny &WXUNUSED(value) )
|
||||
{ return true; }
|
||||
|
||||
// will be called before a property gets written, may change the value,
|
||||
// eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
|
||||
// will be called before a property gets written, may change the value,
|
||||
// eg replace a concrete wxSize by wxSize( wxDefaultCoord, wxDefaultCoord )
|
||||
// or veto writing that property at all by returning false
|
||||
virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxPropertyInfo *WXUNUSED(propInfo),
|
||||
const wxAnyList &WXUNUSED(value) )
|
||||
virtual bool BeforeWriteProperty( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxPropertyInfo *WXUNUSED(propInfo),
|
||||
const wxAnyList &WXUNUSED(value) )
|
||||
{ return true; }
|
||||
|
||||
// will be called after a property has been written out, may be needed
|
||||
// will be called after a property has been written out, may be needed
|
||||
// for adjusting stacks
|
||||
virtual void AfterWriteProperty( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxPropertyInfo *WXUNUSED(propInfo) )
|
||||
virtual void AfterWriteProperty( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxPropertyInfo *WXUNUSED(propInfo) )
|
||||
{}
|
||||
|
||||
// will be called before this delegate gets written
|
||||
virtual bool BeforeWriteDelegate( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxClassInfo* WXUNUSED(classInfo),
|
||||
virtual bool BeforeWriteDelegate( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxClassInfo* WXUNUSED(classInfo),
|
||||
const wxPropertyInfo *WXUNUSED(propInfo),
|
||||
const wxObject *&WXUNUSED(eventSink),
|
||||
const wxHandlerInfo* &WXUNUSED(handlerInfo) )
|
||||
const wxObject *&WXUNUSED(eventSink),
|
||||
const wxHandlerInfo* &WXUNUSED(handlerInfo) )
|
||||
{ return true; }
|
||||
|
||||
virtual void AfterWriteDelegate( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxClassInfo* WXUNUSED(classInfo),
|
||||
virtual void AfterWriteDelegate( wxObjectWriter *WXUNUSED(writer),
|
||||
const wxObject *WXUNUSED(object),
|
||||
const wxClassInfo* WXUNUSED(classInfo),
|
||||
const wxPropertyInfo *WXUNUSED(propInfo),
|
||||
const wxObject *&WXUNUSED(eventSink),
|
||||
const wxHandlerInfo* &WXUNUSED(handlerInfo) )
|
||||
const wxObject *&WXUNUSED(eventSink),
|
||||
const wxHandlerInfo* &WXUNUSED(handlerInfo) )
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -121,15 +121,15 @@ public:
|
||||
virtual ~wxObjectWriter();
|
||||
|
||||
// with this call you start writing out a new top-level object
|
||||
void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
|
||||
wxObjectWriterCallback *writercallback, const wxString &name,
|
||||
void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
|
||||
wxObjectWriterCallback *writercallback, const wxString &name,
|
||||
const wxStringToAnyHashMap &metadata);
|
||||
|
||||
// Managing the object identity table a.k.a context
|
||||
//
|
||||
// these methods make sure that no object gets written twice,
|
||||
// these methods make sure that no object gets written twice,
|
||||
// because sometimes multiple calls to the WriteObject will be
|
||||
// made without wanting to have duplicate objects written, the
|
||||
// made without wanting to have duplicate objects written, the
|
||||
// object identity table will be reset manually
|
||||
virtual void ClearObjectContext();
|
||||
|
||||
@@ -151,12 +151,12 @@ public:
|
||||
virtual void DoEndWriteTopLevelEntry( const wxString &name ) = 0;
|
||||
|
||||
// start of writing an object having the passed in ID
|
||||
virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo,
|
||||
virtual void DoBeginWriteObject(const wxObject *object, const wxClassInfo *classInfo,
|
||||
int objectID, const wxStringToAnyHashMap &metadata ) = 0;
|
||||
|
||||
// end of writing an toplevel object name param is used for unique
|
||||
// end of writing an toplevel object name param is used for unique
|
||||
// identification within the container
|
||||
virtual void DoEndWriteObject(const wxObject *object,
|
||||
virtual void DoEndWriteObject(const wxObject *object,
|
||||
const wxClassInfo *classInfo, int objectID ) = 0;
|
||||
|
||||
// writes a simple property in the stream format
|
||||
@@ -177,12 +177,12 @@ public:
|
||||
virtual void DoWriteNullObject() = 0;
|
||||
|
||||
// writes a delegate in the stream format
|
||||
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo,
|
||||
const wxPropertyInfo *propInfo, const wxObject *eventSink,
|
||||
virtual void DoWriteDelegate( const wxObject *object, const wxClassInfo* classInfo,
|
||||
const wxPropertyInfo *propInfo, const wxObject *eventSink,
|
||||
int sinkObjectID, const wxClassInfo* eventSinkClassInfo,
|
||||
const wxHandlerInfo* handlerIndo ) = 0;
|
||||
|
||||
void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
|
||||
void WriteObject(const wxObject *object, const wxClassInfo *classInfo,
|
||||
wxObjectWriterCallback *writercallback, bool isEmbedded, const wxStringToAnyHashMap &metadata );
|
||||
|
||||
protected:
|
||||
@@ -191,17 +191,17 @@ protected:
|
||||
|
||||
struct wxObjectWriterInternalPropertiesData;
|
||||
|
||||
void WriteAllProperties( const wxObject * obj, const wxClassInfo* ci,
|
||||
wxObjectWriterCallback *writercallback,
|
||||
void WriteAllProperties( const wxObject * obj, const wxClassInfo* ci,
|
||||
wxObjectWriterCallback *writercallback,
|
||||
wxObjectWriterInternalPropertiesData * data );
|
||||
|
||||
void WriteOneProperty( const wxObject *obj, const wxClassInfo* ci,
|
||||
void WriteOneProperty( const wxObject *obj, const wxClassInfo* ci,
|
||||
const wxPropertyInfo* pi, wxObjectWriterCallback *writercallback,
|
||||
wxObjectWriterInternalPropertiesData *data );
|
||||
|
||||
|
||||
void FindConnectEntry(const wxEvtHandler * evSource,
|
||||
const wxEventSourceTypeInfo* dti, const wxObject* &sink,
|
||||
const wxEventSourceTypeInfo* dti, const wxObject* &sink,
|
||||
const wxHandlerInfo *&handler);
|
||||
};
|
||||
|
||||
@@ -213,8 +213,8 @@ Streaming callbacks for depersisting XML to code, or running objects
|
||||
class WXDLLIMPEXP_BASE wxObjectReaderCallback;
|
||||
|
||||
/*
|
||||
wxObjectReader handles streaming in a class from a arbitrary format.
|
||||
While walking through it issues calls out to interfaces to readercallback
|
||||
wxObjectReader handles streaming in a class from a arbitrary format.
|
||||
While walking through it issues calls out to interfaces to readercallback
|
||||
the guts from the underlying storage format.
|
||||
*/
|
||||
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
virtual ~wxObjectReaderCallback() {}
|
||||
|
||||
// allocate the new object on the heap, that object will have the passed in ID
|
||||
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
|
||||
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
|
||||
wxStringToAnyHashMap &metadata) = 0;
|
||||
|
||||
// initialize the already allocated object having the ID objectID with the Create method
|
||||
@@ -267,9 +267,9 @@ public:
|
||||
const wxClassInfo **objectClassInfos,
|
||||
wxStringToAnyHashMap &metadata) = 0;
|
||||
|
||||
// construct the new object on the heap, that object will have the passed in ID
|
||||
// construct the new object on the heap, that object will have the passed in ID
|
||||
// (for objects that don't support allocate-create type of creation)
|
||||
// creation parameters which are objects are having their Ids passed in
|
||||
// creation parameters which are objects are having their Ids passed in
|
||||
// objectIDValues having objectId <> wxInvalidObjectID
|
||||
|
||||
virtual void ConstructObject(int objectID,
|
||||
@@ -280,8 +280,8 @@ public:
|
||||
const wxClassInfo **objectClassInfos,
|
||||
wxStringToAnyHashMap &metadata) = 0;
|
||||
|
||||
// destroy the heap-allocated object having the ID objectID, this may be used
|
||||
// if an object is embedded in another object and set via value semantics,
|
||||
// destroy the heap-allocated object having the ID objectID, this may be used
|
||||
// if an object is embedded in another object and set via value semantics,
|
||||
// so the intermediate object can be destroyed after safely
|
||||
virtual void DestroyObject(int objectID, wxClassInfo *classInfo) = 0;
|
||||
|
||||
@@ -339,8 +339,8 @@ public:
|
||||
virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
|
||||
wxStringToAnyHashMap &metadata);
|
||||
|
||||
// initialize the already allocated object having the ID objectID with
|
||||
// the Create method creation parameters which are objects are having
|
||||
// initialize the already allocated object having the ID objectID with
|
||||
// the Create method creation parameters which are objects are having
|
||||
// their Ids passed in objectIDValues having objectId <> wxInvalidObjectID
|
||||
|
||||
virtual void CreateObject(int objectID,
|
||||
@@ -352,9 +352,9 @@ public:
|
||||
wxStringToAnyHashMap &metadata
|
||||
);
|
||||
|
||||
// construct the new object on the heap, that object will have the
|
||||
// passed in ID (for objects that don't support allocate-create type of
|
||||
// creation) creation parameters which are objects are having their Ids
|
||||
// construct the new object on the heap, that object will have the
|
||||
// passed in ID (for objects that don't support allocate-create type of
|
||||
// creation) creation parameters which are objects are having their Ids
|
||||
// passed in objectIDValues having objectId <> wxInvalidObjectID
|
||||
|
||||
virtual void ConstructObject(int objectID,
|
||||
@@ -365,8 +365,8 @@ public:
|
||||
const wxClassInfo **objectClassInfos,
|
||||
wxStringToAnyHashMap &metadata);
|
||||
|
||||
// destroy the heap-allocated object having the ID objectID, this may be
|
||||
// used if an object is embedded in another object and set via value semantics,
|
||||
// destroy the heap-allocated object having the ID objectID, this may be
|
||||
// used if an object is embedded in another object and set via value semantics,
|
||||
// so the intermediate object can be destroyed after safely
|
||||
virtual void DestroyObject(int objectID, wxClassInfo *classInfo);
|
||||
|
||||
|
@@ -126,7 +126,7 @@ private:
|
||||
//
|
||||
// wxIMPLEMENT_SET_STREAMING( wxCoupe, wxFlavor )
|
||||
//
|
||||
// implementation note: no partial specialization for streaming, but a delegation
|
||||
// implementation note: no partial specialization for streaming, but a delegation
|
||||
// to a different class
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
wxTypeInfo(wxTypeKind kind,
|
||||
wxVariant2StringFnc to, wxString2VariantFnc from,
|
||||
const char *name):
|
||||
m_toString(to), m_fromString(from), m_kind(kind),
|
||||
m_toString(to), m_fromString(from), m_kind(kind),
|
||||
m_name(wxString::FromAscii(name))
|
||||
{
|
||||
Register();
|
||||
@@ -350,20 +350,20 @@ public:
|
||||
|
||||
// convert a wxAny holding data of this type into a string
|
||||
void ConvertToString( const wxAny& data, wxString &result ) const
|
||||
{
|
||||
if ( m_toString )
|
||||
(*m_toString)( data, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
|
||||
{
|
||||
if ( m_toString )
|
||||
(*m_toString)( data, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
|
||||
}
|
||||
|
||||
// convert a string into a wxAny holding the corresponding data in this type
|
||||
void ConvertFromString( const wxString& data, wxAny &result ) const
|
||||
{
|
||||
if( m_fromString )
|
||||
(*m_fromString)( data, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
|
||||
{
|
||||
if( m_fromString )
|
||||
(*m_fromString)( data, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation(wxT("String conversions not supported")) );
|
||||
}
|
||||
|
||||
// statics:
|
||||
@@ -387,8 +387,8 @@ private:
|
||||
class WXDLLIMPEXP_BASE wxBuiltInTypeInfo : public wxTypeInfo
|
||||
{
|
||||
public:
|
||||
wxBuiltInTypeInfo( wxTypeKind kind, wxVariant2StringFnc to = NULL,
|
||||
wxString2VariantFnc from = NULL,
|
||||
wxBuiltInTypeInfo( wxTypeKind kind, wxVariant2StringFnc to = NULL,
|
||||
wxString2VariantFnc from = NULL,
|
||||
const wxString &name = wxEmptyString ) :
|
||||
wxTypeInfo( kind, to, from, name )
|
||||
{ wxASSERT_MSG( GetKind() < wxT_SET, wxT("Illegal Kind for Base Type") ); }
|
||||
@@ -397,7 +397,7 @@ public:
|
||||
class WXDLLIMPEXP_BASE wxCustomTypeInfo : public wxTypeInfo
|
||||
{
|
||||
public:
|
||||
wxCustomTypeInfo( const wxString &name, wxVariant2StringFnc to,
|
||||
wxCustomTypeInfo( const wxString &name, wxVariant2StringFnc to,
|
||||
wxString2VariantFnc from ) :
|
||||
wxTypeInfo( wxT_CUSTOM, to, from, name )
|
||||
{}
|
||||
@@ -413,30 +413,30 @@ public:
|
||||
wxString2VariantFnc from, converterToLong_t toLong,
|
||||
converterFromLong_t fromLong, const wxString &name ) :
|
||||
wxTypeInfo( kind, to, from, name ), m_toLong( toLong ), m_fromLong( fromLong )
|
||||
{
|
||||
{
|
||||
wxASSERT_MSG( kind == wxT_ENUM || kind == wxT_SET,
|
||||
wxT("Illegal Kind for Enum Type"));
|
||||
m_enumInfo = enumInfo;
|
||||
wxT("Illegal Kind for Enum Type"));
|
||||
m_enumInfo = enumInfo;
|
||||
}
|
||||
|
||||
const wxEnumData* GetEnumData() const { return m_enumInfo; }
|
||||
|
||||
// convert a wxAny holding data of this type into a long
|
||||
void ConvertToLong( const wxAny& data, long &result ) const
|
||||
{
|
||||
if( m_toLong )
|
||||
(*m_toLong)( data, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
|
||||
{
|
||||
if( m_toLong )
|
||||
(*m_toLong)( data, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
|
||||
}
|
||||
|
||||
// convert a long into a wxAny holding the corresponding data in this type
|
||||
void ConvertFromLong( long data, wxAny &result ) const
|
||||
{
|
||||
if( m_fromLong )
|
||||
(*m_fromLong)( data, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
|
||||
{
|
||||
if( m_fromLong )
|
||||
(*m_fromLong)( data, result );
|
||||
else
|
||||
wxLogError( wxGetTranslation(wxT("Long Conversions not supported")) );
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -449,8 +449,8 @@ private:
|
||||
class WXDLLIMPEXP_BASE wxClassTypeInfo : public wxTypeInfo
|
||||
{
|
||||
public:
|
||||
wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo,
|
||||
wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL,
|
||||
wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo,
|
||||
wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL,
|
||||
const wxString &name = wxEmptyString);
|
||||
|
||||
const wxClassInfo *GetClassInfo() const { return m_classInfo; }
|
||||
@@ -471,7 +471,7 @@ public:
|
||||
{
|
||||
if ( m_elementType == NULL )
|
||||
m_elementType = wxTypeInfo::FindType( m_elementTypeName );
|
||||
return m_elementType;
|
||||
return m_elementType;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -482,10 +482,10 @@ private:
|
||||
class WXDLLIMPEXP_BASE wxEventSourceTypeInfo : public wxTypeInfo
|
||||
{
|
||||
public:
|
||||
wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass,
|
||||
wxVariant2StringFnc to = NULL,
|
||||
wxEventSourceTypeInfo( int eventType, wxClassInfo* eventClass,
|
||||
wxVariant2StringFnc to = NULL,
|
||||
wxString2VariantFnc from = NULL );
|
||||
wxEventSourceTypeInfo( int eventType, int lastEventType, wxClassInfo* eventClass,
|
||||
wxEventSourceTypeInfo( int eventType, int lastEventType, wxClassInfo* eventClass,
|
||||
wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL );
|
||||
|
||||
int GetEventType() const { return m_eventType; }
|
||||
@@ -498,10 +498,10 @@ private:
|
||||
int m_lastEventType;
|
||||
};
|
||||
|
||||
template<typename T> const wxTypeInfo* wxGetTypeInfo( T * )
|
||||
template<typename T> const wxTypeInfo* wxGetTypeInfo( T * )
|
||||
{ return wxTypeInfo::FindType(typeid(T).name()); }
|
||||
|
||||
// this macro is for usage with custom, non-object derived classes and structs,
|
||||
// this macro is for usage with custom, non-object derived classes and structs,
|
||||
// wxPoint is such a custom type
|
||||
|
||||
#if wxUSE_FUNC_TEMPLATE_POINTER
|
||||
@@ -521,9 +521,9 @@ template<typename T> const wxTypeInfo* wxGetTypeInfo( T * )
|
||||
wxCollectionTypeInfo s_typeInfo##collection( typeid(element).name(), \
|
||||
NULL, NULL, typeid(collection).name() );
|
||||
|
||||
// sometimes a compiler invents specializations that are nowhere called,
|
||||
// use this macro to satisfy the refs, currently we don't have to play
|
||||
// tricks, but if we will have to according to the compiler, we will use
|
||||
// sometimes a compiler invents specializations that are nowhere called,
|
||||
// use this macro to satisfy the refs, currently we don't have to play
|
||||
// tricks, but if we will have to according to the compiler, we will use
|
||||
// that macro for that
|
||||
|
||||
#define wxILLEGAL_TYPE_SPECIALIZATION( a )
|
||||
|
@@ -53,12 +53,12 @@ public:
|
||||
virtual void DoEndWriteTopLevelEntry( const wxString &name );
|
||||
|
||||
// start of writing an object having the passed in ID
|
||||
virtual void DoBeginWriteObject(const wxObject *object,
|
||||
virtual void DoBeginWriteObject(const wxObject *object,
|
||||
const wxClassInfo *classInfo, int objectID, const wxStringToAnyHashMap &metadata );
|
||||
|
||||
// end of writing an toplevel object name param is used for unique
|
||||
// end of writing an toplevel object name param is used for unique
|
||||
// identification within the container
|
||||
virtual void DoEndWriteObject(const wxObject *object,
|
||||
virtual void DoEndWriteObject(const wxObject *object,
|
||||
const wxClassInfo *classInfo, int objectID );
|
||||
|
||||
// writes a simple property in the stream format
|
||||
@@ -80,9 +80,9 @@ public:
|
||||
virtual void DoWriteNullObject();
|
||||
|
||||
// writes a delegate in the stream format
|
||||
virtual void DoWriteDelegate( const wxObject *object,
|
||||
virtual void DoWriteDelegate( const wxObject *object,
|
||||
const wxClassInfo* classInfo, const wxPropertyInfo *propInfo,
|
||||
const wxObject *eventSink, int sinkObjectID,
|
||||
const wxObject *eventSink, int sinkObjectID,
|
||||
const wxClassInfo* eventSinkClassInfo, const wxHandlerInfo* handlerIndo );
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user