Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: C# port of GWEN - a GUI library  (Read 12065 times)

0 Members and 1 Guest are viewing this topic.

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
C# port of GWEN - a GUI library
« on: August 06, 2011, 01:07:45 pm »
Hello, first time poster here.
I'm using SFML.NET for my project and I was really annoyed by lack of any decent GUI library for this environment. By chance I've discovered GWEN. It's a lightweight library with rich collection of controls, supports skinning and all the good stuff. There is one problem though (for me): it's written in C++. Interfacing C++ with C# is tricky at best, so I've decided to just rewrite the thing. It's going pretty well, I've got most of the framework and a few simple controls working:



I'll post updates on the GWEN forums and probably here (and of course on my blog ;))

PS. I've modified two input classes in SFML.NET (KeyEventArgs and MouseButtonEventArgs) to include bool field indicating if the key/button is depressed. That field seems present in original SFML but was removed in .NET, would be nice to have it back. :)

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
C# port of GWEN - a GUI library
« Reply #1 on: August 08, 2011, 10:39:10 pm »
I've created a Google Code project: http://code.google.com/p/gwen-dotnet/
I'll be adding more controls in the coming days. The API will most likely be refactored once more stuff is implemented.

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
C# port of GWEN - a GUI library
« Reply #2 on: August 13, 2011, 04:11:50 pm »
Latest test snapshot:


omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
C# port of GWEN - a GUI library
« Reply #3 on: September 08, 2011, 07:53:38 pm »
Project is nearing completion. Only a few controls are missing: trees, properties and RichLabel. There are a few bugs but nothing too serious.





http://omeg.pl/blog/2011/09/gwen-net-almost-there/

zombiekiller222

  • Guest
C# port of GWEN - a GUI library
« Reply #4 on: September 09, 2011, 11:41:16 am »
Pretty nice. :D.

Are the controls os specific?

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
C# port of GWEN - a GUI library
« Reply #5 on: September 09, 2011, 11:50:16 am »
Quote from: "zombiekiller222"
Pretty nice. :D.

Are the controls os specific?

No. It's platform agnostic. If you can run Mono there it should work. ;)

scorch

  • Newbie
  • *
  • Posts: 17
    • View Profile
C# port of GWEN - a GUI library
« Reply #6 on: September 17, 2011, 06:10:56 pm »
I saw the samples and they look awsome. They still have a few bugs, but you have made a great work. Congrats.  :D

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
C# port of GWEN - a GUI library
« Reply #7 on: September 19, 2011, 07:51:45 pm »
All GWEN controls are now implemented. I've also added XML comments to most public symbols (when I knew what are they for anyway). I'll focus on fixing bugs and enhancing usability next. That also most likely involves changing event system to use control-specific event args instead of one generic callback.

zombiekiller222

  • Guest
C# port of GWEN - a GUI library
« Reply #8 on: September 20, 2011, 02:46:55 am »
Quote from: "omeg"
Quote from: "zombiekiller222"
Pretty nice. :D.

Are the controls os specific?

No. It's platform agnostic. If you can run Mono there it should work. ;)


But will it look APPLEISH on an mac?

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
C# port of GWEN - a GUI library
« Reply #9 on: September 20, 2011, 09:20:24 am »
Quote from: "zombiekiller222"
Quote from: "omeg"
Quote from: "zombiekiller222"
Pretty nice. :D.

Are the controls os specific?

No. It's platform agnostic. If you can run Mono there it should work. ;)


But will it look APPLEISH on an mac?

No - all the controls are custom drawn, look depends on what skin do you use.

carsaxy

  • Newbie
  • *
  • Posts: 11
    • View Profile
error compiling GWEN workspace
« Reply #10 on: December 03, 2011, 02:58:36 pm »
Hi All!
This library looks great, but I have some problems trying to compile it with Code::Blocks on Windows.

First of all, it tells me "error: 'Gwen::Utility' was not declared" when you try to compile the file "Gwen\Controls\Base.h" but adding "#include "Gwen/Utility.h" " seems to be fixed.

However, it finds another error in the file "src\Utility.cpp":

Quote
error: invalid conversion from 'unsigned int' to 'const wchar_t*'
error: cannot convert 'const wchar_t*' to 'char*' for argument '3' to 'int vswprintf(wchar_t*, const wchar_t*, char*)'

in the declaration of the function

Code: [Select]
UnicodeString Gwen::Utility::Format( const wchar_t* fmt, ... )
{
wchar_t strOut[ 4096 ];

va_list s;
va_start( s, fmt );
vswprintf( strOut, sizeof(strOut), fmt, s );
va_end(s);

UnicodeString str = strOut;
return str;
}


but to me the code seems right...

Am I compiling the wrong way? Is the problem only mine? How can I fix it?

Thanks!