Embedding WebKit in C++ Application - html

I'm writing a game in C++ using the SDL framework, and want to create my game's GUI using HTML/CSS. I've looked into frameworks such as Awesomium, however I'm turned off by the fact that it's not open source. I want to create my own implementation of a similar idea.
However, I can find almost no documentation on actually using WebKit in this manner. The closest I can find is this Apple Developer guide to using WebKit but it's targeted at MacOS-specific applications written in Objective-C. It makes mention of a "Webkit C Reference" toward the bottom of the page, but I cannot find this actual document anywhere. Additionally, I've read the resources on the WebKit Wiki as well as prior StackOverflow questions on the same topic, but I haven't been able to find anything in the way of direct, clear documentation on embedding WebKit in a C++ program.
Does this documentation exist somewhere? What is the best resource for documentation on embedding WebKit within a C++ application?

I'm not really sure about this, but when I read about "c++" and "html/css". QT comes to my mind. Maybe you want to check it out.

Related

Suitable C++ widget for showing static html page

I need to create simple cross platform C++ project for rendering (displaying) html pages (let it be application that displays help materials). This pages can include some images and styles (css inserted in html). So I search for the best approach to have the next functionality in my project:
Possibility to show and zoom formatted html text;
Possibility to show and zoom images as well as text;
CSS support;
Easy to deploy - widget used in app should be lightweight and shouldn't have a lot of extra dependencies.
I tried to use QTextEdit. But unfortunately as the Qt documentation says, QTextEdit zoom methods do not change the size of any images.
Also tried to use QWebView there (Qt5.4). But after switching to Qt5.6 I noticed that Qt WebKit is deprecated and not supported any more. On other hand replacing Qt WebKit functionality with one from the Qt WebEngine is painful. Furthermore Qt WebEngine module is huge and has a lot of dependencies from parts that I actually not used (e. g. it depends a lot from chromium web engine). So I don't need full web browser in my application.
So what is the best approach (may be some lightweight widget that is free to use) to implement functionality mentioned above?
Thanks in advance.
I have no experience with this library, but I've heard lots of good things about it:
http://www.libnavajo.org/
It looks to be extremely lightweight (< 20 classes) and perhaps something that could work. The documentation is unclear about some of your other specifications, but it's something to try perhaps.

Create HTML5 game using CreateJS and Canvas Boilerplate

I've pretty much set my mind on using CreateJS to create an HTML5 game, but I also came across H5CGB, a boilerplate created specifically for creating HTML5 canvas games. It looks very thorough and I believe the developer when he says it would save me heaps of time writing code I would have had to write anyway.
However, looking at tutorials for both CreateJS and H5CGB, they seem to conflict quite a bit, at least in terms of how these specific tutorials implement their respective tools:
http://hub.tutsplus.com/tutorials/learn-createjs-by-building-an-html5-pong-game--active-11845
http://icecreamyou.github.io/HTML5-Canvas-Game-Boilerplate/docs/#!/guide/walkthrough
I'm basically just trying to understand how to integrate these two systems. For example, both come with their own preloader utility, so I'm not sure which to use and if they would cause issues or if it's just a redundancy resulting in unnecessarily longer loading times.
Has anyone had any experience working with these two tools together?
I believe you should probably just stick to using createJS because the two frameworks do have a lot of overlapping functionality. It wouldn't make sense to use both.
I think you should also check out other game specific frameworks like Crafty.js and possibly watch Google I/O Canvas to get a good idea on the total range of your options!
Crafty
http://craftyjs.com/
Google I/O
http://blog.sethladd.com/2011/05/source-code-slides-and-video-for-html5.html
Hope this helps and good luck learning canvas!
Shalom
I created H5CGB. (Just found this question today via the newly-released Github traffic stats.)
The biggest two reasons to use H5CGB are:
You do not have to learn any new APIs to start developing. H5CGB provides a bunch of scaffolding you can use to skip the boring stuff, but you won't get into trouble if you want to implement any part of your app yourself, and you probably can get going immediately just by editing main.js without even reading the documentation.
The code base is intended to be boilerplate, so you can use all the utilities and scaffolding H5CGB provides as a starting point and edit it if you want things to work differently.
This is in contrast to most other canvas libraries, which tend to be monolithic black boxes of no-touchiness with sparsely documented APIs.

