1 / 8

Under the Hood : A Short Introduction to wxWindows

Under the Hood : A Short Introduction to wxWindows. The textbook classes are an extension of wxWindows, a windowing library. The textbook classes package elements of wxWindows for your use. What’s a Windowing Library?. A collection of software to construct “windowed” programs. Examples :

shardaway
Télécharger la présentation

Under the Hood : A Short Introduction to wxWindows

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Under the Hood : A Short Introduction to wxWindows • The textbook classes are an extension of wxWindows, a windowing library. • The textbook classes package elements of wxWindows for your use. CS2704-Parks-wxWindows Overview

  2. What’s a Windowing Library? • A collection of software to construct “windowed” programs. • Examples : • wxWindows • Microsoft Foundation Classes (MFC) (The “Visual” part of Visual C++) • Java Foundation Classes (JFC) CS2704-Parks-wxWindows Overview

  3. Why use a windowing library? • Easy to develop visually attractive code • Some libraries, like wxWindows and Java, are portable across platforms • They are all very similar - Once you learn one, it’s easy to learn others CS2704-Parks-wxWindows Overview

  4. How do I use wxWindows, then? • Use your new best friend : the wxWindows Application Programming Interface! (API) • wxWindows 1 alphabetical class reference : http://web.ukonline.co.uk/julian.smart/wxwin/manuals/html/wx/ • wx72.htm#classref • Explore the API! CS2704-Parks-wxWindows Overview

  5. A Simple Exercise in wxWindows Create wxFrame Put wxText (like Message) in frame Put wxButton (like Button) in frame Increment value in wxText object each time button is pressed CS2704-Parks-wxWindows Overview

  6. Writing a wxWindows Application: A Rough Guide • To set a wxWindows application going, you'll need to derive a wxApp class. • An application must have a top-level wxFrame window (returned by wxApp::OnInit), each frame containing one or more instances of wxPanel, wxTextWindow or wxCanvas. CS2704-Parks-wxWindows Overview

  7. More wxWindows Classes • A wxPanel is used to place items (classes derived from wxItem) which are used for user interaction. • Examples of items are wxButton, wxCheckBox, wxChoice, wxListBox, wxSlider, wxRadioBox. CS2704-Parks-wxWindows Overview

  8. Even More wxWindows Classes • Instances of wxDialogBox can also be used for panels, items and they have the advantage of not requiring a separate frame. • Instead of creating a dialog box and populating it with items, it is possible to choose one of the convenient dialog functions, such as wxMessageBox and wxFileSelector CS2704-Parks-wxWindows Overview

More Related