📄 jvwizard.pas
字号:
{-----------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1.1.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is: JvWizard.PAS, released on 2001-12-30.
The Initial Developer of the Original Code is William Yu Wei.
Portions created by William Yu Wei are Copyright (C) 2001 William Yu Wei.
All Rights Reserved.
Contributor(s):
Peter Th鰎nqvist - converted to JVCL naming conventions on 2003-07-11
Andreas Hausladen - fixed some bugs, refactoring of the Wizard button classes on 2004-02-29
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
located at http://jvcl.sourceforge.net
Known Issues:
-----------------------------------------------------------------------------}
// $Id: JvWizard.pas,v 1.71 2005/03/09 14:57:32 marquardt Exp $
{+---------------------------------------------------------------------------+
| CONTRIBUTORS: |
+---------------------------------------------------------------------------+
| Steve Forbes <ozmosys att mira dott net> |
| Chris Macksey <c_macksey att hotmail dott com> |
| Wayne Niddery <waynen att logicfundamentals dott com> |
| Raymond J. Schappe <rschappe att isthmus-ts dott com> |
| Theodore <thpana att otenet dott gr> |
| Max Evans <max att codecraft dott com dott au> |
+---------------------------------------------------------------------------+
| HISTORY COMMENTS |
+---------------------------------------------------------------------------+
| 02/18/2002 OnStartButtonClick, OnLastButtonClick, OnNextButtonClick, |
| OnBackButtonClick, OnFinishButtonClick, OnCancelButtonClick, |
| is added for TJvWizardCustomPage with a Stop parameter. |
| |
| Note: these page click events is called before the wizard |
| button click events. |
| |
| 02/16/2002 Suggested by <Theodore>: |
| 1) ModalResult property is added for TJvWizardButton |
| 2) Width property is added for TJvWizardButton |
| |
| 02/12/2002 1) Suggested by <Max Evans>: |
| Having the next/finish buttons to be the default |
| button when a page shows. |
| 2) Having the cancel button to be the default cancel button. |
| |
| 02/11/2002 1) CanDisplay function is added for TJvWizardRouteMapControl.|
| 2) OnDisplaying event is added for TJvWizardRouteMapControl, |
| so the route map can decide if it could display the page |
| item or not. |
| |
| 02/10/2002 1) Introduce TJvWizardImage class. |
| 2) Clean up the code (TJvWizardGraphicObject, |
| TJvWizardPageObject, ..., etc) |
| 3) Now the TJvWizardPageTitle is inherited from |
| TJvWizardGraphicObject(known as TJvWizardPersistent |
| in former). |
| 4) Suggested by <Tim Schneider>: |
| Controls in the wizard page with aligned set to |
| something should be aligned properly without covering |
| the page header as well as the watermark. Hint: |
| overrided AdjustClientRect method is added for |
| both TJvWizardCustomPage and TJvWizardWelcomePage. |
| |
| 02/09/2002 1) Finish button can be displayed separatly. |
| 2) Bug fixed: Changing the value of EnabledButtons property |
| of TJvWizardCustomPage at run time doesn't refresh the |
| buttons' status on the screen. |
| |
| 02/08/2002 Bug fixed: the OnEnterPage event is not triggled properly, |
| they would be called at the time the wizard is loading |
| them. 'not (csLoading in ComponentState)' added as the |
| part of checking condition in SetActivePage method |
| of TJvWizard. |
| |
| 02/07/2002 VERSION 1.6 RELEASED |
| |
| 1) New property EnabledButtons and VisibleButtons added for |
| TJvWizardCustomPage, so the developers can customize |
| buttons for each page at design time and run time. |
| 2) Remove Enabled and Visible properties from |
| TJvWizardButton of TJvWizard. |
| |
| 02/06/2002 1) Bug fixed: change TJvWizardWelcomePage's color from |
| clWindow to other colors or change |
| TJvWizardInteriorPage's color from other colors to |
| clWindow, the pages won't display in correct color. |
| Hint: |
| By assigning default value of Color property in |
| published section of TJvWizardCustomPage and |
| TJvWizardWelcomePage class. |
| 2) Suggested by <Steve Forbes>: |
| ShowDivider added for TJvWizardPageHeader to enable |
| or disable drawing the page header divider. |
| 3) Use Object.Free instead of FreeAndNil, |
| Rectangle(ARect.Left, ...) instead of Rectangle(ARect), |
| so we can support Delphi 4. |
| |
| 02/05/2002 1) Added by <Theodore>: |
| ButtonHelp added for TJvWizard. |
| 2) RepositionButtons method of TJvWizard is improved. |
| |
| 02/04/2002 function IsForward added, return true if FromPage is |
| forward to ToPage, return false if FromPage is backward |
| to ToPage. |
| |
| 02/03/2002 1) Bug fixed by <Theodore>: SelectPriorPage calls |
| OnSelectFirstPage event rather the OnSelectPriorPage. |
| 2) Suggested by <Theodore>: |
| FromPage parameters added for OnEnterPage event, |
| so the developers can detect from where it enters. |
| 3) Suggested by <Theodore>: |
| ToPage paramters added for OnExitPage event, so the |
| developers can detect to where it exits. |
| 4) Suggested by <Theodore>: |
| OnExitPage event now is called just BEFORE (not after) |
| the page is hidden and BEFORE the new page is actived. |
| It provides the last chance to the developers to stop |
| changing to the new page by raising a message. |
| |
| 02/02/2002 VERSION 1.5 RELEASED |
| |
| 1) DoAddPage, DoDeletePage, DoUpdatePage, DoMovePage added |
| for TJvWizardRouteMapControl |
| 2) Overrided SetParent added for TJvWizardRouteMapControl |
| to detect if the parent is TJvWizard or its descentants.|
| 01/31/2002 1) Improved the RepositionButtons method of TJvWizard, |
| so all the buttons can be positioned properly regardless |
| how their neighbors are. |
| 2) CM_VisibleChanged message handler added for |
| TJvWizardButtonControl, so when the button is visible or |
| invisible, it can make the rest buttons in proper |
| position. |
| |
| 01/30/2002 1) Rename the methods of TJvWizardRouteMapControl |
| 2) WizardPageMoved method added for TJvWizardRouteMapControl |
| which fired after the order of the page changed. |
| 3) OnPaintPage event added for TJvWizardCustomPage, so |
| the developers can custom draw the page. |
| 4) A TJvWizardCustomPage parameter added for IsFirstPage, |
| IsLastPage of TJvWizard to test if the specific page is |
| the first page or the last page. |
| 5) Buttons property added for TJvWizardCustomPage, it can |
| easily access all navigation buttons of TJvWizard. |
| 6) Improved the process to handle the button visible |
| property in more efficent way. |
| see UpdateButtonsStatus method of TJvWizard |
| |
| 01/29/2002 1) Pages property added for TJvWizard. |
| 2) PageCount property added for TJvWizard. |
| 3) Page List Property Editor added for Pages property |
| of TJvWizard. From this property editor, we can |
| |
| a) Add new wizard pages. |
| b) Remove selected pages. |
| c) Drag drop selected page item to change pages' order. |
| |
| 01/28/2002 1) Bug fixed: if the current active page set to disabled, |
| the wizard would not go to next page. |
| 2) Page screen flicker problem solved by setting |
| the DoubleBuffered property of TJvWizardCustomPage |
| to True. |
| 3) ParentFont property added for TJvWizardPageHeader. |
| |
| 01/27/2002 VERSION 1.5 BETA RELEASED |
| |
| 1) JvWizard About form added by <Steve Forbes> |
| Thanks for his great job !!!! |
| 2) Improve the design time button function, press Back |
| button at first page will forward to the last page. |
| While press Next button at last page will forward to |
| the first page. (See FindNextPage method in TJvWizard) |
| 3) Fixed AV when delete only one page in the wizard at |
| design time. (see RemovePage method in TJvWizard) |
| 4) NumGlyphs property added for TJvWizardNavigateButton by |
| <Steve Forbes>, to solve the problem where the |
| NumGlyphs property of the actual button always reset |
| to 1 when it is created dynamically. |
| 5) Layout property added for TJvWizardNavigateButton. |
| 6) Set ImageAlign property's default value of |
| TJvWizardPageHeader to waRight. |
| |
| 01/26/2002 1) Suggested by <Steve Forbes>: |
| Anchors, AnchorPlacement, Indent property added for |
| the text in TJvWizardPageTitle. Remove Left, Top, |
| Width, Height properties from TJvWizardPageTitle. so |
| it is much easiler to operate the title and subtitle. |
| 2) Image property added for TJvWizardCustomPage, |
| both Welcome page and Interior page can display a |
| background image. |
| 3) Image property added for the TJvWizardWaterMark. |
| 4) ImageIndex, ImageAlign, ImageOffset property added for |
| TJvWizardPageHeader. the PageHeader use ImageIndex |
| to retreive image from the header image list of |
| TJvWizard. |
| |
| 01/25/2002 VERSION 1.2 RELEASED |
| |
| Finally, JvWizard has its offical icon!!! It is very cool! |
| Thanks <Steve Forbes> for his great job !!!! |
| |
| 1) Move OnEnterPage, OnPage, OnExitPage event from TJvWizard |
| into TJvWizardCustomPage. |
| 2) TJvWizardPagePanel added, suggested by <Steve Forbes>. |
| 3) Glyph property added for TJvWizardNavigateButton. |
| 4) HeaderImages property added for TJvWizard, it is an |
| image list, which stores all the page header images. |
| |
| 01/24/2002 1) Rename TJvWizardTitle to TJvWizardPageTitle. |
| 2) PaintTo method added for TJvWizardWaterMark. |
| PaintTo method added for TJvWizardPageHeader. |
| PainTo method added for TJvWizardPageTitle. |
| 3) Remove the DisplayPageHeader method from |
| TJvWizardCustomPage. |
| 4) OnPage event added for TJvWizard, fired after the page |
| shows up. |
| 5) Pages, PageCount, PageIndex property, and default code |
| added for all virtual method for TJvWizardRouteMapControl.|
| 6) Compiler directive added, suggested |
| by <Raymond J. Schappe>. |
| 7) Handle Design time package and Run time package, |
| package file name convenstion suggested by |
| <Steve Forbes>: |
| Design time package: JvWizardD?.dpk (bpl, dcp, ...) |
| Run time package: JvWizardD?R.dbp (bpl, dcp, ...) |
| here the ? = Delphi Version (5, 6, ..., etc) |
| |
| 01/23/2002 1) Start Page, Last Page buttons added for TJvWizard, |
| default they are invisible. |
| 2) Visible property added for TJvWizardNavigateButton. |
| |
| 01/22/2002 BorderWidth property added for TJvWizardWaterMark, suggested |
| by <Steve Forbes> |
| |
| 1) Remove the TJvWizardButtonBar, now all the navigate |
| buttons are located in the Wizard. Hint: |
| Add overrided AdjustClientRect for TJvWizard. |
| 2) Bug fixed: Add csAcceptsControls control style into |
| TJvWizard, otherwise it won't accept other controls |
| like JvWizardRouteMap. |
| 3) Bug fixed: TJvWizard.GetChildren procedure, it won't |
| display another controls (include JvWizardRouteMap |
| Control) even if the control is in the wizard. |
| 4) Align property added for TJvWizardRouteMap, so the |
| JvWizardRouteMap can display at either left or right |
| side of the Wizard. |
| 5) Align property added for TKWaterMark, so it can be |
| displayed at either left or right side of Welcome Page. |
| |
| 01/21/2002 VERSION 1.1 RELEASED |
| |
| Suggested by <Chris Macksey>: |
| |
| 1) Add OnSelectNextPage, OnSelectPriorPage, |
| OnSelectFirstPage, OnSelectLastPage events, so user can |
| redirect the page try to go to. |
| 2) Add OnEnterPage, triggled before the page shows up. |
| Add OnExitPage, triggled after the page is hidded. |
| |
| 01/14/2002 1) Add ShowRouteMap property for the TJvWizard. |
| 2) Add destructor in the TJvWizardRouteMap class to fix |
| AV when browse pages after destroy the TJvWizardRouteMap |
| component. |
| |
| 01/13/2002 Make the TJvWizardRouteMap as a separat new component |
| so the user can design its own routemap and communicate |
| with TJvWizard smoothly. |
| |
| 01/12/2002 VERSION 1.0 RELEASED |
| |
| 1) Fixed by <Wayne Niddery> : |
| Under certain circumstance, the Wizard did not always |
| default to the first page. Add overrided |
| Loaded method in the TJvWizard class. |
| 2) Restructure: add TJvWizardHeader and TJvWizardWaterMark, |
| I hate to list all properites like: HeaderColor, |
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -