Added wxUSE_VARIANT and the related checks, also added wxUSE_OLE_AUTOMATION

to guard wxAutomationObject code which depends on wxVariant


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-09-24 13:12:56 +00:00
parent 19883268f1
commit ca5c6ac3f4
19 changed files with 590 additions and 721 deletions

1138
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -476,6 +476,7 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_PROTOCOL_FTP=no
DEFAULT_wxUSE_PROTOCOL_FILE=no
DEFAULT_wxUSE_URL=no
DEFAULT_wxUSE_VARIANT=no
DEFAULT_wxUSE_COMMONDLGS=no
DEFAULT_wxUSE_CHOICEDLG=no
@@ -689,6 +690,7 @@ else
DEFAULT_wxUSE_PROTOCOL_FTP=yes
DEFAULT_wxUSE_PROTOCOL_FILE=yes
DEFAULT_wxUSE_URL=yes
DEFAULT_wxUSE_VARIANT=yes
DEFAULT_wxUSE_COMMONDLGS=yes
DEFAULT_wxUSE_CHOICEDLG=yes
@@ -970,6 +972,7 @@ WX_ARG_ENABLE(printfposparam,[ --enable-printfposparam use wxVsnprintf() which
WX_ARG_ENABLE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
WX_ARG_ENABLE(url, [ --enable-url use wxURL class], wxUSE_URL)
WX_ARG_ENABLE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT)
WX_ARG_ENABLE(protocol, [ --enable-protocol use wxProtocol class], wxUSE_PROTOCOL)
WX_ARG_ENABLE(protocol_http, [ --enable-protocol-http HTTP support in wxProtocol], wxUSE_PROTOCOL_HTTP)
WX_ARG_ENABLE(protocol_ftp, [ --enable-protocol-ftp FTP support in wxProtocol], wxUSE_PROTOCOL_FTP)
@@ -6146,6 +6149,10 @@ if test "$wxUSE_URL" = "yes"; then
fi
fi
if test "$wxUSE_VARIANT" = "yes"; then
AC_DEFINE(wxUSE_VARIANT)
fi
if test "$wxUSE_FS_INET" = "yes"; then
AC_DEFINE(wxUSE_FS_INET)
fi

View File

@@ -324,6 +324,7 @@ public:
virtual wxAccStatus GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child))
{ return wxACC_NOT_IMPLEMENTED; }
#if wxUSE_VARIANT
// Gets a variant representing the selected children
// of this object.
// Acceptable values:
@@ -334,6 +335,7 @@ public:
// - a "void*" pointer to a wxAccessible child object
virtual wxAccStatus GetSelections(wxVariant* WXUNUSED(selections))
{ return wxACC_NOT_IMPLEMENTED; }
#endif // wxUSE_VARIANT
// Accessors

View File

@@ -288,6 +288,14 @@
# endif
#endif /* !defined(wxUSE_URL) */
#ifndef wxUSE_VARIANT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_VARIANT must be defined."
# else
# define wxUSE_VARIANT 0
# endif
#endif /* wxUSE_VARIANT */
/*
all these tests are for GUI only
@@ -1727,4 +1735,24 @@
# endif
#endif /* wxUSE_SOCKETS */
#if !wxUSE_VARIANT
# if wxUSE_DATAVIEWCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxDataViewCtrl requires wxVariant"
# else
# undef wxUSE_DATAVIEWCTRL
# define wxUSE_DATAVIEWCTRL 0
# endif
# endif
# if wxUSE_ODBC
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ODBC requires wxVariant"
# else
# undef wxUSE_ODBC
# define wxUSE_ODBC 0
# endif
# endif
#endif /* wxUSE_VARIANT */
#endif /* wxUSE_GUI */

View File

@@ -484,6 +484,15 @@
// This code is experimental and subject to change.
#define wxUSE_URL_NATIVE 0
// Support for wxVariant class used in several places throughout the library,
// notably in wxDataViewCtrl API.
//
// Default is 1.
//
// Recommended setting: 1 unless you want to reduce the library size as much as
// possible in which case setting this to 0 can gain up to 100KB.
#define wxUSE_VARIANT 1
// Support for regular expression matching via wxRegEx class: enable this to
// use POSIX regular expressions in your code. You need to compile regex
// library from src/regex to use it under Windows.

View File

@@ -483,6 +483,15 @@
// This code is experimental and subject to change.
#define wxUSE_URL_NATIVE 0
// Support for wxVariant class used in several places throughout the library,
// notably in wxDataViewCtrl API.
//
// Default is 1.
//
// Recommended setting: 1 unless you want to reduce the library size as much as
// possible in which case setting this to 0 can gain up to 100KB.
#define wxUSE_VARIANT 1
// Support for regular expression matching via wxRegEx class: enable this to
// use POSIX regular expressions in your code. You need to compile regex
// library from src/regex to use it under Windows.

View File

