diff --git a/collections.html b/collections.html index c304dc2c..af6dd889 100644 --- a/collections.html +++ b/collections.html @@ -1,13 +1,37 @@ - - - dlangui.core.collections - -

dlangui.core.collections

- -DLANGUI library. -

-This module implements array based collection. + + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.core.collections + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+
+
+

dlangui.core.collections

+ +This module implements array based collection.

Synopsis:
import dlangui.core.collections;
@@ -149,6 +173,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/controls.html b/controls.html index aad41595..77504d07 100644 --- a/controls.html +++ b/controls.html @@ -1,14 +1,38 @@ - - - dlangui.widgets.controls - -

dlangui.widgets.controls

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.controls + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.controls

+ This module contains simple controls widgets implementation.

- TextWidget

@@ -210,6 +234,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/dialog.html b/dialog.html index 46ffd18b..c21d596b 100644 --- a/dialog.html +++ b/dialog.html @@ -1,15 +1,37 @@ - - - dlangui.dialogs.dialog - -

dlangui.dialogs.dialog

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.dialogs.dialog + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.dialogs.dialog

+ This module contains common Dialog implementation. -

- -

Synopsis:
import dlangui.platforms.common.platform;
@@ -50,6 +72,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/drawbuf.html b/drawbuf.html index 742cca5c..b7658931 100644 --- a/drawbuf.html +++ b/drawbuf.html @@ -1,15 +1,37 @@ - - - dlangui.graphics.drawbuf - -

dlangui.graphics.drawbuf

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.graphics.drawbuf + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.graphics.drawbuf

+ This module contains drawing buffer implementation. -

- -

Synopsis:
import dlangui.graphics.drawbuf;
@@ -218,6 +240,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/editors.html b/editors.html index 708d1ff4..9f2ae054 100644 --- a/editors.html +++ b/editors.html @@ -1,16 +1,38 @@ - - - dlangui.widgets.editors - -

dlangui.widgets.editors

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.editors + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.editors

+ This module contains implementation of editors.

- -

- EditLine - single line editor.

@@ -747,6 +769,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/events.html b/events.html index 7f23e6e3..bc55fcb7 100644 --- a/events.html +++ b/events.html @@ -1,15 +1,37 @@ - - - dlangui.core.events - -

dlangui.core.events

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.core.events + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.core.events

+ This module contains dlangui event types declarations. -

- -

Synopsis:
import dlangui.core.events;
@@ -450,6 +472,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/filedlg.html b/filedlg.html index e140dfb6..60d26c28 100644 --- a/filedlg.html +++ b/filedlg.html @@ -1,14 +1,38 @@ - - - dlangui.dialogs.filedlg - -

dlangui.dialogs.filedlg

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.dialogs.filedlg + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.dialogs.filedlg

+ This module contains FileDialog implementation.

- Can show dialog for open / save.

@@ -59,6 +83,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/fonts.html b/fonts.html index 507d4b9f..897e1a83 100644 --- a/fonts.html +++ b/fonts.html @@ -1,14 +1,38 @@ - - - dlangui.graphics.fonts - -

dlangui.graphics.fonts

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.graphics.fonts + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.graphics.fonts

+ This module contains base fonts access interface and common implementation.

- Font - base class for fonts.

@@ -359,6 +383,13 @@ Recently used glyphs are marked with glyph.lastUsage = 1 -
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/ftfonts.html b/ftfonts.html index 968e5e21..78bc0a12 100644 --- a/ftfonts.html +++ b/ftfonts.html @@ -1,19 +1,37 @@ - - - dlangui.graphics.ftfonts - -

dlangui.graphics.ftfonts

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.graphics.ftfonts + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.graphics.ftfonts

+ This file contains FontManager implementation based on FreeType library. -

- -

- -

- -

License:
Boost License 1.0 @@ -85,6 +103,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/gldrawbuf.html b/gldrawbuf.html index eafa8fbe..01a14c2d 100644 --- a/gldrawbuf.html +++ b/gldrawbuf.html @@ -1,14 +1,38 @@ - - - dlangui.graphics.gldrawbuf - -

dlangui.graphics.gldrawbuf

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.graphics.gldrawbuf + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.graphics.gldrawbuf

+ This module contains opengl based drawing buffer implementation.

- To enable OpenGL support, build with version(USE_OPENGL);

