Added accessibility headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
66
include/wx/msw/ole/access.h
Normal file
66
include/wx/msw/ole/access.h
Normal file
@@ -0,0 +1,66 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: ole/access.h
|
||||
// Purpose: declaration of the wxAccessible class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2003-02-12
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ACCESS_H_
|
||||
#define _WX_ACCESS_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#if !wxUSE_ACCESSIBILITY
|
||||
#error "You should #define wxUSE_ACCESSIBILITY to 1 to compile this file!"
|
||||
#endif //wxUSE_ACCESSIBILITY
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxIAccessible;
|
||||
class WXDLLEXPORT wxWindow;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAccessible implements accessibility behaviour.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxAccessible : public wxAccessibleBase
|
||||
{
|
||||
public:
|
||||
wxAccessible(wxWindow *win = NULL);
|
||||
virtual ~wxAccessible();
|
||||
|
||||
// Overridables
|
||||
|
||||
// Accessors
|
||||
|
||||
// Returns the wxIAccessible pointer
|
||||
wxIAccessible* GetIAccessible() { return m_pIAccessible; }
|
||||
|
||||
// Returns the IAccessible standard interface pointer
|
||||
void* GetIAccessibleStd() ;
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
private:
|
||||
wxIAccessible * m_pIAccessible; // the pointer to COM interface
|
||||
void* m_pIAccessibleStd; // the pointer to the standard COM interface,
|
||||
// for default processing
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxAccessible)
|
||||
};
|
||||
|
||||
#endif //_WX_ACCESS_H_
|
||||
|
@@ -167,5 +167,44 @@ void wxLogRelease(const wxChar *szInterface, ULONG cRef);
|
||||
#define wxLogRelease(szInterface, cRef)
|
||||
#endif //WXDEBUG
|
||||
|
||||
// wrapper around BSTR type (by Vadim Zeitlin)
|
||||
|
||||
class WXDLLEXPORT wxBasicString
|
||||
{
|
||||
public:
|
||||
// ctors & dtor
|
||||
wxBasicString(const char *sz);
|
||||
wxBasicString(const wxString& str);
|
||||
~wxBasicString();
|
||||
|
||||
void Init(const char* sz);
|
||||
|
||||
// accessors
|
||||
// just get the string
|
||||
operator BSTR() const { return m_wzBuf; }
|
||||
// retrieve a copy of our string - caller must SysFreeString() it later!
|
||||
BSTR Get() const { return SysAllocString(m_wzBuf); }
|
||||
|
||||
private:
|
||||
// @@@ not implemented (but should be)
|
||||
wxBasicString(const wxBasicString&);
|
||||
wxBasicString& operator=(const wxBasicString&);
|
||||
|
||||
OLECHAR *m_wzBuf; // actual string
|
||||
};
|
||||
|
||||
// Convert variants
|
||||
class WXDLLEXPORT wxVariant;
|
||||
|
||||
bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant) ;
|
||||
bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant) ;
|
||||
|
||||
// Convert string to Unicode
|
||||
BSTR wxConvertStringToOle(const wxString& str);
|
||||
|
||||
// Convert string from BSTR to wxString
|
||||
wxString wxConvertStringFromOle(BSTR bStr);
|
||||
|
||||
|
||||
#endif //_WX_OLEUTILS_H
|
||||
|
||||
|
Reference in New Issue
Block a user