@@ -219,6 +219,18 @@
# endif
#endif /* !defined(wxUSE_DIALUP_MANAGER) */
/* check settings consistency for MSW-specific ones */
#if !wxUSE_VARIANT
# if wxUSE_OLE_AUTOMATION
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxAutomationObject requires wxVariant"
# else
# undef wxUSE_OLE_AUTOMATION
# define wxUSE_OLE_AUTOMATION 0
# endif
# endif
#endif /* wxUSE_VARIANT */
#if !wxUSE_DYNAMIC_LOADER
# if wxUSE_MS_HTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR
@@ -274,6 +286,15 @@
# define wxUSE_DATAOBJ 0
# endif
# endif
# if wxUSE_OLE_AUTOMATION
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxAutomationObject requires wxUSE_OLE"
# else
# undef wxUSE_OLE_AUTOMATION
# define wxUSE_OLE_AUTOMATION 0
# endif
# endif
#endif /* wxUSE_OLE */
#endif /* _WX_MSW_CHKCONF_H_ */

View File

@@ -12,6 +12,10 @@
#ifndef _WX_AUTOMTN_H_
#define _WX_AUTOMTN_H_
#include "wx/defs.h"
#if wxUSE_OLE_AUTOMATION
#include "wx/object.h"
#include "wx/variant.h"
@@ -92,6 +96,6 @@ public:
DECLARE_NO_COPY_CLASS(wxAutomationObject)
};
#endif // wxUSE_OLE_AUTOMATION
#endif
// _WX_AUTOMTN_H_
#endif // _WX_AUTOMTN_H_

View File

@@ -228,11 +228,13 @@ private:
OLECHAR *m_wzBuf; // actual string
};
#if wxUSE_VARIANT
// Convert variants
class WXDLLIMPEXP_BASE wxVariant;
WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant);
WXDLLEXPORT bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant);
#endif // wxUSE_VARIANT
// Convert string to Unicode
WXDLLEXPORT BSTR wxConvertStringToOle(const wxString& str);

View File

@@ -483,6 +483,15 @@
// This code is experimental and subject to change.
#define wxUSE_URL_NATIVE 0
// Support for wxVariant class used in several places throughout the library,
// notably in wxDataViewCtrl API.
//
// Default is 1.
//
// Recommended setting: 1 unless you want to reduce the library size as much as
// possible in which case setting this to 0 can gain up to 100KB.
#define wxUSE_VARIANT 1
// Support for regular expression matching via wxRegEx class: enable this to
// use POSIX regular expressions in your code. You need to compile regex
// library from src/regex to use it under Windows.
@@ -1170,6 +1179,14 @@
// Recommended setting: 1
#define wxUSE_OLE 1
// Set this to 1 to enable wxAutomationObject class.
//
// Default is 1.
//
// Recommended setting: 1 if you need to control other applications via OLE
// Automation, can be safely set to 0 otherwise
#define wxUSE_OLE_AUTOMATION 1
// wxDC cacheing implementation
#define wxUSE_DC_CACHEING 1

View File

@@ -483,6 +483,15 @@
// This code is experimental and subject to change.
#define wxUSE_URL_NATIVE 0
// Support for wxVariant class used in several places throughout the library,
// notably in wxDataViewCtrl API.
//
// Default is 1.
//
// Recommended setting: 1 unless you want to reduce the library size as much as
// possible in which case setting this to 0 can gain up to 100KB.
#define wxUSE_VARIANT 1
// Support for regular expression matching via wxRegEx class: enable this to
// use POSIX regular expressions in your code. You need to compile regex
// library from src/regex to use it under Windows.
@@ -714,9 +723,17 @@
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
// Recommended setting: 1 but can be safely set to 0, except where it is
// needed as a base class for generic wxBitmapComboBox.
#define wxUSE_ODCOMBOBOX 1
// wxBitmapComboBox is a combobox that can have images in front of text items.
//
// Default is 1.
//
// Recommended setting: 1 but can be safely set to 0
#define wxUSE_BITMAPCOMBOBOX 1
// ----------------------------------------------------------------------------
// Miscellaneous GUI stuff
// ----------------------------------------------------------------------------

View File

@@ -483,6 +483,15 @@
// This code is experimental and subject to change.
#define wxUSE_URL_NATIVE 0
// Support for wxVariant class used in several places throughout the library,
// notably in wxDataViewCtrl API.
//
// Default is 1.
//
// Recommended setting: 1 unless you want to reduce the library size as much as
// possible in which case setting this to 0 can gain up to 100KB.
#define wxUSE_VARIANT 1
// Support for regular expression matching via wxRegEx class: enable this to
// use POSIX regular expressions in your code. You need to compile regex
// library from src/regex to use it under Windows.

View File

@@ -483,6 +483,15 @@
// This code is experimental and subject to change.
#define wxUSE_URL_NATIVE 0
// Support for wxVariant class used in several places throughout the library,
// notably in wxDataViewCtrl API.
//
// Default is 1.
//
// Recommended setting: 1 unless you want to reduce the library size as much as
// possible in which case setting this to 0 can gain up to 100KB.
#define wxUSE_VARIANT 1
// Support for regular expression matching via wxRegEx class: enable this to
// use POSIX regular expressions in your code. You need to compile regex
// library from src/regex to use it under Windows.

View File

@@ -479,6 +479,15 @@
// This code is experimental and subject to change.
#define wxUSE_URL_NATIVE 0
// Support for wxVariant class used in several places throughout the library,
// notably in wxDataViewCtrl API.
//
// Default is 1.
//
// Recommended setting: 1 unless you want to reduce the library size as much as
// possible in which case setting this to 0 can gain up to 100KB.
#define wxUSE_VARIANT 1
// Support for regular expression matching via wxRegEx class: enable this to
// use POSIX regular expressions in your code. You need to compile regex
// library from src/regex to use it under Windows.

View File

@@ -1586,6 +1586,7 @@ public:
// If this object has the focus, child should be 'this'.
virtual wxAccStatus GetFocus(int* childId, wxAccessible** child);
#if wxUSE_VARIANT
// Gets a variant representing the selected children
// of this object.
// Acceptable values:
@@ -1595,6 +1596,7 @@ public:
// or 0 if this object is selected (GetType() == wxT("long")
// - a "void*" pointer to a wxAccessible child object
virtual wxAccStatus GetSelections(wxVariant* selections);
#endif // wxUSE_VARIANT
};
#endif // wxUSE_ACCESSIBILITY

View File

@@ -271,6 +271,8 @@
#define wxUSE_URL_NATIVE 0
#define wxUSE_VARIANT 0
#define wxUSE_REGEX 0
#define wxUSE_SYSTEM_OPTIONS 0
@@ -451,8 +453,6 @@
#define wxUSE_HELP 0
#define wxUSE_MS_HTML_HELP 0
#define wxUSE_WXHTML_HELP 0

View File

@@ -2971,6 +2971,7 @@ wxAccStatus wxWindowAccessible::GetFocus(int* WXUNUSED(childId), wxAccessible**
return wxACC_NOT_IMPLEMENTED;
}
#if wxUSE_VARIANT
// Gets a variant representing the selected children
// of this object.
// Acceptable values:
@@ -2987,6 +2988,7 @@ wxAccStatus wxWindowAccessible::GetSelections(wxVariant* WXUNUSED(selections))
return wxACC_NOT_IMPLEMENTED;
}
#endif // wxUSE_VARIANT
#endif // wxUSE_ACCESSIBILITY

View File

@@ -65,6 +65,7 @@ int wxConvertToWindowsSelFlag(wxAccSelectionFlags sel);
// Convert from Windows selection flag
wxAccSelectionFlags wxConvertFromWindowsSelFlag(int sel);
#if wxUSE_VARIANT
// ----------------------------------------------------------------------------
// wxIEnumVARIANT interface implementation
// ----------------------------------------------------------------------------
@@ -176,6 +177,7 @@ STDMETHODIMP wxIEnumVARIANT::Clone(IEnumVARIANT **ppenum)
return S_OK;
}
#endif // wxUSE_VARIANT
// ----------------------------------------------------------------------------
// wxIAccessible implementation of IAccessible interface
@@ -1471,6 +1473,7 @@ STDMETHODIMP wxIAccessible::get_accFocus ( VARIANT* pVarID)
STDMETHODIMP wxIAccessible::get_accSelection ( VARIANT * pVarChildren)
{
#if wxUSE_VARIANT
wxLogTrace(wxT("access"), wxT("get_accSelection"));
wxASSERT (m_pAccessible != NULL);
if (!m_pAccessible)
@@ -1528,6 +1531,9 @@ STDMETHODIMP wxIAccessible::get_accSelection ( VARIANT * pVarChildren)
return S_OK;
}
}
#else
wxUnusedVar(pVarChildren);
#endif // wxUSE_VARIANT
return E_NOTIMPL;
}

View File

@@ -16,9 +16,13 @@
#pragma hdrstop
#endif
// Watcom C++ gives a linker error if this is compiled in.
// With Borland C++, all samples crash if this is compiled in.
#if wxUSE_OLE && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
#if (defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) || defined(__CYGWIN10__)
#undef wxUSE_OLE_AUTOMATION
#define wxUSE_OLE_AUTOMATION 0
#endif
#if wxUSE_OLE_AUTOMATION
#ifndef WX_PRECOMP
#include "wx/log.h"
@@ -932,4 +936,4 @@ void ShowException(LPOLESTR szMember, HRESULT hr, EXCEPINFO *pexcep, unsigned in
#endif
#endif // wxUSE_OLE && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
#endif // wxUSE_OLE_AUTOMATION