Moved all interface headers into a 'wx' subdirectory for proper use of Doxygen path settings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2008-06-27 16:22:58 +00:00
parent 92b6654b66
commit ae3c17b401
277 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
/////////////////////////////////////////////////////////////////////////////
// Name: msw/ole/activex.h
// Purpose: interface of wxActiveXEvent
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
/**
@class wxActiveXEvent
@headerfile ole/activex.h wx/msw/ole/activex.h
An event class for handling activex events passed from wxActiveXContainer.
ActiveX events are basically a function call with the parameters passed
through an array of wxVariants along with a return value that is a wxVariant
itself. What type the parameters or return value are depends on the context
(i.e. what the .idl specifies).
Note that unlike the third party wxActiveX function names are not supported.
@onlyfor{wxmsw}
@library{wxbase}
@category{FIXME}
*/
class wxActiveXEvent : public wxCommandEvent
{
public:
/**
Returns the dispatch id of this activex event. This is the numeric value from
the .idl file specified by the id().
*/
DISPID GetDispatchId(int idx) const;
/**
Obtains the number of parameters passed through the activex event.
*/
size_t ParamCount() const;
/**
Obtains the param name of the param number idx specifies as a string.
*/
wxString ParamName(size_t idx) const;
/**
Obtains the param type of the param number idx specifies as a string.
*/
wxString ParamType(size_t idx) const;
/**
Obtains the actual parameter value specified by idx.
*/
wxVariant operator[](size_t idx);
};
/**
@class wxActiveXContainer
@headerfile ole/activex.h wx/msw/ole/activex.h
wxActiveXContainer is a host for an activex control on Windows (and
as such is a platform-specific class). Note that the HWND that the class
contains is the actual HWND of the activex control so using dynamic events
and connecting to wxEVT_SIZE, for example, will recieve the actual size
message sent to the control.
It is somewhat similar to the ATL class CAxWindow in operation.
The size of the activex control's content is generally gauranteed to be that
of the client size of the parent of this wxActiveXContainer.
You can also process activex events through wxEVT_ACTIVEX or the
corresponding message map macro EVT_ACTIVEX.
@onlyfor{wxmsw}
@library{wxbase}
@category{FIXME}
@see wxActiveXEvent
*/
class wxActiveXContainer : public wxControl
{
public:
/**
Creates this activex container.
@param parent
parent of this control. Must not be @NULL.
@param iid
COM IID of pUnk to query. Must be a valid interface to an activex control.
@param pUnk
Interface of activex control.
*/
wxActiveXContainer(wxWindow* parent, REFIID iid, IUnknown* pUnk);
};

View File

