CrossPlatform GUI Programming with wxWidgets [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

CrossPlatform GUI Programming with wxWidgets [Electronic resources] - نسخه متنی

Julian Smart; Kevin Hock; Stefan Csomor

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید











  • The wxWidgets Architecture


    Table 1-1 shows the four conceptual layers: the wxWidgets public API, each major port, the platform API used by that port, and finally the underlying operating system.

    Table 1-1. wxWidgets Ports

    wxWidgets API

    wxWidgets Port

    wxMSW

    wxGTK

    wxX11

    wxMotif

    wxMac

    wxCocoa

    wxOS2

    wxPalmOS

    wxMGL

    Platform API

    Win32

    GTK+

    Xlib

    Motif/Lesstif

    Carbon

    Cocoa

    PM

    Palm OS Protein APIs

    MGL

    Operating System

    Windows/Windows CE

    Unix/Linux

    Mac OS 9/Mac OS X

    Mac OS X

    OS/2

    Palm OS

    Unix/DOS

    The following are the main wxWidgets ports that exist at the time of writing.

    wxMSW


    This port compiles and runs on all 32-bit and 64-bit variants of the Microsoft Windows operating system, including Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP and Windows 2003. It can also be compiled to use Winelib under Linux, and has a configuration that works on Windows CE (see "wxWinCE"). wxMSW can be configured to use the wxUniversal widgets instead of the regular Win32 ones.

    wxGTK


    wxWidgets for GTK+ can use versions 1.x or 2.x of the GTK+ widget set, on any Unix variant that supports X11 and GTK+ (for example, Linux, Solaris, HP-UX, IRIX, FreeBSD, OpenBSD, AIX, and others). It can also run on embedded platforms with sufficient resourcesfor example, under the GPE Palmtop Environment (see Figure 1-4). wxGTK is the recommended port for Unix-based systems.

    Figure 1-4. The wxWidgets "Life!" demo under GPE on an iPAQ PDA

    wxX11


    wxWidgets for X11 uses the wxUniversal widget set and runs directly on Xlib with no native widget set. This makes the port suitable for embedded systems, but it can also be used for desktop applications where it is undesirable to link with GTK+. This is supported on any Unix system running X11. wxX11 is not as mature as the wxGTK port. Figure 1-5 shows the Life! demo compiled under wxX11 and running on Familiar Linux /TinyX on an iPAQ PDA.

    Figure 1-5. The wxWidgets "Life!" demo running on embedded wxX11

    wxMotif


    This port can use Motif, OpenMotif, or Lesstif on most Unix systems. Sun Microsystems is putting its weight behind GNOME and GTK+, so Motif is no longer an attractive option for most developers and users.

    wxMac


    wxMac targets Mac OS 9 (from 9.1 upwards) and Mac OS X (from 10.2.8 upwards). For Mac OS 9 builds, you need the Metrowerks CodeWarrior tools, and for Mac OS X, you can use either Metrowerks CodeWarrior or Apple tools. When using Apple's tools, you should use Xcode 1.5 or higher, orif you are just using command line toolsGCC 3.3 or higher.

    wxCocoa


    A port in progress, this targets the Cocoa API of Mac OS X. Although the functionality of Carbon and Cocoa is similar, this port has the potential for supporting GNUStep running on platforms other than a Mac.

    wxWinCE


    The Windows CE port encompasses various SDKs based on the Windows CE platform, including Pocket PC and Smartphone. The bulk of this port consists of the wxMSW Win32 port, with some omissions and additions for the smaller platform. Figure 1-6 shows the wxWidgets Life! demo running on the Pocket PC 2003 emulator. Figure 1-7 shows four screens from the wxWidgets dialog demo running on Smartphone 2003 with a 176 x 220 pixel display. User interface adaptations done by wxWidgets for this restricted platform include constructing a nested menu in place of the usual menu bar because Smartphone only supports two menu buttons. Some additional application hints are required, such as calling SetLeftMenu and SetRightMenu instead of adding conventional OK and Cancel buttons to a dialog.

    Figure 1-6. The wxWidgets "Life!" demo on Pocket PC 2003

    Figure 1-7. The wxWidgets "dialogs" demo on Smartphone 2003

    wxPalmOS


    This is a port to Palm OS 6 (Cobalt). At the time of writing, the port is in its infancy but can be used to compile and run a simple sample in the Palm OS 6 simulator (see Figure 1-8).

    Figure 1-8. A wxWidgets sample under Palm OS 6

    wxOS2


    wxOS2 is a Presentation Manager port for OS/2 or eComStation.

    wxMGL


    This port targets the MGL low-level graphics layer from SciTech Software, Inc., and uses the wxUniversal widget set.

    Internal Organization


    Internally, the wxWidgets code base is broadly separated into six layers:Appendix A, "Installing wxWidgets."

  • / 261