@@ -128,6 +152,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/glsupport.html b/glsupport.html index a6257d3f..f55b5650 100644 --- a/glsupport.html +++ b/glsupport.html @@ -1,14 +1,38 @@ - - - dlangui.graphics.glsupport - -

dlangui.graphics.glsupport

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.graphics.glsupport + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.graphics.glsupport

+ This module contains OpenGL access layer.

- To enable OpenGL support, build with version(USE_OPENGL);

@@ -46,6 +70,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/i18n.html b/i18n.html index 6c710eef..cb25df8d 100644 --- a/i18n.html +++ b/i18n.html @@ -1,14 +1,38 @@ - - - dlangui.core.i18n - -

dlangui.core.i18n

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.core.i18n + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.core.i18n

+ This module contains internationalization support implementation.

- Translation files contain of simple key=value pair lines.

@@ -117,6 +141,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/images.html b/images.html index e0f28ea3..c5c773e1 100644 --- a/images.html +++ b/images.html @@ -1,14 +1,38 @@ - - - dlangui.graphics.images - -

dlangui.graphics.images

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.graphics.images + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.graphics.images

+ This module contains image loading functions.

- Currently uses FreeImage.

@@ -39,6 +63,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/index.html b/index.html index f993b990..80ceea18 100644 --- a/index.html +++ b/index.html @@ -1,261 +1,266 @@ - - - - - - - - - - - Dlangui by buggins - - - -
-
- -
-

Dlangui

-

Cross Platform GUI for D programming language

-
- -
- Download .zip - Download .tar.gz - View on GitHub -
- -
- -
-

-Dlang UI

- -

GUI for D programming language, written in D.

- -

Alpha stage of development.

- -
    -
  • Crossplatform (Win32 and Linux are supported in current version); can use SDL2 as a backend.
  • -
  • Mostly inspired by Android UI API (layouts, styles, two phase layout, ...)
  • -
  • Supports highly customizable UI themes and styles
  • -
  • Supports internationalization
  • -
  • Hardware acceleration using OpenGL (when built with version USE_OPENGL)
  • -
  • Fallback to Win32 API / XCB when OpenGL is not available
  • -
  • Actually it's a port (with major refactoring) of GUI library for cross platform OpenGL based implementation of Cool Reader app project from C++.
  • -
  • Almost ready for 2D games development
  • -
  • Goal: provide set of widgets suitable for building of IDE.
  • -
  • Non thread safe
  • -

-Widgets

- -
    -
  • Widget - base class for all widgets and widget containers, similar to Android's View
  • -

Currently implemented widgets:

- -
    -
  • TextWidget - simple static text (TODO: implement multiline formatting)
  • -
  • ImageWidget - static image
  • -
  • Button - simple button with text label
  • -
  • ImageButton - image only button
  • -
  • TextImageButton - button with icon and label
  • -
  • CheckBox - check button with label
  • -
  • RadioButton - radio button with label
  • -
  • EditLine - single line edit
  • -
  • EditBox - multiline editor
  • -
  • VSpacer - vertical spacer - just an empty widget with layoutHeight == FILL_PARENT, to fill vertical space in layouts
  • -
  • HSpacer - horizontal spacer - just an empty widget with layoutWidth == FILL_PARENT, to fill horizontal space in layouts
  • -
  • ScrollBar - scroll bar
  • -
  • TabControl - tabs widget, allows to select one of tabs
  • -
  • TabHost - container for pages controlled by TabControl
  • -
  • TabWidget - combination of TabControl and TabHost
  • -

-Layouts

- -

Similar to layouts in Android

- -
    -
  • LinearLayout - layout children horizontally or vertically depending on orientation
  • -
  • VerticalLayout - just a LinearLayout with vertical orientation
  • -
  • HorizontalLayout - just a LinearLayout with vertical orientation
  • -
  • FrameLayout - all children occupy the same place; usually onle one of them is visible
  • -
  • TableLayout - children are aligned into rows and columns of table
  • -

-List Views

- -

Lists are implemented similar to Android UI API.

- -
    -
  • ListWidget - layout dynamic items horizontally or vertically (one in row/column) with automatic scrollbar; can reuse widgets for similar items
  • -
  • ListAdapter - interface to provide data and widgets for ListWidget
  • -
  • WidgetListAdapter - simple implementation of ListAdapter interface - just a list of widgets (one per list item) to show
  • -

