Merge the changes from 3.0 branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -268,9 +268,22 @@ public:
|
||||
|
||||
wxCharTypeBuffer(size_t len)
|
||||
{
|
||||
this->m_data =
|
||||
new Data((CharType *)malloc((len + 1)*sizeof(CharType)), len);
|
||||
this->m_data->Get()[len] = (CharType)0;
|
||||
CharType* const str = (CharType *)malloc((len + 1)*sizeof(CharType));
|
||||
if ( str )
|
||||
{
|
||||
str[len] = (CharType)0;
|
||||
|
||||
// There is a potential memory leak here if new throws because it
|
||||
// fails to allocate Data, we ought to use new(nothrow) here, but
|
||||
// this might fail to compile under some platforms so until this
|
||||
// can be fully tested, just live with this (rather unlikely, as
|
||||
// Data is a small object) potential leak.
|
||||
this->m_data = new Data(str, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_data = this->GetNullData();
|
||||
}
|
||||
}
|
||||
|
||||
wxCharTypeBuffer(const wxCharTypeBuffer& src)
|
||||
|
@@ -560,7 +560,7 @@ protected:
|
||||
// just recalculate.
|
||||
void CalculateAreas( int btnWidth = 0 );
|
||||
|
||||
// Standard textctrl positioning routine. Just give it platform-dependant
|
||||
// Standard textctrl positioning routine. Just give it platform-dependent
|
||||
// textctrl coordinate adjustment.
|
||||
virtual void PositionTextCtrl( int textCtrlXAdjust = 0,
|
||||
int textCtrlYAdjust = 0);
|
||||
@@ -701,7 +701,7 @@ protected:
|
||||
// area used by the button
|
||||
wxSize m_btnSize;
|
||||
|
||||
// platform-dependant customization and other flags
|
||||
// platform-dependent customization and other flags
|
||||
wxUint32 m_iFlags;
|
||||
|
||||
// custom style for m_text
|
||||
|
@@ -133,6 +133,9 @@ protected:
|
||||
|
||||
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const;
|
||||
|
||||
// Override this one to avoid eating events from our popup listbox.
|
||||
virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const;
|
||||
|
||||
// this is the implementation of GetEditHWND() which can also be used when
|
||||
// we don't have the edit control, it simply returns NULL then
|
||||
//
|
||||
|
@@ -121,6 +121,9 @@ protected:
|
||||
// one
|
||||
virtual WXHBRUSH DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd);
|
||||
|
||||
// Look in our GetSubcontrols() for the windows with the given ID.
|
||||
virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const;
|
||||
|
||||
// for controls like radiobuttons which are really composite this array
|
||||
// holds the ids (not HWNDs!) of the sub controls
|
||||
wxArrayLong m_subControls;
|
||||
|
@@ -37,7 +37,12 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifndef _CRTBLD
|
||||
|
||||
// Defining _CRTBLD should never be necessary at all, but keep it for now
|
||||
// as there is no time to retest all the compilers before 3.0 release.
|
||||
// Definitely do not use it with MSVS 2013 as defining it results in errors
|
||||
// if the standard <assert.h> is included afterwards.
|
||||
#if !defined(_CRTBLD) && !wxCHECK_VISUALC_VERSION(12)
|
||||
// Needed when building with pure MS SDK
|
||||
#define _CRTBLD
|
||||
#endif
|
||||
|
@@ -116,13 +116,13 @@ public:
|
||||
void SetLCID(WXLCID lcid);
|
||||
|
||||
// Returns the flags used for conversions between wxVariant and OLE
|
||||
// VARIANT, see wxConvertVariantToOleFlags. The default value is
|
||||
// VARIANT, see wxOleConvertVariantFlags. The default value is
|
||||
// wxOleConvertVariant_Default but all the objects obtained by GetObject()
|
||||
// inherit the flags from the one that created them.
|
||||
long GetConvertVariantFlags() const;
|
||||
|
||||
// Sets the flags used for conversions between wxVariant and OLE VARIANT,
|
||||
// see wxConvertVariantToOleFlags (default is wxOleConvertVariant_Default.
|
||||
// see wxOleConvertVariantFlags (default is wxOleConvertVariant_Default.
|
||||
void SetConvertVariantFlags(long flags);
|
||||
|
||||
public: // public for compatibility only, don't use m_dispatchPtr directly.
|
||||
|
@@ -206,7 +206,7 @@ public:
|
||||
// to understand why does it work, look at SubclassWin() code and comments
|
||||
bool IsOfStandardClass() const { return m_oldWndProc != NULL; }
|
||||
|
||||
wxWindow *FindItem(long id) const;
|
||||
wxWindow *FindItem(long id, WXHWND hWnd = NULL) const;
|
||||
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
|
||||
|
||||
// MSW only: true if this control is part of the main control
|
||||
@@ -663,6 +663,15 @@ protected:
|
||||
|
||||
bool MSWEnableHWND(WXHWND hWnd, bool enable);
|
||||
|
||||
// Return the pointer to this window or one of its sub-controls if this ID
|
||||
// and HWND combination belongs to one of them.
|
||||
//
|
||||
// This is used by FindItem() and is overridden in wxControl, see there.
|
||||
virtual wxWindow* MSWFindItem(long WXUNUSED(id), WXHWND WXUNUSED(hWnd)) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
@@ -143,7 +143,7 @@ public:
|
||||
virtual void MacNewFile() ;
|
||||
// in response of a reopen-application apple event
|
||||
virtual void MacReopenApp() ;
|
||||
|
||||
|
||||
// override this to return false from a non-bundled console app in order to stay in background ...
|
||||
virtual bool OSXIsGUIApplication() { return true; }
|
||||
|
||||
|
@@ -74,10 +74,6 @@ public:
|
||||
virtual void MarkDirty();
|
||||
virtual void DiscardEdits();
|
||||
|
||||
// set the grayed out hint text
|
||||
virtual bool SetHint(const wxString& hint);
|
||||
virtual wxString GetHint() const;
|
||||
|
||||
// text control under some platforms supports the text styles: these
|
||||
// methods apply the given text style to the given selection or to
|
||||
// set/get the style which will be used for all appended text
|
||||
@@ -151,7 +147,6 @@ protected:
|
||||
|
||||
private :
|
||||
wxMenu *m_privateContextMenu;
|
||||
wxString m_hintString;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@@ -81,6 +81,10 @@ public:
|
||||
|
||||
virtual bool SendMaxLenEvent();
|
||||
|
||||
// set the grayed out hint text
|
||||
virtual bool SetHint(const wxString& hint);
|
||||
virtual wxString GetHint() const;
|
||||
|
||||
// Implementation
|
||||
// --------------
|
||||
|
||||
@@ -102,6 +106,8 @@ protected:
|
||||
// need to make this public because of the current implementation via callbacks
|
||||
unsigned long m_maxLength;
|
||||
|
||||
private:
|
||||
wxString m_hintString;
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_TEXTENTRY_H_
|
||||
|
@@ -156,7 +156,7 @@ protected:
|
||||
wxDECLARE_NO_COPY_CLASS(wxTextMeasureBase);
|
||||
};
|
||||
|
||||
// Include the platform dependant class declaration, if any.
|
||||
// Include the platform dependent class declaration, if any.
|
||||
#if defined(__WXGTK20__)
|
||||
#include "wx/gtk/private/textmeasure.h"
|
||||
#elif defined(__WXMSW__)
|
||||
|
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
private:
|
||||
// (re)init
|
||||
void Init() { m_defaultState = false; }
|
||||
void Init() { m_count = 0; m_defaultState = false; }
|
||||
|
||||
// the total number of items we handle
|
||||
unsigned m_count;
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#define wxMINOR_VERSION 0
|
||||
#define wxRELEASE_NUMBER 0
|
||||
#define wxSUBRELEASE_NUMBER 0
|
||||
#define wxVERSION_STRING wxT("wxWidgets 3.0.0 RC1")
|
||||
#define wxVERSION_STRING wxT("wxWidgets 3.0.0")
|
||||
|
||||
/* nothing to update below this line when updating the version */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user