๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Cross-platform GUI programming with wxWidgets

โœ Scribed by Smart, Julian;Hock, Kevin;Csomor, Stefan


Publisher
Pearson; Prentice Hall
Year
2005;2009
Tongue
English
Leaves
741
Series
Bruce Perens' Open Source Series
Edition
6. print
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


"This book is the best way for beginning developers to learn wxWidgets programming in C++. It is a must-have for programmers thinking of using wxWidgets and those already using it."-Mitch Kapor, founder of Lotus Software and the Open Source Applications Foundation
Build advanced cross-platform applications that support native look-and-feel on Windows, Linux, Unix, Mac OS X, and even Pocket PC
Master wxWidgets from start to finish-even if you've never built GUI applications before
Leverage advanced wxWidgets capabilities: networking, multithreading, streaming, and more
CD-ROM: library of development tools, source code, and sample applications
Foreword by Mitch Kapor, founder, Lotus Development and Open Source Application Foundation wxWidgets is an easy-to-use, open source C++ API for writing GUI applications that run on Windows, Linux, Unix, Mac OS X, and even Pocket PC-supporting each platform's native look and feel with virtually no additional coding. Now, its creator and two leading developers teach you all you need to know to write robust cross-platform software with wxWidgets. This book covers everything from dialog boxes to drag-and-drop, from networking to multithreading. It includes all the tools and code you need to get great results, fast. From AMD to AOL, Lockheed Martin to Xerox, world-class developers are using wxWidgets to save money, increase efficiency, and reach new markets. With this book, you can, too.
wxWidgets quickstart: event/input handling, window layouts, drawing, printing, dialogs, and more
Working with window classes, from simple to advanced
Memory management, debugging, error checking, internationalization, and other advanced topics
Includes extensive code samples for Windows, Linux (GTK+), and Mac OS XAbout the CD-ROMThe CD-ROM contains all of the source code from the book; wxWidgets distributions for Windows, Linux, Unix, Mac OS X, and other platforms; the wxWidgets reference guide; and development tools including the OpenWatcom C++ compiler, the poEdit translation helper, and the DialogBlocks user interface builder.
(c) Copyright Pearson Education. All rights reserved.

โœฆ Table of Contents


