wx.DataFormat Class Reference

Inheritance diagram for wx.DataFormat:

wx.Object

List of all members.

Public Member Functions

 DataFormat (wxString id)
 DataFormat (string id)
 DataFormat (DataFormatId type)
 DataFormat ()
 DataFormat (IntPtr wxObject)
override bool Equals (object obj)
override int GetHashCode ()
override string ToString ()

Static Public Member Functions

static implicit operator DataFormat (DataFormatId type)
static implicit operator DataFormat (string id)
static implicit operator DataFormatId (DataFormat format)
static implicit operator string (DataFormat format)
static bool operator!= (DataFormat f1, DataFormat f2)
static bool operator== (DataFormat f1, DataFormat f2)

Protected Member Functions

override void CallDTor ()

Properties

string Id [get, set]
bool IsStandard [get]
DataFormatId Type [get, set]


Detailed Description

A wx.DataFormat is an encapsulation of a platform-specific format handle which is used by the system for the clipboard and drag and drop operations. The applications are usually only interested in, for example, pasting data from the clipboard only if the data is in a format the program understands and a data format is something which uniquely identifies this format.

On the system level, a data format is usually just a number (CLIPFORMAT under Windows or "Atom" under X11, for example) and the standard formats are, indeed, just numbers which can be implicitly converted to wx.DataFormat.

As mentioned above, these standard formats may be passed to any function taking wx.DataFormat argument because wx.DataFormat has an implicit conversion from them.

Aside the standard formats, the application may also use custom formats which are identified by their names (strings) and not numeric identifiers. Although internally custom format must be created (or registered) first, you shouldn't care about it because it is done automatically the first time the wx.DataFormat object corresponding to a given format name is created. The only implication of this is that you should avoid having global wx.DataFormat objects with non-default constructor because their constructors are executed before the program has time to perform all necessary initialisations and so an attempt to do clipboard format registration at this time will usually lead to a crash!


Constructor & Destructor Documentation

wx.DataFormat.DataFormat ( IntPtr  wxObject  ) 

wx.DataFormat.DataFormat (  ) 

wx.DataFormat.DataFormat ( DataFormatId  type  ) 

wx.DataFormat.DataFormat ( string  id  ) 

Creates an application specific data format that is described by a name rather than by a number.

Parameters:
id The name of the data format.

wx.DataFormat.DataFormat ( wxString  id  ) 


Member Function Documentation

override void wx.DataFormat.CallDTor (  )  [protected, virtual]

This will be called by Dispose() to delete the C++ object. Overload this if you have to use another DTor.

Reimplemented from wx.Object.

override bool wx.DataFormat.Equals ( object  obj  ) 

override int wx.DataFormat.GetHashCode (  ) 

static implicit wx.DataFormat.operator DataFormat ( DataFormatId  type  )  [static]

Creates a new instance of an application specific DataFormat of the converted name.

Parameters:
id 
Returns:

static implicit wx.DataFormat.operator DataFormat ( string  id  )  [static]

Creates a new instance of an application specific DataFormat of the converted name.

Parameters:
id 
Returns:

static implicit wx.DataFormat.operator DataFormatId ( DataFormat  format  )  [static]

Conversion to string by Type. this will fail if the converted format is a standard format.

Parameters:
format 
Returns:

static implicit wx.DataFormat.operator string ( DataFormat  format  )  [static]

Conversion to string by Id. this will fail if the converted format is a standard format.

Parameters:
format 
Returns:

static bool wx.DataFormat.operator!= ( DataFormat  f1,
DataFormat  f2 
) [static]

static bool wx.DataFormat.operator== ( DataFormat  f1,
DataFormat  f2 
) [static]

override string wx.DataFormat.ToString (  ) 


Property Documentation

string wx.DataFormat.Id [get, set]

Get or set the ID of the data format is this is application sepcific. Getting the ID of a standard format will result into a System.NotSupportedException.

See also:
IsStandard

Exceptions:
System.NotSupportedException Will be thrown if this is a standard format.

bool wx.DataFormat.IsStandard [get]

True iff this is a standard format, i.e. this format is identified by its type. Otherwise, this format has an Id.

See also:
Id, Type

DataFormatId wx.DataFormat.Type [get, set]


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads