From b87654f3fd52a9b6c1ebf5a3ff57c85b6c5631d6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 18 Aug 1999 18:06:10 +0000 Subject: [PATCH] wxWizard added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/tmake/filelist.txt | 19 +- include/wx/event.h | 5 + include/wx/wizard.h | 10 + samples/wizard/Makefile.in | 21 ++ samples/wizard/wiztest.cpp | 12 +- samples/wizard/wiztest.xpm | 633 +++++++++++++++++++++++++++++++++ src/generic/wizard.cpp | 1 + 7 files changed, 690 insertions(+), 11 deletions(-) create mode 100644 samples/wizard/Makefile.in create mode 100644 samples/wizard/wiztest.xpm diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index fade826d5d..bffd051a6d 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -7,7 +7,7 @@ # # Format of this file: TAB separated columns. The first column contains the # filename, the second a letter corresonding a directory: -# G /src/generic +# G /src/generic # C /src/common # M /src/msw # X /src/motif X for Xt @@ -16,15 +16,15 @@ # H /src/html # W /include/wx # K /include/wx/gtk K for gtK -# F /include/wx/motif F for motiF -# B /include/wx/msw B for Bill Gates -# N /include/wx/generic N for geNeric -# L /include/wx/html L for htmL -# P /include/wx/protocol -# S /include/wx/unix S for poSix +# F /include/wx/motif F for motiF +# B /include/wx/msw B for Bill Gates +# N /include/wx/generic N for geNeric +# L /include/wx/html L for htmL +# P /include/wx/protocol +# S /include/wx/unix S for poSix # -# The third column may be empty or contain some additional info about this -# file (only compile it in 16bit mode, don't compile it with this or that +# The third column may be empty or contain some additional info about this +# file (only compile it in 16bit mode, don't compile it with this or that # compiler, &c) # # Known flags: @@ -84,6 +84,7 @@ numdlgg.cpp G textdlgg.cpp G tipdlg.cpp G treectrl.cpp G 16 +wizard.cpp G choiccmn.cpp C R cmndata.cpp C diff --git a/include/wx/event.h b/include/wx/event.h index 1eaf95d7f5..5598cf8d25 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -229,6 +229,11 @@ const wxEventType wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING = wxEVT_FIRST + 851; const wxEventType wxEVT_COMMAND_SPLITTER_DOUBLECLICKED = wxEVT_FIRST + 852; const wxEventType wxEVT_COMMAND_SPLITTER_UNSPLIT = wxEVT_FIRST + 853; +/* Wizard events */ +const wxEventType wxEVT_WIZARD_PAGE_CHANGED = wxEVT_FIRST + 900; +const wxEventType wxEVT_WIZARD_PAGE_CHANGING = wxEVT_FIRST + 901; +const wxEventType wxEVT_WIZARD_CANCEL = wxEVT_FIRST + 902; + const wxEventType wxEVT_USER_FIRST = wxEVT_FIRST + 2000; /* Compatibility */ diff --git a/include/wx/wizard.h b/include/wx/wizard.h index 118a6f5c0f..0c9e577700 100644 --- a/include/wx/wizard.h +++ b/include/wx/wizard.h @@ -14,6 +14,16 @@ #ifndef _WX_WIZARD_H_ #define _WX_WIZARD_H_ +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#ifndef WX_PRECOMP + #include "wx/dialog.h" // the base class + + #include "wx/event.h" // wxEVT_XXX constants +#endif // WX_PRECOMP + // ---------------------------------------------------------------------------- // wxWizard // ---------------------------------------------------------------------------- diff --git a/samples/wizard/Makefile.in b/samples/wizard/Makefile.in new file mode 100644 index 0000000000..de703d1e9f --- /dev/null +++ b/samples/wizard/Makefile.in @@ -0,0 +1,21 @@ +# +# File: makefile.unx +# Author: Julian Smart +# Created: 1998 +# Updated: +# Copyright: (c) 1998 Julian Smart +# +# "%W% %G%" +# +# Makefile for minimal example (UNIX). + +top_srcdir = @top_srcdir@ +top_builddir = ../.. +program_dir = samples/wizard + +PROGRAM=wizard + +OBJECTS=wiztest.o + +include ../../src/makeprog.env + diff --git a/samples/wizard/wiztest.cpp b/samples/wizard/wiztest.cpp index 4172763ded..df1c8f3aff 100644 --- a/samples/wizard/wiztest.cpp +++ b/samples/wizard/wiztest.cpp @@ -37,6 +37,10 @@ #include "wx/wizard.h" +#ifndef __WXMSW__ + #include "wiztest.xpm" +#endif + // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- @@ -72,7 +76,7 @@ public: if ( m_checkbox->GetValue() ) { wxMessageBox("Clear the checkbox first", "No way", - wxICON_WARNING, this); + wxICON_WARNING | wxOK, this); return FALSE; } @@ -95,7 +99,11 @@ private: // `Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { +#ifdef __WXMSW__ wxBitmap bmpWizard("wiztest.bmp", wxBITMAP_TYPE_BMP); +#else + wxBitmap bmpWizard(wizimage); +#endif wxWizard *wizard = wxWizard::Create(NULL, -1, "Absolutely Useless Wizard", @@ -115,7 +123,7 @@ bool MyApp::OnInit() if ( wizard->RunWizard() ) { wxMessageBox("The wizard successfully completed", "That's all", - wxICON_INFORMATION); + wxICON_INFORMATION | wxOK); } wizard->Destroy(); diff --git a/samples/wizard/wiztest.xpm b/samples/wizard/wiztest.xpm new file mode 100644 index 0000000000..5bcea61606 --- /dev/null +++ b/samples/wizard/wiztest.xpm @@ -0,0 +1,633 @@ +/* XPM */ +static char *wizimage[] = { +/* columns rows colors chars-per-pixel */ +"165 371 256 2", +" c Gray0", +". c #808080808080", +"X c #808000000000", +"o c #808080800000", +"O c #000080800000", +"+ c #000080808080", +"@ c #000000008080", +"# c #808000008080", +"$ c #808080804040", +"% c #000040404040", +"& c #00008080ffff", +"* c #000040408080", +"= c #40400000ffff", +"- c #808040400000", +"; c Gray100", +": c #c0c0c0c0c0c0", +"> c Red", +", c Yellow", +"< c Green", +"1 c Cyan", +"2 c Blue", +"3 c Magenta", +"4 c #ffffffff8080", +"5 c #0000ffff8080", +"6 c #8080ffffffff", +"7 c #80808080ffff", +"8 c #ffff00008080", +"9 c #ffff80804040", +"0 c #c0c0dcdcc0c0", +"q c #a6a6cacaf0f0", +"w c #ffff7c7c8080", +"e c #ffff50505050", +"r c #d6d600009393", +"t c #ccccececffff", +"y c #efefd6d6c6c6", +"u c #e7e7e7e7d6d6", +"i c #adada9a99090", +"p c #333300000000", +"a c #666600000000", +"s c #999900000000", +"d c #cccc00000000", +"f c #000033330000", +"g c #333333330000", +"h c #666633330000", +"j c #999933330000", +"k c #cccc33330000", +"l c #ffff33330000", +"z c #000066660000", +"x c #333366660000", +"c c #666666660000", +"v c #999966660000", +"b c #cccc66660000", +"n c #ffff66660000", +"m c #000099990000", +"M c #333399990000", +"N c #666699990000", +"B c #999999990000", +"V c #cccc99990000", +"C c #ffff99990000", +"Z c #0000cccc0000", +"A c #3333cccc0000", +"S c #6666cccc0000", +"D c #9999cccc0000", +"F c #cccccccc0000", +"G c #ffffcccc0000", +"H c #6666ffff0000", +"J c #9999ffff0000", +"K c #ccccffff0000", +"L c #000000003333", +"P c #333300003333", +"I c #666600003333", +"U c #999900003333", +"Y c #cccc00003333", +"T c #ffff00003333", +"R c #000033333333", +"E c Gray20", +"W c #666633333333", +"Q c #999933333333", +"! c #cccc33333333", +"~ c #ffff33333333", +"^ c #000066663333", +"/ c #333366663333", +"( c #666666663333", +") c #999966663333", +"_ c #cccc66663333", +"` c #ffff66663333", +"' c #000099993333", +"] c #333399993333", +"[ c #666699993333", +"{ c #999999993333", +"} c #cccc99993333", +"| c #ffff99993333", +" . c #0000cccc3333", +".. c #3333cccc3333", +"X. c #6666cccc3333", +"o. c #9999cccc3333", +"O. c #cccccccc3333", +"+. c #ffffcccc3333", +"@. c #3333ffff3333", +"#. c #6666ffff3333", +"$. c #9999ffff3333", +"%. c #ccccffff3333", +"&. c #ffffffff3333", +"*. c #000000006666", +"=. c #333300006666", +"-. c #666600006666", +";. c #999900006666", +":. c #cccc00006666", +">. c #ffff00006666", +",. c #000033336666", +"<. c #333333336666", +"1. c #666633336666", +"2. c #999933336666", +"3. c #cccc33336666", +"4. c #ffff33336666", +"5. c #000066666666", +"6. c #333366666666", +"7. c Gray40", +"8. c #999966666666", +"9. c #cccc66666666", +"0. c #000099996666", +"q. c #333399996666", +"w. c #666699996666", +"e. c #999999996666", +"r. c #cccc99996666", +"t. c #ffff99996666", +"y. c #0000cccc6666", +"u. c #3333cccc6666", +"i. c #9999cccc6666", +"p. c #cccccccc6666", +"a. c #ffffcccc6666", +"s. c #0000ffff6666", +"d. c #3333ffff6666", +"f. c #9999ffff6666", +"g. c #ccccffff6666", +"h. c #ffff0000cccc", +"j. c #cccc0000ffff", +"k. c #000099999999", +"l. c #999933339999", +"z. c #999900009999", +"x. c #cccc00009999", +"c. c #000000009999", +"v. c #333333339999", +"b. c #666600009999", +"n. c #cccc33339999", +"m. c #ffff00009999", +"M. c #000066669999", +"N. c #333366669999", +"B. c #666633339999", +"V. c #999966669999", +"C. c #cccc66669999", +"Z. c #ffff33339999", +"A. c #333399999999", +"S. c #666699999999", +"D. c Gray60", +"F. c #cccc99999999", +"G. c #ffff99999999", +"H. c #0000cccc9999", +"J. c #3333cccc9999", +"K. c #6666cccc6666", +"L. c #9999cccc9999", +"P. c #cccccccc9999", +"I. c #ffffcccc9999", +"U. c #0000ffff9999", +"Y. c #3333ffff9999", +"T. c #6666cccc9999", +"R. c #9999ffff9999", +"E. c #ccccffff9999", +"W. c #ffffffff9999", +"Q. c #00000000cccc", +"!. c #333300009999", +"~. c #66660000cccc", +"^. c #99990000cccc", +"/. c #cccc0000cccc", +"(. c #000033339999", +"). c #33333333cccc", +"_. c #66663333cccc", +"`. c #99993333cccc", +"'. c #cccc3333cccc", +"]. c #ffff3333cccc", +"[. c #00006666cccc", +"{. c #33336666cccc", +"}. c #666666669999", +"|. c #99996666cccc", +" X c #cccc6666cccc", +".X c #ffff66669999", +"XX c #00009999cccc", +"oX c #33339999cccc", +"OX c #66669999cccc", +"+X c #99999999cccc", +"@X c #cccc9999cccc", +"#X c #ffff9999cccc", +"$X c #0000cccccccc", +"%X c #3333cccccccc", +"&X c #6666cccccccc", +"*X c #9999cccccccc", +"=X c Gray80", +"-X c #ffffcccccccc", +";X c #0000ffffcccc", +":X c #3333ffffcccc", +">X c #6666ffff9999", +",X c #9999ffffcccc", +"