TODOs:

- -
    -
  • Multicolumn lists
  • -
  • Tree view
  • -

-Resources

- -

Resources like fonts and images use reference counting. For proper resource freeing, always destroy widgets implicitly.

- -
    -
  • FontManager: provides access to fonts
  • -
  • Images: .png or .jpg images; if filename ends with .9.png, it's autodetected as nine-patch image (see Android drawables description)
  • -
  • StateDrawables: .xml file can describe list of other drawables to choose based on widget's State (.xml files from android themes can be used directly)
  • -
  • imageCache allows to cache unpacked images
  • -
  • drawableCache provides access by resource id (string, usually filename w/o extension) to drawables located in specified list of resource directories.
  • -

-Styles and Themes

- -

Styles and themes are a bit similar to ones in Android API.

- -
    -
  • Theme is a container for styles. Can be load from XML theme resource file.
  • -
  • Styles are accessible in theme by string ID.
  • -
  • Styles can be nested to form hiararchy - when some attribute is missing in style, value from base style will be used.
  • -
  • State substyles are supported: allow to change widget appearance dynamically based on its state.
  • -
  • Widgets use style attributes directly from assigned style. When some attribute is being changed in widget, it creates its own copy of base style, -which allows to modify some of attributes, while getting base style attributes if they are not changed in widget. This trick can minimize memory usage for widget attributes when -standard values are used.
  • -

-Win32 builds

- -
    -
  • Under windows, uses SDL2 or Win32 API as backend.
  • -
  • Optionally, may use OpenGL acceleration via DerelictGL3/WGL.
  • -
  • Uses Win32 API for font rendering.
  • -
  • Optinally can use FreeType for font rendering.
  • -

Build and run using DUB:

- -
    git clone https://github.com/buggins/dlangui.git
-    cd dlangui
-    dub run dlangui:example1
-
- -

To develop using Visual-D, download sources for dlabgui and dependencies into some directory:

- -
    git clone https://github.com/buggins/dlangui.git
-    git clone https://github.com/DerelictOrg/DerelictUtil.git
-    git clone https://github.com/DerelictOrg/DerelictGL3.git
-    git clone https://github.com/DerelictOrg/DerelictFI.git
-    git clone https://github.com/DerelictOrg/DerelictFT.git
-    git clone https://github.com/DerelictOrg/DerelictSDL2.git
-
- -

Then open .sln using Visual D.

- -

-Linux builds

- -
    -
  • Uses SDL2 or XCB as a backend (SDL2 is recommended, since has better support now).
  • -
  • Uses shared memory images for faster drawing.
  • -
  • Uses FreeType for font rendering.
  • -
  • TODO: Use FontConfig to get font list.
  • -
  • OpenGL is now working under SDL2 only.
  • -
  • Entering of unicode characters is now working under SDL2 only.
  • -

For linux build with SDL2 backend, following libraries are required:

- -
    libsdl2
-
- -

To build dlangui apps with XCB backend, development packages for following libraries required for XCB backend build:

- -
    xcb, xcb-util, xcb-shm, xcb-image, xcb-keysyms, X11-xcb, X11
-
- -

E.g. in Ubuntu, you can use following command to enable SDL2 backend builds:

- -
    sudo apt-get install libsdl2-dev
-
- -

or (for XCB backend)

- -
    sudo apt-get install libxcb-image0-dev libxcb-shm0-dev libxcb-keysyms1-dev libfreeimage-dev
-
- -

In runtime, .so for following libraries are being loaded (binary packages required):

- -
    freetype, opengl, freeimage
-
- -

Build and run on Linux using DUB:

- -
    dub run dlangui:example1
-
- -

Development using Mono-D:

- -
    -
  • open solution dlangui/dlanguimonod.sln
  • -
  • build and run project example1
  • -

You need fresh version of MonoDevelop to use Mono-D. It can be installed from PPA repository.

- -
    sudo add-apt-repository ppa:ermshiperete/monodevelop
-    sudo apt-get update
-    sudo apt-get install monodevelop-current
-
- -

-Other platforms

- -
    -
  • Other platforms support may be added easy
  • -

-Third party components used

- -
    -
  • DerelictGL3 - for OpenGL support
  • -
  • DerelictFT + FreeType library support under linux and optionally under Windows.
  • -
  • DerelictFI + FreeImage library support for decoding of images
  • -
  • DerelictSDL2 + SDL2 for cross platform support
  • -
  • WindowsAPI bindings from http://www.dsource.org/projects/bindings/wiki/WindowsApi (patched)
  • -
  • XCB and X11 bindings (patched) when SDL2 is not used; TODO: provide links
  • -

-Hello World

- -
// main.d
-import dlangui.all;
-mixin DLANGUI_ENTRY_POINT;
-
-/// entry point for dlangui based application
-extern (C) int UIAppMain(string[] args) {
-    // resource directory search paths
-    string[] resourceDirs = [
-        appendPath(exePath, "../res/"),   // for Visual D and DUB builds
-        appendPath(exePath, "../../res/") // for Mono-D builds
-    ];
-
-    // setup resource directories - will use only existing directories
-    Platform.instance.resourceDirs = resourceDirs;
-    // select translation file - for english language
-    Platform.instance.uiLanguage = "en";
-    // load theme from file "theme_default.xml"
-    Platform.instance.uiTheme = "theme_default";
-
-    // create window
-    Window window = Platform.instance.createWindow("My Window", null);
-    // create some widget to show in window
-    window.mainWidget = (new Button()).text("Hello world"d).textColor(0xFF0000); // red text
-    // show window
-    window.show();
-    // run message loop
-    return Platform.instance.enterMessageLoop();
-}
-
-
- - - - -
-
- - \ No newline at end of file + + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - index + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

index

+ + + +

+Dlang UI

+ +

GUI for D programming language, written in D.

+ + Alpha stage of development. + +
    +
  • Crossplatform (Win32 and Linux are supported in current version); can use SDL2 as a backend.
  • +
  • Mostly inspired by Android UI API (layouts, styles, two phase layout, ...)
  • +
  • Supports highly customizable UI themes and styles
  • +
  • Supports internationalization
  • +
  • Hardware acceleration using OpenGL (when built with version USE_OPENGL)
  • +
  • Fallback to Win32 API / XCB when OpenGL is not available
  • +
  • Actually it's a port (with major refactoring) of GUI library for cross platform OpenGL based implementation of Cool Reader app project from C++.
  • +
  • Almost ready for 2D games development
  • +
  • Goal: provide set of widgets suitable for building of IDE.
  • +
  • Non thread safe
  • +
+ +

Widgets

+ +
    +
  • Widget - base class for all widgets and widget containers, similar to Android's View
  • +

Currently implemented widgets:

+ +
    +
  • TextWidget - simple static text (TODO: implement multiline formatting)
  • +
  • ImageWidget - static image
  • +
  • Button - simple button with text label
  • +
  • ImageButton - image only button
  • +
  • TextImageButton - button with icon and label
  • +
  • CheckBox - check button with label
  • +
  • RadioButton - radio button with label
  • +
  • EditLine - single line edit
  • +
  • EditBox - multiline editor
  • +
  • VSpacer - vertical spacer - just an empty widget with layoutHeight == FILL_PARENT, to fill vertical space in layouts
  • +
  • HSpacer - horizontal spacer - just an empty widget with layoutWidth == FILL_PARENT, to fill horizontal space in layouts
  • +
  • ScrollBar - scroll bar
  • +
  • TabControl - tabs widget, allows to select one of tabs
  • +
  • TabHost - container for pages controlled by TabControl
  • +
  • TabWidget - combination of TabControl and TabHost
  • +
+ +

Layouts

+ +Similar to layouts in Android + +
    +
  • LinearLayout - layout children horizontally or vertically depending on orientation
  • +
  • VerticalLayout - just a LinearLayout with vertical orientation
  • +
  • HorizontalLayout - just a LinearLayout with vertical orientation
  • +
  • FrameLayout - all children occupy the same place; usually onle one of them is visible
  • +
  • TableLayout - children are aligned into rows and columns of table
  • +

+List Views

+ +

Lists are implemented similar to Android UI API.

+ +
    +
  • ListWidget - layout dynamic items horizontally or vertically (one in row/column) with automatic scrollbar; can reuse widgets for similar items
  • +
  • ListAdapter - interface to provide data and widgets for ListWidget
  • +
  • WidgetListAdapter - simple implementation of ListAdapter interface - just a list of widgets (one per list item) to show
  • +

TODOs:

+ +
    +
  • Multicolumn lists
  • +
  • Tree view
  • +

+Resources

+ +

Resources like fonts and images use reference counting. For proper resource freeing, always destroy widgets implicitly.

+ +
    +
  • FontManager: provides access to fonts
  • +
  • Images: .png or .jpg images; if filename ends with .9.png, it's autodetected as nine-patch image (see Android drawables description)
  • +
  • StateDrawables: .xml file can describe list of other drawables to choose based on widget's State (.xml files from android themes can be used directly)
  • +
  • imageCache allows to cache unpacked images
  • +
  • drawableCache provides access by resource id (string, usually filename w/o extension) to drawables located in specified list of resource directories.
  • +

+Styles and Themes

+ +

Styles and themes are a bit similar to ones in Android API.

+ +
    +
  • Theme is a container for styles. Can be load from XML theme resource file.
  • +
  • Styles are accessible in theme by string ID.
  • +
  • Styles can be nested to form hiararchy - when some attribute is missing in style, value from base style will be used.
  • +
  • State substyles are supported: allow to change widget appearance dynamically based on its state.
  • +
  • Widgets use style attributes directly from assigned style. When some attribute is being changed in widget, it creates its own copy of base style, +which allows to modify some of attributes, while getting base style attributes if they are not changed in widget. This trick can minimize memory usage for widget attributes when +standard values are used.
  • +

+Win32 builds

+ +
    +
  • Under windows, uses SDL2 or Win32 API as backend.
  • +
  • Optionally, may use OpenGL acceleration via DerelictGL3/WGL.
  • +
  • Uses Win32 API for font rendering.
  • +
  • Optinally can use FreeType for font rendering.
  • +

Build and run using DUB:

+ +
    git clone https://github.com/buggins/dlangui.git
+    cd dlangui
+    dub run dlangui:example1
+
+ +

To develop using Visual-D, download sources for dlabgui and dependencies into some directory:

+ +
    git clone https://github.com/buggins/dlangui.git
+    git clone https://github.com/DerelictOrg/DerelictUtil.git
+    git clone https://github.com/DerelictOrg/DerelictGL3.git
+    git clone https://github.com/DerelictOrg/DerelictFI.git
+    git clone https://github.com/DerelictOrg/DerelictFT.git
+    git clone https://github.com/DerelictOrg/DerelictSDL2.git
+
+ +

Then open .sln using Visual D.

+ +

+Linux builds

+ +
    +
  • Uses SDL2 or XCB as a backend (SDL2 is recommended, since has better support now).
  • +
  • Uses shared memory images for faster drawing.
  • +
  • Uses FreeType for font rendering.
  • +
  • TODO: Use FontConfig to get font list.
  • +
  • OpenGL is now working under SDL2 only.
  • +
  • Entering of unicode characters is now working under SDL2 only.
  • +

For linux build with SDL2 backend, following libraries are required:

+ +
        libsdl2
+
+ +

To build dlangui apps with XCB backend, development packages for following libraries required for XCB backend build:

+ +
        xcb, xcb-util, xcb-shm, xcb-image, xcb-keysyms, X11-xcb, X11
+
+ +

E.g. in Ubuntu, you can use following command to enable SDL2 backend builds:

+ +
        sudo apt-get install libsdl2-dev
+
+ +

or (for XCB backend)

+ +
        sudo apt-get install libxcb-image0-dev libxcb-shm0-dev libxcb-keysyms1-dev libfreeimage-dev
+
+ + +

In runtime, .so for following libraries are being loaded (binary packages required):

+ +
        freetype, opengl, freeimage
+
+ +

Build and run on Linux using DUB:

+ +
        dub run dlangui:example1
+
+ +

Development using Mono-D:

+ +
    +
  • open solution dlangui/dlanguimonod.sln
  • +
  • build and run project example1
  • +

You need fresh version of MonoDevelop to use Mono-D. It can be installed from PPA repository.

+ +
    sudo add-apt-repository ppa:ermshiperete/monodevelop
+    sudo apt-get update
+    sudo apt-get install monodevelop-current
+
+ +

+Other platforms

+ +
    +
  • Other platforms support may be added easy
  • +

+Third party components used