Cover......Page 1
Contents......Page 8
Foreword......Page 24
Preface......Page 26
Acknowledgments......Page 34
About the Authors......Page 36
What Is wxWidgets?......Page 38
Why Use wxWidgets?......Page 39
A Brief History of wxWidgets......Page 42
The wxWidgets Community......Page 43
License Considerations......Page 44
wxGTK......Page 45
wxX11......Page 46
wxWinCE......Page 47
Internal Organization......Page 49
Summary......Page 50
A Small wxWidgets Sample......Page 52
The Application Class......Page 53
The Frame Class......Page 54
The Event Handlers......Page 55
The Frame Constructor......Page 56
The Whole Program......Page 57
Compiling and Running the Program......Page 59
Summary......Page 60
Event-Driven Programming......Page 62
Event Tables and Handlers......Page 63
Pluggable Event Handlers......Page 66
Dynamic Event Handlers......Page 67
Window Identifiers......Page 68
Defining Custom Events......Page 71
Summary......Page 74
Anatomy of a Window......Page 76
Client and Non-Client Areas......Page 77
Painting......Page 78
Idle Time Processing and UI Updates......Page 79
Window Creation and Deletion......Page 80
A Quick Guide to the Window Classes......Page 81
Non-Static Controls......Page 82
Base Window Classes......Page 83
wxWindow......Page 84
wxControl......Page 91
wxFrame......Page 92
wxMDIParentFrame......Page 100
wxMDIChildFrame......Page 102
wxDialog......Page 103
wxPopupWindow......Page 108
wxNotebook......Page 109
wxScrolledWindow......Page 113
wxSplitterWindow......Page 118
wxButton......Page 123
wxButton Labels......Page 124
wxBitmapButton......Page 126
wxChoice......Page 127
wxComboBox......Page 128
wxCheckBox......Page 130
wxListBox and wxCheckListBox......Page 132
wxRadioBox......Page 135
wxRadioButton......Page 137
wxScrollBar......Page 138
wxSpinButton......Page 140
wxSpinCtrl......Page 141
wxSlider......Page 143
wxTextCtrl......Page 144
wxToggleButton......Page 148
wxGauge......Page 149
wxStaticText......Page 150
wxStaticBitmap......Page 151
wxStaticLine......Page 152
Menus......Page 153
wxMenu......Page 154
wxMenuBar......Page 159
wxToolBar......Page 161
wxStatusBar......Page 165
Summary......Page 167
Understanding Device Contexts......Page 168
Available Device Contexts......Page 169
Drawing on Windows with wxClientDC......Page 170
Erasing Window Backgrounds......Page 171
Drawing on Windows with wxPaintDC......Page 172
Creating Metafiles with wxMetafileDC......Page 175
Printing with wxPrinterDC and wxPostScriptDC......Page 176
Drawing Tools......Page 177
wxColour......Page 178
wxPen......Page 179
wxBrush......Page 180
wxFont......Page 182
wxPalette......Page 184
Device Context Drawing Functions......Page 185
Drawing Text......Page 187
Drawing Lines and Shapes......Page 189
Drawing Splines......Page 193
Drawing Bitmaps......Page 194
Logical Functions......Page 196
Using the Printing Framework......Page 198
More on wxPrintout......Page 200
Scaling for Printing and Previewing......Page 202
Printing under Unix with GTK+......Page 204
3D Graphics with wxGLCanvas......Page 205
Summary......Page 207
Mouse Input......Page 208
Handling Button and Motion Events......Page 210
Handling Mouse Wheel Events......Page 211
Handling Keyboard Events......Page 212
An Example Character Event Handler......Page 215
Modifier Key Variations......Page 216
Accelerators......Page 217
Handling Joystick Events......Page 218
wxJoystick Events......Page 220
wxJoystick Member Functions......Page 221
Summary......Page 222
Layout Basics......Page 224
Sizers......Page 225
Common Features of Sizers......Page 227
Programming with Sizers......Page 229
Programming with wxBoxSizer......Page 230
Programming with wxStaticBoxSizer......Page 233
Programming with wxGridSizer......Page 234
Programming with wxFlexGridSizer......Page 235
Programming with wxGridBagSizer......Page 237
Further Layout Issues......Page 238
Platform-Adaptive Layouts......Page 239
Summary......Page 241
wxMessageDialog......Page 242
wxProgressDialog......Page 245
wxProgressDialog Example......Page 246
wxShowTip......Page 247
wxFileDialog......Page 249
wxDirDialog......Page 253
wxColourDialog......Page 255
wxFontDialog......Page 258
wxSingleChoiceDialog......Page 261
wxMultiChoiceDialog......Page 262
wxTextEntryDialog and wxPasswordEntryDialog......Page 264
wxFindReplaceDialog......Page 265
wxPageSetupDialog......Page 269
wxPrintDialog......Page 272
Summary......Page 276
Steps in Creating a Custom Dialog......Page 278
An Example: PersonalRecordDialog......Page 279
Designing Data Storage......Page 280
Coding the Controls and Layout......Page 281
Data Transfer and Validation......Page 284
Handling Events......Page 286
Handling UI Updates......Page 287
Adding Help......Page 288
Invoking the Dialog......Page 290
Adapting Dialogs for Small Devices......Page 291
Keyboard Navigation......Page 292
Layout......Page 293
Using wxWidgets Resource Files......Page 294
Loading Resources......Page 295
Using Binary and Embedded Resource Files......Page 296
The XRC Format......Page 298
Writing Resource Handlers......Page 299
Foreign Controls......Page 300
Summary......Page 301
Image Classes in wxWidgets......Page 302
Programming with wxBitmap......Page 304
Creating a wxBitmap......Page 305
Setting a wxMask......Page 306
The XPM Format......Page 307
Drawing with Bitmaps......Page 308
Programming with wxIcon......Page 309
Creating a wxIcon......Page 310
Associating an Icon with an Application......Page 311
Programming with wxCursor......Page 312
Creating a wxCursor......Page 313
Using wxSetCursorEvent......Page 315
Programming with wxImage......Page 316
Loading and Saving Images......Page 317
Transparency......Page 319
Color Reduction......Page 321
Image Lists and Icon Bundles......Page 322
Customizing Art in wxWidgets......Page 325
Summary......Page 327
Data Objects......Page 328
Data Target Duties......Page 329
Using the Clipboard......Page 330
Implementing a Drag Source......Page 331
Implementing a Drop Target......Page 334
Using Standard Drop Targets......Page 335
Creating a Custom Drop Target......Page 336
More on wxDataObject......Page 337
Drag and Drop Helpers in wxWidgets......Page 348
Summary......Page 353
wxTreeCtrl......Page 354
wxTreeCtrl Styles......Page 356
wxTreeCtrl Events......Page 357
wxTreeCtrl Member Functions......Page 358
wxListCtrl......Page 359
wxListCtrl Styles......Page 360
wxListCtrl Events......Page 361
wxListItem......Page 362
wxListCtrl Member Functions......Page 364
Using wxListCtrl......Page 366
Virtual List Controls......Page 367
wxWizard Events......Page 368
wxWizard Example......Page 369
wxHtmlWindow......Page 375
wxHtmlWindow Styles......Page 378
wxHtmlWindow Member Functions......Page 379
Embedding Windows in HTML Pages......Page 380
HTML Printing......Page 381
wxGrid......Page 383
The wxGrid System of Classes......Page 385
wxGrid Events......Page 386
wxGrid Member Functions......Page 387
wxTaskBarIcon......Page 391
wxTaskBarIcon Member Functions......Page 395
Writing Your Own Controls......Page 396
The Custom Control Declaration......Page 397
Adding DoGetBestSize......Page 399
Displaying Information on the Control......Page 400
Defining Default Event Handlers......Page 401
Implementing Validators......Page 402
Determining Control Appearance......Page 404
A More Complex Example: wxThumbnailCtrl......Page 406
Summary......Page 408
Why Not STL?......Page 410
Using wxString......Page 411
Basic wxString to C Pointer Conversions......Page 412
Standard C String Functions......Page 413
Converting to and from Numbers......Page 414
wxStringTokenizer......Page 415
Array Types......Page 416
wxArrayString......Page 417
Array Sample Code......Page 418
wxList and wxNode......Page 420
wxHashMap......Page 422
Storing and Processing Dates and Times......Page 424
wxDateTime Accessors......Page 425
Date Arithmetic......Page 426
wxObject......Page 428
wxRect......Page 429
wxRegion......Page 430
wxVariant......Page 431
Summary......Page 432
wxFile and wxFFile......Page 434
wxTextFile......Page 436
wxDir......Page 437
wxFileName......Page 438
File Functions......Page 439
File Streams......Page 440
Reading and Writing Data Types......Page 442
Socket Streams......Page 443
Zip Streams......Page 444
Virtual File Systems......Page 445
Summary......Page 448
Creating and Deleting Window Objects......Page 450
Initializing Your Application Object......Page 452
Detecting Memory Leaks and Other Errors......Page 453
Facilities for Defensive Programming......Page 455
Error Reporting......Page 456
wxMessageOutput Versus wxLog......Page 460
Providing Run-Time Type Information......Page 461
Using wxModule......Page 463
Loading Dynamic Libraries......Page 464
Exception Handling......Page 465
Debugging X11 Errors......Page 466
Debugging a Release Build......Page 467
Summary......Page 468
Introduction to Internationalization......Page 470
poEdit......Page 471
Step-by-Step Guide to Using Message Catalogs......Page 472
Using wxLocale......Page 474
Character Encodings and Unicode......Page 475
Converting Data......Page 476
wxCSConv (wxMBConv)......Page 477
Converting Outside of a Temporary Buffer......Page 478
Help Files......Page 479
Other Media......Page 480
A Simple Sample......Page 481
Summary......Page 483
When to Use Threads, and When Not To......Page 484
Using wxThread......Page 485
Creation......Page 486
How to Pause a Thread or Wait for an External Condition......Page 487
wxMutex......Page 488
Deadlocks......Page 489
wxCondition......Page 490
The wxWidgets Thread Sample......Page 493
Using wxTimer......Page 494
Idle Time Processing......Page 496
Summary......Page 497
18 Programming with wxSocket......Page 500
Introduction to Sockets and Basic Socket Processing......Page 501
The Client......Page 502
The Server......Page 503
Connecting to a Server......Page 504
Socket Events......Page 506
Socket Status and Error Notifications......Page 507
Sending and Receiving Socket Data......Page 508
Creating a Server......Page 509
Socket Flags......Page 510
Blocking and Non-Blocking Sockets in wxWidgets......Page 511
How Flags Affect Socket Behavior......Page 512
Using Socket Streams......Page 513
File Sending Thread......Page 514
File Receiving Thread......Page 515
Alternatives to wxSocket......Page 516
Summary......Page 517
Document/View Basics......Page 518
Step 2: Create and Use Frame Classes......Page 520
Step 3: Define Your Document and View Classes......Page 523
Step 4: Define Your Window Classes......Page 532
Step 5: Use wxDocManager and wxDocTemplate......Page 534
File History......Page 537
Strategies for Implementing Undo/Redo......Page 538
Summary......Page 540
20 Perfecting Your Application......Page 542
Single Instance or Multiple Instances?......Page 543
Modifying Event Handling......Page 547
Reducing Flicker......Page 549
Implementing Online Help......Page 550
Using a Help Controller......Page 552
Extended wxWidgets HTML Help......Page 554
Authoring Help......Page 555
Other Ways to Provide Help......Page 556
Context-Sensitive Help and Tooltips......Page 557
Parsing the Command Line......Page 558
Reducing the Number of Data Files......Page 560
Finding the Application Path......Page 561
Launching Documents......Page 562
Redirecting Process Input and Output......Page 564
Managing Application Settings......Page 566
Storing Settings......Page 567
Editing Settings......Page 568
Installation on Windows......Page 569
Installation on Linux......Page 571
Installation on Mac OS X......Page 572
Menus......Page 575
Application Termination Behavior......Page 576
Summary......Page 577
A: Installing wxWidgets......Page 580
B: Building Your Own wxWidgets Applications......Page 596
C: Creating Applications with DialogBlocks......Page 612
D: Other Features in wxWidgets......Page 622
E: Third-Party Tools for wxWidgets......Page 630
F: wxWidgets Application Showcase......Page 638
G: Using the CD-ROM......Page 648
H: How wxWidgets Processes Events......Page 650
I: Event Classes and Macros......Page 654
J: Code Listings......Page 664
K: Porting from MFC......Page 680
C......Page 694
F......Page 695
M......Page 696
R......Page 697
W......Page 698
X......Page 699
A......Page 700
B......Page 701
C......Page 702
D......Page 705
E......Page 708
F......Page 709
G......Page 712
H......Page 713
I......Page 714
L......Page 715
M......Page 716
N......Page 718
O......Page 719
P......Page 720
R......Page 721
S......Page 722
T......Page 724
U......Page 725
W......Page 726
Z......Page 737


