# dlangui.core.types

DLANGUI library.
This module declares basic data types for usage in dlangui library.
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
    }

License:
Boost License 1.0
Authors:
Vadim Lopatin, coolreader.org@gmail.com

struct Glyph;
  character glyph
  uint id;
    < 0: unique id of glyph (for drawing in hardware accelerated scenes)
  ubyte blackBoxX;
    < 4: width of glyph black box
  ubyte blackBoxY;
    < 5: height of glyph black box
  byte originX;
    < 6: X origin for glyph
  byte originY;
    < 7: Y origin for glyph
  ubyte width;
    < 8: full width of glyph
  ubyte lastUsage;
    < 9: usage flag, to handle cleanup of unused glyphs
  ubyte[] glyph;
    < 12: glyph data, arbitrary size
class RefCountedObject;
  base class for reference counted objects, maintains reference counter inplace.
enum State: uint;
  widget state flags - bits
  Normal
    state not specified / normal
dchar dcharToUpper(dchar ch);
  uppercase unicode character
bool isPathDelimiter(char ch);
  returns true if char ch is / or \ slash
@property string exePath();
  returns current executable path only, including last path delimiter
char[] convertPathDelimiters(char[] buf);
  converts path delimiters to standard for platform inplace in buffer(e.g. / to \ on windows, \ to / on posix), returns buf
string convertPathDelimiters(string src);
  converts path delimiters to standard for platform (e.g. / to \ on windows, \ to / on posix)
string appendPath(string[] pathItems...);
  appends file path parts with proper delimiters e.g. appendPath("/home/user", ".myapp", "config") => "/home/user/.myapp/config"
char[] appendPath(char[] buf, string[] pathItems...);
  appends file path parts with proper delimiters (as well converts delimiters inside path to system) to buffer e.g. appendPath("/home/user", ".myapp", "config") => "/home/user/.myapp/config"

Page generated by Ddoc. Vadim Lopatin, 2014