1

I'm probably way out of the loop, but it seems weird to use a native look GUI library and then - if you're not using wxGTK - shoehorn in a text renderer from a different GUI library. What's the deal here?

Mark Green
  • 1,310
  • 12
  • 19
  • I'm not sure what the question is. Can you be more specific. Especially clarify "not using wxGTK" part. Are you talking about wxQt? Or using wxGTK under Windows? Or maybe Wayland? Can you give a scenario you are asking about? – Igor May 18 '17 at 16:35
  • If you're using WX, why use a library from GTK, when WX is not necessarily GTK? It seems like using a Java TreeView in a Windows Forms program. – Mark Green May 18 '17 at 18:43
  • wx in Linux uses internally GTK and Pango-Cairo. In Windows and OSX OS-API functions are used. To be complete, you can also use wx with GTK in Windows. You don't need to use Pango & Cairo on your own, but you can if you wish so. – Ripi2 May 18 '17 at 19:58
  • So using PangoCairo and WX requires having two different windowing tool kits running at once on non-Linux. Why do that just for text handling? Is Pango that great? – Mark Green May 18 '17 at 20:00
  • Well, there's also wxX11 which doesn't use GTK. But it's not as mature as wxGTK. When possible, wx calls only GTK commands, but for a few cases is better to use Pango directly (e.g. text measures). And wx is not just *text handling*. – Ripi2 May 18 '17 at 20:30
  • Why do you say *"two different windowing tool kits running at once"*? Which ones? – Ripi2 May 18 '17 at 20:33

2 Answers2

1

I think I understand your point. Using GTK (and Pango Cairo) on Windows, by telling wxWidgets to use internally GTK seems duplicating window managers.

It's just a matter of taste. GTK in Windows does call Windows API to do windowing. But some users like the GTK-way for windows, menus, and other controls instead of the native Windows-way, and wxWidgets provides this feature (in addition, of course, of the native usage, keeping native look&feel).

Anyhow, GTK on Linux calls internaly X11 or Wayland for handling windows and menus. Do you also call this "duplicating"?

Ripi2
  • 7,031
  • 1
  • 17
  • 33
1

The question seems to stem from a mistaken assumption, so it's hard to answer it, let me rather explain how things really are instead:

Cairo-based wxGraphicsContext can be optionally used under MSW because this allows to produce exactly the same graphics output under all platforms, which can be important for some kinds of applications. However it is not used by default, you need to explicitly request it, and if you don't you'd be using GDI+ or Direct2D, both of which are perfectly native libraries.

VZ.
  • 21,740
  • 3
  • 39
  • 42