๐Ÿ“œ SIMILAR VOLUMES


Cross-Platform GUI Programming with wxWi
โœ Julian Smart, Kevin Hock, Stefan Csomor ๐Ÿ“‚ Library ๐Ÿ“… 2005 ๐Ÿ› Prentice Hall ๐ŸŒ English

<P>This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version.</P> <ul><li>Build advanced cross-platform applications that support native look-and-feel on Windows, Linux, Unix, Mac OS X, and even Pocket PC</li> <li>Master

Cross-Platform GUI Programming with wxWi
โœ Julian Smart, Kevin Hock, Stefan Csomor ๐Ÿ“‚ Library ๐Ÿ“… 2006 ๐Ÿ› Prentice Hall PTR ๐ŸŒ English

I was never able to get DialogBlocks to build the wx library. Kept freezing halfway through. Eventually I gave up and spent a lot of time setting up an Eclipse environment. (This is on an old Powerbook...) Haven't worked with wx in windows or linux yet, but so far I can say that this book is NOT

Cross-Platform GUI Programming with wxWi
โœ Julian Smart, Kevin Hock, Stefan Csomor ๐Ÿ“‚ Library ๐Ÿ“… 2006 ๐Ÿ› Prentice Hall PTR ๐ŸŒ English

This book is well written and informative. I have some previous experience working with the platform, and so use this book more as a reference text than a tutorial, but none the less I have learned a lot. In combination with the wxwiki and forums I have no doubt that anyone could build an applicat

