Chinaunix首页 | 论坛 | 博客
  • 博客访问: 8322536
  • 博文数量: 1413
  • 博客积分: 11128
  • 博客等级: 上将
  • 技术积分: 14685
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-13 10:03
个人简介

follow my heart...

文章分类

全部博文(1413)

文章存档

2013年(1)

2012年(5)

2011年(45)

2010年(176)

2009年(148)

2008年(190)

2007年(293)

2006年(555)

分类: C/C++

2006-08-25 11:55:28

SmartWin++是纯粹的c++ Gui库。
支持操作系统:windows,wince,linux暂时不支持
支持编译环境:visual c++,dev cpp
使用技术:标准c++,boost++,win32 api
限制:不支持activeX/COM/.NET,仅仅是一个图形库而已
特点:类型安全,没有扩展编译信息,使用c++而不是c,轻量级的,基于模板的,可维护的,现代的,静态链接,简单易学,支持winCe,自由而且免费
SmartWin的设计是为了做为MFC的替代品而出现的.

[下转]
SmartWin++ is a 100% free C++ GUI library for developing Windows applications, it's free both as in "free beer" and as in "free speech", you can freely use SmartWin++ for commercial applications and for Open Source applications thanx to its BSD license!
SmartWin++ was initially made to replace MFC and WTL but today thanx to WineLib it can also be used on non-Windows systems. SmartWin++ is a modern designed C++ library, it uses STL where possible and boost where needed, but if you download SmartWin++ you don't need to bother downloading boost, everything you need is bundled in the download except for the C++ compiler.
Good compilers can be found for free either at Microsoft (Visual C++ 2003 Toolkit) or at Bloodsheds (Dev-C++).
If you're using Dev-C++ everything you need is bundled with the compiler as long as you download the version bundled with MingW/gcc 3.4.2, if you want to use the VC Toolkit you need to also download the Windows Server 2003 SP1 Platform SDK.
If you're downloading Dev-C++ you also get a free IDE and you'll probably easier manage to configure everything then by doing everything "by hand" with the VC++ Toolkit. If you're determined to still use the VC++ Toolkit you might want to have a look at Eclipse which is a free IDE which can be configured to use the VC++ Toolkit, though here you're on your own...
Of course if you're owning a copy of the fully Visual Studio C++ 7.1 you're home free and get to use the full IDE!
Last but not least I'd like to especially put forth Sally - A Simple C++ IDE which is an IDE especially made to support e.g. SmartWin++, Sally is a truly impressive IDE and gives you among other things true WYSIWYG and RAD capabillities for your SmartWin++ projects!
Though Sally is still in its early Beta stages it's definitely worth a check!
SmartWin++ officially supports these compilers:

* Microsoft Visual C++ 2003
* Microsoft Visual C++ 2005
* MinGW/gcc 3.4

We're also working heavily on Wine support at the moment and have actually made it really far in this area. Take a look here if you'd like to see how this work is going! Some of these compilers can also build applications for other platforms like for instance Visual C++ 2005 which can build Windows CE/Pocket PC/Smart Phone/Windows Mobile applications etc. We fully support building Windows Mobile and Pocket PC applications on VC++ 2005, and probably it will work building Smart Phone and Windows CE based applications utilizing SmartWin!

It will probably work with any newer versions of both VC++ and gcc, though since SmartWin++ uses some rather advanced C++ concepts it stresses the compiler to the edge of the C++ standard, this excludes older non-conforming compilers like for instance Codewarrior and Borland.
If you want to have more background information about SmartWin++ I suggest you browse around this website and especially look at our wiki since that's where you'll find the most information about SmartWin++.

Happy SmartWinning!

Why yet another GUI library?
There exists virtually hundreds of GUI libraries! Some are portable; others are not. Some are small; others try to perform every task from creating Widgets (GUI elements) to doing HTTP and even walking your dog!
SmartWin++ is mostly not portable, you can use it to create applications for Windows 95/95/ME, Windows NT/2000/XP/2003 and Windows CE but no native *Nix support exists. You may use WineLib in combination with SmartWin++ and have success, but for now this is an unsupported platform.

Type-safety
So what does SmartWin++ bring to the table that other GUI libraries don't already have? First of all type-safety! Type-safety, type-safety and yet again a little bit of type-safety! In C++ one of your biggest "features" is that you can pass an object of type "bird" into a function and rest assured that your compiler is gonna throw up if your function tries to treat that object as a "submarine".
This is a FEATURE!
A very GOOD feature too!!
While other libraries may not be as restrictive, SmartWin++ will NOT let you pass an object of type X and let you treat it as if it was of type Y instead! You might be surprised how many libraries have bad type-safety support. For instance, try this in your MFC library:
CToolbar x;
delete x;
CString y;
delete y;
It actually compiles!! ;)
SmartWin++ has few implicit conversions, uses explicit constructors where single argument constructors exist and few macros! This makes SmartWin++ type-safe!

No extra "special compilers"
SmartWin++ doesn't contains any "magical extra compilers", if it isn't in the C++ language it isn't in SmartWin++! While many other GUI libraries depend on special "extra" compilers to parse "special syntax files" or "special compiler directives" SmartWin++ uses 100% C++, nothing more and nothing less! This means the code can be read without having to learn a new "extra" language or some "special compiler directives" etc. This makes reading and debugging the code much easier!

