How does wxWindows work?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
MrRage
Knows some wx things
Knows some wx things
Posts: 35
Joined: Fri Mar 11, 2005 3:43 am

How does wxWindows work?

Post by MrRage » Sun May 01, 2005 11:45 pm

This is kind of a basic question but how does wxWidgets work? Does it wrap its self around the platform UI system, or does it do it on a low level with accessing 2D Draw routines?

Seams kind of redundant but I wanted to make a 2D window manager API for fun/educational experience so I was wondering how wxWidgets did it.

krysa
Experienced Solver
Experienced Solver
Posts: 71
Joined: Wed Feb 16, 2005 9:23 pm
Location: Lithuania

Re: How does wxWindows work?

Post by krysa » Mon May 02, 2005 6:40 am

MrRage wrote:This is kind of a basic question but how does wxWidgets work? Does it wrap its self around the platform UI system, or does it do it on a low level with accessing 2D Draw routines?
Depends... There is wxUniversal, wich draws everythink on its own - only uses native drawing routines for this. AND there is wxNative (wxMSW, wx GTK and so on), that wraps native APIs.
Platform: MSW (Windows XP Pro)
Compiler: msvc 13.10.3077 (Free Toolkit)
wxWidgets: v2.6.0

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: How does wxWindows work?

Post by ABX » Mon May 02, 2005 6:40 am

MrRage wrote:This is kind of a basic question but how does wxWidgets work? Does it wrap its self around the platform UI system, or does it do it on a low level with accessing 2D Draw routines?

Seams kind of redundant but I wanted to make a 2D window manager API for fun/educational experience so I was wondering how wxWidgets did it.
Our design idea is to be a common wrapper around everything native (which is not limited to graphic as you seem to think) and simulate if native functionality is not available or when user do not want to use native functionality. Note however that native not always means OS-GUI specific things because wxWidgets is more than GUI. Examples:
  • wxMSW port uses native Win32 API for windowing but you can build in Universal mode when it use only drawing routines.

    wxString is on top of string class of STL but in lack of STL has own implementation with the same API.

    wxBitmap::Load under MSW uses Win32 API for loading BMP file while wxImage::Load uses own wxWidgets implementation of BMP reading.

    seamples/dialogs presents cooperation of native dialogs and generic implementations of them.
ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: How does wxWindows work?

Post by upCASE » Mon May 02, 2005 6:50 am

Hi!
MrRage wrote:This is kind of a basic question but how does wxWidgets work? Does it wrap its self around the platform UI system, or does it do it on a low level with accessing 2D Draw routines?
The first statement is true for wxWidgets, the second for Qt and Java. wxWidgets uses the underlying system API for widgets and event handling, plus it has some classes that are implemented in a crossplatform way, like wxString, wxArray etc.
MrRage wrote: Seams kind of redundant but I wanted to make a 2D window manager API for fun/educational experience so I was wondering how wxWidgets did it.
For a pure windowmanager some project like fluxbox or icewm should be a beter start. wxWidgets isn't a winow manager.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

MrRage
Knows some wx things
Knows some wx things
Posts: 35
Joined: Fri Mar 11, 2005 3:43 am

Post by MrRage » Mon May 02, 2005 8:03 pm

Thanks for the help, this is just an on the side thing I'm doing for fun. I wanted to make an OpenGL application widgets tool kit as part of an OpenGL game engine (if I ever finish it).

With a universal tool kit like this I could integrate buttons into control panels or screens in a virtual world or even run the HUD/UI with the same tool kit, which would make for some really cool cut-scenes like in Doom3.

Post Reply