lightweight html control for desktop apps (C++/Windows) [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am currently using RichText control in my program. It creates several instances of RichText control (hundreds) because it’s a sticky notes program.
I wish to replace it with a lightweight HTML control which will have functionality similar to RichText control (text formatting, bullets, links, images etc)
Do you know if any free/commercial lightweight HTML control that I can use in my C++/MFC program?
Thanks.

There is the free HTMLayout engine by Terra Informatica: http://www.terrainformatica.com/htmlayout/main.whtm
It's mostly used as a skinning engine for applications, but there might be an editing mode, too, since they built a WYSIWYG editor with their own library.

Since you're on Windows, is there any reason you don't want to use the MSHTML control? It's available in MFC through CHtmlView. Since it is used by so much of the other parts of the O/S, the DLLs are likely already loaded, so instantiating it is going to be pretty quick.
We use it in our projects and it has a comprehensive COM API (IWebBrowser) with events feedback too.
I don't know the per-instance memory/CPU cost, so you may need to take some measurements.
There's always WebKit, as used by Apple Safari, Google Chrome and lots of others.

I hesitate suggesting this because it's essentially a whole framework for one component, but wxWidgets has a very simple and lightweight implementation, wxHTML.
The library can be built with as little or as much as you need, so you should be able to build with just wxHTML and whatever dependencies it requires. As far as I know it can be mixed with MFC without consequence. (Although, if you felt like it, rewriting your whole app in wx would make it cross platform.)
I would stress that it's a very basic implementation, so if you need something more robust it might not be the best. wxWebConnect wraps WebKit in wx if you need a full browser, but at that point there's probably a better, more MFC-centric solution.
If you're feeling especially adventurous and don't want any wxWidgets dependencies but like the lightweight wxHTML, you could always dive into the wxWidgets source and extract the windows-specific code for that control.
(I attempted to link to both the wxWidgets site and wxWebConnect for your reference, but it appears I can only add one link to my post. Google them if you like.)

There's XStandard.

Related

C++ cross-platform framework for mobile app development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Improve this question
I'm planning on developing mobile application for both iOS and Android and I want to use C++ for the development.
Which cross-platform framework is available for building mobile application using the C++ language.
I'm sure a lot of people have this question as well, so read this if you'd really like to know the answer. Marmalade is probably the BEST solution. Code once, deploy to mobile devices, desktops, even some TV's. Many popular games have been created with Marmalade.
Extensive games like:
Lara Croft and the Guardian of Light
Call of Duty: World at War Zombies
But also simple games like:
draw something.
Doodle Jump
They've added a free package. You can create your game for free and if you want to get rid of the ad splash screen, it's $150,- per year for mobile devices or $500,- per year for other devices as well.
A big advantage is the native speed. It doesn't matter what people claim about other languages like javascript or java (and unfortunately Qt, which of course isn't a language but you know what I mean) running as fast as C or C++. It's simply not true. For simple applications this is of course not important, but when you're looking at (simple) games, this is crucial.
At the moment version 7.3 is available, but this version has a problem with the ARM emulator. I would download 7.0.
Whether you choose Marmalade or not, make sure you read the documentation. You don't want to end up missing some functionality and switch to another option when you're almost finished.
I've looked into portable code between Android and iOS before and I don't think it's possible.
To release apps into the Android market it needs to be in Java, and anything with a GUI on iOS needs to use Objective-C.
You might be able to have partial portable C++ layer, but in reality it's probably quicker to write the same app twice in Java and Obj-C than it would be to write it once in C++ as a portable solution.
Qt or Wx-Widgets might have some support, but I have not looked into mobile platforms for these, and I suspect the reality is that Apple, Microsoft and Oracle want you to be tied into their technologies these days and have no incentive to make things portable.
C# and Java provide a complete framework that allows code to be written much quicker using well documented classes and libraries, especially when dealing with user interfaces.
C++ on the other hand relies on many open source projects that take a lot of effort to get functioning on multiple platforms, and much time is spent dealing with subtle platform problems.
My suggestion was simply that it might be easier to pick a language better suited to the platform you are dealing with, as C++ tends to be lower level than other languages, the syntax can seem verbose and many hours can be wasted trying to make things work that you would expect to just work, and unfortunately documentation for many open source projects is poor.
Maybe this can be considered to be an opinion, but then the shift from C++ to C# or Java commercially might also indicate that I'm not the only one believing this.
You can take a look on openFrameworks, maybe it fits on your needs:
http://openframeworks.cc/about/
There ARE solutions for C++ cross-platform development for Android and iPhone, despite what other answers say here.
The best is probably Marmalade, but it's expensive, so only useful for commercially viable apps: https://www.madewithmarmalade.com/
Then there's MoSync, which you can use for free. Unfortunately they went bankrupt last year, so there's no ongoing support. Still, might be worth a look depending on your needs. http://www.mosync.com
OpenFrameworks is one I hadn't seen, so thanks Rodrigo for that answer: http://openframeworks.cc/
There is no cross platform solution using C++, unless you're interested in making games. There are a few options available if you don't mind using another programming language. Take a look at Titanium SDK (Javascript), Xamarin (C#) or the multitude of HTML5/CSS/Javascript frameworks (Phonegap comes to mind).
Look for the DragonFire SDK it allows you to write apps and games in c/c++. Not cross-platform and never used it but looks good. It uses Visual Studio and has its own simulator for iOS development.

Can you recommend a good cross-platform application development framework? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking to tap into the immense wisdom and experience of the Stackoverflow community to help me choose a good cross-platform application development framework.
The target application is a desktop graphics app supporting as many existing desktop environments as reasonable (Linux, BSD, Windows, Mac). Ideally Open Source, but I do not want to limit the choice of framework so if you know of a closed source framework worth mentioning, please let us know.
The ideal framework will provide the developers with as many prefabricated building blocks as possible so that they can focus on adding this app's specific functionality on top of the framework, rather than replicate generic functionality common to many apps.
Requirements:
Target desktop environments (Linux, BSD, Windows, Mac); not mobile
and not server.
Programming language is a given: combination of Python and C++.
The application itself is a graphic app that will require fast
manipulation in 3D space of images and data.
The most important building blocks I am looking for are:
GUI Toolkit. Can be multi-platform or OS-specific, provided that the framework helps me manage OS-specific versions of the app; with a GUI editor that does not scare away the not-so-technically minded graphic designers
3D graphics manipulation (OpenGL)
Efficient manipulation of large data sets (tables with 50K entries)
An efficient build system to manage the different supported operating systems, ideally cross-compiling
Preferences:
Preferably an Open Source Framwork
Preferably primary development platform Linux
Preferably IDE available as well
Although I ask the question in the context of refactoring an application which has hit a ceiling, I kindly ask you to think of this as a green field to make it relevant also to developers looking to jump start the development of a new app.
Thanks
Qt covers just about everything:
is proper open source, with active development and a vibrant community
the portability aspect is covered: goes from embedded to big systems with everything (particular Windows, Mac OS X, Linux) in between; *BSD should not be an issue either,
the GUI aspects,
has good Open GL support
has Python bindings (3rd party though)
countless examples,
very good documentation
and much more
That said, the topic has been addressed a few times before so make sure you peruse the old questions.
Besides QT, WxWidgets is an option. Now that QT has more aggressive licensing model, it may be less important to some. The big technical difference is WxWidgets actually uses the native toolkit on a given platform where QT provides its own. To some, this makes wxWidget apps feel more native; at least on Windows, Mac, Linux/GTK, or Sun/MOTIF platforms.
I've used the C++ side of the library for successful development and it integrates nicely with many different build setups. I have never used wxPython.
http://www.wxWidgets.org

Alternative to MFC [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
https://stackoverflow.com/questions/149698/what-is-a-good-mfc-starting-book
A lot of the upvoted comments claim there are much better alternatives. I'd like to know what they might be.
My main requirement is that the UI use the native widgets so that our automation software can work. Owner drawn windows are much harder to drive.
I'm not particularly liking the design of MFC so an alternative would be good. Only one I've found is WX, which is the one we've already tried and are considering abandoning. We need something that doesn't force us to fight with a bunch of cross-platform wrapping we don't care about. We're writing a Windows application and marketing doesn't give one single crap about targeting Mac or Linux (yeah, it makes my butt hurt too).
I've looked at the .NET option a little bit. Problem is I don't know much about it but from what I can tell we'd have to use C# to get a lot of the options readily available with MFC. The C++/CLI toolkit doesn't seem to have docking windows on first glance for instance. In fact, a straight up WinFroms option doesn't seem to either. It looks like we'd have to make a WPF project and that doesn't appear to be at all what we really want (and we'd have a huge bunch of crap to learn besides just another toolkit). Moving out of C++ would also require a lot of wrapping and I don't particularly like the results I've seen from automated wrappers.
The other issue I have with the .NET option is that we've got a pretty drawing intense application (in addition to requiring a lot of forms). I know that you can get similar results with JIT languages like .NET but I also know you've got to be a lot more careful to do so. It's an issue I'd like to avoid worrying about at this time.
The other, and probably most important issue with .NET (at least switching languages) is that we've got a huge supply of interface logic that though should be API agnostic, is very much written in C++.
So what are the other options? Do these people really have points or are they just yelling against anything that isn't their favorite language or toolkit?
NOTE:
What is the issue here?? I said specifically that porting to other platforms is NOT even remotely a consideration and that I HAVE TO HAVE something that uses the native widget set so we don't have to completely change everything that testing uses to automate the product!!!! Did anyone actually read my question?
Qt is the only real answer for a C++ based gui toolkit at the moment (at least for full desktop apps). Even for purely windows apps it's worth it - it also has excellent integration with visual studio (get the vs-addin) and is very well documented
wx has some nice points, one being it's very similar to MFC in use, but with Qt going LGPL wx's real advantage has been lost.
Edit
Qt widgets aren't native HOWEVER they do use the native styling APIs so that they are indistinguishable from native widgets - if you use the default styles.
Windows forms will work just fine with C++/CLI. Windows forms also happens to be a wrapper around WIN32 handles.
There's no difference in the capabilities of C#/Windows Forms compared to C++/Windows Forms. (They just compile differently) Just like you can do the same things with C# and VB.NET...
If you're looking for docking windows, there are a number of third party libraries that do this. (Some are open source, some you can buy.) Because of the CLR, you can directly include assemblies written in a different language.
MFC wasn't bad in its day but it is getting a bit old. A good example would be the collections which have been replaced wit the much better STL collections. However you were asking about GUI stuff. There's the WTL (Windows Template Library) which I believe has now been open sourced. Much lighter footprint than MFC but it is designed to work the same way - eg. Most of the classes have the same names and method names.
On the downside I've found documentation relative scant and it doesn't seem to work well with the Visual Studio Wizards. This could be my problem though - getting it work with the VS wizards would be quite important IMHO.
I'm in roughly the same position: large app, native code, using MFC for the front-end. I don't see any really compelling alternatives, or reasons to switch to anything else.
That being said, let me offer an opinion. If I were doing a new project, which needed to preserve/inherit a lot of native code, I'd consider trying to do a WPF front-end with a largely native (C++/CLI) main application. This was done with Visual Studio 2010, and it's mostly performant, so it's at least possible. WPF has some UI benefits, and it might be easier to work on and test (from an automation perspective), since it is CLR code. I'm not sure it would be worth the investment and learning curve, but it's the alternative I would consider for a modern pure-Windows application with lots of native code.
Hope that helps.
To offer something I didn't see mentioned in the other answers:
From the sound of it, your only reason for needing native controls is that automation software. And the only reason for needing that automation software to work is for testing. I would assume some series of automated tests are being used to ensure the software works as intended.
If that's the case, then here is something to consider: There is a reasonably popular design pattern in the C#/WPF realm called Model-View-ViewModel. Without getting into excessive detail here, the basic idea is that you can separate the actual GUI controls (the View) from the code that handles how those controls interact with the rest of the business logic in the application. That code is the so-called ViewModel. Among other things, this lends itself to designs where that ViewModel (and all the rest logic of the application) can be tested through typical unit-testing methods without actually needing GUI controls to be present.
So whatever testing the automation software is used for could potentially be replaced by straight unit-testing code.
However, my own experience in this realm is not nearly as extensive as I would like. So if you consider this at all, I strongly suggest further research. As a start, googling terms like "Model-View-ViewModel" and "MVVM" should eventually yield some more detailed discussions about that part.
I've seen Qt used fairly extensively. I personally have not used Qt, but I see a lot of questions about it, far more than wXwidgets or MFC. I'd start with that.

Recommendations for an open-source project to help an experienced developer practice C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for recommendations for open-source projects written in C++ that will help me "get my chops back". A little background:
I've been working heavily in Java for the last three years, doing a lot of back-end development and system design, but with a fair amount of work in the presentation layer stuff, too.
The last C++ projects I worked on were a Visual C++ 6 project (designed to interact with Visual Basic) for mobile devices and several projects using the GNU toolchain circa gcc versions 2.x to 3.2
I'm looking to get back up to speed on the language and learn some of the popular frameworks, specifically the basics of boost (although boost seems fairly sprawling to me, similar to the kitchen-sink feel of Spring in the java space) and test driven development in C++.
What I'm looking for:
Specific recommendations for small to mid-size open source projects to poke through and perhaps contribute to as I level my C++ skills back up. The problem domain isn't important, except that I would like to work on something in a new area to broaden my experience.
Edit:
A few people have commented that it's difficult to provide a recommendation without some indication of the problem domain I'd like to work in. So, I've decided that I'm most interested in graphics applications or games, two areas which I haven't worked in before.
If you like visual stuff, openFrameworks is a C++ Framework for doing Processing-type applications. http://www.openframeworks.cc/ I'm not sure how viable it still is, but it looked pretty cool.
It's hard to suggest something like this, you really don't have any itches you want to scratch??
I would personally be working on Unladen Swallow if I wasn't absurdly busy starting my own personal venture. Dynamic language optimisation looks pretty cool to me.
You could also look at Wt
Why not Boost itself? It's a very active project, it's right at the core of what C++ is about, and it could need some help.
You mentioned test driven development. The Boost Unit Test Framework, for example, is powerful, but IMHO suffers from extremly bad documentation. That'd be a place to start, would teach you everything there is to know about that particular part of Boost, and I am sure you could find your way into one of the Boost modules from there.
I think you're going to have to be more specific. As a quick check, I did an apt-cache showpkg libstdc++6 on my Debian squeeze system, to find all the packages that depend on the C++ library — and found 4,537 of them. Obvious examples include:
most of KDE
Firefox, Thunderbird, etc.
apt-get itself
It'd really help if you specified what field you're interested in.
You can find many projects on GitHub. If you find a nice project, you can fork it (it's like creating a local copy you can work on) and start coding. Once you have done something nice, you can make a "Pull request" to ask the guy you made your fork from to merge your work.
I like being able to commit without having to ask for an access and be able to make smalls contributions to many projects without having to contact anybody, simply with a couple of clicks.
You can also check Gitorious and Bitbucket, both site work a bit like Github.

Is there any 'out-of-the-box' 2D/3D plotting library for C++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I looked at the different options for plotting functions (or other types of graphs) in an interactive window. I mostly use wxWidgets but I'd be open to any other "interfaces".
Looking at what is available, here is what I've found:
wxPlot: Not updated since 2006. But it would be a good candidate if it was...
wxMathPlot: Very new, not mature, few features (still active?)
libgraph: Outdated, not rebust, 2D only and outputs images only.
koolplot: Too basic, no control over the created window.
EasyBMP: Very basic, only images output.
plotutils: Command line only.
plplot: C and C++ API are barely maintained. It is in fact on this that wxPlot is based. Could be a could candidate also if C and C++ interface we're updated.
Any comments? Ideas?
Thanks!
Even though this thread is old but gold. QCustomPlot is very recommendable as well to complement this list.
MathGL have many plot types, C/Fortran interface and basic data analysis
I'm all about ROOT for these needs. Pretty heavy if you don't need all the analysis support, though.
You have Qwt which is mature. There is a 3D version lurking somewhere. However, I have never been satisfied with the aesthetic result.
It may be worth waiting for Qt3D to come out to write something better yourself easily.
I programmatically provide required input files to GNUPlot executable and invoke it using system() function. It is suitable to my situation since I only want to visualize my data during research. But if you want the plotting functionality integrated into your executable file, maybe this is not for you :)
u can use DISLIN
it is quite neat!
Might wxChart be an option? I have not used it myself however and it looks like it hasnt been updated for a while.
Just an idea: Use Python as embeddable scripting language to plot your graphs. Python has a plethora of plotting libraries.
I found the game library Allegro easy to use back in the day. Might be worth a look.
We use an ancient version of ComponentOne Chart.
AntiGrain Geometry (AGG). http://www.antigrain.com/. Its an opensource 2D vector graphics library. Its a standalone library with no additional dependencies. Has good documentation. Python plotting library matplotlib uses AGG as one of backends.
Have a look at wxArt2d it is a complete framework for 2d editing and plotting. See the screenshots for more examples.
Some interesting features:
Reading and writing SVG and CVG
Several views of the same document
Changes are updated when idle
Optimized drawing of 2d objects
Hey! I'm the developer of wxMathPlot! The project is active: I just took a long time to get a new release, because the code needed a partial rewriting to introduce new features. Take a look to the new 0.1.0 release: it is a great improvement from old versions. Anyway, it doesn't provide 3D (even if I always thinking about it...).
OpenGL. It WILL be hard and possibly rewriting the wheel, though.
Keep in mind that OpenGL is a general 3D library, and not a specific plot library, but you can implement plotting based on it.