@@ -0,0 +1,197 @@
/////////////////////////////////////////////////////////////////////////////
// Name: msw/ole/automtn.h
// Purpose: interface of wxAutomationObject
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
/**
@class wxAutomationObject
@headerfile ole/automtn.h wx/msw/ole/automtn.h
The @b wxAutomationObject class represents an OLE automation object containing
a single data member,
an IDispatch pointer. It contains a number of functions that make it easy to
perform
automation operations, and set and get properties. The class makes heavy use of
the wxVariant class.
The usage of these classes is quite close to OLE automation usage in Visual
Basic. The API is
high-level, and the application can specify multiple properties in a single
string. The following example
gets the current Excel instance, and if it exists, makes the active cell bold.
@code
wxAutomationObject excelObject;
if (excelObject.GetInstance("Excel.Application"))
excelObject.PutProperty("ActiveCell.Font.Bold", @true);
@endcode
Note that this class obviously works under Windows only.
@onlyfor{wxmsw}
@library{wxcore}
@category{misc}
@see wxVariant
*/
class wxAutomationObject : public wxObject
{
public:
/**
Constructor, taking an optional IDispatch pointer which will be released when
the
object is deleted.
*/
wxAutomationObject(WXIDISPATCH* dispatchPtr = NULL);
/**
Destructor. If the internal IDispatch pointer is non-null, it will be released.
*/
~wxAutomationObject();
//@{
/**
Calls an automation method for this object. The first form takes a method name,
number of
arguments, and an array of variants. The second form takes a method name and
zero to six
constant references to variants. Since the variant class has constructors for
the basic
data types, and C++ provides temporary objects automatically, both of the
following lines
are syntactically valid:
Note that @a method can contain dot-separated property names, to save the
application
needing to call GetProperty several times using several temporary objects. For
example:
*/
wxVariant CallMethod(const wxString& method, int noArgs,
wxVariant args[]) const;
const wxVariant CallMethod(const wxString& method, ... ) const;
//@}
/**
Creates a new object based on the class id, returning @true if the object was
successfully created,
or @false if not.
*/
bool CreateInstance(const wxString& classId) const;
/**
Gets the IDispatch pointer.
*/
IDispatch* GetDispatchPtr() const;
/**
Retrieves the current object associated with a class id, and attaches the
IDispatch pointer
to this object. Returns @true if a pointer was successfully retrieved, @false
otherwise.
Note that this cannot cope with two instances of a given OLE object being
active simultaneously,
such as two copies of Excel running. Which object is referenced cannot
currently be specified.
*/
bool GetInstance(const wxString& classId) const;
/**
Retrieves a property from this object, assumed to be a dispatch pointer, and
initialises @a obj with it.
To avoid having to deal with IDispatch pointers directly, use this function in
preference
to GetProperty() when retrieving objects
from other objects.
Note that an IDispatch pointer is stored as a void* pointer in wxVariant
objects.
@see GetProperty()
*/
bool GetObject(wxAutomationObject& obj, const wxString& property,
int noArgs = 0,
wxVariant args[] = NULL) const;
//@{
/**
Gets a property value from this object. The first form takes a property name,
number of
arguments, and an array of variants. The second form takes a property name and
zero to six
constant references to variants. Since the variant class has constructors for
the basic
data types, and C++ provides temporary objects automatically, both of the
following lines
are syntactically valid:
Note that @a property can contain dot-separated property names, to save the
application
needing to call GetProperty several times using several temporary objects.
*/
wxVariant GetProperty(const wxString& property, int noArgs,
wxVariant args[]) const;
const wxVariant GetProperty(const wxString& property, ... ) const;
//@}
/**
This function is a low-level implementation that allows access to the IDispatch
Invoke function.
It is not meant to be called directly by the application, but is used by other
convenience functions.
@param member
The member function or property name.
@param action
Bitlist: may contain DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF,
DISPATCH_METHOD.
@param retValue
Return value (ignored if there is no return value)
@param noArgs
Number of arguments in args or ptrArgs.
@param args
If non-null, contains an array of variants.
@param ptrArgs
If non-null, contains an array of constant pointers to variants.
@return @true if the operation was successful, @false otherwise.
@remarks Two types of argument array are provided, so that when possible
pointers are used for efficiency.
*/
bool Invoke(const wxString& member, int action,
wxVariant& retValue, int noArgs,
wxVariant args[],
const wxVariant* ptrArgs[] = 0) const;
//@{
/**
Puts a property value into this object. The first form takes a property name,
number of
arguments, and an array of variants. The second form takes a property name and
zero to six
constant references to variants. Since the variant class has constructors for
the basic
data types, and C++ provides temporary objects automatically, both of the
following lines
are syntactically valid:
Note that @a property can contain dot-separated property names, to save the
application
needing to call GetProperty several times using several temporary objects.
*/
bool PutProperty(const wxString& property, int noArgs,
wxVariant args[]);
const bool PutProperty(const wxString& property, ... );
//@}
/**
Sets the IDispatch pointer. This function does not check if there is already an
IDispatch pointer.
You may need to cast from IDispatch* to WXIDISPATCH* when calling this function.
*/
void SetDispatchPtr(WXIDISPATCH* dispatchPtr);
};

239
interface/wx/msw/registry.h Normal file
View File