+ +
    +
  • DerelictGL3 - for OpenGL support
  • +
  • DerelictFT + FreeType library support under linux and optionally under Windows.
  • +
  • DerelictFI + FreeImage library support for decoding of images
  • +
  • DerelictSDL2 + SDL2 for cross platform support
  • +
  • WindowsAPI bindings from http://www.dsource.org/projects/bindings/wiki/WindowsApi (patched)
  • +
  • XCB and X11 bindings (patched) when SDL2 is not used; TODO: provide links
  • +

+Hello World

+ +
// main.d
+import dlangui.all;
+mixin DLANGUI_ENTRY_POINT;
+
+/// entry point for dlangui based application
+extern (C) int UIAppMain(string[] args) {
+    // resource directory search paths
+    string[] resourceDirs = [
+        appendPath(exePath, "../res/"),   // for Visual D and DUB builds
+        appendPath(exePath, "../../res/") // for Mono-D builds
+    ];
+
+    // setup resource directories - will use only existing directories
+    Platform.instance.resourceDirs = resourceDirs;
+    // select translation file - for english language
+    Platform.instance.uiLanguage = "en";
+    // load theme from file "theme_default.xml"
+    Platform.instance.uiTheme = "theme_default";
+
+    // create window
+    Window window = Platform.instance.createWindow("My Window", null);
+    // create some widget to show in window
+    window.mainWidget = (new Button()).text("Hello world"d).textColor(0xFF0000); // red text
+    // show window
+    window.show();
+    // run message loop
+    return Platform.instance.enterMessageLoop();
+}
+
+ + +
+ + +
+
+ + diff --git a/layouts.html b/layouts.html index 4353db1d..ecce8488 100644 --- a/layouts.html +++ b/layouts.html @@ -1,14 +1,38 @@ - - - dlangui.widgets.layouts - -

dlangui.widgets.layouts

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.layouts + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.layouts

+ This module contains common layouts implementations.

- Layouts are similar to the same in Android.

@@ -119,6 +143,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/linestream.html b/linestream.html index 20a1b035..8bee4735 100644 --- a/linestream.html +++ b/linestream.html @@ -1,14 +1,38 @@ - - - dlangui.core.linestream - -

dlangui.core.linestream

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.core.linestream + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.core.linestream

+ This module contains text file reader implementation.

- Support utf8, utf16, utf32 be and le encodings, and line endings - according to D language source file specification.

@@ -57,6 +81,13 @@ Boost License 1.0 Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/lists.html b/lists.html index 14ba22cd..4b0660f5 100644 --- a/lists.html +++ b/lists.html @@ -1,14 +1,38 @@ - - - dlangui.widgets.lists - -

dlangui.widgets.lists

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.lists + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.lists

+ This module contains list widgets implementation.

- Similar to lists implementation in Android UI API.

@@ -274,6 +298,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/logger.html b/logger.html index 94a37ead..bbd09b14 100644 --- a/logger.html +++ b/logger.html @@ -1,17 +1,37 @@ - - - dlangui.core.logger - -

dlangui.core.logger

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.core.logger + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.core.logger

+ This module contains logger implementation. -

- -

- -

Synopsis:
import dlangui.core.logger;
@@ -35,6 +55,13 @@ Boost License 1.0
 Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/menu.html b/menu.html index e37b2f8f..14234ece 100644 --- a/menu.html +++ b/menu.html @@ -1,14 +1,38 @@ - - - dlangui.widgets.menu - -

dlangui.widgets.menu

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.menu + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.menu

+ This module contains menu widgets implementation.

- MenuItem - menu item properties container - to hold hierarchy of menu. MainMenu - main menu widget PopupMenu - popup menu widget @@ -298,6 +322,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/platform.html b/platform.html index 1504cb68..7d4ec629 100644 --- a/platform.html +++ b/platform.html @@ -1,14 +1,38 @@ - - - dlangui.platforms.common.platform - -

dlangui.platforms.common.platform

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.platforms.common.platform + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.platforms.common.platform

+ This module contains common Plaform definitions.

- Platform is abstraction layer for application.

@@ -249,9 +273,22 @@ When returned from this method, application is shutting down.

template APP_ENTRY_POINT()
put "mixin APP_ENTRY_POINT;" to main module of your dlangui based app

+
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow); +
+
workaround for link issue when WinMain is located in library

+ +
+
-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/popup.html b/popup.html index de697f9b..0bd1ed12 100644 --- a/popup.html +++ b/popup.html @@ -1,14 +1,38 @@ - - - dlangui.widgets.popup - -