Anybody knows a good JavaScript UI (Widget) Library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
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.
Closed 8 years ago.
Improve this question
Recently I had to develop several web applications. I did extensive research regarding JavaScript UI Libraries but I haven't been able to find one I was really satisfied with. What I mean with UI libraries is a library which provides user-controls such as buttons, combo boxes, grids, charts, layout, ...
What I found so far and why I didn't like it a 100%
jQuery UI has too few controls. (I know there are a lot of plugins and you can nearly find everything but it is not the same as a complete library made and tested by one team or group)
Dijit (Dojo). I really like this one but when I try to use it in my websites I'm always having troubles. They don't seem to be as easy to use as other libs.
YUI version 2 had a lot of controls, but the "new" version 3 still misses many controls. (or I am just too dumb to find them) I don't want to work with both versions at the same time or use an old version which will be replaced soon.
DHTMLX has many controls and they work really well, but the controls themselves lack many features. (for example the HTMLEditor does not even support to change the text color out of the box or I could not find an easy way to expand/collapse tree nodes with some sort of animation)
If anybody knows of a good library which I have not tried yet or knows how I could use one of the above libraries "better" I would be really happy.
I am wondering why at this point (where web-apps are getting so important) I still can't find a complete UI framework which would provide me with controls which you can find in other environments since years (or even decades) - for example Java, .net or Delphi to name just a few.
edit:
I know there won't be a library with every control I ever need, but what I expect from such a library is at least: consistent skins, api, documentation, validation and the most important controls you'd need in business apps/websites (datepicker, button, editor with support for numerical data, grid/tree, layout controls, HTML editor) AND the possibility to create your own controls. good to have: charts or reporting
Ext JS provides the best GUI widgets by far. I've used it for a large intranet project, and have been completely satisfied. It's available under GPLv3 and a commercial license.
Be extremely careful when evaluating open-source frameworks. They tend to religiously promote the quality of their projects, but I've found that poor documentation and buggy code are pervasive. Dojo claims heavy industry involvement, but their documentation is poor, and it's not hard to find bugs on their website (the dijit example pages have been broken for months at a time...).
Your comment about JQueryUI is very telling.
As you say, JQueryUI does provide relatively few controls, but has a lot of plugins available. But you're looking for a single library with everything you want built-in.
This is a tough ask, because we don't actually know what widgets you really want, which ones you like the sound of but probably wouldn't use, or which ones you'd use but only if they worked exactly the way you want.
It's virtually impossible to predict all the widgets that someone may want, or how they want them to work. And even if a given library does get it exactly right, when your needs change slightly in the wrong direction, suddenly the library you chose could turn out to be a poor choice rather than the right one.
This is why flexibility and maintainability are far more important than getting an exact feature match. Once you go beyond the basic set of widgets, most others are built on top of the simple ones anyway, but everyone has their own ideas about how they should be implemented, and new UI concepts are being thought up every day. This is why the plug-in model works so well, and why I feel you're making a mistake in discounting JQueryUI because most of the widgets are available as plug-in. In fact, I would say that this model is likely to be the best solution for you.
There are a number of other libraries available which you haven't mentioned. Mootools and Prototype are probably the best well known, but there are others too. Rather than list them all, I'll point you to this page on Wikipedia, which lists them all in a comparative table: http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks
I hope you find that helpful. But I suspect you won't find any library in that list that comes with every widget you'd ever want, all in one bundle. They all rely on plug-ins, because the library developers are generally focusing on making a framework for widgets, rather the widgets themselves.
Check out PrimeUI, provides various widgets and built with jQuery UI APIs. Licensed under Apache V2. http://www.primefaces.org/primeui/
Recently Telerik Kendo UI which is built on top of jQuery (no impedence mismatch with other frameworks) has Open sourced (Apache 2.0 License) their Library of Widgets.
I strongly recommend this..
Telerik Kendo UI is not Open Source
Download the Kendo UI - Open Source edition
If you don't mind the licencing you should have a look at http://www.sencha.com/ the ExtJS library.
A demo library available at http://www.sencha.com/products/extjs/examples/
SAPUI5 web controls listing with example source code:

Is there any HTML 5 "Builder"

Or do you know of anyone working on one? I've been checking all the stuff you can do with HTML 5 here and some other sites and is amazing. I think such a big library should have some IDE with intellisense and easy documentation (like when you press F1 on Visual Studio while a symbol is highlighted) and all that stuff. And if there is not then I should probably start working on one :).
Most of known IDEs and their latest version, like Netbeans, Eclipse, Dreamweaver, support natively HTML5. You can find more info and pick one according to your preferences.
There are numerous HTML 5 IDEs, it's important to not necessarily separate current web technologies with HTML5 as they are really are very close to being one and the same. For example, the latest version of Adobe's tool offer support for HTML5, as well as other IDEs such as Aptana. Unfortunately, the HTML5 spec is not done yet so there will be discrepancies between browsers, which a builder could work around, but will put a lot of onus on you.
Alternatively, there are numerous client and server-side frameworks that abstract HTML5 and some of its features, each of these have varying levels of support, a builder, and intellisense. For example, I'm a co-founder of the NOLOH development platform (http://www.noloh.com), which abstracts away browser differences and supports HTML5 transparently to you the developer, allowing you to concentrate on your application and functionality without worrying about the plumbing. We also have what's known as "code stubs" that you can add to any IDE most IDEs and get intellisense/auto-complete functionality. We also have a visual builder in the works that should be out relatively soon.
Whatever you pick, just make sure you're comfortable with it, but you definitely don't want to re-invent the wheel here.
You should definitely try HTML5 Builder.
Try this, HTML5 Boilerplate
if you are looking for something that builds mobile sites or ads html5 builder, maybe you could try http://mobdis.com.

How do I create "accessible" PDFs from HTML?

Does anyone have any suggestions on how to generate accessible PDFs (including images) from HTML?
The PDFs need to look like the original HTML, including positions of images etc.
Any special HTML structure required to help make the final PDF accessible?
I've seen questions about creating PDFS none of them specifically address the important issue of accessibility.
My poison of choice is Perl but references to any program, language or library will help.
I have a more in-depth question at TypeDoc if anyone has more general information to offer.
http://doctype.com/TiB
Also,
I, and others, would find it useful if users with accessibility problems could comment if they find the "usability experience" of using PDFs better or worse than reading from Plain Old Semantic HTML (POSH).
Thanks
Mike
Look into PrinceXML. Through CSS you can control margins, page breaking and orientation. While not open source, you can try it for free, but it places a small water mark in the upper right corner.
The Adobe ColdFusion server product does a really fine job of this, not surprisingly. But it's not free, and the open source implementations of the language (Smith and BlueDragon) don't support the pdf stuff.
Developer licenses to Adobe ColdFusion are free, and you can download it.
I've done this thing on a small scale but scripting Safari to print to PDFs. I don't recommend it for large-scale projects though.
By far the most capable PDF publishing tool I've ever come across is reportlab. There is an open source library written with Python and a proprietary system that allows you to construct a document using RML, a custom xml spec. The latter is easier for more complex docs. They tend to be very flexible (and reasonable) with pricing.
Not strictly an answer to your question as it doesn't handle html-to-pdf conversions, but perhaps of use to you.