Dprogramming.com - The D Programming Language
Please
Donate
Directory

Home
News
Wiki
D Lists
Entice Designer
DCode editor
Linkdef
bintod
Tutorial
D FAQ
Code
    bintod
    DFL GUI
    D irclib IRC
    fileprompt
    ini files
    Linkdef
    list linked list
    mtext
    Splat sockets
    trayicon
    wildcard
Contact
Donate
Paste
Links

DFL 0.9.7.01

DFL, the D Forms Library, is an easy to use user interface toolkit for the D programming language. It brings you a high level, easy to use interface, abstracted from the native API.

"Thanks for allowing me to be in the world of Windows. I hated Windows programming until DFL." -- User

"DFL is very easy to use once you see how it works. It's even similar to Windows Forms of .NET. So I think of D+DFL as a good alternative to C#+.NET. Also, DFL has Entice Designer which makes it even easier." -- User

With DFL you can:

  • Create and manage your GUI application with a simple, object-oriented interface.
  • Attach event handlers to many objects, such as controls, forms, and menus, for practically any event.
  • Dock controls on the parent form, so resize code isn't needed.
  • Use sockets that do not block the GUI thread.
  • Much more!

What's New

New: DFL Tutorial

DFL released after a very long duration of snapshot-only updates. During this time there has been a lot of changes in DFL and a code review has been completed to ensure consistency, dead code removal, and overall fixing of bugs along the way. I hope future releases won't take so much time in snapshot testing.

DFL now works with the Tango library! See the DFL Tango page for more information.
Either Phobos (std) or Tango can be used as you prefer.

Entice Designer also released; a new version of the GUI builder.

Now I'll finally announce the DFL chat room; there's an IRC channel dedicated to DFL over on freenode. Feel free to drop by #DFL
The DFL IRC client example has been updated to join #DFL so an easy way to reach the channel is by simply downloading DFL-IRC.
Please note that you need to be patient when using IRC. Although it is a real-time chat environment, we are not always able to answer immediately.

As before, there's always new conversations happening over in the DFL forum.

Download DFL 0.9.7.01 installer
or DFL 0.9.7.01 zip archive
Tested with DMD 1.028
Tested with Phobos and Tango 0.99.5

Please donate to support the development of Entice Designer and DFL.

Be sure to read the DFL tutorial for setup and usage instructions. The included examples are a good starting point.

The download includes:

  • The DFL library that can be used with closed source and commercial applications.
  • dfl.exe tool that should simplify compiling DFL projects.
  • Source code for DFL and many examples.

Should work on Microsoft Windows 95 and above. However, on Windows 95, some features require an up to date version of Internet Explorer to be installed. There are functions to call to test for these features.

New DFL Users

New to DFL? Need to get started? First, check out the DFL tutorial, which also includes setup and usage instructions.
The installer will give you start menu shortcuts, one of which takes you to the Examples Folder. The provided DFL examples show how to use a lot of the features, as they are used to test the library between releases.
The online documentation can be used to find the available members. The documentation is far from complete, but can be edited by those who wish to contribute.

Entice Designer, a Form Designer for DFL, is also helpful to newcomers because the properties are easily accessible in a convenient list including descriptions. Entice also has a tutorial available.

Also new to the D language? Check out the "New D Users" section on the dprogramming.com home page.

Example Code

Classic hello world example:
import dfl.all;

int main()
{
   Form myForm;
   Label myLabel;
   
   myForm = new Form;
   myForm.text = "DFL Example";
   
   myLabel = new Label;
   myLabel.font = new Font("Verdana", 14f);
   myLabel.text = "Hello, DFL World!";
   myLabel.location = Point(15, 15);
   myLabel.autoSize = true;
   myLabel.parent = myForm;
   
   Application.run(myForm);
   
   return 0;
}
Hello, DFL World!

There are many more examples in the DFL download. More screenshots are here.

FAQ

Q. What changed since the last version of DFL? / How do I ensure my code is still compatible with DFL?
A. See the changelog for a list of library changes.
Q. Is there a tutorial?
A. Yes, there is a DFL Tutorial.
Q. Does DFL work with the Tango library?
A. DFL does support the Tango library now! See the DFL Tango page for more information.
Either Phobos (std) or Tango can be used as you prefer.
Q. Is Unicode supported?
A. Yes! On Windows NT/2000/XP/2003/Vista, Unicode is fully supported; on Windows 95/98/ME, DFL translates to and from ANSI as necessary to support Unicode (much like MSLU and Phobos).
The Unicode translation appropriate for the Windows version is automatic and both Windows types are supported simultaneously. To override this, such as to build an exe for only NT+, versions can be set.
Q. Will there be a linux version?
A. Porting has begun! (Posted May 2007)
Q. I've added an event handler using the delegate keyword or a nested function and I'm getting access violations. Why is this?
A. Delegate literals and nested functions only work if you're sure the event won't be fired after the function it's in returns. Use a non-static member function:
class MyForm: Form
{
   this()
   {
      click ~= &form_click;   // Add click event handler.
   }
   
   private void form_click(Object sender, EventArgs ea)
   {
      // Handle event here.
   }
}
Q. How do I safely load regular text files or other 8-bit text into a DFL control?
A. Because DFL (and most of D) expects clean UTF-8, this can be a problem when working with external text. This is covered on the load 8-bit text page.
Q. Where can I find more example code and screenshots?
A. There is a lot of example code in the DFL download, also see ExampleCode and DFL tutorials.
Find more screenshots here.

More

DFL forum hosted by dsource.org!

Check out the new Entice Designer project! A GUI Builder for DFL.

DFL Wiki.

The start of new documentation is available here. It doesn't explain much yet, but it's often easier than going through the code, and you're welcome to add directly to it.

Contact

Please report bugs and comments to the forum or the contact form. You can make requests and I'll see what I can do to get them in the next release.

See the snapshots for changes in the next DFL release.

Previous DFL versions:

Copyright © 2004-2008 Christopher E. Miller