@@ -0,0 +1,239 @@
/////////////////////////////////////////////////////////////////////////////
// Name: msw/registry.h
// Purpose: interface of wxRegKey
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
/**
@class wxRegKey
@wxheader{msw/registry.h}
wxRegKey is a class representing the Windows registry (it is only available
under Windows). One can create, query and delete registry keys using this
class.
The Windows registry is easy to understand. There are five registry keys,
namely:
@li @c HKEY_CLASSES_ROOT (HKCR)
@li @c HKEY_CURRENT_USER (HKCU)
@li @c HKEY_LOCAL_MACHINE (HKLM)
@li @c HKEY_CURRENT_CONFIG (HKCC)
@li @c HKEY_USERS (HKU)
After creating a key, it can hold a value. The values can be:
@li String Value
@li Binary Value
@li DWORD Value
@li Multi String Value
@li Expandable String Value
@onlyfor{wxmsw}
@library{wxbase}
@category{misc}
@b Example:
@code
wxRegKey *key = new wxRegKey("HKEY_LOCAL_MACHINE\\Software\\MyKey");
// Create the key if it does not exist.
if( !key->Exists() )
key->Create();
// Create a new value "MYVALUE" and set it to 12.
key->SetValue("MYVALUE", 12);
// Read the value back.
long value;
key->QueryValue("MYVALUE", &value);
wxMessageBox(wxString::Format("%d", value), "Registry Value", wxOK);
// Get the number of subkeys and enumerate them.
size_t subkeys;
key->GetKeyInfo(&subkeys, NULL, NULL, NULL);
wxString key_name;
key->GetFirstKey(key_name, 1);
for(int i = 0; i < subkeys; i++)
{
wxMessageBox(key_name, "Subkey Name", wxOK);
key->GetNextKey(key_name, 1);
}
@endcode
*/
class wxRegKey
{
public:
/**
Default constructor, initializes to @c HKEY_CLASSES_ROOT.
*/
wxRegKey();
/**
The constructor to set the full name of the key.
*/
wxRegKey(const wxString& strKey);
/**
The constructor to set the full name of the key under a previously created
parent.
*/
wxRegKey(const wxRegKey& keyParent, const wxString& strKey);
/**
Access modes for wxRegKey.
*/
enum AccessMode
{
Read, ///< Read-only
Write ///< Read and Write
};
/**
Closes the key.
*/
void Close();
/**
Creates the key. Will fail if the key already exists and @a bOkIfExists is
@false.
*/
bool Create(bool bOkIfExists = true);
/**
Deletes the subkey with all of its subkeys/values recursively.
*/
void DeleteKey(const wxChar* szKey);
/**
Deletes this key and all of its subkeys and values recursively.
*/
void DeleteSelf();
/**
Deletes the named value.
*/
void DeleteValue(const wxChar* szKey);
/**
Returns @true if the key exists.
*/
bool Exists() const;
/**
Gets the first key.
*/
bool GetFirstKey(wxString& strKeyName, long& lIndex);
/**
Gets the first value of this key.
*/
bool GetFirstValue(wxString& strValueName, long& lIndex);
/**
Gets information about the key.
@param pnSubKeys
The number of subkeys.
@param pnMaxKeyLen
The maximum length of the subkey name.
@param pnValues
The number of values.
@param pnMaxValueLen
The maximum length of a value.
*/
bool GetKeyInfo(size_t* pnSubKeys, size_t* pnMaxKeyLen,
size_t* pnValues, size_t* pnMaxValueLen) const;
/**
Gets the name of the registry key.
*/
wxString GetName(bool bShortPrefix = true) const;
/**
Gets the next key.
*/
bool GetNextKey(wxString& strKeyName, long& lIndex) const;
/**
Gets the next key value for this key.
*/
bool GetNextValue(wxString& strValueName, long& lIndex) const;
/**
Returns @true if given subkey exists.
*/
bool HasSubKey(const wxChar* szKey) const;
/**
Returns @true if any subkeys exist.
*/
bool HasSubKeys() const;
/**
Returns @true if the value exists.
*/
bool HasValue(const wxChar* szValue) const;
/**
Returns @true if any values exist.
*/
bool HasValues() const;
/**
Returns @true if this key is empty, nothing under this key.
*/
bool IsEmpty() const;
/**
Returns @true if the key is opened.
*/
bool IsOpened() const;
/**
Explicitly opens the key. This method also allows the key to be opened in
read-only mode by passing wxRegKey::Read instead of default
wxRegKey::Write parameter.
*/
bool Open(AccessMode mode = Write);
/**
Retrieves the string value.
*/
bool QueryValue(const wxChar* szValue, wxString& strValue) const;
/**
Retrieves the numeric value.
*/
const bool QueryValue(const wxChar* szValue, long* plValue) const;
/**
Renames the key.
*/
bool Rename(const wxChar* szNewName);
/**
Renames a value.
*/
bool RenameValue(const wxChar* szValueOld,
const wxChar* szValueNew);
/**
Sets the given @a szValue which must be numeric.
If the value doesn't exist, it is created.
*/
bool SetValue(const wxChar* szValue, long lValue);
/**
Sets the given @a szValue which must be string.
If the value doesn't exist, it is created.
*/
bool SetValue(const wxChar* szValue, const wxString& strValue);
/**
Sets the given @a szValue which must be binary.
If the value doesn't exist, it is created.
*/
bool SetValue(const wxChar* szValue, const wxMemoryBuffer& buf);
};