C++ and NOT C
SmartWin++ uses C++ in as many places as it can! If some class exists in the standard or some construct exists in the language SmartWin++ uses this construct! SmartWin++ does NOT make ANY compromises towards letting your "favorite 15 years old compiler" compile its code! It uses std::string, std::vector and templates instead of macros where possible! This means that, except for GCC 3.4.x and later and VC++7.1 and later, it's difficult to compile SmartWin++ applications today! We believe that STL and Boost are good tools and should be used in favor of creating your own bug-prone classes to substitute them! If it exists in Boost or in STL it does NOT exist in SmartWin++!! :)

Light-Weight
SmartWin++ does NOT try to solve your marriage problems. It cares only about GUI. If you need a network library, search elsewhere. SmartWin++ will not solve your TCP/IP problems or your HTTP problems or your Dijkstra's Extra problems! SmartWin++ is about GUI, nothing more, nothing less! We try to be the best in ONE area which is GUI development! This makes the library small, slick, fast and good looking! ;)

Template-Based
SmartWin++ is almost 100% template-based! This means it will not compile anything you don't use! If you don't use a WidgetDateTimePicker you will not pollute your executable with that specific class! This makes your final executable application small and light-weight!

Maintainable
SmartWin++ has extremely nice looking code, though pretty advanced since it utilizes some serious meta programming constructs like Policy Based Design and template-template arguments etc. There's twice as many lines of comment in the library as actual code! This means that we, the library developers, may easily add features and fix bugs. You as a user of SmartWin++ will gain by faster releases and faster development pace in the library! In fact the code is almost religious towards OAOO (Once And Once Only) to such an extent I doubt you'll be able to count more then 25 000 lines of code where 3 quarters are formatting and comments! Pretty impressive for a library with more then 30 Widget types and more than 100 functions on average for each Widget type!!

Modern Design
SmartWin++ is designed by the lessons learned from Andrew Koenig, Scott Meyers, Andrei Alexandrescu and the rest of the people behind the C++ In Depth Series books! It uses few macros, STL, Boost, Policy-Based Design and templates where possible and adequate!

Static Linking
There is no huge DLL to distribute if you choose to use SmartWin++! SmartWin++ uses static linking which makes it fast and free of "DLL Hell" (google for "DLL hell" if you're in doubt) Though if you want to you could create a DLL of the library and link dynamically but we advise you NOT to since it's a bad practice!

Easy to Learn
SmartWin++ is extremely easy to learn. All Widgets are automatically "collected" when they are destroyed and you don't have to explicitly delete your Widget pointers! In fact you CAN'T delete your Widget pointers since all destructors are protected! ;) In addition there are tons of helper constructs to ease the initial learning curve behind SmartWin++ in addition to tons of sample applications and documentation and tutorials for newbies!

Windows CE
SmartWin++ can build Windows CE applications! There exists not many GUI libraries today which can actually successfully build Windows CE applications. Maybe two or three other mature GUI libraries have true Windows CE capabillities today! SmartWin++ can compile the same code on Windows CE or Pocket PC as it compiles for your desktop system as long as you follow some few guidelines!
(Read the Wiki)

SmartWin++ is FREE
Free as in "Free Speech" and Free as in "Free Beer"!
Nothing more, nothing less!
SmartWin++ uses the least restrictive Open Source license which exists (BSD License) which basically means; "Do as you please"!
Most other GUI libraries either are GPL licensed, cost you big money or have some obscure license which makes it unusable for development of commercial "closed source" applications!
SmartWin++ license basically more or less says; "Do as you please"! :)

These are SOME of the features and qualities SmartWin++ brings to the table. You can see that SmartWin++ has proven its right to live and be your first choice when considering your next Windows Desktop- or CE-based application!

Happy SmartWinning! :)


SmartWin.lib is a static C++ GUI class library, but most of its classes are defined in headers for small-as-possible executables.
A Hello World executable with buttons and check boxes takes 155 KB. No additional DLLS to distribute !
In addition SmartWin++ also contains another library called SmartSOAP that helps you with SOAP, XML and Networking. This is an "addon" to SmartWin and is not in the "core" of the library and experimental technology for the moment but will be included in the core of the library during an upcoming release. Though don't expect everything in SmartSOAP to look exactly like it does in the current release in upcoming releases. SmartSOAP and SmartWin++ is not in any ways dependant upon eachother and both can be used separately without using the other. This means you can use SmartSOAP e.g. in an MFC application or you can use e.g. gSOAP in a SmartWin++ application and so on.

Technologies used
Standard 1998 C++ (STL and templates)
Boost++
Win32 API (Common controls)
Target operating systems
Windows
Windows CE
Linux (via the Winelib library) might arrive later.
Tested Compilers:
Microsoft Visual C++ 7.1 (2003), its Toolkit, and Microsoft Studio C++ 2005 Express (Beta)
GCC 3.4 / MinGW or later (see Bloodshed Dev++ or Eclipse for an IDE using MinGW)
Characteristics:
Free for open source and commercial use.
Links with a small static library.
Can use Visual Studio's resources or can do without them.
Presents the common controls as high level C++ classes.
Events trigger response functions in your C++ classes.
Response functions are set at runtime via widget functions. (No message map macros.)
Most functions use parameters from the STL such as vector< tstring >
tstring is just std::basic_string<_TCHAR>. In other words, it is string compiled either for Unicode or Ascii.
Limitations:
No support for ActiveX / COM / .NET
Scope is only the GUI functions

阅读(4465) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~