OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TCursor, derived from TGdiBase, represents the GDI cursor object class. More...
#include <owl/gdiobjec.h>
Classes | |
struct | TInfo |
Public Types | |
typedef HCURSOR | THandle |
TCursor encapsulates an HCURSOR. | |
Public Member Functions | |
TCursor (HCURSOR handle, TAutoDelete autoDelete=NoAutoDelete) | |
Creates a TCursor object and sets the Handle data member to the given borrowed handle. | |
TCursor (HINSTANCE, const TCursor &cursor) | |
Creates a copy of the given cursor object. | |
TCursor (HINSTANCE, TResId) | |
Constructs a cursor object from the specified resource ID. | |
TCursor (HINSTANCE, const TPoint &hotSpot, const TSize &size, void *andBits, void *xorBits) | |
Constructs a TCursor object of the specified size at the specified point. | |
TCursor (const void *resBits, uint32 resSize) | |
Constructs a TCursor object from the specified resource. | |
TCursor (const ICONINFO &iconInfo) | |
Creates a TCursor object from the specified ICONINFO structure information. | |
~TCursor () | |
Destroys a TCursor object. | |
HCURSOR | GetHandle () const |
Returns the handle of the cursor with type HCURSOR. | |
operator HCURSOR () const | |
An inline typecasting operator. | |
bool | operator== (const TCursor &other) const |
Returns true if this cursor equals other; otherwise returns false. | |
auto | GetInfo () const -> TInfo |
Retrieves information about this cursor. | |
auto | GetIconInfo () const -> ICONINFO |
Retrieves information about this cursor. | |
auto | GetIconInfoEx () const -> ICONINFOEX |
Retrieves information about this cursor. | |
Additional Inherited Members | |
Protected Member Functions inherited from owl::TGdiBase | |
void | CheckValid (uint resId=IDS_GDIFAILURE) |
TGdiBase () | |
This default constructor sets Handle to 0 and ShouldDelete to true. | |
TGdiBase (HANDLE handle, TAutoDelete autoDelete=NoAutoDelete) | |
Initializes members to given values, and validates the handle. | |
Static Protected Member Functions inherited from owl::TGdiBase | |
static void | _CheckValid (HANDLE handle, uint resId=IDS_GDIFAILURE) |
Protected Attributes inherited from owl::TGdiBase | |
HANDLE | Handle |
GDI handle of this object. | |
bool | ShouldDelete |
Should object delete GDI handle in dtor? | |
TCursor, derived from TGdiBase, represents the GDI cursor object class.
TCursor constructors can create cursors from a resource or from explicit information. Because cursors are not real GDI objects, the TCursor destructor overrides the base destructor, ~TGdiBase.
Definition at line 730 of file gdiobjec.h.
TCursor encapsulates an HCURSOR.
Definition at line 734 of file gdiobjec.h.
owl::TCursor::TCursor | ( | HCURSOR | handle, |
TAutoDelete | autoDelete = NoAutoDelete ) |
Creates a TCursor object and sets the Handle data member to the given borrowed handle.
The ShouldDelete data member defaults to false, ensuring that the borrowed handle will not be deleted when the C++ object is destroyed.
Definition at line 24 of file cursor.cpp.
References OWL_CDLEVEL, and TRACEX.
Creates a copy of the given cursor object.
The 32bit version (for compiling a Win32 application) uses CopyIcon() and does a cast to get to HICON.
Definition at line 36 of file cursor.cpp.
References owl::TGdiBase::CheckValid(), owl::TGdiBase::Handle, OWL_CDLEVEL, and TRACEX.
Constructs a cursor object from the specified resource ID.
Definition at line 47 of file cursor.cpp.
References owl::TGdiBase::CheckValid(), owl::GetGlobalModule(), GetHandle(), owl::TModule::GetHandle(), owl::TGdiBase::Handle, owl::TModule::LoadCursor(), OWL_CDLEVEL, PRECONDITION, owl::TGdiBase::ShouldDelete, and TRACEX.
owl::TCursor::TCursor | ( | HINSTANCE | instance, |
const TPoint & | hotSpot, | ||
const TSize & | size, | ||
void * | andBits, | ||
void * | xorBits ) |
Constructs a TCursor object of the specified size at the specified point.
Definition at line 64 of file cursor.cpp.
References owl::TGdiBase::CheckValid(), owl::TGdiBase::Handle, OWL_CDLEVEL, PRECONDITION, and TRACEX.
Constructs a TCursor object from the specified resource.
Definition at line 77 of file cursor.cpp.
References owl::TGdiBase::CheckValid(), owl::TGdiBase::Handle, OWL_CDLEVEL, PRECONDITION, and TRACEX.
owl::TCursor::TCursor | ( | const ICONINFO & | iconInfo | ) |
Creates a TCursor object from the specified ICONINFO structure information.
Definition at line 89 of file cursor.cpp.
References owl::TGdiBase::CheckValid(), owl::TGdiBase::Handle, OWL_CDLEVEL, TRACEX, and WARN.
owl::TCursor::~TCursor | ( | ) |
Destroys a TCursor object.
Definition at line 118 of file cursor.cpp.
References owl::TGdiBase::Handle, OWL_CDLEVEL, owl::TGdiBase::ShouldDelete, and TRACEX.
|
inline |
Returns the handle of the cursor with type HCURSOR.
Definition at line 1623 of file gdiobjec.h.
References owl::TGdiBase::Handle.
Retrieves information about this cursor.
Wrapper for the Windows API function of the same name. Throws TXGdi on failure.
autoDelete
set to TAutoDelete::AutoDelete).Definition at line 157 of file cursor.cpp.
References GetHandle(), and GetIconInfo().
auto owl::TCursor::GetIconInfoEx | ( | ) | const -> ICONINFOEX |
Retrieves information about this cursor.
Wrapper for the Windows API function of the same name. Throws TXGdi on failure.
autoDelete
set to TAutoDelete::AutoDelete).Definition at line 176 of file cursor.cpp.
References GetHandle(), and GetIconInfoEx().
Retrieves information about this cursor.
Throws TXGdi on failure.
Definition at line 129 of file cursor.cpp.
References _T, owl::AutoDelete, CHECK, GetIconInfoEx(), and MAX_PATH.
|
inline |
An inline typecasting operator.
Converts this cursor's Handle to type HCURSOR (the data type representing the handle to a cursor resource).
Definition at line 1632 of file gdiobjec.h.
Returns true if this cursor equals other; otherwise returns false.
Definition at line 1640 of file gdiobjec.h.
References owl::TGdiBase::Handle.