minwin

Tomas Lindquist Olsen tomas at famolsen.dk
Mon Nov 27 23:42:09 PST 2006


Bill Baxter wrote:
> 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

It's an interesting use case, though I can't help think a seperate 
"dialogs" library would be better for this. Also currently MinWin does 
not even have a simple yes/no dialog (though it's pretty easy to add).

[rant]

For me MinWin seems very much like a winner as it is one of the only D 
gui libraries that work crossplatform and it doesn't try to do too much. 
  executables are pretty small compared to what you get from Harmonia as 
an example.
The posts I've done on the DSource forums would certainly suggest having 
a svn repository there. I'm not sure I'm the right guy for maintaining 
it though. I dont know GTK+ or Motif and only some fairly basic Win32, 
but I have a genuine interest in a crossplatform gui library that is 
easy to work with!
(I use Ultimate++ in C++ which btw is AWESOME!!!, even if the author 
luzr doesn't seem to like D) :P

What I'd really like to see for MinWin is active development. From 
looking at the todo list it seems quite a lot was still planned and 
there are known bugs as well.

D seems such a perfect language to do gui applications. It's really a 
shame the toolkits don't step up to it.

[/rant]



More information about the Digitalmars-d-announce mailing list