Cross-Platform GUI Programming with wxWi
โœ Julian Smart, Kevin Hock, Stefan Csomor ๐Ÿ“‚ Library ๐Ÿ“… 2006 ๐Ÿ› Prentice Hall PTR ๐ŸŒ English

This book is well written and informative. I have some previous experience working with the platform, and so use this book more as a reference text than a tutorial, but none the less I have learned a lot. In combination with the wxwiki and forums I have no doubt that anyone could build an applicat

Cross-Platform GUI Programming with wxWi
โœ Julian Smart, Kevin Hock, Stefan Csomor ๐Ÿ“‚ Library ๐Ÿ“… 2006 ๐Ÿ› Prentice Hall PTR ๐ŸŒ English

"This book is the best way for beginning developers to learn wxWidgets programming in C++. It is a must-have for programmers thinking of using wxWidgets and those already using it.Mitch Kapor, founder of Lotus Software and the Open Source Applications Foundation Build advanced cross-platform applica

Cross-Platform GUI Programming with wxWi
โœ Julian Smart ๐Ÿ“‚ Library ๐Ÿ“… 2005 ๐Ÿ› Prentice Hall PTR ๐ŸŒ English

<P>This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version.</P> <ul><li>Build advanced cross-platform applications that support native look-and-feel on Windows, Linux, Unix, Mac OS X, and even Pocket PC</li> <li>Master