minwin
Bill Baxter
dnewsgroup at billbaxter.com
Mon Nov 27 23:02:10 PST 2006
Tomas Lindquist Olsen wrote:
> Hi folks.
> Just want to tell people that I have uploaded a zip with a MinWin that
> builds on DMD 0.175.
>
> Check it at:
> http://wiki.dprogramming.com/MinWin/HomePage
>
> it only really took fixing the private/public import changes but it was
> boring and I figure someone else might like to avoid it...
>
> - lindquist
That's pretty nice. Like wxWidgets-lite in D.
I see there's some talk on the forum about putting this into SVN
somewhere. Why not DSource?
Also, I can't get the sample.exe to do anything. All the other samples
work fine, though. It seems if I comment out the 'new Button' lines it
works.
--
I'll just put in a plug for what I'd like to see in such a library: it
should be possible to use the standard dialogs (like message box, file
dialog, etc) without having to buy into the rest of the app framework
stuff.
Right now it seems it's not possible in MinWin because it insists on you
using its MinWinMain. However, I tried adding a simple
'version(NOMAIN)' in the Windows part of app.d, to enable opting out of
that. Then this no-gui program is able to open dialogs using MinWin's
wrappers:
----------------
import minwin.dialog;
import minwin.window;
import std.string;
import std.stdio;
class NullWin : AbstractWindow
{
WindowPeer peer = null;
}
void main()
{
scope win = new NullWin;
FileDialogData data;
data.title = "Open File";
if (openFileDialog(win,data)) {
char[] text = "you selected " ~ data.result;
informationDialog(win, "Hello, world!\n"~text, "Greeting");
}
}
----------------
This would be nice because it would, for instance, give OpenGL GUIs
(like say Luigi[1] ;-)) an easy way to invoke native dialogs without
having to switch whole hog from a simple GL-oriented toolkit like GLD or
SDL to something else less GL-friendly.
[1] http://www.dsource.com/projects/luigi
--bb
More information about the Digitalmars-d-announce
mailing list