dlangui.widgets.popup

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.popup + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.popup

+ This module contains popup widgets implementation.

- Popups appear above other widgets inside window.

@@ -127,6 +151,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/resources.html b/resources.html index 614fb3ba..41ff1e72 100644 --- a/resources.html +++ b/resources.html @@ -1,14 +1,38 @@ - - - dlangui.graphics.resources - -

dlangui.graphics.resources

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.graphics.resources + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.graphics.resources

+ This module contains resource management and drawables implementation.

- imageCache is RAM cache of decoded images (as DrawBuf).

@@ -122,6 +146,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/sdlapp.html b/sdlapp.html index bf41162a..b48e2ce9 100644 --- a/sdlapp.html +++ b/sdlapp.html @@ -1,15 +1,37 @@ - - - src.dlangui.platforms.sdl.sdlapp - -

src.dlangui.platforms.sdl.sdlapp

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - src.dlangui.platforms.sdl.sdlapp + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

src.dlangui.platforms.sdl.sdlapp

+ This module contains implementation of SDL2 based backend for dlang library. -

- -

Synopsis:
import dlangui.platforms.sdl.sdlapp;
@@ -24,6 +46,13 @@ Boost License 1.0
 Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/signals.html b/signals.html index ae2118b8..8ce3051e 100644 --- a/signals.html +++ b/signals.html @@ -1,14 +1,38 @@ - - - dlangui.core.signals - -

dlangui.core.signals

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.core.signals + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.core.signals

+ This module contains definition of signals / listeners.

- Similar to std.signals.

@@ -231,6 +255,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/stdaction.html b/stdaction.html index af74b21b..88a4c4ac 100644 --- a/stdaction.html +++ b/stdaction.html @@ -1,13 +1,37 @@ - - - dlangui.core.stdaction - -

dlangui.core.stdaction

- -DLANGUI library. -

-Definition of standard actions commonly used in dialogs and controls. + + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.core.stdaction + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+
+
+

dlangui.core.stdaction

+ +Definition of standard actions commonly used in dialogs and controls.

Synopsis:
import dlangui.core.stdaction;
@@ -28,6 +52,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/styles.html b/styles.html index 76fef520..b6fdfce8 100644 --- a/styles.html +++ b/styles.html @@ -1,14 +1,38 @@ - - - dlangui.widgets.styles - -

dlangui.widgets.styles

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.styles + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.styles

+ This module contains declaration of themes and styles implementation.

- Style - style container Theme - parent for all styles

@@ -471,6 +495,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/tabs.html b/tabs.html index 06d11d65..262ed6b1 100644 --- a/tabs.html +++ b/tabs.html @@ -1,14 +1,38 @@ - - - dlangui.widgets.tabs - -

dlangui.widgets.tabs

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.tabs + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.tabs

+ This module contains declaration of tabbed view controls.

- TabItemWidget - single tab header in tab control TabWidget TabHost @@ -230,6 +254,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/types.html b/types.html index e0038109..97f3dbc1 100644 --- a/types.html +++ b/types.html @@ -1,13 +1,37 @@ - - - dlangui.core.types - -

dlangui.core.types

- -DLANGUI library. -

-This module declares basic data types for usage in dlangui library. + + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.core.types + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+
+
+

dlangui.core.types

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

Synopsis:
import dlangui.core.types;
@@ -142,6 +166,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ + diff --git a/widget.html b/widget.html index ad689965..2dcc6971 100644 --- a/widget.html +++ b/widget.html @@ -1,14 +1,38 @@ - - - dlangui.widgets.widget - -

dlangui.widgets.widget

- -DLANGUI library. -

+ + + + + + + + + + + DlangUI - cross platform GUI library for D programming language - dlangui.widgets.widget + + +
+
+
+

DlangUI

+

Cross Platform GUI for D programming language

+
+
+ Home + API Docs + Download .zip + Download .tar.gz + View on GitHub +
+ +
+
+

dlangui.widgets.widget

+ This module contains declaration of Widget class - base class for all widgets.

- Widgets are styleable. Use styleId property to set style to use from current Theme.

@@ -206,6 +230,13 @@ Vadim Lopatin, coolreader.org@gmail.com

-
Page generated by Ddoc. Vadim Lopatin, 2014 - - +
+ + +
+
+ +