View mode: basic / threaded / horizontal-split · Log in · Help
November 28, 2006
minwin
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
November 28, 2006
Re: minwin
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
November 28, 2006
Re: minwin
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]
November 28, 2006
Re: minwin
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

To whom it may concern:

MinWin is now installable via DSSS.

$ dsss net install minwin

It's another great example of how to use pkg-config to generate link 
pragmas, as well.

Enjoy.

 - Gregor Richards
November 28, 2006
Re: minwin
Tomas Lindquist Olsen wrote:

> 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...

With a few changes, it also built on Motif/GDC:
http://www.algonet.se/~afb/d/minwin-motif.patch

As usual I had no luck in getting bu[il]d to run,
so I ended up just running the commands directly...
Didn't have any Imlib either, so I versioned it out.
But besides that, it is looking as "lovely" as ever:
http://www.algonet.se/~afb/d/minwin-motif.png

There was a minor minwin Carbon port started earlier,
but it got halted - in favor of just using wxWidgets.
But if someone did a new OpenGL peer for minwin, then
Mac OS X could use that instead of X11.app and Motif.

--anders
November 28, 2006
Re: minwin
Tomas Lindquist Olsen wrote:
> 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
>>>
[snip]
>> 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. 

Well, the bulk of the code in this "dialogs" library would be identical 
to the dialog handling code in MinWin.  I only had to add 3 lines of 
code to MinWin to make the dialogs work stand-alone (for Windows 
version).  That code was:

    version(NOMAIN) {}
    else {
       [existing winmain code here...]
    }

(is there a way to do version(!NOMAIN)?)
I could see maybe breaking the dialogs part of MinWin into a separate 
sub-library, but I definitely don't see any reason why it should be a 
separate project.

> 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.

Part of the smallness is probably due to wrapping native widgets, and 
just not having all that much functionality to begin with.

> 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!

Well that's a good reason to put it on DSource.  It puts it in a much 
more neutral ground that one individual's personal web site, and makes 
transitioning of project lead and sharing of responsibilities easier. 
Also Trac is pretty sweet.

> (I use Ultimate++ in C++ which btw is AWESOME!!!, even if the author 
> luzr doesn't seem to like D) :P

Looks interesting.  Thanks for the link.  The one thing I was most 
curious about was whether it uses emulation or wrapping of native 
widgets.  But I can't find that mentioned anywhere.  All the screen 
shots seem to show a winXP kind of look and some clearly non-native 
widgets (like the color picker), so I'm thinking it's emulated with 
winXP look everywhere?  Is it themeable?

Whoa, though, that QTF is crazy!
http://www.ultimatepp.org/srcdoc$RichText$QTF$en-us.html
"WTF" is more what comes to mind... it seems so out of place in a 
toolkit that puts a priority on simplicity and clarity.

They should make T-Shirts:
  Got "{{1:2 A1::l40/60R6@3 A2::! B1:: B2}}"?

> 
> 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.

Ok, why don't you go ahead and ask "admin AT dsource DOT org" for a 
WinMin page?

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

Well, D is yet young.  These things take time.

--bb
November 28, 2006
Re: minwin
Bill Baxter wrote:

>     version(NOMAIN) {}
>     else {
>        [existing winmain code here...]
>     }
> 
> (is there a way to do version(!NOMAIN)?)

A patch to do so has been rejected several times,
it's apparently "against the spirit" of version...
(it is supposed to be "positive" and not negative,
see Walter's earlier newsgroup posts* on the topic)

So your code above is the canonical D way to do it.

--anders

* e.g. digitalmars.D/37778, digitalmars.D/11995
November 28, 2006
Re: minwin
Bill Baxter wrote:
> 
> Ok, why don't you go ahead and ask "admin AT dsource DOT org" for a 
> WinMin page?
> 

I have posted in the potential projects forum at dsource.

http://dsource.org/forums/viewtopic.php?t=2081
November 28, 2006
Re: minwin
Anders F Björklund wrote:
>> (is there a way to do version(!NOMAIN)?)

"Not no-how, not no-way!" -- the Cowardly Lion


> A patch to do so has been rejected several times,
> it's apparently "against the spirit" of version...
> (it is supposed to be "positive" and not negative,
> see Walter's earlier newsgroup posts* on the topic)

"Sir, you are employing a double negative." -- Mr. Spock
November 28, 2006
Re: minwin
Walter Bright wrote:

> "Sir, you are employing a double negative." -- Mr. Spock

"Nobody helps nobody but himself." --Oxmyx

So are you saying that we should *not* write
"version(whatever) {} else" for D's #ifndef ?

--anders
« First   ‹ Prev
1 2 3 4 5
Top | Discussion index | About this forum | D home