digitalmars.D.learn - How do you use D to launch/open a window?
- anonymousuer (2/2) Apr 22 2016 What code is needed to tell D to open a window? Thank you in
- ciechowoj (2/4) Apr 22 2016 Could you specify what kind of window do you need?
- anonymousuer (4/8) Apr 22 2016 As in a regular Windows window, for example when you open up IE
- rikki cattermole (7/14) Apr 22 2016 So a GUI window?
- Mike Parker (12/21) Apr 22 2016 The short answer: the same way you do it in C or C++. You just
- Jacob Carlborg (5/7) Apr 23 2016 Technically DWT is not bindings to SWT. It's the full source completely
- thedeemon (12/14) Apr 23 2016 import dlangui;
- Kagamin (1/1) Apr 23 2016 http://wiki.dlang.org/Libraries_and_Frameworks#GUI_Libraries
- Satoshi (7/9) Apr 24 2016 You can choose between existing libraries or wrappers for GUI
What code is needed to tell D to open a window? Thank you in advance.
Apr 22 2016
On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:What code is needed to tell D to open a window? Thank you in advance.Could you specify what kind of window do you need?
Apr 22 2016
On Friday, 22 April 2016 at 21:26:25 UTC, ciechowoj wrote:On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:As in a regular Windows window, for example when you open up IE or a program. The container of the program itself, non-command-line.What code is needed to tell D to open a window? Thank you in advance.Could you specify what kind of window do you need?
Apr 22 2016
On 23/04/2016 9:29 AM, anonymousuer wrote:On Friday, 22 April 2016 at 21:26:25 UTC, ciechowoj wrote:So a GUI window? If so I am working on a library for that for Phobos. Only problem is, its a long way off. Although Windows support is more or less done. https://github.com/rikkimax/alphaPhobos/tree/master/source/std/experimental/ui/window Otherwise you're stuck with c libraries such as SDL.On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:As in a regular Windows window, for example when you open up IE or a program. The container of the program itself, non-command-line.What code is needed to tell D to open a window? Thank you in advance.Could you specify what kind of window do you need?
Apr 22 2016
On Friday, 22 April 2016 at 21:29:29 UTC, anonymousuer wrote:On Friday, 22 April 2016 at 21:26:25 UTC, ciechowoj wrote:The short answer: the same way you do it in C or C++. You just need to use bindings to the C or C++ libraries out there. D can interface directly with the Win32 API and the bindings for it are in DRuntime (the core.sys.windows as Rikki suggested). If all you need is to develop on Windows, that's a safe option. If you need a complete, cross-platform GUI toolkit, there are D bindings for Gtk (GtkD) and SWT (DWT). If you don't need all the bells and whistles like tabs, menus, editor panes and the like, then you can use SDL or GLFW (see DerelictSDL2 and DerelictGLFW3 for bindings), which are oriented toward games and, in GLFW's case, OpenGL.On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:As in a regular Windows window, for example when you open up IE or a program. The container of the program itself, non-command-line.What code is needed to tell D to open a window? Thank you in advance.Could you specify what kind of window do you need?
Apr 22 2016
On 2016-04-23 08:53, Mike Parker wrote:If you need a complete, cross-platform GUI toolkit, there are D bindings for Gtk (GtkD) and SWT (DWT).Technically DWT is not bindings to SWT. It's the full source completely translated to D. -- /Jacob Carlborg
Apr 23 2016
On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:What code is needed to tell D to open a window? Thank you in advance.import dlangui; mixin APP_ENTRY_POINT; extern (C) int UIAppMain(string[] args) { Window window = Platform.instance.createWindow("Window caption", null); window.mainWidget = parseML(q{ TextWidget {text: "hi!"} }); window.show(); return Platform.instance.enterMessageLoop(); }
Apr 23 2016
http://wiki.dlang.org/Libraries_and_Frameworks#GUI_Libraries
Apr 23 2016
On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:What code is needed to tell D to open a window? Thank you in advance.You can choose between existing libraries or wrappers for GUI implementation like: DlangUI, Qt, ..., (or my new GUI framework called Rikarin what will be avaiable soon). If you want just create window for e.g. OpenGL context you can use WinAPI CreateWindow or wrappers like SDL or GLFW
Apr 24 2016