Module dlangui.core.types

This module declares basic data types for usage in dlangui library.

Contains reference counting support, point and rect structures, character glyph structure, misc utility functions.

Synopsis

import dlangui.core.types;

// points
Point p(5, 10);

// rectangles
Rect r(5, 13, 120, 200);
writeln(r);

// reference counted objects, useful for RAII / resource management.
class Foo : RefCountedObject {
	int[] resource;
	~this() {
		writeln("freeing Foo resources");
	}
}
{
	Ref!Foo ref1;
	{
		Ref!Foo fooRef = new RefCountedObject();
		ref1 = fooRef;
	}
	// RAII: will destroy object when no more references
}

Functions

Name Description
dcharToUpper Uppercase unicode character.
fromWStringz conversion from wchar z-string

Classes

Name Description
RefCountedObject Base class for reference counted objects, maintains reference counter inplace.

Structs

Name Description
Glyph Character glyph.
Point 2D point
Rect 2D rectangle
Ref Reference counting support.

Enums

Name Description
State widget state flags - bits

Authors

Vadim Lopatin, coolreader.org@gmail.com

Copyright

Vadim Lopatin, 2014

License

Boost License 1.0